(read_makefile, parse_file_seq) [__MS_DOS__]: Don't see : as separator in
[make.git] / configure
blob57a74b6a09e7e53b1047a8d6825c5242216232ed
1 #! /bin/sh
3 # From configure.in Id: configure.in,v 1.47 1995/02/22 03:18:18 roland Alpha
4 # Guess values for system-dependent variables and create Makefiles.
5 # Generated automatically using autoconf version 2.1.3
6 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Defaults:
12 ac_help=
13 ac_default_prefix=/usr/local
14 # Any additions from configure.in:
15 ac_help="$ac_help
16 export jobs with the Customs daemon (NOT SUPPORTED)"
18 # Initialize some variables set by options.
19 # The variables have the same names as the options, with
20 # dashes changed to underlines.
21 build=NONE
22 cache_file=./config.cache
23 exec_prefix=NONE
24 host=NONE
25 no_create=
26 nonopt=NONE
27 no_recursion=
28 prefix=NONE
29 program_prefix=NONE
30 program_suffix=NONE
31 program_transform_name=s,x,x,
32 silent=
33 site=
34 srcdir=
35 target=NONE
36 verbose=
37 x_includes=NONE
38 x_libraries=NONE
40 # Initialize some other variables.
41 subdirs=
43 ac_prev=
44 for ac_option
47 # If the previous option needs an argument, assign it.
48 if test -n "$ac_prev"; then
49 eval "$ac_prev=\$ac_option"
50 ac_prev=
51 continue
54 case "$ac_option" in
55 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
56 *) ac_optarg= ;;
57 esac
59 # Accept the important Cygnus configure options, so we can diagnose typos.
61 case "$ac_option" in
63 -build | --build | --buil | --bui | --bu | --b)
64 ac_prev=build ;;
65 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
66 build="$ac_optarg" ;;
68 -cache-file | --cache-file | --cache-fil | --cache-fi \
69 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
70 ac_prev=cache_file ;;
71 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
72 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
73 cache_file="$ac_optarg" ;;
75 -disable-* | --disable-*)
76 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
77 # Reject names that are not valid shell variable names.
78 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
79 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
81 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
82 eval "enable_${ac_feature}=no" ;;
84 -enable-* | --enable-*)
85 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
86 # Reject names that are not valid shell variable names.
87 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
88 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
90 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
91 case "$ac_option" in
92 *=*) ;;
93 *) ac_optarg=yes ;;
94 esac
95 eval "enable_${ac_feature}='$ac_optarg'" ;;
97 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
98 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
99 | --exec | --exe | --ex)
100 ac_prev=exec_prefix ;;
101 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
102 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
103 | --exec=* | --exe=* | --ex=*)
104 exec_prefix="$ac_optarg" ;;
106 -gas | --gas | --ga | --g)
107 # Obsolete; use --with-gas.
108 with_gas=yes ;;
110 -help | --help | --hel | --he)
111 # Omit some internal or obsolete options to make the list less imposing.
112 # This message is too long to be a string in the A/UX 3.1 sh.
113 cat << EOF
114 Usage: configure [options] [host]
115 Options: [defaults in brackets after descriptions]
116 Configuration:
117 --cache-file=FILE cache test results in FILE
118 --help print this message
119 --no-create do not create output files
120 --quiet, --silent do not print \`checking...' messages
121 --version print the version of autoconf that created configure
122 Directory and file names:
123 --prefix=PREFIX install architecture-independent files in PREFIX
124 [$ac_default_prefix]
125 --exec-prefix=PREFIX install architecture-dependent files in PREFIX
126 [same as prefix]
127 --srcdir=DIR find the sources in DIR [configure dir or ..]
128 --program-prefix=PREFIX prepend PREFIX to installed program names
129 --program-suffix=SUFFIX append SUFFIX to installed program names
130 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
131 Host type:
132 --build=BUILD configure for building on BUILD [BUILD=HOST]
133 --host=HOST configure for HOST [guessed]
134 --target=TARGET configure for TARGET [TARGET=HOST]
135 Features and packages:
136 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
137 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
138 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
139 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
140 --x-includes=DIR X include files are in DIR
141 --x-libraries=DIR X library files are in DIR
142 --enable and --with options recognized:$ac_help
144 exit 0 ;;
146 -host | --host | --hos | --ho)
147 ac_prev=host ;;
148 -host=* | --host=* | --hos=* | --ho=*)
149 host="$ac_optarg" ;;
151 -nfp | --nfp | --nf)
152 # Obsolete; use --without-fp.
153 with_fp=no ;;
155 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
156 | --no-cr | --no-c)
157 no_create=yes ;;
159 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
160 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
161 no_recursion=yes ;;
163 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
164 ac_prev=prefix ;;
165 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
166 prefix="$ac_optarg" ;;
168 -program-prefix | --program-prefix | --program-prefi | --program-pref \
169 | --program-pre | --program-pr | --program-p)
170 ac_prev=program_prefix ;;
171 -program-prefix=* | --program-prefix=* | --program-prefi=* \
172 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
173 program_prefix="$ac_optarg" ;;
175 -program-suffix | --program-suffix | --program-suffi | --program-suff \
176 | --program-suf | --program-su | --program-s)
177 ac_prev=program_suffix ;;
178 -program-suffix=* | --program-suffix=* | --program-suffi=* \
179 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
180 program_suffix="$ac_optarg" ;;
182 -program-transform-name | --program-transform-name \
183 | --program-transform-nam | --program-transform-na \
184 | --program-transform-n | --program-transform- \
185 | --program-transform | --program-transfor \
186 | --program-transfo | --program-transf \
187 | --program-trans | --program-tran \
188 | --progr-tra | --program-tr | --program-t)
189 ac_prev=program_transform_name ;;
190 -program-transform-name=* | --program-transform-name=* \
191 | --program-transform-nam=* | --program-transform-na=* \
192 | --program-transform-n=* | --program-transform-=* \
193 | --program-transform=* | --program-transfor=* \
194 | --program-transfo=* | --program-transf=* \
195 | --program-trans=* | --program-tran=* \
196 | --progr-tra=* | --program-tr=* | --program-t=*)
197 program_transform_name="$ac_optarg" ;;
199 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
200 | -silent | --silent | --silen | --sile | --sil)
201 silent=yes ;;
203 -site | --site | --sit)
204 ac_prev=site ;;
205 -site=* | --site=* | --sit=*)
206 site="$ac_optarg" ;;
208 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
209 ac_prev=srcdir ;;
210 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
211 srcdir="$ac_optarg" ;;
213 -target | --target | --targe | --targ | --tar | --ta | --t)
214 ac_prev=target ;;
215 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
216 target="$ac_optarg" ;;
218 -v | -verbose | --verbose | --verbos | --verbo | --verb)
219 verbose=yes ;;
221 -version | --version | --versio | --versi | --vers)
222 echo "configure generated by autoconf version 2.1.3"
223 exit 0 ;;
225 -with-* | --with-*)
226 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
227 # Reject names that are not valid shell variable names.
228 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
229 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
231 ac_package=`echo $ac_package| sed 's/-/_/g'`
232 case "$ac_option" in
233 *=*) ;;
234 *) ac_optarg=yes ;;
235 esac
236 eval "with_${ac_package}='$ac_optarg'" ;;
238 -without-* | --without-*)
239 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
240 # Reject names that are not valid shell variable names.
241 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
242 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
244 ac_package=`echo $ac_package| sed 's/-/_/g'`
245 eval "with_${ac_package}=no" ;;
247 --x)
248 # Obsolete; use --with-x.
249 with_x=yes ;;
251 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
252 | --x-incl | --x-inc | --x-in | --x-i)
253 ac_prev=x_includes ;;
254 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
255 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
256 x_includes="$ac_optarg" ;;
258 -x-libraries | --x-libraries | --x-librarie | --x-librari \
259 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
260 ac_prev=x_libraries ;;
261 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
262 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
263 x_libraries="$ac_optarg" ;;
265 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
269 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
270 echo "configure: warning: $ac_option: invalid host type" 1>&2
272 if test "x$nonopt" != xNONE; then
273 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
275 nonopt="$ac_option"
278 esac
279 done
281 if test -n "$ac_prev"; then
282 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
285 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
287 # File descriptor usage:
288 # 0 standard input
289 # 1 file creation
290 # 2 errors and warnings
291 # 3 some systems may open it to /dev/tty
292 # 4 used on the Kubota Titan
293 # 6 checking for... messages and results
294 # 5 compiler messages saved in config.log
295 if test "$silent" = yes; then
296 exec 6>/dev/null
297 else
298 exec 6>&1
300 exec 5>./config.log
302 echo "\
303 This file contains any messages produced by compilers while
304 running configure, to aid debugging if configure makes a mistake.
305 " 1>&5
307 # Strip out --no-create and --no-recursion so they do not pile up.
308 # Also quote any args containing shell metacharacters.
309 ac_configure_args=
310 for ac_arg
312 case "$ac_arg" in
313 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
314 | --no-cr | --no-c) ;;
315 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
316 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
317 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
318 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
319 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
320 esac
321 done
323 # NLS nuisances.
324 # Only set LANG and LC_ALL to C if already set.
325 # These must not be set unconditionally because not all systems understand
326 # e.g. LANG=C (notably SCO).
327 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
328 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
330 # confdefs.h avoids OS command line length limits that DEFS can exceed.
331 rm -rf conftest* confdefs.h
332 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
333 echo > confdefs.h
335 # A filename unique to this package, relative to the directory that
336 # configure is in, which we can look for to find out if srcdir is correct.
337 ac_unique_file=vpath.c
339 # Find the source files, if location was not specified.
340 if test -z "$srcdir"; then
341 ac_srcdir_defaulted=yes
342 # Try the directory containing this script, then its parent.
343 ac_prog=$0
344 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
345 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
346 srcdir=$ac_confdir
347 if test ! -r $srcdir/$ac_unique_file; then
348 srcdir=..
350 else
351 ac_srcdir_defaulted=no
353 if test ! -r $srcdir/$ac_unique_file; then
354 if test "$ac_srcdir_defaulted" = yes; then
355 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
356 else
357 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
360 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
362 # Prefer explicitly selected file to automatically selected ones.
363 if test -z "$CONFIG_SITE"; then
364 if test "x$prefix" != xNONE; then
365 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
366 else
367 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
370 for ac_site_file in $CONFIG_SITE; do
371 if test -r "$ac_site_file"; then
372 echo "loading site script $ac_site_file"
373 . "$ac_site_file"
375 done
377 if test -r "$cache_file"; then
378 echo "loading cache $cache_file"
379 . $cache_file
380 else
381 echo "creating cache $cache_file"
382 > $cache_file
385 ac_ext=c
386 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
387 ac_cpp='$CPP $CPPFLAGS'
388 ac_compile='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS -c 1>&5 2>&5'
389 ac_link='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS $LDFLAGS -o conftest $LIBS 1>&5 2>&5'
391 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
392 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
393 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
394 ac_n= ac_c='
395 ' ac_t=' '
396 else
397 ac_n=-n ac_c= ac_t=
399 else
400 ac_n= ac_c='\c' ac_t=
404 ac_aux_dir=
405 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
406 if test -f $ac_dir/install-sh; then
407 ac_aux_dir=$ac_dir
408 ac_install_sh="$ac_aux_dir/install-sh -c"
409 break
410 elif test -f $ac_dir/install.sh; then
411 ac_aux_dir=$ac_dir
412 ac_install_sh="$ac_aux_dir/install.sh -c"
413 break
415 done
416 if test -z "$ac_aux_dir"; then
417 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
419 ac_config_guess=$ac_aux_dir/config.guess
420 ac_config_sub=$ac_aux_dir/config.sub
421 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
423 subdirs="glob"
425 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
426 set dummy ${MAKE-make}; ac_make=$2
427 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
428 echo $ac_n "(cached) $ac_c" 1>&6
429 else
430 cat > conftestmake <<\EOF
431 all:
432 @echo 'ac_maketemp="${MAKE}"'
434 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
435 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
436 if test -n "$ac_maketemp"; then
437 eval ac_cv_prog_make_${ac_make}_set=yes
438 else
439 eval ac_cv_prog_make_${ac_make}_set=no
441 rm -f conftestmake
443 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
444 echo "$ac_t""yes" 1>&6
445 SET_MAKE=
446 else
447 echo "$ac_t""no" 1>&6
448 SET_MAKE="MAKE=${MAKE-make}"
451 # Extract the first word of "gcc", so it can be a program name with args.
452 set dummy gcc; ac_word=$2
453 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
454 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
455 echo $ac_n "(cached) $ac_c" 1>&6
456 else
457 if test -n "$CC"; then
458 ac_cv_prog_CC="$CC" # Let the user override the test.
459 else
460 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
461 for ac_dir in $PATH; do
462 test -z "$ac_dir" && ac_dir=.
463 if test -f $ac_dir/$ac_word; then
464 ac_cv_prog_CC="gcc"
465 break
467 done
468 IFS="$ac_save_ifs"
469 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
472 CC="$ac_cv_prog_CC"
473 if test -n "$CC"; then
474 echo "$ac_t""$CC" 1>&6
475 else
476 echo "$ac_t""no" 1>&6
480 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
481 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
482 echo $ac_n "(cached) $ac_c" 1>&6
483 else
484 cat > conftest.c <<EOF
485 #ifdef __GNUC__
486 yes;
487 #endif
489 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
490 ac_cv_prog_gcc=yes
491 else
492 ac_cv_prog_gcc=no
495 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
496 if test $ac_cv_prog_gcc = yes; then
497 GCC=yes
498 if test "${CFLAGS+set}" != set; then
499 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
500 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
501 echo $ac_n "(cached) $ac_c" 1>&6
502 else
503 echo 'void f(){}' > conftest.c
504 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
505 ac_cv_prog_gcc_g=yes
506 else
507 ac_cv_prog_gcc_g=no
509 rm -f conftest*
512 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
513 if test $ac_cv_prog_gcc_g = yes; then
514 CFLAGS="-g -O"
515 else
516 CFLAGS="-O"
519 else
520 GCC=
521 test "${CFLAGS+set}" = set || CFLAGS="-g"
524 # Find a good install program. We prefer a C program (faster),
525 # so one script is as good as another. But avoid the broken or
526 # incompatible versions:
527 # SysV /etc/install, /usr/sbin/install
528 # SunOS /usr/etc/install
529 # IRIX /sbin/install
530 # AIX /bin/install
531 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
532 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
533 # ./install, which can be erroneously created by make from ./install.sh.
534 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
535 if test -z "$INSTALL"; then
536 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
537 echo $ac_n "(cached) $ac_c" 1>&6
538 else
539 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
540 for ac_dir in $PATH; do
541 # Account for people who put trailing slashes in PATH elements.
542 case "$ac_dir/" in
543 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
545 # OSF1 and SCO ODT 3.0 have their own names for install.
546 for ac_prog in ginstall installbsd scoinst install; do
547 if test -f $ac_dir/$ac_prog; then
548 if test $ac_prog = install &&
549 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
550 # AIX install. It has an incompatible calling convention.
551 # OSF/1 installbsd also uses dspmsg, but is usable.
553 else
554 ac_cv_path_install="$ac_dir/$ac_prog -c"
555 break 2
558 done
560 esac
561 done
562 IFS="$ac_save_ifs"
563 # As a last resort, use the slow shell script.
564 test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
566 INSTALL="$ac_cv_path_install"
568 echo "$ac_t""$INSTALL" 1>&6
570 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
571 # It thinks the first close brace ends the variable substitution.
572 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
574 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
576 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
577 # On Suns, sometimes $CPP names a directory.
578 if test -n "$CPP" && test -d "$CPP"; then
579 CPP=
581 if test -z "$CPP"; then
582 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
583 echo $ac_n "(cached) $ac_c" 1>&6
584 else
585 # This must be in double quotes, not single quotes, because CPP may get
586 # substituted into the Makefile and "${CC-cc}" will confuse make.
587 CPP="${CC-cc} -E"
588 # On the NeXT, cc -E runs the code through the compiler's parser,
589 # not just through cpp.
590 cat > conftest.$ac_ext <<EOF
591 #line 592 "configure"
592 #include "confdefs.h"
593 #include <assert.h>
594 Syntax Error
596 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
597 ac_err=`grep -v '^ *+' conftest.out`
598 if test -z "$ac_err"; then
600 else
601 echo "$ac_err" >&5
602 rm -rf conftest*
603 CPP="${CC-cc} -E -traditional-cpp"
604 cat > conftest.$ac_ext <<EOF
605 #line 606 "configure"
606 #include "confdefs.h"
607 #include <assert.h>
608 Syntax Error
610 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
611 ac_err=`grep -v '^ *+' conftest.out`
612 if test -z "$ac_err"; then
614 else
615 echo "$ac_err" >&5
616 rm -rf conftest*
617 CPP=/lib/cpp
619 rm -f conftest*
621 rm -f conftest*
622 ac_cv_prog_CPP="$CPP"
625 CPP="$ac_cv_prog_CPP"
626 echo "$ac_t""$CPP" 1>&6
627 echo $ac_n "checking for AIX""... $ac_c" 1>&6
628 cat > conftest.$ac_ext <<EOF
629 #line 630 "configure"
630 #include "confdefs.h"
631 #ifdef _AIX
633 #endif
636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
637 egrep "yes" >/dev/null 2>&1; then
638 rm -rf conftest*
639 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
640 #define _ALL_SOURCE 1
643 else
644 rm -rf conftest*
645 echo "$ac_t""no" 1>&6
647 rm -f conftest*
650 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
651 if test -d /etc/conf/kconfig.d &&
652 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
653 then
654 echo "$ac_t""yes" 1>&6
655 ISC=yes # If later tests want to check for ISC.
656 cat >> confdefs.h <<\EOF
657 #define _POSIX_SOURCE 1
660 if test "$GCC" = yes; then
661 CC="$CC -posix"
662 else
663 CC="$CC -Xp"
665 else
666 echo "$ac_t""no" 1>&6
667 ISC=
670 ac_safe=`echo "minix/config.h" | tr './\055' '___'`
671 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
672 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
673 echo $ac_n "(cached) $ac_c" 1>&6
674 else
675 cat > conftest.$ac_ext <<EOF
676 #line 677 "configure"
677 #include "confdefs.h"
678 #include <minix/config.h>
680 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
681 ac_err=`grep -v '^ *+' conftest.out`
682 if test -z "$ac_err"; then
683 rm -rf conftest*
684 eval "ac_cv_header_$ac_safe=yes"
685 else
686 echo "$ac_err" >&5
687 rm -rf conftest*
688 eval "ac_cv_header_$ac_safe=no"
690 rm -f conftest*
692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
693 echo "$ac_t""yes" 1>&6
694 MINIX=yes
695 else
696 echo "$ac_t""no" 1>&6
697 MINIX=
700 if test "$MINIX" = yes; then
701 cat >> confdefs.h <<\EOF
702 #define _POSIX_SOURCE 1
705 cat >> confdefs.h <<\EOF
706 #define _POSIX_1_SOURCE 2
709 cat >> confdefs.h <<\EOF
710 #define _MINIX 1
715 # If we cannot run a trivial program, we must be cross compiling.
716 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
717 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
718 echo $ac_n "(cached) $ac_c" 1>&6
719 else
720 if test "$cross_compiling" = yes; then
721 ac_cv_c_cross=yes
722 else
723 cat > conftest.$ac_ext <<EOF
724 #line 725 "configure"
725 #include "confdefs.h"
726 main(){return(0);}
728 eval $ac_link
729 if test -s conftest && (./conftest; exit) 2>/dev/null; then
730 ac_cv_c_cross=no
731 else
732 ac_cv_c_cross=yes
735 rm -fr conftest*
737 cross_compiling=$ac_cv_c_cross
738 echo "$ac_t""$ac_cv_c_cross" 1>&6
740 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
741 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
742 echo $ac_n "(cached) $ac_c" 1>&6
743 else
744 cat > conftest.$ac_ext <<EOF
745 #line 746 "configure"
746 #include "confdefs.h"
747 #include <stdlib.h>
748 #include <stdarg.h>
749 #include <string.h>
750 #include <float.h>
752 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
753 ac_err=`grep -v '^ *+' conftest.out`
754 if test -z "$ac_err"; then
755 rm -rf conftest*
756 ac_cv_header_stdc=yes
757 else
758 echo "$ac_err" >&5
759 rm -rf conftest*
760 ac_cv_header_stdc=no
762 rm -f conftest*
764 if test $ac_cv_header_stdc = yes; then
765 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
766 cat > conftest.$ac_ext <<EOF
767 #line 768 "configure"
768 #include "confdefs.h"
769 #include <string.h>
771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
772 egrep "memchr" >/dev/null 2>&1; then
774 else
775 rm -rf conftest*
776 ac_cv_header_stdc=no
778 rm -f conftest*
782 if test $ac_cv_header_stdc = yes; then
783 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
784 cat > conftest.$ac_ext <<EOF
785 #line 786 "configure"
786 #include "confdefs.h"
787 #include <stdlib.h>
789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
790 egrep "free" >/dev/null 2>&1; then
792 else
793 rm -rf conftest*
794 ac_cv_header_stdc=no
796 rm -f conftest*
800 if test $ac_cv_header_stdc = yes; then
801 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
802 if test "$cross_compiling" = yes; then
803 ac_cv_header_stdc=no
804 else
805 cat > conftest.$ac_ext <<EOF
806 #line 807 "configure"
807 #include "confdefs.h"
808 #include <ctype.h>
809 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
810 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
811 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
812 int main () { int i; for (i = 0; i < 256; i++)
813 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
814 exit (0); }
817 eval $ac_link
818 if test -s conftest && (./conftest; exit) 2>/dev/null; then
820 else
821 ac_cv_header_stdc=no
824 rm -fr conftest*
827 echo "$ac_t""$ac_cv_header_stdc" 1>&6
828 if test $ac_cv_header_stdc = yes; then
829 cat >> confdefs.h <<\EOF
830 #define STDC_HEADERS 1
835 ac_header_dirent=no
836 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
838 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
839 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
840 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842 else
843 cat > conftest.$ac_ext <<EOF
844 #line 845 "configure"
845 #include "confdefs.h"
846 #include <sys/types.h>
847 #include <$ac_hdr>
848 int main() { return 0; }
849 int t() {
850 DIR *dirp = 0;
851 ; return 0; }
853 if eval $ac_compile; then
854 rm -rf conftest*
855 eval "ac_cv_header_dirent_$ac_safe=yes"
856 else
857 rm -rf conftest*
858 eval "ac_cv_header_dirent_$ac_safe=no"
860 rm -f conftest*
863 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
864 echo "$ac_t""yes" 1>&6
865 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
866 cat >> confdefs.h <<EOF
867 #define $ac_tr_hdr 1
869 ac_header_dirent=$ac_hdr; break
870 else
871 echo "$ac_t""no" 1>&6
873 done
874 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
875 if test $ac_header_dirent = dirent.h; then
876 echo $ac_n "checking for -ldir""... $ac_c" 1>&6
877 if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
878 echo $ac_n "(cached) $ac_c" 1>&6
879 else
880 ac_save_LIBS="$LIBS"
881 LIBS="-ldir $LIBS"
882 cat > conftest.$ac_ext <<EOF
883 #line 884 "configure"
884 #include "confdefs.h"
886 int main() { return 0; }
887 int t() {
888 opendir()
889 ; return 0; }
891 if eval $ac_link; then
892 rm -rf conftest*
893 eval "ac_cv_lib_dir=yes"
894 else
895 rm -rf conftest*
896 eval "ac_cv_lib_dir=no"
898 rm -f conftest*
899 LIBS="$ac_save_LIBS"
902 if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
903 echo "$ac_t""yes" 1>&6
904 LIBS="$LIBS -ldir"
905 else
906 echo "$ac_t""no" 1>&6
909 else
910 echo $ac_n "checking for -lx""... $ac_c" 1>&6
911 if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
912 echo $ac_n "(cached) $ac_c" 1>&6
913 else
914 ac_save_LIBS="$LIBS"
915 LIBS="-lx $LIBS"
916 cat > conftest.$ac_ext <<EOF
917 #line 918 "configure"
918 #include "confdefs.h"
920 int main() { return 0; }
921 int t() {
922 opendir()
923 ; return 0; }
925 if eval $ac_link; then
926 rm -rf conftest*
927 eval "ac_cv_lib_x=yes"
928 else
929 rm -rf conftest*
930 eval "ac_cv_lib_x=no"
932 rm -f conftest*
933 LIBS="$ac_save_LIBS"
936 if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
937 echo "$ac_t""yes" 1>&6
938 LIBS="$LIBS -lx"
939 else
940 echo "$ac_t""no" 1>&6
945 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
946 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
947 echo $ac_n "(cached) $ac_c" 1>&6
948 else
949 cat > conftest.$ac_ext <<EOF
950 #line 951 "configure"
951 #include "confdefs.h"
952 #include <sys/types.h>
954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
955 egrep "uid_t" >/dev/null 2>&1; then
956 rm -rf conftest*
957 ac_cv_type_uid_t=yes
958 else
959 rm -rf conftest*
960 ac_cv_type_uid_t=no
962 rm -f conftest*
965 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
966 if test $ac_cv_type_uid_t = no; then
967 cat >> confdefs.h <<\EOF
968 #define uid_t int
971 cat >> confdefs.h <<\EOF
972 #define gid_t int
976 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
977 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
978 echo $ac_n "(cached) $ac_c" 1>&6
979 else
980 if test "$cross_compiling" = yes; then
981 ac_cv_type_getgroups=cross
982 else
983 cat > conftest.$ac_ext <<EOF
984 #line 985 "configure"
985 #include "confdefs.h"
987 /* Thanks to Mike Rendell for this test. */
988 #include <sys/types.h>
989 #define NGID 256
990 #undef MAX
991 #define MAX(x, y) ((x) > (y) ? (x) : (y))
992 main()
994 gid_t gidset[NGID];
995 int i, n;
996 union { gid_t gval; long lval; } val;
998 val.lval = -1;
999 for (i = 0; i < NGID; i++)
1000 gidset[i] = val.gval;
1001 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
1002 gidset);
1003 /* Exit non-zero if getgroups seems to require an array of ints. This
1004 happens when gid_t is short but getgroups modifies an array of ints. */
1005 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
1009 eval $ac_link
1010 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1011 ac_cv_type_getgroups=gid_t
1012 else
1013 ac_cv_type_getgroups=int
1016 rm -fr conftest*
1017 if test $ac_cv_type_getgroups = cross; then
1018 cat > conftest.$ac_ext <<EOF
1019 #line 1020 "configure"
1020 #include "confdefs.h"
1021 #include <unistd.h>
1023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1024 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
1025 rm -rf conftest*
1026 ac_cv_type_getgroups=gid_t
1027 else
1028 rm -rf conftest*
1029 ac_cv_type_getgroups=int
1031 rm -f conftest*
1035 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
1036 cat >> confdefs.h <<EOF
1037 #define GETGROUPS_T $ac_cv_type_getgroups
1041 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1042 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1043 echo $ac_n "(cached) $ac_c" 1>&6
1044 else
1045 cat > conftest.$ac_ext <<EOF
1046 #line 1047 "configure"
1047 #include "confdefs.h"
1048 #include <sys/types.h>
1049 #if STDC_HEADERS
1050 #include <stdlib.h>
1051 #endif
1053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1054 egrep "pid_t" >/dev/null 2>&1; then
1055 rm -rf conftest*
1056 ac_cv_type_pid_t=yes
1057 else
1058 rm -rf conftest*
1059 ac_cv_type_pid_t=no
1061 rm -f conftest*
1064 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1065 if test $ac_cv_type_pid_t = no; then
1066 cat >> confdefs.h <<\EOF
1067 #define pid_t int
1072 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1073 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1075 else
1076 cat > conftest.$ac_ext <<EOF
1077 #line 1078 "configure"
1078 #include "confdefs.h"
1079 #include <sys/types.h>
1080 #include <signal.h>
1081 #ifdef signal
1082 #undef signal
1083 #endif
1084 #ifdef __cplusplus
1085 extern "C"
1086 #endif
1087 void (*signal ()) ();
1088 int main() { return 0; }
1089 int t() {
1090 int i;
1091 ; return 0; }
1093 if eval $ac_compile; then
1094 rm -rf conftest*
1095 ac_cv_type_signal=void
1096 else
1097 rm -rf conftest*
1098 ac_cv_type_signal=int
1100 rm -f conftest*
1103 echo "$ac_t""$ac_cv_type_signal" 1>&6
1104 cat >> confdefs.h <<EOF
1105 #define RETSIGTYPE $ac_cv_type_signal
1109 for ac_hdr in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
1110 sys/timeb.h
1112 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1113 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1114 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1115 echo $ac_n "(cached) $ac_c" 1>&6
1116 else
1117 cat > conftest.$ac_ext <<EOF
1118 #line 1119 "configure"
1119 #include "confdefs.h"
1120 #include <$ac_hdr>
1122 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1123 ac_err=`grep -v '^ *+' conftest.out`
1124 if test -z "$ac_err"; then
1125 rm -rf conftest*
1126 eval "ac_cv_header_$ac_safe=yes"
1127 else
1128 echo "$ac_err" >&5
1129 rm -rf conftest*
1130 eval "ac_cv_header_$ac_safe=no"
1132 rm -f conftest*
1134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1135 echo "$ac_t""yes" 1>&6
1136 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1137 cat >> confdefs.h <<EOF
1138 #define $ac_tr_hdr 1
1141 else
1142 echo "$ac_t""no" 1>&6
1144 done
1146 if test "x$CC" != xcc; then
1147 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1148 else
1149 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1151 set dummy $CC; ac_cc="`echo $2 |
1152 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1153 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1154 echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1157 echo 'foo(){}' > conftest.c
1158 # Make sure it works both with $CC and with simple cc.
1159 # We do the test twice because some compilers refuse to overwrite an
1160 # existing .o file with -o, though they will create one.
1161 if ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5 &&
1162 test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5
1163 then
1164 if test "x$CC" != xcc; then
1165 # Test first that cc exists at all.
1166 if cc -c conftest.c 1>&5 2>&5
1167 then
1168 if cc -c conftest.c -o conftest2.o 1>&5 2>&5 &&
1169 test -f conftest2.o && cc -c conftest.c -o conftest2.o 1>&5 2>&5
1170 then
1171 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1176 rm -f conftest*
1179 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1180 echo "$ac_t""yes" 1>&6
1181 else
1182 echo "$ac_t""no" 1>&6
1183 cat >> confdefs.h <<\EOF
1184 #define NO_MINUS_C_MINUS_O 1
1189 echo $ac_n "checking for working const""... $ac_c" 1>&6
1190 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1191 echo $ac_n "(cached) $ac_c" 1>&6
1192 else
1193 cat > conftest.$ac_ext <<EOF
1194 #line 1195 "configure"
1195 #include "confdefs.h"
1197 int main() { return 0; }
1198 int t() {
1200 /* Ultrix mips cc rejects this. */
1201 typedef int charset[2]; const charset x;
1202 /* SunOS 4.1.1 cc rejects this. */
1203 char const *const *ccp;
1204 char **p;
1205 /* NEC SVR4.0.2 mips cc rejects this. */
1206 struct point {int x, y;};
1207 static struct point const zero;
1208 /* AIX XL C 1.02.0.0 rejects this.
1209 It does not let you subtract one const X* pointer from another in an arm
1210 of an if-expression whose if-part is not a constant expression */
1211 const char *g = "string";
1212 ccp = &g + (g ? g-g : 0);
1213 /* HPUX 7.0 cc rejects these. */
1214 ++ccp;
1215 p = (char**) ccp;
1216 ccp = (char const *const *) p;
1217 { /* SCO 3.2v4 cc rejects this. */
1218 char *t;
1219 char const *s = 0 ? (char *) 0 : (char const *) 0;
1221 *t++ = 0;
1223 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1224 int x[] = {25, 17};
1225 const int *foo = &x[0];
1226 ++foo;
1228 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1229 typedef const int *iptr;
1230 iptr p = 0;
1231 ++p;
1233 { /* AIX XL C 1.02.0.0 rejects this saying
1234 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1235 struct s { int j; const int *ap[3]; };
1236 struct s *b; b->j = 5;
1238 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1239 const int foo = 10;
1242 ; return 0; }
1244 if eval $ac_compile; then
1245 rm -rf conftest*
1246 ac_cv_c_const=yes
1247 else
1248 rm -rf conftest*
1249 ac_cv_c_const=no
1251 rm -f conftest*
1254 echo "$ac_t""$ac_cv_c_const" 1>&6
1255 if test $ac_cv_c_const = no; then
1256 cat >> confdefs.h <<\EOF
1257 #define const
1261 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1262 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265 cat > conftest.$ac_ext <<EOF
1266 #line 1267 "configure"
1267 #include "confdefs.h"
1268 #include <sys/types.h>
1269 #include <sys/stat.h>
1271 #if defined(S_ISBLK) && defined(S_IFDIR)
1272 # if S_ISBLK (S_IFDIR)
1273 You lose.
1274 # endif
1275 #endif
1277 #if defined(S_ISBLK) && defined(S_IFCHR)
1278 # if S_ISBLK (S_IFCHR)
1279 You lose.
1280 # endif
1281 #endif
1283 #if defined(S_ISLNK) && defined(S_IFREG)
1284 # if S_ISLNK (S_IFREG)
1285 You lose.
1286 # endif
1287 #endif
1289 #if defined(S_ISSOCK) && defined(S_IFREG)
1290 # if S_ISSOCK (S_IFREG)
1291 You lose.
1292 # endif
1293 #endif
1296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1297 egrep "You lose" >/dev/null 2>&1; then
1298 rm -rf conftest*
1299 ac_cv_header_stat_broken=yes
1300 else
1301 rm -rf conftest*
1302 ac_cv_header_stat_broken=no
1304 rm -f conftest*
1307 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1308 if test $ac_cv_header_stat_broken = yes; then
1309 cat >> confdefs.h <<\EOF
1310 #define STAT_MACROS_BROKEN 1
1319 for ac_func in getdtablesize psignal mktemp \
1320 dup2 getcwd sigsetmask getgroups setlinebuf \
1321 seteuid setegid setreuid setregid strerror strsignal
1323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1324 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1325 echo $ac_n "(cached) $ac_c" 1>&6
1326 else
1327 cat > conftest.$ac_ext <<EOF
1328 #line 1329 "configure"
1329 #include "confdefs.h"
1330 /* System header to define __stub macros and hopefully few prototypes,
1331 which can conflict with char $ac_func(); below. */
1332 #include <assert.h>
1333 /* Override any gcc2 internal prototype to avoid an error. */
1334 char $ac_func();
1336 int main() { return 0; }
1337 int t() {
1339 /* The GNU C library defines this for functions which it implements
1340 to always fail with ENOSYS. Some functions are actually named
1341 something starting with __ and the normal name is an alias. */
1342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1343 choke me
1344 #else
1345 $ac_func();
1346 #endif
1348 ; return 0; }
1350 if eval $ac_link; then
1351 rm -rf conftest*
1352 eval "ac_cv_func_$ac_func=yes"
1353 else
1354 rm -rf conftest*
1355 eval "ac_cv_func_$ac_func=no"
1357 rm -f conftest*
1360 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1361 echo "$ac_t""yes" 1>&6
1362 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1363 cat >> confdefs.h <<EOF
1364 #define $ac_tr_func 1
1367 else
1368 echo "$ac_t""no" 1>&6
1370 done
1372 echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6
1373 if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; then
1374 echo $ac_n "(cached) $ac_c" 1>&6
1375 else
1376 cat > conftest.$ac_ext <<EOF
1377 #line 1378 "configure"
1378 #include "confdefs.h"
1380 int main() { return 0; }
1381 int t() {
1382 extern char *sys_siglist[]; puts(*sys_siglist);
1383 ; return 0; }
1385 if eval $ac_link; then
1386 rm -rf conftest*
1387 ac_cv_check_symbol_sys_siglist=yes
1388 else
1389 rm -rf conftest*
1390 ac_cv_check_symbol_sys_siglist=no
1392 rm -f conftest*
1396 if test "$ac_cv_check_symbol_sys_siglist" = yes; then
1397 ac_tr_symbol=`echo sys_siglist | tr '[a-z]' '[A-Z]'`
1398 cat >> confdefs.h <<EOF
1399 #define HAVE_${ac_tr_symbol} 1
1403 echo "$ac_t""$ac_cv_check_symbol_sys_siglist" 1>&6
1404 echo $ac_n "checking for _sys_siglist""... $ac_c" 1>&6
1405 if eval "test \"`echo '$''{'ac_cv_check_symbol__sys_siglist'+set}'`\" = set"; then
1406 echo $ac_n "(cached) $ac_c" 1>&6
1407 else
1408 cat > conftest.$ac_ext <<EOF
1409 #line 1410 "configure"
1410 #include "confdefs.h"
1412 int main() { return 0; }
1413 int t() {
1414 extern char *_sys_siglist[]; puts(*_sys_siglist);
1415 ; return 0; }
1417 if eval $ac_link; then
1418 rm -rf conftest*
1419 ac_cv_check_symbol__sys_siglist=yes
1420 else
1421 rm -rf conftest*
1422 ac_cv_check_symbol__sys_siglist=no
1424 rm -f conftest*
1428 if test "$ac_cv_check_symbol__sys_siglist" = yes; then
1429 ac_tr_symbol=`echo _sys_siglist | tr '[a-z]' '[A-Z]'`
1430 cat >> confdefs.h <<EOF
1431 #define HAVE_${ac_tr_symbol} 1
1435 echo "$ac_t""$ac_cv_check_symbol__sys_siglist" 1>&6
1436 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1437 # for constant arguments. Useless!
1438 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1439 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1440 echo $ac_n "(cached) $ac_c" 1>&6
1441 else
1442 cat > conftest.$ac_ext <<EOF
1443 #line 1444 "configure"
1444 #include "confdefs.h"
1445 #include <alloca.h>
1446 int main() { return 0; }
1447 int t() {
1448 char *p = alloca(2 * sizeof(int));
1449 ; return 0; }
1451 if eval $ac_link; then
1452 rm -rf conftest*
1453 ac_cv_header_alloca_h=yes
1454 else
1455 rm -rf conftest*
1456 ac_cv_header_alloca_h=no
1458 rm -f conftest*
1461 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1462 if test $ac_cv_header_alloca_h = yes; then
1463 cat >> confdefs.h <<\EOF
1464 #define HAVE_ALLOCA_H 1
1469 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1470 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1471 echo $ac_n "(cached) $ac_c" 1>&6
1472 else
1473 cat > conftest.$ac_ext <<EOF
1474 #line 1475 "configure"
1475 #include "confdefs.h"
1477 #ifdef __GNUC__
1478 # define alloca __builtin_alloca
1479 #else
1480 # if HAVE_ALLOCA_H
1481 # include <alloca.h>
1482 # else
1483 # ifdef _AIX
1484 #pragma alloca
1485 # else
1486 # ifndef alloca /* predefined by HP cc +Olibcalls */
1487 char *alloca ();
1488 # endif
1489 # endif
1490 # endif
1491 #endif
1493 int main() { return 0; }
1494 int t() {
1495 char *p = (char *) alloca(1);
1496 ; return 0; }
1498 if eval $ac_link; then
1499 rm -rf conftest*
1500 ac_cv_func_alloca=yes
1501 else
1502 rm -rf conftest*
1503 ac_cv_func_alloca=no
1505 rm -f conftest*
1508 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1509 if test $ac_cv_func_alloca = yes; then
1510 cat >> confdefs.h <<\EOF
1511 #define HAVE_ALLOCA 1
1516 if test $ac_cv_func_alloca = no; then
1517 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1518 # that cause trouble. Some versions do not even contain alloca or
1519 # contain a buggy version. If you still want to use their alloca,
1520 # use ar to extract alloca.o from them instead of compiling alloca.c.
1521 ALLOCA=alloca.o
1522 cat >> confdefs.h <<\EOF
1523 #define C_ALLOCA 1
1527 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1528 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1529 echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531 cat > conftest.$ac_ext <<EOF
1532 #line 1533 "configure"
1533 #include "confdefs.h"
1534 #if defined(CRAY) && ! defined(CRAY2)
1535 webecray
1536 #else
1537 wenotbecray
1538 #endif
1541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1542 egrep "webecray" >/dev/null 2>&1; then
1543 rm -rf conftest*
1544 ac_cv_os_cray=yes
1545 else
1546 rm -rf conftest*
1547 ac_cv_os_cray=no
1549 rm -f conftest*
1552 echo "$ac_t""$ac_cv_os_cray" 1>&6
1553 if test $ac_cv_os_cray = yes; then
1554 for ac_func in _getb67 GETB67 getb67; do
1555 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1556 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1557 echo $ac_n "(cached) $ac_c" 1>&6
1558 else
1559 cat > conftest.$ac_ext <<EOF
1560 #line 1561 "configure"
1561 #include "confdefs.h"
1562 /* System header to define __stub macros and hopefully few prototypes,
1563 which can conflict with char $ac_func(); below. */
1564 #include <assert.h>
1565 /* Override any gcc2 internal prototype to avoid an error. */
1566 char $ac_func();
1568 int main() { return 0; }
1569 int t() {
1571 /* The GNU C library defines this for functions which it implements
1572 to always fail with ENOSYS. Some functions are actually named
1573 something starting with __ and the normal name is an alias. */
1574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1575 choke me
1576 #else
1577 $ac_func();
1578 #endif
1580 ; return 0; }
1582 if eval $ac_link; then
1583 rm -rf conftest*
1584 eval "ac_cv_func_$ac_func=yes"
1585 else
1586 rm -rf conftest*
1587 eval "ac_cv_func_$ac_func=no"
1589 rm -f conftest*
1592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1593 echo "$ac_t""yes" 1>&6
1594 cat >> confdefs.h <<EOF
1595 #define CRAY_STACKSEG_END $ac_func
1598 break
1599 else
1600 echo "$ac_t""no" 1>&6
1603 done
1606 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1607 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1608 echo $ac_n "(cached) $ac_c" 1>&6
1609 else
1610 if test "$cross_compiling" = yes; then
1611 ac_cv_c_stack_direction=0
1612 else
1613 cat > conftest.$ac_ext <<EOF
1614 #line 1615 "configure"
1615 #include "confdefs.h"
1616 find_stack_direction ()
1618 static char *addr = 0;
1619 auto char dummy;
1620 if (addr == 0)
1622 addr = &dummy;
1623 return find_stack_direction ();
1625 else
1626 return (&dummy > addr) ? 1 : -1;
1628 main ()
1630 exit (find_stack_direction() < 0);
1633 eval $ac_link
1634 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1635 ac_cv_c_stack_direction=1
1636 else
1637 ac_cv_c_stack_direction=-1
1640 rm -fr conftest*
1642 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1643 cat >> confdefs.h <<EOF
1644 #define STACK_DIRECTION $ac_cv_c_stack_direction
1649 ac_safe=`echo "vfork.h" | tr './\055' '___'`
1650 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
1651 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1652 echo $ac_n "(cached) $ac_c" 1>&6
1653 else
1654 cat > conftest.$ac_ext <<EOF
1655 #line 1656 "configure"
1656 #include "confdefs.h"
1657 #include <vfork.h>
1659 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1660 ac_err=`grep -v '^ *+' conftest.out`
1661 if test -z "$ac_err"; then
1662 rm -rf conftest*
1663 eval "ac_cv_header_$ac_safe=yes"
1664 else
1665 echo "$ac_err" >&5
1666 rm -rf conftest*
1667 eval "ac_cv_header_$ac_safe=no"
1669 rm -f conftest*
1671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1672 echo "$ac_t""yes" 1>&6
1673 cat >> confdefs.h <<\EOF
1674 #define HAVE_VFORK_H 1
1677 else
1678 echo "$ac_t""no" 1>&6
1681 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
1682 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1683 echo $ac_n "(cached) $ac_c" 1>&6
1684 else
1685 if test "$cross_compiling" = yes; then
1686 ac_cv_func_vfork=no
1687 else
1688 cat > conftest.$ac_ext <<EOF
1689 #line 1690 "configure"
1690 #include "confdefs.h"
1691 /* Thanks to Paul Eggert for this test. */
1692 #include <stdio.h>
1693 #include <sys/types.h>
1694 #include <sys/stat.h>
1695 #ifdef HAVE_UNISTD_H
1696 #include <unistd.h>
1697 #endif
1698 #ifdef HAVE_VFORK_H
1699 #include <vfork.h>
1700 #endif
1701 /* On some sparc systems, changes by the child to local and incoming
1702 argument registers are propagated back to the parent.
1703 The compiler is told about this with #include <vfork.h>,
1704 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
1705 Test for this by using a static variable whose address
1706 is put into a register that is clobbered by the vfork. */
1707 static
1708 #ifdef __cplusplus
1709 sparc_address_test (int arg)
1710 #else
1711 sparc_address_test (arg) int arg;
1712 #endif
1714 static pid_t child;
1715 if (!child) {
1716 child = vfork ();
1717 if (child < 0)
1718 perror ("vfork");
1719 if (!child) {
1720 arg = getpid();
1721 write(-1, "", 0);
1722 _exit (arg);
1726 main() {
1727 pid_t parent = getpid ();
1728 pid_t child;
1730 sparc_address_test ();
1732 child = vfork ();
1734 if (child == 0) {
1735 /* Here is another test for sparc vfork register problems.
1736 This test uses lots of local variables, at least
1737 as many local variables as main has allocated so far
1738 including compiler temporaries. 4 locals are enough for
1739 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
1740 A buggy compiler should reuse the register of parent
1741 for one of the local variables, since it will think that
1742 parent can't possibly be used any more in this routine.
1743 Assigning to the local variable will thus munge parent
1744 in the parent process. */
1745 pid_t
1746 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
1747 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
1748 /* Convince the compiler that p..p7 are live; otherwise, it might
1749 use the same hardware register for all 8 local variables. */
1750 if (p != p1 || p != p2 || p != p3 || p != p4
1751 || p != p5 || p != p6 || p != p7)
1752 _exit(1);
1754 /* On some systems (e.g. IRIX 3.3),
1755 vfork doesn't separate parent from child file descriptors.
1756 If the child closes a descriptor before it execs or exits,
1757 this munges the parent's descriptor as well.
1758 Test for this by closing stdout in the child. */
1759 _exit(close(fileno(stdout)) != 0);
1760 } else {
1761 int status;
1762 struct stat st;
1764 while (wait(&status) != child)
1766 exit(
1767 /* Was there some problem with vforking? */
1768 child < 0
1770 /* Did the child fail? (This shouldn't happen.) */
1771 || status
1773 /* Did the vfork/compiler bug occur? */
1774 || parent != getpid()
1776 /* Did the file descriptor bug occur? */
1777 || fstat(fileno(stdout), &st) != 0
1782 eval $ac_link
1783 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1784 ac_cv_func_vfork=yes
1785 else
1786 ac_cv_func_vfork=no
1789 rm -fr conftest*
1791 echo "$ac_t""$ac_cv_func_vfork" 1>&6
1792 if test $ac_cv_func_vfork = no; then
1793 cat >> confdefs.h <<\EOF
1794 #define vfork fork
1799 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
1800 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
1801 echo $ac_n "(cached) $ac_c" 1>&6
1802 else
1803 if test "$cross_compiling" = yes; then
1804 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1805 else
1806 cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 #include <stdio.h>
1810 /* If setvbuf has the reversed format, exit 0. */
1811 main () {
1812 /* This call has the arguments reversed.
1813 A reversed system may check and see that the address of main
1814 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
1815 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
1816 exit(1);
1817 putc('\r', stdout);
1818 exit(0); /* Non-reversed systems segv here. */
1821 eval $ac_link
1822 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1823 ac_cv_func_setvbuf_reversed=yes
1824 else
1825 ac_cv_func_setvbuf_reversed=no
1828 rm -fr conftest*
1829 rm -f core core.* *.core
1831 echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
1832 if test $ac_cv_func_setvbuf_reversed = yes; then
1833 cat >> confdefs.h <<\EOF
1834 #define SETVBUF_REVERSED 1
1839 ac_have_func=no # yes means we've found a way to get the load average.
1841 # Some systems with -lutil have (and need) -lkvm as well, some do not.
1842 # On Solaris, -lkvm requires nlist from -lelf, so check that first
1843 # to get the right answer into the cache.
1844 echo $ac_n "checking for -lelf""... $ac_c" 1>&6
1845 if eval "test \"`echo '$''{'ac_cv_lib_elf'+set}'`\" = set"; then
1846 echo $ac_n "(cached) $ac_c" 1>&6
1847 else
1848 ac_save_LIBS="$LIBS"
1849 LIBS="-lelf $LIBS"
1850 cat > conftest.$ac_ext <<EOF
1851 #line 1852 "configure"
1852 #include "confdefs.h"
1854 int main() { return 0; }
1855 int t() {
1856 elf_begin()
1857 ; return 0; }
1859 if eval $ac_link; then
1860 rm -rf conftest*
1861 eval "ac_cv_lib_elf=yes"
1862 else
1863 rm -rf conftest*
1864 eval "ac_cv_lib_elf=no"
1866 rm -f conftest*
1867 LIBS="$ac_save_LIBS"
1870 if eval "test \"`echo '$ac_cv_lib_'elf`\" = yes"; then
1871 echo "$ac_t""yes" 1>&6
1872 LIBS="-lelf $LIBS"
1873 else
1874 echo "$ac_t""no" 1>&6
1877 echo $ac_n "checking for -lkvm""... $ac_c" 1>&6
1878 if eval "test \"`echo '$''{'ac_cv_lib_kvm'+set}'`\" = set"; then
1879 echo $ac_n "(cached) $ac_c" 1>&6
1880 else
1881 ac_save_LIBS="$LIBS"
1882 LIBS="-lkvm $LIBS"
1883 cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1887 int main() { return 0; }
1888 int t() {
1889 kvm_open()
1890 ; return 0; }
1892 if eval $ac_link; then
1893 rm -rf conftest*
1894 eval "ac_cv_lib_kvm=yes"
1895 else
1896 rm -rf conftest*
1897 eval "ac_cv_lib_kvm=no"
1899 rm -f conftest*
1900 LIBS="$ac_save_LIBS"
1903 if eval "test \"`echo '$ac_cv_lib_'kvm`\" = yes"; then
1904 echo "$ac_t""yes" 1>&6
1905 LIBS="-lkvm $LIBS"
1906 else
1907 echo "$ac_t""no" 1>&6
1910 # Check for the 4.4BSD definition of getloadavg.
1911 echo $ac_n "checking for -lutil""... $ac_c" 1>&6
1912 if eval "test \"`echo '$''{'ac_cv_lib_util'+set}'`\" = set"; then
1913 echo $ac_n "(cached) $ac_c" 1>&6
1914 else
1915 ac_save_LIBS="$LIBS"
1916 LIBS="-lutil $LIBS"
1917 cat > conftest.$ac_ext <<EOF
1918 #line 1919 "configure"
1919 #include "confdefs.h"
1921 int main() { return 0; }
1922 int t() {
1923 getloadavg()
1924 ; return 0; }
1926 if eval $ac_link; then
1927 rm -rf conftest*
1928 eval "ac_cv_lib_util=yes"
1929 else
1930 rm -rf conftest*
1931 eval "ac_cv_lib_util=no"
1933 rm -f conftest*
1934 LIBS="$ac_save_LIBS"
1937 if eval "test \"`echo '$ac_cv_lib_'util`\" = yes"; then
1938 echo "$ac_t""yes" 1>&6
1939 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
1940 else
1941 echo "$ac_t""no" 1>&6
1945 if test $ac_have_func = no; then
1946 # There is a commonly available library for RS/6000 AIX.
1947 # Since it is not a standard part of AIX, it might be installed locally.
1948 ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
1949 echo $ac_n "checking for -lgetloadavg""... $ac_c" 1>&6
1950 if eval "test \"`echo '$''{'ac_cv_lib_getloadavg'+set}'`\" = set"; then
1951 echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1953 ac_save_LIBS="$LIBS"
1954 LIBS="-lgetloadavg $LIBS"
1955 cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1959 int main() { return 0; }
1960 int t() {
1961 getloadavg()
1962 ; return 0; }
1964 if eval $ac_link; then
1965 rm -rf conftest*
1966 eval "ac_cv_lib_getloadavg=yes"
1967 else
1968 rm -rf conftest*
1969 eval "ac_cv_lib_getloadavg=no"
1971 rm -f conftest*
1972 LIBS="$ac_save_LIBS"
1975 if eval "test \"`echo '$ac_cv_lib_'getloadavg`\" = yes"; then
1976 echo "$ac_t""yes" 1>&6
1977 LIBS="-lgetloadavg $LIBS"
1978 else
1979 echo "$ac_t""no" 1>&6
1980 LIBS="$ac_save_LIBS"
1985 # Make sure it is really in the library, if we think we found it.
1986 for ac_func in getloadavg
1988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1989 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1990 echo $ac_n "(cached) $ac_c" 1>&6
1991 else
1992 cat > conftest.$ac_ext <<EOF
1993 #line 1994 "configure"
1994 #include "confdefs.h"
1995 /* System header to define __stub macros and hopefully few prototypes,
1996 which can conflict with char $ac_func(); below. */
1997 #include <assert.h>
1998 /* Override any gcc2 internal prototype to avoid an error. */
1999 char $ac_func();
2001 int main() { return 0; }
2002 int t() {
2004 /* The GNU C library defines this for functions which it implements
2005 to always fail with ENOSYS. Some functions are actually named
2006 something starting with __ and the normal name is an alias. */
2007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2008 choke me
2009 #else
2010 $ac_func();
2011 #endif
2013 ; return 0; }
2015 if eval $ac_link; then
2016 rm -rf conftest*
2017 eval "ac_cv_func_$ac_func=yes"
2018 else
2019 rm -rf conftest*
2020 eval "ac_cv_func_$ac_func=no"
2022 rm -f conftest*
2025 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2026 echo "$ac_t""yes" 1>&6
2028 else
2029 echo "$ac_t""no" 1>&6
2030 LIBOBJS="$LIBOBJS ${ac_func}.o"
2033 done
2036 if test $ac_cv_func_getloadavg = yes; then
2037 cat >> confdefs.h <<\EOF
2038 #define HAVE_GETLOADAVG 1
2041 ac_have_func=yes
2042 else
2043 # Figure out what our getloadavg.c needs.
2044 ac_have_func=no
2045 ac_safe=`echo "sys/dg_sys_info.h" | tr './\055' '___'`
2046 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
2047 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2048 echo $ac_n "(cached) $ac_c" 1>&6
2049 else
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2053 #include <sys/dg_sys_info.h>
2055 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2056 ac_err=`grep -v '^ *+' conftest.out`
2057 if test -z "$ac_err"; then
2058 rm -rf conftest*
2059 eval "ac_cv_header_$ac_safe=yes"
2060 else
2061 echo "$ac_err" >&5
2062 rm -rf conftest*
2063 eval "ac_cv_header_$ac_safe=no"
2065 rm -f conftest*
2067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2068 echo "$ac_t""yes" 1>&6
2069 ac_have_func=yes; cat >> confdefs.h <<\EOF
2070 #define DGUX 1
2073 echo $ac_n "checking for -ldgc""... $ac_c" 1>&6
2074 if eval "test \"`echo '$''{'ac_cv_lib_dgc'+set}'`\" = set"; then
2075 echo $ac_n "(cached) $ac_c" 1>&6
2076 else
2077 ac_save_LIBS="$LIBS"
2078 LIBS="-ldgc $LIBS"
2079 cat > conftest.$ac_ext <<EOF
2080 #line 2081 "configure"
2081 #include "confdefs.h"
2083 int main() { return 0; }
2084 int t() {
2085 dg_sys_info()
2086 ; return 0; }
2088 if eval $ac_link; then
2089 rm -rf conftest*
2090 eval "ac_cv_lib_dgc=yes"
2091 else
2092 rm -rf conftest*
2093 eval "ac_cv_lib_dgc=no"
2095 rm -f conftest*
2096 LIBS="$ac_save_LIBS"
2099 if eval "test \"`echo '$ac_cv_lib_'dgc`\" = yes"; then
2100 echo "$ac_t""yes" 1>&6
2101 ac_tr_lib=HAVE_LIB`echo dgc | tr '[a-z]' '[A-Z]'`
2102 cat >> confdefs.h <<EOF
2103 #define $ac_tr_lib 1
2106 LIBS="-ldgc $LIBS"
2108 else
2109 echo "$ac_t""no" 1>&6
2112 else
2113 echo "$ac_t""no" 1>&6
2117 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
2118 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
2119 # Irix 4.0.5F has the header but not the library.
2120 if test $ac_have_func = no && test $ac_cv_lib_elf = yes; then
2121 ac_have_func=yes; cat >> confdefs.h <<\EOF
2122 #define SVR4 1
2127 if test $ac_have_func = no; then
2128 ac_safe=`echo "inq_stats/cpustats.h" | tr './\055' '___'`
2129 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
2130 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2131 echo $ac_n "(cached) $ac_c" 1>&6
2132 else
2133 cat > conftest.$ac_ext <<EOF
2134 #line 2135 "configure"
2135 #include "confdefs.h"
2136 #include <inq_stats/cpustats.h>
2138 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2139 ac_err=`grep -v '^ *+' conftest.out`
2140 if test -z "$ac_err"; then
2141 rm -rf conftest*
2142 eval "ac_cv_header_$ac_safe=yes"
2143 else
2144 echo "$ac_err" >&5
2145 rm -rf conftest*
2146 eval "ac_cv_header_$ac_safe=no"
2148 rm -f conftest*
2150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2151 echo "$ac_t""yes" 1>&6
2152 ac_have_func=yes; cat >> confdefs.h <<\EOF
2153 #define UMAX 1
2156 cat >> confdefs.h <<\EOF
2157 #define UMAX4_3 1
2160 else
2161 echo "$ac_t""no" 1>&6
2166 if test $ac_have_func = no; then
2167 ac_safe=`echo "sys/cpustats.h" | tr './\055' '___'`
2168 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
2169 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2170 echo $ac_n "(cached) $ac_c" 1>&6
2171 else
2172 cat > conftest.$ac_ext <<EOF
2173 #line 2174 "configure"
2174 #include "confdefs.h"
2175 #include <sys/cpustats.h>
2177 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2178 ac_err=`grep -v '^ *+' conftest.out`
2179 if test -z "$ac_err"; then
2180 rm -rf conftest*
2181 eval "ac_cv_header_$ac_safe=yes"
2182 else
2183 echo "$ac_err" >&5
2184 rm -rf conftest*
2185 eval "ac_cv_header_$ac_safe=no"
2187 rm -f conftest*
2189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2190 echo "$ac_t""yes" 1>&6
2191 ac_have_func=yes; cat >> confdefs.h <<\EOF
2192 #define UMAX 1
2195 else
2196 echo "$ac_t""no" 1>&6
2201 if test $ac_have_func = no; then
2202 for ac_hdr in mach/mach.h
2204 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2205 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2206 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2207 echo $ac_n "(cached) $ac_c" 1>&6
2208 else
2209 cat > conftest.$ac_ext <<EOF
2210 #line 2211 "configure"
2211 #include "confdefs.h"
2212 #include <$ac_hdr>
2214 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2215 ac_err=`grep -v '^ *+' conftest.out`
2216 if test -z "$ac_err"; then
2217 rm -rf conftest*
2218 eval "ac_cv_header_$ac_safe=yes"
2219 else
2220 echo "$ac_err" >&5
2221 rm -rf conftest*
2222 eval "ac_cv_header_$ac_safe=no"
2224 rm -f conftest*
2226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2227 echo "$ac_t""yes" 1>&6
2228 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
2229 cat >> confdefs.h <<EOF
2230 #define $ac_tr_hdr 1
2233 else
2234 echo "$ac_t""no" 1>&6
2236 done
2240 ac_safe=`echo "nlist.h" | tr './\055' '___'`
2241 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
2242 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2243 echo $ac_n "(cached) $ac_c" 1>&6
2244 else
2245 cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <nlist.h>
2250 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2251 ac_err=`grep -v '^ *+' conftest.out`
2252 if test -z "$ac_err"; then
2253 rm -rf conftest*
2254 eval "ac_cv_header_$ac_safe=yes"
2255 else
2256 echo "$ac_err" >&5
2257 rm -rf conftest*
2258 eval "ac_cv_header_$ac_safe=no"
2260 rm -f conftest*
2262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2263 echo "$ac_t""yes" 1>&6
2264 cat >> confdefs.h <<\EOF
2265 #define NLIST_STRUCT 1
2268 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
2269 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
2270 echo $ac_n "(cached) $ac_c" 1>&6
2271 else
2272 cat > conftest.$ac_ext <<EOF
2273 #line 2274 "configure"
2274 #include "confdefs.h"
2275 #include <nlist.h>
2276 int main() { return 0; }
2277 int t() {
2278 struct nlist n; n.n_un.n_name = 0;
2279 ; return 0; }
2281 if eval $ac_compile; then
2282 rm -rf conftest*
2283 ac_cv_struct_nlist_n_un=yes
2284 else
2285 rm -rf conftest*
2286 ac_cv_struct_nlist_n_un=no
2288 rm -f conftest*
2291 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
2292 if test $ac_cv_struct_nlist_n_un = yes; then
2293 cat >> confdefs.h <<\EOF
2294 #define NLIST_NAME_UNION 1
2299 else
2300 echo "$ac_t""no" 1>&6
2302 fi # Do not have getloadavg in system libraries.
2304 # Some definitions of getloadavg require that the program be installed setgid.
2305 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
2306 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
2307 echo $ac_n "(cached) $ac_c" 1>&6
2308 else
2309 cat > conftest.$ac_ext <<EOF
2310 #line 2311 "configure"
2311 #include "confdefs.h"
2312 #include "$srcdir/getloadavg.c"
2313 #ifdef LDAV_PRIVILEGED
2314 Yowza Am I SETGID yet
2315 #endif
2317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2318 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
2319 rm -rf conftest*
2320 ac_cv_func_getloadavg_setgid=yes
2321 else
2322 rm -rf conftest*
2323 ac_cv_func_getloadavg_setgid=no
2325 rm -f conftest*
2328 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
2329 if test $ac_cv_func_getloadavg_setgid = yes; then
2330 NEED_SETGID=true; cat >> confdefs.h <<\EOF
2331 #define GETLOADAVG_PRIVILEGED 1
2334 else
2335 NEED_SETGID=false
2338 if test $ac_cv_func_getloadavg_setgid = yes; then
2339 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
2340 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
2341 echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
2344 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
2345 # If we got an error (system does not support symlinks), try without -L.
2346 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
2347 ac_cv_group_kmem=`echo $ac_ls_output \
2348 | sed -ne 's/[ ][ ]*/ /g;
2349 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
2350 / /s/.* //;p;'`
2353 KMEM_GROUP=$ac_cv_group_kmem
2354 echo "$ac_t""$KMEM_GROUP" 1>&6
2357 echo $ac_n "checking for strcoll""... $ac_c" 1>&6
2358 if eval "test \"`echo '$''{'ac_cv_func_strcoll'+set}'`\" = set"; then
2359 echo $ac_n "(cached) $ac_c" 1>&6
2360 else
2361 if test "$cross_compiling" = yes; then
2362 ac_cv_func_strcoll=no
2363 else
2364 cat > conftest.$ac_ext <<EOF
2365 #line 2366 "configure"
2366 #include "confdefs.h"
2367 #include <string.h>
2368 main ()
2370 exit (strcoll ("abc", "def") >= 0 ||
2371 strcoll ("ABC", "DEF") >= 0 ||
2372 strcoll ("123", "456") >= 0);
2375 eval $ac_link
2376 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2377 ac_cv_func_strcoll=yes
2378 else
2379 ac_cv_func_strcoll=no
2382 rm -fr conftest*
2384 echo "$ac_t""$ac_cv_func_strcoll" 1>&6
2385 if test $ac_cv_func_strcoll = yes; then
2386 cat >> confdefs.h <<\EOF
2387 #define HAVE_STRCOLL 1
2393 if test $ac_cv_func_getdtablesize = no; then
2394 echo $ac_n "checking for sysconf (_SC_OPEN_MAX)""... $ac_c" 1>&6
2395 if eval "test \"`echo '$''{'make_cv_sysconf_open_max'+set}'`\" = set"; then
2396 echo $ac_n "(cached) $ac_c" 1>&6
2397 else
2398 cat > conftest.$ac_ext <<EOF
2399 #line 2400 "configure"
2400 #include "confdefs.h"
2401 #include <unistd.h>
2402 int main() { return 0; }
2403 int t() {
2404 int max = sysconf (_SC_OPEN_MAX);
2405 ; return 0; }
2407 if eval $ac_link; then
2408 rm -rf conftest*
2409 make_cv_sysconf_open_max=yes
2410 else
2411 rm -rf conftest*
2412 make_cv_sysconf_open_max=no
2414 rm -f conftest*
2418 if test $make_cv_sysconf_open_max = yes; then
2419 cat >> confdefs.h <<\EOF
2420 #define HAVE_SYSCONF_OPEN_MAX 1
2424 echo "$ac_t""$make_cv_sysconf_open_max" 1>&6
2427 # Check out the wait reality.
2428 for ac_hdr in sys/wait.h
2430 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2432 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2433 echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435 cat > conftest.$ac_ext <<EOF
2436 #line 2437 "configure"
2437 #include "confdefs.h"
2438 #include <$ac_hdr>
2440 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2441 ac_err=`grep -v '^ *+' conftest.out`
2442 if test -z "$ac_err"; then
2443 rm -rf conftest*
2444 eval "ac_cv_header_$ac_safe=yes"
2445 else
2446 echo "$ac_err" >&5
2447 rm -rf conftest*
2448 eval "ac_cv_header_$ac_safe=no"
2450 rm -f conftest*
2452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2453 echo "$ac_t""yes" 1>&6
2454 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
2455 cat >> confdefs.h <<EOF
2456 #define $ac_tr_hdr 1
2459 else
2460 echo "$ac_t""no" 1>&6
2462 done
2463 for ac_func in waitpid wait3
2465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2466 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2467 echo $ac_n "(cached) $ac_c" 1>&6
2468 else
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2471 "configure"
2471 #include "confdefs.h"
2472 /* System header to define __stub macros and hopefully few prototypes,
2473 which can conflict with char $ac_func(); below. */
2474 #include <assert.h>
2475 /* Override any gcc2 internal prototype to avoid an error. */
2476 char $ac_func();
2478 int main() { return 0; }
2479 int t() {
2481 /* The GNU C library defines this for functions which it implements
2482 to always fail with ENOSYS. Some functions are actually named
2483 something starting with __ and the normal name is an alias. */
2484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2485 choke me
2486 #else
2487 $ac_func();
2488 #endif
2490 ; return 0; }
2492 if eval $ac_link; then
2493 rm -rf conftest*
2494 eval "ac_cv_func_$ac_func=yes"
2495 else
2496 rm -rf conftest*
2497 eval "ac_cv_func_$ac_func=no"
2499 rm -f conftest*
2502 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2503 echo "$ac_t""yes" 1>&6
2504 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
2505 cat >> confdefs.h <<EOF
2506 #define $ac_tr_func 1
2509 else
2510 echo "$ac_t""no" 1>&6
2512 done
2514 echo $ac_n "checking for union wait""... $ac_c" 1>&6
2515 if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then
2516 echo $ac_n "(cached) $ac_c" 1>&6
2517 else
2518 cat > conftest.$ac_ext <<EOF
2519 #line 2520 "configure"
2520 #include "confdefs.h"
2521 #include <sys/types.h>
2522 #include <sys/wait.h>
2523 int main() { return 0; }
2524 int t() {
2525 union wait status; int pid; pid = wait (&status);
2526 #ifdef WEXITSTATUS
2527 /* Some POSIXoid systems have both the new-style macros and the old
2528 union wait type, and they do not work together. If union wait
2529 conflicts with WEXITSTATUS et al, we don't want to use it at all. */
2530 if (WEXITSTATUS (status) != 0) pid = -1;
2531 #ifdef WTERMSIG
2532 /* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
2533 -- blow chunks here --
2534 #endif
2535 #endif
2536 #ifdef HAVE_WAITPID
2537 /* Make sure union wait works with waitpid. */
2538 pid = waitpid (-1, &status, 0);
2539 #endif
2541 ; return 0; }
2543 if eval $ac_link; then
2544 rm -rf conftest*
2545 make_cv_union_wait=yes
2546 else
2547 rm -rf conftest*
2548 make_cv_union_wait=no
2550 rm -f conftest*
2554 if test "$make_cv_union_wait" = yes; then
2555 cat >> confdefs.h <<\EOF
2556 #define HAVE_UNION_WAIT 1
2560 echo "$ac_t""$make_cv_union_wait" 1>&6
2562 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2563 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2565 else
2566 cat > conftest.$ac_ext <<EOF
2567 #line 2568 "configure"
2568 #include "confdefs.h"
2569 #include <sys/types.h>
2570 #include <signal.h>
2571 /* NetBSD declares sys_siglist in unistd.h. */
2572 #ifdef HAVE_UNISTD_H
2573 #include <unistd.h>
2574 #endif
2575 int main() { return 0; }
2576 int t() {
2577 char *msg = *(sys_siglist + 1);
2578 ; return 0; }
2580 if eval $ac_compile; then
2581 rm -rf conftest*
2582 ac_cv_decl_sys_siglist=yes
2583 else
2584 rm -rf conftest*
2585 ac_cv_decl_sys_siglist=no
2587 rm -f conftest*
2590 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2591 if test $ac_cv_decl_sys_siglist = yes; then
2592 cat >> confdefs.h <<\EOF
2593 #define SYS_SIGLIST_DECLARED 1
2599 # The presence of the following is not meant to imply
2600 # that make necessarily works on those systems.
2601 echo $ac_n "checking for -lsun""... $ac_c" 1>&6
2602 if eval "test \"`echo '$''{'ac_cv_lib_sun'+set}'`\" = set"; then
2603 echo $ac_n "(cached) $ac_c" 1>&6
2604 else
2605 ac_save_LIBS="$LIBS"
2606 LIBS="-lsun $LIBS"
2607 cat > conftest.$ac_ext <<EOF
2608 #line 2609 "configure"
2609 #include "confdefs.h"
2611 int main() { return 0; }
2612 int t() {
2613 getpwnam()
2614 ; return 0; }
2616 if eval $ac_link; then
2617 rm -rf conftest*
2618 eval "ac_cv_lib_sun=yes"
2619 else
2620 rm -rf conftest*
2621 eval "ac_cv_lib_sun=no"
2623 rm -f conftest*
2624 LIBS="$ac_save_LIBS"
2627 if eval "test \"`echo '$ac_cv_lib_'sun`\" = yes"; then
2628 echo "$ac_t""yes" 1>&6
2629 ac_tr_lib=HAVE_LIB`echo sun | tr '[a-z]' '[A-Z]'`
2630 cat >> confdefs.h <<EOF
2631 #define $ac_tr_lib 1
2634 LIBS="-lsun $LIBS"
2636 else
2637 echo "$ac_t""no" 1>&6
2641 REMOTE=stub
2642 # Check whether --with-customs or --without-customs was given.
2643 withval="$with_customs"
2644 if test -n "$withval"; then
2645 REMOTE=cstms LIBS="$LIBS libcustoms.a"
2649 echo checking for location of SCCS get command
2650 if test -f /usr/sccs/get; then
2651 SCCS_GET=/usr/sccs/get
2652 cat >> confdefs.h <<\EOF
2653 #define SCCS_GET "/usr/sccs/get"
2656 else
2657 SCCS_GET=get
2658 cat >> confdefs.h <<\EOF
2659 #define SCCS_GET "get"
2663 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
2664 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
2665 test -f s.conftest; then
2666 # We successfully created an SCCS file.
2667 echo checking if SCCS get command understands -G
2668 if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
2669 test -f conftoast; then
2670 cat >> confdefs.h <<\EOF
2671 #define SCCS_GET_MINUS_G 1
2676 rm -f s.conftest conftoast
2678 trap '' 1 2 15
2679 cat > confcache <<\EOF
2680 # This file is a shell script that caches the results of configure
2681 # tests run on this system so they can be shared between configure
2682 # scripts and configure runs. It is not useful on other systems.
2683 # If it contains results you don't want to keep, you may remove or edit it.
2685 # By default, configure uses ./config.cache as the cache file,
2686 # creating it if it does not exist already. You can give configure
2687 # the --cache-file=FILE option to use a different cache file; that is
2688 # what configure does when it calls configure scripts in
2689 # subdirectories, so they share the cache.
2690 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2691 # config.status only pays attention to the cache file if you give it the
2692 # --recheck option to rerun configure.
2695 # Ultrix sh set writes to stderr and can't be redirected directly,
2696 # and sets the high bit in the cache file unless we assign to the vars.
2697 (set) 2>&1 |
2698 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2699 >> confcache
2700 if cmp -s $cache_file confcache; then
2702 else
2703 if test -w $cache_file; then
2704 echo "updating cache $cache_file"
2705 cat confcache > $cache_file
2706 else
2707 echo "not updating unwritable cache $cache_file"
2710 rm -f confcache
2712 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2714 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2715 # Let make expand exec_prefix.
2716 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2718 # Any assignment to VPATH causes Sun make to only execute
2719 # the first set of double-colon rules, so remove it if not needed.
2720 # If there is a colon in the path, we need to keep it.
2721 if test "x$srcdir" = x.; then
2722 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2725 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2727 DEFS=-DHAVE_CONFIG_H
2729 # Without the "./", some shells look in PATH for config.status.
2730 : ${CONFIG_STATUS=./config.status}
2732 echo creating $CONFIG_STATUS
2733 rm -f $CONFIG_STATUS
2734 cat > $CONFIG_STATUS <<EOF
2735 #! /bin/sh
2736 # Generated automatically by configure.
2737 # Run this file to recreate the current configuration.
2738 # This directory was configured as follows,
2739 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2741 # $0 $ac_configure_args
2743 # Compiler output produced by configure, useful for debugging
2744 # configure, is in ./config.log if it exists.
2746 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2747 for ac_option
2749 case "\$ac_option" in
2750 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2751 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2752 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2753 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2754 echo "$CONFIG_STATUS generated by autoconf version 2.1.3"
2755 exit 0 ;;
2756 -help | --help | --hel | --he | --h)
2757 echo "\$ac_cs_usage"; exit 0 ;;
2758 *) echo "\$ac_cs_usage"; exit 1 ;;
2759 esac
2760 done
2762 ac_given_srcdir=$srcdir
2763 ac_given_INSTALL="$INSTALL"
2765 trap 'rm -fr `echo Makefile build.sh config.h | tr : " "` conftest*; exit 1' 1 2 15
2767 # Protect against being on the right side of a sed subst in config.status.
2768 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
2769 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2770 $ac_vpsub
2771 $extrasub
2772 s%@CFLAGS@%$CFLAGS%g
2773 s%@CPPFLAGS@%$CPPFLAGS%g
2774 s%@CXXFLAGS@%$CXXFLAGS%g
2775 s%@DEFS@%$DEFS%g
2776 s%@LDFLAGS@%$LDFLAGS%g
2777 s%@LIBS@%$LIBS%g
2778 s%@exec_prefix@%$exec_prefix%g
2779 s%@prefix@%$prefix%g
2780 s%@program_transform_name@%$program_transform_name%g
2781 s%@subdirs@%$subdirs%g
2782 s%@SET_MAKE@%$SET_MAKE%g
2783 s%@CC@%$CC%g
2784 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2785 s%@INSTALL_DATA@%$INSTALL_DATA%g
2786 s%@CPP@%$CPP%g
2787 s%@LIBOBJS@%$LIBOBJS%g
2788 s%@ALLOCA@%$ALLOCA%g
2789 s%@NEED_SETGID@%$NEED_SETGID%g
2790 s%@KMEM_GROUP@%$KMEM_GROUP%g
2791 s%@REMOTE@%$REMOTE%g
2793 CEOF
2795 cat >> $CONFIG_STATUS <<EOF
2797 CONFIG_FILES=\${CONFIG_FILES-"Makefile build.sh"}
2799 cat >> $CONFIG_STATUS <<\EOF
2800 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2801 # Support "outfile[:infile]", defaulting infile="outfile.in".
2802 case "$ac_file" in
2803 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2804 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2805 *) ac_file_in="${ac_file}.in" ;;
2806 esac
2808 # Adjust relative srcdir, etc. for subdirectories.
2810 # Remove last slash and all that follows it. Not all systems have dirname.
2811 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2812 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2813 # The file is in a subdirectory.
2814 test ! -d "$ac_dir" && mkdir "$ac_dir"
2815 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2816 # A "../" for each directory in $ac_dir_suffix.
2817 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2818 else
2819 ac_dir_suffix= ac_dots=
2822 case "$ac_given_srcdir" in
2823 .) srcdir=.
2824 if test -z "$ac_dots"; then top_srcdir=.
2825 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2826 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2827 *) # Relative path.
2828 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2829 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2830 esac
2832 case "$ac_given_INSTALL" in
2833 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2834 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2835 esac
2836 echo creating "$ac_file"
2837 rm -f "$ac_file"
2838 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2839 case "$ac_file" in
2840 *Makefile*) ac_comsub="1i\\
2841 # $configure_input" ;;
2842 *) ac_comsub= ;;
2843 esac
2844 sed -e "$ac_comsub
2845 s%@configure_input@%$configure_input%g
2846 s%@srcdir@%$srcdir%g
2847 s%@top_srcdir@%$top_srcdir%g
2848 s%@INSTALL@%$INSTALL%g
2849 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2850 fi; done
2851 rm -f conftest.subs
2853 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2854 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2856 # ac_d sets the value in "#define NAME VALUE" lines.
2857 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2858 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2859 ac_dC='\3'
2860 ac_dD='%g'
2861 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2862 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2863 ac_uB='\([ ]\)%\1#\2define\3'
2864 ac_uC=' '
2865 ac_uD='\4%g'
2866 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2867 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2868 ac_eB='$%\1#\2define\3'
2869 ac_eC=' '
2870 ac_eD='%g'
2872 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2873 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2874 # Support "outfile[:infile]", defaulting infile="outfile.in".
2875 case "$ac_file" in
2876 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2877 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2878 *) ac_file_in="${ac_file}.in" ;;
2879 esac
2881 echo creating $ac_file
2883 rm -f conftest.frag conftest.in conftest.out
2884 cp $ac_given_srcdir/$ac_file_in conftest.in
2888 # Transform confdefs.h into a sed script conftest.vals that substitutes
2889 # the proper values into config.h.in to produce config.h. And first:
2890 # Protect against being on the right side of a sed subst in config.status.
2891 # Protect against being in an unquoted here document in config.status.
2892 rm -f conftest.vals
2893 cat > conftest.hdr <<\EOF
2894 s/[\\&%]/\\&/g
2895 s%[\\$`]%\\&%g
2896 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2897 s%ac_d%ac_u%gp
2898 s%ac_u%ac_e%gp
2900 sed -n -f conftest.hdr confdefs.h > conftest.vals
2901 rm -f conftest.hdr
2903 # This sed command replaces #undef with comments. This is necessary, for
2904 # example, in the case of _POSIX_SOURCE, which is predefined and required
2905 # on some systems where configure will not decide to define it.
2906 cat >> conftest.vals <<\EOF
2907 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2910 # Break up conftest.vals because some shells have a limit on
2911 # the size of here documents, and old seds have small limits too.
2912 # Maximum number of lines to put in a single here document.
2913 ac_max_here_lines=12
2915 rm -f conftest.tail
2916 while :
2918 ac_lines=`grep -c . conftest.vals`
2919 # grep -c gives empty output for an empty file on some AIX systems.
2920 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2921 # Write a limited-size here document to conftest.frag.
2922 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2923 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2924 echo 'CEOF
2925 sed -f conftest.frag conftest.in > conftest.out
2926 rm -f conftest.in
2927 mv conftest.out conftest.in
2928 ' >> $CONFIG_STATUS
2929 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2930 rm -f conftest.vals
2931 mv conftest.tail conftest.vals
2932 done
2933 rm -f conftest.vals
2935 cat >> $CONFIG_STATUS <<\EOF
2936 rm -f conftest.frag conftest.h
2937 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2938 cat conftest.in >> conftest.h
2939 rm -f conftest.in
2940 if cmp -s $ac_file conftest.h 2>/dev/null; then
2941 echo "$ac_file is unchanged"
2942 rm -f conftest.h
2943 else
2944 rm -f $ac_file
2945 mv conftest.h $ac_file
2947 fi; done
2951 # Makefile uses this timestamp file to know when to remake Makefile,
2952 # build.sh, and glob/Makefile.
2953 touch stamp-config
2954 exit 0
2956 chmod +x $CONFIG_STATUS
2957 rm -fr confdefs* $ac_clean_files
2958 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2960 if test "$no_recursion" != yes; then
2962 # Remove --cache-file and --srcdir arguments so they do not pile up.
2963 ac_sub_configure_args=
2964 ac_prev=
2965 for ac_arg in $ac_configure_args; do
2966 if test -n "$ac_prev"; then
2967 ac_prev=
2968 continue
2970 case "$ac_arg" in
2971 -cache-file | --cache-file | --cache-fil | --cache-fi \
2972 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2973 ac_prev=cache_file ;;
2974 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2975 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2977 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2978 ac_prev=srcdir ;;
2979 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2981 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2982 esac
2983 done
2985 for ac_config_dir in glob; do
2987 # Do not complain, so a configure script can configure whichever
2988 # parts of a large source tree are present.
2989 if test ! -d $srcdir/$ac_config_dir; then
2990 continue
2993 echo configuring in $ac_config_dir
2995 case "$srcdir" in
2996 .) ;;
2998 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2999 else
3000 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3003 esac
3005 ac_popdir=`pwd`
3006 cd $ac_config_dir
3008 case "$srcdir" in
3009 .) # No --srcdir option. We are building in place.
3010 ac_sub_srcdir=$srcdir ;;
3011 /*) # Absolute path.
3012 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3013 *) # Relative path.
3014 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3015 esac
3017 # Check for guested configure; otherwise get Cygnus style configure.
3018 if test -f $ac_sub_srcdir/configure; then
3019 ac_sub_configure=$ac_sub_srcdir/configure
3020 elif test -f $ac_sub_srcdir/configure.in; then
3021 ac_sub_configure=$ac_configure
3022 else
3023 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3024 ac_sub_configure=
3027 # The recursion is here.
3028 if test -n "$ac_sub_configure"; then
3030 # Make the cache file name correct relative to the subdirectory.
3031 # A "../" for each directory in /$ac_config_dir.
3032 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3033 case "$cache_file" in
3034 /*) ac_sub_cache_file=$cache_file ;;
3035 *) # Relative path.
3036 ac_sub_cache_file="$ac_dots$cache_file" ;;
3037 esac
3038 case "$ac_given_INSTALL" in
3039 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3040 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3041 esac
3043 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3044 # The eval makes quoting arguments work.
3045 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3046 then :
3047 else
3048 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3052 cd $ac_popdir
3053 done