Whamcloud - gitweb
f8c6bc2b5d217f12a5135f601cbd6d931f4767bf
[tools/e2fsprogs.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-cc=COMPILER      select compiler to use"
16 ac_help="$ac_help
17   --with-linker=LINKER    select linker to use"
18 ac_help="$ac_help
19   --with-ccopts=CCOPTS    select compiler command line options"
20 ac_help="$ac_help
21   --with-ldopts=LDOPTS    select linker command line options"
22 ac_help="$ac_help
23   --with-root-prefix=PREFIX override prefix variable for files to be placed in the root"
24 ac_help="$ac_help
25   --enable-compression    enable EXPERIMENTAL compression support"
26 ac_help="$ac_help
27   --enable-htree          enable EXPERIMENTAL htree directory support"
28 ac_help="$ac_help
29   --enable-htree-clear    clear htree because we don't trust e2fsck"
30 ac_help="$ac_help
31   --enable-old-evms       use EVMS 1.0 ABI (instead of EVMS 1.1)"
32 ac_help="$ac_help
33   --enable-dll-shlibs     select DLL libraries"
34 ac_help="$ac_help
35   --enable-elf-shlibs     select ELF shared libraries"
36 ac_help="$ac_help
37   --enable-bsd-shlibs     select BSD shared libraries"
38 ac_help="$ac_help
39   --enable-profile        build profiling libraries"
40 ac_help="$ac_help
41   --enable-checker        build checker libraries"
42 ac_help="$ac_help
43   --enable-jfs-debug      enable journal debugging"
44 ac_help="$ac_help
45   --disable-swapfs        disable support of legacy byte-swapped filesystems"
46 ac_help="$ac_help
47   --disable-debugfs       disable support of debugfs program"
48 ac_help="$ac_help
49   --disable-imager        disable support of e2image program"
50 ac_help="$ac_help
51   --disable-resizer       disable support of e2resize program"
52 ac_help="$ac_help
53   --enable-dynamic-e2fsck build e2fsck dynamically"
54 ac_help="$ac_help
55   --enable-fsck           build fsck wrapper program"
56 ac_help="$ac_help
57   --enable-old-bitops     Use old (non-standard but native) bitmask operations"
58 ac_help="$ac_help
59   --enable-nls           Turn on Native Language Support"
60 ac_help="$ac_help
61   --with-included-gettext use the GNU gettext library included here"
62 ac_help="$ac_help
63   --with-catgets          use catgets functions if available"
64
65 # Initialize some variables set by options.
66 # The variables have the same names as the options, with
67 # dashes changed to underlines.
68 build=NONE
69 cache_file=./config.cache
70 exec_prefix=NONE
71 host=NONE
72 no_create=
73 nonopt=NONE
74 no_recursion=
75 prefix=NONE
76 program_prefix=NONE
77 program_suffix=NONE
78 program_transform_name=s,x,x,
79 silent=
80 site=
81 srcdir=
82 target=NONE
83 verbose=
84 x_includes=NONE
85 x_libraries=NONE
86 bindir='${exec_prefix}/bin'
87 sbindir='${exec_prefix}/sbin'
88 libexecdir='${exec_prefix}/libexec'
89 datadir='${prefix}/share'
90 sysconfdir='${prefix}/etc'
91 sharedstatedir='${prefix}/com'
92 localstatedir='${prefix}/var'
93 libdir='${exec_prefix}/lib'
94 includedir='${prefix}/include'
95 oldincludedir='/usr/include'
96 infodir='${prefix}/info'
97 mandir='${prefix}/man'
98
99 # Initialize some other variables.
100 subdirs=
101 MFLAGS= MAKEFLAGS=
102 SHELL=${CONFIG_SHELL-/bin/sh}
103 # Maximum number of lines to put in a shell here document.
104 ac_max_here_lines=12
105
106 ac_prev=
107 for ac_option
108 do
109
110   # If the previous option needs an argument, assign it.
111   if test -n "$ac_prev"; then
112     eval "$ac_prev=\$ac_option"
113     ac_prev=
114     continue
115   fi
116
117   case "$ac_option" in
118   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
119   *) ac_optarg= ;;
120   esac
121
122   # Accept the important Cygnus configure options, so we can diagnose typos.
123
124   case "$ac_option" in
125
126   -bindir | --bindir | --bindi | --bind | --bin | --bi)
127     ac_prev=bindir ;;
128   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
129     bindir="$ac_optarg" ;;
130
131   -build | --build | --buil | --bui | --bu)
132     ac_prev=build ;;
133   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
134     build="$ac_optarg" ;;
135
136   -cache-file | --cache-file | --cache-fil | --cache-fi \
137   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
138     ac_prev=cache_file ;;
139   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
140   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
141     cache_file="$ac_optarg" ;;
142
143   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
144     ac_prev=datadir ;;
145   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
146   | --da=*)
147     datadir="$ac_optarg" ;;
148
149   -disable-* | --disable-*)
150     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
151     # Reject names that are not valid shell variable names.
152     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
153       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
154     fi
155     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
156     eval "enable_${ac_feature}=no" ;;
157
158   -enable-* | --enable-*)
159     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
160     # Reject names that are not valid shell variable names.
161     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
162       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
163     fi
164     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
165     case "$ac_option" in
166       *=*) ;;
167       *) ac_optarg=yes ;;
168     esac
169     eval "enable_${ac_feature}='$ac_optarg'" ;;
170
171   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
172   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
173   | --exec | --exe | --ex)
174     ac_prev=exec_prefix ;;
175   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
176   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
177   | --exec=* | --exe=* | --ex=*)
178     exec_prefix="$ac_optarg" ;;
179
180   -gas | --gas | --ga | --g)
181     # Obsolete; use --with-gas.
182     with_gas=yes ;;
183
184   -help | --help | --hel | --he)
185     # Omit some internal or obsolete options to make the list less imposing.
186     # This message is too long to be a string in the A/UX 3.1 sh.
187     cat << EOF
188 Usage: configure [options] [host]
189 Options: [defaults in brackets after descriptions]
190 Configuration:
191   --cache-file=FILE       cache test results in FILE
192   --help                  print this message
193   --no-create             do not create output files
194   --quiet, --silent       do not print \`checking...' messages
195   --version               print the version of autoconf that created configure
196 Directory and file names:
197   --prefix=PREFIX         install architecture-independent files in PREFIX
198                           [$ac_default_prefix]
199   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
200                           [same as prefix]
201   --bindir=DIR            user executables in DIR [EPREFIX/bin]
202   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
203   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
204   --datadir=DIR           read-only architecture-independent data in DIR
205                           [PREFIX/share]
206   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
207   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
208                           [PREFIX/com]
209   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
210   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
211   --includedir=DIR        C header files in DIR [PREFIX/include]
212   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
213   --infodir=DIR           info documentation in DIR [PREFIX/info]
214   --mandir=DIR            man documentation in DIR [PREFIX/man]
215   --srcdir=DIR            find the sources in DIR [configure dir or ..]
216   --program-prefix=PREFIX prepend PREFIX to installed program names
217   --program-suffix=SUFFIX append SUFFIX to installed program names
218   --program-transform-name=PROGRAM
219                           run sed PROGRAM on installed program names
220 EOF
221     cat << EOF
222 Host type:
223   --build=BUILD           configure for building on BUILD [BUILD=HOST]
224   --host=HOST             configure for HOST [guessed]
225   --target=TARGET         configure for TARGET [TARGET=HOST]
226 Features and packages:
227   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
228   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
229   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
230   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
231   --x-includes=DIR        X include files are in DIR
232   --x-libraries=DIR       X library files are in DIR
233 EOF
234     if test -n "$ac_help"; then
235       echo "--enable and --with options recognized:$ac_help"
236     fi
237     exit 0 ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host="$ac_optarg" ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir="$ac_optarg" ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir="$ac_optarg" ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir="$ac_optarg" ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir="$ac_optarg" ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir="$ac_optarg" ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir="$ac_optarg" ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir="$ac_optarg" ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix="$ac_optarg" ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix="$ac_optarg" ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix="$ac_optarg" ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
330   -program-transform-name=* | --program-transform-name=* \
331   | --program-transform-nam=* | --program-transform-na=* \
332   | --program-transform-n=* | --program-transform-=* \
333   | --program-transform=* | --program-transfor=* \
334   | --program-transfo=* | --program-transf=* \
335   | --program-trans=* | --program-tran=* \
336   | --progr-tra=* | --program-tr=* | --program-t=*)
337     program_transform_name="$ac_optarg" ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir="$ac_optarg" ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir="$ac_optarg" ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site="$ac_optarg" ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir="$ac_optarg" ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir="$ac_optarg" ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target="$ac_optarg" ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers)
386     echo "configure generated by autoconf version 2.13"
387     exit 0 ;;
388
389   -with-* | --with-*)
390     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
391     # Reject names that are not valid shell variable names.
392     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
393       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
394     fi
395     ac_package=`echo $ac_package| sed 's/-/_/g'`
396     case "$ac_option" in
397       *=*) ;;
398       *) ac_optarg=yes ;;
399     esac
400     eval "with_${ac_package}='$ac_optarg'" ;;
401
402   -without-* | --without-*)
403     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
406       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
407     fi
408     ac_package=`echo $ac_package| sed 's/-/_/g'`
409     eval "with_${ac_package}=no" ;;
410
411   --x)
412     # Obsolete; use --with-x.
413     with_x=yes ;;
414
415   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
416   | --x-incl | --x-inc | --x-in | --x-i)
417     ac_prev=x_includes ;;
418   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
419   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
420     x_includes="$ac_optarg" ;;
421
422   -x-libraries | --x-libraries | --x-librarie | --x-librari \
423   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
424     ac_prev=x_libraries ;;
425   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
426   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
427     x_libraries="$ac_optarg" ;;
428
429   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
430     ;;
431
432   *)
433     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
434       echo "configure: warning: $ac_option: invalid host type" 1>&2
435     fi
436     if test "x$nonopt" != xNONE; then
437       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
438     fi
439     nonopt="$ac_option"
440     ;;
441
442   esac
443 done
444
445 if test -n "$ac_prev"; then
446   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
447 fi
448
449 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
450
451 # File descriptor usage:
452 # 0 standard input
453 # 1 file creation
454 # 2 errors and warnings
455 # 3 some systems may open it to /dev/tty
456 # 4 used on the Kubota Titan
457 # 6 checking for... messages and results
458 # 5 compiler messages saved in config.log
459 if test "$silent" = yes; then
460   exec 6>/dev/null
461 else
462   exec 6>&1
463 fi
464 exec 5>./config.log
465
466 echo "\
467 This file contains any messages produced by compilers while
468 running configure, to aid debugging if configure makes a mistake.
469 " 1>&5
470
471 # Strip out --no-create and --no-recursion so they do not pile up.
472 # Also quote any args containing shell metacharacters.
473 ac_configure_args=
474 for ac_arg
475 do
476   case "$ac_arg" in
477   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
478   | --no-cr | --no-c) ;;
479   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
480   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
481   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
482   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
483   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
484   esac
485 done
486
487 # NLS nuisances.
488 # Only set these to C if already set.  These must not be set unconditionally
489 # because not all systems understand e.g. LANG=C (notably SCO).
490 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
491 # Non-C LC_CTYPE values break the ctype check.
492 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
493 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
494 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
495 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
496
497 # confdefs.h avoids OS command line length limits that DEFS can exceed.
498 rm -rf conftest* confdefs.h
499 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
500 echo > confdefs.h
501
502 # A filename unique to this package, relative to the directory that
503 # configure is in, which we can look for to find out if srcdir is correct.
504 ac_unique_file=version.h
505
506 # Find the source files, if location was not specified.
507 if test -z "$srcdir"; then
508   ac_srcdir_defaulted=yes
509   # Try the directory containing this script, then its parent.
510   ac_prog=$0
511   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
512   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
513   srcdir=$ac_confdir
514   if test ! -r $srcdir/$ac_unique_file; then
515     srcdir=..
516   fi
517 else
518   ac_srcdir_defaulted=no
519 fi
520 if test ! -r $srcdir/$ac_unique_file; then
521   if test "$ac_srcdir_defaulted" = yes; then
522     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
523   else
524     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
525   fi
526 fi
527 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
528
529 # Prefer explicitly selected file to automatically selected ones.
530 if test -z "$CONFIG_SITE"; then
531   if test "x$prefix" != xNONE; then
532     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
533   else
534     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
535   fi
536 fi
537 for ac_site_file in $CONFIG_SITE; do
538   if test -r "$ac_site_file"; then
539     echo "loading site script $ac_site_file"
540     . "$ac_site_file"
541   fi
542 done
543
544 if test -r "$cache_file"; then
545   echo "loading cache $cache_file"
546   . $cache_file
547 else
548   echo "creating cache $cache_file"
549   > $cache_file
550 fi
551
552 ac_ext=c
553 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
554 ac_cpp='$CPP $CPPFLAGS'
555 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
556 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
557 cross_compiling=$ac_cv_prog_cc_cross
558
559 ac_exeext=
560 ac_objext=o
561 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
562   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
563   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
564     ac_n= ac_c='
565 ' ac_t='        '
566   else
567     ac_n=-n ac_c= ac_t=
568   fi
569 else
570   ac_n= ac_c='\c' ac_t=
571 fi
572
573
574
575 MCONFIG=./MCONFIG
576
577 BINARY_TYPE=bin
578 E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h  \
579         | awk '{print $3}' | tr \" " " | awk '{print $1}'`
580 DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
581         | tr \" " "`
582 MONTH=`echo $DATE | awk -F- '{print $2}'`
583 YEAR=`echo $DATE | awk -F- '{print $3}'`
584
585 if expr $YEAR ">" 1900 > /dev/null ; then
586         E2FSPROGS_YEAR=$YEAR
587 elif expr $YEAR ">" 90 >/dev/null ; then
588         E2FSPROGS_YEAR=19$YEAR
589 else
590         E2FSPROGS_YEAR=20$YEAR
591 fi
592
593 case $MONTH in
594 Jan)    E2FSPROGS_MONTH="January" ;;
595 Feb)    E2FSPROGS_MONTH="February" ;;
596 Mar)    E2FSPROGS_MONTH="March" ;;
597 Apr)    E2FSPROGS_MONTH="April" ;;
598 May)    E2FSPROGS_MONTH="May" ;;
599 Jun)    E2FSPROGS_MONTH="June" ;;
600 Jul)    E2FSPROGS_MONTH="July" ;;
601 Aug)    E2FSPROGS_MONTH="August" ;;
602 Sep)    E2FSPROGS_MONTH="September" ;;
603 Oct)    E2FSPROGS_MONTH="October" ;;
604 Nov)    E2FSPROGS_MONTH="November" ;;
605 Dec)    E2FSPROGS_MONTH="December" ;;
606 *)      echo "Unknown month $MONTH??" ;;
607 esac
608
609 unset DATE MONTH YEAR
610 echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
611 echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
612
613
614
615 ac_aux_dir=
616 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
617   if test -f $ac_dir/install-sh; then
618     ac_aux_dir=$ac_dir
619     ac_install_sh="$ac_aux_dir/install-sh -c"
620     break
621   elif test -f $ac_dir/install.sh; then
622     ac_aux_dir=$ac_dir
623     ac_install_sh="$ac_aux_dir/install.sh -c"
624     break
625   fi
626 done
627 if test -z "$ac_aux_dir"; then
628   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
629 fi
630 ac_config_guess=$ac_aux_dir/config.guess
631 ac_config_sub=$ac_aux_dir/config.sub
632 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
633
634
635 # Make sure we can run config.sub.
636 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
637 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
638 fi
639
640 echo $ac_n "checking host system type""... $ac_c" 1>&6
641 echo "configure:642: checking host system type" >&5
642
643 host_alias=$host
644 case "$host_alias" in
645 NONE)
646   case $nonopt in
647   NONE)
648     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
649     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
650     fi ;;
651   *) host_alias=$nonopt ;;
652   esac ;;
653 esac
654
655 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
656 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
657 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
658 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
659 echo "$ac_t""$host" 1>&6
660
661 # Check whether --with-cc or --without-cc was given.
662 if test "${with_cc+set}" = set; then
663   withval="$with_cc"
664   echo "$ac_t""CC=$withval" 1>&6
665 CC=$withval
666 else
667   if test -z "$CC" ; then CC=cc; fi
668 echo "$ac_t""CC defaults to $CC" 1>&6
669 fi
670 export CC
671
672 # Extract the first word of "gcc", so it can be a program name with args.
673 set dummy gcc; ac_word=$2
674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
675 echo "configure:676: checking for $ac_word" >&5
676 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
677   echo $ac_n "(cached) $ac_c" 1>&6
678 else
679   if test -n "$CC"; then
680   ac_cv_prog_CC="$CC" # Let the user override the test.
681 else
682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
683   ac_dummy="$PATH"
684   for ac_dir in $ac_dummy; do
685     test -z "$ac_dir" && ac_dir=.
686     if test -f $ac_dir/$ac_word; then
687       ac_cv_prog_CC="gcc"
688       break
689     fi
690   done
691   IFS="$ac_save_ifs"
692 fi
693 fi
694 CC="$ac_cv_prog_CC"
695 if test -n "$CC"; then
696   echo "$ac_t""$CC" 1>&6
697 else
698   echo "$ac_t""no" 1>&6
699 fi
700
701 if test -z "$CC"; then
702   # Extract the first word of "cc", so it can be a program name with args.
703 set dummy cc; ac_word=$2
704 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
705 echo "configure:706: checking for $ac_word" >&5
706 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
707   echo $ac_n "(cached) $ac_c" 1>&6
708 else
709   if test -n "$CC"; then
710   ac_cv_prog_CC="$CC" # Let the user override the test.
711 else
712   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
713   ac_prog_rejected=no
714   ac_dummy="$PATH"
715   for ac_dir in $ac_dummy; do
716     test -z "$ac_dir" && ac_dir=.
717     if test -f $ac_dir/$ac_word; then
718       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
719         ac_prog_rejected=yes
720         continue
721       fi
722       ac_cv_prog_CC="cc"
723       break
724     fi
725   done
726   IFS="$ac_save_ifs"
727 if test $ac_prog_rejected = yes; then
728   # We found a bogon in the path, so make sure we never use it.
729   set dummy $ac_cv_prog_CC
730   shift
731   if test $# -gt 0; then
732     # We chose a different compiler from the bogus one.
733     # However, it has the same basename, so the bogon will be chosen
734     # first if we set CC to just the basename; use the full file name.
735     shift
736     set dummy "$ac_dir/$ac_word" "$@"
737     shift
738     ac_cv_prog_CC="$@"
739   fi
740 fi
741 fi
742 fi
743 CC="$ac_cv_prog_CC"
744 if test -n "$CC"; then
745   echo "$ac_t""$CC" 1>&6
746 else
747   echo "$ac_t""no" 1>&6
748 fi
749
750   if test -z "$CC"; then
751     case "`uname -s`" in
752     *win32* | *WIN32*)
753       # Extract the first word of "cl", so it can be a program name with args.
754 set dummy cl; ac_word=$2
755 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
756 echo "configure:757: checking for $ac_word" >&5
757 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
758   echo $ac_n "(cached) $ac_c" 1>&6
759 else
760   if test -n "$CC"; then
761   ac_cv_prog_CC="$CC" # Let the user override the test.
762 else
763   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
764   ac_dummy="$PATH"
765   for ac_dir in $ac_dummy; do
766     test -z "$ac_dir" && ac_dir=.
767     if test -f $ac_dir/$ac_word; then
768       ac_cv_prog_CC="cl"
769       break
770     fi
771   done
772   IFS="$ac_save_ifs"
773 fi
774 fi
775 CC="$ac_cv_prog_CC"
776 if test -n "$CC"; then
777   echo "$ac_t""$CC" 1>&6
778 else
779   echo "$ac_t""no" 1>&6
780 fi
781  ;;
782     esac
783   fi
784   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
785 fi
786
787 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
788 echo "configure:789: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
789
790 ac_ext=c
791 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
792 ac_cpp='$CPP $CPPFLAGS'
793 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
794 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
795 cross_compiling=$ac_cv_prog_cc_cross
796
797 cat > conftest.$ac_ext << EOF
798
799 #line 800 "configure"
800 #include "confdefs.h"
801
802 main(){return(0);}
803 EOF
804 if { (eval echo configure:805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
805   ac_cv_prog_cc_works=yes
806   # If we can't run a trivial program, we are probably using a cross compiler.
807   if (./conftest; exit) 2>/dev/null; then
808     ac_cv_prog_cc_cross=no
809   else
810     ac_cv_prog_cc_cross=yes
811   fi
812 else
813   echo "configure: failed program was:" >&5
814   cat conftest.$ac_ext >&5
815   ac_cv_prog_cc_works=no
816 fi
817 rm -fr conftest*
818 ac_ext=c
819 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
820 ac_cpp='$CPP $CPPFLAGS'
821 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
822 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
823 cross_compiling=$ac_cv_prog_cc_cross
824
825 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
826 if test $ac_cv_prog_cc_works = no; then
827   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
828 fi
829 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
830 echo "configure:831: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
831 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
832 cross_compiling=$ac_cv_prog_cc_cross
833
834 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
835 echo "configure:836: checking whether we are using GNU C" >&5
836 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
837   echo $ac_n "(cached) $ac_c" 1>&6
838 else
839   cat > conftest.c <<EOF
840 #ifdef __GNUC__
841   yes;
842 #endif
843 EOF
844 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
845   ac_cv_prog_gcc=yes
846 else
847   ac_cv_prog_gcc=no
848 fi
849 fi
850
851 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
852
853 if test $ac_cv_prog_gcc = yes; then
854   GCC=yes
855 else
856   GCC=
857 fi
858
859 ac_test_CFLAGS="${CFLAGS+set}"
860 ac_save_CFLAGS="$CFLAGS"
861 CFLAGS=
862 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
863 echo "configure:864: checking whether ${CC-cc} accepts -g" >&5
864 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
865   echo $ac_n "(cached) $ac_c" 1>&6
866 else
867   echo 'void f(){}' > conftest.c
868 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
869   ac_cv_prog_cc_g=yes
870 else
871   ac_cv_prog_cc_g=no
872 fi
873 rm -f conftest*
874
875 fi
876
877 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
878 if test "$ac_test_CFLAGS" = set; then
879   CFLAGS="$ac_save_CFLAGS"
880 elif test $ac_cv_prog_cc_g = yes; then
881   if test "$GCC" = yes; then
882     CFLAGS="-g -O2"
883   else
884     CFLAGS="-g"
885   fi
886 else
887   if test "$GCC" = yes; then
888     CFLAGS="-O2"
889   else
890     CFLAGS=
891   fi
892 fi
893
894 # Check whether --with-linker or --without-linker was given.
895 if test "${with_linker+set}" = set; then
896   withval="$with_linker"
897   echo "$ac_t""LD=$withval" 1>&6
898 LD=$withval
899 else
900   if test -z "$LD" ; then LD=$CC; fi
901 echo "$ac_t""LD defaults to $LD" 1>&6
902 fi
903 export LD
904
905 # Check whether --with-ccopts or --without-ccopts was given.
906 if test "${with_ccopts+set}" = set; then
907   withval="$with_ccopts"
908   echo "$ac_t""CCOPTS is $withval" 1>&6
909 CFLAGS=$withval
910 fi
911 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
912 echo "configure:913: checking how to run the C preprocessor" >&5
913 # On Suns, sometimes $CPP names a directory.
914 if test -n "$CPP" && test -d "$CPP"; then
915   CPP=
916 fi
917 if test -z "$CPP"; then
918 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
919   echo $ac_n "(cached) $ac_c" 1>&6
920 else
921     # This must be in double quotes, not single quotes, because CPP may get
922   # substituted into the Makefile and "${CC-cc}" will confuse make.
923   CPP="${CC-cc} -E"
924   # On the NeXT, cc -E runs the code through the compiler's parser,
925   # not just through cpp.
926   cat > conftest.$ac_ext <<EOF
927 #line 928 "configure"
928 #include "confdefs.h"
929 #include <assert.h>
930 Syntax Error
931 EOF
932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
933 { (eval echo configure:934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
935 if test -z "$ac_err"; then
936   :
937 else
938   echo "$ac_err" >&5
939   echo "configure: failed program was:" >&5
940   cat conftest.$ac_ext >&5
941   rm -rf conftest*
942   CPP="${CC-cc} -E -traditional-cpp"
943   cat > conftest.$ac_ext <<EOF
944 #line 945 "configure"
945 #include "confdefs.h"
946 #include <assert.h>
947 Syntax Error
948 EOF
949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
950 { (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
952 if test -z "$ac_err"; then
953   :
954 else
955   echo "$ac_err" >&5
956   echo "configure: failed program was:" >&5
957   cat conftest.$ac_ext >&5
958   rm -rf conftest*
959   CPP="${CC-cc} -nologo -E"
960   cat > conftest.$ac_ext <<EOF
961 #line 962 "configure"
962 #include "confdefs.h"
963 #include <assert.h>
964 Syntax Error
965 EOF
966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
967 { (eval echo configure:968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
969 if test -z "$ac_err"; then
970   :
971 else
972   echo "$ac_err" >&5
973   echo "configure: failed program was:" >&5
974   cat conftest.$ac_ext >&5
975   rm -rf conftest*
976   CPP=/lib/cpp
977 fi
978 rm -f conftest*
979 fi
980 rm -f conftest*
981 fi
982 rm -f conftest*
983   ac_cv_prog_CPP="$CPP"
984 fi
985   CPP="$ac_cv_prog_CPP"
986 else
987   ac_cv_prog_CPP="$CPP"
988 fi
989 echo "$ac_t""$CPP" 1>&6
990
991 ac_safe=`echo "linux/fs.h" | sed 'y%./+-%__p_%'`
992 echo $ac_n "checking for linux/fs.h""... $ac_c" 1>&6
993 echo "configure:994: checking for linux/fs.h" >&5
994 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
995   echo $ac_n "(cached) $ac_c" 1>&6
996 else
997   cat > conftest.$ac_ext <<EOF
998 #line 999 "configure"
999 #include "confdefs.h"
1000 #include <linux/fs.h>
1001 EOF
1002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1003 { (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1005 if test -z "$ac_err"; then
1006   rm -rf conftest*
1007   eval "ac_cv_header_$ac_safe=yes"
1008 else
1009   echo "$ac_err" >&5
1010   echo "configure: failed program was:" >&5
1011   cat conftest.$ac_ext >&5
1012   rm -rf conftest*
1013   eval "ac_cv_header_$ac_safe=no"
1014 fi
1015 rm -f conftest*
1016 fi
1017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1018   echo "$ac_t""yes" 1>&6
1019   linux_headers=yes
1020 else
1021   echo "$ac_t""no" 1>&6
1022 linux_headers=no
1023 fi
1024
1025 if test "$linux_headers" != yes; then
1026   LINUX_INCLUDE='-I$(top_builddir)/include'
1027 fi
1028
1029 LIB_EXT=.a
1030 STATIC_LIB_EXT=.a
1031 PROFILE_LIB_EXT=.a
1032 # Check whether --with-ldopts or --without-ldopts was given.
1033 if test "${with_ldopts+set}" = set; then
1034   withval="$with_ldopts"
1035   echo "$ac_t""LDFLAGS is $withval" 1>&6
1036 LDFLAGS=$withval
1037 else
1038   LDFLAGS=
1039 fi
1040
1041 # Check whether --with-root-prefix or --without-root-prefix was given.
1042 if test "${with_root_prefix+set}" = set; then
1043   withval="$with_root_prefix"
1044   root_prefix=$withval
1045 else
1046   root_prefix=NONE
1047 fi
1048 # Check whether --enable-compression or --disable-compression was given.
1049 if test "${enable_compression+set}" = set; then
1050   enableval="$enable_compression"
1051   if test "$enableval" = "no"
1052 then
1053         echo "Disabling compression support"
1054 else
1055         cat >> confdefs.h <<\EOF
1056 #define ENABLE_COMPRESSION 1
1057 EOF
1058
1059         echo "Enabling compression support"
1060         echo "WARNING: Compression support is experimental"
1061 fi
1062
1063 else
1064   echo "Disabling compression support by default"
1065
1066 fi
1067
1068 # Check whether --enable-htree or --disable-htree was given.
1069 if test "${enable_htree+set}" = set; then
1070   enableval="$enable_htree"
1071   if test "$enableval" = "no"
1072 then
1073         HTREE_CMT=#
1074         echo "Disabling htree directory support"
1075 else
1076         HTREE_CMT=
1077         cat >> confdefs.h <<\EOF
1078 #define ENABLE_HTREE 1
1079 EOF
1080
1081         echo "Enabling htree directory support"
1082         echo "WARNING: htree support is experimental"
1083 fi
1084
1085 else
1086   HTREE_CMT=#
1087 echo "Disabling htree directory support by default"
1088
1089 fi
1090
1091
1092 # Check whether --enable-htree-clear or --disable-htree-clear was given.
1093 if test "${enable_htree_clear+set}" = set; then
1094   enableval="$enable_htree_clear"
1095   if test "$enableval" = "no"
1096 then
1097         HTREE_CLR_CMT=#
1098         echo "Disabling htree clearing"
1099 else
1100         HTREE_CLR_CMT=
1101         cat >> confdefs.h <<\EOF
1102 #define ENABLE_HTREE_CLEAR 1
1103 EOF
1104
1105         echo "Enabling htree clearing"
1106 fi
1107
1108 else
1109   HTREE_CLR_CMT=#
1110 echo "Disabling htree clearing by default"
1111
1112 fi
1113
1114
1115 # Check whether --enable-old-evms or --disable-old-evms was given.
1116 if test "${enable_old_evms+set}" = set; then
1117   enableval="$enable_old_evms"
1118   if test "$enableval" = "no"
1119 then
1120         echo "Using EVMS 1.1.0 ABI"
1121 else
1122         cat >> confdefs.h <<\EOF
1123 #define ABI_EVMS_1_0 1
1124 EOF
1125
1126         echo "Enabling EVMS 1.0.0 ABI"
1127 fi
1128
1129 else
1130   echo "Using EVMS 1.1.0 ABI by default"
1131
1132 fi
1133
1134 # Check whether --enable-dll-shlibs or --disable-dll-shlibs was given.
1135 if test "${enable_dll_shlibs+set}" = set; then
1136   enableval="$enable_dll_shlibs"
1137   if test "$enableval" = "no"
1138 then
1139         DLL_CMT=#
1140         MAKEFILE_DLL=/dev/null
1141         echo "Disabling DLL shared libraries"
1142 else
1143         DLL_CMT=
1144         MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib
1145         BINARY_TYPE=dllbin
1146         LIB_EXT=.sa
1147         echo "Enabling DLL shared libraries"
1148 fi
1149
1150 else
1151   MAKEFILE_DLL=/dev/null
1152 DLL_CMT=#
1153 echo "Disabling DLL shared libraries by default"
1154
1155 fi
1156
1157
1158
1159 # Check whether --enable-elf-shlibs or --disable-elf-shlibs was given.
1160 if test "${enable_elf_shlibs+set}" = set; then
1161   enableval="$enable_elf_shlibs"
1162   if test "$enableval" = "no"
1163 then
1164         ELF_CMT=#
1165         MAKEFILE_ELF=/dev/null
1166         echo "Disabling ELF shared libraries"
1167 else
1168         ELF_CMT=
1169         MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
1170         case "$host_os" in
1171         solaris2.*)
1172                 MAKEFILE_ELF=$srcdir/lib/Makefile.solaris-lib
1173         ;;
1174         esac
1175         BINARY_TYPE=elfbin
1176         LIB_EXT=.so
1177         echo "Enabling ELF shared libraries"
1178 fi
1179
1180 else
1181   MAKEFILE_ELF=/dev/null
1182 ELF_CMT=#
1183 echo "Disabling ELF shared libraries by default"
1184
1185 fi
1186
1187
1188
1189 # Check whether --enable-bsd-shlibs or --disable-bsd-shlibs was given.
1190 if test "${enable_bsd_shlibs+set}" = set; then
1191   enableval="$enable_bsd_shlibs"
1192   if test "$enableval" = "no"
1193 then
1194         BSDLIB_CMT=#
1195         MAKEFILE_BSDLIB=/dev/null
1196         echo "Disabling BSD shared libraries"
1197 else
1198         BSDLIB_CMT=
1199         MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
1200         LIB_EXT=.so
1201         echo "Enabling BSD shared libraries"
1202 fi
1203
1204 else
1205   MAKEFILE_BSDLIB=/dev/null
1206 BSDLIB_CMT=#
1207 echo "Disabling BSD shared libraries by default"
1208
1209 fi
1210
1211
1212
1213 # Check whether --enable-profile or --disable-profile was given.
1214 if test "${enable_profile+set}" = set; then
1215   enableval="$enable_profile"
1216   if test "$enableval" = "no"
1217 then
1218         PROFILE_CMT=#
1219         MAKEFILE_PROFILE=/dev/null
1220         echo "Disabling profiling libraries"
1221 else
1222         PROFILE_CMT=
1223         MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
1224         PROFILED_LIB_EXT=_p.a
1225         echo "Building profiling libraries"
1226 fi
1227
1228 else
1229   PROFILE_CMT=#
1230 MAKEFILE_PROFILE=/dev/null
1231 echo "Disabling profiling libraries by default"
1232
1233 fi
1234
1235
1236
1237 # Check whether --enable-checker or --disable-checker was given.
1238 if test "${enable_checker+set}" = set; then
1239   enableval="$enable_checker"
1240   if test "$enableval" = "no"
1241 then
1242         CHECKER_CMT=#
1243         MAKEFILE_CHECKER=/dev/null
1244         echo "Disabling checker libraries"
1245 else
1246         CHECKER_CMT=
1247         MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
1248         echo "Building checker libraries"
1249 fi
1250
1251 else
1252   CHECKER_CMT=#
1253 MAKEFILE_CHECKER=/dev/null
1254 echo "Disabling checker libraries by default"
1255
1256 fi
1257
1258
1259
1260
1261
1262
1263 # Check whether --enable-jfs-debug or --disable-jfs-debug was given.
1264 if test "${enable_jfs_debug+set}" = set; then
1265   enableval="$enable_jfs_debug"
1266   if test "$enableval" = "no"
1267 then
1268         echo "Disabling journal debugging"
1269 else
1270         cat >> confdefs.h <<\EOF
1271 #define CONFIG_JBD_DEBUG 1
1272 EOF
1273
1274         echo "Enabling journal debugging"
1275 fi
1276
1277 else
1278   echo "Disabling journal debugging by default"
1279
1280 fi
1281
1282 # Check whether --enable-swapfs or --disable-swapfs was given.
1283 if test "${enable_swapfs+set}" = set; then
1284   enableval="$enable_swapfs"
1285   if test "$enableval" = "no"
1286 then
1287         echo "Disabling swapfs support"
1288 else
1289         cat >> confdefs.h <<\EOF
1290 #define ENABLE_SWAPFS 1
1291 EOF
1292
1293         echo "Enabling swapfs support"
1294 fi
1295
1296 else
1297   echo "Enabling swapfs support by default"
1298 cat >> confdefs.h <<\EOF
1299 #define ENABLE_SWAPFS 1
1300 EOF
1301
1302
1303 fi
1304
1305 # Check whether --enable-debugfs or --disable-debugfs was given.
1306 if test "${enable_debugfs+set}" = set; then
1307   enableval="$enable_debugfs"
1308   if test "$enableval" = "no"
1309 then
1310         echo "Disabling debugfs support"
1311         DEBUGFS_CMT="#"
1312 else
1313         DEBUGFS_CMT=
1314         echo "Enabling debugfs support"
1315 fi
1316
1317 else
1318   echo "Enabling debugfs support by default"
1319 DEBUGFS_CMT=
1320
1321 fi
1322
1323
1324 # Check whether --enable-imager or --disable-imager was given.
1325 if test "${enable_imager+set}" = set; then
1326   enableval="$enable_imager"
1327   if test "$enableval" = "no"
1328 then
1329         echo "Disabling e2image support"
1330         IMAGER_CMT="#"
1331 else
1332         IMAGER_CMT=
1333         echo "Enabling e2image support"
1334 fi
1335
1336 else
1337   echo "Enabling e2image support by default"
1338 IMAGER_CMT=
1339
1340 fi
1341
1342
1343 # Check whether --enable-resizer or --disable-resizer was given.
1344 if test "${enable_resizer+set}" = set; then
1345   enableval="$enable_resizer"
1346   if test "$enableval" = "no"
1347 then
1348         echo "Disabling e2resize support"
1349         RESIZER_CMT="#"
1350 else
1351         RESIZER_CMT=
1352         echo "Enabling e2resize support"
1353 fi
1354
1355 else
1356   echo "Enabling e2resize support by default"
1357 RESIZER_CMT=
1358
1359 fi
1360
1361
1362 # Check whether --enable-dynamic-e2fsck or --disable-dynamic-e2fsck was given.
1363 if test "${enable_dynamic_e2fsck+set}" = set; then
1364   enableval="$enable_dynamic_e2fsck"
1365   if test "$enableval" = "no"
1366 then
1367         E2FSCK_TYPE=static
1368         echo "Building e2fsck statically"
1369 else
1370         E2FSCK_TYPE=shared
1371         echo "Building e2fsck dynamically"
1372 fi
1373
1374 else
1375   E2FSCK_TYPE=static
1376 echo "Building e2fsck statically by default"
1377
1378 fi
1379
1380
1381 # Check whether --enable-fsck or --disable-fsck was given.
1382 if test "${enable_fsck+set}" = set; then
1383   enableval="$enable_fsck"
1384   if test "$enableval" = "no"
1385 then
1386         FSCK_PROG='' FSCK_MAN=''
1387         echo "Not building fsck wrapper"
1388 else
1389         FSCK_PROG=fsck FSCK_MAN=fsck.8
1390         echo "Building fsck wrapper"
1391 fi
1392
1393 else
1394   case "$host_os" in
1395   gnu*)
1396     FSCK_PROG='' FSCK_MAN=''
1397     echo "Not building fsck wrapper by default"
1398     ;;
1399   *)
1400     FSCK_PROG=fsck FSCK_MAN=fsck.8
1401     echo "Building fsck wrapper by default"
1402 esac
1403
1404 fi
1405
1406
1407
1408 MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
1409
1410 # Check whether --enable-old-bitops or --disable-old-bitops was given.
1411 if test "${enable_old_bitops+set}" = set; then
1412   enableval="$enable_old_bitops"
1413   if test "$enableval" = "no"
1414 then
1415         echo "Using new (standard) bitmask operations"
1416 else
1417         cat >> confdefs.h <<\EOF
1418 #define EXT2_OLD_BITOPS 1
1419 EOF
1420
1421         echo "Using old (native) bitmask operations"
1422
1423 fi
1424
1425 else
1426   echo "Using standard bitmask operations by default"
1427
1428 fi
1429
1430 PACKAGE=e2fsprogs
1431 VERSION="$E2FSPROGS_VERSION"
1432 cat >> confdefs.h <<EOF
1433 #define PACKAGE "$PACKAGE"
1434 EOF
1435
1436 cat >> confdefs.h <<EOF
1437 #define VERSION "$VERSION"
1438 EOF
1439
1440
1441
1442
1443 ALL_LINGUAS="it nyc tr"
1444 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1445 echo "configure:1446: checking whether ${MAKE-make} sets \${MAKE}" >&5
1446 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1447 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1448   echo $ac_n "(cached) $ac_c" 1>&6
1449 else
1450   cat > conftestmake <<\EOF
1451 all:
1452         @echo 'ac_maketemp="${MAKE}"'
1453 EOF
1454 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1455 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1456 if test -n "$ac_maketemp"; then
1457   eval ac_cv_prog_make_${ac_make}_set=yes
1458 else
1459   eval ac_cv_prog_make_${ac_make}_set=no
1460 fi
1461 rm -f conftestmake
1462 fi
1463 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1464   echo "$ac_t""yes" 1>&6
1465   SET_MAKE=
1466 else
1467   echo "$ac_t""no" 1>&6
1468   SET_MAKE="MAKE=${MAKE-make}"
1469 fi
1470
1471 # Extract the first word of "ranlib", so it can be a program name with args.
1472 set dummy ranlib; ac_word=$2
1473 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1474 echo "configure:1475: checking for $ac_word" >&5
1475 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1476   echo $ac_n "(cached) $ac_c" 1>&6
1477 else
1478   if test -n "$RANLIB"; then
1479   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1480 else
1481   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1482   ac_dummy="$PATH"
1483   for ac_dir in $ac_dummy; do
1484     test -z "$ac_dir" && ac_dir=.
1485     if test -f $ac_dir/$ac_word; then
1486       ac_cv_prog_RANLIB="ranlib"
1487       break
1488     fi
1489   done
1490   IFS="$ac_save_ifs"
1491   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1492 fi
1493 fi
1494 RANLIB="$ac_cv_prog_RANLIB"
1495 if test -n "$RANLIB"; then
1496   echo "$ac_t""$RANLIB" 1>&6
1497 else
1498   echo "$ac_t""no" 1>&6
1499 fi
1500
1501 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1502 echo "configure:1503: checking for POSIXized ISC" >&5
1503 if test -d /etc/conf/kconfig.d &&
1504   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1505 then
1506   echo "$ac_t""yes" 1>&6
1507   ISC=yes # If later tests want to check for ISC.
1508   cat >> confdefs.h <<\EOF
1509 #define _POSIX_SOURCE 1
1510 EOF
1511
1512   if test "$GCC" = yes; then
1513     CC="$CC -posix"
1514   else
1515     CC="$CC -Xp"
1516   fi
1517 else
1518   echo "$ac_t""no" 1>&6
1519   ISC=
1520 fi
1521
1522 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1523 echo "configure:1524: checking for ANSI C header files" >&5
1524 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1525   echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527   cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 #include <stdlib.h>
1531 #include <stdarg.h>
1532 #include <string.h>
1533 #include <float.h>
1534 EOF
1535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1536 { (eval echo configure:1537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1538 if test -z "$ac_err"; then
1539   rm -rf conftest*
1540   ac_cv_header_stdc=yes
1541 else
1542   echo "$ac_err" >&5
1543   echo "configure: failed program was:" >&5
1544   cat conftest.$ac_ext >&5
1545   rm -rf conftest*
1546   ac_cv_header_stdc=no
1547 fi
1548 rm -f conftest*
1549
1550 if test $ac_cv_header_stdc = yes; then
1551   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1552 cat > conftest.$ac_ext <<EOF
1553 #line 1554 "configure"
1554 #include "confdefs.h"
1555 #include <string.h>
1556 EOF
1557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1558   egrep "memchr" >/dev/null 2>&1; then
1559   :
1560 else
1561   rm -rf conftest*
1562   ac_cv_header_stdc=no
1563 fi
1564 rm -f conftest*
1565
1566 fi
1567
1568 if test $ac_cv_header_stdc = yes; then
1569   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1570 cat > conftest.$ac_ext <<EOF
1571 #line 1572 "configure"
1572 #include "confdefs.h"
1573 #include <stdlib.h>
1574 EOF
1575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1576   egrep "free" >/dev/null 2>&1; then
1577   :
1578 else
1579   rm -rf conftest*
1580   ac_cv_header_stdc=no
1581 fi
1582 rm -f conftest*
1583
1584 fi
1585
1586 if test $ac_cv_header_stdc = yes; then
1587   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1588 if test "$cross_compiling" = yes; then
1589   :
1590 else
1591   cat > conftest.$ac_ext <<EOF
1592 #line 1593 "configure"
1593 #include "confdefs.h"
1594 #include <ctype.h>
1595 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1596 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1597 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1598 int main () { int i; for (i = 0; i < 256; i++)
1599 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1600 exit (0); }
1601
1602 EOF
1603 if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1604 then
1605   :
1606 else
1607   echo "configure: failed program was:" >&5
1608   cat conftest.$ac_ext >&5
1609   rm -fr conftest*
1610   ac_cv_header_stdc=no
1611 fi
1612 rm -fr conftest*
1613 fi
1614
1615 fi
1616 fi
1617
1618 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1619 if test $ac_cv_header_stdc = yes; then
1620   cat >> confdefs.h <<\EOF
1621 #define STDC_HEADERS 1
1622 EOF
1623
1624 fi
1625
1626 echo $ac_n "checking for working const""... $ac_c" 1>&6
1627 echo "configure:1628: checking for working const" >&5
1628 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1629   echo $ac_n "(cached) $ac_c" 1>&6
1630 else
1631   cat > conftest.$ac_ext <<EOF
1632 #line 1633 "configure"
1633 #include "confdefs.h"
1634
1635 int main() {
1636
1637 /* Ultrix mips cc rejects this.  */
1638 typedef int charset[2]; const charset x;
1639 /* SunOS 4.1.1 cc rejects this.  */
1640 char const *const *ccp;
1641 char **p;
1642 /* NEC SVR4.0.2 mips cc rejects this.  */
1643 struct point {int x, y;};
1644 static struct point const zero = {0,0};
1645 /* AIX XL C 1.02.0.0 rejects this.
1646    It does not let you subtract one const X* pointer from another in an arm
1647    of an if-expression whose if-part is not a constant expression */
1648 const char *g = "string";
1649 ccp = &g + (g ? g-g : 0);
1650 /* HPUX 7.0 cc rejects these. */
1651 ++ccp;
1652 p = (char**) ccp;
1653 ccp = (char const *const *) p;
1654 { /* SCO 3.2v4 cc rejects this.  */
1655   char *t;
1656   char const *s = 0 ? (char *) 0 : (char const *) 0;
1657
1658   *t++ = 0;
1659 }
1660 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1661   int x[] = {25, 17};
1662   const int *foo = &x[0];
1663   ++foo;
1664 }
1665 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1666   typedef const int *iptr;
1667   iptr p = 0;
1668   ++p;
1669 }
1670 { /* AIX XL C 1.02.0.0 rejects this saying
1671      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1672   struct s { int j; const int *ap[3]; };
1673   struct s *b; b->j = 5;
1674 }
1675 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1676   const int foo = 10;
1677 }
1678
1679 ; return 0; }
1680 EOF
1681 if { (eval echo configure:1682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1682   rm -rf conftest*
1683   ac_cv_c_const=yes
1684 else
1685   echo "configure: failed program was:" >&5
1686   cat conftest.$ac_ext >&5
1687   rm -rf conftest*
1688   ac_cv_c_const=no
1689 fi
1690 rm -f conftest*
1691 fi
1692
1693 echo "$ac_t""$ac_cv_c_const" 1>&6
1694 if test $ac_cv_c_const = no; then
1695   cat >> confdefs.h <<\EOF
1696 #define const 
1697 EOF
1698
1699 fi
1700
1701 echo $ac_n "checking for inline""... $ac_c" 1>&6
1702 echo "configure:1703: checking for inline" >&5
1703 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1704   echo $ac_n "(cached) $ac_c" 1>&6
1705 else
1706   ac_cv_c_inline=no
1707 for ac_kw in inline __inline__ __inline; do
1708   cat > conftest.$ac_ext <<EOF
1709 #line 1710 "configure"
1710 #include "confdefs.h"
1711
1712 int main() {
1713 } $ac_kw foo() {
1714 ; return 0; }
1715 EOF
1716 if { (eval echo configure:1717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1717   rm -rf conftest*
1718   ac_cv_c_inline=$ac_kw; break
1719 else
1720   echo "configure: failed program was:" >&5
1721   cat conftest.$ac_ext >&5
1722 fi
1723 rm -f conftest*
1724 done
1725
1726 fi
1727
1728 echo "$ac_t""$ac_cv_c_inline" 1>&6
1729 case "$ac_cv_c_inline" in
1730   inline | yes) ;;
1731   no) cat >> confdefs.h <<\EOF
1732 #define inline 
1733 EOF
1734  ;;
1735   *)  cat >> confdefs.h <<EOF
1736 #define inline $ac_cv_c_inline
1737 EOF
1738  ;;
1739 esac
1740
1741 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1742 echo "configure:1743: checking for off_t" >&5
1743 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1744   echo $ac_n "(cached) $ac_c" 1>&6
1745 else
1746   cat > conftest.$ac_ext <<EOF
1747 #line 1748 "configure"
1748 #include "confdefs.h"
1749 #include <sys/types.h>
1750 #if STDC_HEADERS
1751 #include <stdlib.h>
1752 #include <stddef.h>
1753 #endif
1754 EOF
1755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1756   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1757   rm -rf conftest*
1758   ac_cv_type_off_t=yes
1759 else
1760   rm -rf conftest*
1761   ac_cv_type_off_t=no
1762 fi
1763 rm -f conftest*
1764
1765 fi
1766 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1767 if test $ac_cv_type_off_t = no; then
1768   cat >> confdefs.h <<\EOF
1769 #define off_t long
1770 EOF
1771
1772 fi
1773
1774 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1775 echo "configure:1776: checking for size_t" >&5
1776 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1777   echo $ac_n "(cached) $ac_c" 1>&6
1778 else
1779   cat > conftest.$ac_ext <<EOF
1780 #line 1781 "configure"
1781 #include "confdefs.h"
1782 #include <sys/types.h>
1783 #if STDC_HEADERS
1784 #include <stdlib.h>
1785 #include <stddef.h>
1786 #endif
1787 EOF
1788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1789   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1790   rm -rf conftest*
1791   ac_cv_type_size_t=yes
1792 else
1793   rm -rf conftest*
1794   ac_cv_type_size_t=no
1795 fi
1796 rm -f conftest*
1797
1798 fi
1799 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1800 if test $ac_cv_type_size_t = no; then
1801   cat >> confdefs.h <<\EOF
1802 #define size_t unsigned
1803 EOF
1804
1805 fi
1806
1807 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1808 # for constant arguments.  Useless!
1809 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1810 echo "configure:1811: checking for working alloca.h" >&5
1811 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1812   echo $ac_n "(cached) $ac_c" 1>&6
1813 else
1814   cat > conftest.$ac_ext <<EOF
1815 #line 1816 "configure"
1816 #include "confdefs.h"
1817 #include <alloca.h>
1818 int main() {
1819 char *p = alloca(2 * sizeof(int));
1820 ; return 0; }
1821 EOF
1822 if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1823   rm -rf conftest*
1824   ac_cv_header_alloca_h=yes
1825 else
1826   echo "configure: failed program was:" >&5
1827   cat conftest.$ac_ext >&5
1828   rm -rf conftest*
1829   ac_cv_header_alloca_h=no
1830 fi
1831 rm -f conftest*
1832 fi
1833
1834 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1835 if test $ac_cv_header_alloca_h = yes; then
1836   cat >> confdefs.h <<\EOF
1837 #define HAVE_ALLOCA_H 1
1838 EOF
1839
1840 fi
1841
1842 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1843 echo "configure:1844: checking for alloca" >&5
1844 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1845   echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847   cat > conftest.$ac_ext <<EOF
1848 #line 1849 "configure"
1849 #include "confdefs.h"
1850
1851 #ifdef __GNUC__
1852 # define alloca __builtin_alloca
1853 #else
1854 # ifdef _MSC_VER
1855 #  include <malloc.h>
1856 #  define alloca _alloca
1857 # else
1858 #  if HAVE_ALLOCA_H
1859 #   include <alloca.h>
1860 #  else
1861 #   ifdef _AIX
1862  #pragma alloca
1863 #   else
1864 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1865 char *alloca ();
1866 #    endif
1867 #   endif
1868 #  endif
1869 # endif
1870 #endif
1871
1872 int main() {
1873 char *p = (char *) alloca(1);
1874 ; return 0; }
1875 EOF
1876 if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1877   rm -rf conftest*
1878   ac_cv_func_alloca_works=yes
1879 else
1880   echo "configure: failed program was:" >&5
1881   cat conftest.$ac_ext >&5
1882   rm -rf conftest*
1883   ac_cv_func_alloca_works=no
1884 fi
1885 rm -f conftest*
1886 fi
1887
1888 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1889 if test $ac_cv_func_alloca_works = yes; then
1890   cat >> confdefs.h <<\EOF
1891 #define HAVE_ALLOCA 1
1892 EOF
1893
1894 fi
1895
1896 if test $ac_cv_func_alloca_works = no; then
1897   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1898   # that cause trouble.  Some versions do not even contain alloca or
1899   # contain a buggy version.  If you still want to use their alloca,
1900   # use ar to extract alloca.o from them instead of compiling alloca.c.
1901   ALLOCA=alloca.${ac_objext}
1902   cat >> confdefs.h <<\EOF
1903 #define C_ALLOCA 1
1904 EOF
1905
1906
1907 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1908 echo "configure:1909: checking whether alloca needs Cray hooks" >&5
1909 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1910   echo $ac_n "(cached) $ac_c" 1>&6
1911 else
1912   cat > conftest.$ac_ext <<EOF
1913 #line 1914 "configure"
1914 #include "confdefs.h"
1915 #if defined(CRAY) && ! defined(CRAY2)
1916 webecray
1917 #else
1918 wenotbecray
1919 #endif
1920
1921 EOF
1922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1923   egrep "webecray" >/dev/null 2>&1; then
1924   rm -rf conftest*
1925   ac_cv_os_cray=yes
1926 else
1927   rm -rf conftest*
1928   ac_cv_os_cray=no
1929 fi
1930 rm -f conftest*
1931
1932 fi
1933
1934 echo "$ac_t""$ac_cv_os_cray" 1>&6
1935 if test $ac_cv_os_cray = yes; then
1936 for ac_func in _getb67 GETB67 getb67; do
1937   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1938 echo "configure:1939: checking for $ac_func" >&5
1939 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1940   echo $ac_n "(cached) $ac_c" 1>&6
1941 else
1942   cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 /* System header to define __stub macros and hopefully few prototypes,
1946     which can conflict with char $ac_func(); below.  */
1947 #include <assert.h>
1948 /* Override any gcc2 internal prototype to avoid an error.  */
1949 /* We use char because int might match the return type of a gcc2
1950     builtin and then its argument prototype would still apply.  */
1951 char $ac_func();
1952
1953 int main() {
1954
1955 /* The GNU C library defines this for functions which it implements
1956     to always fail with ENOSYS.  Some functions are actually named
1957     something starting with __ and the normal name is an alias.  */
1958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1959 choke me
1960 #else
1961 $ac_func();
1962 #endif
1963
1964 ; return 0; }
1965 EOF
1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1967   rm -rf conftest*
1968   eval "ac_cv_func_$ac_func=yes"
1969 else
1970   echo "configure: failed program was:" >&5
1971   cat conftest.$ac_ext >&5
1972   rm -rf conftest*
1973   eval "ac_cv_func_$ac_func=no"
1974 fi
1975 rm -f conftest*
1976 fi
1977
1978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1979   echo "$ac_t""yes" 1>&6
1980   cat >> confdefs.h <<EOF
1981 #define CRAY_STACKSEG_END $ac_func
1982 EOF
1983
1984   break
1985 else
1986   echo "$ac_t""no" 1>&6
1987 fi
1988
1989 done
1990 fi
1991
1992 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1993 echo "configure:1994: checking stack direction for C alloca" >&5
1994 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1995   echo $ac_n "(cached) $ac_c" 1>&6
1996 else
1997   if test "$cross_compiling" = yes; then
1998   ac_cv_c_stack_direction=0
1999 else
2000   cat > conftest.$ac_ext <<EOF
2001 #line 2002 "configure"
2002 #include "confdefs.h"
2003 find_stack_direction ()
2004 {
2005   static char *addr = 0;
2006   auto char dummy;
2007   if (addr == 0)
2008     {
2009       addr = &dummy;
2010       return find_stack_direction ();
2011     }
2012   else
2013     return (&dummy > addr) ? 1 : -1;
2014 }
2015 main ()
2016 {
2017   exit (find_stack_direction() < 0);
2018 }
2019 EOF
2020 if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2021 then
2022   ac_cv_c_stack_direction=1
2023 else
2024   echo "configure: failed program was:" >&5
2025   cat conftest.$ac_ext >&5
2026   rm -fr conftest*
2027   ac_cv_c_stack_direction=-1
2028 fi
2029 rm -fr conftest*
2030 fi
2031
2032 fi
2033
2034 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2035 cat >> confdefs.h <<EOF
2036 #define STACK_DIRECTION $ac_cv_c_stack_direction
2037 EOF
2038
2039 fi
2040
2041 for ac_hdr in unistd.h
2042 do
2043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2045 echo "configure:2046: checking for $ac_hdr" >&5
2046 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2047   echo $ac_n "(cached) $ac_c" 1>&6
2048 else
2049   cat > conftest.$ac_ext <<EOF
2050 #line 2051 "configure"
2051 #include "confdefs.h"
2052 #include <$ac_hdr>
2053 EOF
2054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2055 { (eval echo configure:2056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2057 if test -z "$ac_err"; then
2058   rm -rf conftest*
2059   eval "ac_cv_header_$ac_safe=yes"
2060 else
2061   echo "$ac_err" >&5
2062   echo "configure: failed program was:" >&5
2063   cat conftest.$ac_ext >&5
2064   rm -rf conftest*
2065   eval "ac_cv_header_$ac_safe=no"
2066 fi
2067 rm -f conftest*
2068 fi
2069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2070   echo "$ac_t""yes" 1>&6
2071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2072   cat >> confdefs.h <<EOF
2073 #define $ac_tr_hdr 1
2074 EOF
2075  
2076 else
2077   echo "$ac_t""no" 1>&6
2078 fi
2079 done
2080
2081 for ac_func in getpagesize
2082 do
2083 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2084 echo "configure:2085: checking for $ac_func" >&5
2085 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2086   echo $ac_n "(cached) $ac_c" 1>&6
2087 else
2088   cat > conftest.$ac_ext <<EOF
2089 #line 2090 "configure"
2090 #include "confdefs.h"
2091 /* System header to define __stub macros and hopefully few prototypes,
2092     which can conflict with char $ac_func(); below.  */
2093 #include <assert.h>
2094 /* Override any gcc2 internal prototype to avoid an error.  */
2095 /* We use char because int might match the return type of a gcc2
2096     builtin and then its argument prototype would still apply.  */
2097 char $ac_func();
2098
2099 int main() {
2100
2101 /* The GNU C library defines this for functions which it implements
2102     to always fail with ENOSYS.  Some functions are actually named
2103     something starting with __ and the normal name is an alias.  */
2104 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2105 choke me
2106 #else
2107 $ac_func();
2108 #endif
2109
2110 ; return 0; }
2111 EOF
2112 if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2113   rm -rf conftest*
2114   eval "ac_cv_func_$ac_func=yes"
2115 else
2116   echo "configure: failed program was:" >&5
2117   cat conftest.$ac_ext >&5
2118   rm -rf conftest*
2119   eval "ac_cv_func_$ac_func=no"
2120 fi
2121 rm -f conftest*
2122 fi
2123
2124 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2125   echo "$ac_t""yes" 1>&6
2126     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2127   cat >> confdefs.h <<EOF
2128 #define $ac_tr_func 1
2129 EOF
2130  
2131 else
2132   echo "$ac_t""no" 1>&6
2133 fi
2134 done
2135
2136 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2137 echo "configure:2138: checking for working mmap" >&5
2138 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2139   echo $ac_n "(cached) $ac_c" 1>&6
2140 else
2141   if test "$cross_compiling" = yes; then
2142   ac_cv_func_mmap_fixed_mapped=no
2143 else
2144   cat > conftest.$ac_ext <<EOF
2145 #line 2146 "configure"
2146 #include "confdefs.h"
2147
2148 /* Thanks to Mike Haertel and Jim Avera for this test.
2149    Here is a matrix of mmap possibilities:
2150         mmap private not fixed
2151         mmap private fixed at somewhere currently unmapped
2152         mmap private fixed at somewhere already mapped
2153         mmap shared not fixed
2154         mmap shared fixed at somewhere currently unmapped
2155         mmap shared fixed at somewhere already mapped
2156    For private mappings, we should verify that changes cannot be read()
2157    back from the file, nor mmap's back from the file at a different
2158    address.  (There have been systems where private was not correctly
2159    implemented like the infamous i386 svr4.0, and systems where the
2160    VM page cache was not coherent with the filesystem buffer cache
2161    like early versions of FreeBSD and possibly contemporary NetBSD.)
2162    For shared mappings, we should conversely verify that changes get
2163    propogated back to all the places they're supposed to be.
2164
2165    Grep wants private fixed already mapped.
2166    The main things grep needs to know about mmap are:
2167    * does it exist and is it safe to write into the mmap'd area
2168    * how to use it (BSD variants)  */
2169 #include <sys/types.h>
2170 #include <fcntl.h>
2171 #include <sys/mman.h>
2172
2173 /* This mess was copied from the GNU getpagesize.h.  */
2174 #ifndef HAVE_GETPAGESIZE
2175 # ifdef HAVE_UNISTD_H
2176 #  include <unistd.h>
2177 # endif
2178
2179 /* Assume that all systems that can run configure have sys/param.h.  */
2180 # ifndef HAVE_SYS_PARAM_H
2181 #  define HAVE_SYS_PARAM_H 1
2182 # endif
2183
2184 # ifdef _SC_PAGESIZE
2185 #  define getpagesize() sysconf(_SC_PAGESIZE)
2186 # else /* no _SC_PAGESIZE */
2187 #  ifdef HAVE_SYS_PARAM_H
2188 #   include <sys/param.h>
2189 #   ifdef EXEC_PAGESIZE
2190 #    define getpagesize() EXEC_PAGESIZE
2191 #   else /* no EXEC_PAGESIZE */
2192 #    ifdef NBPG
2193 #     define getpagesize() NBPG * CLSIZE
2194 #     ifndef CLSIZE
2195 #      define CLSIZE 1
2196 #     endif /* no CLSIZE */
2197 #    else /* no NBPG */
2198 #     ifdef NBPC
2199 #      define getpagesize() NBPC
2200 #     else /* no NBPC */
2201 #      ifdef PAGESIZE
2202 #       define getpagesize() PAGESIZE
2203 #      endif /* PAGESIZE */
2204 #     endif /* no NBPC */
2205 #    endif /* no NBPG */
2206 #   endif /* no EXEC_PAGESIZE */
2207 #  else /* no HAVE_SYS_PARAM_H */
2208 #   define getpagesize() 8192   /* punt totally */
2209 #  endif /* no HAVE_SYS_PARAM_H */
2210 # endif /* no _SC_PAGESIZE */
2211
2212 #endif /* no HAVE_GETPAGESIZE */
2213
2214 #ifdef __cplusplus
2215 extern "C" { void *malloc(unsigned); }
2216 #else
2217 char *malloc();
2218 #endif
2219
2220 int
2221 main()
2222 {
2223         char *data, *data2, *data3;
2224         int i, pagesize;
2225         int fd;
2226
2227         pagesize = getpagesize();
2228
2229         /*
2230          * First, make a file with some known garbage in it.
2231          */
2232         data = malloc(pagesize);
2233         if (!data)
2234                 exit(1);
2235         for (i = 0; i < pagesize; ++i)
2236                 *(data + i) = rand();
2237         umask(0);
2238         fd = creat("conftestmmap", 0600);
2239         if (fd < 0)
2240                 exit(1);
2241         if (write(fd, data, pagesize) != pagesize)
2242                 exit(1);
2243         close(fd);
2244
2245         /*
2246          * Next, try to mmap the file at a fixed address which
2247          * already has something else allocated at it.  If we can,
2248          * also make sure that we see the same garbage.
2249          */
2250         fd = open("conftestmmap", O_RDWR);
2251         if (fd < 0)
2252                 exit(1);
2253         data2 = malloc(2 * pagesize);
2254         if (!data2)
2255                 exit(1);
2256         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2257         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2258             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2259                 exit(1);
2260         for (i = 0; i < pagesize; ++i)
2261                 if (*(data + i) != *(data2 + i))
2262                         exit(1);
2263
2264         /*
2265          * Finally, make sure that changes to the mapped area
2266          * do not percolate back to the file as seen by read().
2267          * (This is a bug on some variants of i386 svr4.0.)
2268          */
2269         for (i = 0; i < pagesize; ++i)
2270                 *(data2 + i) = *(data2 + i) + 1;
2271         data3 = malloc(pagesize);
2272         if (!data3)
2273                 exit(1);
2274         if (read(fd, data3, pagesize) != pagesize)
2275                 exit(1);
2276         for (i = 0; i < pagesize; ++i)
2277                 if (*(data + i) != *(data3 + i))
2278                         exit(1);
2279         close(fd);
2280         unlink("conftestmmap");
2281         exit(0);
2282 }
2283
2284 EOF
2285 if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2286 then
2287   ac_cv_func_mmap_fixed_mapped=yes
2288 else
2289   echo "configure: failed program was:" >&5
2290   cat conftest.$ac_ext >&5
2291   rm -fr conftest*
2292   ac_cv_func_mmap_fixed_mapped=no
2293 fi
2294 rm -fr conftest*
2295 fi
2296
2297 fi
2298
2299 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2300 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2301   cat >> confdefs.h <<\EOF
2302 #define HAVE_MMAP 1
2303 EOF
2304
2305 fi
2306
2307                               
2308    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2309 unistd.h sys/param.h
2310 do
2311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2313 echo "configure:2314: checking for $ac_hdr" >&5
2314 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2315   echo $ac_n "(cached) $ac_c" 1>&6
2316 else
2317   cat > conftest.$ac_ext <<EOF
2318 #line 2319 "configure"
2319 #include "confdefs.h"
2320 #include <$ac_hdr>
2321 EOF
2322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2323 { (eval echo configure:2324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2325 if test -z "$ac_err"; then
2326   rm -rf conftest*
2327   eval "ac_cv_header_$ac_safe=yes"
2328 else
2329   echo "$ac_err" >&5
2330   echo "configure: failed program was:" >&5
2331   cat conftest.$ac_ext >&5
2332   rm -rf conftest*
2333   eval "ac_cv_header_$ac_safe=no"
2334 fi
2335 rm -f conftest*
2336 fi
2337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2338   echo "$ac_t""yes" 1>&6
2339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2340   cat >> confdefs.h <<EOF
2341 #define $ac_tr_hdr 1
2342 EOF
2343  
2344 else
2345   echo "$ac_t""no" 1>&6
2346 fi
2347 done
2348
2349    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2350 strdup __argz_count __argz_stringify __argz_next
2351 do
2352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2353 echo "configure:2354: checking for $ac_func" >&5
2354 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2355   echo $ac_n "(cached) $ac_c" 1>&6
2356 else
2357   cat > conftest.$ac_ext <<EOF
2358 #line 2359 "configure"
2359 #include "confdefs.h"
2360 /* System header to define __stub macros and hopefully few prototypes,
2361     which can conflict with char $ac_func(); below.  */
2362 #include <assert.h>
2363 /* Override any gcc2 internal prototype to avoid an error.  */
2364 /* We use char because int might match the return type of a gcc2
2365     builtin and then its argument prototype would still apply.  */
2366 char $ac_func();
2367
2368 int main() {
2369
2370 /* The GNU C library defines this for functions which it implements
2371     to always fail with ENOSYS.  Some functions are actually named
2372     something starting with __ and the normal name is an alias.  */
2373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2374 choke me
2375 #else
2376 $ac_func();
2377 #endif
2378
2379 ; return 0; }
2380 EOF
2381 if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2382   rm -rf conftest*
2383   eval "ac_cv_func_$ac_func=yes"
2384 else
2385   echo "configure: failed program was:" >&5
2386   cat conftest.$ac_ext >&5
2387   rm -rf conftest*
2388   eval "ac_cv_func_$ac_func=no"
2389 fi
2390 rm -f conftest*
2391 fi
2392
2393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2394   echo "$ac_t""yes" 1>&6
2395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2396   cat >> confdefs.h <<EOF
2397 #define $ac_tr_func 1
2398 EOF
2399  
2400 else
2401   echo "$ac_t""no" 1>&6
2402 fi
2403 done
2404
2405
2406    if test "${ac_cv_func_stpcpy+set}" != "set"; then
2407      for ac_func in stpcpy
2408 do
2409 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2410 echo "configure:2411: checking for $ac_func" >&5
2411 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2412   echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414   cat > conftest.$ac_ext <<EOF
2415 #line 2416 "configure"
2416 #include "confdefs.h"
2417 /* System header to define __stub macros and hopefully few prototypes,
2418     which can conflict with char $ac_func(); below.  */
2419 #include <assert.h>
2420 /* Override any gcc2 internal prototype to avoid an error.  */
2421 /* We use char because int might match the return type of a gcc2
2422     builtin and then its argument prototype would still apply.  */
2423 char $ac_func();
2424
2425 int main() {
2426
2427 /* The GNU C library defines this for functions which it implements
2428     to always fail with ENOSYS.  Some functions are actually named
2429     something starting with __ and the normal name is an alias.  */
2430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2431 choke me
2432 #else
2433 $ac_func();
2434 #endif
2435
2436 ; return 0; }
2437 EOF
2438 if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2439   rm -rf conftest*
2440   eval "ac_cv_func_$ac_func=yes"
2441 else
2442   echo "configure: failed program was:" >&5
2443   cat conftest.$ac_ext >&5
2444   rm -rf conftest*
2445   eval "ac_cv_func_$ac_func=no"
2446 fi
2447 rm -f conftest*
2448 fi
2449
2450 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2451   echo "$ac_t""yes" 1>&6
2452     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2453   cat >> confdefs.h <<EOF
2454 #define $ac_tr_func 1
2455 EOF
2456  
2457 else
2458   echo "$ac_t""no" 1>&6
2459 fi
2460 done
2461
2462    fi
2463    if test "${ac_cv_func_stpcpy}" = "yes"; then
2464      cat >> confdefs.h <<\EOF
2465 #define HAVE_STPCPY 1
2466 EOF
2467
2468    fi
2469
2470    if test $ac_cv_header_locale_h = yes; then
2471     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2472 echo "configure:2473: checking for LC_MESSAGES" >&5
2473 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2474   echo $ac_n "(cached) $ac_c" 1>&6
2475 else
2476   cat > conftest.$ac_ext <<EOF
2477 #line 2478 "configure"
2478 #include "confdefs.h"
2479 #include <locale.h>
2480 int main() {
2481 return LC_MESSAGES
2482 ; return 0; }
2483 EOF
2484 if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2485   rm -rf conftest*
2486   am_cv_val_LC_MESSAGES=yes
2487 else
2488   echo "configure: failed program was:" >&5
2489   cat conftest.$ac_ext >&5
2490   rm -rf conftest*
2491   am_cv_val_LC_MESSAGES=no
2492 fi
2493 rm -f conftest*
2494 fi
2495
2496 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2497     if test $am_cv_val_LC_MESSAGES = yes; then
2498       cat >> confdefs.h <<\EOF
2499 #define HAVE_LC_MESSAGES 1
2500 EOF
2501
2502     fi
2503   fi
2504    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2505 echo "configure:2506: checking whether NLS is requested" >&5
2506         # Check whether --enable-nls or --disable-nls was given.
2507 if test "${enable_nls+set}" = set; then
2508   enableval="$enable_nls"
2509   USE_NLS=$enableval
2510 else
2511   USE_NLS=no
2512 fi
2513
2514     echo "$ac_t""$USE_NLS" 1>&6
2515     
2516
2517     USE_INCLUDED_LIBINTL=no
2518
2519         if test "$USE_NLS" = "yes"; then
2520       cat >> confdefs.h <<\EOF
2521 #define ENABLE_NLS 1
2522 EOF
2523
2524       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2525 echo "configure:2526: checking whether included gettext is requested" >&5
2526       # Check whether --with-included-gettext or --without-included-gettext was given.
2527 if test "${with_included_gettext+set}" = set; then
2528   withval="$with_included_gettext"
2529   nls_cv_force_use_gnu_gettext=$withval
2530 else
2531   nls_cv_force_use_gnu_gettext=no
2532 fi
2533
2534       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2535
2536       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2537       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2538                                         nls_cv_header_intl=
2539         nls_cv_header_libgt=
2540         CATOBJEXT=NONE
2541
2542         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2543 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2544 echo "configure:2545: checking for libintl.h" >&5
2545 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2546   echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548   cat > conftest.$ac_ext <<EOF
2549 #line 2550 "configure"
2550 #include "confdefs.h"
2551 #include <libintl.h>
2552 EOF
2553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2554 { (eval echo configure:2555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2556 if test -z "$ac_err"; then
2557   rm -rf conftest*
2558   eval "ac_cv_header_$ac_safe=yes"
2559 else
2560   echo "$ac_err" >&5
2561   echo "configure: failed program was:" >&5
2562   cat conftest.$ac_ext >&5
2563   rm -rf conftest*
2564   eval "ac_cv_header_$ac_safe=no"
2565 fi
2566 rm -f conftest*
2567 fi
2568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2569   echo "$ac_t""yes" 1>&6
2570   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2571 echo "configure:2572: checking for gettext in libc" >&5
2572 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2573   echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575   cat > conftest.$ac_ext <<EOF
2576 #line 2577 "configure"
2577 #include "confdefs.h"
2578 #include <libintl.h>
2579 int main() {
2580 return (int) gettext ("")
2581 ; return 0; }
2582 EOF
2583 if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2584   rm -rf conftest*
2585   gt_cv_func_gettext_libc=yes
2586 else
2587   echo "configure: failed program was:" >&5
2588   cat conftest.$ac_ext >&5
2589   rm -rf conftest*
2590   gt_cv_func_gettext_libc=no
2591 fi
2592 rm -f conftest*
2593 fi
2594
2595 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2596
2597            if test "$gt_cv_func_gettext_libc" != "yes"; then
2598              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2599 echo "configure:2600: checking for bindtextdomain in -lintl" >&5
2600 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2602   echo $ac_n "(cached) $ac_c" 1>&6
2603 else
2604   ac_save_LIBS="$LIBS"
2605 LIBS="-lintl  $LIBS"
2606 cat > conftest.$ac_ext <<EOF
2607 #line 2608 "configure"
2608 #include "confdefs.h"
2609 /* Override any gcc2 internal prototype to avoid an error.  */
2610 /* We use char because int might match the return type of a gcc2
2611     builtin and then its argument prototype would still apply.  */
2612 char bindtextdomain();
2613
2614 int main() {
2615 bindtextdomain()
2616 ; return 0; }
2617 EOF
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2619   rm -rf conftest*
2620   eval "ac_cv_lib_$ac_lib_var=yes"
2621 else
2622   echo "configure: failed program was:" >&5
2623   cat conftest.$ac_ext >&5
2624   rm -rf conftest*
2625   eval "ac_cv_lib_$ac_lib_var=no"
2626 fi
2627 rm -f conftest*
2628 LIBS="$ac_save_LIBS"
2629
2630 fi
2631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2632   echo "$ac_t""yes" 1>&6
2633   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2634 echo "configure:2635: checking for gettext in libintl" >&5
2635 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2636   echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638   echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
2639 echo "configure:2640: checking for gettext in -lintl" >&5
2640 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
2641 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2642   echo $ac_n "(cached) $ac_c" 1>&6
2643 else
2644   ac_save_LIBS="$LIBS"
2645 LIBS="-lintl  $LIBS"
2646 cat > conftest.$ac_ext <<EOF
2647 #line 2648 "configure"
2648 #include "confdefs.h"
2649 /* Override any gcc2 internal prototype to avoid an error.  */
2650 /* We use char because int might match the return type of a gcc2
2651     builtin and then its argument prototype would still apply.  */
2652 char gettext();
2653
2654 int main() {
2655 gettext()
2656 ; return 0; }
2657 EOF
2658 if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2659   rm -rf conftest*
2660   eval "ac_cv_lib_$ac_lib_var=yes"
2661 else
2662   echo "configure: failed program was:" >&5
2663   cat conftest.$ac_ext >&5
2664   rm -rf conftest*
2665   eval "ac_cv_lib_$ac_lib_var=no"
2666 fi
2667 rm -f conftest*
2668 LIBS="$ac_save_LIBS"
2669
2670 fi
2671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2672   echo "$ac_t""yes" 1>&6
2673   gt_cv_func_gettext_libintl=yes
2674 else
2675   echo "$ac_t""no" 1>&6
2676 gt_cv_func_gettext_libintl=no
2677 fi
2678
2679 fi
2680
2681 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2682 else
2683   echo "$ac_t""no" 1>&6
2684 fi
2685
2686            fi
2687
2688            if test "$gt_cv_func_gettext_libc" = "yes" \
2689               || test "$gt_cv_func_gettext_libintl" = "yes"; then
2690               cat >> confdefs.h <<\EOF
2691 #define HAVE_GETTEXT 1
2692 EOF
2693
2694               # Extract the first word of "msgfmt", so it can be a program name with args.
2695 set dummy msgfmt; ac_word=$2
2696 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2697 echo "configure:2698: checking for $ac_word" >&5
2698 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2699   echo $ac_n "(cached) $ac_c" 1>&6
2700 else
2701   case "$MSGFMT" in
2702   /*)
2703   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2704   ;;
2705   *)
2706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2707   for ac_dir in $PATH; do
2708     test -z "$ac_dir" && ac_dir=.
2709     if test -f $ac_dir/$ac_word; then
2710       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2711         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2712         break
2713       fi
2714     fi
2715   done
2716   IFS="$ac_save_ifs"
2717   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2718   ;;
2719 esac
2720 fi
2721 MSGFMT="$ac_cv_path_MSGFMT"
2722 if test -n "$MSGFMT"; then
2723   echo "$ac_t""$MSGFMT" 1>&6
2724 else
2725   echo "$ac_t""no" 1>&6
2726 fi
2727               if test "$MSGFMT" != "no"; then
2728                 for ac_func in dcgettext
2729 do
2730 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2731 echo "configure:2732: checking for $ac_func" >&5
2732 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2733   echo $ac_n "(cached) $ac_c" 1>&6
2734 else
2735   cat > conftest.$ac_ext <<EOF
2736 #line 2737 "configure"
2737 #include "confdefs.h"
2738 /* System header to define __stub macros and hopefully few prototypes,
2739     which can conflict with char $ac_func(); below.  */
2740 #include <assert.h>
2741 /* Override any gcc2 internal prototype to avoid an error.  */
2742 /* We use char because int might match the return type of a gcc2
2743     builtin and then its argument prototype would still apply.  */
2744 char $ac_func();
2745
2746 int main() {
2747
2748 /* The GNU C library defines this for functions which it implements
2749     to always fail with ENOSYS.  Some functions are actually named
2750     something starting with __ and the normal name is an alias.  */
2751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2752 choke me
2753 #else
2754 $ac_func();
2755 #endif
2756
2757 ; return 0; }
2758 EOF
2759 if { (eval echo configure:2760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2760   rm -rf conftest*
2761   eval "ac_cv_func_$ac_func=yes"
2762 else
2763   echo "configure: failed program was:" >&5
2764   cat conftest.$ac_ext >&5
2765   rm -rf conftest*
2766   eval "ac_cv_func_$ac_func=no"
2767 fi
2768 rm -f conftest*
2769 fi
2770
2771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2772   echo "$ac_t""yes" 1>&6
2773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2774   cat >> confdefs.h <<EOF
2775 #define $ac_tr_func 1
2776 EOF
2777  
2778 else
2779   echo "$ac_t""no" 1>&6
2780 fi
2781 done
2782
2783                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2784 set dummy gmsgfmt; ac_word=$2
2785 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2786 echo "configure:2787: checking for $ac_word" >&5
2787 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2788   echo $ac_n "(cached) $ac_c" 1>&6
2789 else
2790   case "$GMSGFMT" in
2791   /*)
2792   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2793   ;;
2794   ?:/*)                  
2795   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2796   ;;
2797   *)
2798   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2799   ac_dummy="$PATH"
2800   for ac_dir in $ac_dummy; do 
2801     test -z "$ac_dir" && ac_dir=.
2802     if test -f $ac_dir/$ac_word; then
2803       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2804       break
2805     fi
2806   done
2807   IFS="$ac_save_ifs"
2808   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2809   ;;
2810 esac
2811 fi
2812 GMSGFMT="$ac_cv_path_GMSGFMT"
2813 if test -n "$GMSGFMT"; then
2814   echo "$ac_t""$GMSGFMT" 1>&6
2815 else
2816   echo "$ac_t""no" 1>&6
2817 fi
2818
2819                 # Extract the first word of "xgettext", so it can be a program name with args.
2820 set dummy xgettext; ac_word=$2
2821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2822 echo "configure:2823: checking for $ac_word" >&5
2823 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2824   echo $ac_n "(cached) $ac_c" 1>&6
2825 else
2826   case "$XGETTEXT" in
2827   /*)
2828   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2829   ;;
2830   *)
2831   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2832   for ac_dir in $PATH; do
2833     test -z "$ac_dir" && ac_dir=.
2834     if test -f $ac_dir/$ac_word; then
2835       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2836         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2837         break
2838       fi
2839     fi
2840   done
2841   IFS="$ac_save_ifs"
2842   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2843   ;;
2844 esac
2845 fi
2846 XGETTEXT="$ac_cv_path_XGETTEXT"
2847 if test -n "$XGETTEXT"; then
2848   echo "$ac_t""$XGETTEXT" 1>&6
2849 else
2850   echo "$ac_t""no" 1>&6
2851 fi
2852
2853                 cat > conftest.$ac_ext <<EOF
2854 #line 2855 "configure"
2855 #include "confdefs.h"
2856
2857 int main() {
2858 extern int _nl_msg_cat_cntr;
2859                                return _nl_msg_cat_cntr
2860 ; return 0; }
2861 EOF
2862 if { (eval echo configure:2863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2863   rm -rf conftest*
2864   CATOBJEXT=.gmo
2865                    DATADIRNAME=share
2866 else
2867   echo "configure: failed program was:" >&5
2868   cat conftest.$ac_ext >&5
2869   rm -rf conftest*
2870   CATOBJEXT=.mo
2871                    DATADIRNAME=lib
2872 fi
2873 rm -f conftest*
2874                 INSTOBJEXT=.mo
2875               fi
2876             fi
2877         
2878 else
2879   echo "$ac_t""no" 1>&6
2880 fi
2881
2882
2883         if test "$CATOBJEXT" = "NONE"; then
2884           echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
2885 echo "configure:2886: checking whether catgets can be used" >&5
2886           # Check whether --with-catgets or --without-catgets was given.
2887 if test "${with_catgets+set}" = set; then
2888   withval="$with_catgets"
2889   nls_cv_use_catgets=$withval
2890 else
2891   nls_cv_use_catgets=no
2892 fi
2893
2894           echo "$ac_t""$nls_cv_use_catgets" 1>&6
2895
2896           if test "$nls_cv_use_catgets" = "yes"; then
2897                     echo $ac_n "checking for main in -li""... $ac_c" 1>&6
2898 echo "configure:2899: checking for main in -li" >&5
2899 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
2900 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2901   echo $ac_n "(cached) $ac_c" 1>&6
2902 else
2903   ac_save_LIBS="$LIBS"
2904 LIBS="-li  $LIBS"
2905 cat > conftest.$ac_ext <<EOF
2906 #line 2907 "configure"
2907 #include "confdefs.h"
2908
2909 int main() {
2910 main()
2911 ; return 0; }
2912 EOF
2913 if { (eval echo configure:2914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2914   rm -rf conftest*
2915   eval "ac_cv_lib_$ac_lib_var=yes"
2916 else
2917   echo "configure: failed program was:" >&5
2918   cat conftest.$ac_ext >&5
2919   rm -rf conftest*
2920   eval "ac_cv_lib_$ac_lib_var=no"
2921 fi
2922 rm -f conftest*
2923 LIBS="$ac_save_LIBS"
2924
2925 fi
2926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2927   echo "$ac_t""yes" 1>&6
2928     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2929     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2930   cat >> confdefs.h <<EOF
2931 #define $ac_tr_lib 1
2932 EOF
2933
2934   LIBS="-li $LIBS"
2935
2936 else
2937   echo "$ac_t""no" 1>&6
2938 fi
2939
2940             echo $ac_n "checking for catgets""... $ac_c" 1>&6
2941 echo "configure:2942: checking for catgets" >&5
2942 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
2943   echo $ac_n "(cached) $ac_c" 1>&6
2944 else
2945   cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 /* System header to define __stub macros and hopefully few prototypes,
2949     which can conflict with char catgets(); below.  */
2950 #include <assert.h>
2951 /* Override any gcc2 internal prototype to avoid an error.  */
2952 /* We use char because int might match the return type of a gcc2
2953     builtin and then its argument prototype would still apply.  */
2954 char catgets();
2955
2956 int main() {
2957
2958 /* The GNU C library defines this for functions which it implements
2959     to always fail with ENOSYS.  Some functions are actually named
2960     something starting with __ and the normal name is an alias.  */
2961 #if defined (__stub_catgets) || defined (__stub___catgets)
2962 choke me
2963 #else
2964 catgets();
2965 #endif
2966
2967 ; return 0; }
2968 EOF
2969 if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2970   rm -rf conftest*
2971   eval "ac_cv_func_catgets=yes"
2972 else
2973   echo "configure: failed program was:" >&5
2974   cat conftest.$ac_ext >&5
2975   rm -rf conftest*
2976   eval "ac_cv_func_catgets=no"
2977 fi
2978 rm -f conftest*
2979 fi
2980
2981 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
2982   echo "$ac_t""yes" 1>&6
2983   cat >> confdefs.h <<\EOF
2984 #define HAVE_CATGETS 1
2985 EOF
2986
2987                INTLOBJS="\$(CATOBJS)"
2988                # Extract the first word of "gencat", so it can be a program name with args.
2989 set dummy gencat; ac_word=$2
2990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2991 echo "configure:2992: checking for $ac_word" >&5
2992 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
2993   echo $ac_n "(cached) $ac_c" 1>&6
2994 else
2995   case "$GENCAT" in
2996   /*)
2997   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
2998   ;;
2999   ?:/*)                  
3000   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
3001   ;;
3002   *)
3003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3004   ac_dummy="$PATH"
3005   for ac_dir in $ac_dummy; do 
3006     test -z "$ac_dir" && ac_dir=.
3007     if test -f $ac_dir/$ac_word; then
3008       ac_cv_path_GENCAT="$ac_dir/$ac_word"
3009       break
3010     fi
3011   done
3012   IFS="$ac_save_ifs"
3013   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
3014   ;;
3015 esac
3016 fi
3017 GENCAT="$ac_cv_path_GENCAT"
3018 if test -n "$GENCAT"; then
3019   echo "$ac_t""$GENCAT" 1>&6
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023                if test "$GENCAT" != "no"; then
3024                  # Extract the first word of "gmsgfmt", so it can be a program name with args.
3025 set dummy gmsgfmt; ac_word=$2
3026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3027 echo "configure:3028: checking for $ac_word" >&5
3028 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3029   echo $ac_n "(cached) $ac_c" 1>&6
3030 else
3031   case "$GMSGFMT" in
3032   /*)
3033   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3034   ;;
3035   ?:/*)                  
3036   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3037   ;;
3038   *)
3039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3040   ac_dummy="$PATH"
3041   for ac_dir in $ac_dummy; do 
3042     test -z "$ac_dir" && ac_dir=.
3043     if test -f $ac_dir/$ac_word; then
3044       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3045       break
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
3050   ;;
3051 esac
3052 fi
3053 GMSGFMT="$ac_cv_path_GMSGFMT"
3054 if test -n "$GMSGFMT"; then
3055   echo "$ac_t""$GMSGFMT" 1>&6
3056 else
3057   echo "$ac_t""no" 1>&6
3058 fi
3059
3060                  if test "$GMSGFMT" = "no"; then
3061                    # Extract the first word of "msgfmt", so it can be a program name with args.
3062 set dummy msgfmt; ac_word=$2
3063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3064 echo "configure:3065: checking for $ac_word" >&5
3065 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3066   echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3068   case "$GMSGFMT" in
3069   /*)
3070   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3071   ;;
3072   *)
3073   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3074   for ac_dir in $PATH; do
3075     test -z "$ac_dir" && ac_dir=.
3076     if test -f $ac_dir/$ac_word; then
3077       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3078         ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3079         break
3080       fi
3081     fi
3082   done
3083   IFS="$ac_save_ifs"
3084   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
3085   ;;
3086 esac
3087 fi
3088 GMSGFMT="$ac_cv_path_GMSGFMT"
3089 if test -n "$GMSGFMT"; then
3090   echo "$ac_t""$GMSGFMT" 1>&6
3091 else
3092   echo "$ac_t""no" 1>&6
3093 fi
3094
3095                  fi
3096                  # Extract the first word of "xgettext", so it can be a program name with args.
3097 set dummy xgettext; ac_word=$2
3098 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3099 echo "configure:3100: checking for $ac_word" >&5
3100 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3101   echo $ac_n "(cached) $ac_c" 1>&6
3102 else
3103   case "$XGETTEXT" in
3104   /*)
3105   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3106   ;;
3107   *)
3108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3109   for ac_dir in $PATH; do
3110     test -z "$ac_dir" && ac_dir=.
3111     if test -f $ac_dir/$ac_word; then
3112       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3113         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3114         break
3115       fi
3116     fi
3117   done
3118   IFS="$ac_save_ifs"
3119   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3120   ;;
3121 esac
3122 fi
3123 XGETTEXT="$ac_cv_path_XGETTEXT"
3124 if test -n "$XGETTEXT"; then
3125   echo "$ac_t""$XGETTEXT" 1>&6
3126 else
3127   echo "$ac_t""no" 1>&6
3128 fi
3129
3130                  USE_INCLUDED_LIBINTL=yes
3131                  CATOBJEXT=.cat
3132                  INSTOBJEXT=.cat
3133                  DATADIRNAME=lib
3134                  INTLDEPS='$(top_builddir)/intl/libintl.a'
3135                  INTLLIBS=$INTLDEPS
3136                  LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3137                  nls_cv_header_intl=intl/libintl.h
3138                  nls_cv_header_libgt=intl/libgettext.h
3139                fi
3140 else
3141   echo "$ac_t""no" 1>&6
3142 fi
3143
3144           fi
3145         fi
3146
3147         if test "$CATOBJEXT" = "NONE"; then
3148                           nls_cv_use_gnu_gettext=yes
3149         fi
3150       fi
3151
3152       if test "$nls_cv_use_gnu_gettext" = "yes"; then
3153                 INTLOBJS="\$(GETTOBJS)"
3154         # Extract the first word of "msgfmt", so it can be a program name with args.
3155 set dummy msgfmt; ac_word=$2
3156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3157 echo "configure:3158: checking for $ac_word" >&5
3158 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3159   echo $ac_n "(cached) $ac_c" 1>&6
3160 else
3161   case "$MSGFMT" in
3162   /*)
3163   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3164   ;;
3165   *)
3166   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3167   for ac_dir in $PATH; do
3168     test -z "$ac_dir" && ac_dir=.
3169     if test -f $ac_dir/$ac_word; then
3170       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3171         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3172         break
3173       fi
3174     fi
3175   done
3176   IFS="$ac_save_ifs"
3177   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3178   ;;
3179 esac
3180 fi
3181 MSGFMT="$ac_cv_path_MSGFMT"
3182 if test -n "$MSGFMT"; then
3183   echo "$ac_t""$MSGFMT" 1>&6
3184 else
3185   echo "$ac_t""no" 1>&6
3186 fi
3187
3188         # Extract the first word of "gmsgfmt", so it can be a program name with args.
3189 set dummy gmsgfmt; ac_word=$2
3190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3191 echo "configure:3192: checking for $ac_word" >&5
3192 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3193   echo $ac_n "(cached) $ac_c" 1>&6
3194 else
3195   case "$GMSGFMT" in
3196   /*)
3197   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3198   ;;
3199   ?:/*)                  
3200   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3201   ;;
3202   *)
3203   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3204   ac_dummy="$PATH"
3205   for ac_dir in $ac_dummy; do 
3206     test -z "$ac_dir" && ac_dir=.
3207     if test -f $ac_dir/$ac_word; then
3208       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3209       break
3210     fi
3211   done
3212   IFS="$ac_save_ifs"
3213   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3214   ;;
3215 esac
3216 fi
3217 GMSGFMT="$ac_cv_path_GMSGFMT"
3218 if test -n "$GMSGFMT"; then
3219   echo "$ac_t""$GMSGFMT" 1>&6
3220 else
3221   echo "$ac_t""no" 1>&6
3222 fi
3223
3224         # Extract the first word of "xgettext", so it can be a program name with args.
3225 set dummy xgettext; ac_word=$2
3226 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3227 echo "configure:3228: checking for $ac_word" >&5
3228 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3229   echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231   case "$XGETTEXT" in
3232   /*)
3233   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3234   ;;
3235   *)
3236   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3237   for ac_dir in $PATH; do
3238     test -z "$ac_dir" && ac_dir=.
3239     if test -f $ac_dir/$ac_word; then
3240       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3241         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3242         break
3243       fi
3244     fi
3245   done
3246   IFS="$ac_save_ifs"
3247   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3248   ;;
3249 esac
3250 fi
3251 XGETTEXT="$ac_cv_path_XGETTEXT"
3252 if test -n "$XGETTEXT"; then
3253   echo "$ac_t""$XGETTEXT" 1>&6
3254 else
3255   echo "$ac_t""no" 1>&6
3256 fi
3257
3258         
3259         USE_INCLUDED_LIBINTL=yes
3260         CATOBJEXT=.gmo
3261         INSTOBJEXT=.mo
3262         DATADIRNAME=share
3263         INTLDEPS='$(top_builddir)/intl/libintl.a'
3264         INTLLIBS=$INTLDEPS
3265         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3266         nls_cv_header_intl=intl/libintl.h
3267         nls_cv_header_libgt=intl/libgettext.h
3268       fi
3269
3270             if test "$XGETTEXT" != ":"; then
3271                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3272           : ;
3273         else
3274           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
3275           XGETTEXT=":"
3276         fi
3277       fi
3278
3279       # We need to process the po/ directory.
3280       POSUB=po
3281     else
3282       DATADIRNAME=share
3283       nls_cv_header_intl=intl/libintl.h
3284       nls_cv_header_libgt=intl/libgettext.h
3285     fi
3286     
3287     
3288
3289
3290     # If this is used in GNU gettext we have to set USE_NLS to `yes'
3291     # because some of the sources are only built for this goal.
3292     if test "$PACKAGE" = gettext; then
3293       USE_NLS=yes
3294       USE_INCLUDED_LIBINTL=yes
3295     fi
3296
3297                 for lang in $ALL_LINGUAS; do
3298       GMOFILES="$GMOFILES $lang.gmo"
3299       POFILES="$POFILES $lang.po"
3300     done
3301
3302         
3303     
3304     
3305     
3306     
3307     
3308     
3309     
3310     
3311     
3312     
3313   
3314
3315    if test "x$CATOBJEXT" != "x"; then
3316      if test "x$ALL_LINGUAS" = "x"; then
3317        LINGUAS=
3318      else
3319        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3320 echo "configure:3321: checking for catalogs to be installed" >&5
3321        NEW_LINGUAS=
3322        for lang in ${LINGUAS=$ALL_LINGUAS}; do
3323          case "$ALL_LINGUAS" in
3324           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3325          esac
3326        done
3327        LINGUAS=$NEW_LINGUAS
3328        echo "$ac_t""$LINGUAS" 1>&6
3329      fi
3330
3331           if test -n "$LINGUAS"; then
3332        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3333      fi
3334    fi
3335
3336             if test $ac_cv_header_locale_h = yes; then
3337      INCLUDE_LOCALE_H="#include <locale.h>"
3338    else
3339      INCLUDE_LOCALE_H="\
3340 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
3341    fi
3342    
3343
3344             test -d intl || mkdir intl
3345    if test "$CATOBJEXT" = ".cat"; then
3346      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3347 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3348 echo "configure:3349: checking for linux/version.h" >&5
3349 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3350   echo $ac_n "(cached) $ac_c" 1>&6
3351 else
3352   cat > conftest.$ac_ext <<EOF
3353 #line 3354 "configure"
3354 #include "confdefs.h"
3355 #include <linux/version.h>
3356 EOF
3357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3358 { (eval echo configure:3359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3360 if test -z "$ac_err"; then
3361   rm -rf conftest*
3362   eval "ac_cv_header_$ac_safe=yes"
3363 else
3364   echo "$ac_err" >&5
3365   echo "configure: failed program was:" >&5
3366   cat conftest.$ac_ext >&5
3367   rm -rf conftest*
3368   eval "ac_cv_header_$ac_safe=no"
3369 fi
3370 rm -f conftest*
3371 fi
3372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3373   echo "$ac_t""yes" 1>&6
3374   msgformat=linux
3375 else
3376   echo "$ac_t""no" 1>&6
3377 msgformat=xopen
3378 fi
3379
3380
3381                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
3382    fi
3383       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3384      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
3385
3386             if test "$PACKAGE" = "gettext"; then
3387      GT_NO="#NO#"
3388      GT_YES=
3389    else
3390      GT_NO=
3391      GT_YES="#YES#"
3392    fi
3393    
3394    
3395
3396             MKINSTALLDIRS=
3397    if test -n "$ac_aux_dir"; then
3398      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
3399    fi
3400    if test -z "$MKINSTALLDIRS"; then
3401      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
3402    fi
3403    
3404
3405       l=
3406    
3407
3408          test -d po || mkdir po
3409    if test "x$srcdir" != "x."; then
3410      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3411        posrcprefix="$srcdir/"
3412      else
3413        posrcprefix="../$srcdir/"
3414      fi
3415    else
3416      posrcprefix="../"
3417    fi
3418    rm -f po/POTFILES
3419    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3420         < $srcdir/po/POTFILES.in > po/POTFILES
3421   
3422
3423 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3424 echo "configure:3425: checking whether ${MAKE-make} sets \${MAKE}" >&5
3425 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3426 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
3427   echo $ac_n "(cached) $ac_c" 1>&6
3428 else
3429   cat > conftestmake <<\EOF
3430 all:
3431         @echo 'ac_maketemp="${MAKE}"'
3432 EOF
3433 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3434 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3435 if test -n "$ac_maketemp"; then
3436   eval ac_cv_prog_make_${ac_make}_set=yes
3437 else
3438   eval ac_cv_prog_make_${ac_make}_set=no
3439 fi
3440 rm -f conftestmake
3441 fi
3442 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3443   echo "$ac_t""yes" 1>&6
3444   SET_MAKE=
3445 else
3446   echo "$ac_t""no" 1>&6
3447   SET_MAKE="MAKE=${MAKE-make}"
3448 fi
3449
3450 # Extract the first word of "ln", so it can be a program name with args.
3451 set dummy ln; ac_word=$2
3452 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3453 echo "configure:3454: checking for $ac_word" >&5
3454 if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then
3455   echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457   case "$LN" in
3458   /*)
3459   ac_cv_path_LN="$LN" # Let the user override the test with a path.
3460   ;;
3461   ?:/*)                  
3462   ac_cv_path_LN="$LN" # Let the user override the test with a dos path.
3463   ;;
3464   *)
3465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3466   ac_dummy="$PATH"
3467   for ac_dir in $ac_dummy; do 
3468     test -z "$ac_dir" && ac_dir=.
3469     if test -f $ac_dir/$ac_word; then
3470       ac_cv_path_LN="$ac_dir/$ac_word"
3471       break
3472     fi
3473   done
3474   IFS="$ac_save_ifs"
3475   test -z "$ac_cv_path_LN" && ac_cv_path_LN="ln"
3476   ;;
3477 esac
3478 fi
3479 LN="$ac_cv_path_LN"
3480 if test -n "$LN"; then
3481   echo "$ac_t""$LN" 1>&6
3482 else
3483   echo "$ac_t""no" 1>&6
3484 fi
3485
3486 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3487 echo "configure:3488: checking whether ln -s works" >&5
3488 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   rm -f conftestdata
3492 if ln -s X conftestdata 2>/dev/null
3493 then
3494   rm -f conftestdata
3495   ac_cv_prog_LN_S="ln -s"
3496 else
3497   ac_cv_prog_LN_S=ln
3498 fi
3499 fi
3500 LN_S="$ac_cv_prog_LN_S"
3501 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3502   echo "$ac_t""yes" 1>&6
3503 else
3504   echo "$ac_t""no" 1>&6
3505 fi
3506
3507 # Extract the first word of "mv", so it can be a program name with args.
3508 set dummy mv; ac_word=$2
3509 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3510 echo "configure:3511: checking for $ac_word" >&5
3511 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
3512   echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514   case "$MV" in
3515   /*)
3516   ac_cv_path_MV="$MV" # Let the user override the test with a path.
3517   ;;
3518   ?:/*)                  
3519   ac_cv_path_MV="$MV" # Let the user override the test with a dos path.
3520   ;;
3521   *)
3522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3523   ac_dummy="$PATH"
3524   for ac_dir in $ac_dummy; do 
3525     test -z "$ac_dir" && ac_dir=.
3526     if test -f $ac_dir/$ac_word; then
3527       ac_cv_path_MV="$ac_dir/$ac_word"
3528       break
3529     fi
3530   done
3531   IFS="$ac_save_ifs"
3532   test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv"
3533   ;;
3534 esac
3535 fi
3536 MV="$ac_cv_path_MV"
3537 if test -n "$MV"; then
3538   echo "$ac_t""$MV" 1>&6
3539 else
3540   echo "$ac_t""no" 1>&6
3541 fi
3542
3543 # Extract the first word of "cp", so it can be a program name with args.
3544 set dummy cp; ac_word=$2
3545 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3546 echo "configure:3547: checking for $ac_word" >&5
3547 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
3548   echo $ac_n "(cached) $ac_c" 1>&6
3549 else
3550   case "$CP" in
3551   /*)
3552   ac_cv_path_CP="$CP" # Let the user override the test with a path.
3553   ;;
3554   ?:/*)                  
3555   ac_cv_path_CP="$CP" # Let the user override the test with a dos path.
3556   ;;
3557   *)
3558   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3559   ac_dummy="$PATH"
3560   for ac_dir in $ac_dummy; do 
3561     test -z "$ac_dir" && ac_dir=.
3562     if test -f $ac_dir/$ac_word; then
3563       ac_cv_path_CP="$ac_dir/$ac_word"
3564       break
3565     fi
3566   done
3567   IFS="$ac_save_ifs"
3568   test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp"
3569   ;;
3570 esac
3571 fi
3572 CP="$ac_cv_path_CP"
3573 if test -n "$CP"; then
3574   echo "$ac_t""$CP" 1>&6
3575 else
3576   echo "$ac_t""no" 1>&6
3577 fi
3578
3579 # Extract the first word of "rm", so it can be a program name with args.
3580 set dummy rm; ac_word=$2
3581 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3582 echo "configure:3583: checking for $ac_word" >&5
3583 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   case "$RM" in
3587   /*)
3588   ac_cv_path_RM="$RM" # Let the user override the test with a path.
3589   ;;
3590   ?:/*)                  
3591   ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
3592   ;;
3593   *)
3594   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3595   ac_dummy="$PATH"
3596   for ac_dir in $ac_dummy; do 
3597     test -z "$ac_dir" && ac_dir=.
3598     if test -f $ac_dir/$ac_word; then
3599       ac_cv_path_RM="$ac_dir/$ac_word"
3600       break
3601     fi
3602   done
3603   IFS="$ac_save_ifs"
3604   test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
3605   ;;
3606 esac
3607 fi
3608 RM="$ac_cv_path_RM"
3609 if test -n "$RM"; then
3610   echo "$ac_t""$RM" 1>&6
3611 else
3612   echo "$ac_t""no" 1>&6
3613 fi
3614
3615 # Extract the first word of "chmod", so it can be a program name with args.
3616 set dummy chmod; ac_word=$2
3617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3618 echo "configure:3619: checking for $ac_word" >&5
3619 if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then
3620   echo $ac_n "(cached) $ac_c" 1>&6
3621 else
3622   case "$CHMOD" in
3623   /*)
3624   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3625   ;;
3626   ?:/*)                  
3627   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a dos path.
3628   ;;
3629   *)
3630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3631   ac_dummy="$PATH"
3632   for ac_dir in $ac_dummy; do 
3633     test -z "$ac_dir" && ac_dir=.
3634     if test -f $ac_dir/$ac_word; then
3635       ac_cv_path_CHMOD="$ac_dir/$ac_word"
3636       break
3637     fi
3638   done
3639   IFS="$ac_save_ifs"
3640   test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD=":"
3641   ;;
3642 esac
3643 fi
3644 CHMOD="$ac_cv_path_CHMOD"
3645 if test -n "$CHMOD"; then
3646   echo "$ac_t""$CHMOD" 1>&6
3647 else
3648   echo "$ac_t""no" 1>&6
3649 fi
3650
3651 # Extract the first word of "awk", so it can be a program name with args.
3652 set dummy awk; ac_word=$2
3653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3654 echo "configure:3655: checking for $ac_word" >&5
3655 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
3656   echo $ac_n "(cached) $ac_c" 1>&6
3657 else
3658   case "$AWK" in
3659   /*)
3660   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
3661   ;;
3662   ?:/*)                  
3663   ac_cv_path_AWK="$AWK" # Let the user override the test with a dos path.
3664   ;;
3665   *)
3666   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3667   ac_dummy="$PATH"
3668   for ac_dir in $ac_dummy; do 
3669     test -z "$ac_dir" && ac_dir=.
3670     if test -f $ac_dir/$ac_word; then
3671       ac_cv_path_AWK="$ac_dir/$ac_word"
3672       break
3673     fi
3674   done
3675   IFS="$ac_save_ifs"
3676   test -z "$ac_cv_path_AWK" && ac_cv_path_AWK="awk"
3677   ;;
3678 esac
3679 fi
3680 AWK="$ac_cv_path_AWK"
3681 if test -n "$AWK"; then
3682   echo "$ac_t""$AWK" 1>&6
3683 else
3684   echo "$ac_t""no" 1>&6
3685 fi
3686
3687 # Extract the first word of "sed", so it can be a program name with args.
3688 set dummy sed; ac_word=$2
3689 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3690 echo "configure:3691: checking for $ac_word" >&5
3691 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
3692   echo $ac_n "(cached) $ac_c" 1>&6
3693 else
3694   case "$SED" in
3695   /*)
3696   ac_cv_path_SED="$SED" # Let the user override the test with a path.
3697   ;;
3698   ?:/*)                  
3699   ac_cv_path_SED="$SED" # Let the user override the test with a dos path.
3700   ;;
3701   *)
3702   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3703   ac_dummy="$PATH"
3704   for ac_dir in $ac_dummy; do 
3705     test -z "$ac_dir" && ac_dir=.
3706     if test -f $ac_dir/$ac_word; then
3707       ac_cv_path_SED="$ac_dir/$ac_word"
3708       break
3709     fi
3710   done
3711   IFS="$ac_save_ifs"
3712   test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed"
3713   ;;
3714 esac
3715 fi
3716 SED="$ac_cv_path_SED"
3717 if test -n "$SED"; then
3718   echo "$ac_t""$SED" 1>&6
3719 else
3720   echo "$ac_t""no" 1>&6
3721 fi
3722
3723 # Extract the first word of "perl", so it can be a program name with args.
3724 set dummy perl; ac_word=$2
3725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3726 echo "configure:3727: checking for $ac_word" >&5
3727 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
3728   echo $ac_n "(cached) $ac_c" 1>&6
3729 else
3730   case "$PERL" in
3731   /*)
3732   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
3733   ;;
3734   ?:/*)                  
3735   ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
3736   ;;
3737   *)
3738   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3739   ac_dummy="$PATH"
3740   for ac_dir in $ac_dummy; do 
3741     test -z "$ac_dir" && ac_dir=.
3742     if test -f $ac_dir/$ac_word; then
3743       ac_cv_path_PERL="$ac_dir/$ac_word"
3744       break
3745     fi
3746   done
3747   IFS="$ac_save_ifs"
3748   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="perl"
3749   ;;
3750 esac
3751 fi
3752 PERL="$ac_cv_path_PERL"
3753 if test -n "$PERL"; then
3754   echo "$ac_t""$PERL" 1>&6
3755 else
3756   echo "$ac_t""no" 1>&6
3757 fi
3758
3759 # Extract the first word of "ldconfig", so it can be a program name with args.
3760 set dummy ldconfig; ac_word=$2
3761 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3762 echo "configure:3763: checking for $ac_word" >&5
3763 if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
3764   echo $ac_n "(cached) $ac_c" 1>&6
3765 else
3766   case "$LDCONFIG" in
3767   /*)
3768   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3769   ;;
3770   ?:/*)                  
3771   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a dos path.
3772   ;;
3773   *)
3774   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3775   ac_dummy="$PATH"
3776   for ac_dir in $ac_dummy; do 
3777     test -z "$ac_dir" && ac_dir=.
3778     if test -f $ac_dir/$ac_word; then
3779       ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3780       break
3781     fi
3782   done
3783   IFS="$ac_save_ifs"
3784   test -z "$ac_cv_path_LDCONFIG" && ac_cv_path_LDCONFIG=":"
3785   ;;
3786 esac
3787 fi
3788 LDCONFIG="$ac_cv_path_LDCONFIG"
3789 if test -n "$LDCONFIG"; then
3790   echo "$ac_t""$LDCONFIG" 1>&6
3791 else
3792   echo "$ac_t""no" 1>&6
3793 fi
3794
3795 echo $ac_n "checking build system type""... $ac_c" 1>&6
3796 echo "configure:3797: checking build system type" >&5
3797
3798 build_alias=$build
3799 case "$build_alias" in
3800 NONE)
3801   case $nonopt in
3802   NONE) build_alias=$host_alias ;;
3803   *) build_alias=$nonopt ;;
3804   esac ;;
3805 esac
3806
3807 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
3808 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3809 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3810 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3811 echo "$ac_t""$build" 1>&6
3812
3813 if test $host != $build; then
3814   ac_tool_prefix=${host_alias}-
3815 else
3816   ac_tool_prefix=
3817 fi
3818
3819 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3820 set dummy ${ac_tool_prefix}ar; ac_word=$2
3821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3822 echo "configure:3823: checking for $ac_word" >&5
3823 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   if test -n "$AR"; then
3827   ac_cv_prog_AR="$AR" # Let the user override the test.
3828 else
3829   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3830   ac_dummy="$PATH"
3831   for ac_dir in $ac_dummy; do
3832     test -z "$ac_dir" && ac_dir=.
3833     if test -f $ac_dir/$ac_word; then
3834       ac_cv_prog_AR="${ac_tool_prefix}ar"
3835       break
3836     fi
3837   done
3838   IFS="$ac_save_ifs"
3839 fi
3840 fi
3841 AR="$ac_cv_prog_AR"
3842 if test -n "$AR"; then
3843   echo "$ac_t""$AR" 1>&6
3844 else
3845   echo "$ac_t""no" 1>&6
3846 fi
3847
3848
3849 if test -z "$ac_cv_prog_AR"; then
3850 if test -n "$ac_tool_prefix"; then
3851   # Extract the first word of "ar", so it can be a program name with args.
3852 set dummy ar; ac_word=$2
3853 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3854 echo "configure:3855: checking for $ac_word" >&5
3855 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3856   echo $ac_n "(cached) $ac_c" 1>&6
3857 else
3858   if test -n "$AR"; then
3859   ac_cv_prog_AR="$AR" # Let the user override the test.
3860 else
3861   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3862   ac_dummy="$PATH"
3863   for ac_dir in $ac_dummy; do
3864     test -z "$ac_dir" && ac_dir=.
3865     if test -f $ac_dir/$ac_word; then
3866       ac_cv_prog_AR="ar"
3867       break
3868     fi
3869   done
3870   IFS="$ac_save_ifs"
3871   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3872 fi
3873 fi
3874 AR="$ac_cv_prog_AR"
3875 if test -n "$AR"; then
3876   echo "$ac_t""$AR" 1>&6
3877 else
3878   echo "$ac_t""no" 1>&6
3879 fi
3880
3881 else
3882   AR="ar"
3883 fi
3884 fi
3885
3886 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3887 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3889 echo "configure:3890: checking for $ac_word" >&5
3890 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3891   echo $ac_n "(cached) $ac_c" 1>&6
3892 else
3893   if test -n "$RANLIB"; then
3894   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3895 else
3896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3897   ac_dummy="$PATH"
3898   for ac_dir in $ac_dummy; do
3899     test -z "$ac_dir" && ac_dir=.
3900     if test -f $ac_dir/$ac_word; then
3901       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3902       break
3903     fi
3904   done
3905   IFS="$ac_save_ifs"
3906 fi
3907 fi
3908 RANLIB="$ac_cv_prog_RANLIB"
3909 if test -n "$RANLIB"; then
3910   echo "$ac_t""$RANLIB" 1>&6
3911 else
3912   echo "$ac_t""no" 1>&6
3913 fi
3914
3915
3916 if test -z "$ac_cv_prog_RANLIB"; then
3917 if test -n "$ac_tool_prefix"; then
3918   # Extract the first word of "ranlib", so it can be a program name with args.
3919 set dummy ranlib; ac_word=$2
3920 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3921 echo "configure:3922: checking for $ac_word" >&5
3922 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3923   echo $ac_n "(cached) $ac_c" 1>&6
3924 else
3925   if test -n "$RANLIB"; then
3926   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3927 else
3928   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3929   ac_dummy="$PATH"
3930   for ac_dir in $ac_dummy; do
3931     test -z "$ac_dir" && ac_dir=.
3932     if test -f $ac_dir/$ac_word; then
3933       ac_cv_prog_RANLIB="ranlib"
3934       break
3935     fi
3936   done
3937   IFS="$ac_save_ifs"
3938   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3939 fi
3940 fi
3941 RANLIB="$ac_cv_prog_RANLIB"
3942 if test -n "$RANLIB"; then
3943   echo "$ac_t""$RANLIB" 1>&6
3944 else
3945   echo "$ac_t""no" 1>&6
3946 fi
3947
3948 else
3949   RANLIB=":"
3950 fi
3951 fi
3952
3953 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3954 set dummy ${ac_tool_prefix}strip; ac_word=$2
3955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3956 echo "configure:3957: checking for $ac_word" >&5
3957 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
3958   echo $ac_n "(cached) $ac_c" 1>&6
3959 else
3960   if test -n "$STRIP"; then
3961   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3962 else
3963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3964   ac_dummy="$PATH"
3965   for ac_dir in $ac_dummy; do
3966     test -z "$ac_dir" && ac_dir=.
3967     if test -f $ac_dir/$ac_word; then
3968       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3969       break
3970     fi
3971   done
3972   IFS="$ac_save_ifs"
3973 fi
3974 fi
3975 STRIP="$ac_cv_prog_STRIP"
3976 if test -n "$STRIP"; then
3977   echo "$ac_t""$STRIP" 1>&6
3978 else
3979   echo "$ac_t""no" 1>&6
3980 fi
3981
3982
3983 if test -z "$ac_cv_prog_STRIP"; then
3984 if test -n "$ac_tool_prefix"; then
3985   # Extract the first word of "strip", so it can be a program name with args.
3986 set dummy strip; ac_word=$2
3987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3988 echo "configure:3989: checking for $ac_word" >&5
3989 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
3990   echo $ac_n "(cached) $ac_c" 1>&6
3991 else
3992   if test -n "$STRIP"; then
3993   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3994 else
3995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3996   ac_dummy="$PATH"
3997   for ac_dir in $ac_dummy; do
3998     test -z "$ac_dir" && ac_dir=.
3999     if test -f $ac_dir/$ac_word; then
4000       ac_cv_prog_STRIP="strip"
4001       break
4002     fi
4003   done
4004   IFS="$ac_save_ifs"
4005   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4006 fi
4007 fi
4008 STRIP="$ac_cv_prog_STRIP"
4009 if test -n "$STRIP"; then
4010   echo "$ac_t""$STRIP" 1>&6
4011 else
4012   echo "$ac_t""no" 1>&6
4013 fi
4014
4015 else
4016   STRIP=":"
4017 fi
4018 fi
4019
4020 # Find a good install program.  We prefer a C program (faster),
4021 # so one script is as good as another.  But avoid the broken or
4022 # incompatible versions:
4023 # SysV /etc/install, /usr/sbin/install
4024 # SunOS /usr/etc/install
4025 # IRIX /sbin/install
4026 # AIX /bin/install
4027 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4028 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4029 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4030 # ./install, which can be erroneously created by make from ./install.sh.
4031 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4032 echo "configure:4033: checking for a BSD compatible install" >&5
4033 if test -z "$INSTALL"; then
4034 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4035   echo $ac_n "(cached) $ac_c" 1>&6
4036 else
4037     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
4038   for ac_dir in $PATH; do
4039     # Account for people who put trailing slashes in PATH elements.
4040     case "$ac_dir/" in
4041     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4042     *)
4043       # OSF1 and SCO ODT 3.0 have their own names for install.
4044       # Don't use installbsd from OSF since it installs stuff as root
4045       # by default.
4046       for ac_prog in ginstall scoinst install; do
4047         if test -f $ac_dir/$ac_prog; then
4048           if test $ac_prog = install &&
4049             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4050             # AIX install.  It has an incompatible calling convention.
4051             :
4052           else
4053             ac_cv_path_install="$ac_dir/$ac_prog -c"
4054             break 2
4055           fi
4056         fi
4057       done
4058       ;;
4059     esac
4060   done
4061   IFS="$ac_save_IFS"
4062
4063 fi
4064   if test "${ac_cv_path_install+set}" = set; then
4065     INSTALL="$ac_cv_path_install"
4066   else
4067     # As a last resort, use the slow shell script.  We don't cache a
4068     # path for INSTALL within a source directory, because that will
4069     # break other packages using the cache if that directory is
4070     # removed, or if the path is relative.
4071     INSTALL="$ac_install_sh"
4072   fi
4073 fi
4074 echo "$ac_t""$INSTALL" 1>&6
4075
4076 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4077 # It thinks the first close brace ends the variable substitution.
4078 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4079
4080 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4081
4082 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4083
4084 # See if we need a separate native compiler.
4085 if test $cross_compiling = no; then
4086   BUILD_CC="$CC"
4087   
4088 else
4089   for ac_prog in gcc cc
4090 do
4091 # Extract the first word of "$ac_prog", so it can be a program name with args.
4092 set dummy $ac_prog; ac_word=$2
4093 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4094 echo "configure:4095: checking for $ac_word" >&5
4095 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
4096   echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098   if test -n "$BUILD_CC"; then
4099   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4100 else
4101   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4102   ac_dummy="$PATH"
4103   for ac_dir in $ac_dummy; do
4104     test -z "$ac_dir" && ac_dir=.
4105     if test -f $ac_dir/$ac_word; then
4106       ac_cv_prog_BUILD_CC="$ac_prog"
4107       break
4108     fi
4109   done
4110   IFS="$ac_save_ifs"
4111 fi
4112 fi
4113 BUILD_CC="$ac_cv_prog_BUILD_CC"
4114 if test -n "$BUILD_CC"; then
4115   echo "$ac_t""$BUILD_CC" 1>&6
4116 else
4117   echo "$ac_t""no" 1>&6
4118 fi
4119
4120 test -n "$BUILD_CC" && break
4121 done
4122
4123 fi
4124 for ac_hdr in stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mkdev.h sys/mount.h sys/sockio.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h
4125 do
4126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4128 echo "configure:4129: checking for $ac_hdr" >&5
4129 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4130   echo $ac_n "(cached) $ac_c" 1>&6
4131 else
4132   cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 #include <$ac_hdr>
4136 EOF
4137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4138 { (eval echo configure:4139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4140 if test -z "$ac_err"; then
4141   rm -rf conftest*
4142   eval "ac_cv_header_$ac_safe=yes"
4143 else
4144   echo "$ac_err" >&5
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147   rm -rf conftest*
4148   eval "ac_cv_header_$ac_safe=no"
4149 fi
4150 rm -f conftest*
4151 fi
4152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4153   echo "$ac_t""yes" 1>&6
4154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4155   cat >> confdefs.h <<EOF
4156 #define $ac_tr_hdr 1
4157 EOF
4158  
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162 done
4163
4164 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
4165 echo "configure:4166: checking for vprintf" >&5
4166 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
4167   echo $ac_n "(cached) $ac_c" 1>&6
4168 else
4169   cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4172 /* System header to define __stub macros and hopefully few prototypes,
4173     which can conflict with char vprintf(); below.  */
4174 #include <assert.h>
4175 /* Override any gcc2 internal prototype to avoid an error.  */
4176 /* We use char because int might match the return type of a gcc2
4177     builtin and then its argument prototype would still apply.  */
4178 char vprintf();
4179
4180 int main() {
4181
4182 /* The GNU C library defines this for functions which it implements
4183     to always fail with ENOSYS.  Some functions are actually named
4184     something starting with __ and the normal name is an alias.  */
4185 #if defined (__stub_vprintf) || defined (__stub___vprintf)
4186 choke me
4187 #else
4188 vprintf();
4189 #endif
4190
4191 ; return 0; }
4192 EOF
4193 if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4194   rm -rf conftest*
4195   eval "ac_cv_func_vprintf=yes"
4196 else
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   eval "ac_cv_func_vprintf=no"
4201 fi
4202 rm -f conftest*
4203 fi
4204
4205 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
4206   echo "$ac_t""yes" 1>&6
4207   cat >> confdefs.h <<\EOF
4208 #define HAVE_VPRINTF 1
4209 EOF
4210
4211 else
4212   echo "$ac_t""no" 1>&6
4213 fi
4214
4215 if test "$ac_cv_func_vprintf" != yes; then
4216 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
4217 echo "configure:4218: checking for _doprnt" >&5
4218 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
4219   echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221   cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 /* System header to define __stub macros and hopefully few prototypes,
4225     which can conflict with char _doprnt(); below.  */
4226 #include <assert.h>
4227 /* Override any gcc2 internal prototype to avoid an error.  */
4228 /* We use char because int might match the return type of a gcc2
4229     builtin and then its argument prototype would still apply.  */
4230 char _doprnt();
4231
4232 int main() {
4233
4234 /* The GNU C library defines this for functions which it implements
4235     to always fail with ENOSYS.  Some functions are actually named
4236     something starting with __ and the normal name is an alias.  */
4237 #if defined (__stub__doprnt) || defined (__stub____doprnt)
4238 choke me
4239 #else
4240 _doprnt();
4241 #endif
4242
4243 ; return 0; }
4244 EOF
4245 if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4246   rm -rf conftest*
4247   eval "ac_cv_func__doprnt=yes"
4248 else
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   eval "ac_cv_func__doprnt=no"
4253 fi
4254 rm -f conftest*
4255 fi
4256
4257 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
4258   echo "$ac_t""yes" 1>&6
4259   cat >> confdefs.h <<\EOF
4260 #define HAVE_DOPRNT 1
4261 EOF
4262
4263 else
4264   echo "$ac_t""no" 1>&6
4265 fi
4266
4267 fi
4268
4269 echo $ac_n "checking whether llseek declared in unistd.h""... $ac_c" 1>&6
4270 echo "configure:4271: checking whether llseek declared in unistd.h" >&5
4271 if eval "test \"`echo '$''{'e2fsprogs_cv_have_llseek_prototype'+set}'`\" = set"; then
4272   echo $ac_n "(cached) $ac_c" 1>&6
4273 else
4274   cat > conftest.$ac_ext <<EOF
4275 #line 4276 "configure"
4276 #include "confdefs.h"
4277 #include <unistd.h>
4278 int main() {
4279 extern int llseek(int);
4280 ; return 0; }
4281 EOF
4282 if { (eval echo configure:4283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4283   rm -rf conftest*
4284   e2fsprogs_cv_have_llseek_prototype=no
4285 else
4286   echo "configure: failed program was:" >&5
4287   cat conftest.$ac_ext >&5
4288   rm -rf conftest*
4289   e2fsprogs_cv_have_llseek_prototype=yes
4290 fi
4291 rm -f conftest*
4292 fi
4293
4294 echo "$ac_t""$e2fsprogs_cv_have_llseek_prototype" 1>&6
4295 if test "$e2fsprogs_cv_have_llseek_prototype" = yes; then
4296    cat >> confdefs.h <<\EOF
4297 #define HAVE_LLSEEK_PROTOTYPE 1
4298 EOF
4299
4300 fi
4301 echo $ac_n "checking whether lseek64 declared in unistd.h""... $ac_c" 1>&6
4302 echo "configure:4303: checking whether lseek64 declared in unistd.h" >&5
4303 if eval "test \"`echo '$''{'e2fsprogs_cv_have_lseek64_prototype'+set}'`\" = set"; then
4304   echo $ac_n "(cached) $ac_c" 1>&6
4305 else
4306   cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 #define _LARGEFILE_SOURCE
4310 #define _LARGEFILE64_SOURCE
4311 #include <unistd.h>
4312 int main() {
4313 extern int lseek64(int);
4314 ; return 0; }
4315 EOF
4316 if { (eval echo configure:4317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4317   rm -rf conftest*
4318   e2fsprogs_cv_have_lseek64_prototype=no
4319 else
4320   echo "configure: failed program was:" >&5
4321   cat conftest.$ac_ext >&5
4322   rm -rf conftest*
4323   e2fsprogs_cv_have_lseek64_prototype=yes
4324 fi
4325 rm -f conftest*
4326 fi
4327
4328 echo "$ac_t""$e2fsprogs_cv_have_lseek64_prototype" 1>&6
4329 if test "$e2fsprogs_cv_have_lseek64_prototype" = yes; then
4330    cat >> confdefs.h <<\EOF
4331 #define HAVE_LSEEK64_PROTOTYPE 1
4332 EOF
4333
4334 fi
4335 if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then
4336   # if cross-compiling, with no cached values, just assume something common. 
4337   ac_cv_sizeof_short=2
4338   ac_cv_sizeof_int=4
4339   ac_cv_sizeof_long=4
4340   ac_cv_sizeof_long_long=8
4341   echo "configure: warning: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4, long long=8" 1>&2
4342 fi
4343 echo $ac_n "checking size of short""... $ac_c" 1>&6
4344 echo "configure:4345: checking size of short" >&5
4345 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
4346   echo $ac_n "(cached) $ac_c" 1>&6
4347 else
4348   if test "$cross_compiling" = yes; then
4349     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4350 else
4351   cat > conftest.$ac_ext <<EOF
4352 #line 4353 "configure"
4353 #include "confdefs.h"
4354 #include <stdio.h>
4355 #include <sys/types.h>
4356 main()
4357 {
4358   FILE *f=fopen("conftestval", "w");
4359   if (!f) exit(1);
4360   fprintf(f, "%d\n", sizeof(short));
4361   exit(0);
4362 }
4363 EOF
4364 if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4365 then
4366   ac_cv_sizeof_short=`cat conftestval`
4367 else
4368   echo "configure: failed program was:" >&5
4369   cat conftest.$ac_ext >&5
4370   rm -fr conftest*
4371   ac_cv_sizeof_short=0
4372 fi
4373 rm -fr conftest*
4374 fi
4375
4376 fi
4377 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4378 cat >> confdefs.h <<EOF
4379 #define SIZEOF_SHORT $ac_cv_sizeof_short
4380 EOF
4381
4382
4383 echo $ac_n "checking size of int""... $ac_c" 1>&6
4384 echo "configure:4385: checking size of int" >&5
4385 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
4386   echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388   if test "$cross_compiling" = yes; then
4389     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4390 else
4391   cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 #include <stdio.h>
4395 #include <sys/types.h>
4396 main()
4397 {
4398   FILE *f=fopen("conftestval", "w");
4399   if (!f) exit(1);
4400   fprintf(f, "%d\n", sizeof(int));
4401   exit(0);
4402 }
4403 EOF
4404 if { (eval echo configure:4405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4405 then
4406   ac_cv_sizeof_int=`cat conftestval`
4407 else
4408   echo "configure: failed program was:" >&5
4409   cat conftest.$ac_ext >&5
4410   rm -fr conftest*
4411   ac_cv_sizeof_int=0
4412 fi
4413 rm -fr conftest*
4414 fi
4415
4416 fi
4417 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4418 cat >> confdefs.h <<EOF
4419 #define SIZEOF_INT $ac_cv_sizeof_int
4420 EOF
4421
4422
4423 echo $ac_n "checking size of long""... $ac_c" 1>&6
4424 echo "configure:4425: checking size of long" >&5
4425 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
4426   echo $ac_n "(cached) $ac_c" 1>&6
4427 else
4428   if test "$cross_compiling" = yes; then
4429     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4430 else
4431   cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434 #include <stdio.h>
4435 #include <sys/types.h>
4436 main()
4437 {
4438   FILE *f=fopen("conftestval", "w");
4439   if (!f) exit(1);
4440   fprintf(f, "%d\n", sizeof(long));
4441   exit(0);
4442 }
4443 EOF
4444 if { (eval echo configure:4445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4445 then
4446   ac_cv_sizeof_long=`cat conftestval`
4447 else
4448   echo "configure: failed program was:" >&5
4449   cat conftest.$ac_ext >&5
4450   rm -fr conftest*
4451   ac_cv_sizeof_long=0
4452 fi
4453 rm -fr conftest*
4454 fi
4455
4456 fi
4457 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4458 cat >> confdefs.h <<EOF
4459 #define SIZEOF_LONG $ac_cv_sizeof_long
4460 EOF
4461
4462
4463 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4464 echo "configure:4465: checking size of long long" >&5
4465 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
4466   echo $ac_n "(cached) $ac_c" 1>&6
4467 else
4468   if test "$cross_compiling" = yes; then
4469     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4470 else
4471   cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4474 #include <stdio.h>
4475 #include <sys/types.h>
4476 main()
4477 {
4478   FILE *f=fopen("conftestval", "w");
4479   if (!f) exit(1);
4480   fprintf(f, "%d\n", sizeof(long long));
4481   exit(0);
4482 }
4483 EOF
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4485 then
4486   ac_cv_sizeof_long_long=`cat conftestval`
4487 else
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490   rm -fr conftest*
4491   ac_cv_sizeof_long_long=0
4492 fi
4493 rm -fr conftest*
4494 fi
4495
4496 fi
4497 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4498 cat >> confdefs.h <<EOF
4499 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4500 EOF
4501
4502
4503 SIZEOF_SHORT=$ac_cv_sizeof_short
4504 SIZEOF_INT=$ac_cv_sizeof_int
4505 SIZEOF_LONG=$ac_cv_sizeof_long
4506 SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
4507
4508
4509
4510
4511 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4512 echo "configure:4513: checking whether byte ordering is bigendian" >&5
4513 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   ac_cv_c_bigendian=unknown
4517 # See if sys/param.h defines the BYTE_ORDER macro.
4518 cat > conftest.$ac_ext <<EOF
4519 #line 4520 "configure"
4520 #include "confdefs.h"
4521 #include <sys/types.h>
4522 #include <sys/param.h>
4523 int main() {
4524
4525 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4526  bogus endian macros
4527 #endif
4528 ; return 0; }
4529 EOF
4530 if { (eval echo configure:4531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4531   rm -rf conftest*
4532   # It does; now see whether it defined to BIG_ENDIAN or not.
4533 cat > conftest.$ac_ext <<EOF
4534 #line 4535 "configure"
4535 #include "confdefs.h"
4536 #include <sys/types.h>
4537 #include <sys/param.h>
4538 int main() {
4539
4540 #if BYTE_ORDER != BIG_ENDIAN
4541  not big endian
4542 #endif
4543 ; return 0; }
4544 EOF
4545 if { (eval echo configure:4546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4546   rm -rf conftest*
4547   ac_cv_c_bigendian=yes
4548 else
4549   echo "configure: failed program was:" >&5
4550   cat conftest.$ac_ext >&5
4551   rm -rf conftest*
4552   ac_cv_c_bigendian=no
4553 fi
4554 rm -f conftest*
4555 else
4556   echo "configure: failed program was:" >&5
4557   cat conftest.$ac_ext >&5
4558 fi
4559 rm -f conftest*
4560 if test $ac_cv_c_bigendian = unknown; then
4561 if test "$cross_compiling" = yes; then
4562     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4563 else
4564   cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 main () {
4568   /* Are we little or big endian?  From Harbison&Steele.  */
4569   union
4570   {
4571     long l;
4572     char c[sizeof (long)];
4573   } u;
4574   u.l = 1;
4575   exit (u.c[sizeof (long) - 1] == 1);
4576 }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4579 then
4580   ac_cv_c_bigendian=no
4581 else
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -fr conftest*
4585   ac_cv_c_bigendian=yes
4586 fi
4587 rm -fr conftest*
4588 fi
4589
4590 fi
4591 fi
4592
4593 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4594 if test $ac_cv_c_bigendian = yes; then
4595   cat >> confdefs.h <<\EOF
4596 #define WORDS_BIGENDIAN 1
4597 EOF
4598
4599 fi
4600
4601 echo $ac_n "checking whether struct stat has a st_flags field""... $ac_c" 1>&6
4602 echo "configure:4603: checking whether struct stat has a st_flags field" >&5
4603 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then
4604   echo $ac_n "(cached) $ac_c" 1>&6
4605 else
4606   cat > conftest.$ac_ext <<EOF
4607 #line 4608 "configure"
4608 #include "confdefs.h"
4609 #include <sys/stat.h>
4610 int main() {
4611 struct stat stat; stat.st_flags = 0;
4612 ; return 0; }
4613 EOF
4614 if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4615   rm -rf conftest*
4616   e2fsprogs_cv_struct_st_flags=yes
4617 else
4618   echo "configure: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   rm -rf conftest*
4621   e2fsprogs_cv_struct_st_flags=no
4622 fi
4623 rm -f conftest*
4624 fi
4625
4626 echo "$ac_t""$e2fsprogs_cv_struct_st_flags" 1>&6
4627 if test "$e2fsprogs_cv_struct_st_flags" = yes; then
4628   echo $ac_n "checking whether st_flags field is useful""... $ac_c" 1>&6
4629 echo "configure:4630: checking whether st_flags field is useful" >&5
4630   if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags_immut'+set}'`\" = set"; then
4631   echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633   cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 #include <sys/stat.h>
4637 int main() {
4638 struct stat stat; stat.st_flags |= UF_IMMUTABLE;
4639 ; return 0; }
4640 EOF
4641 if { (eval echo configure:4642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4642   rm -rf conftest*
4643   e2fsprogs_cv_struct_st_flags_immut=yes
4644 else
4645   echo "configure: failed program was:" >&5
4646   cat conftest.$ac_ext >&5
4647   rm -rf conftest*
4648   e2fsprogs_cv_struct_st_flags_immut=no
4649 fi
4650 rm -f conftest*
4651 fi
4652
4653   echo "$ac_t""$e2fsprogs_cv_struct_st_flags_immut" 1>&6
4654   if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
4655           cat >> confdefs.h <<\EOF
4656 #define HAVE_STAT_FLAGS 1
4657 EOF
4658
4659   fi
4660 fi
4661 for ac_func in chflags getrusage llseek lseek64 open64 getmntinfo strcasecmp srandom fchown mallinfo fdatasync strnlen sysconf pathconf
4662 do
4663 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4664 echo "configure:4665: checking for $ac_func" >&5
4665 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4666   echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668   cat > conftest.$ac_ext <<EOF
4669 #line 4670 "configure"
4670 #include "confdefs.h"
4671 /* System header to define __stub macros and hopefully few prototypes,
4672     which can conflict with char $ac_func(); below.  */
4673 #include <assert.h>
4674 /* Override any gcc2 internal prototype to avoid an error.  */
4675 /* We use char because int might match the return type of a gcc2
4676     builtin and then its argument prototype would still apply.  */
4677 char $ac_func();
4678
4679 int main() {
4680
4681 /* The GNU C library defines this for functions which it implements
4682     to always fail with ENOSYS.  Some functions are actually named
4683     something starting with __ and the normal name is an alias.  */
4684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4685 choke me
4686 #else
4687 $ac_func();
4688 #endif
4689
4690 ; return 0; }
4691 EOF
4692 if { (eval echo configure:4693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4693   rm -rf conftest*
4694   eval "ac_cv_func_$ac_func=yes"
4695 else
4696   echo "configure: failed program was:" >&5
4697   cat conftest.$ac_ext >&5
4698   rm -rf conftest*
4699   eval "ac_cv_func_$ac_func=no"
4700 fi
4701 rm -f conftest*
4702 fi
4703
4704 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4705   echo "$ac_t""yes" 1>&6
4706     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4707   cat >> confdefs.h <<EOF
4708 #define $ac_tr_func 1
4709 EOF
4710  
4711 else
4712   echo "$ac_t""no" 1>&6
4713 fi
4714 done
4715
4716 SOCKET_LIB=''
4717 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
4718 echo "configure:4719: checking for socket in -lsocket" >&5
4719 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
4720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   ac_save_LIBS="$LIBS"
4724 LIBS="-lsocket  $LIBS"
4725 cat > conftest.$ac_ext <<EOF
4726 #line 4727 "configure"
4727 #include "confdefs.h"
4728 /* Override any gcc2 internal prototype to avoid an error.  */
4729 /* We use char because int might match the return type of a gcc2
4730     builtin and then its argument prototype would still apply.  */
4731 char socket();
4732
4733 int main() {
4734 socket()
4735 ; return 0; }
4736 EOF
4737 if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4738   rm -rf conftest*
4739   eval "ac_cv_lib_$ac_lib_var=yes"
4740 else
4741   echo "configure: failed program was:" >&5
4742   cat conftest.$ac_ext >&5
4743   rm -rf conftest*
4744   eval "ac_cv_lib_$ac_lib_var=no"
4745 fi
4746 rm -f conftest*
4747 LIBS="$ac_save_LIBS"
4748
4749 fi
4750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4751   echo "$ac_t""yes" 1>&6
4752   SOCKET_LIB=-lsocket
4753 else
4754   echo "$ac_t""no" 1>&6
4755 fi
4756
4757
4758 echo $ac_n "checking for optreset""... $ac_c" 1>&6
4759 echo "configure:4760: checking for optreset" >&5
4760 if eval "test \"`echo '$''{'ac_cv_have_optreset'+set}'`\" = set"; then
4761   echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763   cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766 #include <unistd.h>
4767 EOF
4768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4769   egrep "optreset" >/dev/null 2>&1; then
4770   rm -rf conftest*
4771   ac_cv_have_optreset=yes
4772 else
4773   rm -rf conftest*
4774   ac_cv_have_optreset=no
4775 fi
4776 rm -f conftest*
4777
4778 fi
4779 echo "$ac_t""$ac_cv_have_optreset" 1>&6
4780 if test $ac_cv_have_optreset = yes; then
4781   cat >> confdefs.h <<\EOF
4782 #define HAVE_OPTRESET 1
4783 EOF
4784
4785 fi
4786 case "$host_os" in
4787 linux*)
4788         cat >> confdefs.h <<\EOF
4789 #define HAVE_EXT2_IOCTLS 1
4790 EOF
4791
4792         ;;
4793 esac
4794 case "$host_os" in
4795 linux* | gnu*)
4796         if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
4797                 root_prefix="";
4798                 echo "On $host_os systems, root_prefix defaults to ''"
4799         fi
4800         ;;
4801 esac
4802 case "$host_os" in
4803 linux* | gnu*)
4804         if test "$prefix" = NONE ; then
4805                 prefix="/usr";
4806                 echo "On $host_os systems, prefix defaults to /usr"
4807                 if test "$mandir" = '${prefix}/man' ; then
4808                         echo "...and mandir defaults to /usr/share/man"
4809                         mandir=/usr/share/man
4810                 fi
4811         fi
4812 ;;
4813 esac
4814 if test "$root_prefix" = NONE ; then
4815         if test "$prefix" = NONE ; then
4816                 root_prefix="$ac_default_prefix"
4817         else
4818                 root_prefix="$prefix"
4819         fi
4820         root_bindir=$bindir
4821         root_sbindir=$sbindir
4822         root_libdir=$libdir
4823         root_sysconfdir=$sysconfdir
4824 else
4825         root_bindir='${root_prefix}/bin'
4826         root_sbindir='${root_prefix}/sbin'
4827         root_libdir='${root_prefix}/lib'
4828         root_sysconfdir='${root_prefix}/etc'
4829 fi
4830
4831
4832
4833
4834
4835 echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6
4836 echo "configure:4837: checking whether linker accepts -static" >&5
4837 if eval "test \"`echo '$''{'ac_cv_e2fsprogs_use_static'+set}'`\" = set"; then
4838   echo $ac_n "(cached) $ac_c" 1>&6
4839 else
4840   SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static"
4841 cat > conftest.$ac_ext <<EOF
4842 #line 4843 "configure"
4843 #include "confdefs.h"
4844 #include <stdio.h>
4845 int main() {
4846 fflush(stdout);
4847 ; return 0; }
4848 EOF
4849 if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4850   rm -rf conftest*
4851   ac_cv_e2fsprogs_use_static=yes
4852 else
4853   echo "configure: failed program was:" >&5
4854   cat conftest.$ac_ext >&5
4855   rm -rf conftest*
4856   ac_cv_e2fsprogs_use_static=no
4857 fi
4858 rm -f conftest*
4859 LDFLAGS=$SAVE_LDFLAGS
4860 fi
4861
4862 case "$host_os" in
4863 solaris2.*)
4864         ac_cv_e2fsprogs_use_static=no   
4865 ;;
4866 esac
4867 echo "$ac_t""$ac_cv_e2fsprogs_use_static" 1>&6
4868 LDFLAG_STATIC=
4869 if test $ac_cv_e2fsprogs_use_static = yes; then
4870         LDFLAG_STATIC=-static
4871 fi
4872
4873 SS_DIR=`cd ${srcdir}/lib/ss; pwd`
4874 ET_DIR=`cd ${srcdir}/lib/et; pwd`
4875
4876
4877 if test "$cross_compiling" = yes ; then
4878   DO_TEST_SUITE=
4879 else
4880   DO_TEST_SUITE=check
4881 fi
4882
4883 test -d lib || mkdir lib
4884 test -d include || mkdir include
4885 test -d include/linux || mkdir include/linux
4886 test -d include/asm || mkdir include/asm
4887 rmakefile=
4888 if test -d ${srcdir}/resize ; then
4889    rmakefile=resize/Makefile
4890 fi
4891 trap '' 1 2 15
4892 cat > confcache <<\EOF
4893 # This file is a shell script that caches the results of configure
4894 # tests run on this system so they can be shared between configure
4895 # scripts and configure runs.  It is not useful on other systems.
4896 # If it contains results you don't want to keep, you may remove or edit it.
4897 #
4898 # By default, configure uses ./config.cache as the cache file,
4899 # creating it if it does not exist already.  You can give configure
4900 # the --cache-file=FILE option to use a different cache file; that is
4901 # what configure does when it calls configure scripts in
4902 # subdirectories, so they share the cache.
4903 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4904 # config.status only pays attention to the cache file if you give it the
4905 # --recheck option to rerun configure.
4906 #
4907 EOF
4908 # The following way of writing the cache mishandles newlines in values,
4909 # but we know of no workaround that is simple, portable, and efficient.
4910 # So, don't put newlines in cache variables' values.
4911 # Ultrix sh set writes to stderr and can't be redirected directly,
4912 # and sets the high bit in the cache file unless we assign to the vars.
4913 (set) 2>&1 |
4914   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4915   *ac_space=\ *)
4916     # `set' does not quote correctly, so add quotes (double-quote substitution
4917     # turns \\\\ into \\, and sed turns \\ into \).
4918     sed -n \
4919       -e "s/'/'\\\\''/g" \
4920       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4921     ;;
4922   *)
4923     # `set' quotes correctly as required by POSIX, so do not add quotes.
4924     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4925     ;;
4926   esac >> confcache
4927 if cmp -s $cache_file confcache; then
4928   :
4929 else
4930   if test -w $cache_file; then
4931     echo "updating cache $cache_file"
4932     cat confcache > $cache_file
4933   else
4934     echo "not updating unwritable cache $cache_file"
4935   fi
4936 fi
4937 rm -f confcache
4938
4939 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4940
4941 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4942 # Let make expand exec_prefix.
4943 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4944
4945 # Any assignment to VPATH causes Sun make to only execute
4946 # the first set of double-colon rules, so remove it if not needed.
4947 # If there is a colon in the path, we need to keep it.
4948 if test "x$srcdir" = x.; then
4949   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4950 fi
4951
4952 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4953
4954 # Transform confdefs.h into DEFS.
4955 # Protect against shell expansion while executing Makefile rules.
4956 # Protect against Makefile macro expansion.
4957 cat > conftest.defs <<\EOF
4958 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
4959 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
4960 s%\[%\\&%g
4961 s%\]%\\&%g
4962 s%\$%$$%g
4963 EOF
4964 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
4965 rm -f conftest.defs
4966
4967
4968 # Without the "./", some shells look in PATH for config.status.
4969 : ${CONFIG_STATUS=./config.status}
4970
4971 echo creating $CONFIG_STATUS
4972 rm -f $CONFIG_STATUS
4973 cat > $CONFIG_STATUS <<EOF
4974 #! /bin/sh
4975 # Generated automatically by configure.
4976 # Run this file to recreate the current configuration.
4977 # This directory was configured as follows,
4978 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4979 #
4980 # $0 $ac_configure_args
4981 #
4982 # Compiler output produced by configure, useful for debugging
4983 # configure, is in ./config.log if it exists.
4984
4985 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4986 for ac_option
4987 do
4988   case "\$ac_option" in
4989   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4990     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4991     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4992   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4993     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4994     exit 0 ;;
4995   -help | --help | --hel | --he | --h)
4996     echo "\$ac_cs_usage"; exit 0 ;;
4997   *) echo "\$ac_cs_usage"; exit 1 ;;
4998   esac
4999 done
5000
5001 ac_given_srcdir=$srcdir
5002 ac_given_INSTALL="$INSTALL"
5003
5004 trap 'rm -fr `echo "MCONFIG Makefile util/Makefile util/subst.conf lib/et/Makefile 
5005         lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile lib/uuid/Makefile
5006         lib/evms/Makefile
5007         misc/Makefile ext2ed/Makefile e2fsck/Makefile debugfs/Makefile \
5008         tests/Makefile tests/progs/Makefile $rmakefile doc/Makefile 
5009         intl/Makefile po/Makefile.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5010 EOF
5011 cat >> $CONFIG_STATUS <<EOF
5012
5013 # Protect against being on the right side of a sed subst in config.status.
5014 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5015  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5016 $ac_vpsub
5017 $extrasub
5018 s%@SHELL@%$SHELL%g
5019 s%@CFLAGS@%$CFLAGS%g
5020 s%@CPPFLAGS@%$CPPFLAGS%g
5021 s%@CXXFLAGS@%$CXXFLAGS%g
5022 s%@FFLAGS@%$FFLAGS%g
5023 s%@DEFS@%$DEFS%g
5024 s%@LDFLAGS@%$LDFLAGS%g
5025 s%@LIBS@%$LIBS%g
5026 s%@exec_prefix@%$exec_prefix%g
5027 s%@prefix@%$prefix%g
5028 s%@program_transform_name@%$program_transform_name%g
5029 s%@bindir@%$bindir%g
5030 s%@sbindir@%$sbindir%g
5031 s%@libexecdir@%$libexecdir%g
5032 s%@datadir@%$datadir%g
5033 s%@sysconfdir@%$sysconfdir%g
5034 s%@sharedstatedir@%$sharedstatedir%g
5035 s%@localstatedir@%$localstatedir%g
5036 s%@libdir@%$libdir%g
5037 s%@includedir@%$includedir%g
5038 s%@oldincludedir@%$oldincludedir%g
5039 s%@infodir@%$infodir%g
5040 s%@mandir@%$mandir%g
5041 /@MCONFIG@/r $MCONFIG
5042 s%@MCONFIG@%%g
5043 s%@E2FSPROGS_YEAR@%$E2FSPROGS_YEAR%g
5044 s%@E2FSPROGS_MONTH@%$E2FSPROGS_MONTH%g
5045 s%@E2FSPROGS_VERSION@%$E2FSPROGS_VERSION%g
5046 s%@host@%$host%g
5047 s%@host_alias@%$host_alias%g
5048 s%@host_cpu@%$host_cpu%g
5049 s%@host_vendor@%$host_vendor%g
5050 s%@host_os@%$host_os%g
5051 s%@CC@%$CC%g
5052 s%@LD@%$LD%g
5053 s%@CPP@%$CPP%g
5054 s%@LINUX_INCLUDE@%$LINUX_INCLUDE%g
5055 s%@HTREE_CMT@%$HTREE_CMT%g
5056 s%@HTREE_CLR_CMT@%$HTREE_CLR_CMT%g
5057 s%@DLL_CMT@%$DLL_CMT%g
5058 /@MAKEFILE_DLL@/r $MAKEFILE_DLL
5059 s%@MAKEFILE_DLL@%%g
5060 s%@ELF_CMT@%$ELF_CMT%g
5061 /@MAKEFILE_ELF@/r $MAKEFILE_ELF
5062 s%@MAKEFILE_ELF@%%g
5063 s%@BSDLIB_CMT@%$BSDLIB_CMT%g
5064 /@MAKEFILE_BSDLIB@/r $MAKEFILE_BSDLIB
5065 s%@MAKEFILE_BSDLIB@%%g
5066 s%@PROFILE_CMT@%$PROFILE_CMT%g
5067 /@MAKEFILE_PROFILE@/r $MAKEFILE_PROFILE
5068 s%@MAKEFILE_PROFILE@%%g
5069 s%@CHECKER_CMT@%$CHECKER_CMT%g
5070 /@MAKEFILE_CHECKER@/r $MAKEFILE_CHECKER
5071 s%@MAKEFILE_CHECKER@%%g
5072 s%@LIB_EXT@%$LIB_EXT%g
5073 s%@STATIC_LIB_EXT@%$STATIC_LIB_EXT%g
5074 s%@PROFILED_LIB_EXT@%$PROFILED_LIB_EXT%g
5075 s%@DEBUGFS_CMT@%$DEBUGFS_CMT%g
5076 s%@IMAGER_CMT@%$IMAGER_CMT%g
5077 s%@RESIZER_CMT@%$RESIZER_CMT%g
5078 s%@E2FSCK_TYPE@%$E2FSCK_TYPE%g
5079 s%@FSCK_PROG@%$FSCK_PROG%g
5080 s%@FSCK_MAN@%$FSCK_MAN%g
5081 /@MAKEFILE_LIBRARY@/r $MAKEFILE_LIBRARY
5082 s%@MAKEFILE_LIBRARY@%%g
5083 s%@PACKAGE@%$PACKAGE%g
5084 s%@VERSION@%$VERSION%g
5085 s%@SET_MAKE@%$SET_MAKE%g
5086 s%@RANLIB@%$RANLIB%g
5087 s%@ALLOCA@%$ALLOCA%g
5088 s%@USE_NLS@%$USE_NLS%g
5089 s%@MSGFMT@%$MSGFMT%g
5090 s%@GMSGFMT@%$GMSGFMT%g
5091 s%@XGETTEXT@%$XGETTEXT%g
5092 s%@GENCAT@%$GENCAT%g
5093 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5094 s%@CATALOGS@%$CATALOGS%g
5095 s%@CATOBJEXT@%$CATOBJEXT%g
5096 s%@DATADIRNAME@%$DATADIRNAME%g
5097 s%@GMOFILES@%$GMOFILES%g
5098 s%@INSTOBJEXT@%$INSTOBJEXT%g
5099 s%@INTLDEPS@%$INTLDEPS%g
5100 s%@INTLLIBS@%$INTLLIBS%g
5101 s%@INTLOBJS@%$INTLOBJS%g
5102 s%@POFILES@%$POFILES%g
5103 s%@POSUB@%$POSUB%g
5104 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5105 s%@GT_NO@%$GT_NO%g
5106 s%@GT_YES@%$GT_YES%g
5107 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5108 s%@l@%$l%g
5109 s%@BINARY_TYPE@%$BINARY_TYPE%g
5110 s%@LN@%$LN%g
5111 s%@LN_S@%$LN_S%g
5112 s%@MV@%$MV%g
5113 s%@CP@%$CP%g
5114 s%@RM@%$RM%g
5115 s%@CHMOD@%$CHMOD%g
5116 s%@AWK@%$AWK%g
5117 s%@SED@%$SED%g
5118 s%@PERL@%$PERL%g
5119 s%@LDCONFIG@%$LDCONFIG%g
5120 s%@build@%$build%g
5121 s%@build_alias@%$build_alias%g
5122 s%@build_cpu@%$build_cpu%g
5123 s%@build_vendor@%$build_vendor%g
5124 s%@build_os@%$build_os%g
5125 s%@AR@%$AR%g
5126 s%@STRIP@%$STRIP%g
5127 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5128 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5129 s%@INSTALL_DATA@%$INSTALL_DATA%g
5130 s%@BUILD_CC@%$BUILD_CC%g
5131 s%@SIZEOF_SHORT@%$SIZEOF_SHORT%g
5132 s%@SIZEOF_INT@%$SIZEOF_INT%g
5133 s%@SIZEOF_LONG@%$SIZEOF_LONG%g
5134 s%@SIZEOF_LONG_LONG@%$SIZEOF_LONG_LONG%g
5135 s%@SOCKET_LIB@%$SOCKET_LIB%g
5136 s%@root_prefix@%$root_prefix%g
5137 s%@root_bindir@%$root_bindir%g
5138 s%@root_sbindir@%$root_sbindir%g
5139 s%@root_libdir@%$root_libdir%g
5140 s%@root_sysconfdir@%$root_sysconfdir%g
5141 s%@LDFLAG_STATIC@%$LDFLAG_STATIC%g
5142 s%@SS_DIR@%$SS_DIR%g
5143 s%@ET_DIR@%$ET_DIR%g
5144 s%@DO_TEST_SUITE@%$DO_TEST_SUITE%g
5145
5146 CEOF
5147 EOF
5148
5149 cat >> $CONFIG_STATUS <<\EOF
5150
5151 # Split the substitutions into bite-sized pieces for seds with
5152 # small command number limits, like on Digital OSF/1 and HP-UX.
5153 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5154 ac_file=1 # Number of current file.
5155 ac_beg=1 # First line for current file.
5156 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5157 ac_more_lines=:
5158 ac_sed_cmds=""
5159 while $ac_more_lines; do
5160   if test $ac_beg -gt 1; then
5161     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5162   else
5163     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5164   fi
5165   if test ! -s conftest.s$ac_file; then
5166     ac_more_lines=false
5167     rm -f conftest.s$ac_file
5168   else
5169     if test -z "$ac_sed_cmds"; then
5170       ac_sed_cmds="sed -f conftest.s$ac_file"
5171     else
5172       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5173     fi
5174     ac_file=`expr $ac_file + 1`
5175     ac_beg=$ac_end
5176     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5177   fi
5178 done
5179 if test -z "$ac_sed_cmds"; then
5180   ac_sed_cmds=cat
5181 fi
5182 EOF
5183
5184 cat >> $CONFIG_STATUS <<EOF
5185
5186 CONFIG_FILES=\${CONFIG_FILES-"MCONFIG Makefile util/Makefile util/subst.conf lib/et/Makefile 
5187         lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile lib/uuid/Makefile
5188         lib/evms/Makefile
5189         misc/Makefile ext2ed/Makefile e2fsck/Makefile debugfs/Makefile \
5190         tests/Makefile tests/progs/Makefile $rmakefile doc/Makefile 
5191         intl/Makefile po/Makefile.in"}
5192 EOF
5193 cat >> $CONFIG_STATUS <<\EOF
5194 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5195   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5196   case "$ac_file" in
5197   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5198        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5199   *) ac_file_in="${ac_file}.in" ;;
5200   esac
5201
5202   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5203
5204   # Remove last slash and all that follows it.  Not all systems have dirname.
5205   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5206   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5207     # The file is in a subdirectory.
5208     test ! -d "$ac_dir" && mkdir "$ac_dir"
5209     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5210     # A "../" for each directory in $ac_dir_suffix.
5211     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5212   else
5213     ac_dir_suffix= ac_dots=
5214   fi
5215
5216   case "$ac_given_srcdir" in
5217   .)  srcdir=.
5218       if test -z "$ac_dots"; then top_srcdir=.
5219       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5220   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5221   *) # Relative path.
5222     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5223     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5224   esac
5225
5226   case "$ac_given_INSTALL" in
5227   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5228   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5229   esac
5230
5231   echo creating "$ac_file"
5232   rm -f "$ac_file"
5233   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5234   case "$ac_file" in
5235   *Makefile*) ac_comsub="1i\\
5236 # $configure_input" ;;
5237   *) ac_comsub= ;;
5238   esac
5239
5240   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5241   sed -e "$ac_comsub
5242 s%@configure_input@%$configure_input%g
5243 s%@srcdir@%$srcdir%g
5244 s%@top_srcdir@%$top_srcdir%g
5245 s%@INSTALL@%$INSTALL%g
5246 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5247 fi; done
5248 rm -f conftest.s*
5249
5250 EOF
5251
5252 cat >> $CONFIG_STATUS <<EOF
5253 ac_sources="$nls_cv_header_libgt"
5254 ac_dests="$nls_cv_header_intl"
5255 EOF
5256
5257 cat >> $CONFIG_STATUS <<\EOF
5258 srcdir=$ac_given_srcdir
5259 while test -n "$ac_sources"; do
5260   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
5261   set $ac_sources; ac_source=$1; shift; ac_sources=$*
5262
5263   echo "linking $srcdir/$ac_source to $ac_dest"
5264
5265   if test ! -r $srcdir/$ac_source; then
5266     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5267   fi
5268   rm -f $ac_dest
5269
5270   # Make relative symlinks.
5271   # Remove last slash and all that follows it.  Not all systems have dirname.
5272   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
5273   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5274     # The dest file is in a subdirectory.
5275     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5276     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5277     # A "../" for each directory in $ac_dest_dir_suffix.
5278     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5279   else
5280     ac_dest_dir_suffix= ac_dots=
5281   fi
5282
5283   case "$srcdir" in
5284   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
5285   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5286   esac
5287
5288   # Make a symlink if possible; otherwise try a hard link.
5289   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5290     ln $srcdir/$ac_source $ac_dest; then :
5291   else
5292     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5293   fi
5294 done
5295 EOF
5296 cat >> $CONFIG_STATUS <<EOF
5297
5298
5299 EOF
5300 cat >> $CONFIG_STATUS <<\EOF
5301 case "$CONFIG_FILES" in *po/Makefile.in*)
5302         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
5303       esac
5304
5305 exit 0
5306 EOF
5307 chmod +x $CONFIG_STATUS
5308 rm -fr confdefs* $ac_clean_files
5309 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5310