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