blob: 279bb441fcbf5a99d64e269be845794329d156d6 [file] [log] [blame]
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001#! /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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
Theodore Ts'o74becf31997-04-26 14:37:06 +000015 --with-cc=COMPILER select compiler to use"
16ac_help="$ac_help
17 --with-linker=LINKER select linker to use"
18ac_help="$ac_help
19 --with-ccopts=CCOPTS select compiler command line options"
20ac_help="$ac_help
21 --with-ldopts=LDOPTS select linker command line options"
22ac_help="$ac_help
Theodore Ts'oa4d09611997-04-29 14:28:00 +000023 --enable-dll-shlibs select DLL libraries"
Theodore Ts'o50e1e101997-04-26 13:58:21 +000024ac_help="$ac_help
Theodore Ts'oa4d09611997-04-29 14:28:00 +000025 --enable-elf-shlibs select ELF shared libraries"
Theodore Ts'o50e1e101997-04-26 13:58:21 +000026ac_help="$ac_help
Theodore Ts'oa4d09611997-04-29 14:28:00 +000027 --enable-bsd-shlibs select BSD shared libraries"
Theodore Ts'o50e1e101997-04-26 13:58:21 +000028ac_help="$ac_help
Theodore Ts'oa4d09611997-04-29 14:28:00 +000029 --enable-profile build profiling libraries"
Theodore Ts'o50e1e101997-04-26 13:58:21 +000030ac_help="$ac_help
Theodore Ts'oa4d09611997-04-29 14:28:00 +000031 --enable-checker build checker libraries"
Theodore Ts'o50e1e101997-04-26 13:58:21 +000032ac_help="$ac_help
Theodore Ts'oa4d09611997-04-29 14:28:00 +000033 --enable-gcc-wall enable GCC anal warnings"
34ac_help="$ac_help
35 --enable-dynamic-e2fsck build e2fsck dynamically"
Theodore Ts'o50e1e101997-04-26 13:58:21 +000036
37# Initialize some variables set by options.
38# The variables have the same names as the options, with
39# dashes changed to underlines.
40build=NONE
41cache_file=./config.cache
42exec_prefix=NONE
43host=NONE
44no_create=
45nonopt=NONE
46no_recursion=
47prefix=NONE
48program_prefix=NONE
49program_suffix=NONE
50program_transform_name=s,x,x,
51silent=
52site=
53srcdir=
54target=NONE
55verbose=
56x_includes=NONE
57x_libraries=NONE
58
59# Initialize some other variables.
60subdirs=
61
62ac_prev=
63for ac_option
64do
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
133Usage: configure [options] [host]
134Options: [defaults in brackets after descriptions]
135Configuration:
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
141Directory 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
150Host 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]
154Features 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
162EOF
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
298done
299
300if test -n "$ac_prev"; then
301 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
302fi
303
304trap '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
314if test "$silent" = yes; then
315 exec 6>/dev/null
316else
317 exec 6>&1
318fi
319exec 5>./config.log
320
321echo "\
322This file contains any messages produced by compilers while
323running 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.
328ac_configure_args=
329for ac_arg
330do
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
340done
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).
346if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
347if test "${LANG+set}" = set; then LANG=C; export LANG; fi
348
349# confdefs.h avoids OS command line length limits that DEFS can exceed.
350rm -rf conftest* confdefs.h
351# AIX cpp loses on an empty file, so make sure it contains at least a newline.
352echo > 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.
356ac_unique_file=version.h
357
358# Find the source files, if location was not specified.
359if 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
369else
370 ac_srcdir_defaulted=no
371fi
372if 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
378fi
379srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
380
381# Prefer explicitly selected file to automatically selected ones.
382if 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
388fi
389for 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
394done
395
396if test -r "$cache_file"; then
397 echo "loading cache $cache_file"
398 . $cache_file
399else
400 echo "creating cache $cache_file"
401 > $cache_file
402fi
403
404ac_ext=c
405# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
406ac_cpp='$CPP $CPPFLAGS'
407ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
408ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
409
410if (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
418else
419 ac_n= ac_c='\c' ac_t=
420fi
421
422
423MCONFIG=./MCONFIG
424
Theodore Ts'o74becf31997-04-26 14:37:06 +0000425BINARY_TYPE=bin
426E2FSPROGS_VERSION=`grep E2FSPROGS_VERSION ${srcdir}/version.h \
427 | awk '{print $3}' | tr \" " " | awk '{print $1}'`
428DATE=`grep E2FSPROGS_DATE ${srcdir}/version.h | awk '{print $3}' \
429 | tr \" " "`
430MONTH=`echo $DATE | awk -F- '{print $2}'`
431YEAR=`echo $DATE | awk -F- '{print $3}'`
432
433if expr $YEAR ">" 90 >/dev/null ; then
434 E2FSPROGS_YEAR=19$YEAR
435else
436 E2FSPROGS_YEAR=20$YEAR
437fi
438
439case $MONTH in
440Jan) E2FSPROGS_MONTH="January" ;;
441Feb) E2FSPROGS_MONTH="February" ;;
442Mar) E2FSPROGS_MONTH="March" ;;
443Apr) E2FSPROGS_MONTH="April" ;;
444May) E2FSPROGS_MONTH="May" ;;
445Jun) E2FSPROGS_MONTH="June" ;;
446Jul) E2FSPROGS_MONTH="July" ;;
447Aug) E2FSPROGS_MONTH="August" ;;
448Sep) E2FSPROGS_MONTH="September" ;;
449Oct) E2FSPROGS_MONTH="October" ;;
450Nov) E2FSPROGS_MONTH="November" ;;
451Dec) E2FSPROGS_MONTH="December" ;;
452*) echo "Unknown month $MONTH??" ;;
453esac
454
455unset DATE MONTH YEAR
456echo "Generating configuration file for e2fsprogs version $E2FSPROGS_VERSION"
457echo "Release date is ${E2FSPROGS_MONTH}, ${E2FSPROGS_YEAR}"
458
459
460
461# Check whether --with-cc or --without-cc was given.
462withval="$with_cc"
463if test -n "$withval"; then
464 echo "$ac_t""CC=$withval" 1>&6
465CC=$withval
466else
467 if test -z "$CC" ; then CC=cc; fi
468echo "$ac_t""CC defaults to $CC" 1>&6
469fi
470export CC
471
472# Check whether --with-linker or --without-linker was given.
473withval="$with_linker"
474if test -n "$withval"; then
475 echo "$ac_t""LD=$withval" 1>&6
476LD=$withval
477else
478 if test -z "$LD" ; then LD=$CC; fi
479echo "$ac_t""LD defaults to $LD" 1>&6
480fi
481export LD
482
483# Check whether --with-ccopts or --without-ccopts was given.
484withval="$with_ccopts"
485if test -n "$withval"; then
486 echo "$ac_t""CCOPTS is $withval" 1>&6
487CCOPTS=$withval
488CFLAGS="$CFLAGS $withval"
489else
490 CCOPTS=
491fi
492
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000493LIB_EXT=.a
494STATIC_LIB_EXT=.a
495PROFILE_LIB_EXT=.a
Theodore Ts'o74becf31997-04-26 14:37:06 +0000496# Check whether --with-ldopts or --without-ldopts was given.
497withval="$with_ldopts"
498if test -n "$withval"; then
499 echo "$ac_t""LDFLAGS is $withval" 1>&6
500LDFLAGS=$withval
501else
502 LDFLAGS=
503fi
504
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000505# Check whether --enable-dll-shlibs or --disable-dll-shlibs was given.
506enableval="$enable_dll_shlibs"
507if test -n "$enableval"; then
508 if test "$enableval" = "no"
509then
510 DLL_CMT=#
511 MAKEFILE_DLL=/dev/null
512 echo "Disabling DLL shared libraries"
513else
514 DLL_CMT=
515 MAKEFILE_DLL=$srcdir/lib/Makefile.dll-lib
Theodore Ts'o74becf31997-04-26 14:37:06 +0000516 BINARY_TYPE=dllbin
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000517 LIB_EXT=.sa
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000518 echo "Enabling DLL shared libraries"
519fi
520
521else
522 MAKEFILE_DLL=/dev/null
523DLL_CMT=#
524echo "Disabling DLL shared libraries by default"
525
526fi
527
528
529
530# Check whether --enable-elf-shlibs or --disable-elf-shlibs was given.
531enableval="$enable_elf_shlibs"
532if test -n "$enableval"; then
533 if test "$enableval" = "no"
534then
535 ELF_CMT=#
536 MAKEFILE_ELF=/dev/null
537 echo "Disabling ELF shared libraries"
538else
539 ELF_CMT=
540 MAKEFILE_ELF=$srcdir/lib/Makefile.elf-lib
Theodore Ts'o74becf31997-04-26 14:37:06 +0000541 BINARY_TYPE=elfbin
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000542 LIB_EXT=.so
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000543 echo "Enabling ELF shared libraries"
544fi
545
546else
547 MAKEFILE_ELF=/dev/null
548ELF_CMT=#
549echo "Disabling ELF shared libraries by default"
550
551fi
552
553
554
555# Check whether --enable-bsd-shlibs or --disable-bsd-shlibs was given.
556enableval="$enable_bsd_shlibs"
557if test -n "$enableval"; then
558 if test "$enableval" = "no"
559then
560 BSDLIB_CMT=#
561 MAKEFILE_BSDLIB=/dev/null
562 echo "Disabling BSD shared libraries"
563else
564 BSDLIB_CMT=
565 MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000566 LIB_EXT=.so
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000567 echo "Enabling BSD shared libraries"
568fi
569
570else
571 MAKEFILE_BSDLIB=/dev/null
572BSDLIB_CMT=#
573echo "Disabling BSD shared libraries by default"
574
575fi
576
577
578
579# Check whether --enable-profile or --disable-profile was given.
580enableval="$enable_profile"
581if test -n "$enableval"; then
582 if test "$enableval" = "no"
583then
584 PROFILE_CMT=#
585 MAKEFILE_PROFILE=/dev/null
586 echo "Disabling profiling libraries"
587else
588 PROFILE_CMT=
589 MAKEFILE_PROFILE=$srcdir/lib/Makefile.profile
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000590 PROFILED_LIB_EXT=_p.a
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000591 echo "Building profiling libraries"
592fi
593
594else
595 PROFILE_CMT=#
596MAKEFILE_PROFILE=/dev/null
597echo "Disabling profiling libraries by default"
598
599fi
600
601
602
603# Check whether --enable-checker or --disable-checker was given.
604enableval="$enable_checker"
605if test -n "$enableval"; then
606 if test "$enableval" = "no"
607then
608 CHECKER_CMT=#
609 MAKEFILE_CHECKER=/dev/null
610 echo "Disabling checker libraries"
611else
612 CHECKER_CMT=
613 MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
614 echo "Building checker libraries"
615fi
616
617else
618 CHECKER_CMT=#
619MAKEFILE_CHECKER=/dev/null
620echo "Disabling checker libraries by default"
621
622fi
623
624
625
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000626
627
628
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000629# Check whether --enable-gcc-wall or --disable-gcc-wall was given.
630enableval="$enable_gcc_wall"
631if test -n "$enableval"; then
632 if test "$enableval" = "no"
633then
634 W=#
635 echo "Disabling GCC warnings"
636else
637 W=
638 echo "Enabling GCC warnings"
639fi
640
641else
642 W=#
643echo "Disabling GCC warnings by default"
644
645fi
646
647
Theodore Ts'oa4d09611997-04-29 14:28:00 +0000648# Check whether --enable-dynamic-e2fsck or --disable-dynamic-e2fsck was given.
649enableval="$enable_dynamic_e2fsck"
650if test -n "$enableval"; then
651 if test "$enableval" = "no"
652then
653 E2FSCK_TYPE=static
654 echo "Building e2fsck statically"
655else
656 E2FSCK_TYPE=shared
657 echo "Building e2fsck dynamically"
658fi
659
660else
661 E2FSCK_TYPE=static
662echo "Building e2fsck statically by default"
663
664fi
665
666
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000667MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
668
Theodore Ts'o74becf31997-04-26 14:37:06 +0000669
Theodore Ts'o50e1e101997-04-26 13:58:21 +0000670echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
671set dummy ${MAKE-make}; ac_make=$2
672if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
673 echo $ac_n "(cached) $ac_c" 1>&6
674else
675 cat > conftestmake <<\EOF
676all:
677 @echo 'ac_maketemp="${MAKE}"'
678EOF
679# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
680eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
681if test -n "$ac_maketemp"; then
682 eval ac_cv_prog_make_${ac_make}_set=yes
683else
684 eval ac_cv_prog_make_${ac_make}_set=no
685fi
686rm -f conftestmake
687fi
688if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
689 echo "$ac_t""yes" 1>&6
690 SET_MAKE=
691else
692 echo "$ac_t""no" 1>&6
693 SET_MAKE="MAKE=${MAKE-make}"
694fi
695
696# Extract the first word of "ln", so it can be a program name with args.
697set dummy ln; ac_word=$2
698echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
699if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then
700 echo $ac_n "(cached) $ac_c" 1>&6
701else
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 ;;
718esac
719fi
720LN="$ac_cv_path_LN"
721if test -n "$LN"; then
722 echo "$ac_t""$LN" 1>&6
723else
724 echo "$ac_t""no" 1>&6
725fi
726
727# Extract the first word of "mv", so it can be a program name with args.
728set dummy mv; ac_word=$2
729echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
731 echo $ac_n "(cached) $ac_c" 1>&6
732else
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 ;;
749esac
750fi
751MV="$ac_cv_path_MV"
752if test -n "$MV"; then
753 echo "$ac_t""$MV" 1>&6
754else
755 echo "$ac_t""no" 1>&6
756fi
757
758# Extract the first word of "cp", so it can be a program name with args.
759set dummy cp; ac_word=$2
760echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
761if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
762 echo $ac_n "(cached) $ac_c" 1>&6
763else
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 ;;
780esac
781fi
782CP="$ac_cv_path_CP"
783if test -n "$CP"; then
784 echo "$ac_t""$CP" 1>&6
785else
786 echo "$ac_t""no" 1>&6
787fi
788
789# Extract the first word of "rm", so it can be a program name with args.
790set dummy rm; ac_word=$2
791echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
792if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
793 echo $ac_n "(cached) $ac_c" 1>&6
794else
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 ;;
811esac
812fi
813RM="$ac_cv_path_RM"
814if test -n "$RM"; then
815 echo "$ac_t""$RM" 1>&6
816else
817 echo "$ac_t""no" 1>&6
818fi
819
820# Extract the first word of "chmod", so it can be a program name with args.
821set dummy chmod; ac_word=$2
822echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
823if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then
824 echo $ac_n "(cached) $ac_c" 1>&6
825else
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 ;;
842esac
843fi
844CHMOD="$ac_cv_path_CHMOD"
845if test -n "$CHMOD"; then
846 echo "$ac_t""$CHMOD" 1>&6
847else
848 echo "$ac_t""no" 1>&6
849fi
850
851# Extract the first word of "awk", so it can be a program name with args.
852set dummy awk; ac_word=$2
853echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
854if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
855 echo $ac_n "(cached) $ac_c" 1>&6
856else
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 ;;
873esac
874fi
875AWK="$ac_cv_path_AWK"
876if test -n "$AWK"; then
877 echo "$ac_t""$AWK" 1>&6
878else
879 echo "$ac_t""no" 1>&6
880fi
881
882# Extract the first word of "sed", so it can be a program name with args.
883set dummy sed; ac_word=$2
884echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
885if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
886 echo $ac_n "(cached) $ac_c" 1>&6
887else
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 ;;
904esac
905fi
906SED="$ac_cv_path_SED"
907if test -n "$SED"; then
908 echo "$ac_t""$SED" 1>&6
909else
910 echo "$ac_t""no" 1>&6
911fi
912
913ac_aux_dir=
914for 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
924done
925if 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; }
927fi
928ac_config_guess=$ac_aux_dir/config.guess
929ac_config_sub=$ac_aux_dir/config.sub
930ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
931
932
933# Make sure we can run config.sub.
934if $ac_config_sub sun4 >/dev/null 2>&1; then :
935else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
936fi
937
938echo $ac_n "checking host system type""... $ac_c" 1>&6
939
940host_alias=$host
941case "$host_alias" in
942NONE)
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 ;;
950esac
951
952host=`$ac_config_sub $host_alias`
953host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
954host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
955host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
956echo "$ac_t""$host" 1>&6
957
958echo $ac_n "checking build system type""... $ac_c" 1>&6
959
960build_alias=$build
961case "$build_alias" in
962NONE)
963 case $nonopt in
964 NONE) build_alias=$host_alias ;;
965 *) build_alias=$nonopt ;;
966 esac ;;
967esac
968
969build=`$ac_config_sub $build_alias`
970build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
971build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
972build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
973echo "$ac_t""$build" 1>&6
974
975if test $host != $build; then
976 ac_tool_prefix=${host_alias}-
977else
978 ac_tool_prefix=
979fi
980
981# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
982set dummy ${ac_tool_prefix}ar; ac_word=$2
983echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
984if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
985 echo $ac_n "(cached) $ac_c" 1>&6
986else
987 if test -n "$AR"; then
988 ac_cv_prog_AR="$AR" # Let the user override the test.
989else
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"
999fi
1000fi
1001AR="$ac_cv_prog_AR"
1002if test -n "$AR"; then
1003 echo "$ac_t""$AR" 1>&6
1004else
1005 echo "$ac_t""no" 1>&6
1006fi
1007
1008
1009if test -z "$ac_cv_prog_AR"; then
1010if test -n "$ac_tool_prefix"; then
1011 # Extract the first word of "ar", so it can be a program name with args.
1012set dummy ar; ac_word=$2
1013echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1014if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1015 echo $ac_n "(cached) $ac_c" 1>&6
1016else
1017 if test -n "$AR"; then
1018 ac_cv_prog_AR="$AR" # Let the user override the test.
1019else
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"
1030fi
1031fi
1032AR="$ac_cv_prog_AR"
1033if test -n "$AR"; then
1034 echo "$ac_t""$AR" 1>&6
1035else
1036 echo "$ac_t""no" 1>&6
1037fi
1038
1039else
1040 AR="ar"
1041fi
1042fi
1043
1044# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1045set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1046echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1047if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1048 echo $ac_n "(cached) $ac_c" 1>&6
1049else
1050 if test -n "$RANLIB"; then
1051 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1052else
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"
1062fi
1063fi
1064RANLIB="$ac_cv_prog_RANLIB"
1065if test -n "$RANLIB"; then
1066 echo "$ac_t""$RANLIB" 1>&6
1067else
1068 echo "$ac_t""no" 1>&6
1069fi
1070
1071
1072if test -z "$ac_cv_prog_RANLIB"; then
1073if test -n "$ac_tool_prefix"; then
1074 # Extract the first word of "ranlib", so it can be a program name with args.
1075set dummy ranlib; ac_word=$2
1076echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1077if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1078 echo $ac_n "(cached) $ac_c" 1>&6
1079else
1080 if test -n "$RANLIB"; then
1081 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1082else
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=":"
1093fi
1094fi
1095RANLIB="$ac_cv_prog_RANLIB"
1096if test -n "$RANLIB"; then
1097 echo "$ac_t""$RANLIB" 1>&6
1098else
1099 echo "$ac_t""no" 1>&6
1100fi
1101
1102else
1103 RANLIB=":"
1104fi
1105fi
1106
1107# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1108set dummy ${ac_tool_prefix}strip; ac_word=$2
1109echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1110if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1112else
1113 if test -n "$STRIP"; then
1114 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1115else
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"
1125fi
1126fi
1127STRIP="$ac_cv_prog_STRIP"
1128if test -n "$STRIP"; then
1129 echo "$ac_t""$STRIP" 1>&6
1130else
1131 echo "$ac_t""no" 1>&6
1132fi
1133
1134
1135if test -z "$ac_cv_prog_STRIP"; then
1136if test -n "$ac_tool_prefix"; then
1137 # Extract the first word of "strip", so it can be a program name with args.
1138set dummy strip; ac_word=$2
1139echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1140if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1141 echo $ac_n "(cached) $ac_c" 1>&6
1142else
1143 if test -n "$STRIP"; then
1144 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1145else
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=":"
1156fi
1157fi
1158STRIP="$ac_cv_prog_STRIP"
1159if test -n "$STRIP"; then
1160 echo "$ac_t""$STRIP" 1>&6
1161else
1162 echo "$ac_t""no" 1>&6
1163fi
1164
1165else
1166 STRIP=":"
1167fi
1168fi
1169
1170# Extract the first word of "gcc", so it can be a program name with args.
1171set dummy gcc; ac_word=$2
1172echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1173if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1174 echo $ac_n "(cached) $ac_c" 1>&6
1175else
1176 if test -n "$CC"; then
1177 ac_cv_prog_CC="$CC" # Let the user override the test.
1178else
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"
1189fi
1190fi
1191CC="$ac_cv_prog_CC"
1192if test -n "$CC"; then
1193 echo "$ac_t""$CC" 1>&6
1194else
1195 echo "$ac_t""no" 1>&6
1196fi
1197
1198
1199echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1200if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1201 echo $ac_n "(cached) $ac_c" 1>&6
1202else
1203 cat > conftest.c <<EOF
1204#ifdef __GNUC__
1205 yes;
1206#endif
1207EOF
1208if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
1209 ac_cv_prog_gcc=yes
1210else
1211 ac_cv_prog_gcc=no
1212fi
1213fi
1214echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1215if 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
1219if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
1220 echo $ac_n "(cached) $ac_c" 1>&6
1221else
1222 echo 'void f(){}' > conftest.c
1223if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1224 ac_cv_prog_gcc_g=yes
1225else
1226 ac_cv_prog_gcc_g=no
1227fi
1228rm -f conftest*
1229
1230fi
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
1238else
1239 GCC=
1240 test "${CFLAGS+set}" = set || CFLAGS="-g"
1241fi
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.
1253echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1254if test -z "$INSTALL"; then
1255if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1257else
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"
1284fi
1285 INSTALL="$ac_cv_path_install"
1286fi
1287echo "$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.
1291test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1292
1293test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1294
1295# If we cannot run a trivial program, we must be cross compiling.
1296echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1297if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1298 echo $ac_n "(cached) $ac_c" 1>&6
1299else
1300 if test "$cross_compiling" = yes; then
1301 ac_cv_c_cross=yes
1302else
1303cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001304#line 1305 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001305#include "confdefs.h"
1306main(){return(0);}
1307EOF
1308eval $ac_link
1309if test -s conftest && (./conftest; exit) 2>/dev/null; then
1310 ac_cv_c_cross=no
1311else
1312 ac_cv_c_cross=yes
1313fi
1314fi
1315rm -fr conftest*
1316fi
1317cross_compiling=$ac_cv_c_cross
1318echo "$ac_t""$ac_cv_c_cross" 1>&6
1319
1320echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1321# On Suns, sometimes $CPP names a directory.
1322if test -n "$CPP" && test -d "$CPP"; then
1323 CPP=
1324fi
1325if test -z "$CPP"; then
1326if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1327 echo $ac_n "(cached) $ac_c" 1>&6
1328else
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
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001335#line 1336 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001336#include "confdefs.h"
1337#include <assert.h>
1338Syntax Error
1339EOF
1340eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1341ac_err=`grep -v '^ *+' conftest.out`
1342if test -z "$ac_err"; then
1343 :
1344else
1345 echo "$ac_err" >&5
1346 rm -rf conftest*
1347 CPP="${CC-cc} -E -traditional-cpp"
1348 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001349#line 1350 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001350#include "confdefs.h"
1351#include <assert.h>
1352Syntax Error
1353EOF
1354eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1355ac_err=`grep -v '^ *+' conftest.out`
1356if test -z "$ac_err"; then
1357 :
1358else
1359 echo "$ac_err" >&5
1360 rm -rf conftest*
1361 CPP=/lib/cpp
1362fi
1363rm -f conftest*
1364fi
1365rm -f conftest*
1366 ac_cv_prog_CPP="$CPP"
1367fi
1368 CPP="$ac_cv_prog_CPP"
1369else
1370 ac_cv_prog_CPP="$CPP"
1371fi
1372echo "$ac_t""$CPP" 1>&6
1373
Theodore Ts'o74becf31997-04-26 14:37:06 +00001374for 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
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001375do
1376ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1377echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1378if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1379 echo $ac_n "(cached) $ac_c" 1>&6
1380else
1381 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001382#line 1383 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001383#include "confdefs.h"
1384#include <$ac_hdr>
1385EOF
1386eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1387ac_err=`grep -v '^ *+' conftest.out`
1388if test -z "$ac_err"; then
1389 rm -rf conftest*
1390 eval "ac_cv_header_$ac_safe=yes"
1391else
1392 echo "$ac_err" >&5
1393 rm -rf conftest*
1394 eval "ac_cv_header_$ac_safe=no"
1395fi
1396rm -f conftest*
1397fi
1398if 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
1403EOF
1404
1405else
1406 echo "$ac_t""no" 1>&6
1407fi
1408done
1409
1410echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1411if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1412 echo $ac_n "(cached) $ac_c" 1>&6
1413else
1414 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001415#line 1416 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001416#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. */
1421char vprintf();
1422
1423int main() { return 0; }
1424int 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)
1430choke me
1431#else
1432vprintf();
1433#endif
1434
1435; return 0; }
1436EOF
1437if eval $ac_link; then
1438 rm -rf conftest*
1439 eval "ac_cv_func_vprintf=yes"
1440else
1441 rm -rf conftest*
1442 eval "ac_cv_func_vprintf=no"
1443fi
1444rm -f conftest*
1445
1446fi
1447if 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
1451EOF
1452
1453else
1454 echo "$ac_t""no" 1>&6
1455fi
1456
1457if test "$ac_cv_func_vprintf" != yes; then
1458echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1459if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1460 echo $ac_n "(cached) $ac_c" 1>&6
1461else
1462 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001463#line 1464 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001464#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. */
1469char _doprnt();
1470
1471int main() { return 0; }
1472int 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)
1478choke me
1479#else
1480_doprnt();
1481#endif
1482
1483; return 0; }
1484EOF
1485if eval $ac_link; then
1486 rm -rf conftest*
1487 eval "ac_cv_func__doprnt=yes"
1488else
1489 rm -rf conftest*
1490 eval "ac_cv_func__doprnt=no"
1491fi
1492rm -f conftest*
1493
1494fi
1495if 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
1499EOF
1500
1501else
1502 echo "$ac_t""no" 1>&6
1503fi
1504
1505fi
1506
1507echo $ac_n "checking whether struct dirent has a d_namlen field""... $ac_c" 1>&6
1508if eval "test \"`echo '$''{'e2fsprogs_cv_struct_d_namlen'+set}'`\" = set"; then
1509 echo $ac_n "(cached) $ac_c" 1>&6
1510else
1511 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001512#line 1513 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001513#include "confdefs.h"
1514#include <sys/types.h>
1515#include <dirent.h>
1516int main() { return 0; }
1517int t() {
1518struct dirent de; de.d_namlen = 0;
1519; return 0; }
1520EOF
1521if eval $ac_compile; then
1522 rm -rf conftest*
1523 e2fsprogs_cv_struct_d_namlen=yes
1524else
1525 rm -rf conftest*
1526 e2fsprogs_cv_struct_d_namlen=no
1527fi
1528rm -f conftest*
1529
1530fi
1531
1532echo "$ac_t""$e2fsprogs_cv_struct_d_namlen" 1>&6
1533if test "$e2fsprogs_cv_struct_d_namlen" = yes; then
1534 cat >> confdefs.h <<\EOF
1535#define HAVE_DIRENT_NAMLEN 1
1536EOF
1537
1538fi
1539if 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
1545fi
1546echo $ac_n "checking size of short""... $ac_c" 1>&6
1547if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1548 echo $ac_n "(cached) $ac_c" 1>&6
1549else
1550 if test "$cross_compiling" = yes; then
1551 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1552else
1553cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001554#line 1555 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001555#include "confdefs.h"
1556#include <stdio.h>
1557main()
1558{
1559 FILE *f=fopen("conftestval", "w");
1560 if (!f) exit(1);
1561 fprintf(f, "%d\n", sizeof(short));
1562 exit(0);
1563}
1564EOF
1565eval $ac_link
1566if test -s conftest && (./conftest; exit) 2>/dev/null; then
1567 ac_cv_sizeof_short=`cat conftestval`
1568else
1569 ac_cv_sizeof_short=0
1570fi
1571fi
1572rm -fr conftest*
1573fi
1574echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1575cat >> confdefs.h <<EOF
1576#define SIZEOF_SHORT $ac_cv_sizeof_short
1577EOF
1578
1579
1580echo $ac_n "checking size of int""... $ac_c" 1>&6
1581if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 if test "$cross_compiling" = yes; then
1585 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1586else
1587cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001588#line 1589 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001589#include "confdefs.h"
1590#include <stdio.h>
1591main()
1592{
1593 FILE *f=fopen("conftestval", "w");
1594 if (!f) exit(1);
1595 fprintf(f, "%d\n", sizeof(int));
1596 exit(0);
1597}
1598EOF
1599eval $ac_link
1600if test -s conftest && (./conftest; exit) 2>/dev/null; then
1601 ac_cv_sizeof_int=`cat conftestval`
1602else
1603 ac_cv_sizeof_int=0
1604fi
1605fi
1606rm -fr conftest*
1607fi
1608echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1609cat >> confdefs.h <<EOF
1610#define SIZEOF_INT $ac_cv_sizeof_int
1611EOF
1612
1613
1614echo $ac_n "checking size of long""... $ac_c" 1>&6
1615if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1616 echo $ac_n "(cached) $ac_c" 1>&6
1617else
1618 if test "$cross_compiling" = yes; then
1619 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1620else
1621cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001622#line 1623 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001623#include "confdefs.h"
1624#include <stdio.h>
1625main()
1626{
1627 FILE *f=fopen("conftestval", "w");
1628 if (!f) exit(1);
1629 fprintf(f, "%d\n", sizeof(long));
1630 exit(0);
1631}
1632EOF
1633eval $ac_link
1634if test -s conftest && (./conftest; exit) 2>/dev/null; then
1635 ac_cv_sizeof_long=`cat conftestval`
1636else
1637 ac_cv_sizeof_long=0
1638fi
1639fi
1640rm -fr conftest*
1641fi
1642echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1643cat >> confdefs.h <<EOF
1644#define SIZEOF_LONG $ac_cv_sizeof_long
1645EOF
1646
1647
1648SIZEOF_SHORT=$ac_cv_sizeof_short
1649SIZEOF_INT=$ac_cv_sizeof_int
1650SIZEOF_LONG=$ac_cv_sizeof_long
1651
1652
1653
1654echo $ac_n "checking whether struct stat has a st_flags field""... $ac_c" 1>&6
1655if eval "test \"`echo '$''{'e2fsprogs_cv_struct_st_flags'+set}'`\" = set"; then
1656 echo $ac_n "(cached) $ac_c" 1>&6
1657else
1658 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001659#line 1660 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001660#include "confdefs.h"
1661#include <sys/stat.h>
1662int main() { return 0; }
1663int t() {
1664struct stat stat; stat.st_flags = 0;
1665; return 0; }
1666EOF
1667if eval $ac_compile; then
1668 rm -rf conftest*
1669 e2fsprogs_cv_struct_st_flags=yes
1670else
1671 rm -rf conftest*
1672 e2fsprogs_cv_struct_st_flags=no
1673fi
1674rm -f conftest*
1675
1676fi
1677
1678echo "$ac_t""$e2fsprogs_cv_struct_st_flags" 1>&6
1679if test "$e2fsprogs_cv_struct_st_flags" = yes; then
1680 cat >> confdefs.h <<\EOF
1681#define HAVE_STAT_FLAGS 1
1682EOF
1683
1684fi
1685for ac_func in chflags getrusage llseek strdup getmntinfo
1686do
1687echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1688if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1689 echo $ac_n "(cached) $ac_c" 1>&6
1690else
1691 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001692#line 1693 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001693#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. */
1698char $ac_func();
1699
1700int main() { return 0; }
1701int 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)
1707choke me
1708#else
1709$ac_func();
1710#endif
1711
1712; return 0; }
1713EOF
1714if eval $ac_link; then
1715 rm -rf conftest*
1716 eval "ac_cv_func_$ac_func=yes"
1717else
1718 rm -rf conftest*
1719 eval "ac_cv_func_$ac_func=no"
1720fi
1721rm -f conftest*
1722
1723fi
1724if 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
1729EOF
1730
1731else
1732 echo "$ac_t""no" 1>&6
1733fi
1734done
1735
1736ac_safe=`echo "linux/fs.h" | tr './\055' '___'`
1737echo $ac_n "checking for linux/fs.h""... $ac_c" 1>&6
1738if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1739 echo $ac_n "(cached) $ac_c" 1>&6
1740else
1741 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001742#line 1743 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001743#include "confdefs.h"
1744#include <linux/fs.h>
1745EOF
1746eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1747ac_err=`grep -v '^ *+' conftest.out`
1748if test -z "$ac_err"; then
1749 rm -rf conftest*
1750 eval "ac_cv_header_$ac_safe=yes"
1751else
1752 echo "$ac_err" >&5
1753 rm -rf conftest*
1754 eval "ac_cv_header_$ac_safe=no"
1755fi
1756rm -f conftest*
1757fi
1758if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1759 echo "$ac_t""yes" 1>&6
1760 linux_headers=yes
1761else
1762 echo "$ac_t""no" 1>&6
1763linux_headers=no
1764fi
1765
1766
1767if test "$linux_headers" = yes; then
1768 cat >> confdefs.h <<\EOF
1769#define HAVE_LINUX_FS_H 1
1770EOF
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"
1775else
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"
1779fi
1780
1781echo $ac_n "checking for optreset""... $ac_c" 1>&6
1782if eval "test \"`echo '$''{'ac_cv_have_optreset'+set}'`\" = set"; then
1783 echo $ac_n "(cached) $ac_c" 1>&6
1784else
1785 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001786#line 1787 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001787#include "confdefs.h"
1788#include <unistd.h>
1789EOF
1790if (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
1794else
1795 rm -rf conftest*
1796 ac_cv_have_optreset=no
1797fi
1798rm -f conftest*
1799
1800fi
1801echo "$ac_t""$ac_cv_have_optreset" 1>&6
1802if test $ac_cv_have_optreset = yes; then
1803 cat >> confdefs.h <<\EOF
1804#define HAVE_OPTRESET 1
1805EOF
1806
1807fi
1808echo $ac_n "checking whether struct ext2_inode has frags fields""... $ac_c" 1>&6
1809if eval "test \"`echo '$''{'e2fsprogs_cv_struct_ext2_inode_frags'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1811else
1812 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001813#line 1814 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001814#include "confdefs.h"
1815#include <linux/ext2_fs.h>
1816int main() { return 0; }
1817int t() {
1818struct ext2_inode i; i.i_frag = i.i_fsize = 0;
1819; return 0; }
1820EOF
1821if eval $ac_compile; then
1822 rm -rf conftest*
1823 e2fsprogs_cv_struct_ext2_inode_frags=yes
1824else
1825 rm -rf conftest*
1826 e2fsprogs_cv_struct_ext2_inode_frags=no
1827fi
1828rm -f conftest*
1829
1830fi
1831
1832echo "$ac_t""$e2fsprogs_cv_struct_ext2_inode_frags" 1>&6
1833if test "$e2fsprogs_cv_struct_ext2_inode_frags" = yes; then
1834 cat >> confdefs.h <<\EOF
1835#define HAVE_EXT2_FRAGS 1
1836EOF
1837
1838fi
1839echo $ac_n "checking whether the ext2 ioctls compile""... $ac_c" 1>&6
1840if eval "test \"`echo '$''{'e2fsprogs_cv_ioctl_ext2'+set}'`\" = set"; then
1841 echo $ac_n "(cached) $ac_c" 1>&6
1842else
1843 cat > conftest.$ac_ext <<EOF
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001844#line 1845 "configure"
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001845#include "confdefs.h"
1846#include <linux/ext2_fs.h>
1847#include <sys/ioctl.h>
1848int main() { return 0; }
1849int t() {
1850ioctl (0, EXT2_IOC_SETVERSION, 0);
1851; return 0; }
1852EOF
1853if eval $ac_compile; then
1854 rm -rf conftest*
1855 e2fsprogs_cv_ioctl_ext2=yes
1856else
1857 rm -rf conftest*
1858 e2fsprogs_cv_ioctl_ext2=no
1859fi
1860rm -f conftest*
1861
1862fi
1863
1864echo "$ac_t""$e2fsprogs_cv_ioctl_ext2" 1>&6
1865if test "$e2fsprogs_cv_ioctl_ext2" = yes; then
1866 cat >> confdefs.h <<\EOF
1867#define HAVE_EXT2_IOCTLS 1
1868EOF
1869
1870fi
1871
1872case "$host_os" in
1873linux*)
1874 if test "$prefix" = NONE ; then
1875 prefix='/';
1876 echo "On Linux systems, prefix defaults to '/'"
1877 fi
1878;;
1879esac
1880
Theodore Ts'o74becf31997-04-26 14:37:06 +00001881LDFLAG_STATIC=
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001882case "$host_os" in
1883linux*)
1884 LDFLAG_STATIC=-static
1885 echo "On Linux systems, assume -static works"
1886;;
1887esac
1888
1889if test "$prefix" = / ; then
1890 usr_prefix=/usr
1891else
1892 usr_prefix="\${prefix}"
1893fi
1894
1895SS_DIR=`cd ${srcdir}/lib/ss; pwd`
1896ET_DIR=`cd ${srcdir}/lib/et; pwd`
1897
1898
1899if test "$cross_compiling" = yes ; then
1900 DO_TEST_SUITE=
1901else
1902 DO_TEST_SUITE=check
1903fi
1904
Theodore Ts'oa4d09611997-04-29 14:28:00 +00001905DO_SUBSTITUTE_SCRIPT=$srcdir/lib/do_substitute
1906
Theodore Ts'o50e1e101997-04-26 13:58:21 +00001907test -d lib || mkdir lib
1908test -d include || mkdir include
1909test -d include/linux || mkdir include/linux
1910trap '' 1 2 15
1911cat > 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#
1926EOF
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
1932if cmp -s $cache_file confcache; then
1933 :
1934else
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
1941fi
1942rm -f confcache
1943
1944trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1945
1946test "x$prefix" = xNONE && prefix=$ac_default_prefix
1947# Let make expand exec_prefix.
1948test "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.
1953if test "x$srcdir" = x.; then
1954 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1955fi
1956
1957trap '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.
1962cat > conftest.defs <<\EOF
1963s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
1964s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1965s%\[%\\&%g
1966s%\]%\\&%g
1967s%\$%$$%g
1968EOF
1969DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1970rm -f conftest.defs
1971
1972
1973# Without the "./", some shells look in PATH for config.status.
1974: ${CONFIG_STATUS=./config.status}
1975
1976echo creating $CONFIG_STATUS
1977rm -f $CONFIG_STATUS
1978cat > $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
1990ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1991for ac_option
1992do
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
2004done
2005
2006ac_given_srcdir=$srcdir
2007ac_given_INSTALL="$INSTALL"
2008
Theodore Ts'oa4d09611997-04-29 14:28:00 +00002009trap '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
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002012
2013# Protect against being on the right side of a sed subst in config.status.
2014sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
2015 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2016$ac_vpsub
2017$extrasub
2018s%@CFLAGS@%$CFLAGS%g
2019s%@CPPFLAGS@%$CPPFLAGS%g
2020s%@CXXFLAGS@%$CXXFLAGS%g
2021s%@DEFS@%$DEFS%g
2022s%@LDFLAGS@%$LDFLAGS%g
2023s%@LIBS@%$LIBS%g
2024s%@exec_prefix@%$exec_prefix%g
2025s%@prefix@%$prefix%g
2026s%@program_transform_name@%$program_transform_name%g
2027/@MCONFIG@/r $MCONFIG
2028s%@MCONFIG@%%g
Theodore Ts'o74becf31997-04-26 14:37:06 +00002029s%@E2FSPROGS_YEAR@%$E2FSPROGS_YEAR%g
2030s%@E2FSPROGS_MONTH@%$E2FSPROGS_MONTH%g
2031s%@E2FSPROGS_VERSION@%$E2FSPROGS_VERSION%g
2032s%@CC@%$CC%g
2033s%@LD@%$LD%g
2034s%@CCOPTS@%$CCOPTS%g
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002035s%@DLL_CMT@%$DLL_CMT%g
2036/@MAKEFILE_DLL@/r $MAKEFILE_DLL
2037s%@MAKEFILE_DLL@%%g
2038s%@ELF_CMT@%$ELF_CMT%g
2039/@MAKEFILE_ELF@/r $MAKEFILE_ELF
2040s%@MAKEFILE_ELF@%%g
2041s%@BSDLIB_CMT@%$BSDLIB_CMT%g
2042/@MAKEFILE_BSDLIB@/r $MAKEFILE_BSDLIB
2043s%@MAKEFILE_BSDLIB@%%g
2044s%@PROFILE_CMT@%$PROFILE_CMT%g
2045/@MAKEFILE_PROFILE@/r $MAKEFILE_PROFILE
2046s%@MAKEFILE_PROFILE@%%g
2047s%@CHECKER_CMT@%$CHECKER_CMT%g
2048/@MAKEFILE_CHECKER@/r $MAKEFILE_CHECKER
2049s%@MAKEFILE_CHECKER@%%g
Theodore Ts'oa4d09611997-04-29 14:28:00 +00002050s%@LIB_EXT@%$LIB_EXT%g
2051s%@STATIC_LIB_EXT@%$STATIC_LIB_EXT%g
2052s%@PROFILED_LIB_EXT@%$PROFILED_LIB_EXT%g
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002053s%@W@%$W%g
Theodore Ts'oa4d09611997-04-29 14:28:00 +00002054s%@E2FSCK_TYPE@%$E2FSCK_TYPE%g
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002055/@MAKEFILE_LIBRARY@/r $MAKEFILE_LIBRARY
2056s%@MAKEFILE_LIBRARY@%%g
Theodore Ts'o74becf31997-04-26 14:37:06 +00002057s%@BINARY_TYPE@%$BINARY_TYPE%g
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002058s%@SET_MAKE@%$SET_MAKE%g
2059s%@LN@%$LN%g
2060s%@MV@%$MV%g
2061s%@CP@%$CP%g
2062s%@RM@%$RM%g
2063s%@CHMOD@%$CHMOD%g
2064s%@AWK@%$AWK%g
2065s%@SED@%$SED%g
2066s%@host@%$host%g
2067s%@host_alias@%$host_alias%g
2068s%@host_cpu@%$host_cpu%g
2069s%@host_vendor@%$host_vendor%g
2070s%@host_os@%$host_os%g
2071s%@build@%$build%g
2072s%@build_alias@%$build_alias%g
2073s%@build_cpu@%$build_cpu%g
2074s%@build_vendor@%$build_vendor%g
2075s%@build_os@%$build_os%g
2076s%@AR@%$AR%g
2077s%@RANLIB@%$RANLIB%g
2078s%@STRIP@%$STRIP%g
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002079s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2080s%@INSTALL_DATA@%$INSTALL_DATA%g
2081s%@CPP@%$CPP%g
2082s%@SIZEOF_SHORT@%$SIZEOF_SHORT%g
2083s%@SIZEOF_INT@%$SIZEOF_INT%g
2084s%@SIZEOF_LONG@%$SIZEOF_LONG%g
2085s%@EXTRA_PROGS@%$EXTRA_PROGS%g
2086s%@LINUX_INCLUDE@%$LINUX_INCLUDE%g
2087s%@LDFLAG_STATIC@%$LDFLAG_STATIC%g
2088s%@usr_prefix@%$usr_prefix%g
2089s%@SS_DIR@%$SS_DIR%g
2090s%@ET_DIR@%$ET_DIR%g
2091s%@DO_TEST_SUITE@%$DO_TEST_SUITE%g
Theodore Ts'oa4d09611997-04-29 14:28:00 +00002092/@DO_SUBSTITUTE_SCRIPT@/r $DO_SUBSTITUTE_SCRIPT
2093s%@DO_SUBSTITUTE_SCRIPT@%%g
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002094
2095CEOF
2096EOF
2097cat >> $CONFIG_STATUS <<EOF
2098
Theodore Ts'oa4d09611997-04-29 14:28:00 +00002099CONFIG_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"}
Theodore Ts'o50e1e101997-04-26 13:58:21 +00002102EOF
2103cat >> $CONFIG_STATUS <<\EOF
2104for 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
2149s%@configure_input@%$configure_input%g
2150s%@srcdir@%$srcdir%g
2151s%@top_srcdir@%$top_srcdir%g
2152s%@INSTALL@%$INSTALL%g
2153" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2154fi; done
2155rm -f conftest.subs
2156
2157
2158
2159exit 0
2160EOF
2161chmod +x $CONFIG_STATUS
2162rm -fr confdefs* $ac_clean_files
2163test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2164