autoconf
[make.git] / configure
blob4ba5449327cde625206d4c69c0a8054ac0af82ca
1 #! /bin/sh
3 # From configure.in Id: configure.in,v 1.52 1996/07/20 09:30:04 roland Exp
4 # Guess values for system-dependent variables and create Makefiles.
5 # Generated automatically using autoconf version 2.10
6 # Copyright (C) 1992, 93, 94, 95, 96 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
39 bindir='${exec_prefix}/bin'
40 sbindir='${exec_prefix}/sbin'
41 libexecdir='${exec_prefix}/libexec'
42 datadir='${prefix}/share'
43 sysconfdir='${prefix}/etc'
44 sharedstatedir='${prefix}/com'
45 localstatedir='${prefix}/var'
46 libdir='${exec_prefix}/lib'
47 includedir='${prefix}/include'
48 oldincludedir='/usr/include'
49 infodir='${prefix}/info'
50 mandir='${prefix}/man'
52 # Initialize some other variables.
53 subdirs=
54 MFLAGS= MAKEFLAGS=
56 ac_prev=
57 for ac_option
60 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
63 ac_prev=
64 continue
67 case "$ac_option" in
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
69 *) ac_optarg= ;;
70 esac
72 # Accept the important Cygnus configure options, so we can diagnose typos.
74 case "$ac_option" in
76 -bindir | --bindir | --bindi | --bind | --bin | --bi)
77 ac_prev=bindir ;;
78 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79 bindir="$ac_optarg" ;;
81 -build | --build | --buil | --bui | --bu)
82 ac_prev=build ;;
83 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
84 build="$ac_optarg" ;;
86 -cache-file | --cache-file | --cache-fil | --cache-fi \
87 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
88 ac_prev=cache_file ;;
89 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91 cache_file="$ac_optarg" ;;
93 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
94 ac_prev=datadir ;;
95 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
96 | --da=*)
97 datadir="$ac_optarg" ;;
99 -disable-* | --disable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 eval "enable_${ac_feature}=no" ;;
108 -enable-* | --enable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
115 case "$ac_option" in
116 *=*) ;;
117 *) ac_optarg=yes ;;
118 esac
119 eval "enable_${ac_feature}='$ac_optarg'" ;;
121 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123 | --exec | --exe | --ex)
124 ac_prev=exec_prefix ;;
125 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127 | --exec=* | --exe=* | --ex=*)
128 exec_prefix="$ac_optarg" ;;
130 -gas | --gas | --ga | --g)
131 # Obsolete; use --with-gas.
132 with_gas=yes ;;
134 -help | --help | --hel | --he)
135 # Omit some internal or obsolete options to make the list less imposing.
136 # This message is too long to be a string in the A/UX 3.1 sh.
137 cat << EOF
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
140 Configuration:
141 --cache-file=FILE cache test results in FILE
142 --help print this message
143 --no-create do not create output files
144 --quiet, --silent do not print \`checking...' messages
145 --version print the version of autoconf that created configure
146 Directory and file names:
147 --prefix=PREFIX install architecture-independent files in PREFIX
148 [$ac_default_prefix]
149 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
150 [same as prefix]
151 --bindir=DIR user executables in DIR [EPREFIX/bin]
152 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
153 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
154 --datadir=DIR read-only architecture-independent data in DIR
155 [PREFIX/share]
156 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
157 --sharedstatedir=DIR modifiable architecture-independent data in DIR
158 [PREFIX/com]
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM
169 run sed PROGRAM on installed program names
171 cat << EOF
172 Host type:
173 --build=BUILD configure for building on BUILD [BUILD=HOST]
174 --host=HOST configure for HOST [guessed]
175 --target=TARGET configure for TARGET [TARGET=HOST]
176 Features and packages:
177 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
178 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
179 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
180 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
181 --x-includes=DIR X include files are in DIR
182 --x-libraries=DIR X library files are in DIR
184 if test -n "$ac_help"; then
185 echo "--enable and --with options recognized:$ac_help"
187 exit 0 ;;
189 -host | --host | --hos | --ho)
190 ac_prev=host ;;
191 -host=* | --host=* | --hos=* | --ho=*)
192 host="$ac_optarg" ;;
194 -includedir | --includedir | --includedi | --included | --include \
195 | --includ | --inclu | --incl | --inc)
196 ac_prev=includedir ;;
197 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
198 | --includ=* | --inclu=* | --incl=* | --inc=*)
199 includedir="$ac_optarg" ;;
201 -infodir | --infodir | --infodi | --infod | --info | --inf)
202 ac_prev=infodir ;;
203 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
204 infodir="$ac_optarg" ;;
206 -libdir | --libdir | --libdi | --libd)
207 ac_prev=libdir ;;
208 -libdir=* | --libdir=* | --libdi=* | --libd=*)
209 libdir="$ac_optarg" ;;
211 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
212 | --libexe | --libex | --libe)
213 ac_prev=libexecdir ;;
214 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
215 | --libexe=* | --libex=* | --libe=*)
216 libexecdir="$ac_optarg" ;;
218 -localstatedir | --localstatedir | --localstatedi | --localstated \
219 | --localstate | --localstat | --localsta | --localst \
220 | --locals | --local | --loca | --loc | --lo)
221 ac_prev=localstatedir ;;
222 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
223 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
224 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
225 localstatedir="$ac_optarg" ;;
227 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
228 ac_prev=mandir ;;
229 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
230 mandir="$ac_optarg" ;;
232 -nfp | --nfp | --nf)
233 # Obsolete; use --without-fp.
234 with_fp=no ;;
236 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
237 | --no-cr | --no-c)
238 no_create=yes ;;
240 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
241 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
242 no_recursion=yes ;;
244 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
245 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
246 | --oldin | --oldi | --old | --ol | --o)
247 ac_prev=oldincludedir ;;
248 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
249 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
250 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
251 oldincludedir="$ac_optarg" ;;
253 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
254 ac_prev=prefix ;;
255 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
256 prefix="$ac_optarg" ;;
258 -program-prefix | --program-prefix | --program-prefi | --program-pref \
259 | --program-pre | --program-pr | --program-p)
260 ac_prev=program_prefix ;;
261 -program-prefix=* | --program-prefix=* | --program-prefi=* \
262 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
263 program_prefix="$ac_optarg" ;;
265 -program-suffix | --program-suffix | --program-suffi | --program-suff \
266 | --program-suf | --program-su | --program-s)
267 ac_prev=program_suffix ;;
268 -program-suffix=* | --program-suffix=* | --program-suffi=* \
269 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
270 program_suffix="$ac_optarg" ;;
272 -program-transform-name | --program-transform-name \
273 | --program-transform-nam | --program-transform-na \
274 | --program-transform-n | --program-transform- \
275 | --program-transform | --program-transfor \
276 | --program-transfo | --program-transf \
277 | --program-trans | --program-tran \
278 | --progr-tra | --program-tr | --program-t)
279 ac_prev=program_transform_name ;;
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 program_transform_name="$ac_optarg" ;;
289 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
290 | -silent | --silent | --silen | --sile | --sil)
291 silent=yes ;;
293 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
294 ac_prev=sbindir ;;
295 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
296 | --sbi=* | --sb=*)
297 sbindir="$ac_optarg" ;;
299 -sharedstatedir | --sharedstatedir | --sharedstatedi \
300 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
301 | --sharedst | --shareds | --shared | --share | --shar \
302 | --sha | --sh)
303 ac_prev=sharedstatedir ;;
304 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
305 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
306 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
307 | --sha=* | --sh=*)
308 sharedstatedir="$ac_optarg" ;;
310 -site | --site | --sit)
311 ac_prev=site ;;
312 -site=* | --site=* | --sit=*)
313 site="$ac_optarg" ;;
315 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
316 ac_prev=srcdir ;;
317 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
318 srcdir="$ac_optarg" ;;
320 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
321 | --syscon | --sysco | --sysc | --sys | --sy)
322 ac_prev=sysconfdir ;;
323 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
324 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
325 sysconfdir="$ac_optarg" ;;
327 -target | --target | --targe | --targ | --tar | --ta | --t)
328 ac_prev=target ;;
329 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
330 target="$ac_optarg" ;;
332 -v | -verbose | --verbose | --verbos | --verbo | --verb)
333 verbose=yes ;;
335 -version | --version | --versio | --versi | --vers)
336 echo "configure generated by autoconf version 2.10"
337 exit 0 ;;
339 -with-* | --with-*)
340 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
341 # Reject names that are not valid shell variable names.
342 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
343 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
345 ac_package=`echo $ac_package| sed 's/-/_/g'`
346 case "$ac_option" in
347 *=*) ;;
348 *) ac_optarg=yes ;;
349 esac
350 eval "with_${ac_package}='$ac_optarg'" ;;
352 -without-* | --without-*)
353 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
354 # Reject names that are not valid shell variable names.
355 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
356 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358 ac_package=`echo $ac_package| sed 's/-/_/g'`
359 eval "with_${ac_package}=no" ;;
361 --x)
362 # Obsolete; use --with-x.
363 with_x=yes ;;
365 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
366 | --x-incl | --x-inc | --x-in | --x-i)
367 ac_prev=x_includes ;;
368 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
369 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
370 x_includes="$ac_optarg" ;;
372 -x-libraries | --x-libraries | --x-librarie | --x-librari \
373 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
374 ac_prev=x_libraries ;;
375 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
376 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
377 x_libraries="$ac_optarg" ;;
379 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
383 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
384 echo "configure: warning: $ac_option: invalid host type" 1>&2
386 if test "x$nonopt" != xNONE; then
387 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
389 nonopt="$ac_option"
392 esac
393 done
395 if test -n "$ac_prev"; then
396 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
399 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
401 # File descriptor usage:
402 # 0 standard input
403 # 1 file creation
404 # 2 errors and warnings
405 # 3 some systems may open it to /dev/tty
406 # 4 used on the Kubota Titan
407 # 6 checking for... messages and results
408 # 5 compiler messages saved in config.log
409 if test "$silent" = yes; then
410 exec 6>/dev/null
411 else
412 exec 6>&1
414 exec 5>./config.log
416 echo "\
417 This file contains any messages produced by compilers while
418 running configure, to aid debugging if configure makes a mistake.
419 " 1>&5
421 # Strip out --no-create and --no-recursion so they do not pile up.
422 # Also quote any args containing shell metacharacters.
423 ac_configure_args=
424 for ac_arg
426 case "$ac_arg" in
427 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
428 | --no-cr | --no-c) ;;
429 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
430 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
431 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
432 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
433 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
434 esac
435 done
437 # NLS nuisances.
438 # Only set LANG and LC_ALL to C if already set.
439 # These must not be set unconditionally because not all systems understand
440 # e.g. LANG=C (notably SCO).
441 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
442 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
444 # confdefs.h avoids OS command line length limits that DEFS can exceed.
445 rm -rf conftest* confdefs.h
446 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
447 echo > confdefs.h
449 # A filename unique to this package, relative to the directory that
450 # configure is in, which we can look for to find out if srcdir is correct.
451 ac_unique_file=vpath.c
453 # Find the source files, if location was not specified.
454 if test -z "$srcdir"; then
455 ac_srcdir_defaulted=yes
456 # Try the directory containing this script, then its parent.
457 ac_prog=$0
458 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
459 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
460 srcdir=$ac_confdir
461 if test ! -r $srcdir/$ac_unique_file; then
462 srcdir=..
464 else
465 ac_srcdir_defaulted=no
467 if test ! -r $srcdir/$ac_unique_file; then
468 if test "$ac_srcdir_defaulted" = yes; then
469 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
470 else
471 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
474 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
476 # Prefer explicitly selected file to automatically selected ones.
477 if test -z "$CONFIG_SITE"; then
478 if test "x$prefix" != xNONE; then
479 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
480 else
481 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
484 for ac_site_file in $CONFIG_SITE; do
485 if test -r "$ac_site_file"; then
486 echo "loading site script $ac_site_file"
487 . "$ac_site_file"
489 done
491 if test -r "$cache_file"; then
492 echo "loading cache $cache_file"
493 . $cache_file
494 else
495 echo "creating cache $cache_file"
496 > $cache_file
499 ac_ext=c
500 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
501 ac_cpp='$CPP $CPPFLAGS'
502 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
503 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
505 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
506 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
507 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
508 ac_n= ac_c='
509 ' ac_t=' '
510 else
511 ac_n=-n ac_c= ac_t=
513 else
514 ac_n= ac_c='\c' ac_t=
518 ac_aux_dir=
519 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
520 if test -f $ac_dir/install-sh; then
521 ac_aux_dir=$ac_dir
522 ac_install_sh="$ac_aux_dir/install-sh -c"
523 break
524 elif test -f $ac_dir/install.sh; then
525 ac_aux_dir=$ac_dir
526 ac_install_sh="$ac_aux_dir/install.sh -c"
527 break
529 done
530 if test -z "$ac_aux_dir"; then
531 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
533 ac_config_guess=$ac_aux_dir/config.guess
534 ac_config_sub=$ac_aux_dir/config.sub
535 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
537 subdirs="glob"
539 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
540 set dummy ${MAKE-make}; ac_make=$2
541 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
542 echo $ac_n "(cached) $ac_c" 1>&6
543 else
544 cat > conftestmake <<\EOF
545 all:
546 @echo 'ac_maketemp="${MAKE}"'
548 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
549 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
550 if test -n "$ac_maketemp"; then
551 eval ac_cv_prog_make_${ac_make}_set=yes
552 else
553 eval ac_cv_prog_make_${ac_make}_set=no
555 rm -f conftestmake
557 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
558 echo "$ac_t""yes" 1>&6
559 SET_MAKE=
560 else
561 echo "$ac_t""no" 1>&6
562 SET_MAKE="MAKE=${MAKE-make}"
565 # Extract the first word of "gcc", so it can be a program name with args.
566 set dummy gcc; ac_word=$2
567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
568 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
569 echo $ac_n "(cached) $ac_c" 1>&6
570 else
571 if test -n "$CC"; then
572 ac_cv_prog_CC="$CC" # Let the user override the test.
573 else
574 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
575 for ac_dir in $PATH; do
576 test -z "$ac_dir" && ac_dir=.
577 if test -f $ac_dir/$ac_word; then
578 ac_cv_prog_CC="gcc"
579 break
581 done
582 IFS="$ac_save_ifs"
585 CC="$ac_cv_prog_CC"
586 if test -n "$CC"; then
587 echo "$ac_t""$CC" 1>&6
588 else
589 echo "$ac_t""no" 1>&6
592 if test -z "$CC"; then
593 # Extract the first word of "cc", so it can be a program name with args.
594 set dummy cc; ac_word=$2
595 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
596 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
597 echo $ac_n "(cached) $ac_c" 1>&6
598 else
599 if test -n "$CC"; then
600 ac_cv_prog_CC="$CC" # Let the user override the test.
601 else
602 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
603 ac_prog_rejected=no
604 for ac_dir in $PATH; do
605 test -z "$ac_dir" && ac_dir=.
606 if test -f $ac_dir/$ac_word; then
607 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
608 ac_prog_rejected=yes
609 continue
611 ac_cv_prog_CC="cc"
612 break
614 done
615 IFS="$ac_save_ifs"
616 if test $ac_prog_rejected = yes; then
617 # We found a bogon in the path, so make sure we never use it.
618 set dummy $ac_cv_prog_CC
619 shift
620 if test $# -gt 0; then
621 # We chose a different compiler from the bogus one.
622 # However, it has the same basename, so the bogon will be chosen
623 # first if we set CC to just the basename; use the full file name.
624 shift
625 set dummy "$ac_dir/$ac_word" "$@"
626 shift
627 ac_cv_prog_CC="$@"
632 CC="$ac_cv_prog_CC"
633 if test -n "$CC"; then
634 echo "$ac_t""$CC" 1>&6
635 else
636 echo "$ac_t""no" 1>&6
639 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
642 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
643 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
644 echo $ac_n "(cached) $ac_c" 1>&6
645 else
646 cat > conftest.c <<EOF
647 #ifdef __GNUC__
648 yes;
649 #endif
651 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
652 ac_cv_prog_gcc=yes
653 else
654 ac_cv_prog_gcc=no
658 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
659 if test $ac_cv_prog_gcc = yes; then
660 GCC=yes
661 if test "${CFLAGS+set}" != set; then
662 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
663 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
664 echo $ac_n "(cached) $ac_c" 1>&6
665 else
666 echo 'void f(){}' > conftest.c
667 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
668 ac_cv_prog_gcc_g=yes
669 else
670 ac_cv_prog_gcc_g=no
672 rm -f conftest*
676 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
677 if test $ac_cv_prog_gcc_g = yes; then
678 CFLAGS="-g -O"
679 else
680 CFLAGS="-O"
683 else
684 GCC=
685 test "${CFLAGS+set}" = set || CFLAGS="-g"
688 # Find a good install program. We prefer a C program (faster),
689 # so one script is as good as another. But avoid the broken or
690 # incompatible versions:
691 # SysV /etc/install, /usr/sbin/install
692 # SunOS /usr/etc/install
693 # IRIX /sbin/install
694 # AIX /bin/install
695 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
696 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
697 # ./install, which can be erroneously created by make from ./install.sh.
698 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
699 if test -z "$INSTALL"; then
700 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
701 echo $ac_n "(cached) $ac_c" 1>&6
702 else
703 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
704 for ac_dir in $PATH; do
705 # Account for people who put trailing slashes in PATH elements.
706 case "$ac_dir/" in
707 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
709 # OSF1 and SCO ODT 3.0 have their own names for install.
710 for ac_prog in ginstall installbsd scoinst install; do
711 if test -f $ac_dir/$ac_prog; then
712 if test $ac_prog = install &&
713 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
714 # AIX install. It has an incompatible calling convention.
715 # OSF/1 installbsd also uses dspmsg, but is usable.
717 else
718 ac_cv_path_install="$ac_dir/$ac_prog -c"
719 break 2
722 done
724 esac
725 done
726 IFS="$ac_save_ifs"
729 if test "${ac_cv_path_install+set}" = set; then
730 INSTALL="$ac_cv_path_install"
731 else
732 # As a last resort, use the slow shell script. We don't cache a
733 # path for INSTALL within a source directory, because that will
734 # break other packages using the cache if that directory is
735 # removed, or if the path is relative.
736 INSTALL="$ac_install_sh"
739 echo "$ac_t""$INSTALL" 1>&6
741 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
742 # It thinks the first close brace ends the variable substitution.
743 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
745 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
747 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
748 # On Suns, sometimes $CPP names a directory.
749 if test -n "$CPP" && test -d "$CPP"; then
750 CPP=
752 if test -z "$CPP"; then
753 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
755 else
756 # This must be in double quotes, not single quotes, because CPP may get
757 # substituted into the Makefile and "${CC-cc}" will confuse make.
758 CPP="${CC-cc} -E"
759 # On the NeXT, cc -E runs the code through the compiler's parser,
760 # not just through cpp.
761 cat > conftest.$ac_ext <<EOF
762 #line 763 "configure"
763 #include "confdefs.h"
764 #include <assert.h>
765 Syntax Error
767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
768 { (eval echo configure:769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
769 ac_err=`grep -v '^ *+' conftest.out`
770 if test -z "$ac_err"; then
772 else
773 echo "$ac_err" >&5
774 rm -rf conftest*
775 CPP="${CC-cc} -E -traditional-cpp"
776 cat > conftest.$ac_ext <<EOF
777 #line 778 "configure"
778 #include "confdefs.h"
779 #include <assert.h>
780 Syntax Error
782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
783 { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
784 ac_err=`grep -v '^ *+' conftest.out`
785 if test -z "$ac_err"; then
787 else
788 echo "$ac_err" >&5
789 rm -rf conftest*
790 CPP=/lib/cpp
792 rm -f conftest*
794 rm -f conftest*
795 ac_cv_prog_CPP="$CPP"
797 CPP="$ac_cv_prog_CPP"
798 else
799 ac_cv_prog_CPP="$CPP"
801 echo "$ac_t""$CPP" 1>&6
802 echo $ac_n "checking for AIX""... $ac_c" 1>&6
803 cat > conftest.$ac_ext <<EOF
804 #line 805 "configure"
805 #include "confdefs.h"
806 #ifdef _AIX
808 #endif
811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
812 egrep "yes" >/dev/null 2>&1; then
813 rm -rf conftest*
814 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
815 #define _ALL_SOURCE 1
818 else
819 rm -rf conftest*
820 echo "$ac_t""no" 1>&6
822 rm -f conftest*
825 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
826 if test -d /etc/conf/kconfig.d &&
827 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
828 then
829 echo "$ac_t""yes" 1>&6
830 ISC=yes # If later tests want to check for ISC.
831 cat >> confdefs.h <<\EOF
832 #define _POSIX_SOURCE 1
835 if test "$GCC" = yes; then
836 CC="$CC -posix"
837 else
838 CC="$CC -Xp"
840 else
841 echo "$ac_t""no" 1>&6
842 ISC=
845 ac_safe=`echo "minix/config.h" | tr './\055' '___'`
846 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
847 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
848 echo $ac_n "(cached) $ac_c" 1>&6
849 else
850 cat > conftest.$ac_ext <<EOF
851 #line 852 "configure"
852 #include "confdefs.h"
853 #include <minix/config.h>
855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
856 { (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
857 ac_err=`grep -v '^ *+' conftest.out`
858 if test -z "$ac_err"; then
859 rm -rf conftest*
860 eval "ac_cv_header_$ac_safe=yes"
861 else
862 echo "$ac_err" >&5
863 rm -rf conftest*
864 eval "ac_cv_header_$ac_safe=no"
866 rm -f conftest*
868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
869 echo "$ac_t""yes" 1>&6
870 MINIX=yes
871 else
872 echo "$ac_t""no" 1>&6
873 MINIX=
876 if test "$MINIX" = yes; then
877 cat >> confdefs.h <<\EOF
878 #define _POSIX_SOURCE 1
881 cat >> confdefs.h <<\EOF
882 #define _POSIX_1_SOURCE 2
885 cat >> confdefs.h <<\EOF
886 #define _MINIX 1
891 # If we cannot run a trivial program, we must be cross compiling.
892 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
893 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
894 echo $ac_n "(cached) $ac_c" 1>&6
895 else
896 if test "$cross_compiling" = yes; then
897 ac_cv_c_cross=yes
898 else
899 cat > conftest.$ac_ext <<EOF
900 #line 901 "configure"
901 #include "confdefs.h"
902 main(){return(0);}
904 { (eval echo configure:905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
905 if test -s conftest && (./conftest; exit) 2>/dev/null; then
906 ac_cv_c_cross=no
907 else
908 ac_cv_c_cross=yes
911 rm -fr conftest*
914 echo "$ac_t""$ac_cv_c_cross" 1>&6
915 cross_compiling=$ac_cv_c_cross
917 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
918 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
919 echo $ac_n "(cached) $ac_c" 1>&6
920 else
921 cat > conftest.$ac_ext <<EOF
922 #line 923 "configure"
923 #include "confdefs.h"
924 #include <stdlib.h>
925 #include <stdarg.h>
926 #include <string.h>
927 #include <float.h>
929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
930 { (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
931 ac_err=`grep -v '^ *+' conftest.out`
932 if test -z "$ac_err"; then
933 rm -rf conftest*
934 ac_cv_header_stdc=yes
935 else
936 echo "$ac_err" >&5
937 rm -rf conftest*
938 ac_cv_header_stdc=no
940 rm -f conftest*
942 if test $ac_cv_header_stdc = yes; then
943 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
944 cat > conftest.$ac_ext <<EOF
945 #line 946 "configure"
946 #include "confdefs.h"
947 #include <string.h>
949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
950 egrep "memchr" >/dev/null 2>&1; then
952 else
953 rm -rf conftest*
954 ac_cv_header_stdc=no
956 rm -f conftest*
960 if test $ac_cv_header_stdc = yes; then
961 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
962 cat > conftest.$ac_ext <<EOF
963 #line 964 "configure"
964 #include "confdefs.h"
965 #include <stdlib.h>
967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
968 egrep "free" >/dev/null 2>&1; then
970 else
971 rm -rf conftest*
972 ac_cv_header_stdc=no
974 rm -f conftest*
978 if test $ac_cv_header_stdc = yes; then
979 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
980 if test "$cross_compiling" = yes; then
982 else
983 cat > conftest.$ac_ext <<EOF
984 #line 985 "configure"
985 #include "confdefs.h"
986 #include <ctype.h>
987 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
988 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
989 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
990 int main () { int i; for (i = 0; i < 256; i++)
991 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
992 exit (0); }
995 { (eval echo configure:996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
996 if test -s conftest && (./conftest; exit) 2>/dev/null; then
998 else
999 ac_cv_header_stdc=no
1002 rm -fr conftest*
1006 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1007 if test $ac_cv_header_stdc = yes; then
1008 cat >> confdefs.h <<\EOF
1009 #define STDC_HEADERS 1
1014 ac_header_dirent=no
1015 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1017 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1018 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1019 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1020 echo $ac_n "(cached) $ac_c" 1>&6
1021 else
1022 cat > conftest.$ac_ext <<EOF
1023 #line 1024 "configure"
1024 #include "confdefs.h"
1025 #include <sys/types.h>
1026 #include <$ac_hdr>
1027 int main() { return 0; }
1028 int t() {
1029 DIR *dirp = 0;
1030 ; return 0; }
1032 if { (eval echo configure:1033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1033 rm -rf conftest*
1034 eval "ac_cv_header_dirent_$ac_safe=yes"
1035 else
1036 rm -rf conftest*
1037 eval "ac_cv_header_dirent_$ac_safe=no"
1039 rm -f conftest*
1042 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1043 echo "$ac_t""yes" 1>&6
1044 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
1045 cat >> confdefs.h <<EOF
1046 #define $ac_tr_hdr 1
1048 ac_header_dirent=$ac_hdr; break
1049 else
1050 echo "$ac_t""no" 1>&6
1052 done
1053 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1054 if test $ac_header_dirent = dirent.h; then
1055 echo $ac_n "checking for -ldir""... $ac_c" 1>&6
1056 ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
1057 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1058 echo $ac_n "(cached) $ac_c" 1>&6
1059 else
1060 ac_save_LIBS="$LIBS"
1061 LIBS="-ldir $LIBS"
1062 cat > conftest.$ac_ext <<EOF
1063 #line 1064 "configure"
1064 #include "confdefs.h"
1065 /* Override any gcc2 internal prototype to avoid an error. */
1066 /* We use char because int might match the return type of a gcc2
1067 builtin and then its argument prototype would still apply. */
1068 char opendir();
1070 int main() { return 0; }
1071 int t() {
1072 opendir()
1073 ; return 0; }
1075 if { (eval echo configure:1076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1076 rm -rf conftest*
1077 eval "ac_cv_lib_$ac_lib_var=yes"
1078 else
1079 rm -rf conftest*
1080 eval "ac_cv_lib_$ac_lib_var=no"
1082 rm -f conftest*
1083 LIBS="$ac_save_LIBS"
1086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1087 echo "$ac_t""yes" 1>&6
1088 LIBS="$LIBS -ldir"
1089 else
1090 echo "$ac_t""no" 1>&6
1093 else
1094 echo $ac_n "checking for -lx""... $ac_c" 1>&6
1095 ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
1096 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1097 echo $ac_n "(cached) $ac_c" 1>&6
1098 else
1099 ac_save_LIBS="$LIBS"
1100 LIBS="-lx $LIBS"
1101 cat > conftest.$ac_ext <<EOF
1102 #line 1103 "configure"
1103 #include "confdefs.h"
1104 /* Override any gcc2 internal prototype to avoid an error. */
1105 /* We use char because int might match the return type of a gcc2
1106 builtin and then its argument prototype would still apply. */
1107 char opendir();
1109 int main() { return 0; }
1110 int t() {
1111 opendir()
1112 ; return 0; }
1114 if { (eval echo configure:1115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1115 rm -rf conftest*
1116 eval "ac_cv_lib_$ac_lib_var=yes"
1117 else
1118 rm -rf conftest*
1119 eval "ac_cv_lib_$ac_lib_var=no"
1121 rm -f conftest*
1122 LIBS="$ac_save_LIBS"
1125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1126 echo "$ac_t""yes" 1>&6
1127 LIBS="$LIBS -lx"
1128 else
1129 echo "$ac_t""no" 1>&6
1134 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1135 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1136 echo $ac_n "(cached) $ac_c" 1>&6
1137 else
1138 cat > conftest.$ac_ext <<EOF
1139 #line 1140 "configure"
1140 #include "confdefs.h"
1141 #include <sys/types.h>
1143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1144 egrep "uid_t" >/dev/null 2>&1; then
1145 rm -rf conftest*
1146 ac_cv_type_uid_t=yes
1147 else
1148 rm -rf conftest*
1149 ac_cv_type_uid_t=no
1151 rm -f conftest*
1155 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1156 if test $ac_cv_type_uid_t = no; then
1157 cat >> confdefs.h <<\EOF
1158 #define uid_t int
1161 cat >> confdefs.h <<\EOF
1162 #define gid_t int
1166 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1167 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1169 else
1170 cat > conftest.$ac_ext <<EOF
1171 #line 1172 "configure"
1172 #include "confdefs.h"
1173 #include <sys/types.h>
1174 #if STDC_HEADERS
1175 #include <stdlib.h>
1176 #endif
1178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1179 egrep "pid_t" >/dev/null 2>&1; then
1180 rm -rf conftest*
1181 ac_cv_type_pid_t=yes
1182 else
1183 rm -rf conftest*
1184 ac_cv_type_pid_t=no
1186 rm -f conftest*
1189 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1190 if test $ac_cv_type_pid_t = no; then
1191 cat >> confdefs.h <<\EOF
1192 #define pid_t int
1197 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1198 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1199 echo $ac_n "(cached) $ac_c" 1>&6
1200 else
1201 cat > conftest.$ac_ext <<EOF
1202 #line 1203 "configure"
1203 #include "confdefs.h"
1204 #include <sys/types.h>
1205 #include <signal.h>
1206 #ifdef signal
1207 #undef signal
1208 #endif
1209 #ifdef __cplusplus
1210 extern "C" void (*signal (int, void (*)(int)))(int);
1211 #else
1212 void (*signal ()) ();
1213 #endif
1215 int main() { return 0; }
1216 int t() {
1217 int i;
1218 ; return 0; }
1220 if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1221 rm -rf conftest*
1222 ac_cv_type_signal=void
1223 else
1224 rm -rf conftest*
1225 ac_cv_type_signal=int
1227 rm -f conftest*
1231 echo "$ac_t""$ac_cv_type_signal" 1>&6
1232 cat >> confdefs.h <<EOF
1233 #define RETSIGTYPE $ac_cv_type_signal
1237 for ac_hdr in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
1238 sys/timeb.h
1240 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1242 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1243 echo $ac_n "(cached) $ac_c" 1>&6
1244 else
1245 cat > conftest.$ac_ext <<EOF
1246 #line 1247 "configure"
1247 #include "confdefs.h"
1248 #include <$ac_hdr>
1250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1251 { (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1252 ac_err=`grep -v '^ *+' conftest.out`
1253 if test -z "$ac_err"; then
1254 rm -rf conftest*
1255 eval "ac_cv_header_$ac_safe=yes"
1256 else
1257 echo "$ac_err" >&5
1258 rm -rf conftest*
1259 eval "ac_cv_header_$ac_safe=no"
1261 rm -f conftest*
1263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1264 echo "$ac_t""yes" 1>&6
1265 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1266 cat >> confdefs.h <<EOF
1267 #define $ac_tr_hdr 1
1270 else
1271 echo "$ac_t""no" 1>&6
1273 done
1275 if test "x$CC" != xcc; then
1276 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1277 else
1278 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1280 set dummy $CC; ac_cc="`echo $2 |
1281 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1282 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1283 echo $ac_n "(cached) $ac_c" 1>&6
1284 else
1285 echo 'foo(){}' > conftest.c
1286 # Make sure it works both with $CC and with simple cc.
1287 # We do the test twice because some compilers refuse to overwrite an
1288 # existing .o file with -o, though they will create one.
1289 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1290 if { (eval echo configure:1291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1291 test -f conftest.o && { (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1292 then
1293 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1294 if test "x$CC" != xcc; then
1295 # Test first that cc exists at all.
1296 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1297 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1298 if { (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1299 test -f conftest.o && { (eval echo configure:1300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1300 then
1301 # cc works too.
1303 else
1304 # cc exists but doesn't like -o.
1305 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1309 else
1310 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1312 rm -f conftest*
1315 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1316 echo "$ac_t""yes" 1>&6
1317 else
1318 echo "$ac_t""no" 1>&6
1319 cat >> confdefs.h <<\EOF
1320 #define NO_MINUS_C_MINUS_O 1
1325 echo $ac_n "checking for working const""... $ac_c" 1>&6
1326 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1327 echo $ac_n "(cached) $ac_c" 1>&6
1328 else
1329 cat > conftest.$ac_ext <<EOF
1330 #line 1331 "configure"
1331 #include "confdefs.h"
1333 int main() { return 0; }
1334 int t() {
1336 /* Ultrix mips cc rejects this. */
1337 typedef int charset[2]; const charset x;
1338 /* SunOS 4.1.1 cc rejects this. */
1339 char const *const *ccp;
1340 char **p;
1341 /* NEC SVR4.0.2 mips cc rejects this. */
1342 struct point {int x, y;};
1343 static struct point const zero = {0,0};
1344 /* AIX XL C 1.02.0.0 rejects this.
1345 It does not let you subtract one const X* pointer from another in an arm
1346 of an if-expression whose if-part is not a constant expression */
1347 const char *g = "string";
1348 ccp = &g + (g ? g-g : 0);
1349 /* HPUX 7.0 cc rejects these. */
1350 ++ccp;
1351 p = (char**) ccp;
1352 ccp = (char const *const *) p;
1353 { /* SCO 3.2v4 cc rejects this. */
1354 char *t;
1355 char const *s = 0 ? (char *) 0 : (char const *) 0;
1357 *t++ = 0;
1359 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1360 int x[] = {25, 17};
1361 const int *foo = &x[0];
1362 ++foo;
1364 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1365 typedef const int *iptr;
1366 iptr p = 0;
1367 ++p;
1369 { /* AIX XL C 1.02.0.0 rejects this saying
1370 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1371 struct s { int j; const int *ap[3]; };
1372 struct s *b; b->j = 5;
1374 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1375 const int foo = 10;
1378 ; return 0; }
1380 if { (eval echo configure:1381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1381 rm -rf conftest*
1382 ac_cv_c_const=yes
1383 else
1384 rm -rf conftest*
1385 ac_cv_c_const=no
1387 rm -f conftest*
1391 echo "$ac_t""$ac_cv_c_const" 1>&6
1392 if test $ac_cv_c_const = no; then
1393 cat >> confdefs.h <<\EOF
1394 #define const
1398 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1399 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1400 echo $ac_n "(cached) $ac_c" 1>&6
1401 else
1402 cat > conftest.$ac_ext <<EOF
1403 #line 1404 "configure"
1404 #include "confdefs.h"
1405 #include <sys/types.h>
1406 #include <sys/stat.h>
1408 #if defined(S_ISBLK) && defined(S_IFDIR)
1409 # if S_ISBLK (S_IFDIR)
1410 You lose.
1411 # endif
1412 #endif
1414 #if defined(S_ISBLK) && defined(S_IFCHR)
1415 # if S_ISBLK (S_IFCHR)
1416 You lose.
1417 # endif
1418 #endif
1420 #if defined(S_ISLNK) && defined(S_IFREG)
1421 # if S_ISLNK (S_IFREG)
1422 You lose.
1423 # endif
1424 #endif
1426 #if defined(S_ISSOCK) && defined(S_IFREG)
1427 # if S_ISSOCK (S_IFREG)
1428 You lose.
1429 # endif
1430 #endif
1433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1434 egrep "You lose" >/dev/null 2>&1; then
1435 rm -rf conftest*
1436 ac_cv_header_stat_broken=yes
1437 else
1438 rm -rf conftest*
1439 ac_cv_header_stat_broken=no
1441 rm -f conftest*
1445 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1446 if test $ac_cv_header_stat_broken = yes; then
1447 cat >> confdefs.h <<\EOF
1448 #define STAT_MACROS_BROKEN 1
1457 for ac_func in psignal mktemp \
1458 dup2 getcwd sigsetmask getgroups setlinebuf \
1459 seteuid setegid setreuid setregid strerror strsignal
1461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1462 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1463 echo $ac_n "(cached) $ac_c" 1>&6
1464 else
1465 cat > conftest.$ac_ext <<EOF
1466 #line 1467 "configure"
1467 #include "confdefs.h"
1468 /* System header to define __stub macros and hopefully few prototypes,
1469 which can conflict with char $ac_func(); below. */
1470 #include <assert.h>
1471 /* Override any gcc2 internal prototype to avoid an error. */
1472 /* We use char because int might match the return type of a gcc2
1473 builtin and then its argument prototype would still apply. */
1474 char $ac_func();
1476 int main() { return 0; }
1477 int t() {
1479 /* The GNU C library defines this for functions which it implements
1480 to always fail with ENOSYS. Some functions are actually named
1481 something starting with __ and the normal name is an alias. */
1482 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1483 choke me
1484 #else
1485 $ac_func();
1486 #endif
1488 ; return 0; }
1490 if { (eval echo configure:1491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1491 rm -rf conftest*
1492 eval "ac_cv_func_$ac_func=yes"
1493 else
1494 rm -rf conftest*
1495 eval "ac_cv_func_$ac_func=no"
1497 rm -f conftest*
1500 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1501 echo "$ac_t""yes" 1>&6
1502 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1503 cat >> confdefs.h <<EOF
1504 #define $ac_tr_func 1
1507 else
1508 echo "$ac_t""no" 1>&6
1510 done
1512 echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6
1513 if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515 else
1516 cat > conftest.$ac_ext <<EOF
1517 #line 1518 "configure"
1518 #include "confdefs.h"
1520 int main() { return 0; }
1521 int t() {
1522 extern char *sys_siglist[]; puts(*sys_siglist);
1523 ; return 0; }
1525 if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1526 rm -rf conftest*
1527 ac_cv_check_symbol_sys_siglist=yes
1528 else
1529 rm -rf conftest*
1530 ac_cv_check_symbol_sys_siglist=no
1532 rm -f conftest*
1536 if test "$ac_cv_check_symbol_sys_siglist" = yes; then
1537 ac_tr_symbol=`echo sys_siglist | tr '[a-z]' '[A-Z]'`
1538 cat >> confdefs.h <<EOF
1539 #define HAVE_${ac_tr_symbol} 1
1543 echo "$ac_t""$ac_cv_check_symbol_sys_siglist" 1>&6
1544 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1545 # for constant arguments. Useless!
1546 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1547 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1548 echo $ac_n "(cached) $ac_c" 1>&6
1549 else
1550 cat > conftest.$ac_ext <<EOF
1551 #line 1552 "configure"
1552 #include "confdefs.h"
1553 #include <alloca.h>
1554 int main() { return 0; }
1555 int t() {
1556 char *p = alloca(2 * sizeof(int));
1557 ; return 0; }
1559 if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1560 rm -rf conftest*
1561 ac_cv_header_alloca_h=yes
1562 else
1563 rm -rf conftest*
1564 ac_cv_header_alloca_h=no
1566 rm -f conftest*
1570 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1571 if test $ac_cv_header_alloca_h = yes; then
1572 cat >> confdefs.h <<\EOF
1573 #define HAVE_ALLOCA_H 1
1578 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1579 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1580 echo $ac_n "(cached) $ac_c" 1>&6
1581 else
1582 cat > conftest.$ac_ext <<EOF
1583 #line 1584 "configure"
1584 #include "confdefs.h"
1586 #ifdef __GNUC__
1587 # define alloca __builtin_alloca
1588 #else
1589 # if HAVE_ALLOCA_H
1590 # include <alloca.h>
1591 # else
1592 # ifdef _AIX
1593 #pragma alloca
1594 # else
1595 # ifndef alloca /* predefined by HP cc +Olibcalls */
1596 char *alloca ();
1597 # endif
1598 # endif
1599 # endif
1600 #endif
1602 int main() { return 0; }
1603 int t() {
1604 char *p = (char *) alloca(1);
1605 ; return 0; }
1607 if { (eval echo configure:1608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1608 rm -rf conftest*
1609 ac_cv_func_alloca=yes
1610 else
1611 rm -rf conftest*
1612 ac_cv_func_alloca=no
1614 rm -f conftest*
1618 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1619 if test $ac_cv_func_alloca = yes; then
1620 cat >> confdefs.h <<\EOF
1621 #define HAVE_ALLOCA 1
1626 if test $ac_cv_func_alloca = no; then
1627 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1628 # that cause trouble. Some versions do not even contain alloca or
1629 # contain a buggy version. If you still want to use their alloca,
1630 # use ar to extract alloca.o from them instead of compiling alloca.c.
1631 ALLOCA=alloca.o
1632 cat >> confdefs.h <<\EOF
1633 #define C_ALLOCA 1
1637 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1638 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1639 echo $ac_n "(cached) $ac_c" 1>&6
1640 else
1641 cat > conftest.$ac_ext <<EOF
1642 #line 1643 "configure"
1643 #include "confdefs.h"
1644 #if defined(CRAY) && ! defined(CRAY2)
1645 webecray
1646 #else
1647 wenotbecray
1648 #endif
1651 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1652 egrep "webecray" >/dev/null 2>&1; then
1653 rm -rf conftest*
1654 ac_cv_os_cray=yes
1655 else
1656 rm -rf conftest*
1657 ac_cv_os_cray=no
1659 rm -f conftest*
1663 echo "$ac_t""$ac_cv_os_cray" 1>&6
1664 if test $ac_cv_os_cray = yes; then
1665 for ac_func in _getb67 GETB67 getb67; do
1666 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1667 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1668 echo $ac_n "(cached) $ac_c" 1>&6
1669 else
1670 cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 /* System header to define __stub macros and hopefully few prototypes,
1674 which can conflict with char $ac_func(); below. */
1675 #include <assert.h>
1676 /* Override any gcc2 internal prototype to avoid an error. */
1677 /* We use char because int might match the return type of a gcc2
1678 builtin and then its argument prototype would still apply. */
1679 char $ac_func();
1681 int main() { return 0; }
1682 int t() {
1684 /* The GNU C library defines this for functions which it implements
1685 to always fail with ENOSYS. Some functions are actually named
1686 something starting with __ and the normal name is an alias. */
1687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1688 choke me
1689 #else
1690 $ac_func();
1691 #endif
1693 ; return 0; }
1695 if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1696 rm -rf conftest*
1697 eval "ac_cv_func_$ac_func=yes"
1698 else
1699 rm -rf conftest*
1700 eval "ac_cv_func_$ac_func=no"
1702 rm -f conftest*
1705 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1706 echo "$ac_t""yes" 1>&6
1707 cat >> confdefs.h <<EOF
1708 #define CRAY_STACKSEG_END $ac_func
1711 break
1712 else
1713 echo "$ac_t""no" 1>&6
1716 done
1719 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1720 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1721 echo $ac_n "(cached) $ac_c" 1>&6
1722 else
1723 if test "$cross_compiling" = yes; then
1724 ac_cv_c_stack_direction=0
1725 else
1726 cat > conftest.$ac_ext <<EOF
1727 #line 1728 "configure"
1728 #include "confdefs.h"
1729 find_stack_direction ()
1731 static char *addr = 0;
1732 auto char dummy;
1733 if (addr == 0)
1735 addr = &dummy;
1736 return find_stack_direction ();
1738 else
1739 return (&dummy > addr) ? 1 : -1;
1741 main ()
1743 exit (find_stack_direction() < 0);
1746 { (eval echo configure:1747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1747 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1748 ac_cv_c_stack_direction=1
1749 else
1750 ac_cv_c_stack_direction=-1
1753 rm -fr conftest*
1756 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1757 cat >> confdefs.h <<EOF
1758 #define STACK_DIRECTION $ac_cv_c_stack_direction
1763 ac_safe=`echo "vfork.h" | tr './\055' '___'`
1764 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
1765 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1766 echo $ac_n "(cached) $ac_c" 1>&6
1767 else
1768 cat > conftest.$ac_ext <<EOF
1769 #line 1770 "configure"
1770 #include "confdefs.h"
1771 #include <vfork.h>
1773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1774 { (eval echo configure:1775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1775 ac_err=`grep -v '^ *+' conftest.out`
1776 if test -z "$ac_err"; then
1777 rm -rf conftest*
1778 eval "ac_cv_header_$ac_safe=yes"
1779 else
1780 echo "$ac_err" >&5
1781 rm -rf conftest*
1782 eval "ac_cv_header_$ac_safe=no"
1784 rm -f conftest*
1786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1787 echo "$ac_t""yes" 1>&6
1788 cat >> confdefs.h <<\EOF
1789 #define HAVE_VFORK_H 1
1792 else
1793 echo "$ac_t""no" 1>&6
1796 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
1797 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1798 echo $ac_n "(cached) $ac_c" 1>&6
1799 else
1800 if test "$cross_compiling" = yes; then
1801 echo $ac_n "checking for vfork""... $ac_c" 1>&6
1802 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1803 echo $ac_n "(cached) $ac_c" 1>&6
1804 else
1805 cat > conftest.$ac_ext <<EOF
1806 #line 1807 "configure"
1807 #include "confdefs.h"
1808 /* System header to define __stub macros and hopefully few prototypes,
1809 which can conflict with char vfork(); below. */
1810 #include <assert.h>
1811 /* Override any gcc2 internal prototype to avoid an error. */
1812 /* We use char because int might match the return type of a gcc2
1813 builtin and then its argument prototype would still apply. */
1814 char vfork();
1816 int main() { return 0; }
1817 int t() {
1819 /* The GNU C library defines this for functions which it implements
1820 to always fail with ENOSYS. Some functions are actually named
1821 something starting with __ and the normal name is an alias. */
1822 #if defined (__stub_vfork) || defined (__stub___vfork)
1823 choke me
1824 #else
1825 vfork();
1826 #endif
1828 ; return 0; }
1830 if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1831 rm -rf conftest*
1832 eval "ac_cv_func_vfork=yes"
1833 else
1834 rm -rf conftest*
1835 eval "ac_cv_func_vfork=no"
1837 rm -f conftest*
1840 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1841 echo "$ac_t""yes" 1>&6
1843 else
1844 echo "$ac_t""no" 1>&6
1847 else
1848 cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 /* Thanks to Paul Eggert for this test. */
1852 #include <stdio.h>
1853 #include <sys/types.h>
1854 #include <sys/stat.h>
1855 #ifdef HAVE_UNISTD_H
1856 #include <unistd.h>
1857 #endif
1858 #ifdef HAVE_VFORK_H
1859 #include <vfork.h>
1860 #endif
1861 /* On some sparc systems, changes by the child to local and incoming
1862 argument registers are propagated back to the parent.
1863 The compiler is told about this with #include <vfork.h>,
1864 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
1865 Test for this by using a static variable whose address
1866 is put into a register that is clobbered by the vfork. */
1867 static
1868 #ifdef __cplusplus
1869 sparc_address_test (int arg)
1870 #else
1871 sparc_address_test (arg) int arg;
1872 #endif
1874 static pid_t child;
1875 if (!child) {
1876 child = vfork ();
1877 if (child < 0)
1878 perror ("vfork");
1879 if (!child) {
1880 arg = getpid();
1881 write(-1, "", 0);
1882 _exit (arg);
1886 main() {
1887 pid_t parent = getpid ();
1888 pid_t child;
1890 sparc_address_test ();
1892 child = vfork ();
1894 if (child == 0) {
1895 /* Here is another test for sparc vfork register problems.
1896 This test uses lots of local variables, at least
1897 as many local variables as main has allocated so far
1898 including compiler temporaries. 4 locals are enough for
1899 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
1900 A buggy compiler should reuse the register of parent
1901 for one of the local variables, since it will think that
1902 parent can't possibly be used any more in this routine.
1903 Assigning to the local variable will thus munge parent
1904 in the parent process. */
1905 pid_t
1906 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
1907 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
1908 /* Convince the compiler that p..p7 are live; otherwise, it might
1909 use the same hardware register for all 8 local variables. */
1910 if (p != p1 || p != p2 || p != p3 || p != p4
1911 || p != p5 || p != p6 || p != p7)
1912 _exit(1);
1914 /* On some systems (e.g. IRIX 3.3),
1915 vfork doesn't separate parent from child file descriptors.
1916 If the child closes a descriptor before it execs or exits,
1917 this munges the parent's descriptor as well.
1918 Test for this by closing stdout in the child. */
1919 _exit(close(fileno(stdout)) != 0);
1920 } else {
1921 int status;
1922 struct stat st;
1924 while (wait(&status) != child)
1926 exit(
1927 /* Was there some problem with vforking? */
1928 child < 0
1930 /* Did the child fail? (This shouldn't happen.) */
1931 || status
1933 /* Did the vfork/compiler bug occur? */
1934 || parent != getpid()
1936 /* Did the file descriptor bug occur? */
1937 || fstat(fileno(stdout), &st) != 0
1942 { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1943 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1944 ac_cv_func_vfork=yes
1945 else
1946 ac_cv_func_vfork=no
1949 rm -fr conftest*
1952 echo "$ac_t""$ac_cv_func_vfork" 1>&6
1953 if test $ac_cv_func_vfork = no; then
1954 cat >> confdefs.h <<\EOF
1955 #define vfork fork
1960 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
1961 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
1962 echo $ac_n "(cached) $ac_c" 1>&6
1963 else
1964 if test "$cross_compiling" = yes; then
1965 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1966 else
1967 cat > conftest.$ac_ext <<EOF
1968 #line 1969 "configure"
1969 #include "confdefs.h"
1970 #include <stdio.h>
1971 /* If setvbuf has the reversed format, exit 0. */
1972 main () {
1973 /* This call has the arguments reversed.
1974 A reversed system may check and see that the address of main
1975 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
1976 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
1977 exit(1);
1978 putc('\r', stdout);
1979 exit(0); /* Non-reversed systems segv here. */
1982 { (eval echo configure:1983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1983 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1984 ac_cv_func_setvbuf_reversed=yes
1985 else
1986 ac_cv_func_setvbuf_reversed=no
1989 rm -fr conftest*
1990 rm -f core core.* *.core
1993 echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
1994 if test $ac_cv_func_setvbuf_reversed = yes; then
1995 cat >> confdefs.h <<\EOF
1996 #define SETVBUF_REVERSED 1
2001 ac_have_func=no # yes means we've found a way to get the load average.
2003 # Some systems with -lutil have (and need) -lkvm as well, some do not.
2004 # On Solaris, -lkvm requires nlist from -lelf, so check that first
2005 # to get the right answer into the cache.
2006 echo $ac_n "checking for -lelf""... $ac_c" 1>&6
2007 ac_lib_var=`echo elf'_'elf_begin | tr './+\055' '__p_'`
2008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2009 echo $ac_n "(cached) $ac_c" 1>&6
2010 else
2011 ac_save_LIBS="$LIBS"
2012 LIBS="-lelf $LIBS"
2013 cat > conftest.$ac_ext <<EOF
2014 #line 2015 "configure"
2015 #include "confdefs.h"
2016 /* Override any gcc2 internal prototype to avoid an error. */
2017 /* We use char because int might match the return type of a gcc2
2018 builtin and then its argument prototype would still apply. */
2019 char elf_begin();
2021 int main() { return 0; }
2022 int t() {
2023 elf_begin()
2024 ; return 0; }
2026 if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2027 rm -rf conftest*
2028 eval "ac_cv_lib_$ac_lib_var=yes"
2029 else
2030 rm -rf conftest*
2031 eval "ac_cv_lib_$ac_lib_var=no"
2033 rm -f conftest*
2034 LIBS="$ac_save_LIBS"
2037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2038 echo "$ac_t""yes" 1>&6
2039 LIBS="-lelf $LIBS"
2040 else
2041 echo "$ac_t""no" 1>&6
2044 echo $ac_n "checking for -lkvm""... $ac_c" 1>&6
2045 ac_lib_var=`echo kvm'_'kvm_open | tr './+\055' '__p_'`
2046 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2047 echo $ac_n "(cached) $ac_c" 1>&6
2048 else
2049 ac_save_LIBS="$LIBS"
2050 LIBS="-lkvm $LIBS"
2051 cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 /* Override any gcc2 internal prototype to avoid an error. */
2055 /* We use char because int might match the return type of a gcc2
2056 builtin and then its argument prototype would still apply. */
2057 char kvm_open();
2059 int main() { return 0; }
2060 int t() {
2061 kvm_open()
2062 ; return 0; }
2064 if { (eval echo configure:2065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2065 rm -rf conftest*
2066 eval "ac_cv_lib_$ac_lib_var=yes"
2067 else
2068 rm -rf conftest*
2069 eval "ac_cv_lib_$ac_lib_var=no"
2071 rm -f conftest*
2072 LIBS="$ac_save_LIBS"
2075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2076 echo "$ac_t""yes" 1>&6
2077 LIBS="-lkvm $LIBS"
2078 else
2079 echo "$ac_t""no" 1>&6
2082 # Check for the 4.4BSD definition of getloadavg.
2083 echo $ac_n "checking for -lutil""... $ac_c" 1>&6
2084 ac_lib_var=`echo util'_'getloadavg | tr './+\055' '__p_'`
2085 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2086 echo $ac_n "(cached) $ac_c" 1>&6
2087 else
2088 ac_save_LIBS="$LIBS"
2089 LIBS="-lutil $LIBS"
2090 cat > conftest.$ac_ext <<EOF
2091 #line 2092 "configure"
2092 #include "confdefs.h"
2093 /* Override any gcc2 internal prototype to avoid an error. */
2094 /* We use char because int might match the return type of a gcc2
2095 builtin and then its argument prototype would still apply. */
2096 char getloadavg();
2098 int main() { return 0; }
2099 int t() {
2100 getloadavg()
2101 ; return 0; }
2103 if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2104 rm -rf conftest*
2105 eval "ac_cv_lib_$ac_lib_var=yes"
2106 else
2107 rm -rf conftest*
2108 eval "ac_cv_lib_$ac_lib_var=no"
2110 rm -f conftest*
2111 LIBS="$ac_save_LIBS"
2114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2115 echo "$ac_t""yes" 1>&6
2116 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
2117 else
2118 echo "$ac_t""no" 1>&6
2122 if test $ac_have_func = no; then
2123 # There is a commonly available library for RS/6000 AIX.
2124 # Since it is not a standard part of AIX, it might be installed locally.
2125 ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
2126 echo $ac_n "checking for -lgetloadavg""... $ac_c" 1>&6
2127 ac_lib_var=`echo getloadavg'_'getloadavg | tr './+\055' '__p_'`
2128 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2129 echo $ac_n "(cached) $ac_c" 1>&6
2130 else
2131 ac_save_LIBS="$LIBS"
2132 LIBS="-lgetloadavg $LIBS"
2133 cat > conftest.$ac_ext <<EOF
2134 #line 2135 "configure"
2135 #include "confdefs.h"
2136 /* Override any gcc2 internal prototype to avoid an error. */
2137 /* We use char because int might match the return type of a gcc2
2138 builtin and then its argument prototype would still apply. */
2139 char getloadavg();
2141 int main() { return 0; }
2142 int t() {
2143 getloadavg()
2144 ; return 0; }
2146 if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2147 rm -rf conftest*
2148 eval "ac_cv_lib_$ac_lib_var=yes"
2149 else
2150 rm -rf conftest*
2151 eval "ac_cv_lib_$ac_lib_var=no"
2153 rm -f conftest*
2154 LIBS="$ac_save_LIBS"
2157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2158 echo "$ac_t""yes" 1>&6
2159 LIBS="-lgetloadavg $LIBS"
2160 else
2161 echo "$ac_t""no" 1>&6
2162 LIBS="$ac_save_LIBS"
2167 # Make sure it is really in the library, if we think we found it.
2168 for ac_func in getloadavg
2170 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2171 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2172 echo $ac_n "(cached) $ac_c" 1>&6
2173 else
2174 cat > conftest.$ac_ext <<EOF
2175 #line 2176 "configure"
2176 #include "confdefs.h"
2177 /* System header to define __stub macros and hopefully few prototypes,
2178 which can conflict with char $ac_func(); below. */
2179 #include <assert.h>
2180 /* Override any gcc2 internal prototype to avoid an error. */
2181 /* We use char because int might match the return type of a gcc2
2182 builtin and then its argument prototype would still apply. */
2183 char $ac_func();
2185 int main() { return 0; }
2186 int t() {
2188 /* The GNU C library defines this for functions which it implements
2189 to always fail with ENOSYS. Some functions are actually named
2190 something starting with __ and the normal name is an alias. */
2191 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2192 choke me
2193 #else
2194 $ac_func();
2195 #endif
2197 ; return 0; }
2199 if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2200 rm -rf conftest*
2201 eval "ac_cv_func_$ac_func=yes"
2202 else
2203 rm -rf conftest*
2204 eval "ac_cv_func_$ac_func=no"
2206 rm -f conftest*
2209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2210 echo "$ac_t""yes" 1>&6
2212 else
2213 echo "$ac_t""no" 1>&6
2214 LIBOBJS="$LIBOBJS ${ac_func}.o"
2217 done
2220 if test $ac_cv_func_getloadavg = yes; then
2221 cat >> confdefs.h <<\EOF
2222 #define HAVE_GETLOADAVG 1
2225 ac_have_func=yes
2226 else
2227 # Figure out what our getloadavg.c needs.
2228 ac_have_func=no
2229 ac_safe=`echo "sys/dg_sys_info.h" | tr './\055' '___'`
2230 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
2231 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2232 echo $ac_n "(cached) $ac_c" 1>&6
2233 else
2234 cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 #include <sys/dg_sys_info.h>
2239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2240 { (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2241 ac_err=`grep -v '^ *+' conftest.out`
2242 if test -z "$ac_err"; then
2243 rm -rf conftest*
2244 eval "ac_cv_header_$ac_safe=yes"
2245 else
2246 echo "$ac_err" >&5
2247 rm -rf conftest*
2248 eval "ac_cv_header_$ac_safe=no"
2250 rm -f conftest*
2252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2253 echo "$ac_t""yes" 1>&6
2254 ac_have_func=yes; cat >> confdefs.h <<\EOF
2255 #define DGUX 1
2258 echo $ac_n "checking for -ldgc""... $ac_c" 1>&6
2259 ac_lib_var=`echo dgc'_'dg_sys_info | tr './+\055' '__p_'`
2260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2261 echo $ac_n "(cached) $ac_c" 1>&6
2262 else
2263 ac_save_LIBS="$LIBS"
2264 LIBS="-ldgc $LIBS"
2265 cat > conftest.$ac_ext <<EOF
2266 #line 2267 "configure"
2267 #include "confdefs.h"
2268 /* Override any gcc2 internal prototype to avoid an error. */
2269 /* We use char because int might match the return type of a gcc2
2270 builtin and then its argument prototype would still apply. */
2271 char dg_sys_info();
2273 int main() { return 0; }
2274 int t() {
2275 dg_sys_info()
2276 ; return 0; }
2278 if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2279 rm -rf conftest*
2280 eval "ac_cv_lib_$ac_lib_var=yes"
2281 else
2282 rm -rf conftest*
2283 eval "ac_cv_lib_$ac_lib_var=no"
2285 rm -f conftest*
2286 LIBS="$ac_save_LIBS"
2289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2290 echo "$ac_t""yes" 1>&6
2291 ac_tr_lib=HAVE_LIB`echo dgc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2292 cat >> confdefs.h <<EOF
2293 #define $ac_tr_lib 1
2296 LIBS="-ldgc $LIBS"
2298 else
2299 echo "$ac_t""no" 1>&6
2302 else
2303 echo "$ac_t""no" 1>&6
2307 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
2308 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
2309 # Irix 4.0.5F has the header but not the library.
2310 if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
2311 ac_have_func=yes; cat >> confdefs.h <<\EOF
2312 #define SVR4 1
2317 if test $ac_have_func = no; then
2318 ac_safe=`echo "inq_stats/cpustats.h" | tr './\055' '___'`
2319 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
2320 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2321 echo $ac_n "(cached) $ac_c" 1>&6
2322 else
2323 cat > conftest.$ac_ext <<EOF
2324 #line 2325 "configure"
2325 #include "confdefs.h"
2326 #include <inq_stats/cpustats.h>
2328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2329 { (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2330 ac_err=`grep -v '^ *+' conftest.out`
2331 if test -z "$ac_err"; then
2332 rm -rf conftest*
2333 eval "ac_cv_header_$ac_safe=yes"
2334 else
2335 echo "$ac_err" >&5
2336 rm -rf conftest*
2337 eval "ac_cv_header_$ac_safe=no"
2339 rm -f conftest*
2341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2342 echo "$ac_t""yes" 1>&6
2343 ac_have_func=yes; cat >> confdefs.h <<\EOF
2344 #define UMAX 1
2347 cat >> confdefs.h <<\EOF
2348 #define UMAX4_3 1
2351 else
2352 echo "$ac_t""no" 1>&6
2357 if test $ac_have_func = no; then
2358 ac_safe=`echo "sys/cpustats.h" | tr './\055' '___'`
2359 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
2360 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363 cat > conftest.$ac_ext <<EOF
2364 #line 2365 "configure"
2365 #include "confdefs.h"
2366 #include <sys/cpustats.h>
2368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2369 { (eval echo configure:2370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2370 ac_err=`grep -v '^ *+' conftest.out`
2371 if test -z "$ac_err"; then
2372 rm -rf conftest*
2373 eval "ac_cv_header_$ac_safe=yes"
2374 else
2375 echo "$ac_err" >&5
2376 rm -rf conftest*
2377 eval "ac_cv_header_$ac_safe=no"
2379 rm -f conftest*
2381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2382 echo "$ac_t""yes" 1>&6
2383 ac_have_func=yes; cat >> confdefs.h <<\EOF
2384 #define UMAX 1
2387 else
2388 echo "$ac_t""no" 1>&6
2393 if test $ac_have_func = no; then
2394 for ac_hdr in mach/mach.h
2396 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2397 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2398 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2399 echo $ac_n "(cached) $ac_c" 1>&6
2400 else
2401 cat > conftest.$ac_ext <<EOF
2402 #line 2403 "configure"
2403 #include "confdefs.h"
2404 #include <$ac_hdr>
2406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2407 { (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2408 ac_err=`grep -v '^ *+' conftest.out`
2409 if test -z "$ac_err"; then
2410 rm -rf conftest*
2411 eval "ac_cv_header_$ac_safe=yes"
2412 else
2413 echo "$ac_err" >&5
2414 rm -rf conftest*
2415 eval "ac_cv_header_$ac_safe=no"
2417 rm -f conftest*
2419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2420 echo "$ac_t""yes" 1>&6
2421 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2422 cat >> confdefs.h <<EOF
2423 #define $ac_tr_hdr 1
2426 else
2427 echo "$ac_t""no" 1>&6
2429 done
2433 ac_safe=`echo "nlist.h" | tr './\055' '___'`
2434 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
2435 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2436 echo $ac_n "(cached) $ac_c" 1>&6
2437 else
2438 cat > conftest.$ac_ext <<EOF
2439 #line 2440 "configure"
2440 #include "confdefs.h"
2441 #include <nlist.h>
2443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2444 { (eval echo configure:2445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2445 ac_err=`grep -v '^ *+' conftest.out`
2446 if test -z "$ac_err"; then
2447 rm -rf conftest*
2448 eval "ac_cv_header_$ac_safe=yes"
2449 else
2450 echo "$ac_err" >&5
2451 rm -rf conftest*
2452 eval "ac_cv_header_$ac_safe=no"
2454 rm -f conftest*
2456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2457 echo "$ac_t""yes" 1>&6
2458 cat >> confdefs.h <<\EOF
2459 #define NLIST_STRUCT 1
2462 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
2463 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
2464 echo $ac_n "(cached) $ac_c" 1>&6
2465 else
2466 cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 #include <nlist.h>
2470 int main() { return 0; }
2471 int t() {
2472 struct nlist n; n.n_un.n_name = 0;
2473 ; return 0; }
2475 if { (eval echo configure:2476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2476 rm -rf conftest*
2477 ac_cv_struct_nlist_n_un=yes
2478 else
2479 rm -rf conftest*
2480 ac_cv_struct_nlist_n_un=no
2482 rm -f conftest*
2486 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
2487 if test $ac_cv_struct_nlist_n_un = yes; then
2488 cat >> confdefs.h <<\EOF
2489 #define NLIST_NAME_UNION 1
2494 else
2495 echo "$ac_t""no" 1>&6
2497 fi # Do not have getloadavg in system libraries.
2499 # Some definitions of getloadavg require that the program be installed setgid.
2500 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
2501 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+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 "$srcdir/getloadavg.c"
2508 #ifdef LDAV_PRIVILEGED
2509 Yowza Am I SETGID yet
2510 #endif
2512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2513 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
2514 rm -rf conftest*
2515 ac_cv_func_getloadavg_setgid=yes
2516 else
2517 rm -rf conftest*
2518 ac_cv_func_getloadavg_setgid=no
2520 rm -f conftest*
2524 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
2525 if test $ac_cv_func_getloadavg_setgid = yes; then
2526 NEED_SETGID=true; cat >> confdefs.h <<\EOF
2527 #define GETLOADAVG_PRIVILEGED 1
2530 else
2531 NEED_SETGID=false
2534 if test $ac_cv_func_getloadavg_setgid = yes; then
2535 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
2536 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
2540 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
2541 # If we got an error (system does not support symlinks), try without -L.
2542 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
2543 ac_cv_group_kmem=`echo $ac_ls_output \
2544 | sed -ne 's/[ ][ ]*/ /g;
2545 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
2546 / /s/.* //;p;'`
2550 echo "$ac_t""$ac_cv_group_kmem" 1>&6
2551 KMEM_GROUP=$ac_cv_group_kmem
2554 echo $ac_n "checking for strcoll""... $ac_c" 1>&6
2555 if eval "test \"`echo '$''{'ac_cv_func_strcoll'+set}'`\" = set"; then
2556 echo $ac_n "(cached) $ac_c" 1>&6
2557 else
2558 if test "$cross_compiling" = yes; then
2559 ac_cv_func_strcoll=no
2560 else
2561 cat > conftest.$ac_ext <<EOF
2562 #line 2563 "configure"
2563 #include "confdefs.h"
2564 #include <string.h>
2565 main ()
2567 exit (strcoll ("abc", "def") >= 0 ||
2568 strcoll ("ABC", "DEF") >= 0 ||
2569 strcoll ("123", "456") >= 0);
2572 { (eval echo configure:2573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2573 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2574 ac_cv_func_strcoll=yes
2575 else
2576 ac_cv_func_strcoll=no
2579 rm -fr conftest*
2582 echo "$ac_t""$ac_cv_func_strcoll" 1>&6
2583 if test $ac_cv_func_strcoll = yes; then
2584 cat >> confdefs.h <<\EOF
2585 #define HAVE_STRCOLL 1
2591 # Check out the wait reality.
2592 for ac_hdr in sys/wait.h
2594 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2595 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2596 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2597 echo $ac_n "(cached) $ac_c" 1>&6
2598 else
2599 cat > conftest.$ac_ext <<EOF
2600 #line 2601 "configure"
2601 #include "confdefs.h"
2602 #include <$ac_hdr>
2604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2605 { (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2606 ac_err=`grep -v '^ *+' conftest.out`
2607 if test -z "$ac_err"; then
2608 rm -rf conftest*
2609 eval "ac_cv_header_$ac_safe=yes"
2610 else
2611 echo "$ac_err" >&5
2612 rm -rf conftest*
2613 eval "ac_cv_header_$ac_safe=no"
2615 rm -f conftest*
2617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2618 echo "$ac_t""yes" 1>&6
2619 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2620 cat >> confdefs.h <<EOF
2621 #define $ac_tr_hdr 1
2624 else
2625 echo "$ac_t""no" 1>&6
2627 done
2628 for ac_func in waitpid wait3
2630 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2631 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2632 echo $ac_n "(cached) $ac_c" 1>&6
2633 else
2634 cat > conftest.$ac_ext <<EOF
2635 #line 2636 "configure"
2636 #include "confdefs.h"
2637 /* System header to define __stub macros and hopefully few prototypes,
2638 which can conflict with char $ac_func(); below. */
2639 #include <assert.h>
2640 /* Override any gcc2 internal prototype to avoid an error. */
2641 /* We use char because int might match the return type of a gcc2
2642 builtin and then its argument prototype would still apply. */
2643 char $ac_func();
2645 int main() { return 0; }
2646 int t() {
2648 /* The GNU C library defines this for functions which it implements
2649 to always fail with ENOSYS. Some functions are actually named
2650 something starting with __ and the normal name is an alias. */
2651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2652 choke me
2653 #else
2654 $ac_func();
2655 #endif
2657 ; return 0; }
2659 if { (eval echo configure:2660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2660 rm -rf conftest*
2661 eval "ac_cv_func_$ac_func=yes"
2662 else
2663 rm -rf conftest*
2664 eval "ac_cv_func_$ac_func=no"
2666 rm -f conftest*
2669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2670 echo "$ac_t""yes" 1>&6
2671 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2672 cat >> confdefs.h <<EOF
2673 #define $ac_tr_func 1
2676 else
2677 echo "$ac_t""no" 1>&6
2679 done
2681 echo $ac_n "checking for union wait""... $ac_c" 1>&6
2682 if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then
2683 echo $ac_n "(cached) $ac_c" 1>&6
2684 else
2685 cat > conftest.$ac_ext <<EOF
2686 #line 2687 "configure"
2687 #include "confdefs.h"
2688 #include <sys/types.h>
2689 #include <sys/wait.h>
2690 int main() { return 0; }
2691 int t() {
2692 union wait status; int pid; pid = wait (&status);
2693 #ifdef WEXITSTATUS
2694 /* Some POSIXoid systems have both the new-style macros and the old
2695 union wait type, and they do not work together. If union wait
2696 conflicts with WEXITSTATUS et al, we don't want to use it at all. */
2697 if (WEXITSTATUS (status) != 0) pid = -1;
2698 #ifdef WTERMSIG
2699 /* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
2700 -- blow chunks here --
2701 #endif
2702 #endif
2703 #ifdef HAVE_WAITPID
2704 /* Make sure union wait works with waitpid. */
2705 pid = waitpid (-1, &status, 0);
2706 #endif
2708 ; return 0; }
2710 if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2711 rm -rf conftest*
2712 make_cv_union_wait=yes
2713 else
2714 rm -rf conftest*
2715 make_cv_union_wait=no
2717 rm -f conftest*
2721 if test "$make_cv_union_wait" = yes; then
2722 cat >> confdefs.h <<\EOF
2723 #define HAVE_UNION_WAIT 1
2727 echo "$ac_t""$make_cv_union_wait" 1>&6
2729 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2730 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2731 echo $ac_n "(cached) $ac_c" 1>&6
2732 else
2733 cat > conftest.$ac_ext <<EOF
2734 #line 2735 "configure"
2735 #include "confdefs.h"
2736 #include <sys/types.h>
2737 #include <signal.h>
2738 /* NetBSD declares sys_siglist in unistd.h. */
2739 #ifdef HAVE_UNISTD_H
2740 #include <unistd.h>
2741 #endif
2742 int main() { return 0; }
2743 int t() {
2744 char *msg = *(sys_siglist + 1);
2745 ; return 0; }
2747 if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2748 rm -rf conftest*
2749 ac_cv_decl_sys_siglist=yes
2750 else
2751 rm -rf conftest*
2752 ac_cv_decl_sys_siglist=no
2754 rm -f conftest*
2758 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2759 if test $ac_cv_decl_sys_siglist = yes; then
2760 cat >> confdefs.h <<\EOF
2761 #define SYS_SIGLIST_DECLARED 1
2767 # The presence of the following is not meant to imply
2768 # that make necessarily works on those systems.
2769 echo $ac_n "checking for -lsun""... $ac_c" 1>&6
2770 ac_lib_var=`echo sun'_'getpwnam | tr './+\055' '__p_'`
2771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2772 echo $ac_n "(cached) $ac_c" 1>&6
2773 else
2774 ac_save_LIBS="$LIBS"
2775 LIBS="-lsun $LIBS"
2776 cat > conftest.$ac_ext <<EOF
2777 #line 2778 "configure"
2778 #include "confdefs.h"
2779 /* Override any gcc2 internal prototype to avoid an error. */
2780 /* We use char because int might match the return type of a gcc2
2781 builtin and then its argument prototype would still apply. */
2782 char getpwnam();
2784 int main() { return 0; }
2785 int t() {
2786 getpwnam()
2787 ; return 0; }
2789 if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2790 rm -rf conftest*
2791 eval "ac_cv_lib_$ac_lib_var=yes"
2792 else
2793 rm -rf conftest*
2794 eval "ac_cv_lib_$ac_lib_var=no"
2796 rm -f conftest*
2797 LIBS="$ac_save_LIBS"
2800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2801 echo "$ac_t""yes" 1>&6
2802 ac_tr_lib=HAVE_LIB`echo sun | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2803 cat >> confdefs.h <<EOF
2804 #define $ac_tr_lib 1
2807 LIBS="-lsun $LIBS"
2809 else
2810 echo "$ac_t""no" 1>&6
2814 REMOTE=stub
2815 # Check whether --with-customs or --without-customs was given.
2816 if test "${with_customs+set}" = set; then
2817 withval="$with_customs"
2818 REMOTE=cstms LIBS="$LIBS libcustoms.a"
2822 echo checking for location of SCCS get command
2823 if test -f /usr/sccs/get; then
2824 SCCS_GET=/usr/sccs/get
2825 cat >> confdefs.h <<\EOF
2826 #define SCCS_GET "/usr/sccs/get"
2829 else
2830 SCCS_GET=get
2831 cat >> confdefs.h <<\EOF
2832 #define SCCS_GET "get"
2836 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
2837 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
2838 test -f s.conftest; then
2839 # We successfully created an SCCS file.
2840 echo checking if SCCS get command understands -G
2841 if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
2842 test -f conftoast; then
2843 cat >> confdefs.h <<\EOF
2844 #define SCCS_GET_MINUS_G 1
2849 rm -f s.conftest conftoast
2851 trap '' 1 2 15
2852 cat > confcache <<\EOF
2853 # This file is a shell script that caches the results of configure
2854 # tests run on this system so they can be shared between configure
2855 # scripts and configure runs. It is not useful on other systems.
2856 # If it contains results you don't want to keep, you may remove or edit it.
2858 # By default, configure uses ./config.cache as the cache file,
2859 # creating it if it does not exist already. You can give configure
2860 # the --cache-file=FILE option to use a different cache file; that is
2861 # what configure does when it calls configure scripts in
2862 # subdirectories, so they share the cache.
2863 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2864 # config.status only pays attention to the cache file if you give it the
2865 # --recheck option to rerun configure.
2868 # Ultrix sh set writes to stderr and can't be redirected directly,
2869 # and sets the high bit in the cache file unless we assign to the vars.
2870 (set) 2>&1 |
2871 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2872 >> confcache
2873 if cmp -s $cache_file confcache; then
2875 else
2876 if test -w $cache_file; then
2877 echo "updating cache $cache_file"
2878 cat confcache > $cache_file
2879 else
2880 echo "not updating unwritable cache $cache_file"
2883 rm -f confcache
2885 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2887 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2888 # Let make expand exec_prefix.
2889 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2891 # Any assignment to VPATH causes Sun make to only execute
2892 # the first set of double-colon rules, so remove it if not needed.
2893 # If there is a colon in the path, we need to keep it.
2894 if test "x$srcdir" = x.; then
2895 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2898 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2900 DEFS=-DHAVE_CONFIG_H
2902 # Without the "./", some shells look in PATH for config.status.
2903 : ${CONFIG_STATUS=./config.status}
2905 echo creating $CONFIG_STATUS
2906 rm -f $CONFIG_STATUS
2907 cat > $CONFIG_STATUS <<EOF
2908 #! /bin/sh
2909 # Generated automatically by configure.
2910 # Run this file to recreate the current configuration.
2911 # This directory was configured as follows,
2912 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2914 # $0 $ac_configure_args
2916 # Compiler output produced by configure, useful for debugging
2917 # configure, is in ./config.log if it exists.
2919 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2920 for ac_option
2922 case "\$ac_option" in
2923 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2924 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2925 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2926 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2927 echo "$CONFIG_STATUS generated by autoconf version 2.10"
2928 exit 0 ;;
2929 -help | --help | --hel | --he | --h)
2930 echo "\$ac_cs_usage"; exit 0 ;;
2931 *) echo "\$ac_cs_usage"; exit 1 ;;
2932 esac
2933 done
2935 ac_given_srcdir=$srcdir
2936 ac_given_INSTALL="$INSTALL"
2938 trap 'rm -fr `echo "Makefile build.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2940 cat >> $CONFIG_STATUS <<EOF
2942 # Protect against being on the right side of a sed subst in config.status.
2943 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2944 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2945 $ac_vpsub
2946 $extrasub
2947 s%@CFLAGS@%$CFLAGS%g
2948 s%@CPPFLAGS@%$CPPFLAGS%g
2949 s%@CXXFLAGS@%$CXXFLAGS%g
2950 s%@DEFS@%$DEFS%g
2951 s%@LDFLAGS@%$LDFLAGS%g
2952 s%@LIBS@%$LIBS%g
2953 s%@exec_prefix@%$exec_prefix%g
2954 s%@prefix@%$prefix%g
2955 s%@program_transform_name@%$program_transform_name%g
2956 s%@bindir@%$bindir%g
2957 s%@sbindir@%$sbindir%g
2958 s%@libexecdir@%$libexecdir%g
2959 s%@datadir@%$datadir%g
2960 s%@sysconfdir@%$sysconfdir%g
2961 s%@sharedstatedir@%$sharedstatedir%g
2962 s%@localstatedir@%$localstatedir%g
2963 s%@libdir@%$libdir%g
2964 s%@includedir@%$includedir%g
2965 s%@oldincludedir@%$oldincludedir%g
2966 s%@infodir@%$infodir%g
2967 s%@mandir@%$mandir%g
2968 s%@subdirs@%$subdirs%g
2969 s%@SET_MAKE@%$SET_MAKE%g
2970 s%@CC@%$CC%g
2971 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2972 s%@INSTALL_DATA@%$INSTALL_DATA%g
2973 s%@CPP@%$CPP%g
2974 s%@LIBOBJS@%$LIBOBJS%g
2975 s%@ALLOCA@%$ALLOCA%g
2976 s%@NEED_SETGID@%$NEED_SETGID%g
2977 s%@KMEM_GROUP@%$KMEM_GROUP%g
2978 s%@REMOTE@%$REMOTE%g
2980 CEOF
2982 cat >> $CONFIG_STATUS <<EOF
2984 CONFIG_FILES=\${CONFIG_FILES-"Makefile build.sh"}
2986 cat >> $CONFIG_STATUS <<\EOF
2987 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2988 # Support "outfile[:infile]", defaulting infile="outfile.in".
2989 case "$ac_file" in
2990 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2991 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2992 *) ac_file_in="${ac_file}.in" ;;
2993 esac
2995 # Adjust relative srcdir, etc. for subdirectories.
2997 # Remove last slash and all that follows it. Not all systems have dirname.
2998 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2999 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3000 # The file is in a subdirectory.
3001 test ! -d "$ac_dir" && mkdir "$ac_dir"
3002 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3003 # A "../" for each directory in $ac_dir_suffix.
3004 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3005 else
3006 ac_dir_suffix= ac_dots=
3009 case "$ac_given_srcdir" in
3010 .) srcdir=.
3011 if test -z "$ac_dots"; then top_srcdir=.
3012 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3013 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3014 *) # Relative path.
3015 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3016 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3017 esac
3019 case "$ac_given_INSTALL" in
3020 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3021 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3022 esac
3023 echo creating "$ac_file"
3024 rm -f "$ac_file"
3025 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3026 case "$ac_file" in
3027 *Makefile*) ac_comsub="1i\\
3028 # $configure_input" ;;
3029 *) ac_comsub= ;;
3030 esac
3031 sed -e "$ac_comsub
3032 s%@configure_input@%$configure_input%g
3033 s%@srcdir@%$srcdir%g
3034 s%@top_srcdir@%$top_srcdir%g
3035 s%@INSTALL@%$INSTALL%g
3036 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3037 fi; done
3038 rm -f conftest.subs
3040 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3041 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3043 # ac_d sets the value in "#define NAME VALUE" lines.
3044 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3045 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3046 ac_dC='\3'
3047 ac_dD='%g'
3048 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3049 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3050 ac_uB='\([ ]\)%\1#\2define\3'
3051 ac_uC=' '
3052 ac_uD='\4%g'
3053 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3054 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3055 ac_eB='$%\1#\2define\3'
3056 ac_eC=' '
3057 ac_eD='%g'
3059 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
3060 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3061 # Support "outfile[:infile]", defaulting infile="outfile.in".
3062 case "$ac_file" in
3063 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3064 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3065 *) ac_file_in="${ac_file}.in" ;;
3066 esac
3068 echo creating $ac_file
3070 rm -f conftest.frag conftest.in conftest.out
3071 cp $ac_given_srcdir/$ac_file_in conftest.in
3075 # Transform confdefs.h into a sed script conftest.vals that substitutes
3076 # the proper values into config.h.in to produce config.h. And first:
3077 # Protect against being on the right side of a sed subst in config.status.
3078 # Protect against being in an unquoted here document in config.status.
3079 rm -f conftest.vals
3080 cat > conftest.hdr <<\EOF
3081 s/[\\&%]/\\&/g
3082 s%[\\$`]%\\&%g
3083 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3084 s%ac_d%ac_u%gp
3085 s%ac_u%ac_e%gp
3087 sed -n -f conftest.hdr confdefs.h > conftest.vals
3088 rm -f conftest.hdr
3090 # This sed command replaces #undef with comments. This is necessary, for
3091 # example, in the case of _POSIX_SOURCE, which is predefined and required
3092 # on some systems where configure will not decide to define it.
3093 cat >> conftest.vals <<\EOF
3094 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3097 # Break up conftest.vals because some shells have a limit on
3098 # the size of here documents, and old seds have small limits too.
3099 # Maximum number of lines to put in a single here document.
3100 ac_max_here_lines=12
3102 rm -f conftest.tail
3103 while :
3105 ac_lines=`grep -c . conftest.vals`
3106 # grep -c gives empty output for an empty file on some AIX systems.
3107 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3108 # Write a limited-size here document to conftest.frag.
3109 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3110 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3111 echo 'CEOF
3112 sed -f conftest.frag conftest.in > conftest.out
3113 rm -f conftest.in
3114 mv conftest.out conftest.in
3115 ' >> $CONFIG_STATUS
3116 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3117 rm -f conftest.vals
3118 mv conftest.tail conftest.vals
3119 done
3120 rm -f conftest.vals
3122 cat >> $CONFIG_STATUS <<\EOF
3123 rm -f conftest.frag conftest.h
3124 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3125 cat conftest.in >> conftest.h
3126 rm -f conftest.in
3127 if cmp -s $ac_file conftest.h 2>/dev/null; then
3128 echo "$ac_file is unchanged"
3129 rm -f conftest.h
3130 else
3131 # Remove last slash and all that follows it. Not all systems have dirname.
3132 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3133 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3134 # The file is in a subdirectory.
3135 test ! -d "$ac_dir" && mkdir "$ac_dir"
3137 rm -f $ac_file
3138 mv conftest.h $ac_file
3140 fi; done
3144 # Makefile uses this timestamp file to know when to remake Makefile,
3145 # build.sh, and glob/Makefile.
3146 touch stamp-config
3147 exit 0
3149 chmod +x $CONFIG_STATUS
3150 rm -fr confdefs* $ac_clean_files
3151 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3153 if test "$no_recursion" != yes; then
3155 # Remove --cache-file and --srcdir arguments so they do not pile up.
3156 ac_sub_configure_args=
3157 ac_prev=
3158 for ac_arg in $ac_configure_args; do
3159 if test -n "$ac_prev"; then
3160 ac_prev=
3161 continue
3163 case "$ac_arg" in
3164 -cache-file | --cache-file | --cache-fil | --cache-fi \
3165 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3166 ac_prev=cache_file ;;
3167 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3168 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3170 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3171 ac_prev=srcdir ;;
3172 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3174 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3175 esac
3176 done
3178 for ac_config_dir in glob; do
3180 # Do not complain, so a configure script can configure whichever
3181 # parts of a large source tree are present.
3182 if test ! -d $srcdir/$ac_config_dir; then
3183 continue
3186 echo configuring in $ac_config_dir
3188 case "$srcdir" in
3189 .) ;;
3191 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3192 else
3193 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3196 esac
3198 ac_popdir=`pwd`
3199 cd $ac_config_dir
3201 case "$srcdir" in
3202 .) # No --srcdir option. We are building in place.
3203 ac_sub_srcdir=$srcdir ;;
3204 /*) # Absolute path.
3205 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3206 *) # Relative path.
3207 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3208 esac
3210 # Check for guested configure; otherwise get Cygnus style configure.
3211 if test -f $ac_sub_srcdir/configure; then
3212 ac_sub_configure=$ac_sub_srcdir/configure
3213 elif test -f $ac_sub_srcdir/configure.in; then
3214 ac_sub_configure=$ac_configure
3215 else
3216 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3217 ac_sub_configure=
3220 # The recursion is here.
3221 if test -n "$ac_sub_configure"; then
3223 # Make the cache file name correct relative to the subdirectory.
3224 # A "../" for each directory in /$ac_config_dir.
3225 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3226 case "$cache_file" in
3227 /*) ac_sub_cache_file=$cache_file ;;
3228 *) # Relative path.
3229 ac_sub_cache_file="$ac_dots$cache_file" ;;
3230 esac
3231 case "$ac_given_INSTALL" in
3232 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3233 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3234 esac
3236 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3237 # The eval makes quoting arguments work.
3238 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3239 then :
3240 else
3241 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3245 cd $ac_popdir
3246 done