* lib/regex.c, lib/getopt.c: internationalization works with
[findutils.git] / configure
blobc26c0a81e634aebb845a50f99de70408f16c3da0
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod"
16 ac_help="$ac_help
17 --with-afs support -fstype afs"
18 ac_help="$ac_help
19 --without-included-regex don't compile regex (use with caution)"
20 ac_help="$ac_help
21 --disable-assert turn off assertions"
23 # Initialize some variables set by options.
24 # The variables have the same names as the options, with
25 # dashes changed to underlines.
26 build=NONE
27 cache_file=./config.cache
28 exec_prefix=NONE
29 host=NONE
30 no_create=
31 nonopt=NONE
32 no_recursion=
33 prefix=NONE
34 program_prefix=NONE
35 program_suffix=NONE
36 program_transform_name=s,x,x,
37 silent=
38 site=
39 srcdir=
40 target=NONE
41 verbose=
42 x_includes=NONE
43 x_libraries=NONE
44 bindir='${exec_prefix}/bin'
45 sbindir='${exec_prefix}/sbin'
46 libexecdir='${exec_prefix}/libexec'
47 datadir='${prefix}/share'
48 sysconfdir='${prefix}/etc'
49 sharedstatedir='${prefix}/com'
50 localstatedir='${prefix}/var'
51 libdir='${exec_prefix}/lib'
52 includedir='${prefix}/include'
53 oldincludedir='/usr/include'
54 infodir='${prefix}/info'
55 mandir='${prefix}/man'
57 # Initialize some other variables.
58 subdirs=
59 MFLAGS= MAKEFLAGS=
60 SHELL=${CONFIG_SHELL-/bin/sh}
61 # Maximum number of lines to put in a shell here document.
62 ac_max_here_lines=12
64 ac_prev=
65 for ac_option
68 # If the previous option needs an argument, assign it.
69 if test -n "$ac_prev"; then
70 eval "$ac_prev=\$ac_option"
71 ac_prev=
72 continue
75 case "$ac_option" in
76 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
77 *) ac_optarg= ;;
78 esac
80 # Accept the important Cygnus configure options, so we can diagnose typos.
82 case "$ac_option" in
84 -bindir | --bindir | --bindi | --bind | --bin | --bi)
85 ac_prev=bindir ;;
86 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
87 bindir="$ac_optarg" ;;
89 -build | --build | --buil | --bui | --bu)
90 ac_prev=build ;;
91 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
92 build="$ac_optarg" ;;
94 -cache-file | --cache-file | --cache-fil | --cache-fi \
95 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
96 ac_prev=cache_file ;;
97 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
98 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
99 cache_file="$ac_optarg" ;;
101 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
102 ac_prev=datadir ;;
103 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
104 | --da=*)
105 datadir="$ac_optarg" ;;
107 -disable-* | --disable-*)
108 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
109 # Reject names that are not valid shell variable names.
110 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
111 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114 eval "enable_${ac_feature}=no" ;;
116 -enable-* | --enable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
118 # Reject names that are not valid shell variable names.
119 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 case "$ac_option" in
124 *=*) ;;
125 *) ac_optarg=yes ;;
126 esac
127 eval "enable_${ac_feature}='$ac_optarg'" ;;
129 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
130 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
131 | --exec | --exe | --ex)
132 ac_prev=exec_prefix ;;
133 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
134 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
135 | --exec=* | --exe=* | --ex=*)
136 exec_prefix="$ac_optarg" ;;
138 -gas | --gas | --ga | --g)
139 # Obsolete; use --with-gas.
140 with_gas=yes ;;
142 -help | --help | --hel | --he)
143 # Omit some internal or obsolete options to make the list less imposing.
144 # This message is too long to be a string in the A/UX 3.1 sh.
145 cat << EOF
146 Usage: configure [options] [host]
147 Options: [defaults in brackets after descriptions]
148 Configuration:
149 --cache-file=FILE cache test results in FILE
150 --help print this message
151 --no-create do not create output files
152 --quiet, --silent do not print \`checking...' messages
153 --version print the version of autoconf that created configure
154 Directory and file names:
155 --prefix=PREFIX install architecture-independent files in PREFIX
156 [$ac_default_prefix]
157 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
158 [same as prefix]
159 --bindir=DIR user executables in DIR [EPREFIX/bin]
160 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
161 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
162 --datadir=DIR read-only architecture-independent data in DIR
163 [PREFIX/share]
164 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
165 --sharedstatedir=DIR modifiable architecture-independent data in DIR
166 [PREFIX/com]
167 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
168 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
169 --includedir=DIR C header files in DIR [PREFIX/include]
170 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
171 --infodir=DIR info documentation in DIR [PREFIX/info]
172 --mandir=DIR man documentation in DIR [PREFIX/man]
173 --srcdir=DIR find the sources in DIR [configure dir or ..]
174 --program-prefix=PREFIX prepend PREFIX to installed program names
175 --program-suffix=SUFFIX append SUFFIX to installed program names
176 --program-transform-name=PROGRAM
177 run sed PROGRAM on installed program names
179 cat << EOF
180 Host type:
181 --build=BUILD configure for building on BUILD [BUILD=HOST]
182 --host=HOST configure for HOST [guessed]
183 --target=TARGET configure for TARGET [TARGET=HOST]
184 Features and packages:
185 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
186 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
187 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
188 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
189 --x-includes=DIR X include files are in DIR
190 --x-libraries=DIR X library files are in DIR
192 if test -n "$ac_help"; then
193 echo "--enable and --with options recognized:$ac_help"
195 exit 0 ;;
197 -host | --host | --hos | --ho)
198 ac_prev=host ;;
199 -host=* | --host=* | --hos=* | --ho=*)
200 host="$ac_optarg" ;;
202 -includedir | --includedir | --includedi | --included | --include \
203 | --includ | --inclu | --incl | --inc)
204 ac_prev=includedir ;;
205 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
206 | --includ=* | --inclu=* | --incl=* | --inc=*)
207 includedir="$ac_optarg" ;;
209 -infodir | --infodir | --infodi | --infod | --info | --inf)
210 ac_prev=infodir ;;
211 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
212 infodir="$ac_optarg" ;;
214 -libdir | --libdir | --libdi | --libd)
215 ac_prev=libdir ;;
216 -libdir=* | --libdir=* | --libdi=* | --libd=*)
217 libdir="$ac_optarg" ;;
219 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
220 | --libexe | --libex | --libe)
221 ac_prev=libexecdir ;;
222 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
223 | --libexe=* | --libex=* | --libe=*)
224 libexecdir="$ac_optarg" ;;
226 -localstatedir | --localstatedir | --localstatedi | --localstated \
227 | --localstate | --localstat | --localsta | --localst \
228 | --locals | --local | --loca | --loc | --lo)
229 ac_prev=localstatedir ;;
230 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
231 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
232 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
233 localstatedir="$ac_optarg" ;;
235 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
236 ac_prev=mandir ;;
237 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238 mandir="$ac_optarg" ;;
240 -nfp | --nfp | --nf)
241 # Obsolete; use --without-fp.
242 with_fp=no ;;
244 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
245 | --no-cr | --no-c)
246 no_create=yes ;;
248 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
249 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
250 no_recursion=yes ;;
252 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
253 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
254 | --oldin | --oldi | --old | --ol | --o)
255 ac_prev=oldincludedir ;;
256 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
257 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
258 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
259 oldincludedir="$ac_optarg" ;;
261 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
262 ac_prev=prefix ;;
263 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
264 prefix="$ac_optarg" ;;
266 -program-prefix | --program-prefix | --program-prefi | --program-pref \
267 | --program-pre | --program-pr | --program-p)
268 ac_prev=program_prefix ;;
269 -program-prefix=* | --program-prefix=* | --program-prefi=* \
270 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
271 program_prefix="$ac_optarg" ;;
273 -program-suffix | --program-suffix | --program-suffi | --program-suff \
274 | --program-suf | --program-su | --program-s)
275 ac_prev=program_suffix ;;
276 -program-suffix=* | --program-suffix=* | --program-suffi=* \
277 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
278 program_suffix="$ac_optarg" ;;
280 -program-transform-name | --program-transform-name \
281 | --program-transform-nam | --program-transform-na \
282 | --program-transform-n | --program-transform- \
283 | --program-transform | --program-transfor \
284 | --program-transfo | --program-transf \
285 | --program-trans | --program-tran \
286 | --progr-tra | --program-tr | --program-t)
287 ac_prev=program_transform_name ;;
288 -program-transform-name=* | --program-transform-name=* \
289 | --program-transform-nam=* | --program-transform-na=* \
290 | --program-transform-n=* | --program-transform-=* \
291 | --program-transform=* | --program-transfor=* \
292 | --program-transfo=* | --program-transf=* \
293 | --program-trans=* | --program-tran=* \
294 | --progr-tra=* | --program-tr=* | --program-t=*)
295 program_transform_name="$ac_optarg" ;;
297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
298 | -silent | --silent | --silen | --sile | --sil)
299 silent=yes ;;
301 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
302 ac_prev=sbindir ;;
303 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
304 | --sbi=* | --sb=*)
305 sbindir="$ac_optarg" ;;
307 -sharedstatedir | --sharedstatedir | --sharedstatedi \
308 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
309 | --sharedst | --shareds | --shared | --share | --shar \
310 | --sha | --sh)
311 ac_prev=sharedstatedir ;;
312 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
313 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
314 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
315 | --sha=* | --sh=*)
316 sharedstatedir="$ac_optarg" ;;
318 -site | --site | --sit)
319 ac_prev=site ;;
320 -site=* | --site=* | --sit=*)
321 site="$ac_optarg" ;;
323 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
324 ac_prev=srcdir ;;
325 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
326 srcdir="$ac_optarg" ;;
328 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
329 | --syscon | --sysco | --sysc | --sys | --sy)
330 ac_prev=sysconfdir ;;
331 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
332 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
333 sysconfdir="$ac_optarg" ;;
335 -target | --target | --targe | --targ | --tar | --ta | --t)
336 ac_prev=target ;;
337 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
338 target="$ac_optarg" ;;
340 -v | -verbose | --verbose | --verbos | --verbo | --verb)
341 verbose=yes ;;
343 -version | --version | --versio | --versi | --vers)
344 echo "configure generated by autoconf version 2.13"
345 exit 0 ;;
347 -with-* | --with-*)
348 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
349 # Reject names that are not valid shell variable names.
350 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
351 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
353 ac_package=`echo $ac_package| sed 's/-/_/g'`
354 case "$ac_option" in
355 *=*) ;;
356 *) ac_optarg=yes ;;
357 esac
358 eval "with_${ac_package}='$ac_optarg'" ;;
360 -without-* | --without-*)
361 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
362 # Reject names that are not valid shell variable names.
363 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366 ac_package=`echo $ac_package| sed 's/-/_/g'`
367 eval "with_${ac_package}=no" ;;
369 --x)
370 # Obsolete; use --with-x.
371 with_x=yes ;;
373 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
374 | --x-incl | --x-inc | --x-in | --x-i)
375 ac_prev=x_includes ;;
376 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
377 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
378 x_includes="$ac_optarg" ;;
380 -x-libraries | --x-libraries | --x-librarie | --x-librari \
381 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
382 ac_prev=x_libraries ;;
383 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
384 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
385 x_libraries="$ac_optarg" ;;
387 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
391 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
392 echo "configure: warning: $ac_option: invalid host type" 1>&2
394 if test "x$nonopt" != xNONE; then
395 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
397 nonopt="$ac_option"
400 esac
401 done
403 if test -n "$ac_prev"; then
404 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
407 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
409 # File descriptor usage:
410 # 0 standard input
411 # 1 file creation
412 # 2 errors and warnings
413 # 3 some systems may open it to /dev/tty
414 # 4 used on the Kubota Titan
415 # 6 checking for... messages and results
416 # 5 compiler messages saved in config.log
417 if test "$silent" = yes; then
418 exec 6>/dev/null
419 else
420 exec 6>&1
422 exec 5>./config.log
424 echo "\
425 This file contains any messages produced by compilers while
426 running configure, to aid debugging if configure makes a mistake.
427 " 1>&5
429 # Strip out --no-create and --no-recursion so they do not pile up.
430 # Also quote any args containing shell metacharacters.
431 ac_configure_args=
432 for ac_arg
434 case "$ac_arg" in
435 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
436 | --no-cr | --no-c) ;;
437 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
438 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
439 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
440 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
441 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
442 esac
443 done
445 # NLS nuisances.
446 # Only set these to C if already set. These must not be set unconditionally
447 # because not all systems understand e.g. LANG=C (notably SCO).
448 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
449 # Non-C LC_CTYPE values break the ctype check.
450 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
451 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
452 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
453 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
455 # confdefs.h avoids OS command line length limits that DEFS can exceed.
456 rm -rf conftest* confdefs.h
457 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
458 echo > confdefs.h
460 # A filename unique to this package, relative to the directory that
461 # configure is in, which we can look for to find out if srcdir is correct.
462 ac_unique_file=find/pred.c
464 # Find the source files, if location was not specified.
465 if test -z "$srcdir"; then
466 ac_srcdir_defaulted=yes
467 # Try the directory containing this script, then its parent.
468 ac_prog=$0
469 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
470 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
471 srcdir=$ac_confdir
472 if test ! -r $srcdir/$ac_unique_file; then
473 srcdir=..
475 else
476 ac_srcdir_defaulted=no
478 if test ! -r $srcdir/$ac_unique_file; then
479 if test "$ac_srcdir_defaulted" = yes; then
480 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
481 else
482 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
487 # Prefer explicitly selected file to automatically selected ones.
488 if test -z "$CONFIG_SITE"; then
489 if test "x$prefix" != xNONE; then
490 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
491 else
492 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495 for ac_site_file in $CONFIG_SITE; do
496 if test -r "$ac_site_file"; then
497 echo "loading site script $ac_site_file"
498 . "$ac_site_file"
500 done
502 if test -r "$cache_file"; then
503 echo "loading cache $cache_file"
504 . $cache_file
505 else
506 echo "creating cache $cache_file"
507 > $cache_file
510 ac_ext=c
511 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
512 ac_cpp='$CPP $CPPFLAGS'
513 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
514 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
515 cross_compiling=$ac_cv_prog_cc_cross
517 ac_exeext=
518 ac_objext=o
519 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
520 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
521 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
522 ac_n= ac_c='
523 ' ac_t=' '
524 else
525 ac_n=-n ac_c= ac_t=
527 else
528 ac_n= ac_c='\c' ac_t=
536 ac_aux_dir=
537 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
538 if test -f $ac_dir/install-sh; then
539 ac_aux_dir=$ac_dir
540 ac_install_sh="$ac_aux_dir/install-sh -c"
541 break
542 elif test -f $ac_dir/install.sh; then
543 ac_aux_dir=$ac_dir
544 ac_install_sh="$ac_aux_dir/install.sh -c"
545 break
547 done
548 if test -z "$ac_aux_dir"; then
549 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
551 ac_config_guess=$ac_aux_dir/config.guess
552 ac_config_sub=$ac_aux_dir/config.sub
553 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
555 # Find a good install program. We prefer a C program (faster),
556 # so one script is as good as another. But avoid the broken or
557 # incompatible versions:
558 # SysV /etc/install, /usr/sbin/install
559 # SunOS /usr/etc/install
560 # IRIX /sbin/install
561 # AIX /bin/install
562 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
563 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
564 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
565 # ./install, which can be erroneously created by make from ./install.sh.
566 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
567 echo "configure:568: checking for a BSD compatible install" >&5
568 if test -z "$INSTALL"; then
569 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
570 echo $ac_n "(cached) $ac_c" 1>&6
571 else
572 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
573 for ac_dir in $PATH; do
574 # Account for people who put trailing slashes in PATH elements.
575 case "$ac_dir/" in
576 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
578 # OSF1 and SCO ODT 3.0 have their own names for install.
579 # Don't use installbsd from OSF since it installs stuff as root
580 # by default.
581 for ac_prog in ginstall scoinst install; do
582 if test -f $ac_dir/$ac_prog; then
583 if test $ac_prog = install &&
584 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
585 # AIX install. It has an incompatible calling convention.
587 else
588 ac_cv_path_install="$ac_dir/$ac_prog -c"
589 break 2
592 done
594 esac
595 done
596 IFS="$ac_save_IFS"
599 if test "${ac_cv_path_install+set}" = set; then
600 INSTALL="$ac_cv_path_install"
601 else
602 # As a last resort, use the slow shell script. We don't cache a
603 # path for INSTALL within a source directory, because that will
604 # break other packages using the cache if that directory is
605 # removed, or if the path is relative.
606 INSTALL="$ac_install_sh"
609 echo "$ac_t""$INSTALL" 1>&6
611 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
612 # It thinks the first close brace ends the variable substitution.
613 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
615 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
617 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
619 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
620 echo "configure:621: checking whether build environment is sane" >&5
621 # Just in case
622 sleep 1
623 echo timestamp > conftestfile
624 # Do `set' in a subshell so we don't clobber the current shell's
625 # arguments. Must try -L first in case configure is actually a
626 # symlink; some systems play weird games with the mod time of symlinks
627 # (eg FreeBSD returns the mod time of the symlink's containing
628 # directory).
629 if (
630 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
631 if test "$*" = "X"; then
632 # -L didn't work.
633 set X `ls -t $srcdir/configure conftestfile`
635 if test "$*" != "X $srcdir/configure conftestfile" \
636 && test "$*" != "X conftestfile $srcdir/configure"; then
638 # If neither matched, then we have a broken ls. This can happen
639 # if, for instance, CONFIG_SHELL is bash and it inherits a
640 # broken ls alias from the environment. This has actually
641 # happened. Such a system could not be considered "sane".
642 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
643 alias in your environment" 1>&2; exit 1; }
646 test "$2" = conftestfile
648 then
649 # Ok.
651 else
652 { echo "configure: error: newly created file is older than distributed files!
653 Check your system clock" 1>&2; exit 1; }
655 rm -f conftest*
656 echo "$ac_t""yes" 1>&6
657 if test "$program_transform_name" = s,x,x,; then
658 program_transform_name=
659 else
660 # Double any \ or $. echo might interpret backslashes.
661 cat <<\EOF_SED > conftestsed
662 s,\\,\\\\,g; s,\$,$$,g
663 EOF_SED
664 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
665 rm -f conftestsed
667 test "$program_prefix" != NONE &&
668 program_transform_name="s,^,${program_prefix},; $program_transform_name"
669 # Use a double $ so make ignores it.
670 test "$program_suffix" != NONE &&
671 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
673 # sed with no file args requires a program.
674 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
676 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
677 echo "configure:678: checking whether ${MAKE-make} sets \${MAKE}" >&5
678 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
679 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
680 echo $ac_n "(cached) $ac_c" 1>&6
681 else
682 cat > conftestmake <<\EOF
683 all:
684 @echo 'ac_maketemp="${MAKE}"'
686 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
687 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
688 if test -n "$ac_maketemp"; then
689 eval ac_cv_prog_make_${ac_make}_set=yes
690 else
691 eval ac_cv_prog_make_${ac_make}_set=no
693 rm -f conftestmake
695 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
696 echo "$ac_t""yes" 1>&6
697 SET_MAKE=
698 else
699 echo "$ac_t""no" 1>&6
700 SET_MAKE="MAKE=${MAKE-make}"
704 PACKAGE=findutils
706 VERSION=4.1.2
708 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
709 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
711 cat >> confdefs.h <<EOF
712 #define PACKAGE "$PACKAGE"
715 cat >> confdefs.h <<EOF
716 #define VERSION "$VERSION"
721 missing_dir=`cd $ac_aux_dir && pwd`
722 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
723 echo "configure:724: checking for working aclocal" >&5
724 # Run test in a subshell; some versions of sh will print an error if
725 # an executable is not found, even if stderr is redirected.
726 # Redirect stdin to placate older versions of autoconf. Sigh.
727 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
728 ACLOCAL=aclocal
729 echo "$ac_t""found" 1>&6
730 else
731 ACLOCAL="$missing_dir/missing aclocal"
732 echo "$ac_t""missing" 1>&6
735 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
736 echo "configure:737: checking for working autoconf" >&5
737 # Run test in a subshell; some versions of sh will print an error if
738 # an executable is not found, even if stderr is redirected.
739 # Redirect stdin to placate older versions of autoconf. Sigh.
740 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
741 AUTOCONF=autoconf
742 echo "$ac_t""found" 1>&6
743 else
744 AUTOCONF="$missing_dir/missing autoconf"
745 echo "$ac_t""missing" 1>&6
748 echo $ac_n "checking for working automake""... $ac_c" 1>&6
749 echo "configure:750: checking for working automake" >&5
750 # Run test in a subshell; some versions of sh will print an error if
751 # an executable is not found, even if stderr is redirected.
752 # Redirect stdin to placate older versions of autoconf. Sigh.
753 if (automake --version) < /dev/null > /dev/null 2>&1; then
754 AUTOMAKE=automake
755 echo "$ac_t""found" 1>&6
756 else
757 AUTOMAKE="$missing_dir/missing automake"
758 echo "$ac_t""missing" 1>&6
761 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
762 echo "configure:763: checking for working autoheader" >&5
763 # Run test in a subshell; some versions of sh will print an error if
764 # an executable is not found, even if stderr is redirected.
765 # Redirect stdin to placate older versions of autoconf. Sigh.
766 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
767 AUTOHEADER=autoheader
768 echo "$ac_t""found" 1>&6
769 else
770 AUTOHEADER="$missing_dir/missing autoheader"
771 echo "$ac_t""missing" 1>&6
774 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
775 echo "configure:776: checking for working makeinfo" >&5
776 # Run test in a subshell; some versions of sh will print an error if
777 # an executable is not found, even if stderr is redirected.
778 # Redirect stdin to placate older versions of autoconf. Sigh.
779 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
780 MAKEINFO=makeinfo
781 echo "$ac_t""found" 1>&6
782 else
783 MAKEINFO="$missing_dir/missing makeinfo"
784 echo "$ac_t""missing" 1>&6
789 # Check whether --enable-id-cache or --disable-id-cache was given.
790 if test "${enable_id_cache+set}" = set; then
791 enableval="$enable_id_cache"
792 cat >> confdefs.h <<\EOF
793 #define CACHE_IDS 1
798 # Check whether --with-afs or --without-afs was given.
799 if test "${with_afs+set}" = set; then
800 withval="$with_afs"
801 cat >> confdefs.h <<\EOF
802 #define AFS 1
805 CPPFLAGS="$CPPFLAGS -I/usr/afsws/include"
806 LIBS="$LIBS -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp"
809 if test "$program_transform_name" = s,x,x,; then
810 program_transform_name=
811 else
812 # Double any \ or $. echo might interpret backslashes.
813 cat <<\EOF_SED > conftestsed
814 s,\\,\\\\,g; s,\$,$$,g
815 EOF_SED
816 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
817 rm -f conftestsed
819 test "$program_prefix" != NONE &&
820 program_transform_name="s,^,${program_prefix},; $program_transform_name"
821 # Use a double $ so make ignores it.
822 test "$program_suffix" != NONE &&
823 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
825 # sed with no file args requires a program.
826 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
829 # Extract the first word of "gcc", so it can be a program name with args.
830 set dummy gcc; ac_word=$2
831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
832 echo "configure:833: checking for $ac_word" >&5
833 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
834 echo $ac_n "(cached) $ac_c" 1>&6
835 else
836 if test -n "$CC"; then
837 ac_cv_prog_CC="$CC" # Let the user override the test.
838 else
839 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
840 ac_dummy="$PATH"
841 for ac_dir in $ac_dummy; do
842 test -z "$ac_dir" && ac_dir=.
843 if test -f $ac_dir/$ac_word; then
844 ac_cv_prog_CC="gcc"
845 break
847 done
848 IFS="$ac_save_ifs"
851 CC="$ac_cv_prog_CC"
852 if test -n "$CC"; then
853 echo "$ac_t""$CC" 1>&6
854 else
855 echo "$ac_t""no" 1>&6
858 if test -z "$CC"; then
859 # Extract the first word of "cc", so it can be a program name with args.
860 set dummy cc; ac_word=$2
861 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
862 echo "configure:863: checking for $ac_word" >&5
863 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
864 echo $ac_n "(cached) $ac_c" 1>&6
865 else
866 if test -n "$CC"; then
867 ac_cv_prog_CC="$CC" # Let the user override the test.
868 else
869 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
870 ac_prog_rejected=no
871 ac_dummy="$PATH"
872 for ac_dir in $ac_dummy; do
873 test -z "$ac_dir" && ac_dir=.
874 if test -f $ac_dir/$ac_word; then
875 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
876 ac_prog_rejected=yes
877 continue
879 ac_cv_prog_CC="cc"
880 break
882 done
883 IFS="$ac_save_ifs"
884 if test $ac_prog_rejected = yes; then
885 # We found a bogon in the path, so make sure we never use it.
886 set dummy $ac_cv_prog_CC
887 shift
888 if test $# -gt 0; then
889 # We chose a different compiler from the bogus one.
890 # However, it has the same basename, so the bogon will be chosen
891 # first if we set CC to just the basename; use the full file name.
892 shift
893 set dummy "$ac_dir/$ac_word" "$@"
894 shift
895 ac_cv_prog_CC="$@"
900 CC="$ac_cv_prog_CC"
901 if test -n "$CC"; then
902 echo "$ac_t""$CC" 1>&6
903 else
904 echo "$ac_t""no" 1>&6
907 if test -z "$CC"; then
908 case "`uname -s`" in
909 *win32* | *WIN32*)
910 # Extract the first word of "cl", so it can be a program name with args.
911 set dummy cl; ac_word=$2
912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
913 echo "configure:914: checking for $ac_word" >&5
914 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
915 echo $ac_n "(cached) $ac_c" 1>&6
916 else
917 if test -n "$CC"; then
918 ac_cv_prog_CC="$CC" # Let the user override the test.
919 else
920 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
921 ac_dummy="$PATH"
922 for ac_dir in $ac_dummy; do
923 test -z "$ac_dir" && ac_dir=.
924 if test -f $ac_dir/$ac_word; then
925 ac_cv_prog_CC="cl"
926 break
928 done
929 IFS="$ac_save_ifs"
932 CC="$ac_cv_prog_CC"
933 if test -n "$CC"; then
934 echo "$ac_t""$CC" 1>&6
935 else
936 echo "$ac_t""no" 1>&6
939 esac
941 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
944 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
945 echo "configure:946: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
947 ac_ext=c
948 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
949 ac_cpp='$CPP $CPPFLAGS'
950 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
951 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
952 cross_compiling=$ac_cv_prog_cc_cross
954 cat > conftest.$ac_ext << EOF
956 #line 957 "configure"
957 #include "confdefs.h"
959 main(){return(0);}
961 if { (eval echo configure:962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
962 ac_cv_prog_cc_works=yes
963 # If we can't run a trivial program, we are probably using a cross compiler.
964 if (./conftest; exit) 2>/dev/null; then
965 ac_cv_prog_cc_cross=no
966 else
967 ac_cv_prog_cc_cross=yes
969 else
970 echo "configure: failed program was:" >&5
971 cat conftest.$ac_ext >&5
972 ac_cv_prog_cc_works=no
974 rm -fr conftest*
975 ac_ext=c
976 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
977 ac_cpp='$CPP $CPPFLAGS'
978 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
979 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
980 cross_compiling=$ac_cv_prog_cc_cross
982 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
983 if test $ac_cv_prog_cc_works = no; then
984 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
986 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
987 echo "configure:988: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
988 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
989 cross_compiling=$ac_cv_prog_cc_cross
991 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
992 echo "configure:993: checking whether we are using GNU C" >&5
993 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
994 echo $ac_n "(cached) $ac_c" 1>&6
995 else
996 cat > conftest.c <<EOF
997 #ifdef __GNUC__
998 yes;
999 #endif
1001 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1002 ac_cv_prog_gcc=yes
1003 else
1004 ac_cv_prog_gcc=no
1008 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1010 if test $ac_cv_prog_gcc = yes; then
1011 GCC=yes
1012 else
1013 GCC=
1016 ac_test_CFLAGS="${CFLAGS+set}"
1017 ac_save_CFLAGS="$CFLAGS"
1018 CFLAGS=
1019 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1020 echo "configure:1021: checking whether ${CC-cc} accepts -g" >&5
1021 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1022 echo $ac_n "(cached) $ac_c" 1>&6
1023 else
1024 echo 'void f(){}' > conftest.c
1025 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1026 ac_cv_prog_cc_g=yes
1027 else
1028 ac_cv_prog_cc_g=no
1030 rm -f conftest*
1034 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1035 if test "$ac_test_CFLAGS" = set; then
1036 CFLAGS="$ac_save_CFLAGS"
1037 elif test $ac_cv_prog_cc_g = yes; then
1038 if test "$GCC" = yes; then
1039 CFLAGS="-g -O2"
1040 else
1041 CFLAGS="-g"
1043 else
1044 if test "$GCC" = yes; then
1045 CFLAGS="-O2"
1046 else
1047 CFLAGS=
1051 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1052 echo "configure:1053: checking how to run the C preprocessor" >&5
1053 # On Suns, sometimes $CPP names a directory.
1054 if test -n "$CPP" && test -d "$CPP"; then
1055 CPP=
1057 if test -z "$CPP"; then
1058 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1059 echo $ac_n "(cached) $ac_c" 1>&6
1060 else
1061 # This must be in double quotes, not single quotes, because CPP may get
1062 # substituted into the Makefile and "${CC-cc}" will confuse make.
1063 CPP="${CC-cc} -E"
1064 # On the NeXT, cc -E runs the code through the compiler's parser,
1065 # not just through cpp.
1066 cat > conftest.$ac_ext <<EOF
1067 #line 1068 "configure"
1068 #include "confdefs.h"
1069 #include <assert.h>
1070 Syntax Error
1072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1073 { (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1075 if test -z "$ac_err"; then
1077 else
1078 echo "$ac_err" >&5
1079 echo "configure: failed program was:" >&5
1080 cat conftest.$ac_ext >&5
1081 rm -rf conftest*
1082 CPP="${CC-cc} -E -traditional-cpp"
1083 cat > conftest.$ac_ext <<EOF
1084 #line 1085 "configure"
1085 #include "confdefs.h"
1086 #include <assert.h>
1087 Syntax Error
1089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1090 { (eval echo configure:1091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1092 if test -z "$ac_err"; then
1094 else
1095 echo "$ac_err" >&5
1096 echo "configure: failed program was:" >&5
1097 cat conftest.$ac_ext >&5
1098 rm -rf conftest*
1099 CPP="${CC-cc} -nologo -E"
1100 cat > conftest.$ac_ext <<EOF
1101 #line 1102 "configure"
1102 #include "confdefs.h"
1103 #include <assert.h>
1104 Syntax Error
1106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1107 { (eval echo configure:1108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1109 if test -z "$ac_err"; then
1111 else
1112 echo "$ac_err" >&5
1113 echo "configure: failed program was:" >&5
1114 cat conftest.$ac_ext >&5
1115 rm -rf conftest*
1116 CPP=/lib/cpp
1118 rm -f conftest*
1120 rm -f conftest*
1122 rm -f conftest*
1123 ac_cv_prog_CPP="$CPP"
1125 CPP="$ac_cv_prog_CPP"
1126 else
1127 ac_cv_prog_CPP="$CPP"
1129 echo "$ac_t""$CPP" 1>&6
1131 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1132 echo "configure:1133: checking for AIX" >&5
1133 cat > conftest.$ac_ext <<EOF
1134 #line 1135 "configure"
1135 #include "confdefs.h"
1136 #ifdef _AIX
1138 #endif
1141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1142 egrep "yes" >/dev/null 2>&1; then
1143 rm -rf conftest*
1144 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1145 #define _ALL_SOURCE 1
1148 else
1149 rm -rf conftest*
1150 echo "$ac_t""no" 1>&6
1152 rm -f conftest*
1155 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1156 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1157 echo "configure:1158: checking for minix/config.h" >&5
1158 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1159 echo $ac_n "(cached) $ac_c" 1>&6
1160 else
1161 cat > conftest.$ac_ext <<EOF
1162 #line 1163 "configure"
1163 #include "confdefs.h"
1164 #include <minix/config.h>
1166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1167 { (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1169 if test -z "$ac_err"; then
1170 rm -rf conftest*
1171 eval "ac_cv_header_$ac_safe=yes"
1172 else
1173 echo "$ac_err" >&5
1174 echo "configure: failed program was:" >&5
1175 cat conftest.$ac_ext >&5
1176 rm -rf conftest*
1177 eval "ac_cv_header_$ac_safe=no"
1179 rm -f conftest*
1181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1182 echo "$ac_t""yes" 1>&6
1183 MINIX=yes
1184 else
1185 echo "$ac_t""no" 1>&6
1186 MINIX=
1189 if test "$MINIX" = yes; then
1190 cat >> confdefs.h <<\EOF
1191 #define _POSIX_SOURCE 1
1194 cat >> confdefs.h <<\EOF
1195 #define _POSIX_1_SOURCE 2
1198 cat >> confdefs.h <<\EOF
1199 #define _MINIX 1
1205 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
1206 echo "configure:1207: checking for strerror in -lcposix" >&5
1207 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
1208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1209 echo $ac_n "(cached) $ac_c" 1>&6
1210 else
1211 ac_save_LIBS="$LIBS"
1212 LIBS="-lcposix $LIBS"
1213 cat > conftest.$ac_ext <<EOF
1214 #line 1215 "configure"
1215 #include "confdefs.h"
1216 /* Override any gcc2 internal prototype to avoid an error. */
1217 /* We use char because int might match the return type of a gcc2
1218 builtin and then its argument prototype would still apply. */
1219 char strerror();
1221 int main() {
1222 strerror()
1223 ; return 0; }
1225 if { (eval echo configure:1226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1226 rm -rf conftest*
1227 eval "ac_cv_lib_$ac_lib_var=yes"
1228 else
1229 echo "configure: failed program was:" >&5
1230 cat conftest.$ac_ext >&5
1231 rm -rf conftest*
1232 eval "ac_cv_lib_$ac_lib_var=no"
1234 rm -f conftest*
1235 LIBS="$ac_save_LIBS"
1238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1239 echo "$ac_t""yes" 1>&6
1240 LIBS="$LIBS -lcposix"
1241 else
1242 echo "$ac_t""no" 1>&6
1247 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1248 echo "configure:1249: checking how to run the C preprocessor" >&5
1249 # On Suns, sometimes $CPP names a directory.
1250 if test -n "$CPP" && test -d "$CPP"; then
1251 CPP=
1253 if test -z "$CPP"; then
1254 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1255 echo $ac_n "(cached) $ac_c" 1>&6
1256 else
1257 # This must be in double quotes, not single quotes, because CPP may get
1258 # substituted into the Makefile and "${CC-cc}" will confuse make.
1259 CPP="${CC-cc} -E"
1260 # On the NeXT, cc -E runs the code through the compiler's parser,
1261 # not just through cpp.
1262 cat > conftest.$ac_ext <<EOF
1263 #line 1264 "configure"
1264 #include "confdefs.h"
1265 #include <assert.h>
1266 Syntax Error
1268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1269 { (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1271 if test -z "$ac_err"; then
1273 else
1274 echo "$ac_err" >&5
1275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
1277 rm -rf conftest*
1278 CPP="${CC-cc} -E -traditional-cpp"
1279 cat > conftest.$ac_ext <<EOF
1280 #line 1281 "configure"
1281 #include "confdefs.h"
1282 #include <assert.h>
1283 Syntax Error
1285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1286 { (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1288 if test -z "$ac_err"; then
1290 else
1291 echo "$ac_err" >&5
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -rf conftest*
1295 CPP="${CC-cc} -nologo -E"
1296 cat > conftest.$ac_ext <<EOF
1297 #line 1298 "configure"
1298 #include "confdefs.h"
1299 #include <assert.h>
1300 Syntax Error
1302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1303 { (eval echo configure:1304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1305 if test -z "$ac_err"; then
1307 else
1308 echo "$ac_err" >&5
1309 echo "configure: failed program was:" >&5
1310 cat conftest.$ac_ext >&5
1311 rm -rf conftest*
1312 CPP=/lib/cpp
1314 rm -f conftest*
1316 rm -f conftest*
1318 rm -f conftest*
1319 ac_cv_prog_CPP="$CPP"
1321 CPP="$ac_cv_prog_CPP"
1322 else
1323 ac_cv_prog_CPP="$CPP"
1325 echo "$ac_t""$CPP" 1>&6
1330 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1331 echo "configure:1332: checking for ${CC-cc} option to accept ANSI C" >&5
1332 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335 am_cv_prog_cc_stdc=no
1336 ac_save_CC="$CC"
1337 # Don't try gcc -ansi; that turns off useful extensions and
1338 # breaks some systems' header files.
1339 # AIX -qlanglvl=ansi
1340 # Ultrix and OSF/1 -std1
1341 # HP-UX -Aa -D_HPUX_SOURCE
1342 # SVR4 -Xc -D__EXTENSIONS__
1343 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1345 CC="$ac_save_CC $ac_arg"
1346 cat > conftest.$ac_ext <<EOF
1347 #line 1348 "configure"
1348 #include "confdefs.h"
1349 #include <stdarg.h>
1350 #include <stdio.h>
1351 #include <sys/types.h>
1352 #include <sys/stat.h>
1353 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1354 struct buf { int x; };
1355 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1356 static char *e (p, i)
1357 char **p;
1358 int i;
1360 return p[i];
1362 static char *f (char * (*g) (char **, int), char **p, ...)
1364 char *s;
1365 va_list v;
1366 va_start (v,p);
1367 s = g (p, va_arg (v,int));
1368 va_end (v);
1369 return s;
1371 int test (int i, double x);
1372 struct s1 {int (*f) (int a);};
1373 struct s2 {int (*f) (double a);};
1374 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1375 int argc;
1376 char **argv;
1378 int main() {
1380 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1382 ; return 0; }
1384 if { (eval echo configure:1385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1385 rm -rf conftest*
1386 am_cv_prog_cc_stdc="$ac_arg"; break
1387 else
1388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
1391 rm -f conftest*
1392 done
1393 CC="$ac_save_CC"
1397 if test -z "$am_cv_prog_cc_stdc"; then
1398 echo "$ac_t""none needed" 1>&6
1399 else
1400 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1402 case "x$am_cv_prog_cc_stdc" in
1403 x|xno) ;;
1404 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1405 esac
1409 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
1410 echo "configure:1411: checking for function prototypes" >&5
1411 if test "$am_cv_prog_cc_stdc" != no; then
1412 echo "$ac_t""yes" 1>&6
1413 cat >> confdefs.h <<\EOF
1414 #define PROTOTYPES 1
1417 U= ANSI2KNR=
1418 else
1419 echo "$ac_t""no" 1>&6
1420 U=_ ANSI2KNR=./ansi2knr
1421 # Ensure some checks needed by ansi2knr itself.
1422 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1423 echo "configure:1424: checking for ANSI C header files" >&5
1424 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1425 echo $ac_n "(cached) $ac_c" 1>&6
1426 else
1427 cat > conftest.$ac_ext <<EOF
1428 #line 1429 "configure"
1429 #include "confdefs.h"
1430 #include <stdlib.h>
1431 #include <stdarg.h>
1432 #include <string.h>
1433 #include <float.h>
1435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1436 { (eval echo configure:1437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1438 if test -z "$ac_err"; then
1439 rm -rf conftest*
1440 ac_cv_header_stdc=yes
1441 else
1442 echo "$ac_err" >&5
1443 echo "configure: failed program was:" >&5
1444 cat conftest.$ac_ext >&5
1445 rm -rf conftest*
1446 ac_cv_header_stdc=no
1448 rm -f conftest*
1450 if test $ac_cv_header_stdc = yes; then
1451 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1452 cat > conftest.$ac_ext <<EOF
1453 #line 1454 "configure"
1454 #include "confdefs.h"
1455 #include <string.h>
1457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1458 egrep "memchr" >/dev/null 2>&1; then
1460 else
1461 rm -rf conftest*
1462 ac_cv_header_stdc=no
1464 rm -f conftest*
1468 if test $ac_cv_header_stdc = yes; then
1469 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1470 cat > conftest.$ac_ext <<EOF
1471 #line 1472 "configure"
1472 #include "confdefs.h"
1473 #include <stdlib.h>
1475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1476 egrep "free" >/dev/null 2>&1; then
1478 else
1479 rm -rf conftest*
1480 ac_cv_header_stdc=no
1482 rm -f conftest*
1486 if test $ac_cv_header_stdc = yes; then
1487 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1488 if test "$cross_compiling" = yes; then
1490 else
1491 cat > conftest.$ac_ext <<EOF
1492 #line 1493 "configure"
1493 #include "confdefs.h"
1494 #include <ctype.h>
1495 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1496 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1497 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1498 int main () { int i; for (i = 0; i < 256; i++)
1499 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1500 exit (0); }
1503 if { (eval echo configure:1504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1504 then
1506 else
1507 echo "configure: failed program was:" >&5
1508 cat conftest.$ac_ext >&5
1509 rm -fr conftest*
1510 ac_cv_header_stdc=no
1512 rm -fr conftest*
1518 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1519 if test $ac_cv_header_stdc = yes; then
1520 cat >> confdefs.h <<\EOF
1521 #define STDC_HEADERS 1
1526 for ac_hdr in string.h
1528 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1529 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1530 echo "configure:1531: checking for $ac_hdr" >&5
1531 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1532 echo $ac_n "(cached) $ac_c" 1>&6
1533 else
1534 cat > conftest.$ac_ext <<EOF
1535 #line 1536 "configure"
1536 #include "confdefs.h"
1537 #include <$ac_hdr>
1539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1540 { (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1542 if test -z "$ac_err"; then
1543 rm -rf conftest*
1544 eval "ac_cv_header_$ac_safe=yes"
1545 else
1546 echo "$ac_err" >&5
1547 echo "configure: failed program was:" >&5
1548 cat conftest.$ac_ext >&5
1549 rm -rf conftest*
1550 eval "ac_cv_header_$ac_safe=no"
1552 rm -f conftest*
1554 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1555 echo "$ac_t""yes" 1>&6
1556 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1557 cat >> confdefs.h <<EOF
1558 #define $ac_tr_hdr 1
1561 else
1562 echo "$ac_t""no" 1>&6
1564 done
1568 # Find a good install program. We prefer a C program (faster),
1569 # so one script is as good as another. But avoid the broken or
1570 # incompatible versions:
1571 # SysV /etc/install, /usr/sbin/install
1572 # SunOS /usr/etc/install
1573 # IRIX /sbin/install
1574 # AIX /bin/install
1575 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1576 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1577 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1578 # ./install, which can be erroneously created by make from ./install.sh.
1579 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1580 echo "configure:1581: checking for a BSD compatible install" >&5
1581 if test -z "$INSTALL"; then
1582 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1583 echo $ac_n "(cached) $ac_c" 1>&6
1584 else
1585 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1586 for ac_dir in $PATH; do
1587 # Account for people who put trailing slashes in PATH elements.
1588 case "$ac_dir/" in
1589 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1591 # OSF1 and SCO ODT 3.0 have their own names for install.
1592 # Don't use installbsd from OSF since it installs stuff as root
1593 # by default.
1594 for ac_prog in ginstall scoinst install; do
1595 if test -f $ac_dir/$ac_prog; then
1596 if test $ac_prog = install &&
1597 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1598 # AIX install. It has an incompatible calling convention.
1600 else
1601 ac_cv_path_install="$ac_dir/$ac_prog -c"
1602 break 2
1605 done
1607 esac
1608 done
1609 IFS="$ac_save_IFS"
1612 if test "${ac_cv_path_install+set}" = set; then
1613 INSTALL="$ac_cv_path_install"
1614 else
1615 # As a last resort, use the slow shell script. We don't cache a
1616 # path for INSTALL within a source directory, because that will
1617 # break other packages using the cache if that directory is
1618 # removed, or if the path is relative.
1619 INSTALL="$ac_install_sh"
1622 echo "$ac_t""$INSTALL" 1>&6
1624 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1625 # It thinks the first close brace ends the variable substitution.
1626 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1628 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1630 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1632 # Extract the first word of "ranlib", so it can be a program name with args.
1633 set dummy ranlib; ac_word=$2
1634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1635 echo "configure:1636: checking for $ac_word" >&5
1636 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1637 echo $ac_n "(cached) $ac_c" 1>&6
1638 else
1639 if test -n "$RANLIB"; then
1640 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1641 else
1642 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1643 ac_dummy="$PATH"
1644 for ac_dir in $ac_dummy; do
1645 test -z "$ac_dir" && ac_dir=.
1646 if test -f $ac_dir/$ac_word; then
1647 ac_cv_prog_RANLIB="ranlib"
1648 break
1650 done
1651 IFS="$ac_save_ifs"
1652 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1655 RANLIB="$ac_cv_prog_RANLIB"
1656 if test -n "$RANLIB"; then
1657 echo "$ac_t""$RANLIB" 1>&6
1658 else
1659 echo "$ac_t""no" 1>&6
1662 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1663 echo "configure:1664: checking whether ${MAKE-make} sets \${MAKE}" >&5
1664 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1665 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1666 echo $ac_n "(cached) $ac_c" 1>&6
1667 else
1668 cat > conftestmake <<\EOF
1669 all:
1670 @echo 'ac_maketemp="${MAKE}"'
1672 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1673 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1674 if test -n "$ac_maketemp"; then
1675 eval ac_cv_prog_make_${ac_make}_set=yes
1676 else
1677 eval ac_cv_prog_make_${ac_make}_set=no
1679 rm -f conftestmake
1681 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1682 echo "$ac_t""yes" 1>&6
1683 SET_MAKE=
1684 else
1685 echo "$ac_t""no" 1>&6
1686 SET_MAKE="MAKE=${MAKE-make}"
1691 echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
1692 echo "configure:1693: checking for getpwnam in -lsun" >&5
1693 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'`
1694 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1695 echo $ac_n "(cached) $ac_c" 1>&6
1696 else
1697 ac_save_LIBS="$LIBS"
1698 LIBS="-lsun $LIBS"
1699 cat > conftest.$ac_ext <<EOF
1700 #line 1701 "configure"
1701 #include "confdefs.h"
1702 /* Override any gcc2 internal prototype to avoid an error. */
1703 /* We use char because int might match the return type of a gcc2
1704 builtin and then its argument prototype would still apply. */
1705 char getpwnam();
1707 int main() {
1708 getpwnam()
1709 ; return 0; }
1711 if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1712 rm -rf conftest*
1713 eval "ac_cv_lib_$ac_lib_var=yes"
1714 else
1715 echo "configure: failed program was:" >&5
1716 cat conftest.$ac_ext >&5
1717 rm -rf conftest*
1718 eval "ac_cv_lib_$ac_lib_var=no"
1720 rm -f conftest*
1721 LIBS="$ac_save_LIBS"
1724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1725 echo "$ac_t""yes" 1>&6
1726 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1727 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1728 cat >> confdefs.h <<EOF
1729 #define $ac_tr_lib 1
1732 LIBS="-lsun $LIBS"
1734 else
1735 echo "$ac_t""no" 1>&6
1739 for ac_hdr in fcntl.h string.h limits.h unistd.h errno.h
1741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1743 echo "configure:1744: checking for $ac_hdr" >&5
1744 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1745 echo $ac_n "(cached) $ac_c" 1>&6
1746 else
1747 cat > conftest.$ac_ext <<EOF
1748 #line 1749 "configure"
1749 #include "confdefs.h"
1750 #include <$ac_hdr>
1752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1753 { (eval echo configure:1754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1755 if test -z "$ac_err"; then
1756 rm -rf conftest*
1757 eval "ac_cv_header_$ac_safe=yes"
1758 else
1759 echo "$ac_err" >&5
1760 echo "configure: failed program was:" >&5
1761 cat conftest.$ac_ext >&5
1762 rm -rf conftest*
1763 eval "ac_cv_header_$ac_safe=no"
1765 rm -f conftest*
1767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1768 echo "$ac_t""yes" 1>&6
1769 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1770 cat >> confdefs.h <<EOF
1771 #define $ac_tr_hdr 1
1774 else
1775 echo "$ac_t""no" 1>&6
1777 done
1779 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1780 echo "configure:1781: checking for ANSI C header files" >&5
1781 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1782 echo $ac_n "(cached) $ac_c" 1>&6
1783 else
1784 cat > conftest.$ac_ext <<EOF
1785 #line 1786 "configure"
1786 #include "confdefs.h"
1787 #include <stdlib.h>
1788 #include <stdarg.h>
1789 #include <string.h>
1790 #include <float.h>
1792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1793 { (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1795 if test -z "$ac_err"; then
1796 rm -rf conftest*
1797 ac_cv_header_stdc=yes
1798 else
1799 echo "$ac_err" >&5
1800 echo "configure: failed program was:" >&5
1801 cat conftest.$ac_ext >&5
1802 rm -rf conftest*
1803 ac_cv_header_stdc=no
1805 rm -f conftest*
1807 if test $ac_cv_header_stdc = yes; then
1808 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1809 cat > conftest.$ac_ext <<EOF
1810 #line 1811 "configure"
1811 #include "confdefs.h"
1812 #include <string.h>
1814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1815 egrep "memchr" >/dev/null 2>&1; then
1817 else
1818 rm -rf conftest*
1819 ac_cv_header_stdc=no
1821 rm -f conftest*
1825 if test $ac_cv_header_stdc = yes; then
1826 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1827 cat > conftest.$ac_ext <<EOF
1828 #line 1829 "configure"
1829 #include "confdefs.h"
1830 #include <stdlib.h>
1832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1833 egrep "free" >/dev/null 2>&1; then
1835 else
1836 rm -rf conftest*
1837 ac_cv_header_stdc=no
1839 rm -f conftest*
1843 if test $ac_cv_header_stdc = yes; then
1844 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1845 if test "$cross_compiling" = yes; then
1847 else
1848 cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 #include <ctype.h>
1852 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1853 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1854 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1855 int main () { int i; for (i = 0; i < 256; i++)
1856 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1857 exit (0); }
1860 if { (eval echo configure:1861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1861 then
1863 else
1864 echo "configure: failed program was:" >&5
1865 cat conftest.$ac_ext >&5
1866 rm -fr conftest*
1867 ac_cv_header_stdc=no
1869 rm -fr conftest*
1875 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1876 if test $ac_cv_header_stdc = yes; then
1877 cat >> confdefs.h <<\EOF
1878 #define STDC_HEADERS 1
1883 echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
1884 echo "configure:1885: checking whether sys/types.h defines makedev" >&5
1885 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
1886 echo $ac_n "(cached) $ac_c" 1>&6
1887 else
1888 cat > conftest.$ac_ext <<EOF
1889 #line 1890 "configure"
1890 #include "confdefs.h"
1891 #include <sys/types.h>
1892 int main() {
1893 return makedev(0, 0);
1894 ; return 0; }
1896 if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1897 rm -rf conftest*
1898 ac_cv_header_sys_types_h_makedev=yes
1899 else
1900 echo "configure: failed program was:" >&5
1901 cat conftest.$ac_ext >&5
1902 rm -rf conftest*
1903 ac_cv_header_sys_types_h_makedev=no
1905 rm -f conftest*
1909 echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
1911 if test $ac_cv_header_sys_types_h_makedev = no; then
1912 ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
1913 echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
1914 echo "configure:1915: checking for sys/mkdev.h" >&5
1915 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1916 echo $ac_n "(cached) $ac_c" 1>&6
1917 else
1918 cat > conftest.$ac_ext <<EOF
1919 #line 1920 "configure"
1920 #include "confdefs.h"
1921 #include <sys/mkdev.h>
1923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1924 { (eval echo configure:1925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1925 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1926 if test -z "$ac_err"; then
1927 rm -rf conftest*
1928 eval "ac_cv_header_$ac_safe=yes"
1929 else
1930 echo "$ac_err" >&5
1931 echo "configure: failed program was:" >&5
1932 cat conftest.$ac_ext >&5
1933 rm -rf conftest*
1934 eval "ac_cv_header_$ac_safe=no"
1936 rm -f conftest*
1938 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1939 echo "$ac_t""yes" 1>&6
1940 cat >> confdefs.h <<\EOF
1941 #define MAJOR_IN_MKDEV 1
1944 else
1945 echo "$ac_t""no" 1>&6
1949 if test $ac_cv_header_sys_mkdev_h = no; then
1950 ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
1951 echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
1952 echo "configure:1953: checking for sys/sysmacros.h" >&5
1953 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1954 echo $ac_n "(cached) $ac_c" 1>&6
1955 else
1956 cat > conftest.$ac_ext <<EOF
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959 #include <sys/sysmacros.h>
1961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1962 { (eval echo configure:1963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1964 if test -z "$ac_err"; then
1965 rm -rf conftest*
1966 eval "ac_cv_header_$ac_safe=yes"
1967 else
1968 echo "$ac_err" >&5
1969 echo "configure: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 rm -rf conftest*
1972 eval "ac_cv_header_$ac_safe=no"
1974 rm -f conftest*
1976 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1977 echo "$ac_t""yes" 1>&6
1978 cat >> confdefs.h <<\EOF
1979 #define MAJOR_IN_SYSMACROS 1
1982 else
1983 echo "$ac_t""no" 1>&6
1989 ac_header_dirent=no
1990 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1993 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1994 echo "configure:1995: checking for $ac_hdr that defines DIR" >&5
1995 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1996 echo $ac_n "(cached) $ac_c" 1>&6
1997 else
1998 cat > conftest.$ac_ext <<EOF
1999 #line 2000 "configure"
2000 #include "confdefs.h"
2001 #include <sys/types.h>
2002 #include <$ac_hdr>
2003 int main() {
2004 DIR *dirp = 0;
2005 ; return 0; }
2007 if { (eval echo configure:2008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2008 rm -rf conftest*
2009 eval "ac_cv_header_dirent_$ac_safe=yes"
2010 else
2011 echo "configure: failed program was:" >&5
2012 cat conftest.$ac_ext >&5
2013 rm -rf conftest*
2014 eval "ac_cv_header_dirent_$ac_safe=no"
2016 rm -f conftest*
2018 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2019 echo "$ac_t""yes" 1>&6
2020 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2021 cat >> confdefs.h <<EOF
2022 #define $ac_tr_hdr 1
2024 ac_header_dirent=$ac_hdr; break
2025 else
2026 echo "$ac_t""no" 1>&6
2028 done
2029 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2030 if test $ac_header_dirent = dirent.h; then
2031 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2032 echo "configure:2033: checking for opendir in -ldir" >&5
2033 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2034 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2035 echo $ac_n "(cached) $ac_c" 1>&6
2036 else
2037 ac_save_LIBS="$LIBS"
2038 LIBS="-ldir $LIBS"
2039 cat > conftest.$ac_ext <<EOF
2040 #line 2041 "configure"
2041 #include "confdefs.h"
2042 /* Override any gcc2 internal prototype to avoid an error. */
2043 /* We use char because int might match the return type of a gcc2
2044 builtin and then its argument prototype would still apply. */
2045 char opendir();
2047 int main() {
2048 opendir()
2049 ; return 0; }
2051 if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2052 rm -rf conftest*
2053 eval "ac_cv_lib_$ac_lib_var=yes"
2054 else
2055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 rm -rf conftest*
2058 eval "ac_cv_lib_$ac_lib_var=no"
2060 rm -f conftest*
2061 LIBS="$ac_save_LIBS"
2064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2065 echo "$ac_t""yes" 1>&6
2066 LIBS="$LIBS -ldir"
2067 else
2068 echo "$ac_t""no" 1>&6
2071 else
2072 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2073 echo "configure:2074: checking for opendir in -lx" >&5
2074 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2075 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2076 echo $ac_n "(cached) $ac_c" 1>&6
2077 else
2078 ac_save_LIBS="$LIBS"
2079 LIBS="-lx $LIBS"
2080 cat > conftest.$ac_ext <<EOF
2081 #line 2082 "configure"
2082 #include "confdefs.h"
2083 /* Override any gcc2 internal prototype to avoid an error. */
2084 /* We use char because int might match the return type of a gcc2
2085 builtin and then its argument prototype would still apply. */
2086 char opendir();
2088 int main() {
2089 opendir()
2090 ; return 0; }
2092 if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2093 rm -rf conftest*
2094 eval "ac_cv_lib_$ac_lib_var=yes"
2095 else
2096 echo "configure: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 rm -rf conftest*
2099 eval "ac_cv_lib_$ac_lib_var=no"
2101 rm -f conftest*
2102 LIBS="$ac_save_LIBS"
2105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2106 echo "$ac_t""yes" 1>&6
2107 LIBS="$LIBS -lx"
2108 else
2109 echo "$ac_t""no" 1>&6
2114 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
2115 echo "configure:2116: checking whether stat file-mode macros are broken" >&5
2116 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
2117 echo $ac_n "(cached) $ac_c" 1>&6
2118 else
2119 cat > conftest.$ac_ext <<EOF
2120 #line 2121 "configure"
2121 #include "confdefs.h"
2122 #include <sys/types.h>
2123 #include <sys/stat.h>
2125 #if defined(S_ISBLK) && defined(S_IFDIR)
2126 # if S_ISBLK (S_IFDIR)
2127 You lose.
2128 # endif
2129 #endif
2131 #if defined(S_ISBLK) && defined(S_IFCHR)
2132 # if S_ISBLK (S_IFCHR)
2133 You lose.
2134 # endif
2135 #endif
2137 #if defined(S_ISLNK) && defined(S_IFREG)
2138 # if S_ISLNK (S_IFREG)
2139 You lose.
2140 # endif
2141 #endif
2143 #if defined(S_ISSOCK) && defined(S_IFREG)
2144 # if S_ISSOCK (S_IFREG)
2145 You lose.
2146 # endif
2147 #endif
2150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2151 egrep "You lose" >/dev/null 2>&1; then
2152 rm -rf conftest*
2153 ac_cv_header_stat_broken=yes
2154 else
2155 rm -rf conftest*
2156 ac_cv_header_stat_broken=no
2158 rm -f conftest*
2162 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
2163 if test $ac_cv_header_stat_broken = yes; then
2164 cat >> confdefs.h <<\EOF
2165 #define STAT_MACROS_BROKEN 1
2170 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2171 echo "configure:2172: checking for sys/wait.h that is POSIX.1 compatible" >&5
2172 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2173 echo $ac_n "(cached) $ac_c" 1>&6
2174 else
2175 cat > conftest.$ac_ext <<EOF
2176 #line 2177 "configure"
2177 #include "confdefs.h"
2178 #include <sys/types.h>
2179 #include <sys/wait.h>
2180 #ifndef WEXITSTATUS
2181 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2182 #endif
2183 #ifndef WIFEXITED
2184 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2185 #endif
2186 int main() {
2187 int s;
2188 wait (&s);
2189 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2190 ; return 0; }
2192 if { (eval echo configure:2193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2193 rm -rf conftest*
2194 ac_cv_header_sys_wait_h=yes
2195 else
2196 echo "configure: failed program was:" >&5
2197 cat conftest.$ac_ext >&5
2198 rm -rf conftest*
2199 ac_cv_header_sys_wait_h=no
2201 rm -f conftest*
2204 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2205 if test $ac_cv_header_sys_wait_h = yes; then
2206 cat >> confdefs.h <<\EOF
2207 #define HAVE_SYS_WAIT_H 1
2213 echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6
2214 echo "configure:2215: checking how to get filesystem type" >&5
2215 fstype=no
2216 # The order of these tests is important.
2217 cat > conftest.$ac_ext <<EOF
2218 #line 2219 "configure"
2219 #include "confdefs.h"
2220 #include <sys/statvfs.h>
2221 #include <sys/fstyp.h>
2223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2224 { (eval echo configure:2225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2226 if test -z "$ac_err"; then
2227 rm -rf conftest*
2228 cat >> confdefs.h <<\EOF
2229 #define FSTYPE_STATVFS 1
2231 fstype=SVR4
2232 else
2233 echo "$ac_err" >&5
2234 echo "configure: failed program was:" >&5
2235 cat conftest.$ac_ext >&5
2237 rm -f conftest*
2238 if test $fstype = no; then
2239 cat > conftest.$ac_ext <<EOF
2240 #line 2241 "configure"
2241 #include "confdefs.h"
2242 #include <sys/statfs.h>
2243 #include <sys/fstyp.h>
2245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2246 { (eval echo configure:2247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2248 if test -z "$ac_err"; then
2249 rm -rf conftest*
2250 cat >> confdefs.h <<\EOF
2251 #define FSTYPE_USG_STATFS 1
2253 fstype=SVR3
2254 else
2255 echo "$ac_err" >&5
2256 echo "configure: failed program was:" >&5
2257 cat conftest.$ac_ext >&5
2259 rm -f conftest*
2261 if test $fstype = no; then
2262 cat > conftest.$ac_ext <<EOF
2263 #line 2264 "configure"
2264 #include "confdefs.h"
2265 #include <sys/statfs.h>
2266 #include <sys/vmount.h>
2268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2269 { (eval echo configure:2270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2271 if test -z "$ac_err"; then
2272 rm -rf conftest*
2273 cat >> confdefs.h <<\EOF
2274 #define FSTYPE_AIX_STATFS 1
2276 fstype=AIX
2277 else
2278 echo "$ac_err" >&5
2279 echo "configure: failed program was:" >&5
2280 cat conftest.$ac_ext >&5
2282 rm -f conftest*
2284 if test $fstype = no; then
2285 cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288 #include <mntent.h>
2290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2291 { (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2293 if test -z "$ac_err"; then
2294 rm -rf conftest*
2295 cat >> confdefs.h <<\EOF
2296 #define FSTYPE_MNTENT 1
2298 fstype=4.3BSD
2299 else
2300 echo "$ac_err" >&5
2301 echo "configure: failed program was:" >&5
2302 cat conftest.$ac_ext >&5
2304 rm -f conftest*
2306 if test $fstype = no; then
2307 cat > conftest.$ac_ext <<EOF
2308 #line 2309 "configure"
2309 #include "confdefs.h"
2310 #include <sys/mount.h>
2312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2313 egrep "f_type;" >/dev/null 2>&1; then
2314 rm -rf conftest*
2315 cat >> confdefs.h <<\EOF
2316 #define FSTYPE_STATFS 1
2318 fstype=4.4BSD/OSF1
2320 rm -f conftest*
2323 if test $fstype = no; then
2324 cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 #include <sys/mount.h>
2328 #include <sys/fs_types.h>
2330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2331 { (eval echo configure:2332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2333 if test -z "$ac_err"; then
2334 rm -rf conftest*
2335 cat >> confdefs.h <<\EOF
2336 #define FSTYPE_GETMNT 1
2338 fstype=Ultrix
2339 else
2340 echo "$ac_err" >&5
2341 echo "configure: failed program was:" >&5
2342 cat conftest.$ac_ext >&5
2344 rm -f conftest*
2346 echo "$ac_t""$fstype" 1>&6
2349 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2350 echo "configure:2351: checking for uid_t in sys/types.h" >&5
2351 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2352 echo $ac_n "(cached) $ac_c" 1>&6
2353 else
2354 cat > conftest.$ac_ext <<EOF
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 #include <sys/types.h>
2359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2360 egrep "uid_t" >/dev/null 2>&1; then
2361 rm -rf conftest*
2362 ac_cv_type_uid_t=yes
2363 else
2364 rm -rf conftest*
2365 ac_cv_type_uid_t=no
2367 rm -f conftest*
2371 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2372 if test $ac_cv_type_uid_t = no; then
2373 cat >> confdefs.h <<\EOF
2374 #define uid_t int
2377 cat >> confdefs.h <<\EOF
2378 #define gid_t int
2383 for ac_hdr in unistd.h
2385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2387 echo "configure:2388: checking for $ac_hdr" >&5
2388 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2389 echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391 cat > conftest.$ac_ext <<EOF
2392 #line 2393 "configure"
2393 #include "confdefs.h"
2394 #include <$ac_hdr>
2396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2397 { (eval echo configure:2398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2399 if test -z "$ac_err"; then
2400 rm -rf conftest*
2401 eval "ac_cv_header_$ac_safe=yes"
2402 else
2403 echo "$ac_err" >&5
2404 echo "configure: failed program was:" >&5
2405 cat conftest.$ac_ext >&5
2406 rm -rf conftest*
2407 eval "ac_cv_header_$ac_safe=no"
2409 rm -f conftest*
2411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2412 echo "$ac_t""yes" 1>&6
2413 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2414 cat >> confdefs.h <<EOF
2415 #define $ac_tr_hdr 1
2418 else
2419 echo "$ac_t""no" 1>&6
2421 done
2423 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2424 echo "configure:2425: checking for size_t" >&5
2425 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2426 echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428 cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 #include <sys/types.h>
2432 #if STDC_HEADERS
2433 # include <stdlib.h>
2434 # include <stddef.h>
2435 #endif
2436 #if HAVE_UNISTD_H
2437 # include <unistd.h>
2438 #endif
2440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2441 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2442 rm -rf conftest*
2443 ac_cv_type_size_t=yes
2444 else
2445 rm -rf conftest*
2446 ac_cv_type_size_t=no
2448 rm -f conftest*
2451 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2452 if test $ac_cv_type_size_t = no; then
2453 cat >> confdefs.h <<\EOF
2454 #define size_t unsigned
2459 for ac_hdr in unistd.h
2461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2463 echo "configure:2464: checking for $ac_hdr" >&5
2464 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2465 echo $ac_n "(cached) $ac_c" 1>&6
2466 else
2467 cat > conftest.$ac_ext <<EOF
2468 #line 2469 "configure"
2469 #include "confdefs.h"
2470 #include <$ac_hdr>
2472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2473 { (eval echo configure:2474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2475 if test -z "$ac_err"; then
2476 rm -rf conftest*
2477 eval "ac_cv_header_$ac_safe=yes"
2478 else
2479 echo "$ac_err" >&5
2480 echo "configure: failed program was:" >&5
2481 cat conftest.$ac_ext >&5
2482 rm -rf conftest*
2483 eval "ac_cv_header_$ac_safe=no"
2485 rm -f conftest*
2487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2488 echo "$ac_t""yes" 1>&6
2489 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2490 cat >> confdefs.h <<EOF
2491 #define $ac_tr_hdr 1
2494 else
2495 echo "$ac_t""no" 1>&6
2497 done
2499 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2500 echo "configure:2501: checking for pid_t" >&5
2501 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2502 echo $ac_n "(cached) $ac_c" 1>&6
2503 else
2504 cat > conftest.$ac_ext <<EOF
2505 #line 2506 "configure"
2506 #include "confdefs.h"
2507 #include <sys/types.h>
2508 #if STDC_HEADERS
2509 # include <stdlib.h>
2510 # include <stddef.h>
2511 #endif
2512 #if HAVE_UNISTD_H
2513 # include <unistd.h>
2514 #endif
2516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2517 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2518 rm -rf conftest*
2519 ac_cv_type_pid_t=yes
2520 else
2521 rm -rf conftest*
2522 ac_cv_type_pid_t=no
2524 rm -f conftest*
2527 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2528 if test $ac_cv_type_pid_t = no; then
2529 cat >> confdefs.h <<\EOF
2530 #define pid_t int
2535 for ac_hdr in unistd.h
2537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2539 echo "configure:2540: checking for $ac_hdr" >&5
2540 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2541 echo $ac_n "(cached) $ac_c" 1>&6
2542 else
2543 cat > conftest.$ac_ext <<EOF
2544 #line 2545 "configure"
2545 #include "confdefs.h"
2546 #include <$ac_hdr>
2548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2549 { (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2551 if test -z "$ac_err"; then
2552 rm -rf conftest*
2553 eval "ac_cv_header_$ac_safe=yes"
2554 else
2555 echo "$ac_err" >&5
2556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 rm -rf conftest*
2559 eval "ac_cv_header_$ac_safe=no"
2561 rm -f conftest*
2563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2564 echo "$ac_t""yes" 1>&6
2565 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2566 cat >> confdefs.h <<EOF
2567 #define $ac_tr_hdr 1
2570 else
2571 echo "$ac_t""no" 1>&6
2573 done
2575 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
2576 echo "configure:2577: checking for ino_t" >&5
2577 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
2578 echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580 cat > conftest.$ac_ext <<EOF
2581 #line 2582 "configure"
2582 #include "confdefs.h"
2583 #include <sys/types.h>
2584 #if STDC_HEADERS
2585 # include <stdlib.h>
2586 # include <stddef.h>
2587 #endif
2588 #if HAVE_UNISTD_H
2589 # include <unistd.h>
2590 #endif
2592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2593 egrep "ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2594 rm -rf conftest*
2595 ac_cv_type_ino_t=yes
2596 else
2597 rm -rf conftest*
2598 ac_cv_type_ino_t=no
2600 rm -f conftest*
2603 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
2604 if test $ac_cv_type_ino_t = no; then
2605 cat >> confdefs.h <<\EOF
2606 #define ino_t unsigned long
2611 for ac_hdr in unistd.h
2613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2615 echo "configure:2616: checking for $ac_hdr" >&5
2616 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2617 echo $ac_n "(cached) $ac_c" 1>&6
2618 else
2619 cat > conftest.$ac_ext <<EOF
2620 #line 2621 "configure"
2621 #include "confdefs.h"
2622 #include <$ac_hdr>
2624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2625 { (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2627 if test -z "$ac_err"; then
2628 rm -rf conftest*
2629 eval "ac_cv_header_$ac_safe=yes"
2630 else
2631 echo "$ac_err" >&5
2632 echo "configure: failed program was:" >&5
2633 cat conftest.$ac_ext >&5
2634 rm -rf conftest*
2635 eval "ac_cv_header_$ac_safe=no"
2637 rm -f conftest*
2639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2640 echo "$ac_t""yes" 1>&6
2641 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2642 cat >> confdefs.h <<EOF
2643 #define $ac_tr_hdr 1
2646 else
2647 echo "$ac_t""no" 1>&6
2649 done
2651 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
2652 echo "configure:2653: checking for dev_t" >&5
2653 if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
2655 else
2656 cat > conftest.$ac_ext <<EOF
2657 #line 2658 "configure"
2658 #include "confdefs.h"
2659 #include <sys/types.h>
2660 #if STDC_HEADERS
2661 # include <stdlib.h>
2662 # include <stddef.h>
2663 #endif
2664 #if HAVE_UNISTD_H
2665 # include <unistd.h>
2666 #endif
2668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2669 egrep "dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2670 rm -rf conftest*
2671 ac_cv_type_dev_t=yes
2672 else
2673 rm -rf conftest*
2674 ac_cv_type_dev_t=no
2676 rm -f conftest*
2679 echo "$ac_t""$ac_cv_type_dev_t" 1>&6
2680 if test $ac_cv_type_dev_t = no; then
2681 cat >> confdefs.h <<\EOF
2682 #define dev_t unsigned long
2687 for ac_hdr in unistd.h
2689 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2690 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2691 echo "configure:2692: checking for $ac_hdr" >&5
2692 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
2694 else
2695 cat > conftest.$ac_ext <<EOF
2696 #line 2697 "configure"
2697 #include "confdefs.h"
2698 #include <$ac_hdr>
2700 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2701 { (eval echo configure:2702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2702 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2703 if test -z "$ac_err"; then
2704 rm -rf conftest*
2705 eval "ac_cv_header_$ac_safe=yes"
2706 else
2707 echo "$ac_err" >&5
2708 echo "configure: failed program was:" >&5
2709 cat conftest.$ac_ext >&5
2710 rm -rf conftest*
2711 eval "ac_cv_header_$ac_safe=no"
2713 rm -f conftest*
2715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2716 echo "$ac_t""yes" 1>&6
2717 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2718 cat >> confdefs.h <<EOF
2719 #define $ac_tr_hdr 1
2722 else
2723 echo "$ac_t""no" 1>&6
2725 done
2727 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2728 echo "configure:2729: checking for mode_t" >&5
2729 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2730 echo $ac_n "(cached) $ac_c" 1>&6
2731 else
2732 cat > conftest.$ac_ext <<EOF
2733 #line 2734 "configure"
2734 #include "confdefs.h"
2735 #include <sys/types.h>
2736 #if STDC_HEADERS
2737 # include <stdlib.h>
2738 # include <stddef.h>
2739 #endif
2740 #if HAVE_UNISTD_H
2741 # include <unistd.h>
2742 #endif
2744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2745 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2746 rm -rf conftest*
2747 ac_cv_type_mode_t=yes
2748 else
2749 rm -rf conftest*
2750 ac_cv_type_mode_t=no
2752 rm -f conftest*
2755 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2756 if test $ac_cv_type_mode_t = no; then
2757 cat >> confdefs.h <<\EOF
2758 #define mode_t int
2763 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
2764 echo "configure:2765: checking for st_blocks in struct stat" >&5
2765 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
2766 echo $ac_n "(cached) $ac_c" 1>&6
2767 else
2768 cat > conftest.$ac_ext <<EOF
2769 #line 2770 "configure"
2770 #include "confdefs.h"
2771 #include <sys/types.h>
2772 #include <sys/stat.h>
2773 int main() {
2774 struct stat s; s.st_blocks;
2775 ; return 0; }
2777 if { (eval echo configure:2778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2778 rm -rf conftest*
2779 ac_cv_struct_st_blocks=yes
2780 else
2781 echo "configure: failed program was:" >&5
2782 cat conftest.$ac_ext >&5
2783 rm -rf conftest*
2784 ac_cv_struct_st_blocks=no
2786 rm -f conftest*
2789 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
2790 if test $ac_cv_struct_st_blocks = yes; then
2791 cat >> confdefs.h <<\EOF
2792 #define HAVE_ST_BLOCKS 1
2795 else
2796 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
2799 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2800 echo "configure:2801: checking for st_rdev in struct stat" >&5
2801 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2802 echo $ac_n "(cached) $ac_c" 1>&6
2803 else
2804 cat > conftest.$ac_ext <<EOF
2805 #line 2806 "configure"
2806 #include "confdefs.h"
2807 #include <sys/types.h>
2808 #include <sys/stat.h>
2809 int main() {
2810 struct stat s; s.st_rdev;
2811 ; return 0; }
2813 if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2814 rm -rf conftest*
2815 ac_cv_struct_st_rdev=yes
2816 else
2817 echo "configure: failed program was:" >&5
2818 cat conftest.$ac_ext >&5
2819 rm -rf conftest*
2820 ac_cv_struct_st_rdev=no
2822 rm -f conftest*
2825 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2826 if test $ac_cv_struct_st_rdev = yes; then
2827 cat >> confdefs.h <<\EOF
2828 #define HAVE_ST_RDEV 1
2833 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2834 echo "configure:2835: checking whether struct tm is in sys/time.h or time.h" >&5
2835 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2836 echo $ac_n "(cached) $ac_c" 1>&6
2837 else
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <sys/types.h>
2842 #include <time.h>
2843 int main() {
2844 struct tm *tp; tp->tm_sec;
2845 ; return 0; }
2847 if { (eval echo configure:2848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2848 rm -rf conftest*
2849 ac_cv_struct_tm=time.h
2850 else
2851 echo "configure: failed program was:" >&5
2852 cat conftest.$ac_ext >&5
2853 rm -rf conftest*
2854 ac_cv_struct_tm=sys/time.h
2856 rm -f conftest*
2859 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2860 if test $ac_cv_struct_tm = sys/time.h; then
2861 cat >> confdefs.h <<\EOF
2862 #define TM_IN_SYS_TIME 1
2867 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2868 echo "configure:2869: checking for tm_zone in struct tm" >&5
2869 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2870 echo $ac_n "(cached) $ac_c" 1>&6
2871 else
2872 cat > conftest.$ac_ext <<EOF
2873 #line 2874 "configure"
2874 #include "confdefs.h"
2875 #include <sys/types.h>
2876 #include <$ac_cv_struct_tm>
2877 int main() {
2878 struct tm tm; tm.tm_zone;
2879 ; return 0; }
2881 if { (eval echo configure:2882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2882 rm -rf conftest*
2883 ac_cv_struct_tm_zone=yes
2884 else
2885 echo "configure: failed program was:" >&5
2886 cat conftest.$ac_ext >&5
2887 rm -rf conftest*
2888 ac_cv_struct_tm_zone=no
2890 rm -f conftest*
2893 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2894 if test "$ac_cv_struct_tm_zone" = yes; then
2895 cat >> confdefs.h <<\EOF
2896 #define HAVE_TM_ZONE 1
2899 else
2900 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2901 echo "configure:2902: checking for tzname" >&5
2902 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2903 echo $ac_n "(cached) $ac_c" 1>&6
2904 else
2905 cat > conftest.$ac_ext <<EOF
2906 #line 2907 "configure"
2907 #include "confdefs.h"
2908 #include <time.h>
2909 #ifndef tzname /* For SGI. */
2910 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
2911 #endif
2912 int main() {
2913 atoi(*tzname);
2914 ; return 0; }
2916 if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2917 rm -rf conftest*
2918 ac_cv_var_tzname=yes
2919 else
2920 echo "configure: failed program was:" >&5
2921 cat conftest.$ac_ext >&5
2922 rm -rf conftest*
2923 ac_cv_var_tzname=no
2925 rm -f conftest*
2928 echo "$ac_t""$ac_cv_var_tzname" 1>&6
2929 if test $ac_cv_var_tzname = yes; then
2930 cat >> confdefs.h <<\EOF
2931 #define HAVE_TZNAME 1
2937 echo $ac_n "checking for working const""... $ac_c" 1>&6
2938 echo "configure:2939: checking for working const" >&5
2939 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2940 echo $ac_n "(cached) $ac_c" 1>&6
2941 else
2942 cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2946 int main() {
2948 /* Ultrix mips cc rejects this. */
2949 typedef int charset[2]; const charset x = {0, 0};
2950 /* SunOS 4.1.1 cc rejects this. */
2951 char const *const *ccp;
2952 char **p;
2953 /* NEC SVR4.0.2 mips cc rejects this. */
2954 struct point {int x, y;};
2955 static struct point const zero = {0,0};
2956 /* AIX XL C 1.02.0.0 rejects this.
2957 It does not let you subtract one const X* pointer from another in an arm
2958 of an if-expression whose if-part is not a constant expression */
2959 const char *g = "string";
2960 ccp = &g + (g ? g-g : 0);
2961 /* HPUX 7.0 cc rejects these. */
2962 ++ccp;
2963 p = (char**) ccp;
2964 ccp = (char const *const *) p;
2965 { /* SCO 3.2v4 cc rejects this. */
2966 char *t;
2967 char const *s = 0 ? (char *) 0 : (char const *) 0;
2969 *t++ = 0;
2971 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2972 int x[] = {25, 17};
2973 const int *foo = &x[0];
2974 ++foo;
2976 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2977 typedef const int *iptr;
2978 iptr p = 0;
2979 ++p;
2981 { /* AIX XL C 1.02.0.0 rejects this saying
2982 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2983 struct s { int j; const int *ap[3]; };
2984 struct s *b; b->j = 5;
2986 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2987 const int foo = 10;
2990 ; return 0; }
2992 if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2993 rm -rf conftest*
2994 ac_cv_c_const=yes
2995 else
2996 echo "configure: failed program was:" >&5
2997 cat conftest.$ac_ext >&5
2998 rm -rf conftest*
2999 ac_cv_c_const=no
3001 rm -f conftest*
3004 echo "$ac_t""$ac_cv_c_const" 1>&6
3005 if test $ac_cv_c_const = no; then
3006 cat >> confdefs.h <<EOF
3007 #define const /* empty */
3014 echo $ac_n "checking for strftime""... $ac_c" 1>&6
3015 echo "configure:3016: checking for strftime" >&5
3016 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
3017 echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019 cat > conftest.$ac_ext <<EOF
3020 #line 3021 "configure"
3021 #include "confdefs.h"
3022 /* System header to define __stub macros and hopefully few prototypes,
3023 which can conflict with char strftime(); below. */
3024 #include <assert.h>
3025 /* Override any gcc2 internal prototype to avoid an error. */
3026 /* We use char because int might match the return type of a gcc2
3027 builtin and then its argument prototype would still apply. */
3028 char strftime();
3030 int main() {
3032 /* The GNU C library defines this for functions which it implements
3033 to always fail with ENOSYS. Some functions are actually named
3034 something starting with __ and the normal name is an alias. */
3035 #if defined (__stub_strftime) || defined (__stub___strftime)
3036 choke me
3037 #else
3038 strftime();
3039 #endif
3041 ; return 0; }
3043 if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3044 rm -rf conftest*
3045 eval "ac_cv_func_strftime=yes"
3046 else
3047 echo "configure: failed program was:" >&5
3048 cat conftest.$ac_ext >&5
3049 rm -rf conftest*
3050 eval "ac_cv_func_strftime=no"
3052 rm -f conftest*
3055 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
3056 echo "$ac_t""yes" 1>&6
3057 cat >> confdefs.h <<\EOF
3058 #define HAVE_STRFTIME 1
3061 else
3062 echo "$ac_t""no" 1>&6
3063 # strftime is in -lintl on SCO UNIX.
3064 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
3065 echo "configure:3066: checking for strftime in -lintl" >&5
3066 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
3067 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3068 echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070 ac_save_LIBS="$LIBS"
3071 LIBS="-lintl $LIBS"
3072 cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075 /* Override any gcc2 internal prototype to avoid an error. */
3076 /* We use char because int might match the return type of a gcc2
3077 builtin and then its argument prototype would still apply. */
3078 char strftime();
3080 int main() {
3081 strftime()
3082 ; return 0; }
3084 if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3085 rm -rf conftest*
3086 eval "ac_cv_lib_$ac_lib_var=yes"
3087 else
3088 echo "configure: failed program was:" >&5
3089 cat conftest.$ac_ext >&5
3090 rm -rf conftest*
3091 eval "ac_cv_lib_$ac_lib_var=no"
3093 rm -f conftest*
3094 LIBS="$ac_save_LIBS"
3097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3098 echo "$ac_t""yes" 1>&6
3099 cat >> confdefs.h <<\EOF
3100 #define HAVE_STRFTIME 1
3103 LIBS="-lintl $LIBS"
3104 else
3105 echo "$ac_t""no" 1>&6
3110 for ac_func in memcmp memset mktime stpcpy strdup strftime strspn strstr strtol
3112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3113 echo "configure:3114: checking for $ac_func" >&5
3114 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3115 echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 /* System header to define __stub macros and hopefully few prototypes,
3121 which can conflict with char $ac_func(); below. */
3122 #include <assert.h>
3123 /* Override any gcc2 internal prototype to avoid an error. */
3124 /* We use char because int might match the return type of a gcc2
3125 builtin and then its argument prototype would still apply. */
3126 char $ac_func();
3128 int main() {
3130 /* The GNU C library defines this for functions which it implements
3131 to always fail with ENOSYS. Some functions are actually named
3132 something starting with __ and the normal name is an alias. */
3133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3134 choke me
3135 #else
3136 $ac_func();
3137 #endif
3139 ; return 0; }
3141 if { (eval echo configure:3142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3142 rm -rf conftest*
3143 eval "ac_cv_func_$ac_func=yes"
3144 else
3145 echo "configure: failed program was:" >&5
3146 cat conftest.$ac_ext >&5
3147 rm -rf conftest*
3148 eval "ac_cv_func_$ac_func=no"
3150 rm -f conftest*
3153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3154 echo "$ac_t""yes" 1>&6
3155 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3156 cat >> confdefs.h <<EOF
3157 #define $ac_tr_func 1
3160 else
3161 echo "$ac_t""no" 1>&6
3162 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3164 done
3168 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3169 echo "configure:3170: checking whether time.h and sys/time.h may both be included" >&5
3170 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3171 echo $ac_n "(cached) $ac_c" 1>&6
3172 else
3173 cat > conftest.$ac_ext <<EOF
3174 #line 3175 "configure"
3175 #include "confdefs.h"
3176 #include <sys/types.h>
3177 #include <sys/time.h>
3178 #include <time.h>
3179 int main() {
3180 struct tm *tp;
3181 ; return 0; }
3183 if { (eval echo configure:3184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3184 rm -rf conftest*
3185 ac_cv_header_time=yes
3186 else
3187 echo "configure: failed program was:" >&5
3188 cat conftest.$ac_ext >&5
3189 rm -rf conftest*
3190 ac_cv_header_time=no
3192 rm -f conftest*
3195 echo "$ac_t""$ac_cv_header_time" 1>&6
3196 if test $ac_cv_header_time = yes; then
3197 cat >> confdefs.h <<\EOF
3198 #define TIME_WITH_SYS_TIME 1
3203 for ac_hdr in sys/time.h unistd.h
3205 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3206 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3207 echo "configure:3208: checking for $ac_hdr" >&5
3208 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3209 echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211 cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214 #include <$ac_hdr>
3216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3217 { (eval echo configure:3218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3219 if test -z "$ac_err"; then
3220 rm -rf conftest*
3221 eval "ac_cv_header_$ac_safe=yes"
3222 else
3223 echo "$ac_err" >&5
3224 echo "configure: failed program was:" >&5
3225 cat conftest.$ac_ext >&5
3226 rm -rf conftest*
3227 eval "ac_cv_header_$ac_safe=no"
3229 rm -f conftest*
3231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3232 echo "$ac_t""yes" 1>&6
3233 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3234 cat >> confdefs.h <<EOF
3235 #define $ac_tr_hdr 1
3238 else
3239 echo "$ac_t""no" 1>&6
3241 done
3243 for ac_func in alarm
3245 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3246 echo "configure:3247: checking for $ac_func" >&5
3247 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3248 echo $ac_n "(cached) $ac_c" 1>&6
3249 else
3250 cat > conftest.$ac_ext <<EOF
3251 #line 3252 "configure"
3252 #include "confdefs.h"
3253 /* System header to define __stub macros and hopefully few prototypes,
3254 which can conflict with char $ac_func(); below. */
3255 #include <assert.h>
3256 /* Override any gcc2 internal prototype to avoid an error. */
3257 /* We use char because int might match the return type of a gcc2
3258 builtin and then its argument prototype would still apply. */
3259 char $ac_func();
3261 int main() {
3263 /* The GNU C library defines this for functions which it implements
3264 to always fail with ENOSYS. Some functions are actually named
3265 something starting with __ and the normal name is an alias. */
3266 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3267 choke me
3268 #else
3269 $ac_func();
3270 #endif
3272 ; return 0; }
3274 if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3275 rm -rf conftest*
3276 eval "ac_cv_func_$ac_func=yes"
3277 else
3278 echo "configure: failed program was:" >&5
3279 cat conftest.$ac_ext >&5
3280 rm -rf conftest*
3281 eval "ac_cv_func_$ac_func=no"
3283 rm -f conftest*
3286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3287 echo "$ac_t""yes" 1>&6
3288 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3289 cat >> confdefs.h <<EOF
3290 #define $ac_tr_func 1
3293 else
3294 echo "$ac_t""no" 1>&6
3296 done
3298 echo $ac_n "checking for working mktime""... $ac_c" 1>&6
3299 echo "configure:3300: checking for working mktime" >&5
3300 if eval "test \"`echo '$''{'jm_am_cv_func_working_mktime'+set}'`\" = set"; then
3301 echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303 if test "$cross_compiling" = yes; then
3304 jm_am_cv_func_working_mktime=no
3305 else
3306 cat > conftest.$ac_ext <<EOF
3307 #line 3308 "configure"
3308 #include "confdefs.h"
3309 /* Test program from Paul Eggert (eggert@twinsun.com)
3310 and Tony Leneis (tony@plaza.ds.adp.com). */
3311 #if TIME_WITH_SYS_TIME
3312 # include <sys/time.h>
3313 # include <time.h>
3314 #else
3315 # if HAVE_SYS_TIME_H
3316 # include <sys/time.h>
3317 # else
3318 # include <time.h>
3319 # endif
3320 #endif
3322 #if HAVE_UNISTD_H
3323 # include <unistd.h>
3324 #endif
3326 #if !HAVE_ALARM
3327 # define alarm(X) /* empty */
3328 #endif
3330 /* Work around redefinition to rpl_putenv by other config tests. */
3331 #undef putenv
3333 static time_t time_t_max;
3335 /* Values we'll use to set the TZ environment variable. */
3336 static const char *const tz_strings[] = {
3337 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
3338 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
3340 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
3342 /* Fail if mktime fails to convert a date in the spring-forward gap.
3343 Based on a problem report from Andreas Jaeger. */
3344 static void
3345 spring_forward_gap ()
3347 /* glibc (up to about 1998-10-07) failed this test) */
3348 struct tm tm;
3350 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
3351 instead of "TZ=America/Vancouver" in order to detect the bug even
3352 on systems that don't support the Olson extension, or don't have the
3353 full zoneinfo tables installed. */
3354 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
3355 tm.tm_year = 98;
3356 tm.tm_mon = 3;
3357 tm.tm_mday = 5;
3358 tm.tm_hour = 2;
3359 tm.tm_min = 0;
3360 tm.tm_sec = 0;
3361 tm.tm_isdst = -1;
3362 if (mktime (&tm) == (time_t)-1)
3363 exit (1);
3366 static void
3367 mktime_test (now)
3368 time_t now;
3370 struct tm *lt;
3371 if ((lt = localtime (&now)) && mktime (lt) != now)
3372 exit (1);
3373 now = time_t_max - now;
3374 if ((lt = localtime (&now)) && mktime (lt) != now)
3375 exit (1);
3378 static void
3379 irix_6_4_bug ()
3381 /* Based on code from Ariel Faigon. */
3382 struct tm tm;
3383 tm.tm_year = 96;
3384 tm.tm_mon = 3;
3385 tm.tm_mday = 0;
3386 tm.tm_hour = 0;
3387 tm.tm_min = 0;
3388 tm.tm_sec = 0;
3389 tm.tm_isdst = -1;
3390 mktime (&tm);
3391 if (tm.tm_mon != 2 || tm.tm_mday != 31)
3392 exit (1);
3395 static void
3396 bigtime_test (j)
3397 int j;
3399 struct tm tm;
3400 time_t now;
3401 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
3402 /* This test makes some buggy mktime implementations loop.
3403 Give up after 10 seconds. */
3404 alarm (10);
3405 now = mktime (&tm);
3406 alarm (0);
3407 if (now != (time_t) -1)
3409 struct tm *lt = localtime (&now);
3410 if (! (lt
3411 && lt->tm_year == tm.tm_year
3412 && lt->tm_mon == tm.tm_mon
3413 && lt->tm_mday == tm.tm_mday
3414 && lt->tm_hour == tm.tm_hour
3415 && lt->tm_min == tm.tm_min
3416 && lt->tm_sec == tm.tm_sec
3417 && lt->tm_yday == tm.tm_yday
3418 && lt->tm_wday == tm.tm_wday
3419 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
3420 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
3421 exit (1);
3426 main ()
3428 time_t t, delta;
3429 int i, j;
3431 spring_forward_gap ();
3432 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
3433 continue;
3434 time_t_max--;
3435 delta = time_t_max / 997; /* a suitable prime number */
3436 for (i = 0; i < N_STRINGS; i++)
3438 if (tz_strings[i])
3439 putenv (tz_strings[i]);
3441 for (t = 0; t <= time_t_max - delta; t += delta)
3442 mktime_test (t);
3443 mktime_test ((time_t) 60 * 60);
3444 mktime_test ((time_t) 60 * 60 * 24);
3446 for (j = 1; 0 < j; j *= 2)
3447 bigtime_test (j);
3448 bigtime_test (j - 1);
3450 irix_6_4_bug ();
3451 exit (0);
3455 if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3456 then
3457 jm_am_cv_func_working_mktime=yes
3458 else
3459 echo "configure: failed program was:" >&5
3460 cat conftest.$ac_ext >&5
3461 rm -fr conftest*
3462 jm_am_cv_func_working_mktime=no
3464 rm -fr conftest*
3470 echo "$ac_t""$jm_am_cv_func_working_mktime" 1>&6
3471 if test $jm_am_cv_func_working_mktime = no; then
3472 LIBOBJS="$LIBOBJS mktime.o"
3475 echo $ac_n "checking for working memcmp""... $ac_c" 1>&6
3476 echo "configure:3477: checking for working memcmp" >&5
3477 if eval "test \"`echo '$''{'jm_cv_func_memcmp_working'+set}'`\" = set"; then
3478 echo $ac_n "(cached) $ac_c" 1>&6
3479 else
3480 if test "$cross_compiling" = yes; then
3481 jm_cv_func_memcmp_working=no
3482 else
3483 cat > conftest.$ac_ext <<EOF
3484 #line 3485 "configure"
3485 #include "confdefs.h"
3487 main()
3489 /* Some versions of memcmp are not 8-bit clean. */
3490 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3491 if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
3492 exit (1);
3494 /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
3495 or more and with at least one buffer not starting on a 4-byte boundary.
3496 William Lewis provided this test program. */
3498 char foo[21];
3499 char bar[21];
3500 int i;
3501 for (i = 0; i < 4; i++)
3503 char *a = foo + i;
3504 char *b = bar + i;
3505 strcpy (a, "--------01111111");
3506 strcpy (b, "--------10000000");
3507 if (memcmp (a, b, 16) >= 0)
3508 exit (1);
3510 exit (0);
3515 if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3516 then
3517 jm_cv_func_memcmp_working=yes
3518 else
3519 echo "configure: failed program was:" >&5
3520 cat conftest.$ac_ext >&5
3521 rm -fr conftest*
3522 jm_cv_func_memcmp_working=no
3524 rm -fr conftest*
3529 echo "$ac_t""$jm_cv_func_memcmp_working" 1>&6
3530 test $jm_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.o"
3533 echo $ac_n "checking whether we are using the GNU C Library""... $ac_c" 1>&6
3534 echo "configure:3535: checking whether we are using the GNU C Library" >&5
3535 if eval "test \"`echo '$''{'ac_cv_gnu_library'+set}'`\" = set"; then
3536 echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3542 #include <features.h>
3543 #ifdef __GNU_LIBRARY__
3544 Thanks for using GNU
3545 #endif
3548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3549 egrep "Thanks for using GNU" >/dev/null 2>&1; then
3550 rm -rf conftest*
3551 ac_cv_gnu_library=yes
3552 else
3553 rm -rf conftest*
3554 ac_cv_gnu_library=no
3556 rm -f conftest*
3562 echo "$ac_t""$ac_cv_gnu_library" 1>&6
3563 echo $ac_n "checking for version 2 of the GNU C Library""... $ac_c" 1>&6
3564 echo "configure:3565: checking for version 2 of the GNU C Library" >&5
3565 if eval "test \"`echo '$''{'ac_cv_glibc'+set}'`\" = set"; then
3566 echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3572 #include <features.h>
3573 #ifdef __GLIBC__
3574 Thanks for using GNU too
3575 #endif
3578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3579 egrep "Thanks for using GNU too" >/dev/null 2>&1; then
3580 rm -rf conftest*
3581 ac_cv_glibc=yes
3582 else
3583 rm -rf conftest*
3584 ac_cv_glibc=no
3586 rm -f conftest*
3592 echo "$ac_t""$ac_cv_glibc" 1>&6
3599 # Check whether --with-included-regex or --without-included-regex was given.
3600 if test "${with_included_regex+set}" = set; then
3601 withval="$with_included_regex"
3602 jm_with_regex=$withval
3603 else
3604 jm_with_regex=yes
3607 if test "$jm_with_regex" = yes; then
3608 LIBOBJS="$LIBOBJS regex.o"
3614 echo $ac_n "checking whether to enable assertions""... $ac_c" 1>&6
3615 echo "configure:3616: checking whether to enable assertions" >&5
3616 # Check whether --enable-assert or --disable-assert was given.
3617 if test "${enable_assert+set}" = set; then
3618 enableval="$enable_assert"
3619 echo "$ac_t""no" 1>&6
3620 cat >> confdefs.h <<\EOF
3621 #define NDEBUG 1
3624 else
3625 echo "$ac_t""yes" 1>&6
3631 if test x = y; then
3632 for ac_func in INTTYPES_H
3634 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3635 echo "configure:3636: checking for $ac_func" >&5
3636 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3637 echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639 cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 /* System header to define __stub macros and hopefully few prototypes,
3643 which can conflict with char $ac_func(); below. */
3644 #include <assert.h>
3645 /* Override any gcc2 internal prototype to avoid an error. */
3646 /* We use char because int might match the return type of a gcc2
3647 builtin and then its argument prototype would still apply. */
3648 char $ac_func();
3650 int main() {
3652 /* The GNU C library defines this for functions which it implements
3653 to always fail with ENOSYS. Some functions are actually named
3654 something starting with __ and the normal name is an alias. */
3655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3656 choke me
3657 #else
3658 $ac_func();
3659 #endif
3661 ; return 0; }
3663 if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3664 rm -rf conftest*
3665 eval "ac_cv_func_$ac_func=yes"
3666 else
3667 echo "configure: failed program was:" >&5
3668 cat conftest.$ac_ext >&5
3669 rm -rf conftest*
3670 eval "ac_cv_func_$ac_func=no"
3672 rm -f conftest*
3675 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3676 echo "$ac_t""yes" 1>&6
3677 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3678 cat >> confdefs.h <<EOF
3679 #define $ac_tr_func 1
3682 else
3683 echo "$ac_t""no" 1>&6
3685 done
3688 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3689 echo "configure:3690: checking for inttypes.h" >&5
3690 if eval "test \"`echo '$''{'jm_ac_cv_header_inttypes_h'+set}'`\" = set"; then
3691 echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <sys/types.h>
3697 #include <inttypes.h>
3698 int main() {
3699 uintmax_t i = (uintmax_t) -1;
3700 ; return 0; }
3702 if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3703 rm -rf conftest*
3704 jm_ac_cv_header_inttypes_h=yes
3705 else
3706 echo "configure: failed program was:" >&5
3707 cat conftest.$ac_ext >&5
3708 rm -rf conftest*
3709 jm_ac_cv_header_inttypes_h=no
3711 rm -f conftest*
3714 echo "$ac_t""$jm_ac_cv_header_inttypes_h" 1>&6
3715 if test $jm_ac_cv_header_inttypes_h = yes; then
3716 ac_kludge=HAVE_INTTYPES_H
3717 cat >> confdefs.h <<EOF
3718 #define $ac_kludge 1
3725 if test $jm_ac_cv_header_inttypes_h = no; then
3726 echo $ac_n "checking for unsigned long long""... $ac_c" 1>&6
3727 echo "configure:3728: checking for unsigned long long" >&5
3728 if eval "test \"`echo '$''{'ac_cv_type_unsigned_long_long'+set}'`\" = set"; then
3729 echo $ac_n "(cached) $ac_c" 1>&6
3730 else
3731 cat > conftest.$ac_ext <<EOF
3732 #line 3733 "configure"
3733 #include "confdefs.h"
3735 int main() {
3736 unsigned long long i = (unsigned long long) -1;
3737 ; return 0; }
3739 if { (eval echo configure:3740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3740 rm -rf conftest*
3741 ac_cv_type_unsigned_long_long=yes
3742 else
3743 echo "configure: failed program was:" >&5
3744 cat conftest.$ac_ext >&5
3745 rm -rf conftest*
3746 ac_cv_type_unsigned_long_long=no
3748 rm -f conftest*
3751 echo "$ac_t""$ac_cv_type_unsigned_long_long" 1>&6
3752 if test $ac_cv_type_unsigned_long_long = yes; then
3753 cat >> confdefs.h <<\EOF
3754 #define uintmax_t unsigned long long
3757 else
3758 cat >> confdefs.h <<\EOF
3759 #define uintmax_t unsigned long
3766 for ac_hdr in utime.h
3768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3770 echo "configure:3771: checking for $ac_hdr" >&5
3771 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3772 echo $ac_n "(cached) $ac_c" 1>&6
3773 else
3774 cat > conftest.$ac_ext <<EOF
3775 #line 3776 "configure"
3776 #include "confdefs.h"
3777 #include <$ac_hdr>
3779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3780 { (eval echo configure:3781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3782 if test -z "$ac_err"; then
3783 rm -rf conftest*
3784 eval "ac_cv_header_$ac_safe=yes"
3785 else
3786 echo "$ac_err" >&5
3787 echo "configure: failed program was:" >&5
3788 cat conftest.$ac_ext >&5
3789 rm -rf conftest*
3790 eval "ac_cv_header_$ac_safe=no"
3792 rm -f conftest*
3794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3795 echo "$ac_t""yes" 1>&6
3796 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3797 cat >> confdefs.h <<EOF
3798 #define $ac_tr_hdr 1
3801 else
3802 echo "$ac_t""no" 1>&6
3804 done
3807 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3808 echo "configure:3809: checking for struct utimbuf" >&5
3809 if eval "test \"`echo '$''{'fu_cv_sys_struct_utimbuf'+set}'`\" = set"; then
3810 echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812 cat > conftest.$ac_ext <<EOF
3813 #line 3814 "configure"
3814 #include "confdefs.h"
3816 #ifdef TIME_WITH_SYS_TIME
3817 # include <sys/time.h>
3818 # include <time.h>
3819 #else
3820 # ifdef HAVE_SYS_TIME_H
3821 # include <sys/time.h>
3822 # else
3823 # include <time.h>
3824 # endif
3825 #endif
3826 #ifdef HAVE_UTIME_H
3827 # include <utime.h>
3828 #endif
3830 int main() {
3831 static struct utimbuf x; x.actime = x.modtime;
3832 ; return 0; }
3834 if { (eval echo configure:3835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3835 rm -rf conftest*
3836 fu_cv_sys_struct_utimbuf=yes
3837 else
3838 echo "configure: failed program was:" >&5
3839 cat conftest.$ac_ext >&5
3840 rm -rf conftest*
3841 fu_cv_sys_struct_utimbuf=no
3843 rm -f conftest*
3847 echo "$ac_t""$fu_cv_sys_struct_utimbuf" 1>&6
3849 if test $fu_cv_sys_struct_utimbuf = yes; then
3850 if test x = y; then
3851 # This code is deliberately never run via ./configure.
3852 # FIXME: this is a hack to make autoheader put the corresponding
3853 # HAVE_* undef for this symbol in config.h.in. This saves me the
3854 # trouble of having to maintain the #undef in acconfig.h manually.
3855 for ac_func in STRUCT_UTIMBUF
3857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3858 echo "configure:3859: checking for $ac_func" >&5
3859 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3860 echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862 cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865 /* System header to define __stub macros and hopefully few prototypes,
3866 which can conflict with char $ac_func(); below. */
3867 #include <assert.h>
3868 /* Override any gcc2 internal prototype to avoid an error. */
3869 /* We use char because int might match the return type of a gcc2
3870 builtin and then its argument prototype would still apply. */
3871 char $ac_func();
3873 int main() {
3875 /* The GNU C library defines this for functions which it implements
3876 to always fail with ENOSYS. Some functions are actually named
3877 something starting with __ and the normal name is an alias. */
3878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3879 choke me
3880 #else
3881 $ac_func();
3882 #endif
3884 ; return 0; }
3886 if { (eval echo configure:3887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3887 rm -rf conftest*
3888 eval "ac_cv_func_$ac_func=yes"
3889 else
3890 echo "configure: failed program was:" >&5
3891 cat conftest.$ac_ext >&5
3892 rm -rf conftest*
3893 eval "ac_cv_func_$ac_func=no"
3895 rm -f conftest*
3898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3899 echo "$ac_t""yes" 1>&6
3900 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3901 cat >> confdefs.h <<EOF
3902 #define $ac_tr_func 1
3905 else
3906 echo "$ac_t""no" 1>&6
3908 done
3911 # Defining it this way (rather than via AC_DEFINE) short-circuits the
3912 # autoheader check -- autoheader doesn't know it's already been taken
3913 # care of by the hack above.
3914 ac_kludge=HAVE_STRUCT_UTIMBUF
3915 cat >> confdefs.h <<EOF
3916 #define $ac_kludge 1
3922 headers='
3923 #include <stdio.h>
3924 #ifdef HAVE_STRING_H
3925 # if !STDC_HEADERS && HAVE_MEMORY_H
3926 # include <memory.h>
3927 # endif
3928 # include <string.h>
3929 #else
3930 # ifdef HAVE_STRINGS_H
3931 # include <strings.h>
3932 # endif
3933 #endif
3934 #ifdef HAVE_STDLIB_H
3935 # include <stdlib.h>
3936 #endif
3937 #ifdef HAVE_UNISTD_H
3938 # include <unistd.h>
3939 #endif
3941 if test x = y; then
3942 for ac_func in DECL_FREE DECL_LSEEK DECL_MALLOC DECL_MEMCHR DECL_REALLOC \
3943 DECL_STPCPY DECL_STRSTR
3945 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3946 echo "configure:3947: checking for $ac_func" >&5
3947 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3948 echo $ac_n "(cached) $ac_c" 1>&6
3949 else
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953 /* System header to define __stub macros and hopefully few prototypes,
3954 which can conflict with char $ac_func(); below. */
3955 #include <assert.h>
3956 /* Override any gcc2 internal prototype to avoid an error. */
3957 /* We use char because int might match the return type of a gcc2
3958 builtin and then its argument prototype would still apply. */
3959 char $ac_func();
3961 int main() {
3963 /* The GNU C library defines this for functions which it implements
3964 to always fail with ENOSYS. Some functions are actually named
3965 something starting with __ and the normal name is an alias. */
3966 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3967 choke me
3968 #else
3969 $ac_func();
3970 #endif
3972 ; return 0; }
3974 if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3975 rm -rf conftest*
3976 eval "ac_cv_func_$ac_func=yes"
3977 else
3978 echo "configure: failed program was:" >&5
3979 cat conftest.$ac_ext >&5
3980 rm -rf conftest*
3981 eval "ac_cv_func_$ac_func=no"
3983 rm -f conftest*
3986 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3987 echo "$ac_t""yes" 1>&6
3988 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3989 cat >> confdefs.h <<EOF
3990 #define $ac_tr_func 1
3993 else
3994 echo "$ac_t""no" 1>&6
3996 done
4000 for jm_func in free lseek malloc \
4001 memchr realloc stpcpy strstr
4004 test -z "$ac_cv_header_memory_h" && for ac_hdr in memory.h
4006 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4007 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4008 echo "configure:4009: checking for $ac_hdr" >&5
4009 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4010 echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012 cat > conftest.$ac_ext <<EOF
4013 #line 4014 "configure"
4014 #include "confdefs.h"
4015 #include <$ac_hdr>
4017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4018 { (eval echo configure:4019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4020 if test -z "$ac_err"; then
4021 rm -rf conftest*
4022 eval "ac_cv_header_$ac_safe=yes"
4023 else
4024 echo "$ac_err" >&5
4025 echo "configure: failed program was:" >&5
4026 cat conftest.$ac_ext >&5
4027 rm -rf conftest*
4028 eval "ac_cv_header_$ac_safe=no"
4030 rm -f conftest*
4032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4033 echo "$ac_t""yes" 1>&6
4034 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4035 cat >> confdefs.h <<EOF
4036 #define $ac_tr_hdr 1
4039 else
4040 echo "$ac_t""no" 1>&6
4042 done
4044 test -z "$ac_cv_header_string_h" && for ac_hdr in string.h
4046 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4047 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4048 echo "configure:4049: checking for $ac_hdr" >&5
4049 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4050 echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052 cat > conftest.$ac_ext <<EOF
4053 #line 4054 "configure"
4054 #include "confdefs.h"
4055 #include <$ac_hdr>
4057 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4058 { (eval echo configure:4059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4059 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4060 if test -z "$ac_err"; then
4061 rm -rf conftest*
4062 eval "ac_cv_header_$ac_safe=yes"
4063 else
4064 echo "$ac_err" >&5
4065 echo "configure: failed program was:" >&5
4066 cat conftest.$ac_ext >&5
4067 rm -rf conftest*
4068 eval "ac_cv_header_$ac_safe=no"
4070 rm -f conftest*
4072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4073 echo "$ac_t""yes" 1>&6
4074 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4075 cat >> confdefs.h <<EOF
4076 #define $ac_tr_hdr 1
4079 else
4080 echo "$ac_t""no" 1>&6
4082 done
4084 test -z "$ac_cv_header_strings_h" && for ac_hdr in strings.h
4086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4088 echo "configure:4089: checking for $ac_hdr" >&5
4089 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4090 echo $ac_n "(cached) $ac_c" 1>&6
4091 else
4092 cat > conftest.$ac_ext <<EOF
4093 #line 4094 "configure"
4094 #include "confdefs.h"
4095 #include <$ac_hdr>
4097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4098 { (eval echo configure:4099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4100 if test -z "$ac_err"; then
4101 rm -rf conftest*
4102 eval "ac_cv_header_$ac_safe=yes"
4103 else
4104 echo "$ac_err" >&5
4105 echo "configure: failed program was:" >&5
4106 cat conftest.$ac_ext >&5
4107 rm -rf conftest*
4108 eval "ac_cv_header_$ac_safe=no"
4110 rm -f conftest*
4112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4113 echo "$ac_t""yes" 1>&6
4114 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4115 cat >> confdefs.h <<EOF
4116 #define $ac_tr_hdr 1
4119 else
4120 echo "$ac_t""no" 1>&6
4122 done
4124 test -z "$ac_cv_header_stdlib_h" && for ac_hdr in stdlib.h
4126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4128 echo "configure:4129: checking for $ac_hdr" >&5
4129 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4130 echo $ac_n "(cached) $ac_c" 1>&6
4131 else
4132 cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 #include <$ac_hdr>
4137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4138 { (eval echo configure:4139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4140 if test -z "$ac_err"; then
4141 rm -rf conftest*
4142 eval "ac_cv_header_$ac_safe=yes"
4143 else
4144 echo "$ac_err" >&5
4145 echo "configure: failed program was:" >&5
4146 cat conftest.$ac_ext >&5
4147 rm -rf conftest*
4148 eval "ac_cv_header_$ac_safe=no"
4150 rm -f conftest*
4152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4153 echo "$ac_t""yes" 1>&6
4154 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4155 cat >> confdefs.h <<EOF
4156 #define $ac_tr_hdr 1
4159 else
4160 echo "$ac_t""no" 1>&6
4162 done
4164 test -z "$ac_cv_header_unistd_h" && for ac_hdr in unistd.h
4166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4168 echo "configure:4169: checking for $ac_hdr" >&5
4169 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4170 echo $ac_n "(cached) $ac_c" 1>&6
4171 else
4172 cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175 #include <$ac_hdr>
4177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4178 { (eval echo configure:4179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4180 if test -z "$ac_err"; then
4181 rm -rf conftest*
4182 eval "ac_cv_header_$ac_safe=yes"
4183 else
4184 echo "$ac_err" >&5
4185 echo "configure: failed program was:" >&5
4186 cat conftest.$ac_ext >&5
4187 rm -rf conftest*
4188 eval "ac_cv_header_$ac_safe=no"
4190 rm -f conftest*
4192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4193 echo "$ac_t""yes" 1>&6
4194 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4195 cat >> confdefs.h <<EOF
4196 #define $ac_tr_hdr 1
4199 else
4200 echo "$ac_t""no" 1>&6
4202 done
4204 echo $ac_n "checking whether $jm_func is declared""... $ac_c" 1>&6
4205 echo "configure:4206: checking whether $jm_func is declared" >&5
4206 if eval "test \"`echo '$''{'jm_cv_func_decl_$jm_func'+set}'`\" = set"; then
4207 echo $ac_n "(cached) $ac_c" 1>&6
4208 else
4209 cat > conftest.$ac_ext <<EOF
4210 #line 4211 "configure"
4211 #include "confdefs.h"
4212 $headers
4213 int main() {
4215 #ifndef $jm_func
4216 char *(*pfn) = (char *(*)) $jm_func
4217 #endif
4219 ; return 0; }
4221 if { (eval echo configure:4222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4222 rm -rf conftest*
4223 eval "jm_cv_func_decl_$jm_func=yes"
4224 else
4225 echo "configure: failed program was:" >&5
4226 cat conftest.$ac_ext >&5
4227 rm -rf conftest*
4228 eval "jm_cv_func_decl_$jm_func=no"
4230 rm -f conftest*
4234 if eval "test \"`echo '$jm_cv_func_decl_'$jm_func`\" = yes"; then
4235 echo "$ac_t""yes" 1>&6
4237 jm_tr_func=HAVE_DECL_`echo $jm_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
4238 cat >> confdefs.h <<EOF
4239 #define $jm_tr_func 1
4242 else
4243 echo "$ac_t""no" 1>&6
4245 done
4250 for ac_func in strerror strerror_r vprintf doprnt
4252 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4253 echo "configure:4254: checking for $ac_func" >&5
4254 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4255 echo $ac_n "(cached) $ac_c" 1>&6
4256 else
4257 cat > conftest.$ac_ext <<EOF
4258 #line 4259 "configure"
4259 #include "confdefs.h"
4260 /* System header to define __stub macros and hopefully few prototypes,
4261 which can conflict with char $ac_func(); below. */
4262 #include <assert.h>
4263 /* Override any gcc2 internal prototype to avoid an error. */
4264 /* We use char because int might match the return type of a gcc2
4265 builtin and then its argument prototype would still apply. */
4266 char $ac_func();
4268 int main() {
4270 /* The GNU C library defines this for functions which it implements
4271 to always fail with ENOSYS. Some functions are actually named
4272 something starting with __ and the normal name is an alias. */
4273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4274 choke me
4275 #else
4276 $ac_func();
4277 #endif
4279 ; return 0; }
4281 if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4282 rm -rf conftest*
4283 eval "ac_cv_func_$ac_func=yes"
4284 else
4285 echo "configure: failed program was:" >&5
4286 cat conftest.$ac_ext >&5
4287 rm -rf conftest*
4288 eval "ac_cv_func_$ac_func=no"
4290 rm -f conftest*
4293 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4294 echo "$ac_t""yes" 1>&6
4295 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4296 cat >> confdefs.h <<EOF
4297 #define $ac_tr_func 1
4300 else
4301 echo "$ac_t""no" 1>&6
4303 done
4305 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4306 echo "configure:4307: checking for ANSI C header files" >&5
4307 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4308 echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310 cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 #include <stdlib.h>
4314 #include <stdarg.h>
4315 #include <string.h>
4316 #include <float.h>
4318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4319 { (eval echo configure:4320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4321 if test -z "$ac_err"; then
4322 rm -rf conftest*
4323 ac_cv_header_stdc=yes
4324 else
4325 echo "$ac_err" >&5
4326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328 rm -rf conftest*
4329 ac_cv_header_stdc=no
4331 rm -f conftest*
4333 if test $ac_cv_header_stdc = yes; then
4334 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4335 cat > conftest.$ac_ext <<EOF
4336 #line 4337 "configure"
4337 #include "confdefs.h"
4338 #include <string.h>
4340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4341 egrep "memchr" >/dev/null 2>&1; then
4343 else
4344 rm -rf conftest*
4345 ac_cv_header_stdc=no
4347 rm -f conftest*
4351 if test $ac_cv_header_stdc = yes; then
4352 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4353 cat > conftest.$ac_ext <<EOF
4354 #line 4355 "configure"
4355 #include "confdefs.h"
4356 #include <stdlib.h>
4358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4359 egrep "free" >/dev/null 2>&1; then
4361 else
4362 rm -rf conftest*
4363 ac_cv_header_stdc=no
4365 rm -f conftest*
4369 if test $ac_cv_header_stdc = yes; then
4370 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4371 if test "$cross_compiling" = yes; then
4373 else
4374 cat > conftest.$ac_ext <<EOF
4375 #line 4376 "configure"
4376 #include "confdefs.h"
4377 #include <ctype.h>
4378 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4379 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4380 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4381 int main () { int i; for (i = 0; i < 256; i++)
4382 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4383 exit (0); }
4386 if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4387 then
4389 else
4390 echo "configure: failed program was:" >&5
4391 cat conftest.$ac_ext >&5
4392 rm -fr conftest*
4393 ac_cv_header_stdc=no
4395 rm -fr conftest*
4401 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4402 if test $ac_cv_header_stdc = yes; then
4403 cat >> confdefs.h <<\EOF
4404 #define STDC_HEADERS 1
4411 for ac_func in bzero bcopy isascii btowc
4413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4414 echo "configure:4415: checking for $ac_func" >&5
4415 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4416 echo $ac_n "(cached) $ac_c" 1>&6
4417 else
4418 cat > conftest.$ac_ext <<EOF
4419 #line 4420 "configure"
4420 #include "confdefs.h"
4421 /* System header to define __stub macros and hopefully few prototypes,
4422 which can conflict with char $ac_func(); below. */
4423 #include <assert.h>
4424 /* Override any gcc2 internal prototype to avoid an error. */
4425 /* We use char because int might match the return type of a gcc2
4426 builtin and then its argument prototype would still apply. */
4427 char $ac_func();
4429 int main() {
4431 /* The GNU C library defines this for functions which it implements
4432 to always fail with ENOSYS. Some functions are actually named
4433 something starting with __ and the normal name is an alias. */
4434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4435 choke me
4436 #else
4437 $ac_func();
4438 #endif
4440 ; return 0; }
4442 if { (eval echo configure:4443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4443 rm -rf conftest*
4444 eval "ac_cv_func_$ac_func=yes"
4445 else
4446 echo "configure: failed program was:" >&5
4447 cat conftest.$ac_ext >&5
4448 rm -rf conftest*
4449 eval "ac_cv_func_$ac_func=no"
4451 rm -f conftest*
4454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4455 echo "$ac_t""yes" 1>&6
4456 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4457 cat >> confdefs.h <<EOF
4458 #define $ac_tr_func 1
4461 else
4462 echo "$ac_t""no" 1>&6
4464 done
4466 for ac_hdr in alloca.h libintl.h wctype.h wchar.h
4468 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4469 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4470 echo "configure:4471: checking for $ac_hdr" >&5
4471 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4472 echo $ac_n "(cached) $ac_c" 1>&6
4473 else
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 #include <$ac_hdr>
4479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4480 { (eval echo configure:4481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4482 if test -z "$ac_err"; then
4483 rm -rf conftest*
4484 eval "ac_cv_header_$ac_safe=yes"
4485 else
4486 echo "$ac_err" >&5
4487 echo "configure: failed program was:" >&5
4488 cat conftest.$ac_ext >&5
4489 rm -rf conftest*
4490 eval "ac_cv_header_$ac_safe=no"
4492 rm -f conftest*
4494 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4495 echo "$ac_t""yes" 1>&6
4496 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4497 cat >> confdefs.h <<EOF
4498 #define $ac_tr_hdr 1
4501 else
4502 echo "$ac_t""no" 1>&6
4504 done
4506 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4507 echo "configure:4508: checking for ANSI C header files" >&5
4508 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4509 echo $ac_n "(cached) $ac_c" 1>&6
4510 else
4511 cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 #include <stdlib.h>
4515 #include <stdarg.h>
4516 #include <string.h>
4517 #include <float.h>
4519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4520 { (eval echo configure:4521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4522 if test -z "$ac_err"; then
4523 rm -rf conftest*
4524 ac_cv_header_stdc=yes
4525 else
4526 echo "$ac_err" >&5
4527 echo "configure: failed program was:" >&5
4528 cat conftest.$ac_ext >&5
4529 rm -rf conftest*
4530 ac_cv_header_stdc=no
4532 rm -f conftest*
4534 if test $ac_cv_header_stdc = yes; then
4535 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4536 cat > conftest.$ac_ext <<EOF
4537 #line 4538 "configure"
4538 #include "confdefs.h"
4539 #include <string.h>
4541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4542 egrep "memchr" >/dev/null 2>&1; then
4544 else
4545 rm -rf conftest*
4546 ac_cv_header_stdc=no
4548 rm -f conftest*
4552 if test $ac_cv_header_stdc = yes; then
4553 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4554 cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557 #include <stdlib.h>
4559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4560 egrep "free" >/dev/null 2>&1; then
4562 else
4563 rm -rf conftest*
4564 ac_cv_header_stdc=no
4566 rm -f conftest*
4570 if test $ac_cv_header_stdc = yes; then
4571 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4572 if test "$cross_compiling" = yes; then
4574 else
4575 cat > conftest.$ac_ext <<EOF
4576 #line 4577 "configure"
4577 #include "confdefs.h"
4578 #include <ctype.h>
4579 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4580 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4581 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4582 int main () { int i; for (i = 0; i < 256; i++)
4583 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4584 exit (0); }
4587 if { (eval echo configure:4588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4588 then
4590 else
4591 echo "configure: failed program was:" >&5
4592 cat conftest.$ac_ext >&5
4593 rm -fr conftest*
4594 ac_cv_header_stdc=no
4596 rm -fr conftest*
4602 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4603 if test $ac_cv_header_stdc = yes; then
4604 cat >> confdefs.h <<\EOF
4605 #define STDC_HEADERS 1
4610 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4611 # for constant arguments. Useless!
4612 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4613 echo "configure:4614: checking for working alloca.h" >&5
4614 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4615 echo $ac_n "(cached) $ac_c" 1>&6
4616 else
4617 cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620 #include <alloca.h>
4621 int main() {
4622 char *p = alloca(2 * sizeof(int));
4623 ; return 0; }
4625 if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4626 rm -rf conftest*
4627 ac_cv_header_alloca_h=yes
4628 else
4629 echo "configure: failed program was:" >&5
4630 cat conftest.$ac_ext >&5
4631 rm -rf conftest*
4632 ac_cv_header_alloca_h=no
4634 rm -f conftest*
4637 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4638 if test $ac_cv_header_alloca_h = yes; then
4639 cat >> confdefs.h <<\EOF
4640 #define HAVE_ALLOCA_H 1
4645 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4646 echo "configure:4647: checking for alloca" >&5
4647 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4648 echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650 cat > conftest.$ac_ext <<EOF
4651 #line 4652 "configure"
4652 #include "confdefs.h"
4654 #ifdef __GNUC__
4655 # define alloca __builtin_alloca
4656 #else
4657 # ifdef _MSC_VER
4658 # include <malloc.h>
4659 # define alloca _alloca
4660 # else
4661 # if HAVE_ALLOCA_H
4662 # include <alloca.h>
4663 # else
4664 # ifdef _AIX
4665 #pragma alloca
4666 # else
4667 # ifndef alloca /* predefined by HP cc +Olibcalls */
4668 char *alloca ();
4669 # endif
4670 # endif
4671 # endif
4672 # endif
4673 #endif
4675 int main() {
4676 char *p = (char *) alloca(1);
4677 ; return 0; }
4679 if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4680 rm -rf conftest*
4681 ac_cv_func_alloca_works=yes
4682 else
4683 echo "configure: failed program was:" >&5
4684 cat conftest.$ac_ext >&5
4685 rm -rf conftest*
4686 ac_cv_func_alloca_works=no
4688 rm -f conftest*
4691 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4692 if test $ac_cv_func_alloca_works = yes; then
4693 cat >> confdefs.h <<\EOF
4694 #define HAVE_ALLOCA 1
4699 if test $ac_cv_func_alloca_works = no; then
4700 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4701 # that cause trouble. Some versions do not even contain alloca or
4702 # contain a buggy version. If you still want to use their alloca,
4703 # use ar to extract alloca.o from them instead of compiling alloca.c.
4704 ALLOCA=alloca.${ac_objext}
4705 cat >> confdefs.h <<\EOF
4706 #define C_ALLOCA 1
4710 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4711 echo "configure:4712: checking whether alloca needs Cray hooks" >&5
4712 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4713 echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715 cat > conftest.$ac_ext <<EOF
4716 #line 4717 "configure"
4717 #include "confdefs.h"
4718 #if defined(CRAY) && ! defined(CRAY2)
4719 webecray
4720 #else
4721 wenotbecray
4722 #endif
4725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4726 egrep "webecray" >/dev/null 2>&1; then
4727 rm -rf conftest*
4728 ac_cv_os_cray=yes
4729 else
4730 rm -rf conftest*
4731 ac_cv_os_cray=no
4733 rm -f conftest*
4737 echo "$ac_t""$ac_cv_os_cray" 1>&6
4738 if test $ac_cv_os_cray = yes; then
4739 for ac_func in _getb67 GETB67 getb67; do
4740 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4741 echo "configure:4742: checking for $ac_func" >&5
4742 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4743 echo $ac_n "(cached) $ac_c" 1>&6
4744 else
4745 cat > conftest.$ac_ext <<EOF
4746 #line 4747 "configure"
4747 #include "confdefs.h"
4748 /* System header to define __stub macros and hopefully few prototypes,
4749 which can conflict with char $ac_func(); below. */
4750 #include <assert.h>
4751 /* Override any gcc2 internal prototype to avoid an error. */
4752 /* We use char because int might match the return type of a gcc2
4753 builtin and then its argument prototype would still apply. */
4754 char $ac_func();
4756 int main() {
4758 /* The GNU C library defines this for functions which it implements
4759 to always fail with ENOSYS. Some functions are actually named
4760 something starting with __ and the normal name is an alias. */
4761 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4762 choke me
4763 #else
4764 $ac_func();
4765 #endif
4767 ; return 0; }
4769 if { (eval echo configure:4770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4770 rm -rf conftest*
4771 eval "ac_cv_func_$ac_func=yes"
4772 else
4773 echo "configure: failed program was:" >&5
4774 cat conftest.$ac_ext >&5
4775 rm -rf conftest*
4776 eval "ac_cv_func_$ac_func=no"
4778 rm -f conftest*
4781 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4782 echo "$ac_t""yes" 1>&6
4783 cat >> confdefs.h <<EOF
4784 #define CRAY_STACKSEG_END $ac_func
4787 break
4788 else
4789 echo "$ac_t""no" 1>&6
4792 done
4795 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4796 echo "configure:4797: checking stack direction for C alloca" >&5
4797 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4798 echo $ac_n "(cached) $ac_c" 1>&6
4799 else
4800 if test "$cross_compiling" = yes; then
4801 ac_cv_c_stack_direction=0
4802 else
4803 cat > conftest.$ac_ext <<EOF
4804 #line 4805 "configure"
4805 #include "confdefs.h"
4806 find_stack_direction ()
4808 static char *addr = 0;
4809 auto char dummy;
4810 if (addr == 0)
4812 addr = &dummy;
4813 return find_stack_direction ();
4815 else
4816 return (&dummy > addr) ? 1 : -1;
4818 main ()
4820 exit (find_stack_direction() < 0);
4823 if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4824 then
4825 ac_cv_c_stack_direction=1
4826 else
4827 echo "configure: failed program was:" >&5
4828 cat conftest.$ac_ext >&5
4829 rm -fr conftest*
4830 ac_cv_c_stack_direction=-1
4832 rm -fr conftest*
4837 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4838 cat >> confdefs.h <<EOF
4839 #define STACK_DIRECTION $ac_cv_c_stack_direction
4847 for ac_func in localtime_r
4849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4850 echo "configure:4851: checking for $ac_func" >&5
4851 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4852 echo $ac_n "(cached) $ac_c" 1>&6
4853 else
4854 cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857 /* System header to define __stub macros and hopefully few prototypes,
4858 which can conflict with char $ac_func(); below. */
4859 #include <assert.h>
4860 /* Override any gcc2 internal prototype to avoid an error. */
4861 /* We use char because int might match the return type of a gcc2
4862 builtin and then its argument prototype would still apply. */
4863 char $ac_func();
4865 int main() {
4867 /* The GNU C library defines this for functions which it implements
4868 to always fail with ENOSYS. Some functions are actually named
4869 something starting with __ and the normal name is an alias. */
4870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4871 choke me
4872 #else
4873 $ac_func();
4874 #endif
4876 ; return 0; }
4878 if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4879 rm -rf conftest*
4880 eval "ac_cv_func_$ac_func=yes"
4881 else
4882 echo "configure: failed program was:" >&5
4883 cat conftest.$ac_ext >&5
4884 rm -rf conftest*
4885 eval "ac_cv_func_$ac_func=no"
4887 rm -f conftest*
4890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4891 echo "$ac_t""yes" 1>&6
4892 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4893 cat >> confdefs.h <<EOF
4894 #define $ac_tr_func 1
4897 else
4898 echo "$ac_t""no" 1>&6
4900 done
4903 if test $jm_am_cv_func_working_mktime = no; then
4904 cat >> confdefs.h <<EOF
4905 #define mktime rpl_mktime
4911 echo $ac_n "checking whether lstat accepts an empty string""... $ac_c" 1>&6
4912 echo "configure:4913: checking whether lstat accepts an empty string" >&5
4913 if eval "test \"`echo '$''{'jm_cv_func_lstat_empty_string_bug'+set}'`\" = set"; then
4914 echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916 if test "$cross_compiling" = yes; then
4917 jm_cv_func_lstat_empty_string_bug=yes
4918 else
4919 cat > conftest.$ac_ext <<EOF
4920 #line 4921 "configure"
4921 #include "confdefs.h"
4923 # include <sys/types.h>
4924 # include <sys/stat.h>
4927 main ()
4929 struct stat sbuf;
4930 exit (lstat ("", &sbuf) ? 1 : 0);
4934 if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4935 then
4936 jm_cv_func_lstat_empty_string_bug=yes
4937 else
4938 echo "configure: failed program was:" >&5
4939 cat conftest.$ac_ext >&5
4940 rm -fr conftest*
4941 jm_cv_func_lstat_empty_string_bug=no
4943 rm -fr conftest*
4949 echo "$ac_t""$jm_cv_func_lstat_empty_string_bug" 1>&6
4950 if test $jm_cv_func_lstat_empty_string_bug = yes; then
4952 LIBOBJS="$LIBOBJS lstat.o"
4954 if test $jm_cv_func_lstat_empty_string_bug = yes; then
4955 if test x = y; then
4956 # This code is deliberately never run via ./configure.
4957 # FIXME: this is a hack to make autoheader put the corresponding
4958 # HAVE_* undef for this symbol in config.h.in. This saves me the
4959 # trouble of having to maintain the #undef in acconfig.h manually.
4960 for ac_func in LSTAT_EMPTY_STRING_BUG
4962 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4963 echo "configure:4964: checking for $ac_func" >&5
4964 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4965 echo $ac_n "(cached) $ac_c" 1>&6
4966 else
4967 cat > conftest.$ac_ext <<EOF
4968 #line 4969 "configure"
4969 #include "confdefs.h"
4970 /* System header to define __stub macros and hopefully few prototypes,
4971 which can conflict with char $ac_func(); below. */
4972 #include <assert.h>
4973 /* Override any gcc2 internal prototype to avoid an error. */
4974 /* We use char because int might match the return type of a gcc2
4975 builtin and then its argument prototype would still apply. */
4976 char $ac_func();
4978 int main() {
4980 /* The GNU C library defines this for functions which it implements
4981 to always fail with ENOSYS. Some functions are actually named
4982 something starting with __ and the normal name is an alias. */
4983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4984 choke me
4985 #else
4986 $ac_func();
4987 #endif
4989 ; return 0; }
4991 if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4992 rm -rf conftest*
4993 eval "ac_cv_func_$ac_func=yes"
4994 else
4995 echo "configure: failed program was:" >&5
4996 cat conftest.$ac_ext >&5
4997 rm -rf conftest*
4998 eval "ac_cv_func_$ac_func=no"
5000 rm -f conftest*
5003 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5004 echo "$ac_t""yes" 1>&6
5005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5006 cat >> confdefs.h <<EOF
5007 #define $ac_tr_func 1
5010 else
5011 echo "$ac_t""no" 1>&6
5013 done
5016 # Defining it this way (rather than via AC_DEFINE) short-circuits the
5017 # autoheader check -- autoheader doesn't know it's already been taken
5018 # care of by the hack above.
5019 ac_kludge=HAVE_LSTAT_EMPTY_STRING_BUG
5020 cat >> confdefs.h <<EOF
5021 #define $ac_kludge 1
5028 echo $ac_n "checking whether stat accepts an empty string""... $ac_c" 1>&6
5029 echo "configure:5030: checking whether stat accepts an empty string" >&5
5030 if eval "test \"`echo '$''{'jm_cv_func_stat_empty_string_bug'+set}'`\" = set"; then
5031 echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033 if test "$cross_compiling" = yes; then
5034 jm_cv_func_stat_empty_string_bug=yes
5035 else
5036 cat > conftest.$ac_ext <<EOF
5037 #line 5038 "configure"
5038 #include "confdefs.h"
5040 # include <sys/types.h>
5041 # include <sys/stat.h>
5044 main ()
5046 struct stat sbuf;
5047 exit (stat ("", &sbuf) ? 1 : 0);
5051 if { (eval echo configure:5052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5052 then
5053 jm_cv_func_stat_empty_string_bug=yes
5054 else
5055 echo "configure: failed program was:" >&5
5056 cat conftest.$ac_ext >&5
5057 rm -fr conftest*
5058 jm_cv_func_stat_empty_string_bug=no
5060 rm -fr conftest*
5066 echo "$ac_t""$jm_cv_func_stat_empty_string_bug" 1>&6
5067 if test $jm_cv_func_stat_empty_string_bug = yes; then
5069 LIBOBJS="$LIBOBJS stat.o"
5071 if test $jm_cv_func_stat_empty_string_bug = yes; then
5072 if test x = y; then
5073 # This code is deliberately never run via ./configure.
5074 # FIXME: this is a hack to make autoheader put the corresponding
5075 # HAVE_* undef for this symbol in config.h.in. This saves me the
5076 # trouble of having to maintain the #undef in acconfig.h manually.
5077 for ac_func in STAT_EMPTY_STRING_BUG
5079 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5080 echo "configure:5081: checking for $ac_func" >&5
5081 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5082 echo $ac_n "(cached) $ac_c" 1>&6
5083 else
5084 cat > conftest.$ac_ext <<EOF
5085 #line 5086 "configure"
5086 #include "confdefs.h"
5087 /* System header to define __stub macros and hopefully few prototypes,
5088 which can conflict with char $ac_func(); below. */
5089 #include <assert.h>
5090 /* Override any gcc2 internal prototype to avoid an error. */
5091 /* We use char because int might match the return type of a gcc2
5092 builtin and then its argument prototype would still apply. */
5093 char $ac_func();
5095 int main() {
5097 /* The GNU C library defines this for functions which it implements
5098 to always fail with ENOSYS. Some functions are actually named
5099 something starting with __ and the normal name is an alias. */
5100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5101 choke me
5102 #else
5103 $ac_func();
5104 #endif
5106 ; return 0; }
5108 if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5109 rm -rf conftest*
5110 eval "ac_cv_func_$ac_func=yes"
5111 else
5112 echo "configure: failed program was:" >&5
5113 cat conftest.$ac_ext >&5
5114 rm -rf conftest*
5115 eval "ac_cv_func_$ac_func=no"
5117 rm -f conftest*
5120 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5121 echo "$ac_t""yes" 1>&6
5122 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5123 cat >> confdefs.h <<EOF
5124 #define $ac_tr_func 1
5127 else
5128 echo "$ac_t""no" 1>&6
5130 done
5133 # Defining it this way (rather than via AC_DEFINE) short-circuits the
5134 # autoheader check -- autoheader doesn't know it's already been taken
5135 # care of by the hack above.
5136 ac_kludge=HAVE_STAT_EMPTY_STRING_BUG
5137 cat >> confdefs.h <<EOF
5138 #define $ac_kludge 1
5145 if test x = y; then
5146 for ac_func in DONE_WORKING_REALLOC_CHECK
5148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5149 echo "configure:5150: checking for $ac_func" >&5
5150 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5151 echo $ac_n "(cached) $ac_c" 1>&6
5152 else
5153 cat > conftest.$ac_ext <<EOF
5154 #line 5155 "configure"
5155 #include "confdefs.h"
5156 /* System header to define __stub macros and hopefully few prototypes,
5157 which can conflict with char $ac_func(); below. */
5158 #include <assert.h>
5159 /* Override any gcc2 internal prototype to avoid an error. */
5160 /* We use char because int might match the return type of a gcc2
5161 builtin and then its argument prototype would still apply. */
5162 char $ac_func();
5164 int main() {
5166 /* The GNU C library defines this for functions which it implements
5167 to always fail with ENOSYS. Some functions are actually named
5168 something starting with __ and the normal name is an alias. */
5169 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5170 choke me
5171 #else
5172 $ac_func();
5173 #endif
5175 ; return 0; }
5177 if { (eval echo configure:5178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5178 rm -rf conftest*
5179 eval "ac_cv_func_$ac_func=yes"
5180 else
5181 echo "configure: failed program was:" >&5
5182 cat conftest.$ac_ext >&5
5183 rm -rf conftest*
5184 eval "ac_cv_func_$ac_func=no"
5186 rm -f conftest*
5189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5190 echo "$ac_t""yes" 1>&6
5191 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5192 cat >> confdefs.h <<EOF
5193 #define $ac_tr_func 1
5196 else
5197 echo "$ac_t""no" 1>&6
5199 done
5202 ac_kludge=HAVE_DONE_WORKING_REALLOC_CHECK
5203 cat >> confdefs.h <<EOF
5204 #define $ac_kludge 1
5208 echo $ac_n "checking for working realloc""... $ac_c" 1>&6
5209 echo "configure:5210: checking for working realloc" >&5
5210 if eval "test \"`echo '$''{'jm_cv_func_working_realloc'+set}'`\" = set"; then
5211 echo $ac_n "(cached) $ac_c" 1>&6
5212 else
5213 if test "$cross_compiling" = yes; then
5214 jm_cv_func_working_realloc=no
5215 else
5216 cat > conftest.$ac_ext <<EOF
5217 #line 5218 "configure"
5218 #include "confdefs.h"
5220 char *realloc ();
5222 main ()
5224 exit (realloc (0, 0) ? 0 : 1);
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5229 then
5230 jm_cv_func_working_realloc=yes
5231 else
5232 echo "configure: failed program was:" >&5
5233 cat conftest.$ac_ext >&5
5234 rm -fr conftest*
5235 jm_cv_func_working_realloc=no
5237 rm -fr conftest*
5243 echo "$ac_t""$jm_cv_func_working_realloc" 1>&6
5244 if test $jm_cv_func_working_realloc = no; then
5245 LIBOBJS="$LIBOBJS realloc.o"
5246 cat >> confdefs.h <<EOF
5247 #define realloc rpl_realloc
5253 if test x = y; then
5254 for ac_func in DONE_WORKING_MALLOC_CHECK
5256 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5257 echo "configure:5258: checking for $ac_func" >&5
5258 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5259 echo $ac_n "(cached) $ac_c" 1>&6
5260 else
5261 cat > conftest.$ac_ext <<EOF
5262 #line 5263 "configure"
5263 #include "confdefs.h"
5264 /* System header to define __stub macros and hopefully few prototypes,
5265 which can conflict with char $ac_func(); below. */
5266 #include <assert.h>
5267 /* Override any gcc2 internal prototype to avoid an error. */
5268 /* We use char because int might match the return type of a gcc2
5269 builtin and then its argument prototype would still apply. */
5270 char $ac_func();
5272 int main() {
5274 /* The GNU C library defines this for functions which it implements
5275 to always fail with ENOSYS. Some functions are actually named
5276 something starting with __ and the normal name is an alias. */
5277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5278 choke me
5279 #else
5280 $ac_func();
5281 #endif
5283 ; return 0; }
5285 if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5286 rm -rf conftest*
5287 eval "ac_cv_func_$ac_func=yes"
5288 else
5289 echo "configure: failed program was:" >&5
5290 cat conftest.$ac_ext >&5
5291 rm -rf conftest*
5292 eval "ac_cv_func_$ac_func=no"
5294 rm -f conftest*
5297 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5298 echo "$ac_t""yes" 1>&6
5299 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5300 cat >> confdefs.h <<EOF
5301 #define $ac_tr_func 1
5304 else
5305 echo "$ac_t""no" 1>&6
5307 done
5310 ac_kludge=HAVE_DONE_WORKING_MALLOC_CHECK
5311 cat >> confdefs.h <<EOF
5312 #define $ac_kludge 1
5316 echo $ac_n "checking for working malloc""... $ac_c" 1>&6
5317 echo "configure:5318: checking for working malloc" >&5
5318 if eval "test \"`echo '$''{'jm_cv_func_working_malloc'+set}'`\" = set"; then
5319 echo $ac_n "(cached) $ac_c" 1>&6
5320 else
5321 if test "$cross_compiling" = yes; then
5322 jm_cv_func_working_malloc=no
5323 else
5324 cat > conftest.$ac_ext <<EOF
5325 #line 5326 "configure"
5326 #include "confdefs.h"
5328 char *malloc ();
5330 main ()
5332 exit (malloc (0) ? 0 : 1);
5336 if { (eval echo configure:5337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5337 then
5338 jm_cv_func_working_malloc=yes
5339 else
5340 echo "configure: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 rm -fr conftest*
5343 jm_cv_func_working_malloc=no
5345 rm -fr conftest*
5351 echo "$ac_t""$jm_cv_func_working_malloc" 1>&6
5352 if test $jm_cv_func_working_malloc = no; then
5353 LIBOBJS="$LIBOBJS malloc.o"
5354 cat >> confdefs.h <<EOF
5355 #define malloc rpl_malloc
5361 for ac_hdr in string.h
5363 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5364 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5365 echo "configure:5366: checking for $ac_hdr" >&5
5366 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5367 echo $ac_n "(cached) $ac_c" 1>&6
5368 else
5369 cat > conftest.$ac_ext <<EOF
5370 #line 5371 "configure"
5371 #include "confdefs.h"
5372 #include <$ac_hdr>
5374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5375 { (eval echo configure:5376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5377 if test -z "$ac_err"; then
5378 rm -rf conftest*
5379 eval "ac_cv_header_$ac_safe=yes"
5380 else
5381 echo "$ac_err" >&5
5382 echo "configure: failed program was:" >&5
5383 cat conftest.$ac_ext >&5
5384 rm -rf conftest*
5385 eval "ac_cv_header_$ac_safe=no"
5387 rm -f conftest*
5389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5390 echo "$ac_t""yes" 1>&6
5391 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5392 cat >> confdefs.h <<EOF
5393 #define $ac_tr_hdr 1
5396 else
5397 echo "$ac_t""no" 1>&6
5399 done
5401 echo $ac_n "checking for working readdir""... $ac_c" 1>&6
5402 echo "configure:5403: checking for working readdir" >&5
5403 if eval "test \"`echo '$''{'jm_cv_func_working_readdir'+set}'`\" = set"; then
5404 echo $ac_n "(cached) $ac_c" 1>&6
5405 else
5406 # Arrange for deletion of the temporary directory this test creates, in
5407 # case the test itself fails to delete everything -- as happens on Sunos.
5408 ac_clean_files="$ac_clean_files conf-dir"
5410 if test "$cross_compiling" = yes; then
5411 jm_cv_func_working_readdir=no
5412 else
5413 cat > conftest.$ac_ext <<EOF
5414 #line 5415 "configure"
5415 #include "confdefs.h"
5417 # include <stdio.h>
5418 # include <sys/types.h>
5419 # if HAVE_STRING_H
5420 # include <string.h>
5421 # endif
5423 # ifdef HAVE_DIRENT_H
5424 # include <dirent.h>
5425 # define NLENGTH(direct) (strlen((direct)->d_name))
5426 # else /* not HAVE_DIRENT_H */
5427 # define dirent direct
5428 # define NLENGTH(direct) ((direct)->d_namlen)
5429 # ifdef HAVE_SYS_NDIR_H
5430 # include <sys/ndir.h>
5431 # endif /* HAVE_SYS_NDIR_H */
5432 # ifdef HAVE_SYS_DIR_H
5433 # include <sys/dir.h>
5434 # endif /* HAVE_SYS_DIR_H */
5435 # ifdef HAVE_NDIR_H
5436 # include <ndir.h>
5437 # endif /* HAVE_NDIR_H */
5438 # endif /* HAVE_DIRENT_H */
5440 # define DOT_OR_DOTDOT(Basename) \
5441 (Basename[0] == '.' && (Basename[1] == '\0' \
5442 || (Basename[1] == '.' && Basename[2] == '\0')))
5444 static void
5445 create_300_file_dir (const char *dir)
5447 int i;
5449 if (mkdir (dir, 0700))
5450 abort ();
5451 if (chdir (dir))
5452 abort ();
5454 for (i = 0; i < 300; i++)
5456 char file_name[4];
5457 FILE *out;
5459 sprintf (file_name, "%03d", i);
5460 out = fopen (file_name, "w");
5461 if (!out)
5462 abort ();
5463 if (fclose (out) == EOF)
5464 abort ();
5467 if (chdir (".."))
5468 abort ();
5471 static void
5472 remove_dir (const char *dir)
5474 DIR *dirp;
5476 if (chdir (dir))
5477 abort ();
5479 dirp = opendir (".");
5480 if (dirp == NULL)
5481 abort ();
5483 while (1)
5485 struct dirent *dp = readdir (dirp);
5486 if (dp == NULL)
5487 break;
5489 if (DOT_OR_DOTDOT (dp->d_name))
5490 continue;
5492 if (unlink (dp->d_name))
5493 abort ();
5495 closedir (dirp);
5497 if (chdir (".."))
5498 abort ();
5500 if (rmdir (dir))
5501 exit (1);
5505 main ()
5507 const char *dir = "conf-dir";
5508 create_300_file_dir (dir);
5509 remove_dir (dir);
5510 exit (0);
5514 if { (eval echo configure:5515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5515 then
5516 jm_cv_func_working_readdir=yes
5517 else
5518 echo "configure: failed program was:" >&5
5519 cat conftest.$ac_ext >&5
5520 rm -fr conftest*
5521 jm_cv_func_working_readdir=no
5523 rm -fr conftest*
5528 echo "$ac_t""$jm_cv_func_working_readdir" 1>&6
5530 if test x = y; then
5531 for ac_func in WORKING_READDIR
5533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5534 echo "configure:5535: checking for $ac_func" >&5
5535 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5536 echo $ac_n "(cached) $ac_c" 1>&6
5537 else
5538 cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541 /* System header to define __stub macros and hopefully few prototypes,
5542 which can conflict with char $ac_func(); below. */
5543 #include <assert.h>
5544 /* Override any gcc2 internal prototype to avoid an error. */
5545 /* We use char because int might match the return type of a gcc2
5546 builtin and then its argument prototype would still apply. */
5547 char $ac_func();
5549 int main() {
5551 /* The GNU C library defines this for functions which it implements
5552 to always fail with ENOSYS. Some functions are actually named
5553 something starting with __ and the normal name is an alias. */
5554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5555 choke me
5556 #else
5557 $ac_func();
5558 #endif
5560 ; return 0; }
5562 if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5563 rm -rf conftest*
5564 eval "ac_cv_func_$ac_func=yes"
5565 else
5566 echo "configure: failed program was:" >&5
5567 cat conftest.$ac_ext >&5
5568 rm -rf conftest*
5569 eval "ac_cv_func_$ac_func=no"
5571 rm -f conftest*
5574 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5575 echo "$ac_t""yes" 1>&6
5576 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5577 cat >> confdefs.h <<EOF
5578 #define $ac_tr_func 1
5581 else
5582 echo "$ac_t""no" 1>&6
5584 done
5589 if test $jm_cv_func_working_readdir = yes; then
5590 ac_kludge=HAVE_WORKING_READDIR
5591 cat >> confdefs.h <<EOF
5592 #define $ac_kludge 1
5597 if test $jm_cv_func_memcmp_working = no; then
5598 cat >> confdefs.h <<EOF
5599 #define memcmp rpl_memcmp
5604 for ac_func in \
5605 clearerr_unlocked \
5606 feof_unlocked \
5607 ferror_unlocked \
5608 fflush_unlocked \
5609 fputc_unlocked \
5610 fread_unlocked \
5611 fwrite_unlocked \
5612 getc_unlocked \
5613 getchar_unlocked \
5614 putc_unlocked \
5615 putchar_unlocked \
5618 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5619 echo "configure:5620: checking for $ac_func" >&5
5620 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5621 echo $ac_n "(cached) $ac_c" 1>&6
5622 else
5623 cat > conftest.$ac_ext <<EOF
5624 #line 5625 "configure"
5625 #include "confdefs.h"
5626 /* System header to define __stub macros and hopefully few prototypes,
5627 which can conflict with char $ac_func(); below. */
5628 #include <assert.h>
5629 /* Override any gcc2 internal prototype to avoid an error. */
5630 /* We use char because int might match the return type of a gcc2
5631 builtin and then its argument prototype would still apply. */
5632 char $ac_func();
5634 int main() {
5636 /* The GNU C library defines this for functions which it implements
5637 to always fail with ENOSYS. Some functions are actually named
5638 something starting with __ and the normal name is an alias. */
5639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5640 choke me
5641 #else
5642 $ac_func();
5643 #endif
5645 ; return 0; }
5647 if { (eval echo configure:5648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5648 rm -rf conftest*
5649 eval "ac_cv_func_$ac_func=yes"
5650 else
5651 echo "configure: failed program was:" >&5
5652 cat conftest.$ac_ext >&5
5653 rm -rf conftest*
5654 eval "ac_cv_func_$ac_func=no"
5656 rm -f conftest*
5659 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5660 echo "$ac_t""yes" 1>&6
5661 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5662 cat >> confdefs.h <<EOF
5663 #define $ac_tr_func 1
5666 else
5667 echo "$ac_t""no" 1>&6
5669 done
5675 echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
5676 echo "configure:5677: checking for working fnmatch" >&5
5677 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
5678 echo $ac_n "(cached) $ac_c" 1>&6
5679 else
5680 # Some versions of Solaris or SCO have a broken fnmatch function.
5681 # So we run a test program. If we are cross-compiling, take no chance.
5682 # Thanks to John Oleynick and Franc,ois Pinard for this test.
5683 if test "$cross_compiling" = yes; then
5684 ac_cv_func_fnmatch_works=no
5685 else
5686 cat > conftest.$ac_ext <<EOF
5687 #line 5688 "configure"
5688 #include "confdefs.h"
5689 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
5691 if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5692 then
5693 ac_cv_func_fnmatch_works=yes
5694 else
5695 echo "configure: failed program was:" >&5
5696 cat conftest.$ac_ext >&5
5697 rm -fr conftest*
5698 ac_cv_func_fnmatch_works=no
5700 rm -fr conftest*
5705 echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
5706 if test $ac_cv_func_fnmatch_works = yes; then
5707 cat >> confdefs.h <<\EOF
5708 #define HAVE_FNMATCH 1
5713 if test $ac_cv_func_fnmatch_works = no \
5714 && test $ac_cv_gnu_library = no; then
5715 LIBOBJS="$LIBOBJS fnmatch.o"
5716 cat >> confdefs.h <<EOF
5717 #define fnmatch rpl_fnmatch
5728 for ac_hdr in unistd.h
5730 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5731 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5732 echo "configure:5733: checking for $ac_hdr" >&5
5733 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5734 echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736 cat > conftest.$ac_ext <<EOF
5737 #line 5738 "configure"
5738 #include "confdefs.h"
5739 #include <$ac_hdr>
5741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5742 { (eval echo configure:5743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5744 if test -z "$ac_err"; then
5745 rm -rf conftest*
5746 eval "ac_cv_header_$ac_safe=yes"
5747 else
5748 echo "$ac_err" >&5
5749 echo "configure: failed program was:" >&5
5750 cat conftest.$ac_ext >&5
5751 rm -rf conftest*
5752 eval "ac_cv_header_$ac_safe=no"
5754 rm -f conftest*
5756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5757 echo "$ac_t""yes" 1>&6
5758 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5759 cat >> confdefs.h <<EOF
5760 #define $ac_tr_hdr 1
5763 else
5764 echo "$ac_t""no" 1>&6
5766 done
5768 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5769 echo "configure:5770: checking for ssize_t" >&5
5770 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5771 echo $ac_n "(cached) $ac_c" 1>&6
5772 else
5773 cat > conftest.$ac_ext <<EOF
5774 #line 5775 "configure"
5775 #include "confdefs.h"
5776 #include <sys/types.h>
5777 #if STDC_HEADERS
5778 # include <stdlib.h>
5779 # include <stddef.h>
5780 #endif
5781 #if HAVE_UNISTD_H
5782 # include <unistd.h>
5783 #endif
5785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5786 egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5787 rm -rf conftest*
5788 ac_cv_type_ssize_t=yes
5789 else
5790 rm -rf conftest*
5791 ac_cv_type_ssize_t=no
5793 rm -f conftest*
5796 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5797 if test $ac_cv_type_ssize_t = no; then
5798 cat >> confdefs.h <<\EOF
5799 #define ssize_t int
5819 echo $ac_n "checking for getstr""... $ac_c" 1>&6
5820 echo "configure:5821: checking for getstr" >&5
5821 if eval "test \"`echo '$''{'ac_cv_func_getstr'+set}'`\" = set"; then
5822 echo $ac_n "(cached) $ac_c" 1>&6
5823 else
5824 cat > conftest.$ac_ext <<EOF
5825 #line 5826 "configure"
5826 #include "confdefs.h"
5827 /* System header to define __stub macros and hopefully few prototypes,
5828 which can conflict with char getstr(); below. */
5829 #include <assert.h>
5830 /* Override any gcc2 internal prototype to avoid an error. */
5831 /* We use char because int might match the return type of a gcc2
5832 builtin and then its argument prototype would still apply. */
5833 char getstr();
5835 int main() {
5837 /* The GNU C library defines this for functions which it implements
5838 to always fail with ENOSYS. Some functions are actually named
5839 something starting with __ and the normal name is an alias. */
5840 #if defined (__stub_getstr) || defined (__stub___getstr)
5841 choke me
5842 #else
5843 getstr();
5844 #endif
5846 ; return 0; }
5848 if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5849 rm -rf conftest*
5850 eval "ac_cv_func_getstr=yes"
5851 else
5852 echo "configure: failed program was:" >&5
5853 cat conftest.$ac_ext >&5
5854 rm -rf conftest*
5855 eval "ac_cv_func_getstr=no"
5857 rm -f conftest*
5860 if eval "test \"`echo '$ac_cv_func_'getstr`\" = yes"; then
5861 echo "$ac_t""yes" 1>&6
5863 else
5864 echo "$ac_t""no" 1>&6
5865 LIBOBJS="$LIBOBJS getline.o"
5870 for ac_func in fchdir getcwd strerror basename endgrent endpwent
5872 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5873 echo "configure:5874: checking for $ac_func" >&5
5874 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5875 echo $ac_n "(cached) $ac_c" 1>&6
5876 else
5877 cat > conftest.$ac_ext <<EOF
5878 #line 5879 "configure"
5879 #include "confdefs.h"
5880 /* System header to define __stub macros and hopefully few prototypes,
5881 which can conflict with char $ac_func(); below. */
5882 #include <assert.h>
5883 /* Override any gcc2 internal prototype to avoid an error. */
5884 /* We use char because int might match the return type of a gcc2
5885 builtin and then its argument prototype would still apply. */
5886 char $ac_func();
5888 int main() {
5890 /* The GNU C library defines this for functions which it implements
5891 to always fail with ENOSYS. Some functions are actually named
5892 something starting with __ and the normal name is an alias. */
5893 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5894 choke me
5895 #else
5896 $ac_func();
5897 #endif
5899 ; return 0; }
5901 if { (eval echo configure:5902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5902 rm -rf conftest*
5903 eval "ac_cv_func_$ac_func=yes"
5904 else
5905 echo "configure: failed program was:" >&5
5906 cat conftest.$ac_ext >&5
5907 rm -rf conftest*
5908 eval "ac_cv_func_$ac_func=no"
5910 rm -f conftest*
5913 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5914 echo "$ac_t""yes" 1>&6
5915 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5916 cat >> confdefs.h <<EOF
5917 #define $ac_tr_func 1
5920 else
5921 echo "$ac_t""no" 1>&6
5923 done
5925 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
5926 echo "configure:5927: checking for vprintf" >&5
5927 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
5928 echo $ac_n "(cached) $ac_c" 1>&6
5929 else
5930 cat > conftest.$ac_ext <<EOF
5931 #line 5932 "configure"
5932 #include "confdefs.h"
5933 /* System header to define __stub macros and hopefully few prototypes,
5934 which can conflict with char vprintf(); below. */
5935 #include <assert.h>
5936 /* Override any gcc2 internal prototype to avoid an error. */
5937 /* We use char because int might match the return type of a gcc2
5938 builtin and then its argument prototype would still apply. */
5939 char vprintf();
5941 int main() {
5943 /* The GNU C library defines this for functions which it implements
5944 to always fail with ENOSYS. Some functions are actually named
5945 something starting with __ and the normal name is an alias. */
5946 #if defined (__stub_vprintf) || defined (__stub___vprintf)
5947 choke me
5948 #else
5949 vprintf();
5950 #endif
5952 ; return 0; }
5954 if { (eval echo configure:5955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5955 rm -rf conftest*
5956 eval "ac_cv_func_vprintf=yes"
5957 else
5958 echo "configure: failed program was:" >&5
5959 cat conftest.$ac_ext >&5
5960 rm -rf conftest*
5961 eval "ac_cv_func_vprintf=no"
5963 rm -f conftest*
5966 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
5967 echo "$ac_t""yes" 1>&6
5968 cat >> confdefs.h <<\EOF
5969 #define HAVE_VPRINTF 1
5972 else
5973 echo "$ac_t""no" 1>&6
5976 if test "$ac_cv_func_vprintf" != yes; then
5977 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
5978 echo "configure:5979: checking for _doprnt" >&5
5979 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
5980 echo $ac_n "(cached) $ac_c" 1>&6
5981 else
5982 cat > conftest.$ac_ext <<EOF
5983 #line 5984 "configure"
5984 #include "confdefs.h"
5985 /* System header to define __stub macros and hopefully few prototypes,
5986 which can conflict with char _doprnt(); below. */
5987 #include <assert.h>
5988 /* Override any gcc2 internal prototype to avoid an error. */
5989 /* We use char because int might match the return type of a gcc2
5990 builtin and then its argument prototype would still apply. */
5991 char _doprnt();
5993 int main() {
5995 /* The GNU C library defines this for functions which it implements
5996 to always fail with ENOSYS. Some functions are actually named
5997 something starting with __ and the normal name is an alias. */
5998 #if defined (__stub__doprnt) || defined (__stub____doprnt)
5999 choke me
6000 #else
6001 _doprnt();
6002 #endif
6004 ; return 0; }
6006 if { (eval echo configure:6007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6007 rm -rf conftest*
6008 eval "ac_cv_func__doprnt=yes"
6009 else
6010 echo "configure: failed program was:" >&5
6011 cat conftest.$ac_ext >&5
6012 rm -rf conftest*
6013 eval "ac_cv_func__doprnt=no"
6015 rm -f conftest*
6018 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
6019 echo "$ac_t""yes" 1>&6
6020 cat >> confdefs.h <<\EOF
6021 #define HAVE_DOPRNT 1
6024 else
6025 echo "$ac_t""no" 1>&6
6030 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6031 # for constant arguments. Useless!
6032 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6033 echo "configure:6034: checking for working alloca.h" >&5
6034 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6035 echo $ac_n "(cached) $ac_c" 1>&6
6036 else
6037 cat > conftest.$ac_ext <<EOF
6038 #line 6039 "configure"
6039 #include "confdefs.h"
6040 #include <alloca.h>
6041 int main() {
6042 char *p = alloca(2 * sizeof(int));
6043 ; return 0; }
6045 if { (eval echo configure:6046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6046 rm -rf conftest*
6047 ac_cv_header_alloca_h=yes
6048 else
6049 echo "configure: failed program was:" >&5
6050 cat conftest.$ac_ext >&5
6051 rm -rf conftest*
6052 ac_cv_header_alloca_h=no
6054 rm -f conftest*
6057 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6058 if test $ac_cv_header_alloca_h = yes; then
6059 cat >> confdefs.h <<\EOF
6060 #define HAVE_ALLOCA_H 1
6065 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6066 echo "configure:6067: checking for alloca" >&5
6067 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6068 echo $ac_n "(cached) $ac_c" 1>&6
6069 else
6070 cat > conftest.$ac_ext <<EOF
6071 #line 6072 "configure"
6072 #include "confdefs.h"
6074 #ifdef __GNUC__
6075 # define alloca __builtin_alloca
6076 #else
6077 # ifdef _MSC_VER
6078 # include <malloc.h>
6079 # define alloca _alloca
6080 # else
6081 # if HAVE_ALLOCA_H
6082 # include <alloca.h>
6083 # else
6084 # ifdef _AIX
6085 #pragma alloca
6086 # else
6087 # ifndef alloca /* predefined by HP cc +Olibcalls */
6088 char *alloca ();
6089 # endif
6090 # endif
6091 # endif
6092 # endif
6093 #endif
6095 int main() {
6096 char *p = (char *) alloca(1);
6097 ; return 0; }
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6100 rm -rf conftest*
6101 ac_cv_func_alloca_works=yes
6102 else
6103 echo "configure: failed program was:" >&5
6104 cat conftest.$ac_ext >&5
6105 rm -rf conftest*
6106 ac_cv_func_alloca_works=no
6108 rm -f conftest*
6111 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6112 if test $ac_cv_func_alloca_works = yes; then
6113 cat >> confdefs.h <<\EOF
6114 #define HAVE_ALLOCA 1
6119 if test $ac_cv_func_alloca_works = no; then
6120 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6121 # that cause trouble. Some versions do not even contain alloca or
6122 # contain a buggy version. If you still want to use their alloca,
6123 # use ar to extract alloca.o from them instead of compiling alloca.c.
6124 ALLOCA=alloca.${ac_objext}
6125 cat >> confdefs.h <<\EOF
6126 #define C_ALLOCA 1
6130 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6131 echo "configure:6132: checking whether alloca needs Cray hooks" >&5
6132 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6133 echo $ac_n "(cached) $ac_c" 1>&6
6134 else
6135 cat > conftest.$ac_ext <<EOF
6136 #line 6137 "configure"
6137 #include "confdefs.h"
6138 #if defined(CRAY) && ! defined(CRAY2)
6139 webecray
6140 #else
6141 wenotbecray
6142 #endif
6145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6146 egrep "webecray" >/dev/null 2>&1; then
6147 rm -rf conftest*
6148 ac_cv_os_cray=yes
6149 else
6150 rm -rf conftest*
6151 ac_cv_os_cray=no
6153 rm -f conftest*
6157 echo "$ac_t""$ac_cv_os_cray" 1>&6
6158 if test $ac_cv_os_cray = yes; then
6159 for ac_func in _getb67 GETB67 getb67; do
6160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6161 echo "configure:6162: checking for $ac_func" >&5
6162 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6163 echo $ac_n "(cached) $ac_c" 1>&6
6164 else
6165 cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 /* System header to define __stub macros and hopefully few prototypes,
6169 which can conflict with char $ac_func(); below. */
6170 #include <assert.h>
6171 /* Override any gcc2 internal prototype to avoid an error. */
6172 /* We use char because int might match the return type of a gcc2
6173 builtin and then its argument prototype would still apply. */
6174 char $ac_func();
6176 int main() {
6178 /* The GNU C library defines this for functions which it implements
6179 to always fail with ENOSYS. Some functions are actually named
6180 something starting with __ and the normal name is an alias. */
6181 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6182 choke me
6183 #else
6184 $ac_func();
6185 #endif
6187 ; return 0; }
6189 if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6190 rm -rf conftest*
6191 eval "ac_cv_func_$ac_func=yes"
6192 else
6193 echo "configure: failed program was:" >&5
6194 cat conftest.$ac_ext >&5
6195 rm -rf conftest*
6196 eval "ac_cv_func_$ac_func=no"
6198 rm -f conftest*
6201 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6202 echo "$ac_t""yes" 1>&6
6203 cat >> confdefs.h <<EOF
6204 #define CRAY_STACKSEG_END $ac_func
6207 break
6208 else
6209 echo "$ac_t""no" 1>&6
6212 done
6215 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6216 echo "configure:6217: checking stack direction for C alloca" >&5
6217 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6218 echo $ac_n "(cached) $ac_c" 1>&6
6219 else
6220 if test "$cross_compiling" = yes; then
6221 ac_cv_c_stack_direction=0
6222 else
6223 cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6226 find_stack_direction ()
6228 static char *addr = 0;
6229 auto char dummy;
6230 if (addr == 0)
6232 addr = &dummy;
6233 return find_stack_direction ();
6235 else
6236 return (&dummy > addr) ? 1 : -1;
6238 main ()
6240 exit (find_stack_direction() < 0);
6243 if { (eval echo configure:6244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6244 then
6245 ac_cv_c_stack_direction=1
6246 else
6247 echo "configure: failed program was:" >&5
6248 cat conftest.$ac_ext >&5
6249 rm -fr conftest*
6250 ac_cv_c_stack_direction=-1
6252 rm -fr conftest*
6257 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6258 cat >> confdefs.h <<EOF
6259 #define STACK_DIRECTION $ac_cv_c_stack_direction
6264 # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
6265 echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6
6266 echo "configure:6267: checking for getmntent in -lsun" >&5
6267 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'`
6268 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6269 echo $ac_n "(cached) $ac_c" 1>&6
6270 else
6271 ac_save_LIBS="$LIBS"
6272 LIBS="-lsun $LIBS"
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* Override any gcc2 internal prototype to avoid an error. */
6277 /* We use char because int might match the return type of a gcc2
6278 builtin and then its argument prototype would still apply. */
6279 char getmntent();
6281 int main() {
6282 getmntent()
6283 ; return 0; }
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286 rm -rf conftest*
6287 eval "ac_cv_lib_$ac_lib_var=yes"
6288 else
6289 echo "configure: failed program was:" >&5
6290 cat conftest.$ac_ext >&5
6291 rm -rf conftest*
6292 eval "ac_cv_lib_$ac_lib_var=no"
6294 rm -f conftest*
6295 LIBS="$ac_save_LIBS"
6298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6299 echo "$ac_t""yes" 1>&6
6300 LIBS="-lsun $LIBS"
6301 else
6302 echo "$ac_t""no" 1>&6
6303 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6
6304 echo "configure:6305: checking for getmntent in -lseq" >&5
6305 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'`
6306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6307 echo $ac_n "(cached) $ac_c" 1>&6
6308 else
6309 ac_save_LIBS="$LIBS"
6310 LIBS="-lseq $LIBS"
6311 cat > conftest.$ac_ext <<EOF
6312 #line 6313 "configure"
6313 #include "confdefs.h"
6314 /* Override any gcc2 internal prototype to avoid an error. */
6315 /* We use char because int might match the return type of a gcc2
6316 builtin and then its argument prototype would still apply. */
6317 char getmntent();
6319 int main() {
6320 getmntent()
6321 ; return 0; }
6323 if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6324 rm -rf conftest*
6325 eval "ac_cv_lib_$ac_lib_var=yes"
6326 else
6327 echo "configure: failed program was:" >&5
6328 cat conftest.$ac_ext >&5
6329 rm -rf conftest*
6330 eval "ac_cv_lib_$ac_lib_var=no"
6332 rm -f conftest*
6333 LIBS="$ac_save_LIBS"
6336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6337 echo "$ac_t""yes" 1>&6
6338 LIBS="-lseq $LIBS"
6339 else
6340 echo "$ac_t""no" 1>&6
6341 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6
6342 echo "configure:6343: checking for getmntent in -lgen" >&5
6343 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'`
6344 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6345 echo $ac_n "(cached) $ac_c" 1>&6
6346 else
6347 ac_save_LIBS="$LIBS"
6348 LIBS="-lgen $LIBS"
6349 cat > conftest.$ac_ext <<EOF
6350 #line 6351 "configure"
6351 #include "confdefs.h"
6352 /* Override any gcc2 internal prototype to avoid an error. */
6353 /* We use char because int might match the return type of a gcc2
6354 builtin and then its argument prototype would still apply. */
6355 char getmntent();
6357 int main() {
6358 getmntent()
6359 ; return 0; }
6361 if { (eval echo configure:6362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6362 rm -rf conftest*
6363 eval "ac_cv_lib_$ac_lib_var=yes"
6364 else
6365 echo "configure: failed program was:" >&5
6366 cat conftest.$ac_ext >&5
6367 rm -rf conftest*
6368 eval "ac_cv_lib_$ac_lib_var=no"
6370 rm -f conftest*
6371 LIBS="$ac_save_LIBS"
6374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6375 echo "$ac_t""yes" 1>&6
6376 LIBS="-lgen $LIBS"
6377 else
6378 echo "$ac_t""no" 1>&6
6385 echo $ac_n "checking for getmntent""... $ac_c" 1>&6
6386 echo "configure:6387: checking for getmntent" >&5
6387 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
6388 echo $ac_n "(cached) $ac_c" 1>&6
6389 else
6390 cat > conftest.$ac_ext <<EOF
6391 #line 6392 "configure"
6392 #include "confdefs.h"
6393 /* System header to define __stub macros and hopefully few prototypes,
6394 which can conflict with char getmntent(); below. */
6395 #include <assert.h>
6396 /* Override any gcc2 internal prototype to avoid an error. */
6397 /* We use char because int might match the return type of a gcc2
6398 builtin and then its argument prototype would still apply. */
6399 char getmntent();
6401 int main() {
6403 /* The GNU C library defines this for functions which it implements
6404 to always fail with ENOSYS. Some functions are actually named
6405 something starting with __ and the normal name is an alias. */
6406 #if defined (__stub_getmntent) || defined (__stub___getmntent)
6407 choke me
6408 #else
6409 getmntent();
6410 #endif
6412 ; return 0; }
6414 if { (eval echo configure:6415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6415 rm -rf conftest*
6416 eval "ac_cv_func_getmntent=yes"
6417 else
6418 echo "configure: failed program was:" >&5
6419 cat conftest.$ac_ext >&5
6420 rm -rf conftest*
6421 eval "ac_cv_func_getmntent=no"
6423 rm -f conftest*
6426 if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
6427 echo "$ac_t""yes" 1>&6
6428 cat >> confdefs.h <<\EOF
6429 #define HAVE_GETMNTENT 1
6432 else
6433 echo "$ac_t""no" 1>&6
6436 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
6437 echo "configure:6438: checking whether closedir returns void" >&5
6438 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
6439 echo $ac_n "(cached) $ac_c" 1>&6
6440 else
6441 if test "$cross_compiling" = yes; then
6442 ac_cv_func_closedir_void=yes
6443 else
6444 cat > conftest.$ac_ext <<EOF
6445 #line 6446 "configure"
6446 #include "confdefs.h"
6447 #include <sys/types.h>
6448 #include <$ac_header_dirent>
6449 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6452 then
6453 ac_cv_func_closedir_void=no
6454 else
6455 echo "configure: failed program was:" >&5
6456 cat conftest.$ac_ext >&5
6457 rm -fr conftest*
6458 ac_cv_func_closedir_void=yes
6460 rm -fr conftest*
6465 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
6466 if test $ac_cv_func_closedir_void = yes; then
6467 cat >> confdefs.h <<\EOF
6468 #define CLOSEDIR_VOID 1
6474 # This is necessary so that .o files in LIBOBJS are also built via
6475 # the ANSI2KNR-filtering rules.
6476 LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
6477 trap '' 1 2 15
6478 cat > confcache <<\EOF
6479 # This file is a shell script that caches the results of configure
6480 # tests run on this system so they can be shared between configure
6481 # scripts and configure runs. It is not useful on other systems.
6482 # If it contains results you don't want to keep, you may remove or edit it.
6484 # By default, configure uses ./config.cache as the cache file,
6485 # creating it if it does not exist already. You can give configure
6486 # the --cache-file=FILE option to use a different cache file; that is
6487 # what configure does when it calls configure scripts in
6488 # subdirectories, so they share the cache.
6489 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6490 # config.status only pays attention to the cache file if you give it the
6491 # --recheck option to rerun configure.
6494 # The following way of writing the cache mishandles newlines in values,
6495 # but we know of no workaround that is simple, portable, and efficient.
6496 # So, don't put newlines in cache variables' values.
6497 # Ultrix sh set writes to stderr and can't be redirected directly,
6498 # and sets the high bit in the cache file unless we assign to the vars.
6499 (set) 2>&1 |
6500 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6501 *ac_space=\ *)
6502 # `set' does not quote correctly, so add quotes (double-quote substitution
6503 # turns \\\\ into \\, and sed turns \\ into \).
6504 sed -n \
6505 -e "s/'/'\\\\''/g" \
6506 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6509 # `set' quotes correctly as required by POSIX, so do not add quotes.
6510 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6512 esac >> confcache
6513 if cmp -s $cache_file confcache; then
6515 else
6516 if test -w $cache_file; then
6517 echo "updating cache $cache_file"
6518 cat confcache > $cache_file
6519 else
6520 echo "not updating unwritable cache $cache_file"
6523 rm -f confcache
6525 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6527 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6528 # Let make expand exec_prefix.
6529 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6531 # Any assignment to VPATH causes Sun make to only execute
6532 # the first set of double-colon rules, so remove it if not needed.
6533 # If there is a colon in the path, we need to keep it.
6534 if test "x$srcdir" = x.; then
6535 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6538 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6540 DEFS=-DHAVE_CONFIG_H
6542 # Without the "./", some shells look in PATH for config.status.
6543 : ${CONFIG_STATUS=./config.status}
6545 echo creating $CONFIG_STATUS
6546 rm -f $CONFIG_STATUS
6547 cat > $CONFIG_STATUS <<EOF
6548 #! /bin/sh
6549 # Generated automatically by configure.
6550 # Run this file to recreate the current configuration.
6551 # This directory was configured as follows,
6552 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6554 # $0 $ac_configure_args
6556 # Compiler output produced by configure, useful for debugging
6557 # configure, is in ./config.log if it exists.
6559 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6560 for ac_option
6562 case "\$ac_option" in
6563 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6564 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6565 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6566 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6567 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6568 exit 0 ;;
6569 -help | --help | --hel | --he | --h)
6570 echo "\$ac_cs_usage"; exit 0 ;;
6571 *) echo "\$ac_cs_usage"; exit 1 ;;
6572 esac
6573 done
6575 ac_given_srcdir=$srcdir
6576 ac_given_INSTALL="$INSTALL"
6578 trap 'rm -fr `echo "Makefile lib/Makefile find/Makefile find/testsuite/Makefile
6579 xargs/Makefile xargs/testsuite/Makefile locate/Makefile
6580 locate/updatedb
6581 doc/Makefile m4/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6583 cat >> $CONFIG_STATUS <<EOF
6585 # Protect against being on the right side of a sed subst in config.status.
6586 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6587 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6588 $ac_vpsub
6589 $extrasub
6590 s%@SHELL@%$SHELL%g
6591 s%@CFLAGS@%$CFLAGS%g
6592 s%@CPPFLAGS@%$CPPFLAGS%g
6593 s%@CXXFLAGS@%$CXXFLAGS%g
6594 s%@FFLAGS@%$FFLAGS%g
6595 s%@DEFS@%$DEFS%g
6596 s%@LDFLAGS@%$LDFLAGS%g
6597 s%@LIBS@%$LIBS%g
6598 s%@exec_prefix@%$exec_prefix%g
6599 s%@prefix@%$prefix%g
6600 s%@program_transform_name@%$program_transform_name%g
6601 s%@bindir@%$bindir%g
6602 s%@sbindir@%$sbindir%g
6603 s%@libexecdir@%$libexecdir%g
6604 s%@datadir@%$datadir%g
6605 s%@sysconfdir@%$sysconfdir%g
6606 s%@sharedstatedir@%$sharedstatedir%g
6607 s%@localstatedir@%$localstatedir%g
6608 s%@libdir@%$libdir%g
6609 s%@includedir@%$includedir%g
6610 s%@oldincludedir@%$oldincludedir%g
6611 s%@infodir@%$infodir%g
6612 s%@mandir@%$mandir%g
6613 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6614 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6615 s%@INSTALL_DATA@%$INSTALL_DATA%g
6616 s%@PACKAGE@%$PACKAGE%g
6617 s%@VERSION@%$VERSION%g
6618 s%@ACLOCAL@%$ACLOCAL%g
6619 s%@AUTOCONF@%$AUTOCONF%g
6620 s%@AUTOMAKE@%$AUTOMAKE%g
6621 s%@AUTOHEADER@%$AUTOHEADER%g
6622 s%@MAKEINFO@%$MAKEINFO%g
6623 s%@SET_MAKE@%$SET_MAKE%g
6624 s%@INCLUDES@%$INCLUDES%g
6625 s%@CC@%$CC%g
6626 s%@CPP@%$CPP%g
6627 s%@U@%$U%g
6628 s%@ANSI2KNR@%$ANSI2KNR%g
6629 s%@RANLIB@%$RANLIB%g
6630 s%@LIBOBJS@%$LIBOBJS%g
6631 s%@ALLOCA@%$ALLOCA%g
6633 CEOF
6636 cat >> $CONFIG_STATUS <<\EOF
6638 # Split the substitutions into bite-sized pieces for seds with
6639 # small command number limits, like on Digital OSF/1 and HP-UX.
6640 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6641 ac_file=1 # Number of current file.
6642 ac_beg=1 # First line for current file.
6643 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6644 ac_more_lines=:
6645 ac_sed_cmds=""
6646 while $ac_more_lines; do
6647 if test $ac_beg -gt 1; then
6648 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6649 else
6650 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6652 if test ! -s conftest.s$ac_file; then
6653 ac_more_lines=false
6654 rm -f conftest.s$ac_file
6655 else
6656 if test -z "$ac_sed_cmds"; then
6657 ac_sed_cmds="sed -f conftest.s$ac_file"
6658 else
6659 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6661 ac_file=`expr $ac_file + 1`
6662 ac_beg=$ac_end
6663 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6665 done
6666 if test -z "$ac_sed_cmds"; then
6667 ac_sed_cmds=cat
6671 cat >> $CONFIG_STATUS <<EOF
6673 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile find/Makefile find/testsuite/Makefile
6674 xargs/Makefile xargs/testsuite/Makefile locate/Makefile
6675 locate/updatedb
6676 doc/Makefile m4/Makefile"}
6678 cat >> $CONFIG_STATUS <<\EOF
6679 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6680 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6681 case "$ac_file" in
6682 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6683 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6684 *) ac_file_in="${ac_file}.in" ;;
6685 esac
6687 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6689 # Remove last slash and all that follows it. Not all systems have dirname.
6690 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6691 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6692 # The file is in a subdirectory.
6693 test ! -d "$ac_dir" && mkdir "$ac_dir"
6694 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6695 # A "../" for each directory in $ac_dir_suffix.
6696 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6697 else
6698 ac_dir_suffix= ac_dots=
6701 case "$ac_given_srcdir" in
6702 .) srcdir=.
6703 if test -z "$ac_dots"; then top_srcdir=.
6704 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6705 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6706 *) # Relative path.
6707 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6708 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6709 esac
6711 case "$ac_given_INSTALL" in
6712 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6713 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6714 esac
6716 echo creating "$ac_file"
6717 rm -f "$ac_file"
6718 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6719 case "$ac_file" in
6720 *Makefile*) ac_comsub="1i\\
6721 # $configure_input" ;;
6722 *) ac_comsub= ;;
6723 esac
6725 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6726 sed -e "$ac_comsub
6727 s%@configure_input@%$configure_input%g
6728 s%@srcdir@%$srcdir%g
6729 s%@top_srcdir@%$top_srcdir%g
6730 s%@INSTALL@%$INSTALL%g
6731 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6732 fi; done
6733 rm -f conftest.s*
6735 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6736 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6738 # ac_d sets the value in "#define NAME VALUE" lines.
6739 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6740 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6741 ac_dC='\3'
6742 ac_dD='%g'
6743 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6744 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6745 ac_uB='\([ ]\)%\1#\2define\3'
6746 ac_uC=' '
6747 ac_uD='\4%g'
6748 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6749 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6750 ac_eB='$%\1#\2define\3'
6751 ac_eC=' '
6752 ac_eD='%g'
6754 if test "${CONFIG_HEADERS+set}" != set; then
6756 cat >> $CONFIG_STATUS <<EOF
6757 CONFIG_HEADERS="config.h"
6759 cat >> $CONFIG_STATUS <<\EOF
6761 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6762 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6763 case "$ac_file" in
6764 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6765 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6766 *) ac_file_in="${ac_file}.in" ;;
6767 esac
6769 echo creating $ac_file
6771 rm -f conftest.frag conftest.in conftest.out
6772 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6773 cat $ac_file_inputs > conftest.in
6777 # Transform confdefs.h into a sed script conftest.vals that substitutes
6778 # the proper values into config.h.in to produce config.h. And first:
6779 # Protect against being on the right side of a sed subst in config.status.
6780 # Protect against being in an unquoted here document in config.status.
6781 rm -f conftest.vals
6782 cat > conftest.hdr <<\EOF
6783 s/[\\&%]/\\&/g
6784 s%[\\$`]%\\&%g
6785 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6786 s%ac_d%ac_u%gp
6787 s%ac_u%ac_e%gp
6789 sed -n -f conftest.hdr confdefs.h > conftest.vals
6790 rm -f conftest.hdr
6792 # This sed command replaces #undef with comments. This is necessary, for
6793 # example, in the case of _POSIX_SOURCE, which is predefined and required
6794 # on some systems where configure will not decide to define it.
6795 cat >> conftest.vals <<\EOF
6796 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6799 # Break up conftest.vals because some shells have a limit on
6800 # the size of here documents, and old seds have small limits too.
6802 rm -f conftest.tail
6803 while :
6805 ac_lines=`grep -c . conftest.vals`
6806 # grep -c gives empty output for an empty file on some AIX systems.
6807 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6808 # Write a limited-size here document to conftest.frag.
6809 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6810 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6811 echo 'CEOF
6812 sed -f conftest.frag conftest.in > conftest.out
6813 rm -f conftest.in
6814 mv conftest.out conftest.in
6815 ' >> $CONFIG_STATUS
6816 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6817 rm -f conftest.vals
6818 mv conftest.tail conftest.vals
6819 done
6820 rm -f conftest.vals
6822 cat >> $CONFIG_STATUS <<\EOF
6823 rm -f conftest.frag conftest.h
6824 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6825 cat conftest.in >> conftest.h
6826 rm -f conftest.in
6827 if cmp -s $ac_file conftest.h 2>/dev/null; then
6828 echo "$ac_file is unchanged"
6829 rm -f conftest.h
6830 else
6831 # Remove last slash and all that follows it. Not all systems have dirname.
6832 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6833 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6834 # The file is in a subdirectory.
6835 test ! -d "$ac_dir" && mkdir "$ac_dir"
6837 rm -f $ac_file
6838 mv conftest.h $ac_file
6840 fi; done
6843 cat >> $CONFIG_STATUS <<EOF
6847 cat >> $CONFIG_STATUS <<\EOF
6848 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6849 date > stamp-h
6850 exit 0
6852 chmod +x $CONFIG_STATUS
6853 rm -fr confdefs* $ac_clean_files
6854 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1