Sun Jul 14 12:59:27 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[make.git] / configure
blobb02356d7a02b30601f370e2a7770fed06035ab37
1 #! /bin/sh
3 # From configure.in Id: configure.in,v 1.51 1996/06/22 22:00:32 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=`echo "$2" | tr './\055' '___'`
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 "
1180 pid_t^a-zA-Z_0-9 " >/dev/null 2>&1; then
1181 rm -rf conftest*
1182 ac_cv_type_pid_t=yes
1183 else
1184 rm -rf conftest*
1185 ac_cv_type_pid_t=no
1187 rm -f conftest*
1190 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1191 if test $ac_cv_type_pid_t = no; then
1192 cat >> confdefs.h <<\EOF
1193 #define pid_t int
1198 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1199 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1200 echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202 cat > conftest.$ac_ext <<EOF
1203 #line 1204 "configure"
1204 #include "confdefs.h"
1205 #include <sys/types.h>
1206 #include <signal.h>
1207 #ifdef signal
1208 #undef signal
1209 #endif
1210 #ifdef __cplusplus
1211 extern "C" void (*signal (int, void (*)(int)))(int);
1212 #else
1213 void (*signal ()) ();
1214 #endif
1216 int main() { return 0; }
1217 int t() {
1218 int i;
1219 ; return 0; }
1221 if { (eval echo configure:1222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1222 rm -rf conftest*
1223 ac_cv_type_signal=void
1224 else
1225 rm -rf conftest*
1226 ac_cv_type_signal=int
1228 rm -f conftest*
1232 echo "$ac_t""$ac_cv_type_signal" 1>&6
1233 cat >> confdefs.h <<EOF
1234 #define RETSIGTYPE $ac_cv_type_signal
1238 for ac_hdr in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
1239 sys/timeb.h
1241 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1242 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1243 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1244 echo $ac_n "(cached) $ac_c" 1>&6
1245 else
1246 cat > conftest.$ac_ext <<EOF
1247 #line 1248 "configure"
1248 #include "confdefs.h"
1249 #include <$ac_hdr>
1251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1252 { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1253 ac_err=`grep -v '^ *+' conftest.out`
1254 if test -z "$ac_err"; then
1255 rm -rf conftest*
1256 eval "ac_cv_header_$ac_safe=yes"
1257 else
1258 echo "$ac_err" >&5
1259 rm -rf conftest*
1260 eval "ac_cv_header_$ac_safe=no"
1262 rm -f conftest*
1264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1265 echo "$ac_t""yes" 1>&6
1266 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1267 cat >> confdefs.h <<EOF
1268 #define $ac_tr_hdr 1
1271 else
1272 echo "$ac_t""no" 1>&6
1274 done
1276 if test "x$CC" != xcc; then
1277 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1278 else
1279 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1281 set dummy $CC; ac_cc="`echo $2 |
1282 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1283 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1284 echo $ac_n "(cached) $ac_c" 1>&6
1285 else
1286 echo 'foo(){}' > conftest.c
1287 # Make sure it works both with $CC and with simple cc.
1288 # We do the test twice because some compilers refuse to overwrite an
1289 # existing .o file with -o, though they will create one.
1290 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1291 if { (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1292 test -f conftest.o && { (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1293 then
1294 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1295 if test "x$CC" != xcc; then
1296 # Test first that cc exists at all.
1297 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1298 ac_try='cc -c conftest.c -o conftest.o 1>&5'
1299 if { (eval echo configure:1300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1300 test -f conftest.o && { (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1301 then
1302 # cc works too.
1304 else
1305 # cc exists but doesn't like -o.
1306 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1310 else
1311 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1313 rm -f conftest*
1316 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1317 echo "$ac_t""yes" 1>&6
1318 else
1319 echo "$ac_t""no" 1>&6
1320 cat >> confdefs.h <<\EOF
1321 #define NO_MINUS_C_MINUS_O 1
1326 echo $ac_n "checking for working const""... $ac_c" 1>&6
1327 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1328 echo $ac_n "(cached) $ac_c" 1>&6
1329 else
1330 cat > conftest.$ac_ext <<EOF
1331 #line 1332 "configure"
1332 #include "confdefs.h"
1334 int main() { return 0; }
1335 int t() {
1337 /* Ultrix mips cc rejects this. */
1338 typedef int charset[2]; const charset x;
1339 /* SunOS 4.1.1 cc rejects this. */
1340 char const *const *ccp;
1341 char **p;
1342 /* NEC SVR4.0.2 mips cc rejects this. */
1343 struct point {int x, y;};
1344 static struct point const zero = {0,0};
1345 /* AIX XL C 1.02.0.0 rejects this.
1346 It does not let you subtract one const X* pointer from another in an arm
1347 of an if-expression whose if-part is not a constant expression */
1348 const char *g = "string";
1349 ccp = &g + (g ? g-g : 0);
1350 /* HPUX 7.0 cc rejects these. */
1351 ++ccp;
1352 p = (char**) ccp;
1353 ccp = (char const *const *) p;
1354 { /* SCO 3.2v4 cc rejects this. */
1355 char *t;
1356 char const *s = 0 ? (char *) 0 : (char const *) 0;
1358 *t++ = 0;
1360 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1361 int x[] = {25, 17};
1362 const int *foo = &x[0];
1363 ++foo;
1365 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1366 typedef const int *iptr;
1367 iptr p = 0;
1368 ++p;
1370 { /* AIX XL C 1.02.0.0 rejects this saying
1371 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1372 struct s { int j; const int *ap[3]; };
1373 struct s *b; b->j = 5;
1375 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1376 const int foo = 10;
1379 ; return 0; }
1381 if { (eval echo configure:1382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1382 rm -rf conftest*
1383 ac_cv_c_const=yes
1384 else
1385 rm -rf conftest*
1386 ac_cv_c_const=no
1388 rm -f conftest*
1392 echo "$ac_t""$ac_cv_c_const" 1>&6
1393 if test $ac_cv_c_const = no; then
1394 cat >> confdefs.h <<\EOF
1395 #define const
1399 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1400 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1401 echo $ac_n "(cached) $ac_c" 1>&6
1402 else
1403 cat > conftest.$ac_ext <<EOF
1404 #line 1405 "configure"
1405 #include "confdefs.h"
1406 #include <sys/types.h>
1407 #include <sys/stat.h>
1409 #if defined(S_ISBLK) && defined(S_IFDIR)
1410 # if S_ISBLK (S_IFDIR)
1411 You lose.
1412 # endif
1413 #endif
1415 #if defined(S_ISBLK) && defined(S_IFCHR)
1416 # if S_ISBLK (S_IFCHR)
1417 You lose.
1418 # endif
1419 #endif
1421 #if defined(S_ISLNK) && defined(S_IFREG)
1422 # if S_ISLNK (S_IFREG)
1423 You lose.
1424 # endif
1425 #endif
1427 #if defined(S_ISSOCK) && defined(S_IFREG)
1428 # if S_ISSOCK (S_IFREG)
1429 You lose.
1430 # endif
1431 #endif
1434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1435 egrep "You lose" >/dev/null 2>&1; then
1436 rm -rf conftest*
1437 ac_cv_header_stat_broken=yes
1438 else
1439 rm -rf conftest*
1440 ac_cv_header_stat_broken=no
1442 rm -f conftest*
1446 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1447 if test $ac_cv_header_stat_broken = yes; then
1448 cat >> confdefs.h <<\EOF
1449 #define STAT_MACROS_BROKEN 1
1458 for ac_func in psignal mktemp \
1459 dup2 getcwd sigsetmask getgroups setlinebuf \
1460 seteuid setegid setreuid setregid strerror strsignal
1462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1463 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1464 echo $ac_n "(cached) $ac_c" 1>&6
1465 else
1466 cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1469 /* System header to define __stub macros and hopefully few prototypes,
1470 which can conflict with char $ac_func(); below. */
1471 #include <assert.h>
1472 /* Override any gcc2 internal prototype to avoid an error. */
1473 /* We use char because int might match the return type of a gcc2
1474 builtin and then its argument prototype would still apply. */
1475 char $ac_func();
1477 int main() { return 0; }
1478 int t() {
1480 /* The GNU C library defines this for functions which it implements
1481 to always fail with ENOSYS. Some functions are actually named
1482 something starting with __ and the normal name is an alias. */
1483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1484 choke me
1485 #else
1486 $ac_func();
1487 #endif
1489 ; return 0; }
1491 if { (eval echo configure:1492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1492 rm -rf conftest*
1493 eval "ac_cv_func_$ac_func=yes"
1494 else
1495 rm -rf conftest*
1496 eval "ac_cv_func_$ac_func=no"
1498 rm -f conftest*
1501 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1502 echo "$ac_t""yes" 1>&6
1503 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1504 cat >> confdefs.h <<EOF
1505 #define $ac_tr_func 1
1508 else
1509 echo "$ac_t""no" 1>&6
1511 done
1513 echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6
1514 if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; then
1515 echo $ac_n "(cached) $ac_c" 1>&6
1516 else
1517 cat > conftest.$ac_ext <<EOF
1518 #line 1519 "configure"
1519 #include "confdefs.h"
1521 int main() { return 0; }
1522 int t() {
1523 extern char *sys_siglist[]; puts(*sys_siglist);
1524 ; return 0; }
1526 if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1527 rm -rf conftest*
1528 ac_cv_check_symbol_sys_siglist=yes
1529 else
1530 rm -rf conftest*
1531 ac_cv_check_symbol_sys_siglist=no
1533 rm -f conftest*
1537 if test "$ac_cv_check_symbol_sys_siglist" = yes; then
1538 ac_tr_symbol=`echo sys_siglist | tr '[a-z]' '[A-Z]'`
1539 cat >> confdefs.h <<EOF
1540 #define HAVE_${ac_tr_symbol} 1
1544 echo "$ac_t""$ac_cv_check_symbol_sys_siglist" 1>&6
1545 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1546 # for constant arguments. Useless!
1547 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1548 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1549 echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551 cat > conftest.$ac_ext <<EOF
1552 #line 1553 "configure"
1553 #include "confdefs.h"
1554 #include <alloca.h>
1555 int main() { return 0; }
1556 int t() {
1557 char *p = alloca(2 * sizeof(int));
1558 ; return 0; }
1560 if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1561 rm -rf conftest*
1562 ac_cv_header_alloca_h=yes
1563 else
1564 rm -rf conftest*
1565 ac_cv_header_alloca_h=no
1567 rm -f conftest*
1571 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1572 if test $ac_cv_header_alloca_h = yes; then
1573 cat >> confdefs.h <<\EOF
1574 #define HAVE_ALLOCA_H 1
1579 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1580 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1581 echo $ac_n "(cached) $ac_c" 1>&6
1582 else
1583 cat > conftest.$ac_ext <<EOF
1584 #line 1585 "configure"
1585 #include "confdefs.h"
1587 #ifdef __GNUC__
1588 # define alloca __builtin_alloca
1589 #else
1590 # if HAVE_ALLOCA_H
1591 # include <alloca.h>
1592 # else
1593 # ifdef _AIX
1594 #pragma alloca
1595 # else
1596 # ifndef alloca /* predefined by HP cc +Olibcalls */
1597 char *alloca ();
1598 # endif
1599 # endif
1600 # endif
1601 #endif
1603 int main() { return 0; }
1604 int t() {
1605 char *p = (char *) alloca(1);
1606 ; return 0; }
1608 if { (eval echo configure:1609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1609 rm -rf conftest*
1610 ac_cv_func_alloca=yes
1611 else
1612 rm -rf conftest*
1613 ac_cv_func_alloca=no
1615 rm -f conftest*
1619 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1620 if test $ac_cv_func_alloca = yes; then
1621 cat >> confdefs.h <<\EOF
1622 #define HAVE_ALLOCA 1
1627 if test $ac_cv_func_alloca = no; then
1628 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1629 # that cause trouble. Some versions do not even contain alloca or
1630 # contain a buggy version. If you still want to use their alloca,
1631 # use ar to extract alloca.o from them instead of compiling alloca.c.
1632 ALLOCA=alloca.o
1633 cat >> confdefs.h <<\EOF
1634 #define C_ALLOCA 1
1638 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1639 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1640 echo $ac_n "(cached) $ac_c" 1>&6
1641 else
1642 cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1645 #if defined(CRAY) && ! defined(CRAY2)
1646 webecray
1647 #else
1648 wenotbecray
1649 #endif
1652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1653 egrep "webecray" >/dev/null 2>&1; then
1654 rm -rf conftest*
1655 ac_cv_os_cray=yes
1656 else
1657 rm -rf conftest*
1658 ac_cv_os_cray=no
1660 rm -f conftest*
1664 echo "$ac_t""$ac_cv_os_cray" 1>&6
1665 if test $ac_cv_os_cray = yes; then
1666 for ac_func in _getb67 GETB67 getb67; do
1667 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1668 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1669 echo $ac_n "(cached) $ac_c" 1>&6
1670 else
1671 cat > conftest.$ac_ext <<EOF
1672 #line 1673 "configure"
1673 #include "confdefs.h"
1674 /* System header to define __stub macros and hopefully few prototypes,
1675 which can conflict with char $ac_func(); below. */
1676 #include <assert.h>
1677 /* Override any gcc2 internal prototype to avoid an error. */
1678 /* We use char because int might match the return type of a gcc2
1679 builtin and then its argument prototype would still apply. */
1680 char $ac_func();
1682 int main() { return 0; }
1683 int t() {
1685 /* The GNU C library defines this for functions which it implements
1686 to always fail with ENOSYS. Some functions are actually named
1687 something starting with __ and the normal name is an alias. */
1688 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1689 choke me
1690 #else
1691 $ac_func();
1692 #endif
1694 ; return 0; }
1696 if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1697 rm -rf conftest*
1698 eval "ac_cv_func_$ac_func=yes"
1699 else
1700 rm -rf conftest*
1701 eval "ac_cv_func_$ac_func=no"
1703 rm -f conftest*
1706 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1707 echo "$ac_t""yes" 1>&6
1708 cat >> confdefs.h <<EOF
1709 #define CRAY_STACKSEG_END $ac_func
1712 break
1713 else
1714 echo "$ac_t""no" 1>&6
1717 done
1720 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1721 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1722 echo $ac_n "(cached) $ac_c" 1>&6
1723 else
1724 if test "$cross_compiling" = yes; then
1725 ac_cv_c_stack_direction=0
1726 else
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1730 find_stack_direction ()
1732 static char *addr = 0;
1733 auto char dummy;
1734 if (addr == 0)
1736 addr = &dummy;
1737 return find_stack_direction ();
1739 else
1740 return (&dummy > addr) ? 1 : -1;
1742 main ()
1744 exit (find_stack_direction() < 0);
1747 { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1748 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1749 ac_cv_c_stack_direction=1
1750 else
1751 ac_cv_c_stack_direction=-1
1754 rm -fr conftest*
1757 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1758 cat >> confdefs.h <<EOF
1759 #define STACK_DIRECTION $ac_cv_c_stack_direction
1764 ac_safe=`echo "vfork.h" | tr './\055' '___'`
1765 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
1766 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1767 echo $ac_n "(cached) $ac_c" 1>&6
1768 else
1769 cat > conftest.$ac_ext <<EOF
1770 #line 1771 "configure"
1771 #include "confdefs.h"
1772 #include <vfork.h>
1774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1775 { (eval echo configure:1776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1776 ac_err=`grep -v '^ *+' conftest.out`
1777 if test -z "$ac_err"; then
1778 rm -rf conftest*
1779 eval "ac_cv_header_$ac_safe=yes"
1780 else
1781 echo "$ac_err" >&5
1782 rm -rf conftest*
1783 eval "ac_cv_header_$ac_safe=no"
1785 rm -f conftest*
1787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1788 echo "$ac_t""yes" 1>&6
1789 cat >> confdefs.h <<\EOF
1790 #define HAVE_VFORK_H 1
1793 else
1794 echo "$ac_t""no" 1>&6
1797 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
1798 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1799 echo $ac_n "(cached) $ac_c" 1>&6
1800 else
1801 if test "$cross_compiling" = yes; then
1802 echo $ac_n "checking for vfork""... $ac_c" 1>&6
1803 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1804 echo $ac_n "(cached) $ac_c" 1>&6
1805 else
1806 cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 /* System header to define __stub macros and hopefully few prototypes,
1810 which can conflict with char vfork(); below. */
1811 #include <assert.h>
1812 /* Override any gcc2 internal prototype to avoid an error. */
1813 /* We use char because int might match the return type of a gcc2
1814 builtin and then its argument prototype would still apply. */
1815 char vfork();
1817 int main() { return 0; }
1818 int t() {
1820 /* The GNU C library defines this for functions which it implements
1821 to always fail with ENOSYS. Some functions are actually named
1822 something starting with __ and the normal name is an alias. */
1823 #if defined (__stub_vfork) || defined (__stub___vfork)
1824 choke me
1825 #else
1826 vfork();
1827 #endif
1829 ; return 0; }
1831 if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1832 rm -rf conftest*
1833 eval "ac_cv_func_vfork=yes"
1834 else
1835 rm -rf conftest*
1836 eval "ac_cv_func_vfork=no"
1838 rm -f conftest*
1841 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1842 echo "$ac_t""yes" 1>&6
1844 else
1845 echo "$ac_t""no" 1>&6
1848 else
1849 cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 /* Thanks to Paul Eggert for this test. */
1853 #include <stdio.h>
1854 #include <sys/types.h>
1855 #include <sys/stat.h>
1856 #ifdef HAVE_UNISTD_H
1857 #include <unistd.h>
1858 #endif
1859 #ifdef HAVE_VFORK_H
1860 #include <vfork.h>
1861 #endif
1862 /* On some sparc systems, changes by the child to local and incoming
1863 argument registers are propagated back to the parent.
1864 The compiler is told about this with #include <vfork.h>,
1865 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
1866 Test for this by using a static variable whose address
1867 is put into a register that is clobbered by the vfork. */
1868 static
1869 #ifdef __cplusplus
1870 sparc_address_test (int arg)
1871 #else
1872 sparc_address_test (arg) int arg;
1873 #endif
1875 static pid_t child;
1876 if (!child) {
1877 child = vfork ();
1878 if (child < 0)
1879 perror ("vfork");
1880 if (!child) {
1881 arg = getpid();
1882 write(-1, "", 0);
1883 _exit (arg);
1887 main() {
1888 pid_t parent = getpid ();
1889 pid_t child;
1891 sparc_address_test ();
1893 child = vfork ();
1895 if (child == 0) {
1896 /* Here is another test for sparc vfork register problems.
1897 This test uses lots of local variables, at least
1898 as many local variables as main has allocated so far
1899 including compiler temporaries. 4 locals are enough for
1900 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
1901 A buggy compiler should reuse the register of parent
1902 for one of the local variables, since it will think that
1903 parent can't possibly be used any more in this routine.
1904 Assigning to the local variable will thus munge parent
1905 in the parent process. */
1906 pid_t
1907 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
1908 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
1909 /* Convince the compiler that p..p7 are live; otherwise, it might
1910 use the same hardware register for all 8 local variables. */
1911 if (p != p1 || p != p2 || p != p3 || p != p4
1912 || p != p5 || p != p6 || p != p7)
1913 _exit(1);
1915 /* On some systems (e.g. IRIX 3.3),
1916 vfork doesn't separate parent from child file descriptors.
1917 If the child closes a descriptor before it execs or exits,
1918 this munges the parent's descriptor as well.
1919 Test for this by closing stdout in the child. */
1920 _exit(close(fileno(stdout)) != 0);
1921 } else {
1922 int status;
1923 struct stat st;
1925 while (wait(&status) != child)
1927 exit(
1928 /* Was there some problem with vforking? */
1929 child < 0
1931 /* Did the child fail? (This shouldn't happen.) */
1932 || status
1934 /* Did the vfork/compiler bug occur? */
1935 || parent != getpid()
1937 /* Did the file descriptor bug occur? */
1938 || fstat(fileno(stdout), &st) != 0
1943 { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1944 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1945 ac_cv_func_vfork=yes
1946 else
1947 ac_cv_func_vfork=no
1950 rm -fr conftest*
1953 echo "$ac_t""$ac_cv_func_vfork" 1>&6
1954 if test $ac_cv_func_vfork = no; then
1955 cat >> confdefs.h <<\EOF
1956 #define vfork fork
1961 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
1962 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
1963 echo $ac_n "(cached) $ac_c" 1>&6
1964 else
1965 if test "$cross_compiling" = yes; then
1966 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1967 else
1968 cat > conftest.$ac_ext <<EOF
1969 #line 1970 "configure"
1970 #include "confdefs.h"
1971 #include <stdio.h>
1972 /* If setvbuf has the reversed format, exit 0. */
1973 main () {
1974 /* This call has the arguments reversed.
1975 A reversed system may check and see that the address of main
1976 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
1977 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
1978 exit(1);
1979 putc('\r', stdout);
1980 exit(0); /* Non-reversed systems segv here. */
1983 { (eval echo configure:1984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1984 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1985 ac_cv_func_setvbuf_reversed=yes
1986 else
1987 ac_cv_func_setvbuf_reversed=no
1990 rm -fr conftest*
1991 rm -f core core.* *.core
1994 echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
1995 if test $ac_cv_func_setvbuf_reversed = yes; then
1996 cat >> confdefs.h <<\EOF
1997 #define SETVBUF_REVERSED 1
2002 ac_have_func=no # yes means we've found a way to get the load average.
2004 # Some systems with -lutil have (and need) -lkvm as well, some do not.
2005 # On Solaris, -lkvm requires nlist from -lelf, so check that first
2006 # to get the right answer into the cache.
2007 echo $ac_n "checking for -lelf""... $ac_c" 1>&6
2008 ac_lib_var=`echo elf'_'elf_begin | tr './+\055' '__p_'`
2009 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2010 echo $ac_n "(cached) $ac_c" 1>&6
2011 else
2012 ac_save_LIBS="$LIBS"
2013 LIBS="-lelf $LIBS"
2014 cat > conftest.$ac_ext <<EOF
2015 #line 2016 "configure"
2016 #include "confdefs.h"
2017 /* Override any gcc2 internal prototype to avoid an error. */
2018 /* We use char because int might match the return type of a gcc2
2019 builtin and then its argument prototype would still apply. */
2020 char elf_begin();
2022 int main() { return 0; }
2023 int t() {
2024 elf_begin()
2025 ; return 0; }
2027 if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2028 rm -rf conftest*
2029 eval "ac_cv_lib_$ac_lib_var=yes"
2030 else
2031 rm -rf conftest*
2032 eval "ac_cv_lib_$ac_lib_var=no"
2034 rm -f conftest*
2035 LIBS="$ac_save_LIBS"
2038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2039 echo "$ac_t""yes" 1>&6
2040 LIBS="-lelf $LIBS"
2041 else
2042 echo "$ac_t""no" 1>&6
2045 echo $ac_n "checking for -lkvm""... $ac_c" 1>&6
2046 ac_lib_var=`echo kvm'_'kvm_open | tr './+\055' '__p_'`
2047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2048 echo $ac_n "(cached) $ac_c" 1>&6
2049 else
2050 ac_save_LIBS="$LIBS"
2051 LIBS="-lkvm $LIBS"
2052 cat > conftest.$ac_ext <<EOF
2053 #line 2054 "configure"
2054 #include "confdefs.h"
2055 /* Override any gcc2 internal prototype to avoid an error. */
2056 /* We use char because int might match the return type of a gcc2
2057 builtin and then its argument prototype would still apply. */
2058 char kvm_open();
2060 int main() { return 0; }
2061 int t() {
2062 kvm_open()
2063 ; return 0; }
2065 if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2066 rm -rf conftest*
2067 eval "ac_cv_lib_$ac_lib_var=yes"
2068 else
2069 rm -rf conftest*
2070 eval "ac_cv_lib_$ac_lib_var=no"
2072 rm -f conftest*
2073 LIBS="$ac_save_LIBS"
2076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2077 echo "$ac_t""yes" 1>&6
2078 LIBS="-lkvm $LIBS"
2079 else
2080 echo "$ac_t""no" 1>&6
2083 # Check for the 4.4BSD definition of getloadavg.
2084 echo $ac_n "checking for -lutil""... $ac_c" 1>&6
2085 ac_lib_var=`echo util'_'getloadavg | tr './+\055' '__p_'`
2086 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2087 echo $ac_n "(cached) $ac_c" 1>&6
2088 else
2089 ac_save_LIBS="$LIBS"
2090 LIBS="-lutil $LIBS"
2091 cat > conftest.$ac_ext <<EOF
2092 #line 2093 "configure"
2093 #include "confdefs.h"
2094 /* Override any gcc2 internal prototype to avoid an error. */
2095 /* We use char because int might match the return type of a gcc2
2096 builtin and then its argument prototype would still apply. */
2097 char getloadavg();
2099 int main() { return 0; }
2100 int t() {
2101 getloadavg()
2102 ; return 0; }
2104 if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2105 rm -rf conftest*
2106 eval "ac_cv_lib_$ac_lib_var=yes"
2107 else
2108 rm -rf conftest*
2109 eval "ac_cv_lib_$ac_lib_var=no"
2111 rm -f conftest*
2112 LIBS="$ac_save_LIBS"
2115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2116 echo "$ac_t""yes" 1>&6
2117 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
2118 else
2119 echo "$ac_t""no" 1>&6
2123 if test $ac_have_func = no; then
2124 # There is a commonly available library for RS/6000 AIX.
2125 # Since it is not a standard part of AIX, it might be installed locally.
2126 ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
2127 echo $ac_n "checking for -lgetloadavg""... $ac_c" 1>&6
2128 ac_lib_var=`echo getloadavg'_'getloadavg | tr './+\055' '__p_'`
2129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2130 echo $ac_n "(cached) $ac_c" 1>&6
2131 else
2132 ac_save_LIBS="$LIBS"
2133 LIBS="-lgetloadavg $LIBS"
2134 cat > conftest.$ac_ext <<EOF
2135 #line 2136 "configure"
2136 #include "confdefs.h"
2137 /* Override any gcc2 internal prototype to avoid an error. */
2138 /* We use char because int might match the return type of a gcc2
2139 builtin and then its argument prototype would still apply. */
2140 char getloadavg();
2142 int main() { return 0; }
2143 int t() {
2144 getloadavg()
2145 ; return 0; }
2147 if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2148 rm -rf conftest*
2149 eval "ac_cv_lib_$ac_lib_var=yes"
2150 else
2151 rm -rf conftest*
2152 eval "ac_cv_lib_$ac_lib_var=no"
2154 rm -f conftest*
2155 LIBS="$ac_save_LIBS"
2158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2159 echo "$ac_t""yes" 1>&6
2160 LIBS="-lgetloadavg $LIBS"
2161 else
2162 echo "$ac_t""no" 1>&6
2163 LIBS="$ac_save_LIBS"
2168 # Make sure it is really in the library, if we think we found it.
2169 for ac_func in getloadavg
2171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2172 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2173 echo $ac_n "(cached) $ac_c" 1>&6
2174 else
2175 cat > conftest.$ac_ext <<EOF
2176 #line 2177 "configure"
2177 #include "confdefs.h"
2178 /* System header to define __stub macros and hopefully few prototypes,
2179 which can conflict with char $ac_func(); below. */
2180 #include <assert.h>
2181 /* Override any gcc2 internal prototype to avoid an error. */
2182 /* We use char because int might match the return type of a gcc2
2183 builtin and then its argument prototype would still apply. */
2184 char $ac_func();
2186 int main() { return 0; }
2187 int t() {
2189 /* The GNU C library defines this for functions which it implements
2190 to always fail with ENOSYS. Some functions are actually named
2191 something starting with __ and the normal name is an alias. */
2192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2193 choke me
2194 #else
2195 $ac_func();
2196 #endif
2198 ; return 0; }
2200 if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2201 rm -rf conftest*
2202 eval "ac_cv_func_$ac_func=yes"
2203 else
2204 rm -rf conftest*
2205 eval "ac_cv_func_$ac_func=no"
2207 rm -f conftest*
2210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2211 echo "$ac_t""yes" 1>&6
2213 else
2214 echo "$ac_t""no" 1>&6
2215 LIBOBJS="$LIBOBJS ${ac_func}.o"
2218 done
2221 if test $ac_cv_func_getloadavg = yes; then
2222 cat >> confdefs.h <<\EOF
2223 #define HAVE_GETLOADAVG 1
2226 ac_have_func=yes
2227 else
2228 # Figure out what our getloadavg.c needs.
2229 ac_have_func=no
2230 ac_safe=`echo "sys/dg_sys_info.h" | tr './\055' '___'`
2231 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
2232 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2233 echo $ac_n "(cached) $ac_c" 1>&6
2234 else
2235 cat > conftest.$ac_ext <<EOF
2236 #line 2237 "configure"
2237 #include "confdefs.h"
2238 #include <sys/dg_sys_info.h>
2240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2241 { (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2242 ac_err=`grep -v '^ *+' conftest.out`
2243 if test -z "$ac_err"; then
2244 rm -rf conftest*
2245 eval "ac_cv_header_$ac_safe=yes"
2246 else
2247 echo "$ac_err" >&5
2248 rm -rf conftest*
2249 eval "ac_cv_header_$ac_safe=no"
2251 rm -f conftest*
2253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2254 echo "$ac_t""yes" 1>&6
2255 ac_have_func=yes; cat >> confdefs.h <<\EOF
2256 #define DGUX 1
2259 echo $ac_n "checking for -ldgc""... $ac_c" 1>&6
2260 ac_lib_var=`echo dgc'_'dg_sys_info | tr './+\055' '__p_'`
2261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2262 echo $ac_n "(cached) $ac_c" 1>&6
2263 else
2264 ac_save_LIBS="$LIBS"
2265 LIBS="-ldgc $LIBS"
2266 cat > conftest.$ac_ext <<EOF
2267 #line 2268 "configure"
2268 #include "confdefs.h"
2269 /* Override any gcc2 internal prototype to avoid an error. */
2270 /* We use char because int might match the return type of a gcc2
2271 builtin and then its argument prototype would still apply. */
2272 char dg_sys_info();
2274 int main() { return 0; }
2275 int t() {
2276 dg_sys_info()
2277 ; return 0; }
2279 if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2280 rm -rf conftest*
2281 eval "ac_cv_lib_$ac_lib_var=yes"
2282 else
2283 rm -rf conftest*
2284 eval "ac_cv_lib_$ac_lib_var=no"
2286 rm -f conftest*
2287 LIBS="$ac_save_LIBS"
2290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2291 echo "$ac_t""yes" 1>&6
2292 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2293 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2294 cat >> confdefs.h <<EOF
2295 #define $ac_tr_lib 1
2298 LIBS="-ldgc $LIBS"
2300 else
2301 echo "$ac_t""no" 1>&6
2304 else
2305 echo "$ac_t""no" 1>&6
2309 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
2310 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
2311 # Irix 4.0.5F has the header but not the library.
2312 if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
2313 ac_have_func=yes; cat >> confdefs.h <<\EOF
2314 #define SVR4 1
2319 if test $ac_have_func = no; then
2320 ac_safe=`echo "inq_stats/cpustats.h" | tr './\055' '___'`
2321 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
2322 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2323 echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325 cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <inq_stats/cpustats.h>
2330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2331 { (eval echo configure:2332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2332 ac_err=`grep -v '^ *+' conftest.out`
2333 if test -z "$ac_err"; then
2334 rm -rf conftest*
2335 eval "ac_cv_header_$ac_safe=yes"
2336 else
2337 echo "$ac_err" >&5
2338 rm -rf conftest*
2339 eval "ac_cv_header_$ac_safe=no"
2341 rm -f conftest*
2343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2344 echo "$ac_t""yes" 1>&6
2345 ac_have_func=yes; cat >> confdefs.h <<\EOF
2346 #define UMAX 1
2349 cat >> confdefs.h <<\EOF
2350 #define UMAX4_3 1
2353 else
2354 echo "$ac_t""no" 1>&6
2359 if test $ac_have_func = no; then
2360 ac_safe=`echo "sys/cpustats.h" | tr './\055' '___'`
2361 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
2362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2363 echo $ac_n "(cached) $ac_c" 1>&6
2364 else
2365 cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 #include <sys/cpustats.h>
2370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2371 { (eval echo configure:2372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2372 ac_err=`grep -v '^ *+' conftest.out`
2373 if test -z "$ac_err"; then
2374 rm -rf conftest*
2375 eval "ac_cv_header_$ac_safe=yes"
2376 else
2377 echo "$ac_err" >&5
2378 rm -rf conftest*
2379 eval "ac_cv_header_$ac_safe=no"
2381 rm -f conftest*
2383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2384 echo "$ac_t""yes" 1>&6
2385 ac_have_func=yes; cat >> confdefs.h <<\EOF
2386 #define UMAX 1
2389 else
2390 echo "$ac_t""no" 1>&6
2395 if test $ac_have_func = no; then
2396 for ac_hdr in mach/mach.h
2398 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2399 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2401 echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403 cat > conftest.$ac_ext <<EOF
2404 #line 2405 "configure"
2405 #include "confdefs.h"
2406 #include <$ac_hdr>
2408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2409 { (eval echo configure:2410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2410 ac_err=`grep -v '^ *+' conftest.out`
2411 if test -z "$ac_err"; then
2412 rm -rf conftest*
2413 eval "ac_cv_header_$ac_safe=yes"
2414 else
2415 echo "$ac_err" >&5
2416 rm -rf conftest*
2417 eval "ac_cv_header_$ac_safe=no"
2419 rm -f conftest*
2421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2422 echo "$ac_t""yes" 1>&6
2423 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2424 cat >> confdefs.h <<EOF
2425 #define $ac_tr_hdr 1
2428 else
2429 echo "$ac_t""no" 1>&6
2431 done
2435 ac_safe=`echo "nlist.h" | tr './\055' '___'`
2436 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
2437 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2438 echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440 cat > conftest.$ac_ext <<EOF
2441 #line 2442 "configure"
2442 #include "confdefs.h"
2443 #include <nlist.h>
2445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2446 { (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2447 ac_err=`grep -v '^ *+' conftest.out`
2448 if test -z "$ac_err"; then
2449 rm -rf conftest*
2450 eval "ac_cv_header_$ac_safe=yes"
2451 else
2452 echo "$ac_err" >&5
2453 rm -rf conftest*
2454 eval "ac_cv_header_$ac_safe=no"
2456 rm -f conftest*
2458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2459 echo "$ac_t""yes" 1>&6
2460 cat >> confdefs.h <<\EOF
2461 #define NLIST_STRUCT 1
2464 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
2465 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
2466 echo $ac_n "(cached) $ac_c" 1>&6
2467 else
2468 cat > conftest.$ac_ext <<EOF
2469 #line 2470 "configure"
2470 #include "confdefs.h"
2471 #include <nlist.h>
2472 int main() { return 0; }
2473 int t() {
2474 struct nlist n; n.n_un.n_name = 0;
2475 ; return 0; }
2477 if { (eval echo configure:2478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2478 rm -rf conftest*
2479 ac_cv_struct_nlist_n_un=yes
2480 else
2481 rm -rf conftest*
2482 ac_cv_struct_nlist_n_un=no
2484 rm -f conftest*
2488 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
2489 if test $ac_cv_struct_nlist_n_un = yes; then
2490 cat >> confdefs.h <<\EOF
2491 #define NLIST_NAME_UNION 1
2496 else
2497 echo "$ac_t""no" 1>&6
2499 fi # Do not have getloadavg in system libraries.
2501 # Some definitions of getloadavg require that the program be installed setgid.
2502 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
2503 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
2504 echo $ac_n "(cached) $ac_c" 1>&6
2505 else
2506 cat > conftest.$ac_ext <<EOF
2507 #line 2508 "configure"
2508 #include "confdefs.h"
2509 #include "$srcdir/getloadavg.c"
2510 #ifdef LDAV_PRIVILEGED
2511 Yowza Am I SETGID yet
2512 #endif
2514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2515 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
2516 rm -rf conftest*
2517 ac_cv_func_getloadavg_setgid=yes
2518 else
2519 rm -rf conftest*
2520 ac_cv_func_getloadavg_setgid=no
2522 rm -f conftest*
2526 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
2527 if test $ac_cv_func_getloadavg_setgid = yes; then
2528 NEED_SETGID=true; cat >> confdefs.h <<\EOF
2529 #define GETLOADAVG_PRIVILEGED 1
2532 else
2533 NEED_SETGID=false
2536 if test $ac_cv_func_getloadavg_setgid = yes; then
2537 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
2538 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
2539 echo $ac_n "(cached) $ac_c" 1>&6
2540 else
2541 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
2542 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
2543 # If we got an error (system does not support symlinks), try without -L.
2544 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
2545 ac_cv_group_kmem=`echo $ac_ls_output \
2546 | sed -ne 's/[ ][ ]*/ /g;
2547 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
2548 / /s/.* //;p;'`
2552 echo "$ac_t""$ac_cv_group_kmem" 1>&6
2553 KMEM_GROUP=$ac_cv_group_kmem
2556 echo $ac_n "checking for strcoll""... $ac_c" 1>&6
2557 if eval "test \"`echo '$''{'ac_cv_func_strcoll'+set}'`\" = set"; then
2558 echo $ac_n "(cached) $ac_c" 1>&6
2559 else
2560 if test "$cross_compiling" = yes; then
2561 ac_cv_func_strcoll=no
2562 else
2563 cat > conftest.$ac_ext <<EOF
2564 #line 2565 "configure"
2565 #include "confdefs.h"
2566 #include <string.h>
2567 main ()
2569 exit (strcoll ("abc", "def") >= 0 ||
2570 strcoll ("ABC", "DEF") >= 0 ||
2571 strcoll ("123", "456") >= 0);
2574 { (eval echo configure:2575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2575 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2576 ac_cv_func_strcoll=yes
2577 else
2578 ac_cv_func_strcoll=no
2581 rm -fr conftest*
2584 echo "$ac_t""$ac_cv_func_strcoll" 1>&6
2585 if test $ac_cv_func_strcoll = yes; then
2586 cat >> confdefs.h <<\EOF
2587 #define HAVE_STRCOLL 1
2593 # Check out the wait reality.
2594 for ac_hdr in sys/wait.h
2596 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2598 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2599 echo $ac_n "(cached) $ac_c" 1>&6
2600 else
2601 cat > conftest.$ac_ext <<EOF
2602 #line 2603 "configure"
2603 #include "confdefs.h"
2604 #include <$ac_hdr>
2606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2607 { (eval echo configure:2608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2608 ac_err=`grep -v '^ *+' conftest.out`
2609 if test -z "$ac_err"; then
2610 rm -rf conftest*
2611 eval "ac_cv_header_$ac_safe=yes"
2612 else
2613 echo "$ac_err" >&5
2614 rm -rf conftest*
2615 eval "ac_cv_header_$ac_safe=no"
2617 rm -f conftest*
2619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2620 echo "$ac_t""yes" 1>&6
2621 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2622 cat >> confdefs.h <<EOF
2623 #define $ac_tr_hdr 1
2626 else
2627 echo "$ac_t""no" 1>&6
2629 done
2630 for ac_func in waitpid wait3
2632 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2633 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2634 echo $ac_n "(cached) $ac_c" 1>&6
2635 else
2636 cat > conftest.$ac_ext <<EOF
2637 #line 2638 "configure"
2638 #include "confdefs.h"
2639 /* System header to define __stub macros and hopefully few prototypes,
2640 which can conflict with char $ac_func(); below. */
2641 #include <assert.h>
2642 /* Override any gcc2 internal prototype to avoid an error. */
2643 /* We use char because int might match the return type of a gcc2
2644 builtin and then its argument prototype would still apply. */
2645 char $ac_func();
2647 int main() { return 0; }
2648 int t() {
2650 /* The GNU C library defines this for functions which it implements
2651 to always fail with ENOSYS. Some functions are actually named
2652 something starting with __ and the normal name is an alias. */
2653 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2654 choke me
2655 #else
2656 $ac_func();
2657 #endif
2659 ; return 0; }
2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2662 rm -rf conftest*
2663 eval "ac_cv_func_$ac_func=yes"
2664 else
2665 rm -rf conftest*
2666 eval "ac_cv_func_$ac_func=no"
2668 rm -f conftest*
2671 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2672 echo "$ac_t""yes" 1>&6
2673 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2674 cat >> confdefs.h <<EOF
2675 #define $ac_tr_func 1
2678 else
2679 echo "$ac_t""no" 1>&6
2681 done
2683 echo $ac_n "checking for union wait""... $ac_c" 1>&6
2684 if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then
2685 echo $ac_n "(cached) $ac_c" 1>&6
2686 else
2687 cat > conftest.$ac_ext <<EOF
2688 #line 2689 "configure"
2689 #include "confdefs.h"
2690 #include <sys/types.h>
2691 #include <sys/wait.h>
2692 int main() { return 0; }
2693 int t() {
2694 union wait status; int pid; pid = wait (&status);
2695 #ifdef WEXITSTATUS
2696 /* Some POSIXoid systems have both the new-style macros and the old
2697 union wait type, and they do not work together. If union wait
2698 conflicts with WEXITSTATUS et al, we don't want to use it at all. */
2699 if (WEXITSTATUS (status) != 0) pid = -1;
2700 #ifdef WTERMSIG
2701 /* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
2702 -- blow chunks here --
2703 #endif
2704 #endif
2705 #ifdef HAVE_WAITPID
2706 /* Make sure union wait works with waitpid. */
2707 pid = waitpid (-1, &status, 0);
2708 #endif
2710 ; return 0; }
2712 if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2713 rm -rf conftest*
2714 make_cv_union_wait=yes
2715 else
2716 rm -rf conftest*
2717 make_cv_union_wait=no
2719 rm -f conftest*
2723 if test "$make_cv_union_wait" = yes; then
2724 cat >> confdefs.h <<\EOF
2725 #define HAVE_UNION_WAIT 1
2729 echo "$ac_t""$make_cv_union_wait" 1>&6
2731 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2732 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2733 echo $ac_n "(cached) $ac_c" 1>&6
2734 else
2735 cat > conftest.$ac_ext <<EOF
2736 #line 2737 "configure"
2737 #include "confdefs.h"
2738 #include <sys/types.h>
2739 #include <signal.h>
2740 /* NetBSD declares sys_siglist in unistd.h. */
2741 #ifdef HAVE_UNISTD_H
2742 #include <unistd.h>
2743 #endif
2744 int main() { return 0; }
2745 int t() {
2746 char *msg = *(sys_siglist + 1);
2747 ; return 0; }
2749 if { (eval echo configure:2750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2750 rm -rf conftest*
2751 ac_cv_decl_sys_siglist=yes
2752 else
2753 rm -rf conftest*
2754 ac_cv_decl_sys_siglist=no
2756 rm -f conftest*
2760 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2761 if test $ac_cv_decl_sys_siglist = yes; then
2762 cat >> confdefs.h <<\EOF
2763 #define SYS_SIGLIST_DECLARED 1
2769 # The presence of the following is not meant to imply
2770 # that make necessarily works on those systems.
2771 echo $ac_n "checking for -lsun""... $ac_c" 1>&6
2772 ac_lib_var=`echo sun'_'getpwnam | tr './+\055' '__p_'`
2773 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2774 echo $ac_n "(cached) $ac_c" 1>&6
2775 else
2776 ac_save_LIBS="$LIBS"
2777 LIBS="-lsun $LIBS"
2778 cat > conftest.$ac_ext <<EOF
2779 #line 2780 "configure"
2780 #include "confdefs.h"
2781 /* Override any gcc2 internal prototype to avoid an error. */
2782 /* We use char because int might match the return type of a gcc2
2783 builtin and then its argument prototype would still apply. */
2784 char getpwnam();
2786 int main() { return 0; }
2787 int t() {
2788 getpwnam()
2789 ; return 0; }
2791 if { (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2792 rm -rf conftest*
2793 eval "ac_cv_lib_$ac_lib_var=yes"
2794 else
2795 rm -rf conftest*
2796 eval "ac_cv_lib_$ac_lib_var=no"
2798 rm -f conftest*
2799 LIBS="$ac_save_LIBS"
2802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2803 echo "$ac_t""yes" 1>&6
2804 ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2805 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2806 cat >> confdefs.h <<EOF
2807 #define $ac_tr_lib 1
2810 LIBS="-lsun $LIBS"
2812 else
2813 echo "$ac_t""no" 1>&6
2817 REMOTE=stub
2818 # Check whether --with-customs or --without-customs was given.
2819 if test "${with_customs+set}" = set; then
2820 withval="$with_customs"
2821 REMOTE=cstms LIBS="$LIBS libcustoms.a"
2825 echo checking for location of SCCS get command
2826 if test -f /usr/sccs/get; then
2827 SCCS_GET=/usr/sccs/get
2828 cat >> confdefs.h <<\EOF
2829 #define SCCS_GET "/usr/sccs/get"
2832 else
2833 SCCS_GET=get
2834 cat >> confdefs.h <<\EOF
2835 #define SCCS_GET "get"
2839 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
2840 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
2841 test -f s.conftest; then
2842 # We successfully created an SCCS file.
2843 echo checking if SCCS get command understands -G
2844 if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
2845 test -f conftoast; then
2846 cat >> confdefs.h <<\EOF
2847 #define SCCS_GET_MINUS_G 1
2852 rm -f s.conftest conftoast
2854 trap '' 1 2 15
2855 cat > confcache <<\EOF
2856 # This file is a shell script that caches the results of configure
2857 # tests run on this system so they can be shared between configure
2858 # scripts and configure runs. It is not useful on other systems.
2859 # If it contains results you don't want to keep, you may remove or edit it.
2861 # By default, configure uses ./config.cache as the cache file,
2862 # creating it if it does not exist already. You can give configure
2863 # the --cache-file=FILE option to use a different cache file; that is
2864 # what configure does when it calls configure scripts in
2865 # subdirectories, so they share the cache.
2866 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2867 # config.status only pays attention to the cache file if you give it the
2868 # --recheck option to rerun configure.
2871 # Ultrix sh set writes to stderr and can't be redirected directly,
2872 # and sets the high bit in the cache file unless we assign to the vars.
2873 (set) 2>&1 |
2874 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2875 >> confcache
2876 if cmp -s $cache_file confcache; then
2878 else
2879 if test -w $cache_file; then
2880 echo "updating cache $cache_file"
2881 cat confcache > $cache_file
2882 else
2883 echo "not updating unwritable cache $cache_file"
2886 rm -f confcache
2888 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2890 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2891 # Let make expand exec_prefix.
2892 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2894 # Any assignment to VPATH causes Sun make to only execute
2895 # the first set of double-colon rules, so remove it if not needed.
2896 # If there is a colon in the path, we need to keep it.
2897 if test "x$srcdir" = x.; then
2898 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2901 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2903 DEFS=-DHAVE_CONFIG_H
2905 # Without the "./", some shells look in PATH for config.status.
2906 : ${CONFIG_STATUS=./config.status}
2908 echo creating $CONFIG_STATUS
2909 rm -f $CONFIG_STATUS
2910 cat > $CONFIG_STATUS <<EOF
2911 #! /bin/sh
2912 # Generated automatically by configure.
2913 # Run this file to recreate the current configuration.
2914 # This directory was configured as follows,
2915 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2917 # $0 $ac_configure_args
2919 # Compiler output produced by configure, useful for debugging
2920 # configure, is in ./config.log if it exists.
2922 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2923 for ac_option
2925 case "\$ac_option" in
2926 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2927 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2928 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2929 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2930 echo "$CONFIG_STATUS generated by autoconf version 2.10"
2931 exit 0 ;;
2932 -help | --help | --hel | --he | --h)
2933 echo "\$ac_cs_usage"; exit 0 ;;
2934 *) echo "\$ac_cs_usage"; exit 1 ;;
2935 esac
2936 done
2938 ac_given_srcdir=$srcdir
2939 ac_given_INSTALL="$INSTALL"
2941 trap 'rm -fr `echo "Makefile build.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2943 cat >> $CONFIG_STATUS <<EOF
2945 # Protect against being on the right side of a sed subst in config.status.
2946 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2947 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2948 $ac_vpsub
2949 $extrasub
2950 s%@CFLAGS@%$CFLAGS%g
2951 s%@CPPFLAGS@%$CPPFLAGS%g
2952 s%@CXXFLAGS@%$CXXFLAGS%g
2953 s%@DEFS@%$DEFS%g
2954 s%@LDFLAGS@%$LDFLAGS%g
2955 s%@LIBS@%$LIBS%g
2956 s%@exec_prefix@%$exec_prefix%g
2957 s%@prefix@%$prefix%g
2958 s%@program_transform_name@%$program_transform_name%g
2959 s%@bindir@%$bindir%g
2960 s%@sbindir@%$sbindir%g
2961 s%@libexecdir@%$libexecdir%g
2962 s%@datadir@%$datadir%g
2963 s%@sysconfdir@%$sysconfdir%g
2964 s%@sharedstatedir@%$sharedstatedir%g
2965 s%@localstatedir@%$localstatedir%g
2966 s%@libdir@%$libdir%g
2967 s%@includedir@%$includedir%g
2968 s%@oldincludedir@%$oldincludedir%g
2969 s%@infodir@%$infodir%g
2970 s%@mandir@%$mandir%g
2971 s%@subdirs@%$subdirs%g
2972 s%@SET_MAKE@%$SET_MAKE%g
2973 s%@CC@%$CC%g
2974 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2975 s%@INSTALL_DATA@%$INSTALL_DATA%g
2976 s%@CPP@%$CPP%g
2977 s%@LIBOBJS@%$LIBOBJS%g
2978 s%@ALLOCA@%$ALLOCA%g
2979 s%@NEED_SETGID@%$NEED_SETGID%g
2980 s%@KMEM_GROUP@%$KMEM_GROUP%g
2981 s%@REMOTE@%$REMOTE%g
2983 CEOF
2985 cat >> $CONFIG_STATUS <<EOF
2987 CONFIG_FILES=\${CONFIG_FILES-"Makefile build.sh"}
2989 cat >> $CONFIG_STATUS <<\EOF
2990 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2991 # Support "outfile[:infile]", defaulting infile="outfile.in".
2992 case "$ac_file" in
2993 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2994 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2995 *) ac_file_in="${ac_file}.in" ;;
2996 esac
2998 # Adjust relative srcdir, etc. for subdirectories.
3000 # Remove last slash and all that follows it. Not all systems have dirname.
3001 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3002 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3003 # The file is in a subdirectory.
3004 test ! -d "$ac_dir" && mkdir "$ac_dir"
3005 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3006 # A "../" for each directory in $ac_dir_suffix.
3007 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3008 else
3009 ac_dir_suffix= ac_dots=
3012 case "$ac_given_srcdir" in
3013 .) srcdir=.
3014 if test -z "$ac_dots"; then top_srcdir=.
3015 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3016 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3017 *) # Relative path.
3018 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3019 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3020 esac
3022 case "$ac_given_INSTALL" in
3023 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3024 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3025 esac
3026 echo creating "$ac_file"
3027 rm -f "$ac_file"
3028 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3029 case "$ac_file" in
3030 *Makefile*) ac_comsub="1i\\
3031 # $configure_input" ;;
3032 *) ac_comsub= ;;
3033 esac
3034 sed -e "$ac_comsub
3035 s%@configure_input@%$configure_input%g
3036 s%@srcdir@%$srcdir%g
3037 s%@top_srcdir@%$top_srcdir%g
3038 s%@INSTALL@%$INSTALL%g
3039 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3040 fi; done
3041 rm -f conftest.subs
3043 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3044 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3046 # ac_d sets the value in "#define NAME VALUE" lines.
3047 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3048 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3049 ac_dC='\3'
3050 ac_dD='%g'
3051 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3052 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3053 ac_uB='\([ ]\)%\1#\2define\3'
3054 ac_uC=' '
3055 ac_uD='\4%g'
3056 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3057 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3058 ac_eB='$%\1#\2define\3'
3059 ac_eC=' '
3060 ac_eD='%g'
3062 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
3063 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3064 # Support "outfile[:infile]", defaulting infile="outfile.in".
3065 case "$ac_file" in
3066 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3067 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3068 *) ac_file_in="${ac_file}.in" ;;
3069 esac
3071 echo creating $ac_file
3073 rm -f conftest.frag conftest.in conftest.out
3074 cp $ac_given_srcdir/$ac_file_in conftest.in
3078 # Transform confdefs.h into a sed script conftest.vals that substitutes
3079 # the proper values into config.h.in to produce config.h. And first:
3080 # Protect against being on the right side of a sed subst in config.status.
3081 # Protect against being in an unquoted here document in config.status.
3082 rm -f conftest.vals
3083 cat > conftest.hdr <<\EOF
3084 s/[\\&%]/\\&/g
3085 s%[\\$`]%\\&%g
3086 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3087 s%ac_d%ac_u%gp
3088 s%ac_u%ac_e%gp
3090 sed -n -f conftest.hdr confdefs.h > conftest.vals
3091 rm -f conftest.hdr
3093 # This sed command replaces #undef with comments. This is necessary, for
3094 # example, in the case of _POSIX_SOURCE, which is predefined and required
3095 # on some systems where configure will not decide to define it.
3096 cat >> conftest.vals <<\EOF
3097 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3100 # Break up conftest.vals because some shells have a limit on
3101 # the size of here documents, and old seds have small limits too.
3102 # Maximum number of lines to put in a single here document.
3103 ac_max_here_lines=12
3105 rm -f conftest.tail
3106 while :
3108 ac_lines=`grep -c . conftest.vals`
3109 # grep -c gives empty output for an empty file on some AIX systems.
3110 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3111 # Write a limited-size here document to conftest.frag.
3112 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3113 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3114 echo 'CEOF
3115 sed -f conftest.frag conftest.in > conftest.out
3116 rm -f conftest.in
3117 mv conftest.out conftest.in
3118 ' >> $CONFIG_STATUS
3119 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3120 rm -f conftest.vals
3121 mv conftest.tail conftest.vals
3122 done
3123 rm -f conftest.vals
3125 cat >> $CONFIG_STATUS <<\EOF
3126 rm -f conftest.frag conftest.h
3127 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3128 cat conftest.in >> conftest.h
3129 rm -f conftest.in
3130 if cmp -s $ac_file conftest.h 2>/dev/null; then
3131 echo "$ac_file is unchanged"
3132 rm -f conftest.h
3133 else
3134 # Remove last slash and all that follows it. Not all systems have dirname.
3135 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3136 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3137 # The file is in a subdirectory.
3138 test ! -d "$ac_dir" && mkdir "$ac_dir"
3140 rm -f $ac_file
3141 mv conftest.h $ac_file
3143 fi; done
3147 # Makefile uses this timestamp file to know when to remake Makefile,
3148 # build.sh, and glob/Makefile.
3149 touch stamp-config
3150 exit 0
3152 chmod +x $CONFIG_STATUS
3153 rm -fr confdefs* $ac_clean_files
3154 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3156 if test "$no_recursion" != yes; then
3158 # Remove --cache-file and --srcdir arguments so they do not pile up.
3159 ac_sub_configure_args=
3160 ac_prev=
3161 for ac_arg in $ac_configure_args; do
3162 if test -n "$ac_prev"; then
3163 ac_prev=
3164 continue
3166 case "$ac_arg" in
3167 -cache-file | --cache-file | --cache-fil | --cache-fi \
3168 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3169 ac_prev=cache_file ;;
3170 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3171 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3174 ac_prev=srcdir ;;
3175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3177 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3178 esac
3179 done
3181 for ac_config_dir in glob; do
3183 # Do not complain, so a configure script can configure whichever
3184 # parts of a large source tree are present.
3185 if test ! -d $srcdir/$ac_config_dir; then
3186 continue
3189 echo configuring in $ac_config_dir
3191 case "$srcdir" in
3192 .) ;;
3194 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3195 else
3196 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3199 esac
3201 ac_popdir=`pwd`
3202 cd $ac_config_dir
3204 case "$srcdir" in
3205 .) # No --srcdir option. We are building in place.
3206 ac_sub_srcdir=$srcdir ;;
3207 /*) # Absolute path.
3208 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3209 *) # Relative path.
3210 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3211 esac
3213 # Check for guested configure; otherwise get Cygnus style configure.
3214 if test -f $ac_sub_srcdir/configure; then
3215 ac_sub_configure=$ac_sub_srcdir/configure
3216 elif test -f $ac_sub_srcdir/configure.in; then
3217 ac_sub_configure=$ac_configure
3218 else
3219 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3220 ac_sub_configure=
3223 # The recursion is here.
3224 if test -n "$ac_sub_configure"; then
3226 # Make the cache file name correct relative to the subdirectory.
3227 # A "../" for each directory in /$ac_config_dir.
3228 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3229 case "$cache_file" in
3230 /*) ac_sub_cache_file=$cache_file ;;
3231 *) # Relative path.
3232 ac_sub_cache_file="$ac_dots$cache_file" ;;
3233 esac
3234 case "$ac_given_INSTALL" in
3235 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3236 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3237 esac
3239 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3240 # The eval makes quoting arguments work.
3241 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3242 then :
3243 else
3244 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3248 cd $ac_popdir
3249 done