3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12.1
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 --with-target-subdir=SUBDIR Configuring with a cross compiler"
17 --with-newlib Configuring with newlib"
19 # Initialize some variables set by options.
20 # The variables have the same names as the options, with
21 # dashes changed to underlines.
23 cache_file=./config.cache
32 program_transform_name=s,x,x,
40 bindir='${exec_prefix}/bin'
41 sbindir='${exec_prefix}/sbin'
42 libexecdir='${exec_prefix}/libexec'
43 datadir='${prefix}/share'
44 sysconfdir='${prefix}/etc'
45 sharedstatedir='${prefix}/com'
46 localstatedir='${prefix}/var'
47 libdir='${exec_prefix}/lib'
48 includedir='${prefix}/include'
49 oldincludedir='/usr/include'
50 infodir='${prefix}/info'
51 mandir='${prefix}/man'
53 # Initialize some other variables.
56 SHELL=${CONFIG_SHELL-/bin/sh}
57 # Maximum number of lines to put in a shell here document.
64 # If the previous option needs an argument, assign it.
65 if test -n "$ac_prev"; then
66 eval "$ac_prev=\$ac_option"
72 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
76 # Accept the important Cygnus configure options, so we can diagnose typos.
80 -bindir | --bindir | --bindi | --bind | --bin | --bi)
82 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
83 bindir="$ac_optarg" ;;
85 -build | --build | --buil | --bui | --bu)
87 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
90 -cache-file | --cache-file | --cache-fil | --cache-fi \
91 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
93 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
94 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
95 cache_file="$ac_optarg" ;;
97 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
99 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
101 datadir="$ac_optarg" ;;
103 -disable-* | --disable-*)
104 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
105 # Reject names that are not valid shell variable names.
106 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
107 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
109 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
110 eval "enable_${ac_feature}=no" ;;
112 -enable-* | --enable-*)
113 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
114 # Reject names that are not valid shell variable names.
115 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
116 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 eval "enable_${ac_feature}='$ac_optarg'" ;;
125 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
126 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
127 | --exec | --exe | --ex)
128 ac_prev=exec_prefix ;;
129 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
130 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
131 | --exec=* | --exe=* | --ex=*)
132 exec_prefix="$ac_optarg" ;;
134 -gas | --gas | --ga | --g)
135 # Obsolete; use --with-gas.
138 -help | --help | --hel | --he)
139 # Omit some internal or obsolete options to make the list less imposing.
140 # This message is too long to be a string in the A/UX 3.1 sh.
142 Usage: configure [options] [host]
143 Options: [defaults in brackets after descriptions]
145 --cache-file=FILE cache test results in FILE
146 --help print this message
147 --no-create do not create output files
148 --quiet, --silent do not print \`checking...' messages
149 --version print the version of autoconf that created configure
150 Directory and file names:
151 --prefix=PREFIX install architecture-independent files in PREFIX
153 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
155 --bindir=DIR user executables in DIR [EPREFIX/bin]
156 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
157 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
158 --datadir=DIR read-only architecture-independent data in DIR
160 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
161 --sharedstatedir=DIR modifiable architecture-independent data in DIR
163 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
164 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
165 --includedir=DIR C header files in DIR [PREFIX/include]
166 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
167 --infodir=DIR info documentation in DIR [PREFIX/info]
168 --mandir=DIR man documentation in DIR [PREFIX/man]
169 --srcdir=DIR find the sources in DIR [configure dir or ..]
170 --program-prefix=PREFIX prepend PREFIX to installed program names
171 --program-suffix=SUFFIX append SUFFIX to installed program names
172 --program-transform-name=PROGRAM
173 run sed PROGRAM on installed program names
177 --build=BUILD configure for building on BUILD [BUILD=HOST]
178 --host=HOST configure for HOST [guessed]
179 --target=TARGET configure for TARGET [TARGET=HOST]
180 Features and packages:
181 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
182 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
183 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
184 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
185 --x-includes=DIR X include files are in DIR
186 --x-libraries=DIR X library files are in DIR
188 if test -n "$ac_help"; then
189 echo "--enable and --with options recognized:$ac_help"
193 -host | --host | --hos | --ho)
195 -host=* | --host=* | --hos=* | --ho=*)
198 -includedir | --includedir | --includedi | --included | --include \
199 | --includ | --inclu | --incl | --inc)
200 ac_prev=includedir ;;
201 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
202 | --includ=* | --inclu=* | --incl=* | --inc=*)
203 includedir="$ac_optarg" ;;
205 -infodir | --infodir | --infodi | --infod | --info | --inf)
207 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
208 infodir="$ac_optarg" ;;
210 -libdir | --libdir | --libdi | --libd)
212 -libdir=* | --libdir=* | --libdi=* | --libd=*)
213 libdir="$ac_optarg" ;;
215 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
216 | --libexe | --libex | --libe)
217 ac_prev=libexecdir ;;
218 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
219 | --libexe=* | --libex=* | --libe=*)
220 libexecdir="$ac_optarg" ;;
222 -localstatedir | --localstatedir | --localstatedi | --localstated \
223 | --localstate | --localstat | --localsta | --localst \
224 | --locals | --local | --loca | --loc | --lo)
225 ac_prev=localstatedir ;;
226 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
227 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
228 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
229 localstatedir="$ac_optarg" ;;
231 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
234 mandir="$ac_optarg" ;;
237 # Obsolete; use --without-fp.
240 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
244 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
245 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
248 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
249 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
250 | --oldin | --oldi | --old | --ol | --o)
251 ac_prev=oldincludedir ;;
252 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
253 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
254 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
255 oldincludedir="$ac_optarg" ;;
257 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
260 prefix="$ac_optarg" ;;
262 -program-prefix | --program-prefix | --program-prefi | --program-pref \
263 | --program-pre | --program-pr | --program-p)
264 ac_prev=program_prefix ;;
265 -program-prefix=* | --program-prefix=* | --program-prefi=* \
266 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
267 program_prefix="$ac_optarg" ;;
269 -program-suffix | --program-suffix | --program-suffi | --program-suff \
270 | --program-suf | --program-su | --program-s)
271 ac_prev=program_suffix ;;
272 -program-suffix=* | --program-suffix=* | --program-suffi=* \
273 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
274 program_suffix="$ac_optarg" ;;
276 -program-transform-name | --program-transform-name \
277 | --program-transform-nam | --program-transform-na \
278 | --program-transform-n | --program-transform- \
279 | --program-transform | --program-transfor \
280 | --program-transfo | --program-transf \
281 | --program-trans | --program-tran \
282 | --progr-tra | --program-tr | --program-t)
283 ac_prev=program_transform_name ;;
284 -program-transform-name=* | --program-transform-name=* \
285 | --program-transform-nam=* | --program-transform-na=* \
286 | --program-transform-n=* | --program-transform-=* \
287 | --program-transform=* | --program-transfor=* \
288 | --program-transfo=* | --program-transf=* \
289 | --program-trans=* | --program-tran=* \
290 | --progr-tra=* | --program-tr=* | --program-t=*)
291 program_transform_name="$ac_optarg" ;;
293 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
294 | -silent | --silent | --silen | --sile | --sil)
297 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301 sbindir="$ac_optarg" ;;
303 -sharedstatedir | --sharedstatedir | --sharedstatedi \
304 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
305 | --sharedst | --shareds | --shared | --share | --shar \
307 ac_prev=sharedstatedir ;;
308 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
309 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
310 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312 sharedstatedir="$ac_optarg" ;;
314 -site | --site | --sit)
316 -site=* | --site=* | --sit=*)
319 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
322 srcdir="$ac_optarg" ;;
324 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
325 | --syscon | --sysco | --sysc | --sys | --sy)
326 ac_prev=sysconfdir ;;
327 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
328 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
329 sysconfdir="$ac_optarg" ;;
331 -target | --target | --targe | --targ | --tar | --ta | --t)
333 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
334 target="$ac_optarg" ;;
336 -v | -verbose | --verbose | --verbos | --verbo | --verb)
339 -version | --version | --versio | --versi | --vers)
340 echo "configure generated by autoconf version 2.12.1"
344 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
345 # Reject names that are not valid shell variable names.
346 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
347 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349 ac_package=`echo $ac_package| sed 's/-/_/g'`
354 eval "with_${ac_package}='$ac_optarg'" ;;
356 -without-* | --without-*)
357 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
358 # Reject names that are not valid shell variable names.
359 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 eval "with_${ac_package}=no" ;;
366 # Obsolete; use --with-x.
369 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
370 | --x-incl | --x-inc | --x-in | --x-i)
371 ac_prev=x_includes ;;
372 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
373 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
374 x_includes="$ac_optarg" ;;
376 -x-libraries | --x-libraries | --x-librarie | --x-librari \
377 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
378 ac_prev=x_libraries ;;
379 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
380 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
381 x_libraries="$ac_optarg" ;;
383 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
387 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
388 echo "configure: warning: $ac_option: invalid host type" 1>&2
390 if test "x$nonopt" != xNONE; then
391 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
399 if test -n "$ac_prev"; then
400 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
403 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405 # File descriptor usage:
408 # 2 errors and warnings
409 # 3 some systems may open it to /dev/tty
410 # 4 used on the Kubota Titan
411 # 6 checking for... messages and results
412 # 5 compiler messages saved in config.log
413 if test "$silent" = yes; then
421 This file contains any messages produced by compilers while
422 running configure, to aid debugging if configure makes a mistake.
425 # Strip out --no-create and --no-recursion so they do not pile up.
426 # Also quote any args containing shell metacharacters.
431 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
432 | --no-cr | --no-c) ;;
433 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
434 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
435 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
436 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
437 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
442 # Only set these to C if already set. These must not be set unconditionally
443 # because not all systems understand e.g. LANG=C (notably SCO).
444 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
445 # Non-C LC_CTYPE values break the ctype check.
446 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
447 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
448 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
449 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
451 # confdefs.h avoids OS command line length limits that DEFS can exceed.
452 rm -rf conftest* confdefs.h
453 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
456 # A filename unique to this package, relative to the directory that
457 # configure is in, which we can look for to find out if srcdir is correct.
458 ac_unique_file=pexecute.c
460 # Find the source files, if location was not specified.
461 if test -z "$srcdir"; then
462 ac_srcdir_defaulted=yes
463 # Try the directory containing this script, then its parent.
465 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
468 if test ! -r $srcdir/$ac_unique_file; then
472 ac_srcdir_defaulted=no
474 if test ! -r $srcdir/$ac_unique_file; then
475 if test "$ac_srcdir_defaulted" = yes; then
476 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
478 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
481 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483 # Prefer explicitly selected file to automatically selected ones.
484 if test -z "$CONFIG_SITE"; then
485 if test "x$prefix" != xNONE; then
486 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
488 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
491 for ac_site_file in $CONFIG_SITE; do
492 if test -r "$ac_site_file"; then
493 echo "loading site script $ac_site_file"
498 if test -r "$cache_file"; then
499 echo "loading cache $cache_file"
502 echo "creating cache $cache_file"
507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
508 ac_cpp='$CPP $CPPFLAGS'
509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
510 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
511 cross_compiling=$ac_cv_prog_cc_cross
513 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
514 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
515 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
522 ac_n= ac_c='\c' ac_t=
527 # Check whether --with-target-subdir or --without-target-subdir was given.
528 if test "${with_target_subdir+set}" = set; then
529 withval="$with_target_subdir"
533 # Check whether --with-newlib or --without-newlib was given.
534 if test "${with_newlib+set}" = set; then
535 withval="$with_newlib"
540 if test "${srcdir}" = "."; then
541 if test -z "${with_target_subdir}"; then
542 libiberty_topdir="${srcdir}/.."
544 if test "${with_target_subdir}" != "."; then
545 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
547 libiberty_topdir="${srcdir}/${with_multisrctop}.."
551 libiberty_topdir="${srcdir}/.."
554 for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
555 if test -f $ac_dir/install-sh; then
557 ac_install_sh="$ac_aux_dir/install-sh -c"
559 elif test -f $ac_dir/install.sh; then
561 ac_install_sh="$ac_aux_dir/install.sh -c"
565 if test -z "$ac_aux_dir"; then
566 { echo "configure: error: can not find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" 1>&2; exit 1; }
568 ac_config_guess=$ac_aux_dir/config.guess
569 ac_config_sub=$ac_aux_dir/config.sub
570 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
574 # Make sure we can run config.sub.
575 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
576 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
579 echo $ac_n "checking host system type""... $ac_c" 1>&6
580 echo "configure:581: checking host system type" >&5
583 case "$host_alias" in
587 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
588 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
590 *) host_alias=$nonopt ;;
594 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
595 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
596 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
597 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
598 echo "$ac_t""$host" 1>&6
602 echo $ac_n "checking build system type""... $ac_c" 1>&6
603 echo "configure:604: checking build system type" >&5
606 case "$build_alias" in
609 NONE) build_alias=$host_alias ;;
610 *) build_alias=$nonopt ;;
614 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
615 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
616 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
617 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
618 echo "$ac_t""$build" 1>&6
620 if test $host != $build; then
621 ac_tool_prefix=${host_alias}-
626 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
627 set dummy ${ac_tool_prefix}ar; ac_word=$2
628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
629 echo "configure:630: checking for $ac_word" >&5
630 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
631 echo $ac_n "(cached) $ac_c" 1>&6
633 if test -n "$AR"; then
634 ac_cv_prog_AR="$AR" # Let the user override the test.
636 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
637 for ac_dir in $PATH; do
638 test -z "$ac_dir" && ac_dir=.
639 if test -f $ac_dir/$ac_word; then
640 ac_cv_prog_AR="${ac_tool_prefix}ar"
645 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
649 if test -n "$AR"; then
650 echo "$ac_t""$AR" 1>&6
652 echo "$ac_t""no" 1>&6
657 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
658 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
660 echo "configure:661: checking for $ac_word" >&5
661 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
662 echo $ac_n "(cached) $ac_c" 1>&6
664 if test -n "$RANLIB"; then
665 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
667 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
668 for ac_dir in $PATH; do
669 test -z "$ac_dir" && ac_dir=.
670 if test -f $ac_dir/$ac_word; then
671 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
678 RANLIB="$ac_cv_prog_RANLIB"
679 if test -n "$RANLIB"; then
680 echo "$ac_t""$RANLIB" 1>&6
682 echo "$ac_t""no" 1>&6
686 if test -z "$ac_cv_prog_RANLIB"; then
687 if test -n "$ac_tool_prefix"; then
688 # Extract the first word of "ranlib", so it can be a program name with args.
689 set dummy ranlib; ac_word=$2
690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
691 echo "configure:692: checking for $ac_word" >&5
692 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
693 echo $ac_n "(cached) $ac_c" 1>&6
695 if test -n "$RANLIB"; then
696 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
699 for ac_dir in $PATH; do
700 test -z "$ac_dir" && ac_dir=.
701 if test -f $ac_dir/$ac_word; then
702 ac_cv_prog_RANLIB="ranlib"
707 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
710 RANLIB="$ac_cv_prog_RANLIB"
711 if test -n "$RANLIB"; then
712 echo "$ac_t""$RANLIB" 1>&6
714 echo "$ac_t""no" 1>&6
723 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
724 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
725 # are probably using a cross compiler, which will not be able to fully
726 # link an executable. This should really be fixed in autoconf
732 # Extract the first word of "gcc", so it can be a program name with args.
733 set dummy gcc; ac_word=$2
734 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
735 echo "configure:736: checking for $ac_word" >&5
736 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
737 echo $ac_n "(cached) $ac_c" 1>&6
739 if test -n "$CC"; then
740 ac_cv_prog_CC="$CC" # Let the user override the test.
742 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
743 for ac_dir in $PATH; do
744 test -z "$ac_dir" && ac_dir=.
745 if test -f $ac_dir/$ac_word; then
754 if test -n "$CC"; then
755 echo "$ac_t""$CC" 1>&6
757 echo "$ac_t""no" 1>&6
760 if test -z "$CC"; then
761 # Extract the first word of "cc", so it can be a program name with args.
762 set dummy cc; ac_word=$2
763 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
764 echo "configure:765: checking for $ac_word" >&5
765 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
766 echo $ac_n "(cached) $ac_c" 1>&6
768 if test -n "$CC"; then
769 ac_cv_prog_CC="$CC" # Let the user override the test.
771 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
773 for ac_dir in $PATH; do
774 test -z "$ac_dir" && ac_dir=.
775 if test -f $ac_dir/$ac_word; then
776 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
785 if test $ac_prog_rejected = yes; then
786 # We found a bogon in the path, so make sure we never use it.
787 set dummy $ac_cv_prog_CC
789 if test $# -gt 0; then
790 # We chose a different compiler from the bogus one.
791 # However, it has the same basename, so the bogon will be chosen
792 # first if we set CC to just the basename; use the full file name.
794 set dummy "$ac_dir/$ac_word" "$@"
802 if test -n "$CC"; then
803 echo "$ac_t""$CC" 1>&6
805 echo "$ac_t""no" 1>&6
808 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
811 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
812 echo "configure:813: checking whether we are using GNU C" >&5
813 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
814 echo $ac_n "(cached) $ac_c" 1>&6
816 cat > conftest.c <<EOF
821 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
828 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
830 if test $ac_cv_prog_gcc = yes; then
832 ac_test_CFLAGS="${CFLAGS+set}"
833 ac_save_CFLAGS="$CFLAGS"
835 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
836 echo "configure:837: checking whether ${CC-cc} accepts -g" >&5
837 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
838 echo $ac_n "(cached) $ac_c" 1>&6
840 echo 'void f(){}' > conftest.c
841 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
850 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
851 if test "$ac_test_CFLAGS" = set; then
852 CFLAGS="$ac_save_CFLAGS"
853 elif test $ac_cv_prog_cc_g = yes; then
860 test "${CFLAGS+set}" = set || CFLAGS="-g"
864 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
865 echo "configure:866: checking for POSIXized ISC" >&5
866 if test -d /etc/conf/kconfig.d &&
867 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
869 echo "$ac_t""yes" 1>&6
870 ISC=yes # If later tests want to check for ISC.
871 cat >> confdefs.h <<\EOF
872 #define _POSIX_SOURCE 1
875 if test "$GCC" = yes; then
881 echo "$ac_t""no" 1>&6
891 # Find a good install program. We prefer a C program (faster),
892 # so one script is as good as another. But avoid the broken or
893 # incompatible versions:
894 # SysV /etc/install, /usr/sbin/install
895 # SunOS /usr/etc/install
898 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
899 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
900 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
901 # ./install, which can be erroneously created by make from ./install.sh.
902 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
903 echo "configure:904: checking for a BSD compatible install" >&5
904 if test -z "$INSTALL"; then
905 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
906 echo $ac_n "(cached) $ac_c" 1>&6
908 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
909 for ac_dir in $PATH; do
910 # Account for people who put trailing slashes in PATH elements.
912 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
914 # OSF1 and SCO ODT 3.0 have their own names for install.
915 # Don't use installbsd from OSF since it installs stuff as root
917 for ac_prog in ginstall scoinst install; do
918 if test -f $ac_dir/$ac_prog; then
919 if test $ac_prog = install &&
920 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
921 # AIX install. It has an incompatible calling convention.
924 ac_cv_path_install="$ac_dir/$ac_prog -c"
935 if test "${ac_cv_path_install+set}" = set; then
936 INSTALL="$ac_cv_path_install"
938 # As a last resort, use the slow shell script. We don't cache a
939 # path for INSTALL within a source directory, because that will
940 # break other packages using the cache if that directory is
941 # removed, or if the path is relative.
942 INSTALL="$ac_install_sh"
945 echo "$ac_t""$INSTALL" 1>&6
947 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
948 # It thinks the first close brace ends the variable substitution.
949 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
951 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
954 . ${srcdir}/config.table
955 host_makefile_frag=${frag}
958 # It's OK to check for header files. Although the compiler may not be
959 # able to link anything, it had better be able to at least compile
961 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
962 echo "configure:963: checking how to run the C preprocessor" >&5
963 # On Suns, sometimes $CPP names a directory.
964 if test -n "$CPP" && test -d "$CPP"; then
967 if test -z "$CPP"; then
968 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
971 # This must be in double quotes, not single quotes, because CPP may get
972 # substituted into the Makefile and "${CC-cc}" will confuse make.
974 # On the NeXT, cc -E runs the code through the compiler's parser,
975 # not just through cpp.
976 cat > conftest.$ac_ext <<EOF
977 #line 978 "configure"
978 #include "confdefs.h"
982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
983 { (eval echo configure:984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
984 ac_err=`grep -v '^ *+' conftest.out`
985 if test -z "$ac_err"; then
989 echo "configure: failed program was:" >&5
990 cat conftest.$ac_ext >&5
992 CPP="${CC-cc} -E -traditional-cpp"
993 cat > conftest.$ac_ext <<EOF
994 #line 995 "configure"
995 #include "confdefs.h"
999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1000 { (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1001 ac_err=`grep -v '^ *+' conftest.out`
1002 if test -z "$ac_err"; then
1006 echo "configure: failed program was:" >&5
1007 cat conftest.$ac_ext >&5
1014 ac_cv_prog_CPP="$CPP"
1016 CPP="$ac_cv_prog_CPP"
1018 ac_cv_prog_CPP="$CPP"
1020 echo "$ac_t""$CPP" 1>&6
1022 for ac_hdr in sys/file.h sys/param.h stdlib.h string.h
1024 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1025 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1026 echo "configure:1027: checking for $ac_hdr" >&5
1027 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1028 echo $ac_n "(cached) $ac_c" 1>&6
1030 cat > conftest.$ac_ext <<EOF
1031 #line 1032 "configure"
1032 #include "confdefs.h"
1035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1036 { (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1037 ac_err=`grep -v '^ *+' conftest.out`
1038 if test -z "$ac_err"; then
1040 eval "ac_cv_header_$ac_safe=yes"
1043 echo "configure: failed program was:" >&5
1044 cat conftest.$ac_ext >&5
1046 eval "ac_cv_header_$ac_safe=no"
1050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1051 echo "$ac_t""yes" 1>&6
1052 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1053 cat >> confdefs.h <<EOF
1054 #define $ac_tr_hdr 1
1058 echo "$ac_t""no" 1>&6
1063 # This is the list of functions which libiberty will provide if they
1064 # are not available on the host.
1067 funcs="$funcs atexit"
1068 funcs="$funcs basename"
1070 funcs="$funcs bcopy"
1071 funcs="$funcs bzero"
1072 funcs="$funcs clock"
1073 funcs="$funcs getcwd"
1074 funcs="$funcs getpagesize"
1075 funcs="$funcs index"
1076 funcs="$funcs insque"
1077 funcs="$funcs memchr"
1078 funcs="$funcs memcmp"
1079 funcs="$funcs memcpy"
1080 funcs="$funcs memmove"
1081 funcs="$funcs memset"
1082 funcs="$funcs random"
1083 funcs="$funcs rename"
1084 funcs="$funcs rindex"
1085 funcs="$funcs sigsetmask"
1086 funcs="$funcs strcasecmp"
1087 funcs="$funcs strchr"
1088 funcs="$funcs strdup"
1089 funcs="$funcs strncasecmp"
1090 funcs="$funcs strrchr"
1091 funcs="$funcs strstr"
1092 funcs="$funcs strtod"
1093 funcs="$funcs strtol"
1094 funcs="$funcs strtoul"
1095 funcs="$funcs tmpnam"
1096 funcs="$funcs vasprintf"
1097 funcs="$funcs vfprintf"
1098 funcs="$funcs vprintf"
1099 funcs="$funcs vsprintf"
1100 funcs="$funcs waitpid"
1102 # Also in the old function.def file: alloca, vfork, getopt.
1104 vars="sys_errlist sys_nerr sys_siglist"
1106 checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times"
1108 # These are neither executed nor required, but they help keep
1109 # autoheader happy without adding a bunch of text to acconfig.h.
1110 if test "x" = "y"; then
1111 for ac_func in asprintf atexit basename bcmp bcopy bzero clock getcwd
1113 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1114 echo "configure:1115: checking for $ac_func" >&5
1115 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1116 echo $ac_n "(cached) $ac_c" 1>&6
1118 cat > conftest.$ac_ext <<EOF
1119 #line 1120 "configure"
1120 #include "confdefs.h"
1121 /* System header to define __stub macros and hopefully few prototypes,
1122 which can conflict with char $ac_func(); below. */
1124 /* Override any gcc2 internal prototype to avoid an error. */
1125 /* We use char because int might match the return type of a gcc2
1126 builtin and then its argument prototype would still apply. */
1131 /* The GNU C library defines this for functions which it implements
1132 to always fail with ENOSYS. Some functions are actually named
1133 something starting with __ and the normal name is an alias. */
1134 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1142 if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1144 eval "ac_cv_func_$ac_func=yes"
1146 echo "configure: failed program was:" >&5
1147 cat conftest.$ac_ext >&5
1149 eval "ac_cv_func_$ac_func=no"
1154 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1155 echo "$ac_t""yes" 1>&6
1156 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1157 cat >> confdefs.h <<EOF
1158 #define $ac_tr_func 1
1162 echo "$ac_t""no" 1>&6
1166 for ac_func in getpagesize index insque memchr memcmp memcpy memmove
1168 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1169 echo "configure:1170: checking for $ac_func" >&5
1170 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1173 cat > conftest.$ac_ext <<EOF
1174 #line 1175 "configure"
1175 #include "confdefs.h"
1176 /* System header to define __stub macros and hopefully few prototypes,
1177 which can conflict with char $ac_func(); below. */
1179 /* Override any gcc2 internal prototype to avoid an error. */
1180 /* We use char because int might match the return type of a gcc2
1181 builtin and then its argument prototype would still apply. */
1186 /* The GNU C library defines this for functions which it implements
1187 to always fail with ENOSYS. Some functions are actually named
1188 something starting with __ and the normal name is an alias. */
1189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1197 if { (eval echo configure:1198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1199 eval "ac_cv_func_$ac_func=yes"
1201 echo "configure: failed program was:" >&5
1202 cat conftest.$ac_ext >&5
1204 eval "ac_cv_func_$ac_func=no"
1209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1210 echo "$ac_t""yes" 1>&6
1211 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1212 cat >> confdefs.h <<EOF
1213 #define $ac_tr_func 1
1217 echo "$ac_t""no" 1>&6
1221 for ac_func in memset random rename rindex sigsetmask strcasecmp
1223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1224 echo "configure:1225: checking for $ac_func" >&5
1225 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1226 echo $ac_n "(cached) $ac_c" 1>&6
1228 cat > conftest.$ac_ext <<EOF
1229 #line 1230 "configure"
1230 #include "confdefs.h"
1231 /* System header to define __stub macros and hopefully few prototypes,
1232 which can conflict with char $ac_func(); below. */
1234 /* Override any gcc2 internal prototype to avoid an error. */
1235 /* We use char because int might match the return type of a gcc2
1236 builtin and then its argument prototype would still apply. */
1241 /* The GNU C library defines this for functions which it implements
1242 to always fail with ENOSYS. Some functions are actually named
1243 something starting with __ and the normal name is an alias. */
1244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1252 if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1254 eval "ac_cv_func_$ac_func=yes"
1256 echo "configure: failed program was:" >&5
1257 cat conftest.$ac_ext >&5
1259 eval "ac_cv_func_$ac_func=no"
1264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1265 echo "$ac_t""yes" 1>&6
1266 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1267 cat >> confdefs.h <<EOF
1268 #define $ac_tr_func 1
1272 echo "$ac_t""no" 1>&6
1276 for ac_func in strchr strdup strncasecmp strrchr strstr strtod strtol
1278 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1279 echo "configure:1280: checking for $ac_func" >&5
1280 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1281 echo $ac_n "(cached) $ac_c" 1>&6
1283 cat > conftest.$ac_ext <<EOF
1284 #line 1285 "configure"
1285 #include "confdefs.h"
1286 /* System header to define __stub macros and hopefully few prototypes,
1287 which can conflict with char $ac_func(); below. */
1289 /* Override any gcc2 internal prototype to avoid an error. */
1290 /* We use char because int might match the return type of a gcc2
1291 builtin and then its argument prototype would still apply. */
1296 /* The GNU C library defines this for functions which it implements
1297 to always fail with ENOSYS. Some functions are actually named
1298 something starting with __ and the normal name is an alias. */
1299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1307 if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1309 eval "ac_cv_func_$ac_func=yes"
1311 echo "configure: failed program was:" >&5
1312 cat conftest.$ac_ext >&5
1314 eval "ac_cv_func_$ac_func=no"
1319 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1320 echo "$ac_t""yes" 1>&6
1321 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1322 cat >> confdefs.h <<EOF
1323 #define $ac_tr_func 1
1327 echo "$ac_t""no" 1>&6
1331 for ac_func in strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid
1333 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1334 echo "configure:1335: checking for $ac_func" >&5
1335 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1338 cat > conftest.$ac_ext <<EOF
1339 #line 1340 "configure"
1340 #include "confdefs.h"
1341 /* System header to define __stub macros and hopefully few prototypes,
1342 which can conflict with char $ac_func(); below. */
1344 /* Override any gcc2 internal prototype to avoid an error. */
1345 /* We use char because int might match the return type of a gcc2
1346 builtin and then its argument prototype would still apply. */
1351 /* The GNU C library defines this for functions which it implements
1352 to always fail with ENOSYS. Some functions are actually named
1353 something starting with __ and the normal name is an alias. */
1354 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1362 if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1364 eval "ac_cv_func_$ac_func=yes"
1366 echo "configure: failed program was:" >&5
1367 cat conftest.$ac_ext >&5
1369 eval "ac_cv_func_$ac_func=no"
1374 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1375 echo "$ac_t""yes" 1>&6
1376 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1377 cat >> confdefs.h <<EOF
1378 #define $ac_tr_func 1
1382 echo "$ac_t""no" 1>&6
1386 cat >> confdefs.h <<\EOF
1387 #define HAVE_SYS_ERRLIST 1
1390 cat >> confdefs.h <<\EOF
1391 #define HAVE_SYS_NERR 1
1394 cat >> confdefs.h <<\EOF
1395 #define HAVE_SYS_SIGLIST 1
1398 for ac_func in getrusage on_exit psignal strerror strsignal sysconf times
1400 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1401 echo "configure:1402: checking for $ac_func" >&5
1402 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1403 echo $ac_n "(cached) $ac_c" 1>&6
1405 cat > conftest.$ac_ext <<EOF
1406 #line 1407 "configure"
1407 #include "confdefs.h"
1408 /* System header to define __stub macros and hopefully few prototypes,
1409 which can conflict with char $ac_func(); below. */
1411 /* Override any gcc2 internal prototype to avoid an error. */
1412 /* We use char because int might match the return type of a gcc2
1413 builtin and then its argument prototype would still apply. */
1418 /* The GNU C library defines this for functions which it implements
1419 to always fail with ENOSYS. Some functions are actually named
1420 something starting with __ and the normal name is an alias. */
1421 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1429 if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1431 eval "ac_cv_func_$ac_func=yes"
1433 echo "configure: failed program was:" >&5
1434 cat conftest.$ac_ext >&5
1436 eval "ac_cv_func_$ac_func=no"
1441 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1442 echo "$ac_t""yes" 1>&6
1443 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1444 cat >> confdefs.h <<EOF
1445 #define $ac_tr_func 1
1449 echo "$ac_t""no" 1>&6
1455 # For each of these functions, if the host does not provide the
1456 # function we want to put FN.o in LIBOBJS, and if the host does
1457 # provide the function, we want to define HAVE_FN in config.h. Also,
1458 # if the host does not provide alloca, we set ALLOCA to alloca.o
1461 if test -n "${with_target_subdir}"; then
1463 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
1464 # may not work correctly, because the compiler may not be able to
1467 # If we are being configured for newlib, we know which functions
1468 # newlib provide and which ones we will be expected to provide.
1470 if test "x${with_newlib}" = "xyes"; then
1472 LIBOBJS="basename.o insque.o random.o strdup.o vasprintf.o"
1476 basename | insque | random | strdup | vasprintf)
1479 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1480 cat >> confdefs.h <<EOF
1488 # newlib doesnt provide any of the variables in $vars, so we
1489 # dont have to check them here.
1491 # Of the functions in $checkfuncs, VxWorks only has strerror.
1492 cat >> confdefs.h <<\EOF
1493 #define HAVE_STRERROR 1
1502 if test -z "${setobjs}"; then
1506 # Handle VxWorks configuration specially, since on VxWorks the
1507 # libraries are actually on the target board, not in the file
1509 LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o"
1510 LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o"
1513 basename | getpagesize | insque | random | strcasecmp)
1515 strncasecmp | strdup | vfork | waitpid | vasprintf)
1518 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1519 cat >> confdefs.h <<EOF
1527 # VxWorks doesn't provide any of the variables in $vars, so we
1528 # don't have to check them here.
1530 # Of the functions in $checkfuncs, VxWorks only has strerror.
1531 cat >> confdefs.h <<\EOF
1532 #define HAVE_STRERROR 1
1542 if test -z "${setobjs}"; then
1547 # The cygwin32 library actually uses a couple of files from
1548 # libiberty when it is built. If we are building a native
1549 # cygwin32, and we run the tests, we will appear to have these
1550 # files. However, when we go on to build winsup, we will wind up
1551 # with a library which does not have the files, since they should
1552 # have come from libiberty.
1554 # We handle this by removing the functions the winsup library
1555 # provides from our shell variables, so that they appear to be
1558 funcs="`echo $funcs | sed -e 's/random//'`"
1559 LIBOBJS="$LIBOBJS random.o"
1560 vars="`echo $vars | sed -e 's/sys_siglist//'`"
1561 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//`"
1565 # Under mingw32, sys_nerr and sys_errlist exist, but they are
1566 # macros, so the test below won't find them.
1567 vars="`echo $vars | sed -e 's/sys_nerr//' -e 's/sys_errlist//'`"
1568 cat >> confdefs.h <<\EOF
1569 #define HAVE_SYS_NERR 1
1572 cat >> confdefs.h <<\EOF
1573 #define HAVE_SYS_ERRLIST 1
1580 # We haven't set the list of objects yet. Use the standard autoconf
1581 # tests. This will only work if the compiler works.
1582 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1583 echo "configure:1584: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1586 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1587 ac_cpp='$CPP $CPPFLAGS'
1588 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1589 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1590 cross_compiling=$ac_cv_prog_cc_cross
1592 cat > conftest.$ac_ext <<EOF
1593 #line 1594 "configure"
1594 #include "confdefs.h"
1597 if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1598 ac_cv_prog_cc_works=yes
1599 # If we can't run a trivial program, we are probably using a cross compiler.
1600 if (./conftest; exit) 2>/dev/null; then
1601 ac_cv_prog_cc_cross=no
1603 ac_cv_prog_cc_cross=yes
1606 echo "configure: failed program was:" >&5
1607 cat conftest.$ac_ext >&5
1608 ac_cv_prog_cc_works=no
1612 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1613 if test $ac_cv_prog_cc_works = no; then
1614 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1616 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1617 echo "configure:1618: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1618 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1619 cross_compiling=$ac_cv_prog_cc_cross
1621 for ac_func in $funcs
1623 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1624 echo "configure:1625: checking for $ac_func" >&5
1625 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1628 cat > conftest.$ac_ext <<EOF
1629 #line 1630 "configure"
1630 #include "confdefs.h"
1631 /* System header to define __stub macros and hopefully few prototypes,
1632 which can conflict with char $ac_func(); below. */
1634 /* Override any gcc2 internal prototype to avoid an error. */
1635 /* We use char because int might match the return type of a gcc2
1636 builtin and then its argument prototype would still apply. */
1641 /* The GNU C library defines this for functions which it implements
1642 to always fail with ENOSYS. Some functions are actually named
1643 something starting with __ and the normal name is an alias. */
1644 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1652 if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1654 eval "ac_cv_func_$ac_func=yes"
1656 echo "configure: failed program was:" >&5
1657 cat conftest.$ac_ext >&5
1659 eval "ac_cv_func_$ac_func=no"
1664 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1665 echo "$ac_t""yes" 1>&6
1666 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1667 cat >> confdefs.h <<EOF
1668 #define $ac_tr_func 1
1672 echo "$ac_t""no" 1>&6
1673 LIBOBJS="$LIBOBJS ${ac_func}.o"
1678 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1679 # for constant arguments. Useless!
1680 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1681 echo "configure:1682: checking for working alloca.h" >&5
1682 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1683 echo $ac_n "(cached) $ac_c" 1>&6
1685 cat > conftest.$ac_ext <<EOF
1686 #line 1687 "configure"
1687 #include "confdefs.h"
1690 char *p = alloca(2 * sizeof(int));
1693 if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1695 ac_cv_header_alloca_h=yes
1697 echo "configure: failed program was:" >&5
1698 cat conftest.$ac_ext >&5
1700 ac_cv_header_alloca_h=no
1705 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1706 if test $ac_cv_header_alloca_h = yes; then
1707 cat >> confdefs.h <<\EOF
1708 #define HAVE_ALLOCA_H 1
1713 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1714 echo "configure:1715: checking for alloca" >&5
1715 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1716 echo $ac_n "(cached) $ac_c" 1>&6
1718 cat > conftest.$ac_ext <<EOF
1719 #line 1720 "configure"
1720 #include "confdefs.h"
1723 # define alloca __builtin_alloca
1726 # include <alloca.h>
1731 # ifndef alloca /* predefined by HP cc +Olibcalls */
1739 char *p = (char *) alloca(1);
1742 if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1744 ac_cv_func_alloca_works=yes
1746 echo "configure: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1749 ac_cv_func_alloca_works=no
1754 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1755 if test $ac_cv_func_alloca_works = yes; then
1756 cat >> confdefs.h <<\EOF
1757 #define HAVE_ALLOCA 1
1762 if test $ac_cv_func_alloca_works = no; then
1763 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1764 # that cause trouble. Some versions do not even contain alloca or
1765 # contain a buggy version. If you still want to use their alloca,
1766 # use ar to extract alloca.o from them instead of compiling alloca.c.
1768 cat >> confdefs.h <<\EOF
1773 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1774 echo "configure:1775: checking whether alloca needs Cray hooks" >&5
1775 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1778 cat > conftest.$ac_ext <<EOF
1779 #line 1780 "configure"
1780 #include "confdefs.h"
1781 #if defined(CRAY) && ! defined(CRAY2)
1788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1789 egrep "webecray" >/dev/null 2>&1; then
1800 echo "$ac_t""$ac_cv_os_cray" 1>&6
1801 if test $ac_cv_os_cray = yes; then
1802 for ac_func in _getb67 GETB67 getb67; do
1803 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1804 echo "configure:1805: checking for $ac_func" >&5
1805 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1808 cat > conftest.$ac_ext <<EOF
1809 #line 1810 "configure"
1810 #include "confdefs.h"
1811 /* System header to define __stub macros and hopefully few prototypes,
1812 which can conflict with char $ac_func(); below. */
1814 /* Override any gcc2 internal prototype to avoid an error. */
1815 /* We use char because int might match the return type of a gcc2
1816 builtin and then its argument prototype would still apply. */
1821 /* The GNU C library defines this for functions which it implements
1822 to always fail with ENOSYS. Some functions are actually named
1823 something starting with __ and the normal name is an alias. */
1824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1832 if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1834 eval "ac_cv_func_$ac_func=yes"
1836 echo "configure: failed program was:" >&5
1837 cat conftest.$ac_ext >&5
1839 eval "ac_cv_func_$ac_func=no"
1844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1845 echo "$ac_t""yes" 1>&6
1846 cat >> confdefs.h <<EOF
1847 #define CRAY_STACKSEG_END $ac_func
1852 echo "$ac_t""no" 1>&6
1858 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1859 echo "configure:1860: checking stack direction for C alloca" >&5
1860 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1861 echo $ac_n "(cached) $ac_c" 1>&6
1863 if test "$cross_compiling" = yes; then
1864 ac_cv_c_stack_direction=0
1866 cat > conftest.$ac_ext <<EOF
1867 #line 1868 "configure"
1868 #include "confdefs.h"
1869 find_stack_direction ()
1871 static char *addr = 0;
1876 return find_stack_direction ();
1879 return (&dummy > addr) ? 1 : -1;
1883 exit (find_stack_direction() < 0);
1886 if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1888 ac_cv_c_stack_direction=1
1890 echo "configure: failed program was:" >&5
1891 cat conftest.$ac_ext >&5
1893 ac_cv_c_stack_direction=-1
1900 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1901 cat >> confdefs.h <<EOF
1902 #define STACK_DIRECTION $ac_cv_c_stack_direction
1907 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1908 echo "configure:1909: checking for ANSI C header files" >&5
1909 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1910 echo $ac_n "(cached) $ac_c" 1>&6
1912 cat > conftest.$ac_ext <<EOF
1913 #line 1914 "configure"
1914 #include "confdefs.h"
1920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1921 { (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1922 ac_err=`grep -v '^ *+' conftest.out`
1923 if test -z "$ac_err"; then
1925 ac_cv_header_stdc=yes
1928 echo "configure: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
1931 ac_cv_header_stdc=no
1935 if test $ac_cv_header_stdc = yes; then
1936 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1937 cat > conftest.$ac_ext <<EOF
1938 #line 1939 "configure"
1939 #include "confdefs.h"
1942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1943 egrep "memchr" >/dev/null 2>&1; then
1947 ac_cv_header_stdc=no
1953 if test $ac_cv_header_stdc = yes; then
1954 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1955 cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1961 egrep "free" >/dev/null 2>&1; then
1965 ac_cv_header_stdc=no
1971 if test $ac_cv_header_stdc = yes; then
1972 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1973 if test "$cross_compiling" = yes; then
1976 cat > conftest.$ac_ext <<EOF
1977 #line 1978 "configure"
1978 #include "confdefs.h"
1980 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1981 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1982 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1983 int main () { int i; for (i = 0; i < 256; i++)
1984 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1988 if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1992 echo "configure: failed program was:" >&5
1993 cat conftest.$ac_ext >&5
1995 ac_cv_header_stdc=no
2003 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2004 if test $ac_cv_header_stdc = yes; then
2005 cat >> confdefs.h <<\EOF
2006 #define STDC_HEADERS 1
2011 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2012 echo "configure:2013: checking for pid_t" >&5
2013 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2014 echo $ac_n "(cached) $ac_c" 1>&6
2016 cat > conftest.$ac_ext <<EOF
2017 #line 2018 "configure"
2018 #include "confdefs.h"
2019 #include <sys/types.h>
2025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2026 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2028 ac_cv_type_pid_t=yes
2036 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2037 if test $ac_cv_type_pid_t = no; then
2038 cat >> confdefs.h <<\EOF
2044 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2045 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2046 echo "configure:2047: checking for vfork.h" >&5
2047 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2048 echo $ac_n "(cached) $ac_c" 1>&6
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2056 { (eval echo configure:2057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2057 ac_err=`grep -v '^ *+' conftest.out`
2058 if test -z "$ac_err"; then
2060 eval "ac_cv_header_$ac_safe=yes"
2063 echo "configure: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2066 eval "ac_cv_header_$ac_safe=no"
2070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2071 echo "$ac_t""yes" 1>&6
2072 cat >> confdefs.h <<\EOF
2073 #define HAVE_VFORK_H 1
2077 echo "$ac_t""no" 1>&6
2080 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
2081 echo "configure:2082: checking for working vfork" >&5
2082 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
2085 if test "$cross_compiling" = yes; then
2086 echo $ac_n "checking for vfork""... $ac_c" 1>&6
2087 echo "configure:2088: checking for vfork" >&5
2088 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2089 echo $ac_n "(cached) $ac_c" 1>&6
2091 cat > conftest.$ac_ext <<EOF
2092 #line 2093 "configure"
2093 #include "confdefs.h"
2094 /* System header to define __stub macros and hopefully few prototypes,
2095 which can conflict with char vfork(); below. */
2097 /* Override any gcc2 internal prototype to avoid an error. */
2098 /* We use char because int might match the return type of a gcc2
2099 builtin and then its argument prototype would still apply. */
2104 /* The GNU C library defines this for functions which it implements
2105 to always fail with ENOSYS. Some functions are actually named
2106 something starting with __ and the normal name is an alias. */
2107 #if defined (__stub_vfork) || defined (__stub___vfork)
2115 if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2117 eval "ac_cv_func_vfork=yes"
2119 echo "configure: failed program was:" >&5
2120 cat conftest.$ac_ext >&5
2122 eval "ac_cv_func_vfork=no"
2127 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2128 echo "$ac_t""yes" 1>&6
2131 echo "$ac_t""no" 1>&6
2134 ac_cv_func_vfork_works=$ac_cv_func_vfork
2136 cat > conftest.$ac_ext <<EOF
2137 #line 2138 "configure"
2138 #include "confdefs.h"
2139 /* Thanks to Paul Eggert for this test. */
2141 #include <sys/types.h>
2142 #include <sys/stat.h>
2143 #ifdef HAVE_UNISTD_H
2149 /* On some sparc systems, changes by the child to local and incoming
2150 argument registers are propagated back to the parent.
2151 The compiler is told about this with #include <vfork.h>,
2152 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2153 Test for this by using a static variable whose address
2154 is put into a register that is clobbered by the vfork. */
2157 sparc_address_test (int arg)
2159 sparc_address_test (arg) int arg;
2177 pid_t parent = getpid ();
2180 sparc_address_test ();
2185 /* Here is another test for sparc vfork register problems.
2186 This test uses lots of local variables, at least
2187 as many local variables as main has allocated so far
2188 including compiler temporaries. 4 locals are enough for
2189 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2190 A buggy compiler should reuse the register of parent
2191 for one of the local variables, since it will think that
2192 parent can't possibly be used any more in this routine.
2193 Assigning to the local variable will thus munge parent
2194 in the parent process. */
2196 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2197 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2198 /* Convince the compiler that p..p7 are live; otherwise, it might
2199 use the same hardware register for all 8 local variables. */
2200 if (p != p1 || p != p2 || p != p3 || p != p4
2201 || p != p5 || p != p6 || p != p7)
2204 /* On some systems (e.g. IRIX 3.3),
2205 vfork doesn't separate parent from child file descriptors.
2206 If the child closes a descriptor before it execs or exits,
2207 this munges the parent's descriptor as well.
2208 Test for this by closing stdout in the child. */
2209 _exit(close(fileno(stdout)) != 0);
2214 while (wait(&status) != child)
2217 /* Was there some problem with vforking? */
2220 /* Did the child fail? (This shouldn't happen.) */
2223 /* Did the vfork/compiler bug occur? */
2224 || parent != getpid()
2226 /* Did the file descriptor bug occur? */
2227 || fstat(fileno(stdout), &st) != 0
2232 if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2234 ac_cv_func_vfork_works=yes
2236 echo "configure: failed program was:" >&5
2237 cat conftest.$ac_ext >&5
2239 ac_cv_func_vfork_works=no
2246 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2247 if test $ac_cv_func_vfork_works = no; then
2248 cat >> confdefs.h <<\EOF
2254 if test $ac_cv_func_vfork_works = no; then
2255 LIBOBJS="$LIBOBJS vfork.o"
2258 echo $ac_n "checking for $v""... $ac_c" 1>&6
2259 echo "configure:2260: checking for $v" >&5
2260 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
2261 echo $ac_n "(cached) $ac_c" 1>&6
2263 cat > conftest.$ac_ext <<EOF
2264 #line 2265 "configure"
2265 #include "confdefs.h"
2268 extern int $v; p = &$v;
2271 if { (eval echo configure:2272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2273 eval "libiberty_cv_var_$v=yes"
2275 echo "configure: failed program was:" >&5
2276 cat conftest.$ac_ext >&5
2278 eval "libiberty_cv_var_$v=no"
2283 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
2284 echo "$ac_t""yes" 1>&6
2285 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2286 cat >> confdefs.h <<EOF
2291 echo "$ac_t""no" 1>&6
2294 for ac_func in $checkfuncs
2296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2297 echo "configure:2298: checking for $ac_func" >&5
2298 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2299 echo $ac_n "(cached) $ac_c" 1>&6
2301 cat > conftest.$ac_ext <<EOF
2302 #line 2303 "configure"
2303 #include "confdefs.h"
2304 /* System header to define __stub macros and hopefully few prototypes,
2305 which can conflict with char $ac_func(); below. */
2307 /* Override any gcc2 internal prototype to avoid an error. */
2308 /* We use char because int might match the return type of a gcc2
2309 builtin and then its argument prototype would still apply. */
2314 /* The GNU C library defines this for functions which it implements
2315 to always fail with ENOSYS. Some functions are actually named
2316 something starting with __ and the normal name is an alias. */
2317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2327 eval "ac_cv_func_$ac_func=yes"
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2332 eval "ac_cv_func_$ac_func=no"
2337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2338 echo "$ac_t""yes" 1>&6
2339 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2340 cat >> confdefs.h <<EOF
2341 #define $ac_tr_func 1
2345 echo "$ac_t""no" 1>&6
2351 # Install a library built with a cross compiler in $(tooldir) rather
2353 if test -z "${with_target_subdir}"; then
2356 INSTALL_DEST=tooldir
2360 # We need multilib support, but only if configuring for the target.
2362 cat > confcache <<\EOF
2363 # This file is a shell script that caches the results of configure
2364 # tests run on this system so they can be shared between configure
2365 # scripts and configure runs. It is not useful on other systems.
2366 # If it contains results you don't want to keep, you may remove or edit it.
2368 # By default, configure uses ./config.cache as the cache file,
2369 # creating it if it does not exist already. You can give configure
2370 # the --cache-file=FILE option to use a different cache file; that is
2371 # what configure does when it calls configure scripts in
2372 # subdirectories, so they share the cache.
2373 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2374 # config.status only pays attention to the cache file if you give it the
2375 # --recheck option to rerun configure.
2378 # The following way of writing the cache mishandles newlines in values,
2379 # but we know of no workaround that is simple, portable, and efficient.
2380 # So, don't put newlines in cache variables' values.
2381 # Ultrix sh set writes to stderr and can't be redirected directly,
2382 # and sets the high bit in the cache file unless we assign to the vars.
2384 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
2386 # `set' does not quote correctly, so add quotes (double-quote substitution
2387 # turns \\\\ into \\, and sed turns \\ into \).
2389 -e "s/'/'\\\\''/g" \
2390 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2393 # `set' quotes correctly as required by POSIX, so do not add quotes.
2394 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2397 if cmp -s $cache_file confcache; then
2400 if test -w $cache_file; then
2401 echo "updating cache $cache_file"
2402 cat confcache > $cache_file
2404 echo "not updating unwritable cache $cache_file"
2409 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2411 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2412 # Let make expand exec_prefix.
2413 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2415 # Any assignment to VPATH causes Sun make to only execute
2416 # the first set of double-colon rules, so remove it if not needed.
2417 # If there is a colon in the path, we need to keep it.
2418 if test "x$srcdir" = x.; then
2419 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2422 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2424 DEFS=-DHAVE_CONFIG_H
2426 # Without the "./", some shells look in PATH for config.status.
2427 : ${CONFIG_STATUS=./config.status}
2429 echo creating $CONFIG_STATUS
2430 rm -f $CONFIG_STATUS
2431 cat > $CONFIG_STATUS <<EOF
2433 # Generated automatically by configure.
2434 # Run this file to recreate the current configuration.
2435 # This directory was configured as follows,
2436 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2438 # $0 $ac_configure_args
2440 # Compiler output produced by configure, useful for debugging
2441 # configure, is in ./config.log if it exists.
2443 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2446 case "\$ac_option" in
2447 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2448 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2449 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2450 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2451 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
2453 -help | --help | --hel | --he | --h)
2454 echo "\$ac_cs_usage"; exit 0 ;;
2455 *) echo "\$ac_cs_usage"; exit 1 ;;
2459 ac_given_srcdir=$srcdir
2460 ac_given_INSTALL="$INSTALL"
2462 trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2464 cat >> $CONFIG_STATUS <<EOF
2466 # Protect against being on the right side of a sed subst in config.status.
2467 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2468 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2472 s%@CFLAGS@%$CFLAGS%g
2473 s%@CPPFLAGS@%$CPPFLAGS%g
2474 s%@CXXFLAGS@%$CXXFLAGS%g
2476 s%@LDFLAGS@%$LDFLAGS%g
2478 s%@exec_prefix@%$exec_prefix%g
2479 s%@prefix@%$prefix%g
2480 s%@program_transform_name@%$program_transform_name%g
2481 s%@bindir@%$bindir%g
2482 s%@sbindir@%$sbindir%g
2483 s%@libexecdir@%$libexecdir%g
2484 s%@datadir@%$datadir%g
2485 s%@sysconfdir@%$sysconfdir%g
2486 s%@sharedstatedir@%$sharedstatedir%g
2487 s%@localstatedir@%$localstatedir%g
2488 s%@libdir@%$libdir%g
2489 s%@includedir@%$includedir%g
2490 s%@oldincludedir@%$oldincludedir%g
2491 s%@infodir@%$infodir%g
2492 s%@mandir@%$mandir%g
2494 s%@host_alias@%$host_alias%g
2495 s%@host_cpu@%$host_cpu%g
2496 s%@host_vendor@%$host_vendor%g
2497 s%@host_os@%$host_os%g
2499 s%@build_alias@%$build_alias%g
2500 s%@build_cpu@%$build_cpu%g
2501 s%@build_vendor@%$build_vendor%g
2502 s%@build_os@%$build_os%g
2504 s%@RANLIB@%$RANLIB%g
2506 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2507 s%@INSTALL_DATA@%$INSTALL_DATA%g
2508 /@host_makefile_frag@/r $host_makefile_frag
2509 s%@host_makefile_frag@%%g
2511 s%@LIBOBJS@%$LIBOBJS%g
2512 s%@ALLOCA@%$ALLOCA%g
2513 s%@INSTALL_DEST@%$INSTALL_DEST%g
2518 cat >> $CONFIG_STATUS <<\EOF
2520 # Split the substitutions into bite-sized pieces for seds with
2521 # small command number limits, like on Digital OSF/1 and HP-UX.
2522 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2523 ac_file=1 # Number of current file.
2524 ac_beg=1 # First line for current file.
2525 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2528 while $ac_more_lines; do
2529 if test $ac_beg -gt 1; then
2530 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2532 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2534 if test ! -s conftest.s$ac_file; then
2536 rm -f conftest.s$ac_file
2538 if test -z "$ac_sed_cmds"; then
2539 ac_sed_cmds="sed -f conftest.s$ac_file"
2541 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2543 ac_file=`expr $ac_file + 1`
2545 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2548 if test -z "$ac_sed_cmds"; then
2553 cat >> $CONFIG_STATUS <<EOF
2555 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2557 cat >> $CONFIG_STATUS <<\EOF
2558 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2559 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2561 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2562 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2563 *) ac_file_in="${ac_file}.in" ;;
2566 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2568 # Remove last slash and all that follows it. Not all systems have dirname.
2569 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2570 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2571 # The file is in a subdirectory.
2572 test ! -d "$ac_dir" && mkdir "$ac_dir"
2573 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2574 # A "../" for each directory in $ac_dir_suffix.
2575 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2577 ac_dir_suffix= ac_dots=
2580 case "$ac_given_srcdir" in
2582 if test -z "$ac_dots"; then top_srcdir=.
2583 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2584 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2586 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2587 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2590 case "$ac_given_INSTALL" in
2591 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2592 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2595 echo creating "$ac_file"
2597 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2599 *Makefile*) ac_comsub="1i\\
2600 # $configure_input" ;;
2604 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2606 s%@configure_input@%$configure_input%g
2607 s%@srcdir@%$srcdir%g
2608 s%@top_srcdir@%$top_srcdir%g
2609 s%@INSTALL@%$INSTALL%g
2610 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2614 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2615 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2617 # ac_d sets the value in "#define NAME VALUE" lines.
2618 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2619 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2622 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2623 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2624 ac_uB='\([ ]\)%\1#\2define\3'
2627 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2628 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2629 ac_eB='$%\1#\2define\3'
2633 if test "${CONFIG_HEADERS+set}" != set; then
2635 cat >> $CONFIG_STATUS <<EOF
2636 CONFIG_HEADERS="config.h:config.in"
2638 cat >> $CONFIG_STATUS <<\EOF
2640 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2641 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2643 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2644 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2645 *) ac_file_in="${ac_file}.in" ;;
2648 echo creating $ac_file
2650 rm -f conftest.frag conftest.in conftest.out
2651 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2652 cat $ac_file_inputs > conftest.in
2656 # Transform confdefs.h into a sed script conftest.vals that substitutes
2657 # the proper values into config.h.in to produce config.h. And first:
2658 # Protect against being on the right side of a sed subst in config.status.
2659 # Protect against being in an unquoted here document in config.status.
2661 cat > conftest.hdr <<\EOF
2664 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2668 sed -n -f conftest.hdr confdefs.h > conftest.vals
2671 # This sed command replaces #undef with comments. This is necessary, for
2672 # example, in the case of _POSIX_SOURCE, which is predefined and required
2673 # on some systems where configure will not decide to define it.
2674 cat >> conftest.vals <<\EOF
2675 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2678 # Break up conftest.vals because some shells have a limit on
2679 # the size of here documents, and old seds have small limits too.
2684 ac_lines=`grep -c . conftest.vals`
2685 # grep -c gives empty output for an empty file on some AIX systems.
2686 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2687 # Write a limited-size here document to conftest.frag.
2688 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2689 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2691 sed -f conftest.frag conftest.in > conftest.out
2693 mv conftest.out conftest.in
2695 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2697 mv conftest.tail conftest.vals
2701 cat >> $CONFIG_STATUS <<\EOF
2702 rm -f conftest.frag conftest.h
2703 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2704 cat conftest.in >> conftest.h
2706 if cmp -s $ac_file conftest.h 2>/dev/null; then
2707 echo "$ac_file is unchanged"
2710 # Remove last slash and all that follows it. Not all systems have dirname.
2711 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2712 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2713 # The file is in a subdirectory.
2714 test ! -d "$ac_dir" && mkdir "$ac_dir"
2717 mv conftest.h $ac_file
2722 cat >> $CONFIG_STATUS <<EOF
2726 with_target_subdir=${with_target_subdir}
2727 with_multisubdir=${with_multisubdir}
2728 ac_configure_args="--enable-multilib ${ac_configure_args}"
2729 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2730 libiberty_topdir=${libiberty_topdir}
2733 cat >> $CONFIG_STATUS <<\EOF
2734 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2735 if test -n "$CONFIG_FILES"; then
2736 if test -n "${with_target_subdir}"; then
2737 # FIXME: We shouldn't need to set ac_file
2739 . ${libiberty_topdir}/config-ml.in
2744 chmod +x $CONFIG_STATUS
2745 rm -fr confdefs* $ac_clean_files
2746 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1