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