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