Whamcloud - gitweb
Many files:
[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.4 
5 # Copyright (C) 1992, 1993, 1994 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   --enable-dll-shlibs     select DLL libraries"
24 ac_help="$ac_help
25   --enable-elf-shlibs     select ELF shared libraries"
26 ac_help="$ac_help
27   --enable-bsd-shlibs     select BSD shared libraries"
28 ac_help="$ac_help
29   --enable-profile        build profiling libraries"
30 ac_help="$ac_help
31   --enable-checker        build checker libraries"
32 ac_help="$ac_help
33   --enable-gcc-wall       enable GCC anal warnings"
34 ac_help="$ac_help
35   --enable-dynamic-e2fsck build e2fsck dynamically"
36
37 # Initialize some variables set by options.
38 # The variables have the same names as the options, with
39 # dashes changed to underlines.
40 build=NONE
41 cache_file=./config.cache
42 exec_prefix=NONE
43 host=NONE
44 no_create=
45 nonopt=NONE
46 no_recursion=
47 prefix=NONE
48 program_prefix=NONE
49 program_suffix=NONE
50 program_transform_name=s,x,x,
51 silent=
52 site=
53 srcdir=
54 target=NONE
55 verbose=
56 x_includes=NONE
57 x_libraries=NONE
58
59 # Initialize some other variables.
60 subdirs=
61
62 ac_prev=
63 for ac_option
64 do
65
66   # If the previous option needs an argument, assign it.
67   if test -n "$ac_prev"; then
68     eval "$ac_prev=\$ac_option"
69     ac_prev=
70     continue
71   fi
72
73   case "$ac_option" in
74   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
75   *) ac_optarg= ;;
76   esac
77
78   # Accept the important Cygnus configure options, so we can diagnose typos.
79
80   case "$ac_option" in
81
82   -build | --build | --buil | --bui | --bu | --b)
83     ac_prev=build ;;
84   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
85     build="$ac_optarg" ;;
86
87   -cache-file | --cache-file | --cache-fil | --cache-fi \
88   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89     ac_prev=cache_file ;;
90   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
92     cache_file="$ac_optarg" ;;
93
94   -disable-* | --disable-*)
95     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
96     # Reject names that are not valid shell variable names.
97     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
98       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
99     fi
100     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
101     eval "enable_${ac_feature}=no" ;;
102
103   -enable-* | --enable-*)
104     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
105     # Reject names that are not valid shell variable names.
106     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
107       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
108     fi
109     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
110     case "$ac_option" in
111       *=*) ;;
112       *) ac_optarg=yes ;;
113     esac
114     eval "enable_${ac_feature}='$ac_optarg'" ;;
115
116   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
117   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
118   | --exec | --exe | --ex)
119     ac_prev=exec_prefix ;;
120   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
121   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
122   | --exec=* | --exe=* | --ex=*)
123     exec_prefix="$ac_optarg" ;;
124
125   -gas | --gas | --ga | --g)
126     # Obsolete; use --with-gas.
127     with_gas=yes ;;
128
129   -help | --help | --hel | --he)
130     # Omit some internal or obsolete options to make the list less imposing.
131     # This message is too long to be a string in the A/UX 3.1 sh.
132     cat << EOF
133 Usage: configure [options] [host]
134 Options: [defaults in brackets after descriptions]
135 Configuration:
136   --cache-file=FILE       cache test results in FILE
137   --help                  print this message
138   --no-create             do not create output files
139   --quiet, --silent       do not print \`checking...' messages
140   --version               print the version of autoconf that created configure
141 Directory and file names:
142   --prefix=PREFIX         install architecture-independent files in PREFIX
143                           [$ac_default_prefix]
144   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
145                           [same as prefix]
146   --srcdir=DIR            find the sources in DIR [configure dir or ..]
147   --program-prefix=PREFIX prepend PREFIX to installed program names
148   --program-suffix=SUFFIX append SUFFIX to installed program names
149   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
150 Host type:
151   --build=BUILD           configure for building on BUILD [BUILD=HOST]
152   --host=HOST             configure for HOST [guessed]
153   --target=TARGET         configure for TARGET [TARGET=HOST]
154 Features and packages:
155   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
156   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
157   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
158   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
159   --x-includes=DIR        X include files are in DIR
160   --x-libraries=DIR       X library files are in DIR
161 --enable and --with options recognized:$ac_help
162 EOF
163     exit 0 ;;
164
165   -host | --host | --hos | --ho)
166     ac_prev=host ;;
167   -host=* | --host=* | --hos=* | --ho=*)
168     host="$ac_optarg" ;;
169
170   -nfp | --nfp | --nf)
171     # Obsolete; use --without-fp.
172     with_fp=no ;;
173
174   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
175   | --no-cr | --no-c)
176     no_create=yes ;;
177
178   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
179   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
180     no_recursion=yes ;;
181
182   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
183     ac_prev=prefix ;;
184   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
185     prefix="$ac_optarg" ;;
186
187   -program-prefix | --program-prefix | --program-prefi | --program-pref \
188   | --program-pre | --program-pr | --program-p)
189     ac_prev=program_prefix ;;
190   -program-prefix=* | --program-prefix=* | --program-prefi=* \
191   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
192     program_prefix="$ac_optarg" ;;
193
194   -program-suffix | --program-suffix | --program-suffi | --program-suff \
195   | --program-suf | --program-su | --program-s)
196     ac_prev=program_suffix ;;
197   -program-suffix=* | --program-suffix=* | --program-suffi=* \
198   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
199     program_suffix="$ac_optarg" ;;
200
201   -program-transform-name | --program-transform-name \
202   | --program-transform-nam | --program-transform-na \
203   | --program-transform-n | --program-transform- \
204   | --program-transform | --program-transfor \
205   | --program-transfo | --program-transf \
206   | --program-trans | --program-tran \
207   | --progr-tra | --program-tr | --program-t)
208     ac_prev=program_transform_name ;;
209   -program-transform-name=* | --program-transform-name=* \
210   | --program-transform-nam=* | --program-transform-na=* \
211   | --program-transform-n=* | --program-transform-=* \
212   | --program-transform=* | --program-transfor=* \
213   | --program-transfo=* | --program-transf=* \
214   | --program-trans=* | --program-tran=* \
215   | --progr-tra=* | --program-tr=* | --program-t=*)
216     program_transform_name="$ac_optarg" ;;
217
218   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
219   | -silent | --silent | --silen | --sile | --sil)
220     silent=yes ;;
221
222   -site | --site | --sit)
223     ac_prev=site ;;
224   -site=* | --site=* | --sit=*)
225     site="$ac_optarg" ;;
226
227   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
228     ac_prev=srcdir ;;
229   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
230     srcdir="$ac_optarg" ;;
231
232   -target | --target | --targe | --targ | --tar | --ta | --t)
233     ac_prev=target ;;
234   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
235     target="$ac_optarg" ;;
236
237   -v | -verbose | --verbose | --verbos | --verbo | --verb)
238     verbose=yes ;;
239
240   -version | --version | --versio | --versi | --vers)
241     echo "configure generated by autoconf version 2.4"
242     exit 0 ;;
243
244   -with-* | --with-*)
245     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
246     # Reject names that are not valid shell variable names.
247     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
248       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
249     fi
250     ac_package=`echo $ac_package| sed 's/-/_/g'`
251     case "$ac_option" in
252       *=*) ;;
253       *) ac_optarg=yes ;;
254     esac
255     eval "with_${ac_package}='$ac_optarg'" ;;
256
257   -without-* | --without-*)
258     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
259     # Reject names that are not valid shell variable names.
260     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
261       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
262     fi
263     ac_package=`echo $ac_package| sed 's/-/_/g'`
264     eval "with_${ac_package}=no" ;;
265
266   --x)
267     # Obsolete; use --with-x.
268     with_x=yes ;;
269
270   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
271   | --x-incl | --x-inc | --x-in | --x-i)
272     ac_prev=x_includes ;;
273   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
274   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
275     x_includes="$ac_optarg" ;;
276
277   -x-libraries | --x-libraries | --x-librarie | --x-librari \
278   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
279     ac_prev=x_libraries ;;
280   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
281   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
282     x_libraries="$ac_optarg" ;;
283
284   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
285     ;;
286
287   *) 
288     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
289       echo "configure: warning: $ac_option: invalid host type" 1>&2
290     fi
291     if test "x$nonopt" != xNONE; then
292       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
293     fi
294     nonopt="$ac_option"
295     ;;
296
297   esac
298 done
299
300 if test -n "$ac_prev"; then
301   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
302 fi
303
304 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
305
306 # File descriptor usage:
307 # 0 standard input
308 # 1 file creation
309 # 2 errors and warnings
310 # 3 some systems may open it to /dev/tty
311 # 4 used on the Kubota Titan
312 # 6 checking for... messages and results
313 # 5 compiler messages saved in config.log
314 if test "$silent" = yes; then
315   exec 6>/dev/null
316 else
317   exec 6>&1
318 fi
319 exec 5>./config.log
320
321 echo "\
322 This file contains any messages produced by compilers while
323 running configure, to aid debugging if configure makes a mistake.
324 " 1>&5
325
326 # Strip out --no-create and --no-recursion so they do not pile up.
327 # Also quote any args containing shell metacharacters.
328 ac_configure_args=
329 for ac_arg
330 do
331   case "$ac_arg" in
332   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
333   | --no-cr | --no-c) ;;
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
336   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
337   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
338   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
339   esac
340 done
341
342 # NLS nuisances.
343 # Only set LANG and LC_ALL to C if already set.
344 # These must not be set unconditionally because not all systems understand
345 # e.g. LANG=C (notably SCO).
346 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
347 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
348
349 # confdefs.h avoids OS command line length limits that DEFS can exceed.
350 rm -rf conftest* confdefs.h
351 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
352 echo > confdefs.h
353
354 # A filename unique to this package, relative to the directory that
355 # configure is in, which we can look for to find out if srcdir is correct.
356 ac_unique_file=version.h
357
358 # Find the source files, if location was not specified.
359 if test -z "$srcdir"; then
360   ac_srcdir_defaulted=yes
361   # Try the directory containing this script, then its parent.
362   ac_prog=$0
363   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
364   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
365   srcdir=$ac_confdir
366   if test ! -r $srcdir/$ac_unique_file; then
367     srcdir=..
368   fi
369 else
370   ac_srcdir_defaulted=no
371 fi
372 if test ! -r $srcdir/$ac_unique_file; then
373   if test "$ac_srcdir_defaulted" = yes; then
374     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
375   else
376     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
377   fi
378 fi
379 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
380
381 # Prefer explicitly selected file to automatically selected ones.
382 if test -z "$CONFIG_SITE"; then
383   if test "x$prefix" != xNONE; then
384     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
385   else
386     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
387   fi
388 fi
389 for ac_site_file in $CONFIG_SITE; do
390   if test -r "$ac_site_file"; then
391     echo "loading site script $ac_site_file"
392     . "$ac_site_file"
393   fi
394 done
395
396 if test -r "$cache_file"; then
397   echo "loading cache $cache_file"
398   . $cache_file
399 else
400   echo "creating cache $cache_file"
401   > $cache_file
402 fi
403
404 ac_ext=c
405 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
406 ac_cpp='$CPP $CPPFLAGS'
407 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
408 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
409
410 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
411   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
412   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
413     ac_n= ac_c='
414 ' ac_t='        '
415   else
416     ac_n=-n ac_c= ac_t=
417   fi
418 else
419   ac_n= ac_c='\c' ac_t=
420 fi
421
422
423 MCONFIG=./MCONFIG
424
425 BINARY_TYPE=bin
426 E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h  \
427         | awk '{print $3}' | tr \" " " | awk '{print $1}'`
428 DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
429         | tr \" " "`
430 MONTH=`echo $DATE | awk -F- '{print $2}'`
431 YEAR=`echo $DATE | awk -F- '{print $3}'`
432
433 if expr $YEAR ">" 90 >/dev/null ; then
434         E2FSPROGS_YEAR=19$YEAR
435 else
436         E2FSPROGS_YEAR=20$YEAR
437 fi
438
439 case $MONTH in
440 Jan)    E2FSPROGS_MONTH="January" ;;
441 Feb)    E2FSPROGS_MONTH="February" ;;
442 Mar)    E2FSPROGS_MONTH="March" ;;
443 Apr)    E2FSPROGS_MONTH="April" ;;
444 May)    E2FSPROGS_MONTH="May" ;;
445 Jun)    E2FSPROGS_MONTH="June" ;;
446 Jul)    E2FSPROGS_MONTH="July" ;;
447 Aug)    E2FSPROGS_MONTH="August" ;;
448 Sep)    E2FSPROGS_MONTH="September" ;;
449 Oct)    E2FSPROGS_MONTH="October" ;;
450 Nov)    E2FSPROGS_MONTH="November" ;;
451 Dec)    E2FSPROGS_MONTH="December" ;;
452 *)      echo "Unknown month $MONTH??" ;;
453 esac
454
455 unset DATE MONTH YEAR
456 echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
457 echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
458
459
460
461 # Check whether --with-cc or --without-cc was given.
462 withval="$with_cc"
463 if test -n "$withval"; then
464   echo "$ac_t""CC=$withval" 1>&6
465 CC=$withval
466 else
467   if test -z "$CC" ; then CC=cc; fi
468 echo "$ac_t""CC defaults to $CC" 1>&6
469 fi
470 export CC
471
472 # Check whether --with-linker or --without-linker was given.
473 withval="$with_linker"
474 if test -n "$withval"; then
475   echo "$ac_t""LD=$withval" 1>&6
476 LD=$withval
477 else
478   if test -z "$LD" ; then LD=$CC; fi
479 echo "$ac_t""LD defaults to $LD" 1>&6
480 fi
481 export LD
482
483 # Check whether --with-ccopts or --without-ccopts was given.
484 withval="$with_ccopts"
485 if test -n "$withval"; then
486   echo "$ac_t""CCOPTS is $withval" 1>&6
487 CCOPTS=$withval
488 CFLAGS="$CFLAGS $withval"
489 else
490   CCOPTS=
491 fi
492
493 LIB_EXT=.a
494 STATIC_LIB_EXT=.a
495 PROFILE_LIB_EXT=.a
496 # Check whether --with-ldopts or --without-ldopts was given.
497 withval="$with_ldopts"
498 if test -n "$withval"; then
499   echo "$ac_t""LDFLAGS is $withval" 1>&6
500 LDFLAGS=$withval
501 else
502   LDFLAGS=
503 fi
504
505 # Check whether --enable-dll-shlibs or --disable-dll-shlibs was given.
506 enableval="$enable_dll_shlibs"
507 if test -n "$enableval"; then
508   if test "$enableval" = "no"
509 then
510         DLL_CMT=#
511         MAKEFILE_DLL=/dev/null
512         echo "Disabling DLL shared libraries"
513 else
514         DLL_CMT=
515         MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib
516         BINARY_TYPE=dllbin
517         LIB_EXT=.sa
518         echo "Enabling DLL shared libraries"
519 fi
520
521 else
522   MAKEFILE_DLL=/dev/null
523 DLL_CMT=#
524 echo "Disabling DLL shared libraries by default"
525
526 fi
527
528
529
530 # Check whether --enable-elf-shlibs or --disable-elf-shlibs was given.
531 enableval="$enable_elf_shlibs"
532 if test -n "$enableval"; then
533   if test "$enableval" = "no"
534 then
535         ELF_CMT=#
536         MAKEFILE_ELF=/dev/null
537         echo "Disabling ELF shared libraries"
538 else
539         ELF_CMT=
540         MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
541         BINARY_TYPE=elfbin
542         LIB_EXT=.so
543         echo "Enabling ELF shared libraries"
544 fi
545
546 else
547   MAKEFILE_ELF=/dev/null
548 ELF_CMT=#
549 echo "Disabling ELF shared libraries by default"
550
551 fi
552
553
554
555 # Check whether --enable-bsd-shlibs or --disable-bsd-shlibs was given.
556 enableval="$enable_bsd_shlibs"
557 if test -n "$enableval"; then
558   if test "$enableval" = "no"
559 then
560         BSDLIB_CMT=#
561         MAKEFILE_BSDLIB=/dev/null
562         echo "Disabling BSD shared libraries"
563 else
564         BSDLIB_CMT=
565         MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
566         LIB_EXT=.so
567         echo "Enabling BSD shared libraries"
568 fi
569
570 else
571   MAKEFILE_BSDLIB=/dev/null
572 BSDLIB_CMT=#
573 echo "Disabling BSD shared libraries by default"
574
575 fi
576
577
578
579 # Check whether --enable-profile or --disable-profile was given.
580 enableval="$enable_profile"
581 if test -n "$enableval"; then
582   if test "$enableval" = "no"
583 then
584         PROFILE_CMT=#
585         MAKEFILE_PROFILE=/dev/null
586         echo "Disabling profiling libraries"
587 else
588         PROFILE_CMT=
589         MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
590         PROFILED_LIB_EXT=_p.a
591         echo "Building profiling libraries"
592 fi
593
594 else
595   PROFILE_CMT=#
596 MAKEFILE_PROFILE=/dev/null
597 echo "Disabling profiling libraries by default"
598
599 fi
600
601
602
603 # Check whether --enable-checker or --disable-checker was given.
604 enableval="$enable_checker"
605 if test -n "$enableval"; then
606   if test "$enableval" = "no"
607 then
608         CHECKER_CMT=#
609         MAKEFILE_CHECKER=/dev/null
610         echo "Disabling checker libraries"
611 else
612         CHECKER_CMT=
613         MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
614         echo "Building checker libraries"
615 fi
616
617 else
618   CHECKER_CMT=#
619 MAKEFILE_CHECKER=/dev/null
620 echo "Disabling checker libraries by default"
621
622 fi
623
624
625
626
627
628
629 # Check whether --enable-gcc-wall or --disable-gcc-wall was given.
630 enableval="$enable_gcc_wall"
631 if test -n "$enableval"; then
632   if test "$enableval" = "no"
633 then
634         W=#
635         echo "Disabling GCC warnings"
636 else
637         W=
638         echo "Enabling GCC warnings"
639 fi
640
641 else
642   W=#
643 echo "Disabling GCC warnings by default"
644
645 fi
646
647
648 # Check whether --enable-dynamic-e2fsck or --disable-dynamic-e2fsck was given.
649 enableval="$enable_dynamic_e2fsck"
650 if test -n "$enableval"; then
651   if test "$enableval" = "no"
652 then
653         E2FSCK_TYPE=static
654         echo "Building e2fsck statically"
655 else
656         E2FSCK_TYPE=shared
657         echo "Building e2fsck dynamically"
658 fi
659
660 else
661   E2FSCK_TYPE=static
662 echo "Building e2fsck statically by default"
663
664 fi
665
666
667 MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
668
669
670 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
671 set dummy ${MAKE-make}; ac_make=$2
672 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
673   echo $ac_n "(cached) $ac_c" 1>&6
674 else
675   cat > conftestmake <<\EOF
676 all:
677         @echo 'ac_maketemp="${MAKE}"'
678 EOF
679 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
680 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
681 if test -n "$ac_maketemp"; then
682   eval ac_cv_prog_make_${ac_make}_set=yes
683 else
684   eval ac_cv_prog_make_${ac_make}_set=no
685 fi
686 rm -f conftestmake
687 fi
688 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
689   echo "$ac_t""yes" 1>&6
690   SET_MAKE=
691 else
692   echo "$ac_t""no" 1>&6
693   SET_MAKE="MAKE=${MAKE-make}"
694 fi
695
696 # Extract the first word of "ln", so it can be a program name with args.
697 set dummy ln; ac_word=$2
698 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
699 if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then
700   echo $ac_n "(cached) $ac_c" 1>&6
701 else
702   case "$LN" in
703   /*)
704   ac_cv_path_LN="$LN" # Let the user override the test with a path.
705   ;;
706   *)
707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
708   for ac_dir in $PATH; do
709     test -z "$ac_dir" && ac_dir=.
710     if test -f $ac_dir/$ac_word; then
711       ac_cv_path_LN="$ac_dir/$ac_word"
712       break
713     fi
714   done
715   IFS="$ac_save_ifs"
716   test -z "$ac_cv_path_LN" && ac_cv_path_LN="ln"
717   ;;
718 esac
719 fi
720 LN="$ac_cv_path_LN"
721 if test -n "$LN"; then
722   echo "$ac_t""$LN" 1>&6
723 else
724   echo "$ac_t""no" 1>&6
725 fi
726
727 # Extract the first word of "mv", so it can be a program name with args.
728 set dummy mv; ac_word=$2
729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
731   echo $ac_n "(cached) $ac_c" 1>&6
732 else
733   case "$MV" in
734   /*)
735   ac_cv_path_MV="$MV" # Let the user override the test with a path.
736   ;;
737   *)
738   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
739   for ac_dir in $PATH; do
740     test -z "$ac_dir" && ac_dir=.
741     if test -f $ac_dir/$ac_word; then
742       ac_cv_path_MV="$ac_dir/$ac_word"
743       break
744     fi
745   done
746   IFS="$ac_save_ifs"
747   test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv"
748   ;;
749 esac
750 fi
751 MV="$ac_cv_path_MV"
752 if test -n "$MV"; then
753   echo "$ac_t""$MV" 1>&6
754 else
755   echo "$ac_t""no" 1>&6
756 fi
757
758 # Extract the first word of "cp", so it can be a program name with args.
759 set dummy cp; ac_word=$2
760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
761 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
762   echo $ac_n "(cached) $ac_c" 1>&6
763 else
764   case "$CP" in
765   /*)
766   ac_cv_path_CP="$CP" # Let the user override the test with a path.
767   ;;
768   *)
769   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
770   for ac_dir in $PATH; do
771     test -z "$ac_dir" && ac_dir=.
772     if test -f $ac_dir/$ac_word; then
773       ac_cv_path_CP="$ac_dir/$ac_word"
774       break
775     fi
776   done
777   IFS="$ac_save_ifs"
778   test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp"
779   ;;
780 esac
781 fi
782 CP="$ac_cv_path_CP"
783 if test -n "$CP"; then
784   echo "$ac_t""$CP" 1>&6
785 else
786   echo "$ac_t""no" 1>&6
787 fi
788
789 # Extract the first word of "rm", so it can be a program name with args.
790 set dummy rm; ac_word=$2
791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
792 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
793   echo $ac_n "(cached) $ac_c" 1>&6
794 else
795   case "$RM" in
796   /*)
797   ac_cv_path_RM="$RM" # Let the user override the test with a path.
798   ;;
799   *)
800   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
801   for ac_dir in $PATH; do
802     test -z "$ac_dir" && ac_dir=.
803     if test -f $ac_dir/$ac_word; then
804       ac_cv_path_RM="$ac_dir/$ac_word"
805       break
806     fi
807   done
808   IFS="$ac_save_ifs"
809   test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
810   ;;
811 esac
812 fi
813 RM="$ac_cv_path_RM"
814 if test -n "$RM"; then
815   echo "$ac_t""$RM" 1>&6
816 else
817   echo "$ac_t""no" 1>&6
818 fi
819
820 # Extract the first word of "chmod", so it can be a program name with args.
821 set dummy chmod; ac_word=$2
822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
823 if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then
824   echo $ac_n "(cached) $ac_c" 1>&6
825 else
826   case "$CHMOD" in
827   /*)
828   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
829   ;;
830   *)
831   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
832   for ac_dir in $PATH; do
833     test -z "$ac_dir" && ac_dir=.
834     if test -f $ac_dir/$ac_word; then
835       ac_cv_path_CHMOD="$ac_dir/$ac_word"
836       break
837     fi
838   done
839   IFS="$ac_save_ifs"
840   test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD=":"
841   ;;
842 esac
843 fi
844 CHMOD="$ac_cv_path_CHMOD"
845 if test -n "$CHMOD"; then
846   echo "$ac_t""$CHMOD" 1>&6
847 else
848   echo "$ac_t""no" 1>&6
849 fi
850
851 # Extract the first word of "awk", so it can be a program name with args.
852 set dummy awk; ac_word=$2
853 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
854 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
855   echo $ac_n "(cached) $ac_c" 1>&6
856 else
857   case "$AWK" in
858   /*)
859   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
860   ;;
861   *)
862   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
863   for ac_dir in $PATH; do
864     test -z "$ac_dir" && ac_dir=.
865     if test -f $ac_dir/$ac_word; then
866       ac_cv_path_AWK="$ac_dir/$ac_word"
867       break
868     fi
869   done
870   IFS="$ac_save_ifs"
871   test -z "$ac_cv_path_AWK" && ac_cv_path_AWK="awk"
872   ;;
873 esac
874 fi
875 AWK="$ac_cv_path_AWK"
876 if test -n "$AWK"; then
877   echo "$ac_t""$AWK" 1>&6
878 else
879   echo "$ac_t""no" 1>&6
880 fi
881
882 # Extract the first word of "sed", so it can be a program name with args.
883 set dummy sed; ac_word=$2
884 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
885 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
886   echo $ac_n "(cached) $ac_c" 1>&6
887 else
888   case "$SED" in
889   /*)
890   ac_cv_path_SED="$SED" # Let the user override the test with a path.
891   ;;
892   *)
893   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
894   for ac_dir in $PATH; do
895     test -z "$ac_dir" && ac_dir=.
896     if test -f $ac_dir/$ac_word; then
897       ac_cv_path_SED="$ac_dir/$ac_word"
898       break
899     fi
900   done
901   IFS="$ac_save_ifs"
902   test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed"
903   ;;
904 esac
905 fi
906 SED="$ac_cv_path_SED"
907 if test -n "$SED"; then
908   echo "$ac_t""$SED" 1>&6
909 else
910   echo "$ac_t""no" 1>&6
911 fi
912
913 ac_aux_dir=
914 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
915   if test -f $ac_dir/install-sh; then
916     ac_aux_dir=$ac_dir
917     ac_install_sh="$ac_aux_dir/install-sh -c"
918     break
919   elif test -f $ac_dir/install.sh; then
920     ac_aux_dir=$ac_dir
921     ac_install_sh="$ac_aux_dir/install.sh -c"
922     break
923   fi
924 done
925 if test -z "$ac_aux_dir"; then
926   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
927 fi
928 ac_config_guess=$ac_aux_dir/config.guess
929 ac_config_sub=$ac_aux_dir/config.sub
930 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
931
932
933 # Make sure we can run config.sub.
934 if $ac_config_sub sun4 >/dev/null 2>&1; then :
935 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
936 fi
937
938 echo $ac_n "checking host system type""... $ac_c" 1>&6
939
940 host_alias=$host
941 case "$host_alias" in
942 NONE)
943   case $nonopt in
944   NONE)
945     if host_alias=`$ac_config_guess`; then :
946     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
947     fi ;;
948   *) host_alias=$nonopt ;;
949   esac ;;
950 esac
951
952 host=`$ac_config_sub $host_alias`
953 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
954 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
955 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
956 echo "$ac_t""$host" 1>&6
957
958 echo $ac_n "checking build system type""... $ac_c" 1>&6
959
960 build_alias=$build
961 case "$build_alias" in
962 NONE)
963   case $nonopt in
964   NONE) build_alias=$host_alias ;;
965   *) build_alias=$nonopt ;;
966   esac ;;
967 esac
968
969 build=`$ac_config_sub $build_alias`
970 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
971 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
972 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
973 echo "$ac_t""$build" 1>&6
974
975 if test $host != $build; then
976   ac_tool_prefix=${host_alias}-
977 else
978   ac_tool_prefix=
979 fi
980
981 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
982 set dummy ${ac_tool_prefix}ar; ac_word=$2
983 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
984 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
985   echo $ac_n "(cached) $ac_c" 1>&6
986 else
987   if test -n "$AR"; then
988   ac_cv_prog_AR="$AR" # Let the user override the test.
989 else
990   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
991   for ac_dir in $PATH; do
992     test -z "$ac_dir" && ac_dir=.
993     if test -f $ac_dir/$ac_word; then
994       ac_cv_prog_AR="${ac_tool_prefix}ar"
995       break
996     fi
997   done
998   IFS="$ac_save_ifs"
999 fi
1000 fi
1001 AR="$ac_cv_prog_AR"
1002 if test -n "$AR"; then
1003   echo "$ac_t""$AR" 1>&6
1004 else
1005   echo "$ac_t""no" 1>&6
1006 fi
1007
1008
1009 if test -z "$ac_cv_prog_AR"; then
1010 if test -n "$ac_tool_prefix"; then
1011   # Extract the first word of "ar", so it can be a program name with args.
1012 set dummy ar; ac_word=$2
1013 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1014 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1015   echo $ac_n "(cached) $ac_c" 1>&6
1016 else
1017   if test -n "$AR"; then
1018   ac_cv_prog_AR="$AR" # Let the user override the test.
1019 else
1020   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1021   for ac_dir in $PATH; do
1022     test -z "$ac_dir" && ac_dir=.
1023     if test -f $ac_dir/$ac_word; then
1024       ac_cv_prog_AR="ar"
1025       break
1026     fi
1027   done
1028   IFS="$ac_save_ifs"
1029   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1030 fi
1031 fi
1032 AR="$ac_cv_prog_AR"
1033 if test -n "$AR"; then
1034   echo "$ac_t""$AR" 1>&6
1035 else
1036   echo "$ac_t""no" 1>&6
1037 fi
1038
1039 else
1040   AR="ar"
1041 fi
1042 fi
1043
1044 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1045 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1046 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1047 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1048   echo $ac_n "(cached) $ac_c" 1>&6
1049 else
1050   if test -n "$RANLIB"; then
1051   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1052 else
1053   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1054   for ac_dir in $PATH; do
1055     test -z "$ac_dir" && ac_dir=.
1056     if test -f $ac_dir/$ac_word; then
1057       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1058       break
1059     fi
1060   done
1061   IFS="$ac_save_ifs"
1062 fi
1063 fi
1064 RANLIB="$ac_cv_prog_RANLIB"
1065 if test -n "$RANLIB"; then
1066   echo "$ac_t""$RANLIB" 1>&6
1067 else
1068   echo "$ac_t""no" 1>&6
1069 fi
1070
1071
1072 if test -z "$ac_cv_prog_RANLIB"; then
1073 if test -n "$ac_tool_prefix"; then
1074   # Extract the first word of "ranlib", so it can be a program name with args.
1075 set dummy ranlib; ac_word=$2
1076 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1077 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1078   echo $ac_n "(cached) $ac_c" 1>&6
1079 else
1080   if test -n "$RANLIB"; then
1081   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1082 else
1083   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1084   for ac_dir in $PATH; do
1085     test -z "$ac_dir" && ac_dir=.
1086     if test -f $ac_dir/$ac_word; then
1087       ac_cv_prog_RANLIB="ranlib"
1088       break
1089     fi
1090   done
1091   IFS="$ac_save_ifs"
1092   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1093 fi
1094 fi
1095 RANLIB="$ac_cv_prog_RANLIB"
1096 if test -n "$RANLIB"; then
1097   echo "$ac_t""$RANLIB" 1>&6
1098 else
1099   echo "$ac_t""no" 1>&6
1100 fi
1101
1102 else
1103   RANLIB=":"
1104 fi
1105 fi
1106
1107 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1108 set dummy ${ac_tool_prefix}strip; ac_word=$2
1109 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1110 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1111   echo $ac_n "(cached) $ac_c" 1>&6
1112 else
1113   if test -n "$STRIP"; then
1114   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1115 else
1116   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1117   for ac_dir in $PATH; do
1118     test -z "$ac_dir" && ac_dir=.
1119     if test -f $ac_dir/$ac_word; then
1120       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1121       break
1122     fi
1123   done
1124   IFS="$ac_save_ifs"
1125 fi
1126 fi
1127 STRIP="$ac_cv_prog_STRIP"
1128 if test -n "$STRIP"; then
1129   echo "$ac_t""$STRIP" 1>&6
1130 else
1131   echo "$ac_t""no" 1>&6
1132 fi
1133
1134
1135 if test -z "$ac_cv_prog_STRIP"; then
1136 if test -n "$ac_tool_prefix"; then
1137   # Extract the first word of "strip", so it can be a program name with args.
1138 set dummy strip; ac_word=$2
1139 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1140 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1141   echo $ac_n "(cached) $ac_c" 1>&6
1142 else
1143   if test -n "$STRIP"; then
1144   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1145 else
1146   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1147   for ac_dir in $PATH; do
1148     test -z "$ac_dir" && ac_dir=.
1149     if test -f $ac_dir/$ac_word; then
1150       ac_cv_prog_STRIP="strip"
1151       break
1152     fi
1153   done
1154   IFS="$ac_save_ifs"
1155   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1156 fi
1157 fi
1158 STRIP="$ac_cv_prog_STRIP"
1159 if test -n "$STRIP"; then
1160   echo "$ac_t""$STRIP" 1>&6
1161 else
1162   echo "$ac_t""no" 1>&6
1163 fi
1164
1165 else
1166   STRIP=":"
1167 fi
1168 fi
1169
1170 # Extract the first word of "gcc", so it can be a program name with args.
1171 set dummy gcc; ac_word=$2
1172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1173 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1174   echo $ac_n "(cached) $ac_c" 1>&6
1175 else
1176   if test -n "$CC"; then
1177   ac_cv_prog_CC="$CC" # Let the user override the test.
1178 else
1179   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1180   for ac_dir in $PATH; do
1181     test -z "$ac_dir" && ac_dir=.
1182     if test -f $ac_dir/$ac_word; then
1183       ac_cv_prog_CC="gcc"
1184       break
1185     fi
1186   done
1187   IFS="$ac_save_ifs"
1188   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
1189 fi
1190 fi
1191 CC="$ac_cv_prog_CC"
1192 if test -n "$CC"; then
1193   echo "$ac_t""$CC" 1>&6
1194 else
1195   echo "$ac_t""no" 1>&6
1196 fi
1197
1198
1199 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1200 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   cat > conftest.c <<EOF
1204 #ifdef __GNUC__
1205   yes;
1206 #endif
1207 EOF
1208 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
1209   ac_cv_prog_gcc=yes
1210 else
1211   ac_cv_prog_gcc=no
1212 fi
1213 fi
1214 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1215 if test $ac_cv_prog_gcc = yes; then
1216   GCC=yes
1217   if test "${CFLAGS+set}" != set; then
1218     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1219 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
1220   echo $ac_n "(cached) $ac_c" 1>&6
1221 else
1222   echo 'void f(){}' > conftest.c
1223 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1224   ac_cv_prog_gcc_g=yes
1225 else
1226   ac_cv_prog_gcc_g=no
1227 fi
1228 rm -f conftest*
1229
1230 fi
1231     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
1232     if test $ac_cv_prog_gcc_g = yes; then
1233       CFLAGS="-g -O"
1234     else
1235       CFLAGS="-O"
1236     fi
1237   fi
1238 else
1239   GCC=
1240   test "${CFLAGS+set}" = set || CFLAGS="-g"
1241 fi
1242
1243 # Find a good install program.  We prefer a C program (faster),
1244 # so one script is as good as another.  But avoid the broken or
1245 # incompatible versions:
1246 # SysV /etc/install, /usr/sbin/install
1247 # SunOS /usr/etc/install
1248 # IRIX /sbin/install
1249 # AIX /bin/install
1250 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1251 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1252 # ./install, which can be erroneously created by make from ./install.sh.
1253 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1254 if test -z "$INSTALL"; then
1255 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1256   echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1259   for ac_dir in $PATH; do
1260     # Account for people who put trailing slashes in PATH elements.
1261     case "$ac_dir/" in
1262     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1263     *)
1264       # OSF1 and SCO ODT 3.0 have their own names for install.
1265       for ac_prog in ginstall installbsd scoinst install; do
1266         if test -f $ac_dir/$ac_prog; then
1267           if test $ac_prog = install &&
1268             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1269             # AIX install.  It has an incompatible calling convention.
1270             # OSF/1 installbsd also uses dspmsg, but is usable.
1271             :
1272           else
1273             ac_cv_path_install="$ac_dir/$ac_prog -c"
1274             break 2
1275           fi
1276         fi
1277       done
1278       ;;
1279     esac
1280   done
1281   IFS="$ac_save_ifs"
1282   # As a last resort, use the slow shell script.
1283   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
1284 fi
1285   INSTALL="$ac_cv_path_install"
1286 fi
1287 echo "$ac_t""$INSTALL" 1>&6
1288
1289 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1290 # It thinks the first close brace ends the variable substitution.
1291 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1292
1293 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1294
1295 # If we cannot run a trivial program, we must be cross compiling.
1296 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1297 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1298   echo $ac_n "(cached) $ac_c" 1>&6
1299 else
1300   if test "$cross_compiling" = yes; then
1301   ac_cv_c_cross=yes
1302 else
1303 cat > conftest.$ac_ext <<EOF
1304 #line 1305 "configure"
1305 #include "confdefs.h"
1306 main(){return(0);}
1307 EOF
1308 eval $ac_link
1309 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1310   ac_cv_c_cross=no
1311 else
1312   ac_cv_c_cross=yes
1313 fi
1314 fi
1315 rm -fr conftest*
1316 fi
1317 cross_compiling=$ac_cv_c_cross
1318 echo "$ac_t""$ac_cv_c_cross" 1>&6
1319
1320 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1321 # On Suns, sometimes $CPP names a directory.
1322 if test -n "$CPP" && test -d "$CPP"; then
1323   CPP=
1324 fi
1325 if test -z "$CPP"; then
1326 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1327   echo $ac_n "(cached) $ac_c" 1>&6
1328 else
1329     # This must be in double quotes, not single quotes, because CPP may get
1330   # substituted into the Makefile and "${CC-cc}" will confuse make.
1331   CPP="${CC-cc} -E"
1332   # On the NeXT, cc -E runs the code through the compiler's parser,
1333   # not just through cpp.
1334   cat > conftest.$ac_ext <<EOF
1335 #line 1336 "configure"
1336 #include "confdefs.h"
1337 #include <assert.h>
1338 Syntax Error
1339 EOF
1340 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1341 ac_err=`grep -v '^ *+' conftest.out`
1342 if test -z "$ac_err"; then
1343   :
1344 else
1345   echo "$ac_err" >&5
1346   rm -rf conftest*
1347   CPP="${CC-cc} -E -traditional-cpp"
1348   cat > conftest.$ac_ext <<EOF
1349 #line 1350 "configure"
1350 #include "confdefs.h"
1351 #include <assert.h>
1352 Syntax Error
1353 EOF
1354 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1355 ac_err=`grep -v '^ *+' conftest.out`
1356 if test -z "$ac_err"; then
1357   :
1358 else
1359   echo "$ac_err" >&5
1360   rm -rf conftest*
1361   CPP=/lib/cpp
1362 fi
1363 rm -f conftest*
1364 fi
1365 rm -f conftest*
1366   ac_cv_prog_CPP="$CPP"
1367 fi
1368   CPP="$ac_cv_prog_CPP"
1369 else
1370   ac_cv_prog_CPP="$CPP"
1371 fi
1372 echo "$ac_t""$CPP" 1>&6
1373
1374 for ac_hdr in stdlib.h unistd.h stdarg.h errno.h mntent.h dirent.h getopt.h linux/fd.h linux/major.h sys/disklabel.h
1375 do
1376 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1377 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1378 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1379   echo $ac_n "(cached) $ac_c" 1>&6
1380 else
1381   cat > conftest.$ac_ext <<EOF
1382 #line 1383 "configure"
1383 #include "confdefs.h"
1384 #include <$ac_hdr>
1385 EOF
1386 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1387 ac_err=`grep -v '^ *+' conftest.out`
1388 if test -z "$ac_err"; then
1389   rm -rf conftest*
1390   eval "ac_cv_header_$ac_safe=yes"
1391 else
1392   echo "$ac_err" >&5
1393   rm -rf conftest*
1394   eval "ac_cv_header_$ac_safe=no"
1395 fi
1396 rm -f conftest*
1397 fi
1398 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1399   echo "$ac_t""yes" 1>&6
1400     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1401   cat >> confdefs.h <<EOF
1402 #define $ac_tr_hdr 1
1403 EOF
1404  
1405 else
1406   echo "$ac_t""no" 1>&6
1407 fi
1408 done
1409
1410 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1411 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1412   echo $ac_n "(cached) $ac_c" 1>&6
1413 else
1414   cat > conftest.$ac_ext <<EOF
1415 #line 1416 "configure"
1416 #include "confdefs.h"
1417 /* System header to define __stub macros and hopefully few prototypes,
1418     which can conflict with char vprintf(); below.  */
1419 #include <assert.h>
1420 /* Override any gcc2 internal prototype to avoid an error.  */
1421 char vprintf(); 
1422
1423 int main() { return 0; }
1424 int t() {
1425
1426 /* The GNU C library defines this for functions which it implements
1427     to always fail with ENOSYS.  Some functions are actually named
1428     something starting with __ and the normal name is an alias.  */
1429 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1430 choke me
1431 #else
1432 vprintf();
1433 #endif
1434
1435 ; return 0; }
1436 EOF
1437 if eval $ac_link; then
1438   rm -rf conftest*
1439   eval "ac_cv_func_vprintf=yes"
1440 else
1441   rm -rf conftest*
1442   eval "ac_cv_func_vprintf=no"
1443 fi
1444 rm -f conftest*
1445
1446 fi
1447 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1448   echo "$ac_t""yes" 1>&6
1449   cat >> confdefs.h <<\EOF
1450 #define HAVE_VPRINTF 1
1451 EOF
1452
1453 else
1454   echo "$ac_t""no" 1>&6
1455 fi
1456
1457 if test "$ac_cv_func_vprintf" != yes; then
1458 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1459 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1460   echo $ac_n "(cached) $ac_c" 1>&6
1461 else
1462   cat > conftest.$ac_ext <<EOF
1463 #line 1464 "configure"
1464 #include "confdefs.h"
1465 /* System header to define __stub macros and hopefully few prototypes,
1466     which can conflict with char _doprnt(); below.  */
1467 #include <assert.h>
1468 /* Override any gcc2 internal prototype to avoid an error.  */
1469 char _doprnt(); 
1470
1471 int main() { return 0; }
1472 int t() {
1473
1474 /* The GNU C library defines this for functions which it implements
1475     to always fail with ENOSYS.  Some functions are actually named
1476     something starting with __ and the normal name is an alias.  */
1477 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1478 choke me
1479 #else
1480 _doprnt();
1481 #endif
1482
1483 ; return 0; }
1484 EOF
1485 if eval $ac_link; then
1486   rm -rf conftest*
1487   eval "ac_cv_func__doprnt=yes"
1488 else
1489   rm -rf conftest*
1490   eval "ac_cv_func__doprnt=no"
1491 fi
1492 rm -f conftest*
1493
1494 fi
1495 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1496   echo "$ac_t""yes" 1>&6
1497   cat >> confdefs.h <<\EOF
1498 #define HAVE_DOPRNT 1
1499 EOF
1500
1501 else
1502   echo "$ac_t""no" 1>&6
1503 fi
1504
1505 fi
1506
1507 echo $ac_n "checking whether struct dirent has a d_namlen field""... $ac_c" 1>&6
1508 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_d_namlen'+set}'`\" = set"; then
1509   echo $ac_n "(cached) $ac_c" 1>&6
1510 else
1511   cat > conftest.$ac_ext <<EOF
1512 #line 1513 "configure"
1513 #include "confdefs.h"
1514 #include <sys/types.h>
1515 #include <dirent.h>
1516 int main() { return 0; }
1517 int t() {
1518 struct dirent de; de.d_namlen = 0;
1519 ; return 0; }
1520 EOF
1521 if eval $ac_compile; then
1522   rm -rf conftest*
1523   e2fsprogs_cv_struct_d_namlen=yes
1524 else
1525   rm -rf conftest*
1526   e2fsprogs_cv_struct_d_namlen=no
1527 fi
1528 rm -f conftest*
1529
1530 fi
1531
1532 echo "$ac_t""$e2fsprogs_cv_struct_d_namlen" 1>&6
1533 if test "$e2fsprogs_cv_struct_d_namlen" = yes; then
1534   cat >> confdefs.h <<\EOF
1535 #define HAVE_DIRENT_NAMLEN 1
1536 EOF
1537
1538 fi
1539 if test "$cross_compiling" = yes -a "$ac_cv_sizeof_long" = ""; then
1540   # if cross-compiling, with no cached values, just assume something common. 
1541   ac_cv_sizeof_short=2
1542   ac_cv_sizeof_int=4
1543   ac_cv_sizeof_long=4
1544   echo "configure: warning: Cross-compiling, so cannot check type sizes; assuming short=2, int=4, long=4" 1>&2
1545 fi
1546 echo $ac_n "checking size of short""... $ac_c" 1>&6
1547 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1548   echo $ac_n "(cached) $ac_c" 1>&6
1549 else
1550   if test "$cross_compiling" = yes; then
1551     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1552 else
1553 cat > conftest.$ac_ext <<EOF
1554 #line 1555 "configure"
1555 #include "confdefs.h"
1556 #include <stdio.h>
1557 main()
1558 {
1559   FILE *f=fopen("conftestval", "w");
1560   if (!f) exit(1);
1561   fprintf(f, "%d\n", sizeof(short));
1562   exit(0);
1563 }
1564 EOF
1565 eval $ac_link
1566 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1567   ac_cv_sizeof_short=`cat conftestval`
1568 else
1569   ac_cv_sizeof_short=0
1570 fi
1571 fi
1572 rm -fr conftest*
1573 fi
1574 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1575 cat >> confdefs.h <<EOF
1576 #define SIZEOF_SHORT $ac_cv_sizeof_short
1577 EOF
1578
1579
1580 echo $ac_n "checking size of int""... $ac_c" 1>&6
1581 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1582   echo $ac_n "(cached) $ac_c" 1>&6
1583 else
1584   if test "$cross_compiling" = yes; then
1585     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1586 else
1587 cat > conftest.$ac_ext <<EOF
1588 #line 1589 "configure"
1589 #include "confdefs.h"
1590 #include <stdio.h>
1591 main()
1592 {
1593   FILE *f=fopen("conftestval", "w");
1594   if (!f) exit(1);
1595   fprintf(f, "%d\n", sizeof(int));
1596   exit(0);
1597 }
1598 EOF
1599 eval $ac_link
1600 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1601   ac_cv_sizeof_int=`cat conftestval`
1602 else
1603   ac_cv_sizeof_int=0
1604 fi
1605 fi
1606 rm -fr conftest*
1607 fi
1608 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1609 cat >> confdefs.h <<EOF
1610 #define SIZEOF_INT $ac_cv_sizeof_int
1611 EOF
1612
1613
1614 echo $ac_n "checking size of long""... $ac_c" 1>&6
1615 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1616   echo $ac_n "(cached) $ac_c" 1>&6
1617 else
1618   if test "$cross_compiling" = yes; then
1619     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1620 else
1621 cat > conftest.$ac_ext <<EOF
1622 #line 1623 "configure"
1623 #include "confdefs.h"
1624 #include <stdio.h>
1625 main()
1626 {
1627   FILE *f=fopen("conftestval", "w");
1628   if (!f) exit(1);
1629   fprintf(f, "%d\n", sizeof(long));
1630   exit(0);
1631 }
1632 EOF
1633 eval $ac_link
1634 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1635   ac_cv_sizeof_long=`cat conftestval`
1636 else
1637   ac_cv_sizeof_long=0
1638 fi
1639 fi
1640 rm -fr conftest*
1641 fi
1642 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1643 cat >> confdefs.h <<EOF
1644 #define SIZEOF_LONG $ac_cv_sizeof_long
1645 EOF
1646
1647
1648 SIZEOF_SHORT=$ac_cv_sizeof_short
1649 SIZEOF_INT=$ac_cv_sizeof_int
1650 SIZEOF_LONG=$ac_cv_sizeof_long
1651
1652
1653
1654 echo $ac_n "checking whether struct stat has a st_flags field""... $ac_c" 1>&6
1655 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then
1656   echo $ac_n "(cached) $ac_c" 1>&6
1657 else
1658   cat > conftest.$ac_ext <<EOF
1659 #line 1660 "configure"
1660 #include "confdefs.h"
1661 #include <sys/stat.h>
1662 int main() { return 0; }
1663 int t() {
1664 struct stat stat; stat.st_flags = 0;
1665 ; return 0; }
1666 EOF
1667 if eval $ac_compile; then
1668   rm -rf conftest*
1669   e2fsprogs_cv_struct_st_flags=yes
1670 else
1671   rm -rf conftest*
1672   e2fsprogs_cv_struct_st_flags=no
1673 fi
1674 rm -f conftest*
1675
1676 fi
1677
1678 echo "$ac_t""$e2fsprogs_cv_struct_st_flags" 1>&6
1679 if test "$e2fsprogs_cv_struct_st_flags" = yes; then
1680   cat >> confdefs.h <<\EOF
1681 #define HAVE_STAT_FLAGS 1
1682 EOF
1683
1684 fi
1685 for ac_func in chflags getrusage llseek strdup getmntinfo
1686 do
1687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1688 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1689   echo $ac_n "(cached) $ac_c" 1>&6
1690 else
1691   cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694 /* System header to define __stub macros and hopefully few prototypes,
1695     which can conflict with char $ac_func(); below.  */
1696 #include <assert.h>
1697 /* Override any gcc2 internal prototype to avoid an error.  */
1698 char $ac_func(); 
1699
1700 int main() { return 0; }
1701 int t() {
1702
1703 /* The GNU C library defines this for functions which it implements
1704     to always fail with ENOSYS.  Some functions are actually named
1705     something starting with __ and the normal name is an alias.  */
1706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1707 choke me
1708 #else
1709 $ac_func();
1710 #endif
1711
1712 ; return 0; }
1713 EOF
1714 if eval $ac_link; then
1715   rm -rf conftest*
1716   eval "ac_cv_func_$ac_func=yes"
1717 else
1718   rm -rf conftest*
1719   eval "ac_cv_func_$ac_func=no"
1720 fi
1721 rm -f conftest*
1722
1723 fi
1724 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1725   echo "$ac_t""yes" 1>&6
1726     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1727   cat >> confdefs.h <<EOF
1728 #define $ac_tr_func 1
1729 EOF
1730  
1731 else
1732   echo "$ac_t""no" 1>&6
1733 fi
1734 done
1735
1736 ac_safe=`echo "linux/fs.h" | tr './\055' '___'`
1737 echo $ac_n "checking for linux/fs.h""... $ac_c" 1>&6
1738 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1739   echo $ac_n "(cached) $ac_c" 1>&6
1740 else
1741   cat > conftest.$ac_ext <<EOF
1742 #line 1743 "configure"
1743 #include "confdefs.h"
1744 #include <linux/fs.h>
1745 EOF
1746 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1747 ac_err=`grep -v '^ *+' conftest.out`
1748 if test -z "$ac_err"; then
1749   rm -rf conftest*
1750   eval "ac_cv_header_$ac_safe=yes"
1751 else
1752   echo "$ac_err" >&5
1753   rm -rf conftest*
1754   eval "ac_cv_header_$ac_safe=no"
1755 fi
1756 rm -f conftest*
1757 fi
1758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1759   echo "$ac_t""yes" 1>&6
1760   linux_headers=yes
1761 else
1762   echo "$ac_t""no" 1>&6
1763 linux_headers=no
1764 fi
1765
1766
1767 if test "$linux_headers" = yes; then
1768   cat >> confdefs.h <<\EOF
1769 #define HAVE_LINUX_FS_H 1
1770 EOF
1771
1772   # These are some programs that depend on having linux headers around, and
1773   # won't work otherwise.  So we only compile them if we can.
1774   EXTRA_PROGS="$EXTRA_PROGS flushb"
1775 else
1776   LINUX_INCLUDE='-I$(top_srcdir)/include -I$(top_builddir)/include'
1777   # Use this include directory with test compiles in the configure script too.
1778   CPPFLAGS="$CPPFLAGS -I$srcdir/include -I./include"
1779 fi
1780
1781 echo $ac_n "checking for optreset""... $ac_c" 1>&6
1782 if eval "test \"`echo '$''{'ac_cv_have_optreset'+set}'`\" = set"; then
1783   echo $ac_n "(cached) $ac_c" 1>&6
1784 else
1785   cat > conftest.$ac_ext <<EOF
1786 #line 1787 "configure"
1787 #include "confdefs.h"
1788 #include <unistd.h>
1789 EOF
1790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1791   egrep "optreset" >/dev/null 2>&1; then
1792   rm -rf conftest*
1793   ac_cv_have_optreset=yes
1794 else
1795   rm -rf conftest*
1796   ac_cv_have_optreset=no
1797 fi
1798 rm -f conftest*
1799
1800 fi
1801 echo "$ac_t""$ac_cv_have_optreset" 1>&6
1802 if test $ac_cv_have_optreset = yes; then
1803   cat >> confdefs.h <<\EOF
1804 #define HAVE_OPTRESET 1
1805 EOF
1806
1807 fi
1808 echo $ac_n "checking whether struct ext2_inode has frags fields""... $ac_c" 1>&6
1809 if eval "test \"`echo '$''{'e2fsprogs_cv_struct_ext2_inode_frags'+set}'`\" = set"; then
1810   echo $ac_n "(cached) $ac_c" 1>&6
1811 else
1812   cat > conftest.$ac_ext <<EOF
1813 #line 1814 "configure"
1814 #include "confdefs.h"
1815 #include <linux/ext2_fs.h>
1816 int main() { return 0; }
1817 int t() {
1818 struct ext2_inode i; i.i_frag = i.i_fsize = 0;
1819 ; return 0; }
1820 EOF
1821 if eval $ac_compile; then
1822   rm -rf conftest*
1823   e2fsprogs_cv_struct_ext2_inode_frags=yes
1824 else
1825   rm -rf conftest*
1826   e2fsprogs_cv_struct_ext2_inode_frags=no
1827 fi
1828 rm -f conftest*
1829
1830 fi
1831
1832 echo "$ac_t""$e2fsprogs_cv_struct_ext2_inode_frags" 1>&6
1833 if test "$e2fsprogs_cv_struct_ext2_inode_frags" = yes; then
1834   cat >> confdefs.h <<\EOF
1835 #define HAVE_EXT2_FRAGS 1
1836 EOF
1837
1838 fi
1839 echo $ac_n "checking whether the ext2 ioctls compile""... $ac_c" 1>&6
1840 if eval "test \"`echo '$''{'e2fsprogs_cv_ioctl_ext2'+set}'`\" = set"; then
1841   echo $ac_n "(cached) $ac_c" 1>&6
1842 else
1843   cat > conftest.$ac_ext <<EOF
1844 #line 1845 "configure"
1845 #include "confdefs.h"
1846 #include <linux/ext2_fs.h>
1847 #include <sys/ioctl.h>
1848 int main() { return 0; }
1849 int t() {
1850 ioctl (0, EXT2_IOC_SETVERSION, 0);
1851 ; return 0; }
1852 EOF
1853 if eval $ac_compile; then
1854   rm -rf conftest*
1855   e2fsprogs_cv_ioctl_ext2=yes
1856 else
1857   rm -rf conftest*
1858   e2fsprogs_cv_ioctl_ext2=no
1859 fi
1860 rm -f conftest*
1861
1862 fi
1863
1864 echo "$ac_t""$e2fsprogs_cv_ioctl_ext2" 1>&6
1865 if test "$e2fsprogs_cv_ioctl_ext2" = yes; then
1866   cat >> confdefs.h <<\EOF
1867 #define HAVE_EXT2_IOCTLS 1
1868 EOF
1869
1870 fi
1871
1872 case "$host_os" in
1873 linux*)
1874         if test "$prefix" = NONE ; then
1875                 prefix='/';
1876                 echo "On Linux systems, prefix defaults to '/'"
1877         fi
1878 ;;
1879 esac
1880
1881 LDFLAG_STATIC=
1882 case "$host_os" in
1883 linux*)
1884         LDFLAG_STATIC=-static
1885         echo "On Linux systems, assume -static works"
1886 ;;
1887 esac
1888
1889 if test "$prefix" = / ; then
1890         usr_prefix=/usr
1891 else
1892         usr_prefix="\${prefix}"
1893 fi
1894
1895 SS_DIR=`cd ${srcdir}/lib/ss; pwd`
1896 ET_DIR=`cd ${srcdir}/lib/et; pwd`
1897
1898
1899 if test "$cross_compiling" = yes ; then
1900   DO_TEST_SUITE=
1901 else
1902   DO_TEST_SUITE=check
1903 fi
1904
1905 DO_SUBSTITUTE_SCRIPT=$srcdir/lib/do_substitute
1906
1907 test -d lib || mkdir lib
1908 test -d include || mkdir include
1909 test -d include/linux || mkdir include/linux
1910 trap '' 1 2 15
1911 cat > confcache <<\EOF
1912 # This file is a shell script that caches the results of configure
1913 # tests run on this system so they can be shared between configure
1914 # scripts and configure runs.  It is not useful on other systems.
1915 # If it contains results you don't want to keep, you may remove or edit it.
1916 #
1917 # By default, configure uses ./config.cache as the cache file,
1918 # creating it if it does not exist already.  You can give configure
1919 # the --cache-file=FILE option to use a different cache file; that is
1920 # what configure does when it calls configure scripts in
1921 # subdirectories, so they share the cache.
1922 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1923 # config.status only pays attention to the cache file if you give it the
1924 # --recheck option to rerun configure.
1925 #
1926 EOF
1927 # Ultrix sh set writes to stderr and can't be redirected directly,
1928 # and sets the high bit in the cache file unless we assign to the vars.
1929 (set) 2>&1 |
1930   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1931   >> confcache
1932 if cmp -s $cache_file confcache; then
1933   :
1934 else
1935   if test -w $cache_file; then
1936     echo "updating cache $cache_file"
1937     cat confcache > $cache_file
1938   else
1939     echo "not updating unwritable cache $cache_file"
1940   fi
1941 fi
1942 rm -f confcache
1943
1944 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1945
1946 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1947 # Let make expand exec_prefix.
1948 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1949
1950 # Any assignment to VPATH causes Sun make to only execute
1951 # the first set of double-colon rules, so remove it if not needed.
1952 # If there is a colon in the path, we need to keep it.
1953 if test "x$srcdir" = x.; then
1954   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1955 fi
1956
1957 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1958
1959 # Transform confdefs.h into DEFS.
1960 # Protect against shell expansion while executing Makefile rules.
1961 # Protect against Makefile macro expansion.
1962 cat > conftest.defs <<\EOF
1963 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
1964 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1965 s%\[%\\&%g
1966 s%\]%\\&%g
1967 s%\$%$$%g
1968 EOF
1969 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1970 rm -f conftest.defs
1971
1972
1973 # Without the "./", some shells look in PATH for config.status.
1974 : ${CONFIG_STATUS=./config.status}
1975
1976 echo creating $CONFIG_STATUS
1977 rm -f $CONFIG_STATUS
1978 cat > $CONFIG_STATUS <<EOF
1979 #! /bin/sh
1980 # Generated automatically by configure.
1981 # Run this file to recreate the current configuration.
1982 # This directory was configured as follows,
1983 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1984 #
1985 # $0 $ac_configure_args
1986 #
1987 # Compiler output produced by configure, useful for debugging
1988 # configure, is in ./config.log if it exists.
1989
1990 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1991 for ac_option
1992 do
1993   case "\$ac_option" in
1994   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1995     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1996     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1997   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1998     echo "$CONFIG_STATUS generated by autoconf version 2.4"
1999     exit 0 ;;
2000   -help | --help | --hel | --he | --h)
2001     echo "\$ac_cs_usage"; exit 0 ;;
2002   *) echo "\$ac_cs_usage"; exit 1 ;;
2003   esac
2004 done
2005
2006 ac_given_srcdir=$srcdir
2007 ac_given_INSTALL="$INSTALL"
2008
2009 trap 'rm -fr `echo "MCONFIG lib/substitute_sh Makefile lib/et/Makefile 
2010         lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile misc/Makefile 
2011         e2fsck/Makefile debugfs/Makefile tests/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2012
2013 # Protect against being on the right side of a sed subst in config.status. 
2014 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
2015  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2016 $ac_vpsub
2017 $extrasub
2018 s%@CFLAGS@%$CFLAGS%g
2019 s%@CPPFLAGS@%$CPPFLAGS%g
2020 s%@CXXFLAGS@%$CXXFLAGS%g
2021 s%@DEFS@%$DEFS%g
2022 s%@LDFLAGS@%$LDFLAGS%g
2023 s%@LIBS@%$LIBS%g
2024 s%@exec_prefix@%$exec_prefix%g
2025 s%@prefix@%$prefix%g
2026 s%@program_transform_name@%$program_transform_name%g
2027 /@MCONFIG@/r $MCONFIG
2028 s%@MCONFIG@%%g
2029 s%@E2FSPROGS_YEAR@%$E2FSPROGS_YEAR%g
2030 s%@E2FSPROGS_MONTH@%$E2FSPROGS_MONTH%g
2031 s%@E2FSPROGS_VERSION@%$E2FSPROGS_VERSION%g
2032 s%@CC@%$CC%g
2033 s%@LD@%$LD%g
2034 s%@CCOPTS@%$CCOPTS%g
2035 s%@DLL_CMT@%$DLL_CMT%g
2036 /@MAKEFILE_DLL@/r $MAKEFILE_DLL
2037 s%@MAKEFILE_DLL@%%g
2038 s%@ELF_CMT@%$ELF_CMT%g
2039 /@MAKEFILE_ELF@/r $MAKEFILE_ELF
2040 s%@MAKEFILE_ELF@%%g
2041 s%@BSDLIB_CMT@%$BSDLIB_CMT%g
2042 /@MAKEFILE_BSDLIB@/r $MAKEFILE_BSDLIB
2043 s%@MAKEFILE_BSDLIB@%%g
2044 s%@PROFILE_CMT@%$PROFILE_CMT%g
2045 /@MAKEFILE_PROFILE@/r $MAKEFILE_PROFILE
2046 s%@MAKEFILE_PROFILE@%%g
2047 s%@CHECKER_CMT@%$CHECKER_CMT%g
2048 /@MAKEFILE_CHECKER@/r $MAKEFILE_CHECKER
2049 s%@MAKEFILE_CHECKER@%%g
2050 s%@LIB_EXT@%$LIB_EXT%g
2051 s%@STATIC_LIB_EXT@%$STATIC_LIB_EXT%g
2052 s%@PROFILED_LIB_EXT@%$PROFILED_LIB_EXT%g
2053 s%@W@%$W%g
2054 s%@E2FSCK_TYPE@%$E2FSCK_TYPE%g
2055 /@MAKEFILE_LIBRARY@/r $MAKEFILE_LIBRARY
2056 s%@MAKEFILE_LIBRARY@%%g
2057 s%@BINARY_TYPE@%$BINARY_TYPE%g
2058 s%@SET_MAKE@%$SET_MAKE%g
2059 s%@LN@%$LN%g
2060 s%@MV@%$MV%g
2061 s%@CP@%$CP%g
2062 s%@RM@%$RM%g
2063 s%@CHMOD@%$CHMOD%g
2064 s%@AWK@%$AWK%g
2065 s%@SED@%$SED%g
2066 s%@host@%$host%g
2067 s%@host_alias@%$host_alias%g
2068 s%@host_cpu@%$host_cpu%g
2069 s%@host_vendor@%$host_vendor%g
2070 s%@host_os@%$host_os%g
2071 s%@build@%$build%g
2072 s%@build_alias@%$build_alias%g
2073 s%@build_cpu@%$build_cpu%g
2074 s%@build_vendor@%$build_vendor%g
2075 s%@build_os@%$build_os%g
2076 s%@AR@%$AR%g
2077 s%@RANLIB@%$RANLIB%g
2078 s%@STRIP@%$STRIP%g
2079 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2080 s%@INSTALL_DATA@%$INSTALL_DATA%g
2081 s%@CPP@%$CPP%g
2082 s%@SIZEOF_SHORT@%$SIZEOF_SHORT%g
2083 s%@SIZEOF_INT@%$SIZEOF_INT%g
2084 s%@SIZEOF_LONG@%$SIZEOF_LONG%g
2085 s%@EXTRA_PROGS@%$EXTRA_PROGS%g
2086 s%@LINUX_INCLUDE@%$LINUX_INCLUDE%g
2087 s%@LDFLAG_STATIC@%$LDFLAG_STATIC%g
2088 s%@usr_prefix@%$usr_prefix%g
2089 s%@SS_DIR@%$SS_DIR%g
2090 s%@ET_DIR@%$ET_DIR%g
2091 s%@DO_TEST_SUITE@%$DO_TEST_SUITE%g
2092 /@DO_SUBSTITUTE_SCRIPT@/r $DO_SUBSTITUTE_SCRIPT
2093 s%@DO_SUBSTITUTE_SCRIPT@%%g
2094
2095 CEOF
2096 EOF
2097 cat >> $CONFIG_STATUS <<EOF
2098
2099 CONFIG_FILES=\${CONFIG_FILES-"MCONFIG lib/substitute_sh Makefile lib/et/Makefile 
2100         lib/ss/Makefile lib/ext2fs/Makefile lib/e2p/Makefile misc/Makefile 
2101         e2fsck/Makefile debugfs/Makefile tests/Makefile"}
2102 EOF
2103 cat >> $CONFIG_STATUS <<\EOF
2104 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2105   # Support "outfile[:infile]", defaulting infile="outfile.in".
2106   case "$ac_file" in
2107   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2108        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2109   *) ac_file_in="${ac_file}.in" ;;
2110   esac
2111
2112   # Adjust relative srcdir, etc. for subdirectories.
2113
2114   # Remove last slash and all that follows it.  Not all systems have dirname.
2115   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2116   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2117     # The file is in a subdirectory.
2118     test ! -d "$ac_dir" && mkdir "$ac_dir"
2119     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2120     # A "../" for each directory in $ac_dir_suffix.
2121     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2122   else
2123     ac_dir_suffix= ac_dots=
2124   fi
2125
2126   case "$ac_given_srcdir" in
2127   .)  srcdir=.
2128       if test -z "$ac_dots"; then top_srcdir=.
2129       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2130   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2131   *) # Relative path.
2132     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2133     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2134   esac
2135
2136   case "$ac_given_INSTALL" in
2137   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2138   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2139   esac
2140   echo creating "$ac_file"
2141   rm -f "$ac_file"
2142   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2143   case "$ac_file" in
2144   *Makefile*) ac_comsub="1i\\
2145 # $configure_input" ;;
2146   *) ac_comsub= ;;
2147   esac
2148   sed -e "$ac_comsub
2149 s%@configure_input@%$configure_input%g
2150 s%@srcdir@%$srcdir%g
2151 s%@top_srcdir@%$top_srcdir%g
2152 s%@INSTALL@%$INSTALL%g
2153 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2154 fi; done
2155 rm -f conftest.subs
2156
2157
2158
2159 exit 0
2160 EOF
2161 chmod +x $CONFIG_STATUS
2162 rm -fr confdefs* $ac_clean_files
2163 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2164