Sat Jun 22 14:56:05 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[make.git] / configure
blob3ff349c787d150e5316f5942cf61b82a8126f27e
1 #! /bin/sh
3 # From configure.in Id: configure.in,v 1.50 1995/12/14 07:18:09 roland Exp
4 # Guess values for system-dependent variables and create Makefiles.
5 # Generated automatically using autoconf version 2.5
6 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Defaults:
12 ac_help=
13 ac_default_prefix=/usr/local
14 # Any additions from configure.in:
15 ac_help="$ac_help
16 export jobs with the Customs daemon (NOT SUPPORTED)"
18 # Initialize some variables set by options.
19 # The variables have the same names as the options, with
20 # dashes changed to underlines.
21 build=NONE
22 cache_file=./config.cache
23 exec_prefix=NONE
24 host=NONE
25 no_create=
26 nonopt=NONE
27 no_recursion=
28 prefix=NONE
29 program_prefix=NONE
30 program_suffix=NONE
31 program_transform_name=s,x,x,
32 silent=
33 site=
34 srcdir=
35 target=NONE
36 verbose=
37 x_includes=NONE
38 x_libraries=NONE
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 [PREFIX/share]
155 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
156 --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com]
157 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
158 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
159 --includedir=DIR C header files in DIR [PREFIX/include]
160 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
161 --infodir=DIR info documentation in DIR [PREFIX/info]
162 --mandir=DIR man documentation in DIR [PREFIX/man]
163 --srcdir=DIR find the sources in DIR [configure dir or ..]
164 --program-prefix=PREFIX prepend PREFIX to installed program names
165 --program-suffix=SUFFIX append SUFFIX to installed program names
166 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
168 cat << EOF
169 Host type:
170 --build=BUILD configure for building on BUILD [BUILD=HOST]
171 --host=HOST configure for HOST [guessed]
172 --target=TARGET configure for TARGET [TARGET=HOST]
173 Features and packages:
174 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
175 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
176 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
177 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
178 --x-includes=DIR X include files are in DIR
179 --x-libraries=DIR X library files are in DIR
180 --enable and --with options recognized:$ac_help
182 exit 0 ;;
184 -host | --host | --hos | --ho)
185 ac_prev=host ;;
186 -host=* | --host=* | --hos=* | --ho=*)
187 host="$ac_optarg" ;;
189 -includedir | --includedir | --includedi | --included | --include \
190 | --includ | --inclu | --incl | --inc)
191 ac_prev=includedir ;;
192 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
193 | --includ=* | --inclu=* | --incl=* | --inc=*)
194 includedir="$ac_optarg" ;;
196 -infodir | --infodir | --infodi | --infod | --info | --inf)
197 ac_prev=infodir ;;
198 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
199 infodir="$ac_optarg" ;;
201 -libdir | --libdir | --libdi | --libd)
202 ac_prev=libdir ;;
203 -libdir=* | --libdir=* | --libdi=* | --libd=*)
204 libdir="$ac_optarg" ;;
206 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
207 | --libexe | --libex | --libe)
208 ac_prev=libexecdir ;;
209 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
210 | --libexe=* | --libex=* | --libe=*)
211 libexecdir="$ac_optarg" ;;
213 -localstatedir | --localstatedir | --localstatedi | --localstated \
214 | --localstate | --localstat | --localsta | --localst \
215 | --locals | --local | --loca | --loc | --lo)
216 ac_prev=localstatedir ;;
217 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
218 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
219 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
220 localstatedir="$ac_optarg" ;;
222 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
223 ac_prev=mandir ;;
224 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
225 mandir="$ac_optarg" ;;
227 -nfp | --nfp | --nf)
228 # Obsolete; use --without-fp.
229 with_fp=no ;;
231 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
232 | --no-cr | --no-c)
233 no_create=yes ;;
235 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
236 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
237 no_recursion=yes ;;
239 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
240 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
241 | --oldin | --oldi | --old | --ol | --o)
242 ac_prev=oldincludedir ;;
243 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
244 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
245 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
246 oldincludedir="$ac_optarg" ;;
248 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
249 ac_prev=prefix ;;
250 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
251 prefix="$ac_optarg" ;;
253 -program-prefix | --program-prefix | --program-prefi | --program-pref \
254 | --program-pre | --program-pr | --program-p)
255 ac_prev=program_prefix ;;
256 -program-prefix=* | --program-prefix=* | --program-prefi=* \
257 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
258 program_prefix="$ac_optarg" ;;
260 -program-suffix | --program-suffix | --program-suffi | --program-suff \
261 | --program-suf | --program-su | --program-s)
262 ac_prev=program_suffix ;;
263 -program-suffix=* | --program-suffix=* | --program-suffi=* \
264 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
265 program_suffix="$ac_optarg" ;;
267 -program-transform-name | --program-transform-name \
268 | --program-transform-nam | --program-transform-na \
269 | --program-transform-n | --program-transform- \
270 | --program-transform | --program-transfor \
271 | --program-transfo | --program-transf \
272 | --program-trans | --program-tran \
273 | --progr-tra | --program-tr | --program-t)
274 ac_prev=program_transform_name ;;
275 -program-transform-name=* | --program-transform-name=* \
276 | --program-transform-nam=* | --program-transform-na=* \
277 | --program-transform-n=* | --program-transform-=* \
278 | --program-transform=* | --program-transfor=* \
279 | --program-transfo=* | --program-transf=* \
280 | --program-trans=* | --program-tran=* \
281 | --progr-tra=* | --program-tr=* | --program-t=*)
282 program_transform_name="$ac_optarg" ;;
284 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
285 | -silent | --silent | --silen | --sile | --sil)
286 silent=yes ;;
288 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
289 ac_prev=sbindir ;;
290 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
291 | --sbi=* | --sb=*)
292 sbindir="$ac_optarg" ;;
294 -sharedstatedir | --sharedstatedir | --sharedstatedi \
295 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
296 | --sharedst | --shareds | --shared | --share | --shar \
297 | --sha | --sh)
298 ac_prev=sharedstatedir ;;
299 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
300 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
301 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
302 | --sha=* | --sh=*)
303 sharedstatedir="$ac_optarg" ;;
305 -site | --site | --sit)
306 ac_prev=site ;;
307 -site=* | --site=* | --sit=*)
308 site="$ac_optarg" ;;
310 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
311 ac_prev=srcdir ;;
312 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
313 srcdir="$ac_optarg" ;;
315 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
316 | --syscon | --sysco | --sysc | --sys | --sy)
317 ac_prev=sysconfdir ;;
318 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
319 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
320 sysconfdir="$ac_optarg" ;;
322 -target | --target | --targe | --targ | --tar | --ta | --t)
323 ac_prev=target ;;
324 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
325 target="$ac_optarg" ;;
327 -v | -verbose | --verbose | --verbos | --verbo | --verb)
328 verbose=yes ;;
330 -version | --version | --versio | --versi | --vers)
331 echo "configure generated by autoconf version 2.5"
332 exit 0 ;;
334 -with-* | --with-*)
335 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
336 # Reject names that are not valid shell variable names.
337 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
338 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
340 ac_package=`echo $ac_package| sed 's/-/_/g'`
341 case "$ac_option" in
342 *=*) ;;
343 *) ac_optarg=yes ;;
344 esac
345 eval "with_${ac_package}='$ac_optarg'" ;;
347 -without-* | --without-*)
348 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
349 # Reject names that are not valid shell variable names.
350 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
351 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
353 ac_package=`echo $ac_package| sed 's/-/_/g'`
354 eval "with_${ac_package}=no" ;;
356 --x)
357 # Obsolete; use --with-x.
358 with_x=yes ;;
360 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
361 | --x-incl | --x-inc | --x-in | --x-i)
362 ac_prev=x_includes ;;
363 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
364 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
365 x_includes="$ac_optarg" ;;
367 -x-libraries | --x-libraries | --x-librarie | --x-librari \
368 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
369 ac_prev=x_libraries ;;
370 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
371 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
372 x_libraries="$ac_optarg" ;;
374 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
378 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
379 echo "configure: warning: $ac_option: invalid host type" 1>&2
381 if test "x$nonopt" != xNONE; then
382 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
384 nonopt="$ac_option"
387 esac
388 done
390 if test -n "$ac_prev"; then
391 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
394 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
396 # File descriptor usage:
397 # 0 standard input
398 # 1 file creation
399 # 2 errors and warnings
400 # 3 some systems may open it to /dev/tty
401 # 4 used on the Kubota Titan
402 # 6 checking for... messages and results
403 # 5 compiler messages saved in config.log
404 if test "$silent" = yes; then
405 exec 6>/dev/null
406 else
407 exec 6>&1
409 exec 5>./config.log
411 echo "\
412 This file contains any messages produced by compilers while
413 running configure, to aid debugging if configure makes a mistake.
414 " 1>&5
416 # Strip out --no-create and --no-recursion so they do not pile up.
417 # Also quote any args containing shell metacharacters.
418 ac_configure_args=
419 for ac_arg
421 case "$ac_arg" in
422 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
423 | --no-cr | --no-c) ;;
424 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
425 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
426 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
427 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
428 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
429 esac
430 done
432 # NLS nuisances.
433 # Only set LANG and LC_ALL to C if already set.
434 # These must not be set unconditionally because not all systems understand
435 # e.g. LANG=C (notably SCO).
436 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
437 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
439 # confdefs.h avoids OS command line length limits that DEFS can exceed.
440 rm -rf conftest* confdefs.h
441 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
442 echo > confdefs.h
444 # A filename unique to this package, relative to the directory that
445 # configure is in, which we can look for to find out if srcdir is correct.
446 ac_unique_file=vpath.c
448 # Find the source files, if location was not specified.
449 if test -z "$srcdir"; then
450 ac_srcdir_defaulted=yes
451 # Try the directory containing this script, then its parent.
452 ac_prog=$0
453 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
454 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
455 srcdir=$ac_confdir
456 if test ! -r $srcdir/$ac_unique_file; then
457 srcdir=..
459 else
460 ac_srcdir_defaulted=no
462 if test ! -r $srcdir/$ac_unique_file; then
463 if test "$ac_srcdir_defaulted" = yes; then
464 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
465 else
466 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
469 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
471 # Prefer explicitly selected file to automatically selected ones.
472 if test -z "$CONFIG_SITE"; then
473 if test "x$prefix" != xNONE; then
474 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
475 else
476 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
479 for ac_site_file in $CONFIG_SITE; do
480 if test -r "$ac_site_file"; then
481 echo "loading site script $ac_site_file"
482 . "$ac_site_file"
484 done
486 if test -r "$cache_file"; then
487 echo "loading cache $cache_file"
488 . $cache_file
489 else
490 echo "creating cache $cache_file"
491 > $cache_file
494 ac_ext=c
495 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
496 ac_cpp='echo $CPP $CPPFLAGS 1>&5;
497 $CPP $CPPFLAGS'
498 ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
499 ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
500 ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
501 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
503 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
504 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
505 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
506 ac_n= ac_c='
507 ' ac_t=' '
508 else
509 ac_n=-n ac_c= ac_t=
511 else
512 ac_n= ac_c='\c' ac_t=
516 ac_aux_dir=
517 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
518 if test -f $ac_dir/install-sh; then
519 ac_aux_dir=$ac_dir
520 ac_install_sh="$ac_aux_dir/install-sh -c"
521 break
522 elif test -f $ac_dir/install.sh; then
523 ac_aux_dir=$ac_dir
524 ac_install_sh="$ac_aux_dir/install.sh -c"
525 break
527 done
528 if test -z "$ac_aux_dir"; then
529 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
531 ac_config_guess=$ac_aux_dir/config.guess
532 ac_config_sub=$ac_aux_dir/config.sub
533 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
535 subdirs="glob"
537 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
538 set dummy ${MAKE-make}; ac_make=$2
539 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
540 echo $ac_n "(cached) $ac_c" 1>&6
541 else
542 cat > conftestmake <<\EOF
543 all:
544 @echo 'ac_maketemp="${MAKE}"'
546 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
547 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
548 if test -n "$ac_maketemp"; then
549 eval ac_cv_prog_make_${ac_make}_set=yes
550 else
551 eval ac_cv_prog_make_${ac_make}_set=no
553 rm -f conftestmake
555 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
556 echo "$ac_t""yes" 1>&6
557 SET_MAKE=
558 else
559 echo "$ac_t""no" 1>&6
560 SET_MAKE="MAKE=${MAKE-make}"
563 # Extract the first word of "gcc", so it can be a program name with args.
564 set dummy gcc; ac_word=$2
565 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
566 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
567 echo $ac_n "(cached) $ac_c" 1>&6
568 else
569 if test -n "$CC"; then
570 ac_cv_prog_CC="$CC" # Let the user override the test.
571 else
572 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
573 for ac_dir in $PATH; do
574 test -z "$ac_dir" && ac_dir=.
575 if test -f $ac_dir/$ac_word; then
576 ac_cv_prog_CC="gcc"
577 break
579 done
580 IFS="$ac_save_ifs"
581 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
584 CC="$ac_cv_prog_CC"
585 if test -n "$CC"; then
586 echo "$ac_t""$CC" 1>&6
587 else
588 echo "$ac_t""no" 1>&6
592 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
593 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
594 echo $ac_n "(cached) $ac_c" 1>&6
595 else
596 cat > conftest.c <<EOF
597 #ifdef __GNUC__
598 yes;
599 #endif
601 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
602 ac_cv_prog_gcc=yes
603 else
604 ac_cv_prog_gcc=no
608 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
609 if test $ac_cv_prog_gcc = yes; then
610 GCC=yes
611 if test "${CFLAGS+set}" != set; then
612 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
613 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
614 echo $ac_n "(cached) $ac_c" 1>&6
615 else
616 echo 'void f(){}' > conftest.c
617 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
618 ac_cv_prog_gcc_g=yes
619 else
620 ac_cv_prog_gcc_g=no
622 rm -f conftest*
626 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
627 if test $ac_cv_prog_gcc_g = yes; then
628 CFLAGS="-g -O"
629 else
630 CFLAGS="-O"
633 else
634 GCC=
635 test "${CFLAGS+set}" = set || CFLAGS="-g"
638 # Find a good install program. We prefer a C program (faster),
639 # so one script is as good as another. But avoid the broken or
640 # incompatible versions:
641 # SysV /etc/install, /usr/sbin/install
642 # SunOS /usr/etc/install
643 # IRIX /sbin/install
644 # AIX /bin/install
645 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
646 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
647 # ./install, which can be erroneously created by make from ./install.sh.
648 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
649 if test -z "$INSTALL"; then
650 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
651 echo $ac_n "(cached) $ac_c" 1>&6
652 else
653 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
654 for ac_dir in $PATH; do
655 # Account for people who put trailing slashes in PATH elements.
656 case "$ac_dir/" in
657 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
659 # OSF1 and SCO ODT 3.0 have their own names for install.
660 for ac_prog in ginstall installbsd scoinst install; do
661 if test -f $ac_dir/$ac_prog; then
662 if test $ac_prog = install &&
663 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
664 # AIX install. It has an incompatible calling convention.
665 # OSF/1 installbsd also uses dspmsg, but is usable.
667 else
668 ac_cv_path_install="$ac_dir/$ac_prog -c"
669 break 2
672 done
674 esac
675 done
676 IFS="$ac_save_ifs"
679 if test "${ac_cv_path_install+set}" = set; then
680 INSTALL="$ac_cv_path_install"
681 else
682 # As a last resort, use the slow shell script. We don't cache a
683 # path for INSTALL within a source directory, because that will
684 # break other packages using the cache if that directory is
685 # removed, or if the path is relative.
686 INSTALL="$ac_install_sh"
689 echo "$ac_t""$INSTALL" 1>&6
691 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
692 # It thinks the first close brace ends the variable substitution.
693 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
695 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
697 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
698 # On Suns, sometimes $CPP names a directory.
699 if test -n "$CPP" && test -d "$CPP"; then
700 CPP=
702 if test -z "$CPP"; then
703 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
704 echo $ac_n "(cached) $ac_c" 1>&6
705 else
706 # This must be in double quotes, not single quotes, because CPP may get
707 # substituted into the Makefile and "${CC-cc}" will confuse make.
708 CPP="${CC-cc} -E"
709 # On the NeXT, cc -E runs the code through the compiler's parser,
710 # not just through cpp.
711 cat > conftest.$ac_ext <<EOF
712 #line 713 "configure"
713 #include "confdefs.h"
714 #include <assert.h>
715 Syntax Error
717 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
718 ac_err=`grep -v '^ *+' conftest.out`
719 if test -z "$ac_err"; then
721 else
722 echo "$ac_err" >&5
723 rm -rf conftest*
724 CPP="${CC-cc} -E -traditional-cpp"
725 cat > conftest.$ac_ext <<EOF
726 #line 727 "configure"
727 #include "confdefs.h"
728 #include <assert.h>
729 Syntax Error
731 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
732 ac_err=`grep -v '^ *+' conftest.out`
733 if test -z "$ac_err"; then
735 else
736 echo "$ac_err" >&5
737 rm -rf conftest*
738 CPP=/lib/cpp
740 rm -f conftest*
742 rm -f conftest*
743 ac_cv_prog_CPP="$CPP"
745 CPP="$ac_cv_prog_CPP"
746 else
747 ac_cv_prog_CPP="$CPP"
749 echo "$ac_t""$CPP" 1>&6
750 echo $ac_n "checking for AIX""... $ac_c" 1>&6
751 cat > conftest.$ac_ext <<EOF
752 #line 753 "configure"
753 #include "confdefs.h"
754 #ifdef _AIX
756 #endif
759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
760 egrep "yes" >/dev/null 2>&1; then
761 rm -rf conftest*
762 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
763 #define _ALL_SOURCE 1
766 else
767 rm -rf conftest*
768 echo "$ac_t""no" 1>&6
770 rm -f conftest*
773 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
774 if test -d /etc/conf/kconfig.d &&
775 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
776 then
777 echo "$ac_t""yes" 1>&6
778 ISC=yes # If later tests want to check for ISC.
779 cat >> confdefs.h <<\EOF
780 #define _POSIX_SOURCE 1
783 if test "$GCC" = yes; then
784 CC="$CC -posix"
785 else
786 CC="$CC -Xp"
788 else
789 echo "$ac_t""no" 1>&6
790 ISC=
793 ac_safe=`echo "minix/config.h" | tr './\055' '___'`
794 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
795 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
796 echo $ac_n "(cached) $ac_c" 1>&6
797 else
798 cat > conftest.$ac_ext <<EOF
799 #line 800 "configure"
800 #include "confdefs.h"
801 #include <minix/config.h>
803 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
804 ac_err=`grep -v '^ *+' conftest.out`
805 if test -z "$ac_err"; then
806 rm -rf conftest*
807 eval "ac_cv_header_$ac_safe=yes"
808 else
809 echo "$ac_err" >&5
810 rm -rf conftest*
811 eval "ac_cv_header_$ac_safe=no"
813 rm -f conftest*
815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
816 echo "$ac_t""yes" 1>&6
817 MINIX=yes
818 else
819 echo "$ac_t""no" 1>&6
820 MINIX=
823 if test "$MINIX" = yes; then
824 cat >> confdefs.h <<\EOF
825 #define _POSIX_SOURCE 1
828 cat >> confdefs.h <<\EOF
829 #define _POSIX_1_SOURCE 2
832 cat >> confdefs.h <<\EOF
833 #define _MINIX 1
838 # If we cannot run a trivial program, we must be cross compiling.
839 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
840 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842 else
843 if test "$cross_compiling" = yes; then
844 ac_cv_c_cross=yes
845 else
846 cat > conftest.$ac_ext <<EOF
847 #line 848 "configure"
848 #include "confdefs.h"
849 main(){return(0);}
851 eval $ac_link
852 if test -s conftest && (./conftest; exit) 2>/dev/null; then
853 ac_cv_c_cross=no
854 else
855 ac_cv_c_cross=yes
858 rm -fr conftest*
861 echo "$ac_t""$ac_cv_c_cross" 1>&6
862 cross_compiling=$ac_cv_c_cross
864 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
865 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
866 echo $ac_n "(cached) $ac_c" 1>&6
867 else
868 cat > conftest.$ac_ext <<EOF
869 #line 870 "configure"
870 #include "confdefs.h"
871 #include <stdlib.h>
872 #include <stdarg.h>
873 #include <string.h>
874 #include <float.h>
876 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
877 ac_err=`grep -v '^ *+' conftest.out`
878 if test -z "$ac_err"; then
879 rm -rf conftest*
880 ac_cv_header_stdc=yes
881 else
882 echo "$ac_err" >&5
883 rm -rf conftest*
884 ac_cv_header_stdc=no
886 rm -f conftest*
888 if test $ac_cv_header_stdc = yes; then
889 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
890 cat > conftest.$ac_ext <<EOF
891 #line 892 "configure"
892 #include "confdefs.h"
893 #include <string.h>
895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
896 egrep "memchr" >/dev/null 2>&1; then
898 else
899 rm -rf conftest*
900 ac_cv_header_stdc=no
902 rm -f conftest*
906 if test $ac_cv_header_stdc = yes; then
907 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
908 cat > conftest.$ac_ext <<EOF
909 #line 910 "configure"
910 #include "confdefs.h"
911 #include <stdlib.h>
913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
914 egrep "free" >/dev/null 2>&1; then
916 else
917 rm -rf conftest*
918 ac_cv_header_stdc=no
920 rm -f conftest*
924 if test $ac_cv_header_stdc = yes; then
925 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
926 if test "$cross_compiling" = yes; then
927 ac_cv_header_stdc=no
928 else
929 cat > conftest.$ac_ext <<EOF
930 #line 931 "configure"
931 #include "confdefs.h"
932 #include <ctype.h>
933 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
934 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
935 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
936 int main () { int i; for (i = 0; i < 256; i++)
937 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
938 exit (0); }
941 eval $ac_link
942 if test -s conftest && (./conftest; exit) 2>/dev/null; then
944 else
945 ac_cv_header_stdc=no
948 rm -fr conftest*
952 echo "$ac_t""$ac_cv_header_stdc" 1>&6
953 if test $ac_cv_header_stdc = yes; then
954 cat >> confdefs.h <<\EOF
955 #define STDC_HEADERS 1
960 ac_header_dirent=no
961 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
963 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
964 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
965 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
966 echo $ac_n "(cached) $ac_c" 1>&6
967 else
968 cat > conftest.$ac_ext <<EOF
969 #line 970 "configure"
970 #include "confdefs.h"
971 #include <sys/types.h>
972 #include <$ac_hdr>
973 int main() { return 0; }
974 int t() {
975 DIR *dirp = 0;
976 ; return 0; }
978 if eval $ac_compile; then
979 rm -rf conftest*
980 eval "ac_cv_header_dirent_$ac_safe=yes"
981 else
982 rm -rf conftest*
983 eval "ac_cv_header_dirent_$ac_safe=no"
985 rm -f conftest*
988 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
989 echo "$ac_t""yes" 1>&6
990 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
991 cat >> confdefs.h <<EOF
992 #define $ac_tr_hdr 1
994 ac_header_dirent=$ac_hdr; break
995 else
996 echo "$ac_t""no" 1>&6
998 done
999 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1000 if test $ac_header_dirent = dirent.h; then
1001 echo $ac_n "checking for -ldir""... $ac_c" 1>&6
1002 ac_lib_var=`echo dir | tr './+' '__p'`
1003 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1004 echo $ac_n "(cached) $ac_c" 1>&6
1005 else
1006 ac_save_LIBS="$LIBS"
1007 LIBS="-ldir $LIBS"
1008 cat > conftest.$ac_ext <<EOF
1009 #line 1010 "configure"
1010 #include "confdefs.h"
1012 int main() { return 0; }
1013 int t() {
1014 opendir()
1015 ; return 0; }
1017 if eval $ac_link; then
1018 rm -rf conftest*
1019 eval "ac_cv_lib_$ac_lib_var=yes"
1020 else
1021 rm -rf conftest*
1022 eval "ac_cv_lib_$ac_lib_var=no"
1024 rm -f conftest*
1025 LIBS="$ac_save_LIBS"
1028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1029 echo "$ac_t""yes" 1>&6
1030 LIBS="$LIBS -ldir"
1031 else
1032 echo "$ac_t""no" 1>&6
1035 else
1036 echo $ac_n "checking for -lx""... $ac_c" 1>&6
1037 ac_lib_var=`echo x | tr './+' '__p'`
1038 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
1040 else
1041 ac_save_LIBS="$LIBS"
1042 LIBS="-lx $LIBS"
1043 cat > conftest.$ac_ext <<EOF
1044 #line 1045 "configure"
1045 #include "confdefs.h"
1047 int main() { return 0; }
1048 int t() {
1049 opendir()
1050 ; return 0; }
1052 if eval $ac_link; then
1053 rm -rf conftest*
1054 eval "ac_cv_lib_$ac_lib_var=yes"
1055 else
1056 rm -rf conftest*
1057 eval "ac_cv_lib_$ac_lib_var=no"
1059 rm -f conftest*
1060 LIBS="$ac_save_LIBS"
1063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1064 echo "$ac_t""yes" 1>&6
1065 LIBS="$LIBS -lx"
1066 else
1067 echo "$ac_t""no" 1>&6
1072 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1073 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1075 else
1076 cat > conftest.$ac_ext <<EOF
1077 #line 1078 "configure"
1078 #include "confdefs.h"
1079 #include <sys/types.h>
1081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1082 egrep "uid_t" >/dev/null 2>&1; then
1083 rm -rf conftest*
1084 ac_cv_type_uid_t=yes
1085 else
1086 rm -rf conftest*
1087 ac_cv_type_uid_t=no
1089 rm -f conftest*
1093 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1094 if test $ac_cv_type_uid_t = no; then
1095 cat >> confdefs.h <<\EOF
1096 #define uid_t int
1099 cat >> confdefs.h <<\EOF
1100 #define gid_t int
1104 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1105 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1106 echo $ac_n "(cached) $ac_c" 1>&6
1107 else
1108 cat > conftest.$ac_ext <<EOF
1109 #line 1110 "configure"
1110 #include "confdefs.h"
1111 #include <sys/types.h>
1112 #if STDC_HEADERS
1113 #include <stdlib.h>
1114 #endif
1116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1117 egrep "pid_t" >/dev/null 2>&1; then
1118 rm -rf conftest*
1119 ac_cv_type_pid_t=yes
1120 else
1121 rm -rf conftest*
1122 ac_cv_type_pid_t=no
1124 rm -f conftest*
1127 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1128 if test $ac_cv_type_pid_t = no; then
1129 cat >> confdefs.h <<\EOF
1130 #define pid_t int
1135 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1136 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1137 echo $ac_n "(cached) $ac_c" 1>&6
1138 else
1139 cat > conftest.$ac_ext <<EOF
1140 #line 1141 "configure"
1141 #include "confdefs.h"
1142 #include <sys/types.h>
1143 #include <signal.h>
1144 #ifdef signal
1145 #undef signal
1146 #endif
1147 #ifdef __cplusplus
1148 extern "C"
1149 #endif
1150 void (*signal ()) ();
1151 int main() { return 0; }
1152 int t() {
1153 int i;
1154 ; return 0; }
1156 if eval $ac_compile; then
1157 rm -rf conftest*
1158 ac_cv_type_signal=void
1159 else
1160 rm -rf conftest*
1161 ac_cv_type_signal=int
1163 rm -f conftest*
1167 echo "$ac_t""$ac_cv_type_signal" 1>&6
1168 cat >> confdefs.h <<EOF
1169 #define RETSIGTYPE $ac_cv_type_signal
1173 for ac_hdr in unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
1174 sys/timeb.h
1176 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1178 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1180 else
1181 cat > conftest.$ac_ext <<EOF
1182 #line 1183 "configure"
1183 #include "confdefs.h"
1184 #include <$ac_hdr>
1186 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1187 ac_err=`grep -v '^ *+' conftest.out`
1188 if test -z "$ac_err"; then
1189 rm -rf conftest*
1190 eval "ac_cv_header_$ac_safe=yes"
1191 else
1192 echo "$ac_err" >&5
1193 rm -rf conftest*
1194 eval "ac_cv_header_$ac_safe=no"
1196 rm -f conftest*
1198 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1199 echo "$ac_t""yes" 1>&6
1200 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1201 cat >> confdefs.h <<EOF
1202 #define $ac_tr_hdr 1
1205 else
1206 echo "$ac_t""no" 1>&6
1208 done
1210 if test "x$CC" != xcc; then
1211 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1212 else
1213 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1215 set dummy $CC; ac_cc="`echo $2 |
1216 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1217 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1218 echo $ac_n "(cached) $ac_c" 1>&6
1219 else
1220 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1221 echo 'foo(){}' > conftest.c
1222 # Make sure it works both with $CC and with simple cc.
1223 # We do the test twice because some compilers refuse to overwrite an
1224 # existing .o file with -o, though they will create one.
1225 if ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5 &&
1226 test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5
1227 then
1228 if test "x$CC" != xcc; then
1229 # Test first that cc exists at all.
1230 if cc -c conftest.c 1>&5 2>&5
1231 then
1232 if cc -c conftest.c -o conftest2.o 1>&5 2>&5 &&
1233 test -f conftest2.o && cc -c conftest.c -o conftest2.o 1>&5 2>&5
1234 then
1235 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1237 else
1238 # There is no cc, so we don't care about it.
1239 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1243 rm -f conftest*
1246 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1247 echo "$ac_t""yes" 1>&6
1248 else
1249 echo "$ac_t""no" 1>&6
1250 cat >> confdefs.h <<\EOF
1251 #define NO_MINUS_C_MINUS_O 1
1256 echo $ac_n "checking for working const""... $ac_c" 1>&6
1257 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1258 echo $ac_n "(cached) $ac_c" 1>&6
1259 else
1260 cat > conftest.$ac_ext <<EOF
1261 #line 1262 "configure"
1262 #include "confdefs.h"
1264 int main() { return 0; }
1265 int t() {
1267 /* Ultrix mips cc rejects this. */
1268 typedef int charset[2]; const charset x;
1269 /* SunOS 4.1.1 cc rejects this. */
1270 char const *const *ccp;
1271 char **p;
1272 /* NEC SVR4.0.2 mips cc rejects this. */
1273 struct point {int x, y;};
1274 static struct point const zero;
1275 /* AIX XL C 1.02.0.0 rejects this.
1276 It does not let you subtract one const X* pointer from another in an arm
1277 of an if-expression whose if-part is not a constant expression */
1278 const char *g = "string";
1279 ccp = &g + (g ? g-g : 0);
1280 /* HPUX 7.0 cc rejects these. */
1281 ++ccp;
1282 p = (char**) ccp;
1283 ccp = (char const *const *) p;
1284 { /* SCO 3.2v4 cc rejects this. */
1285 char *t;
1286 char const *s = 0 ? (char *) 0 : (char const *) 0;
1288 *t++ = 0;
1290 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1291 int x[] = {25, 17};
1292 const int *foo = &x[0];
1293 ++foo;
1295 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1296 typedef const int *iptr;
1297 iptr p = 0;
1298 ++p;
1300 { /* AIX XL C 1.02.0.0 rejects this saying
1301 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1302 struct s { int j; const int *ap[3]; };
1303 struct s *b; b->j = 5;
1305 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1306 const int foo = 10;
1309 ; return 0; }
1311 if eval $ac_compile; then
1312 rm -rf conftest*
1313 ac_cv_c_const=yes
1314 else
1315 rm -rf conftest*
1316 ac_cv_c_const=no
1318 rm -f conftest*
1322 echo "$ac_t""$ac_cv_c_const" 1>&6
1323 if test $ac_cv_c_const = no; then
1324 cat >> confdefs.h <<\EOF
1325 #define const
1329 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1330 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1331 echo $ac_n "(cached) $ac_c" 1>&6
1332 else
1333 cat > conftest.$ac_ext <<EOF
1334 #line 1335 "configure"
1335 #include "confdefs.h"
1336 #include <sys/types.h>
1337 #include <sys/stat.h>
1339 #if defined(S_ISBLK) && defined(S_IFDIR)
1340 # if S_ISBLK (S_IFDIR)
1341 You lose.
1342 # endif
1343 #endif
1345 #if defined(S_ISBLK) && defined(S_IFCHR)
1346 # if S_ISBLK (S_IFCHR)
1347 You lose.
1348 # endif
1349 #endif
1351 #if defined(S_ISLNK) && defined(S_IFREG)
1352 # if S_ISLNK (S_IFREG)
1353 You lose.
1354 # endif
1355 #endif
1357 #if defined(S_ISSOCK) && defined(S_IFREG)
1358 # if S_ISSOCK (S_IFREG)
1359 You lose.
1360 # endif
1361 #endif
1364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1365 egrep "You lose" >/dev/null 2>&1; then
1366 rm -rf conftest*
1367 ac_cv_header_stat_broken=yes
1368 else
1369 rm -rf conftest*
1370 ac_cv_header_stat_broken=no
1372 rm -f conftest*
1376 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1377 if test $ac_cv_header_stat_broken = yes; then
1378 cat >> confdefs.h <<\EOF
1379 #define STAT_MACROS_BROKEN 1
1388 for ac_func in psignal mktemp \
1389 dup2 getcwd sigsetmask getgroups setlinebuf \
1390 seteuid setegid setreuid setregid strerror strsignal
1392 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1393 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1394 echo $ac_n "(cached) $ac_c" 1>&6
1395 else
1396 cat > conftest.$ac_ext <<EOF
1397 #line 1398 "configure"
1398 #include "confdefs.h"
1399 /* System header to define __stub macros and hopefully few prototypes,
1400 which can conflict with char $ac_func(); below. */
1401 #include <assert.h>
1402 /* Override any gcc2 internal prototype to avoid an error. */
1403 char $ac_func();
1405 int main() { return 0; }
1406 int t() {
1408 /* The GNU C library defines this for functions which it implements
1409 to always fail with ENOSYS. Some functions are actually named
1410 something starting with __ and the normal name is an alias. */
1411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1412 choke me
1413 #else
1414 $ac_func();
1415 #endif
1417 ; return 0; }
1419 if eval $ac_link; then
1420 rm -rf conftest*
1421 eval "ac_cv_func_$ac_func=yes"
1422 else
1423 rm -rf conftest*
1424 eval "ac_cv_func_$ac_func=no"
1426 rm -f conftest*
1429 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1430 echo "$ac_t""yes" 1>&6
1431 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1432 cat >> confdefs.h <<EOF
1433 #define $ac_tr_func 1
1436 else
1437 echo "$ac_t""no" 1>&6
1439 done
1441 echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6
1442 if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; then
1443 echo $ac_n "(cached) $ac_c" 1>&6
1444 else
1445 cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1449 int main() { return 0; }
1450 int t() {
1451 extern char *sys_siglist[]; puts(*sys_siglist);
1452 ; return 0; }
1454 if eval $ac_link; then
1455 rm -rf conftest*
1456 ac_cv_check_symbol_sys_siglist=yes
1457 else
1458 rm -rf conftest*
1459 ac_cv_check_symbol_sys_siglist=no
1461 rm -f conftest*
1465 if test "$ac_cv_check_symbol_sys_siglist" = yes; then
1466 ac_tr_symbol=`echo sys_siglist | tr '[a-z]' '[A-Z]'`
1467 cat >> confdefs.h <<EOF
1468 #define HAVE_${ac_tr_symbol} 1
1472 echo "$ac_t""$ac_cv_check_symbol_sys_siglist" 1>&6
1473 echo $ac_n "checking for _sys_siglist""... $ac_c" 1>&6
1474 if eval "test \"`echo '$''{'ac_cv_check_symbol__sys_siglist'+set}'`\" = set"; then
1475 echo $ac_n "(cached) $ac_c" 1>&6
1476 else
1477 cat > conftest.$ac_ext <<EOF
1478 #line 1479 "configure"
1479 #include "confdefs.h"
1481 int main() { return 0; }
1482 int t() {
1483 extern char *_sys_siglist[]; puts(*_sys_siglist);
1484 ; return 0; }
1486 if eval $ac_link; then
1487 rm -rf conftest*
1488 ac_cv_check_symbol__sys_siglist=yes
1489 else
1490 rm -rf conftest*
1491 ac_cv_check_symbol__sys_siglist=no
1493 rm -f conftest*
1497 if test "$ac_cv_check_symbol__sys_siglist" = yes; then
1498 ac_tr_symbol=`echo _sys_siglist | tr '[a-z]' '[A-Z]'`
1499 cat >> confdefs.h <<EOF
1500 #define HAVE_${ac_tr_symbol} 1
1504 echo "$ac_t""$ac_cv_check_symbol__sys_siglist" 1>&6
1505 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1506 # for constant arguments. Useless!
1507 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1508 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1509 echo $ac_n "(cached) $ac_c" 1>&6
1510 else
1511 cat > conftest.$ac_ext <<EOF
1512 #line 1513 "configure"
1513 #include "confdefs.h"
1514 #include <alloca.h>
1515 int main() { return 0; }
1516 int t() {
1517 char *p = alloca(2 * sizeof(int));
1518 ; return 0; }
1520 if eval $ac_link; then
1521 rm -rf conftest*
1522 ac_cv_header_alloca_h=yes
1523 else
1524 rm -rf conftest*
1525 ac_cv_header_alloca_h=no
1527 rm -f conftest*
1531 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1532 if test $ac_cv_header_alloca_h = yes; then
1533 cat >> confdefs.h <<\EOF
1534 #define HAVE_ALLOCA_H 1
1539 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1540 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1541 echo $ac_n "(cached) $ac_c" 1>&6
1542 else
1543 cat > conftest.$ac_ext <<EOF
1544 #line 1545 "configure"
1545 #include "confdefs.h"
1547 #ifdef __GNUC__
1548 # define alloca __builtin_alloca
1549 #else
1550 # if HAVE_ALLOCA_H
1551 # include <alloca.h>
1552 # else
1553 # ifdef _AIX
1554 #pragma alloca
1555 # else
1556 # ifndef alloca /* predefined by HP cc +Olibcalls */
1557 char *alloca ();
1558 # endif
1559 # endif
1560 # endif
1561 #endif
1563 int main() { return 0; }
1564 int t() {
1565 char *p = (char *) alloca(1);
1566 ; return 0; }
1568 if eval $ac_link; then
1569 rm -rf conftest*
1570 ac_cv_func_alloca=yes
1571 else
1572 rm -rf conftest*
1573 ac_cv_func_alloca=no
1575 rm -f conftest*
1579 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1580 if test $ac_cv_func_alloca = yes; then
1581 cat >> confdefs.h <<\EOF
1582 #define HAVE_ALLOCA 1
1587 if test $ac_cv_func_alloca = no; then
1588 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1589 # that cause trouble. Some versions do not even contain alloca or
1590 # contain a buggy version. If you still want to use their alloca,
1591 # use ar to extract alloca.o from them instead of compiling alloca.c.
1592 ALLOCA=alloca.o
1593 cat >> confdefs.h <<\EOF
1594 #define C_ALLOCA 1
1598 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1599 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1600 echo $ac_n "(cached) $ac_c" 1>&6
1601 else
1602 cat > conftest.$ac_ext <<EOF
1603 #line 1604 "configure"
1604 #include "confdefs.h"
1605 #if defined(CRAY) && ! defined(CRAY2)
1606 webecray
1607 #else
1608 wenotbecray
1609 #endif
1612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1613 egrep "webecray" >/dev/null 2>&1; then
1614 rm -rf conftest*
1615 ac_cv_os_cray=yes
1616 else
1617 rm -rf conftest*
1618 ac_cv_os_cray=no
1620 rm -f conftest*
1624 echo "$ac_t""$ac_cv_os_cray" 1>&6
1625 if test $ac_cv_os_cray = yes; then
1626 for ac_func in _getb67 GETB67 getb67; do
1627 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1628 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1629 echo $ac_n "(cached) $ac_c" 1>&6
1630 else
1631 cat > conftest.$ac_ext <<EOF
1632 #line 1633 "configure"
1633 #include "confdefs.h"
1634 /* System header to define __stub macros and hopefully few prototypes,
1635 which can conflict with char $ac_func(); below. */
1636 #include <assert.h>
1637 /* Override any gcc2 internal prototype to avoid an error. */
1638 char $ac_func();
1640 int main() { return 0; }
1641 int t() {
1643 /* The GNU C library defines this for functions which it implements
1644 to always fail with ENOSYS. Some functions are actually named
1645 something starting with __ and the normal name is an alias. */
1646 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1647 choke me
1648 #else
1649 $ac_func();
1650 #endif
1652 ; return 0; }
1654 if eval $ac_link; then
1655 rm -rf conftest*
1656 eval "ac_cv_func_$ac_func=yes"
1657 else
1658 rm -rf conftest*
1659 eval "ac_cv_func_$ac_func=no"
1661 rm -f conftest*
1664 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1665 echo "$ac_t""yes" 1>&6
1666 cat >> confdefs.h <<EOF
1667 #define CRAY_STACKSEG_END $ac_func
1670 break
1671 else
1672 echo "$ac_t""no" 1>&6
1675 done
1678 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1679 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681 else
1682 if test "$cross_compiling" = yes; then
1683 ac_cv_c_stack_direction=0
1684 else
1685 cat > conftest.$ac_ext <<EOF
1686 #line 1687 "configure"
1687 #include "confdefs.h"
1688 find_stack_direction ()
1690 static char *addr = 0;
1691 auto char dummy;
1692 if (addr == 0)
1694 addr = &dummy;
1695 return find_stack_direction ();
1697 else
1698 return (&dummy > addr) ? 1 : -1;
1700 main ()
1702 exit (find_stack_direction() < 0);
1705 eval $ac_link
1706 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1707 ac_cv_c_stack_direction=1
1708 else
1709 ac_cv_c_stack_direction=-1
1712 rm -fr conftest*
1715 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1716 cat >> confdefs.h <<EOF
1717 #define STACK_DIRECTION $ac_cv_c_stack_direction
1722 ac_safe=`echo "vfork.h" | tr './\055' '___'`
1723 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
1724 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1725 echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727 cat > conftest.$ac_ext <<EOF
1728 #line 1729 "configure"
1729 #include "confdefs.h"
1730 #include <vfork.h>
1732 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1733 ac_err=`grep -v '^ *+' conftest.out`
1734 if test -z "$ac_err"; then
1735 rm -rf conftest*
1736 eval "ac_cv_header_$ac_safe=yes"
1737 else
1738 echo "$ac_err" >&5
1739 rm -rf conftest*
1740 eval "ac_cv_header_$ac_safe=no"
1742 rm -f conftest*
1744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1745 echo "$ac_t""yes" 1>&6
1746 cat >> confdefs.h <<\EOF
1747 #define HAVE_VFORK_H 1
1750 else
1751 echo "$ac_t""no" 1>&6
1754 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
1755 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1756 echo $ac_n "(cached) $ac_c" 1>&6
1757 else
1758 if test "$cross_compiling" = yes; then
1759 ac_cv_func_vfork=no
1760 else
1761 cat > conftest.$ac_ext <<EOF
1762 #line 1763 "configure"
1763 #include "confdefs.h"
1764 /* Thanks to Paul Eggert for this test. */
1765 #include <stdio.h>
1766 #include <sys/types.h>
1767 #include <sys/stat.h>
1768 #ifdef HAVE_UNISTD_H
1769 #include <unistd.h>
1770 #endif
1771 #ifdef HAVE_VFORK_H
1772 #include <vfork.h>
1773 #endif
1774 /* On some sparc systems, changes by the child to local and incoming
1775 argument registers are propagated back to the parent.
1776 The compiler is told about this with #include <vfork.h>,
1777 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
1778 Test for this by using a static variable whose address
1779 is put into a register that is clobbered by the vfork. */
1780 static
1781 #ifdef __cplusplus
1782 sparc_address_test (int arg)
1783 #else
1784 sparc_address_test (arg) int arg;
1785 #endif
1787 static pid_t child;
1788 if (!child) {
1789 child = vfork ();
1790 if (child < 0)
1791 perror ("vfork");
1792 if (!child) {
1793 arg = getpid();
1794 write(-1, "", 0);
1795 _exit (arg);
1799 main() {
1800 pid_t parent = getpid ();
1801 pid_t child;
1803 sparc_address_test ();
1805 child = vfork ();
1807 if (child == 0) {
1808 /* Here is another test for sparc vfork register problems.
1809 This test uses lots of local variables, at least
1810 as many local variables as main has allocated so far
1811 including compiler temporaries. 4 locals are enough for
1812 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
1813 A buggy compiler should reuse the register of parent
1814 for one of the local variables, since it will think that
1815 parent can't possibly be used any more in this routine.
1816 Assigning to the local variable will thus munge parent
1817 in the parent process. */
1818 pid_t
1819 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
1820 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
1821 /* Convince the compiler that p..p7 are live; otherwise, it might
1822 use the same hardware register for all 8 local variables. */
1823 if (p != p1 || p != p2 || p != p3 || p != p4
1824 || p != p5 || p != p6 || p != p7)
1825 _exit(1);
1827 /* On some systems (e.g. IRIX 3.3),
1828 vfork doesn't separate parent from child file descriptors.
1829 If the child closes a descriptor before it execs or exits,
1830 this munges the parent's descriptor as well.
1831 Test for this by closing stdout in the child. */
1832 _exit(close(fileno(stdout)) != 0);
1833 } else {
1834 int status;
1835 struct stat st;
1837 while (wait(&status) != child)
1839 exit(
1840 /* Was there some problem with vforking? */
1841 child < 0
1843 /* Did the child fail? (This shouldn't happen.) */
1844 || status
1846 /* Did the vfork/compiler bug occur? */
1847 || parent != getpid()
1849 /* Did the file descriptor bug occur? */
1850 || fstat(fileno(stdout), &st) != 0
1855 eval $ac_link
1856 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1857 ac_cv_func_vfork=yes
1858 else
1859 ac_cv_func_vfork=no
1862 rm -fr conftest*
1865 echo "$ac_t""$ac_cv_func_vfork" 1>&6
1866 if test $ac_cv_func_vfork = no; then
1867 cat >> confdefs.h <<\EOF
1868 #define vfork fork
1873 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
1874 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
1875 echo $ac_n "(cached) $ac_c" 1>&6
1876 else
1877 if test "$cross_compiling" = yes; then
1878 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1879 else
1880 cat > conftest.$ac_ext <<EOF
1881 #line 1882 "configure"
1882 #include "confdefs.h"
1883 #include <stdio.h>
1884 /* If setvbuf has the reversed format, exit 0. */
1885 main () {
1886 /* This call has the arguments reversed.
1887 A reversed system may check and see that the address of main
1888 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
1889 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
1890 exit(1);
1891 putc('\r', stdout);
1892 exit(0); /* Non-reversed systems segv here. */
1895 eval $ac_link
1896 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1897 ac_cv_func_setvbuf_reversed=yes
1898 else
1899 ac_cv_func_setvbuf_reversed=no
1902 rm -fr conftest*
1903 rm -f core core.* *.core
1906 echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
1907 if test $ac_cv_func_setvbuf_reversed = yes; then
1908 cat >> confdefs.h <<\EOF
1909 #define SETVBUF_REVERSED 1
1914 ac_have_func=no # yes means we've found a way to get the load average.
1916 # Some systems with -lutil have (and need) -lkvm as well, some do not.
1917 # On Solaris, -lkvm requires nlist from -lelf, so check that first
1918 # to get the right answer into the cache.
1919 echo $ac_n "checking for -lelf""... $ac_c" 1>&6
1920 ac_lib_var=`echo elf | tr './+' '__p'`
1921 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1922 echo $ac_n "(cached) $ac_c" 1>&6
1923 else
1924 ac_save_LIBS="$LIBS"
1925 LIBS="-lelf $LIBS"
1926 cat > conftest.$ac_ext <<EOF
1927 #line 1928 "configure"
1928 #include "confdefs.h"
1930 int main() { return 0; }
1931 int t() {
1932 elf_begin()
1933 ; return 0; }
1935 if eval $ac_link; then
1936 rm -rf conftest*
1937 eval "ac_cv_lib_$ac_lib_var=yes"
1938 else
1939 rm -rf conftest*
1940 eval "ac_cv_lib_$ac_lib_var=no"
1942 rm -f conftest*
1943 LIBS="$ac_save_LIBS"
1946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1947 echo "$ac_t""yes" 1>&6
1948 LIBS="-lelf $LIBS"
1949 else
1950 echo "$ac_t""no" 1>&6
1953 echo $ac_n "checking for -lkvm""... $ac_c" 1>&6
1954 ac_lib_var=`echo kvm | tr './+' '__p'`
1955 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1956 echo $ac_n "(cached) $ac_c" 1>&6
1957 else
1958 ac_save_LIBS="$LIBS"
1959 LIBS="-lkvm $LIBS"
1960 cat > conftest.$ac_ext <<EOF
1961 #line 1962 "configure"
1962 #include "confdefs.h"
1964 int main() { return 0; }
1965 int t() {
1966 kvm_open()
1967 ; return 0; }
1969 if eval $ac_link; then
1970 rm -rf conftest*
1971 eval "ac_cv_lib_$ac_lib_var=yes"
1972 else
1973 rm -rf conftest*
1974 eval "ac_cv_lib_$ac_lib_var=no"
1976 rm -f conftest*
1977 LIBS="$ac_save_LIBS"
1980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1981 echo "$ac_t""yes" 1>&6
1982 LIBS="-lkvm $LIBS"
1983 else
1984 echo "$ac_t""no" 1>&6
1987 # Check for the 4.4BSD definition of getloadavg.
1988 echo $ac_n "checking for -lutil""... $ac_c" 1>&6
1989 ac_lib_var=`echo util | tr './+' '__p'`
1990 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1991 echo $ac_n "(cached) $ac_c" 1>&6
1992 else
1993 ac_save_LIBS="$LIBS"
1994 LIBS="-lutil $LIBS"
1995 cat > conftest.$ac_ext <<EOF
1996 #line 1997 "configure"
1997 #include "confdefs.h"
1999 int main() { return 0; }
2000 int t() {
2001 getloadavg()
2002 ; return 0; }
2004 if eval $ac_link; then
2005 rm -rf conftest*
2006 eval "ac_cv_lib_$ac_lib_var=yes"
2007 else
2008 rm -rf conftest*
2009 eval "ac_cv_lib_$ac_lib_var=no"
2011 rm -f conftest*
2012 LIBS="$ac_save_LIBS"
2015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2016 echo "$ac_t""yes" 1>&6
2017 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
2018 else
2019 echo "$ac_t""no" 1>&6
2023 if test $ac_have_func = no; then
2024 # There is a commonly available library for RS/6000 AIX.
2025 # Since it is not a standard part of AIX, it might be installed locally.
2026 ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
2027 echo $ac_n "checking for -lgetloadavg""... $ac_c" 1>&6
2028 ac_lib_var=`echo getloadavg | tr './+' '__p'`
2029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2030 echo $ac_n "(cached) $ac_c" 1>&6
2031 else
2032 ac_save_LIBS="$LIBS"
2033 LIBS="-lgetloadavg $LIBS"
2034 cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2038 int main() { return 0; }
2039 int t() {
2040 getloadavg()
2041 ; return 0; }
2043 if eval $ac_link; then
2044 rm -rf conftest*
2045 eval "ac_cv_lib_$ac_lib_var=yes"
2046 else
2047 rm -rf conftest*
2048 eval "ac_cv_lib_$ac_lib_var=no"
2050 rm -f conftest*
2051 LIBS="$ac_save_LIBS"
2054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2055 echo "$ac_t""yes" 1>&6
2056 LIBS="-lgetloadavg $LIBS"
2057 else
2058 echo "$ac_t""no" 1>&6
2059 LIBS="$ac_save_LIBS"
2064 # Make sure it is really in the library, if we think we found it.
2065 for ac_func in getloadavg
2067 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2068 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2069 echo $ac_n "(cached) $ac_c" 1>&6
2070 else
2071 cat > conftest.$ac_ext <<EOF
2072 #line 2073 "configure"
2073 #include "confdefs.h"
2074 /* System header to define __stub macros and hopefully few prototypes,
2075 which can conflict with char $ac_func(); below. */
2076 #include <assert.h>
2077 /* Override any gcc2 internal prototype to avoid an error. */
2078 char $ac_func();
2080 int main() { return 0; }
2081 int t() {
2083 /* The GNU C library defines this for functions which it implements
2084 to always fail with ENOSYS. Some functions are actually named
2085 something starting with __ and the normal name is an alias. */
2086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2087 choke me
2088 #else
2089 $ac_func();
2090 #endif
2092 ; return 0; }
2094 if eval $ac_link; then
2095 rm -rf conftest*
2096 eval "ac_cv_func_$ac_func=yes"
2097 else
2098 rm -rf conftest*
2099 eval "ac_cv_func_$ac_func=no"
2101 rm -f conftest*
2104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2105 echo "$ac_t""yes" 1>&6
2107 else
2108 echo "$ac_t""no" 1>&6
2109 LIBOBJS="$LIBOBJS ${ac_func}.o"
2112 done
2115 if test $ac_cv_func_getloadavg = yes; then
2116 cat >> confdefs.h <<\EOF
2117 #define HAVE_GETLOADAVG 1
2120 ac_have_func=yes
2121 else
2122 # Figure out what our getloadavg.c needs.
2123 ac_have_func=no
2124 ac_safe=`echo "sys/dg_sys_info.h" | tr './\055' '___'`
2125 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
2126 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2127 echo $ac_n "(cached) $ac_c" 1>&6
2128 else
2129 cat > conftest.$ac_ext <<EOF
2130 #line 2131 "configure"
2131 #include "confdefs.h"
2132 #include <sys/dg_sys_info.h>
2134 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2135 ac_err=`grep -v '^ *+' conftest.out`
2136 if test -z "$ac_err"; then
2137 rm -rf conftest*
2138 eval "ac_cv_header_$ac_safe=yes"
2139 else
2140 echo "$ac_err" >&5
2141 rm -rf conftest*
2142 eval "ac_cv_header_$ac_safe=no"
2144 rm -f conftest*
2146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2147 echo "$ac_t""yes" 1>&6
2148 ac_have_func=yes; cat >> confdefs.h <<\EOF
2149 #define DGUX 1
2152 echo $ac_n "checking for -ldgc""... $ac_c" 1>&6
2153 ac_lib_var=`echo dgc | tr './+' '__p'`
2154 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2155 echo $ac_n "(cached) $ac_c" 1>&6
2156 else
2157 ac_save_LIBS="$LIBS"
2158 LIBS="-ldgc $LIBS"
2159 cat > conftest.$ac_ext <<EOF
2160 #line 2161 "configure"
2161 #include "confdefs.h"
2163 int main() { return 0; }
2164 int t() {
2165 dg_sys_info()
2166 ; return 0; }
2168 if eval $ac_link; then
2169 rm -rf conftest*
2170 eval "ac_cv_lib_$ac_lib_var=yes"
2171 else
2172 rm -rf conftest*
2173 eval "ac_cv_lib_$ac_lib_var=no"
2175 rm -f conftest*
2176 LIBS="$ac_save_LIBS"
2179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2180 echo "$ac_t""yes" 1>&6
2181 ac_tr_lib=HAVE_LIB`echo dgc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2182 cat >> confdefs.h <<EOF
2183 #define $ac_tr_lib 1
2186 LIBS="-ldgc $LIBS"
2188 else
2189 echo "$ac_t""no" 1>&6
2192 else
2193 echo "$ac_t""no" 1>&6
2197 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
2198 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
2199 # Irix 4.0.5F has the header but not the library.
2200 if test $ac_have_func = no && test $ac_cv_lib_elf = yes; then
2201 ac_have_func=yes; cat >> confdefs.h <<\EOF
2202 #define SVR4 1
2207 if test $ac_have_func = no; then
2208 ac_safe=`echo "inq_stats/cpustats.h" | tr './\055' '___'`
2209 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
2210 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2211 echo $ac_n "(cached) $ac_c" 1>&6
2212 else
2213 cat > conftest.$ac_ext <<EOF
2214 #line 2215 "configure"
2215 #include "confdefs.h"
2216 #include <inq_stats/cpustats.h>
2218 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2219 ac_err=`grep -v '^ *+' conftest.out`
2220 if test -z "$ac_err"; then
2221 rm -rf conftest*
2222 eval "ac_cv_header_$ac_safe=yes"
2223 else
2224 echo "$ac_err" >&5
2225 rm -rf conftest*
2226 eval "ac_cv_header_$ac_safe=no"
2228 rm -f conftest*
2230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2231 echo "$ac_t""yes" 1>&6
2232 ac_have_func=yes; cat >> confdefs.h <<\EOF
2233 #define UMAX 1
2236 cat >> confdefs.h <<\EOF
2237 #define UMAX4_3 1
2240 else
2241 echo "$ac_t""no" 1>&6
2246 if test $ac_have_func = no; then
2247 ac_safe=`echo "sys/cpustats.h" | tr './\055' '___'`
2248 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
2249 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2250 echo $ac_n "(cached) $ac_c" 1>&6
2251 else
2252 cat > conftest.$ac_ext <<EOF
2253 #line 2254 "configure"
2254 #include "confdefs.h"
2255 #include <sys/cpustats.h>
2257 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2258 ac_err=`grep -v '^ *+' conftest.out`
2259 if test -z "$ac_err"; then
2260 rm -rf conftest*
2261 eval "ac_cv_header_$ac_safe=yes"
2262 else
2263 echo "$ac_err" >&5
2264 rm -rf conftest*
2265 eval "ac_cv_header_$ac_safe=no"
2267 rm -f conftest*
2269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2270 echo "$ac_t""yes" 1>&6
2271 ac_have_func=yes; cat >> confdefs.h <<\EOF
2272 #define UMAX 1
2275 else
2276 echo "$ac_t""no" 1>&6
2281 if test $ac_have_func = no; then
2282 for ac_hdr in mach/mach.h
2284 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2286 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2287 echo $ac_n "(cached) $ac_c" 1>&6
2288 else
2289 cat > conftest.$ac_ext <<EOF
2290 #line 2291 "configure"
2291 #include "confdefs.h"
2292 #include <$ac_hdr>
2294 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2295 ac_err=`grep -v '^ *+' conftest.out`
2296 if test -z "$ac_err"; then
2297 rm -rf conftest*
2298 eval "ac_cv_header_$ac_safe=yes"
2299 else
2300 echo "$ac_err" >&5
2301 rm -rf conftest*
2302 eval "ac_cv_header_$ac_safe=no"
2304 rm -f conftest*
2306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2307 echo "$ac_t""yes" 1>&6
2308 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2309 cat >> confdefs.h <<EOF
2310 #define $ac_tr_hdr 1
2313 else
2314 echo "$ac_t""no" 1>&6
2316 done
2320 ac_safe=`echo "nlist.h" | tr './\055' '___'`
2321 echo $ac_n "checking for nlist.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 <nlist.h>
2330 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2331 ac_err=`grep -v '^ *+' conftest.out`
2332 if test -z "$ac_err"; then
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=yes"
2335 else
2336 echo "$ac_err" >&5
2337 rm -rf conftest*
2338 eval "ac_cv_header_$ac_safe=no"
2340 rm -f conftest*
2342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2343 echo "$ac_t""yes" 1>&6
2344 cat >> confdefs.h <<\EOF
2345 #define NLIST_STRUCT 1
2348 echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
2349 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
2350 echo $ac_n "(cached) $ac_c" 1>&6
2351 else
2352 cat > conftest.$ac_ext <<EOF
2353 #line 2354 "configure"
2354 #include "confdefs.h"
2355 #include <nlist.h>
2356 int main() { return 0; }
2357 int t() {
2358 struct nlist n; n.n_un.n_name = 0;
2359 ; return 0; }
2361 if eval $ac_compile; then
2362 rm -rf conftest*
2363 ac_cv_struct_nlist_n_un=yes
2364 else
2365 rm -rf conftest*
2366 ac_cv_struct_nlist_n_un=no
2368 rm -f conftest*
2372 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
2373 if test $ac_cv_struct_nlist_n_un = yes; then
2374 cat >> confdefs.h <<\EOF
2375 #define NLIST_NAME_UNION 1
2380 else
2381 echo "$ac_t""no" 1>&6
2383 fi # Do not have getloadavg in system libraries.
2385 # Some definitions of getloadavg require that the program be installed setgid.
2386 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
2387 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
2388 echo $ac_n "(cached) $ac_c" 1>&6
2389 else
2390 cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2393 #include "$srcdir/getloadavg.c"
2394 #ifdef LDAV_PRIVILEGED
2395 Yowza Am I SETGID yet
2396 #endif
2398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2399 egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
2400 rm -rf conftest*
2401 ac_cv_func_getloadavg_setgid=yes
2402 else
2403 rm -rf conftest*
2404 ac_cv_func_getloadavg_setgid=no
2406 rm -f conftest*
2410 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
2411 if test $ac_cv_func_getloadavg_setgid = yes; then
2412 NEED_SETGID=true; cat >> confdefs.h <<\EOF
2413 #define GETLOADAVG_PRIVILEGED 1
2416 else
2417 NEED_SETGID=false
2420 if test $ac_cv_func_getloadavg_setgid = yes; then
2421 echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
2422 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
2423 echo $ac_n "(cached) $ac_c" 1>&6
2424 else
2425 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
2426 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
2427 # If we got an error (system does not support symlinks), try without -L.
2428 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
2429 ac_cv_group_kmem=`echo $ac_ls_output \
2430 | sed -ne 's/[ ][ ]*/ /g;
2431 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
2432 / /s/.* //;p;'`
2436 echo "$ac_t""$ac_cv_group_kmem" 1>&6
2437 KMEM_GROUP=$ac_cv_group_kmem
2440 echo $ac_n "checking for strcoll""... $ac_c" 1>&6
2441 if eval "test \"`echo '$''{'ac_cv_func_strcoll'+set}'`\" = set"; then
2442 echo $ac_n "(cached) $ac_c" 1>&6
2443 else
2444 if test "$cross_compiling" = yes; then
2445 ac_cv_func_strcoll=no
2446 else
2447 cat > conftest.$ac_ext <<EOF
2448 #line 2449 "configure"
2449 #include "confdefs.h"
2450 #include <string.h>
2451 main ()
2453 exit (strcoll ("abc", "def") >= 0 ||
2454 strcoll ("ABC", "DEF") >= 0 ||
2455 strcoll ("123", "456") >= 0);
2458 eval $ac_link
2459 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2460 ac_cv_func_strcoll=yes
2461 else
2462 ac_cv_func_strcoll=no
2465 rm -fr conftest*
2468 echo "$ac_t""$ac_cv_func_strcoll" 1>&6
2469 if test $ac_cv_func_strcoll = yes; then
2470 cat >> confdefs.h <<\EOF
2471 #define HAVE_STRCOLL 1
2477 # Check out the wait reality.
2478 for ac_hdr in sys/wait.h
2480 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2482 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2483 echo $ac_n "(cached) $ac_c" 1>&6
2484 else
2485 cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 #include <$ac_hdr>
2490 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2491 ac_err=`grep -v '^ *+' conftest.out`
2492 if test -z "$ac_err"; then
2493 rm -rf conftest*
2494 eval "ac_cv_header_$ac_safe=yes"
2495 else
2496 echo "$ac_err" >&5
2497 rm -rf conftest*
2498 eval "ac_cv_header_$ac_safe=no"
2500 rm -f conftest*
2502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2503 echo "$ac_t""yes" 1>&6
2504 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2505 cat >> confdefs.h <<EOF
2506 #define $ac_tr_hdr 1
2509 else
2510 echo "$ac_t""no" 1>&6
2512 done
2513 for ac_func in waitpid wait3
2515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2516 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2517 echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519 cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522 /* System header to define __stub macros and hopefully few prototypes,
2523 which can conflict with char $ac_func(); below. */
2524 #include <assert.h>
2525 /* Override any gcc2 internal prototype to avoid an error. */
2526 char $ac_func();
2528 int main() { return 0; }
2529 int t() {
2531 /* The GNU C library defines this for functions which it implements
2532 to always fail with ENOSYS. Some functions are actually named
2533 something starting with __ and the normal name is an alias. */
2534 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2535 choke me
2536 #else
2537 $ac_func();
2538 #endif
2540 ; return 0; }
2542 if eval $ac_link; then
2543 rm -rf conftest*
2544 eval "ac_cv_func_$ac_func=yes"
2545 else
2546 rm -rf conftest*
2547 eval "ac_cv_func_$ac_func=no"
2549 rm -f conftest*
2552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2553 echo "$ac_t""yes" 1>&6
2554 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2555 cat >> confdefs.h <<EOF
2556 #define $ac_tr_func 1
2559 else
2560 echo "$ac_t""no" 1>&6
2562 done
2564 echo $ac_n "checking for union wait""... $ac_c" 1>&6
2565 if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then
2566 echo $ac_n "(cached) $ac_c" 1>&6
2567 else
2568 cat > conftest.$ac_ext <<EOF
2569 #line 2570 "configure"
2570 #include "confdefs.h"
2571 #include <sys/types.h>
2572 #include <sys/wait.h>
2573 int main() { return 0; }
2574 int t() {
2575 union wait status; int pid; pid = wait (&status);
2576 #ifdef WEXITSTATUS
2577 /* Some POSIXoid systems have both the new-style macros and the old
2578 union wait type, and they do not work together. If union wait
2579 conflicts with WEXITSTATUS et al, we don't want to use it at all. */
2580 if (WEXITSTATUS (status) != 0) pid = -1;
2581 #ifdef WTERMSIG
2582 /* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
2583 -- blow chunks here --
2584 #endif
2585 #endif
2586 #ifdef HAVE_WAITPID
2587 /* Make sure union wait works with waitpid. */
2588 pid = waitpid (-1, &status, 0);
2589 #endif
2591 ; return 0; }
2593 if eval $ac_link; then
2594 rm -rf conftest*
2595 make_cv_union_wait=yes
2596 else
2597 rm -rf conftest*
2598 make_cv_union_wait=no
2600 rm -f conftest*
2604 if test "$make_cv_union_wait" = yes; then
2605 cat >> confdefs.h <<\EOF
2606 #define HAVE_UNION_WAIT 1
2610 echo "$ac_t""$make_cv_union_wait" 1>&6
2612 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
2613 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2614 echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616 cat > conftest.$ac_ext <<EOF
2617 #line 2618 "configure"
2618 #include "confdefs.h"
2619 #include <sys/types.h>
2620 #include <signal.h>
2621 /* NetBSD declares sys_siglist in unistd.h. */
2622 #ifdef HAVE_UNISTD_H
2623 #include <unistd.h>
2624 #endif
2625 int main() { return 0; }
2626 int t() {
2627 char *msg = *(sys_siglist + 1);
2628 ; return 0; }
2630 if eval $ac_compile; then
2631 rm -rf conftest*
2632 ac_cv_decl_sys_siglist=yes
2633 else
2634 rm -rf conftest*
2635 ac_cv_decl_sys_siglist=no
2637 rm -f conftest*
2641 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2642 if test $ac_cv_decl_sys_siglist = yes; then
2643 cat >> confdefs.h <<\EOF
2644 #define SYS_SIGLIST_DECLARED 1
2650 # The presence of the following is not meant to imply
2651 # that make necessarily works on those systems.
2652 echo $ac_n "checking for -lsun""... $ac_c" 1>&6
2653 ac_lib_var=`echo sun | tr './+' '__p'`
2654 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2655 echo $ac_n "(cached) $ac_c" 1>&6
2656 else
2657 ac_save_LIBS="$LIBS"
2658 LIBS="-lsun $LIBS"
2659 cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2663 int main() { return 0; }
2664 int t() {
2665 getpwnam()
2666 ; return 0; }
2668 if eval $ac_link; then
2669 rm -rf conftest*
2670 eval "ac_cv_lib_$ac_lib_var=yes"
2671 else
2672 rm -rf conftest*
2673 eval "ac_cv_lib_$ac_lib_var=no"
2675 rm -f conftest*
2676 LIBS="$ac_save_LIBS"
2679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2680 echo "$ac_t""yes" 1>&6
2681 ac_tr_lib=HAVE_LIB`echo sun | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2682 cat >> confdefs.h <<EOF
2683 #define $ac_tr_lib 1
2686 LIBS="-lsun $LIBS"
2688 else
2689 echo "$ac_t""no" 1>&6
2693 REMOTE=stub
2694 # Check whether --with-customs or --without-customs was given.
2695 if test "${with_customs+set}" = set; then
2696 withval="$with_customs"
2697 REMOTE=cstms LIBS="$LIBS libcustoms.a"
2701 echo checking for location of SCCS get command
2702 if test -f /usr/sccs/get; then
2703 SCCS_GET=/usr/sccs/get
2704 cat >> confdefs.h <<\EOF
2705 #define SCCS_GET "/usr/sccs/get"
2708 else
2709 SCCS_GET=get
2710 cat >> confdefs.h <<\EOF
2711 #define SCCS_GET "get"
2715 ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
2716 if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
2717 test -f s.conftest; then
2718 # We successfully created an SCCS file.
2719 echo checking if SCCS get command understands -G
2720 if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
2721 test -f conftoast; then
2722 cat >> confdefs.h <<\EOF
2723 #define SCCS_GET_MINUS_G 1
2728 rm -f s.conftest conftoast
2730 trap '' 1 2 15
2731 cat > confcache <<\EOF
2732 # This file is a shell script that caches the results of configure
2733 # tests run on this system so they can be shared between configure
2734 # scripts and configure runs. It is not useful on other systems.
2735 # If it contains results you don't want to keep, you may remove or edit it.
2737 # By default, configure uses ./config.cache as the cache file,
2738 # creating it if it does not exist already. You can give configure
2739 # the --cache-file=FILE option to use a different cache file; that is
2740 # what configure does when it calls configure scripts in
2741 # subdirectories, so they share the cache.
2742 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2743 # config.status only pays attention to the cache file if you give it the
2744 # --recheck option to rerun configure.
2747 # Ultrix sh set writes to stderr and can't be redirected directly,
2748 # and sets the high bit in the cache file unless we assign to the vars.
2749 (set) 2>&1 |
2750 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2751 >> confcache
2752 if cmp -s $cache_file confcache; then
2754 else
2755 if test -w $cache_file; then
2756 echo "updating cache $cache_file"
2757 cat confcache > $cache_file
2758 else
2759 echo "not updating unwritable cache $cache_file"
2762 rm -f confcache
2764 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2766 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2767 # Let make expand exec_prefix.
2768 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2770 # Any assignment to VPATH causes Sun make to only execute
2771 # the first set of double-colon rules, so remove it if not needed.
2772 # If there is a colon in the path, we need to keep it.
2773 if test "x$srcdir" = x.; then
2774 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2777 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2779 DEFS=-DHAVE_CONFIG_H
2781 # Without the "./", some shells look in PATH for config.status.
2782 : ${CONFIG_STATUS=./config.status}
2784 echo creating $CONFIG_STATUS
2785 rm -f $CONFIG_STATUS
2786 cat > $CONFIG_STATUS <<EOF
2787 #! /bin/sh
2788 # Generated automatically by configure.
2789 # Run this file to recreate the current configuration.
2790 # This directory was configured as follows,
2791 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2793 # $0 $ac_configure_args
2795 # Compiler output produced by configure, useful for debugging
2796 # configure, is in ./config.log if it exists.
2798 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2799 for ac_option
2801 case "\$ac_option" in
2802 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2803 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2804 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2805 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2806 echo "$CONFIG_STATUS generated by autoconf version 2.5"
2807 exit 0 ;;
2808 -help | --help | --hel | --he | --h)
2809 echo "\$ac_cs_usage"; exit 0 ;;
2810 *) echo "\$ac_cs_usage"; exit 1 ;;
2811 esac
2812 done
2814 ac_given_srcdir=$srcdir
2815 ac_given_INSTALL="$INSTALL"
2817 trap 'rm -fr `echo "Makefile build.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2819 # Protect against being on the right side of a sed subst in config.status.
2820 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
2821 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2822 $ac_vpsub
2823 $extrasub
2824 s%@CFLAGS@%$CFLAGS%g
2825 s%@CPPFLAGS@%$CPPFLAGS%g
2826 s%@CXXFLAGS@%$CXXFLAGS%g
2827 s%@DEFS@%$DEFS%g
2828 s%@LDFLAGS@%$LDFLAGS%g
2829 s%@LIBS@%$LIBS%g
2830 s%@exec_prefix@%$exec_prefix%g
2831 s%@prefix@%$prefix%g
2832 s%@program_transform_name@%$program_transform_name%g
2833 s%@bindir@%$bindir%g
2834 s%@sbindir@%$sbindir%g
2835 s%@libexecdir@%$libexecdir%g
2836 s%@datadir@%$datadir%g
2837 s%@sysconfdir@%$sysconfdir%g
2838 s%@sharedstatedir@%$sharedstatedir%g
2839 s%@localstatedir@%$localstatedir%g
2840 s%@libdir@%$libdir%g
2841 s%@includedir@%$includedir%g
2842 s%@oldincludedir@%$oldincludedir%g
2843 s%@infodir@%$infodir%g
2844 s%@mandir@%$mandir%g
2845 s%@subdirs@%$subdirs%g
2846 s%@SET_MAKE@%$SET_MAKE%g
2847 s%@CC@%$CC%g
2848 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2849 s%@INSTALL_DATA@%$INSTALL_DATA%g
2850 s%@CPP@%$CPP%g
2851 s%@LIBOBJS@%$LIBOBJS%g
2852 s%@ALLOCA@%$ALLOCA%g
2853 s%@NEED_SETGID@%$NEED_SETGID%g
2854 s%@KMEM_GROUP@%$KMEM_GROUP%g
2855 s%@REMOTE@%$REMOTE%g
2857 CEOF
2859 cat >> $CONFIG_STATUS <<EOF
2861 CONFIG_FILES=\${CONFIG_FILES-"Makefile build.sh"}
2863 cat >> $CONFIG_STATUS <<\EOF
2864 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2865 # Support "outfile[:infile]", defaulting infile="outfile.in".
2866 case "$ac_file" in
2867 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2868 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2869 *) ac_file_in="${ac_file}.in" ;;
2870 esac
2872 # Adjust relative srcdir, etc. for subdirectories.
2874 # Remove last slash and all that follows it. Not all systems have dirname.
2875 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2876 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2877 # The file is in a subdirectory.
2878 test ! -d "$ac_dir" && mkdir "$ac_dir"
2879 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2880 # A "../" for each directory in $ac_dir_suffix.
2881 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2882 else
2883 ac_dir_suffix= ac_dots=
2886 case "$ac_given_srcdir" in
2887 .) srcdir=.
2888 if test -z "$ac_dots"; then top_srcdir=.
2889 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2890 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2891 *) # Relative path.
2892 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2893 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2894 esac
2896 case "$ac_given_INSTALL" in
2897 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2898 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2899 esac
2900 echo creating "$ac_file"
2901 rm -f "$ac_file"
2902 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2903 case "$ac_file" in
2904 *Makefile*) ac_comsub="1i\\
2905 # $configure_input" ;;
2906 *) ac_comsub= ;;
2907 esac
2908 sed -e "$ac_comsub
2909 s%@configure_input@%$configure_input%g
2910 s%@srcdir@%$srcdir%g
2911 s%@top_srcdir@%$top_srcdir%g
2912 s%@INSTALL@%$INSTALL%g
2913 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2914 fi; done
2915 rm -f conftest.subs
2917 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2918 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2920 # ac_d sets the value in "#define NAME VALUE" lines.
2921 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2922 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2923 ac_dC='\3'
2924 ac_dD='%g'
2925 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2926 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2927 ac_uB='\([ ]\)%\1#\2define\3'
2928 ac_uC=' '
2929 ac_uD='\4%g'
2930 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2931 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2932 ac_eB='$%\1#\2define\3'
2933 ac_eC=' '
2934 ac_eD='%g'
2936 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2937 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2938 # Support "outfile[:infile]", defaulting infile="outfile.in".
2939 case "$ac_file" in
2940 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2941 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2942 *) ac_file_in="${ac_file}.in" ;;
2943 esac
2945 echo creating $ac_file
2947 rm -f conftest.frag conftest.in conftest.out
2948 cp $ac_given_srcdir/$ac_file_in conftest.in
2952 # Transform confdefs.h into a sed script conftest.vals that substitutes
2953 # the proper values into config.h.in to produce config.h. And first:
2954 # Protect against being on the right side of a sed subst in config.status.
2955 # Protect against being in an unquoted here document in config.status.
2956 rm -f conftest.vals
2957 cat > conftest.hdr <<\EOF
2958 s/[\\&%]/\\&/g
2959 s%[\\$`]%\\&%g
2960 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2961 s%ac_d%ac_u%gp
2962 s%ac_u%ac_e%gp
2964 sed -n -f conftest.hdr confdefs.h > conftest.vals
2965 rm -f conftest.hdr
2967 # This sed command replaces #undef with comments. This is necessary, for
2968 # example, in the case of _POSIX_SOURCE, which is predefined and required
2969 # on some systems where configure will not decide to define it.
2970 cat >> conftest.vals <<\EOF
2971 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2974 # Break up conftest.vals because some shells have a limit on
2975 # the size of here documents, and old seds have small limits too.
2976 # Maximum number of lines to put in a single here document.
2977 ac_max_here_lines=12
2979 rm -f conftest.tail
2980 while :
2982 ac_lines=`grep -c . conftest.vals`
2983 # grep -c gives empty output for an empty file on some AIX systems.
2984 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2985 # Write a limited-size here document to conftest.frag.
2986 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2987 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2988 echo 'CEOF
2989 sed -f conftest.frag conftest.in > conftest.out
2990 rm -f conftest.in
2991 mv conftest.out conftest.in
2992 ' >> $CONFIG_STATUS
2993 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2994 rm -f conftest.vals
2995 mv conftest.tail conftest.vals
2996 done
2997 rm -f conftest.vals
2999 cat >> $CONFIG_STATUS <<\EOF
3000 rm -f conftest.frag conftest.h
3001 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3002 cat conftest.in >> conftest.h
3003 rm -f conftest.in
3004 if cmp -s $ac_file conftest.h 2>/dev/null; then
3005 echo "$ac_file is unchanged"
3006 rm -f conftest.h
3007 else
3008 rm -f $ac_file
3009 mv conftest.h $ac_file
3011 fi; done
3015 # Makefile uses this timestamp file to know when to remake Makefile,
3016 # build.sh, and glob/Makefile.
3017 touch stamp-config
3018 exit 0
3020 chmod +x $CONFIG_STATUS
3021 rm -fr confdefs* $ac_clean_files
3022 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3024 if test "$no_recursion" != yes; then
3026 # Remove --cache-file and --srcdir arguments so they do not pile up.
3027 ac_sub_configure_args=
3028 ac_prev=
3029 for ac_arg in $ac_configure_args; do
3030 if test -n "$ac_prev"; then
3031 ac_prev=
3032 continue
3034 case "$ac_arg" in
3035 -cache-file | --cache-file | --cache-fil | --cache-fi \
3036 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3037 ac_prev=cache_file ;;
3038 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3039 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3041 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3042 ac_prev=srcdir ;;
3043 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3045 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3046 esac
3047 done
3049 for ac_config_dir in glob; do
3051 # Do not complain, so a configure script can configure whichever
3052 # parts of a large source tree are present.
3053 if test ! -d $srcdir/$ac_config_dir; then
3054 continue
3057 echo configuring in $ac_config_dir
3059 case "$srcdir" in
3060 .) ;;
3062 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3063 else
3064 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3067 esac
3069 ac_popdir=`pwd`
3070 cd $ac_config_dir
3072 case "$srcdir" in
3073 .) # No --srcdir option. We are building in place.
3074 ac_sub_srcdir=$srcdir ;;
3075 /*) # Absolute path.
3076 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3077 *) # Relative path.
3078 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3079 esac
3081 # Check for guested configure; otherwise get Cygnus style configure.
3082 if test -f $ac_sub_srcdir/configure; then
3083 ac_sub_configure=$ac_sub_srcdir/configure
3084 elif test -f $ac_sub_srcdir/configure.in; then
3085 ac_sub_configure=$ac_configure
3086 else
3087 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3088 ac_sub_configure=
3091 # The recursion is here.
3092 if test -n "$ac_sub_configure"; then
3094 # Make the cache file name correct relative to the subdirectory.
3095 # A "../" for each directory in /$ac_config_dir.
3096 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3097 case "$cache_file" in
3098 /*) ac_sub_cache_file=$cache_file ;;
3099 *) # Relative path.
3100 ac_sub_cache_file="$ac_dots$cache_file" ;;
3101 esac
3102 case "$ac_given_INSTALL" in
3103 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3104 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3105 esac
3107 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3108 # The eval makes quoting arguments work.
3109 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3110 then :
3111 else
3112 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3116 cd $ac_popdir
3117 done