Add aliases in nested blocks
[official-gcc.git] / libiberty / configure
blob7de36aa2149f8fe9652c222ac937826248ddb43e
1 #! /bin/sh
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.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-target-subdir=SUBDIR Configuring with a cross compiler"
16 ac_help="$ac_help
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.
22 build=NONE
23 cache_file=./config.cache
24 exec_prefix=NONE
25 host=NONE
26 no_create=
27 nonopt=NONE
28 no_recursion=
29 prefix=NONE
30 program_prefix=NONE
31 program_suffix=NONE
32 program_transform_name=s,x,x,
33 silent=
34 site=
35 srcdir=
36 target=NONE
37 verbose=
38 x_includes=NONE
39 x_libraries=NONE
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.
54 subdirs=
55 MFLAGS= MAKEFLAGS=
56 SHELL=${CONFIG_SHELL-/bin/sh}
57 # Maximum number of lines to put in a shell here document.
58 ac_max_here_lines=12
60 ac_prev=
61 for ac_option
64 # If the previous option needs an argument, assign it.
65 if test -n "$ac_prev"; then
66 eval "$ac_prev=\$ac_option"
67 ac_prev=
68 continue
71 case "$ac_option" in
72 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73 *) ac_optarg= ;;
74 esac
76 # Accept the important Cygnus configure options, so we can diagnose typos.
78 case "$ac_option" in
80 -bindir | --bindir | --bindi | --bind | --bin | --bi)
81 ac_prev=bindir ;;
82 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
83 bindir="$ac_optarg" ;;
85 -build | --build | --buil | --bui | --bu)
86 ac_prev=build ;;
87 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
88 build="$ac_optarg" ;;
90 -cache-file | --cache-file | --cache-fil | --cache-fi \
91 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
92 ac_prev=cache_file ;;
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)
98 ac_prev=datadir ;;
99 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
100 | --da=*)
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'`
119 case "$ac_option" in
120 *=*) ;;
121 *) ac_optarg=yes ;;
122 esac
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.
136 with_gas=yes ;;
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.
141 cat << EOF
142 Usage: configure [options] [host]
143 Options: [defaults in brackets after descriptions]
144 Configuration:
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
152 [$ac_default_prefix]
153 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
154 [same as prefix]
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
159 [PREFIX/share]
160 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
161 --sharedstatedir=DIR modifiable architecture-independent data in DIR
162 [PREFIX/com]
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
175 cat << EOF
176 Host type:
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"
191 exit 0 ;;
193 -host | --host | --hos | --ho)
194 ac_prev=host ;;
195 -host=* | --host=* | --hos=* | --ho=*)
196 host="$ac_optarg" ;;
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)
206 ac_prev=infodir ;;
207 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
208 infodir="$ac_optarg" ;;
210 -libdir | --libdir | --libdi | --libd)
211 ac_prev=libdir ;;
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)
232 ac_prev=mandir ;;
233 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
234 mandir="$ac_optarg" ;;
236 -nfp | --nfp | --nf)
237 # Obsolete; use --without-fp.
238 with_fp=no ;;
240 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
241 | --no-cr | --no-c)
242 no_create=yes ;;
244 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
245 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
246 no_recursion=yes ;;
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)
258 ac_prev=prefix ;;
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)
295 silent=yes ;;
297 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
298 ac_prev=sbindir ;;
299 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
300 | --sbi=* | --sb=*)
301 sbindir="$ac_optarg" ;;
303 -sharedstatedir | --sharedstatedir | --sharedstatedi \
304 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
305 | --sharedst | --shareds | --shared | --share | --shar \
306 | --sha | --sh)
307 ac_prev=sharedstatedir ;;
308 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
309 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
310 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
311 | --sha=* | --sh=*)
312 sharedstatedir="$ac_optarg" ;;
314 -site | --site | --sit)
315 ac_prev=site ;;
316 -site=* | --site=* | --sit=*)
317 site="$ac_optarg" ;;
319 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
320 ac_prev=srcdir ;;
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)
332 ac_prev=target ;;
333 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
334 target="$ac_optarg" ;;
336 -v | -verbose | --verbose | --verbos | --verbo | --verb)
337 verbose=yes ;;
339 -version | --version | --versio | --versi | --vers)
340 echo "configure generated by autoconf version 2.12.1"
341 exit 0 ;;
343 -with-* | --with-*)
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'`
350 case "$ac_option" in
351 *=*) ;;
352 *) ac_optarg=yes ;;
353 esac
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" ;;
365 --x)
366 # Obsolete; use --with-x.
367 with_x=yes ;;
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; }
393 nonopt="$ac_option"
396 esac
397 done
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:
406 # 0 standard input
407 # 1 file creation
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
414 exec 6>/dev/null
415 else
416 exec 6>&1
418 exec 5>./config.log
420 echo "\
421 This file contains any messages produced by compilers while
422 running configure, to aid debugging if configure makes a mistake.
423 " 1>&5
425 # Strip out --no-create and --no-recursion so they do not pile up.
426 # Also quote any args containing shell metacharacters.
427 ac_configure_args=
428 for ac_arg
430 case "$ac_arg" in
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" ;;
438 esac
439 done
441 # NLS nuisances.
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.
454 echo > confdefs.h
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.
464 ac_prog=$0
465 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
467 srcdir=$ac_confdir
468 if test ! -r $srcdir/$ac_unique_file; then
469 srcdir=..
471 else
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; }
477 else
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"
487 else
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"
494 . "$ac_site_file"
496 done
498 if test -r "$cache_file"; then
499 echo "loading cache $cache_file"
500 . $cache_file
501 else
502 echo "creating cache $cache_file"
503 > $cache_file
506 ac_ext=c
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
516 ac_n= ac_c='
517 ' ac_t=' '
518 else
519 ac_n=-n ac_c= ac_t=
521 else
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}/.."
543 else
544 if test "${with_target_subdir}" != "."; then
545 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
546 else
547 libiberty_topdir="${srcdir}/${with_multisrctop}.."
550 else
551 libiberty_topdir="${srcdir}/.."
553 ac_aux_dir=
554 for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
555 if test -f $ac_dir/install-sh; then
556 ac_aux_dir=$ac_dir
557 ac_install_sh="$ac_aux_dir/install-sh -c"
558 break
559 elif test -f $ac_dir/install.sh; then
560 ac_aux_dir=$ac_dir
561 ac_install_sh="$ac_aux_dir/install.sh -c"
562 break
564 done
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
582 host_alias=$host
583 case "$host_alias" in
584 NONE)
585 case $nonopt in
586 NONE)
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; }
589 fi ;;
590 *) host_alias=$nonopt ;;
591 esac ;;
592 esac
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
605 build_alias=$build
606 case "$build_alias" in
607 NONE)
608 case $nonopt in
609 NONE) build_alias=$host_alias ;;
610 *) build_alias=$nonopt ;;
611 esac ;;
612 esac
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}-
622 else
623 ac_tool_prefix=
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
632 else
633 if test -n "$AR"; then
634 ac_cv_prog_AR="$AR" # Let the user override the test.
635 else
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"
641 break
643 done
644 IFS="$ac_save_ifs"
645 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
648 AR="$ac_cv_prog_AR"
649 if test -n "$AR"; then
650 echo "$ac_t""$AR" 1>&6
651 else
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
663 else
664 if test -n "$RANLIB"; then
665 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
666 else
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"
672 break
674 done
675 IFS="$ac_save_ifs"
678 RANLIB="$ac_cv_prog_RANLIB"
679 if test -n "$RANLIB"; then
680 echo "$ac_t""$RANLIB" 1>&6
681 else
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
694 else
695 if test -n "$RANLIB"; then
696 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
697 else
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"
703 break
705 done
706 IFS="$ac_save_ifs"
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
713 else
714 echo "$ac_t""no" 1>&6
717 else
718 RANLIB=":"
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
727 # itself.
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
738 else
739 if test -n "$CC"; then
740 ac_cv_prog_CC="$CC" # Let the user override the test.
741 else
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
746 ac_cv_prog_CC="gcc"
747 break
749 done
750 IFS="$ac_save_ifs"
753 CC="$ac_cv_prog_CC"
754 if test -n "$CC"; then
755 echo "$ac_t""$CC" 1>&6
756 else
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
767 else
768 if test -n "$CC"; then
769 ac_cv_prog_CC="$CC" # Let the user override the test.
770 else
771 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
772 ac_prog_rejected=no
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
777 ac_prog_rejected=yes
778 continue
780 ac_cv_prog_CC="cc"
781 break
783 done
784 IFS="$ac_save_ifs"
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
788 shift
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.
793 shift
794 set dummy "$ac_dir/$ac_word" "$@"
795 shift
796 ac_cv_prog_CC="$@"
801 CC="$ac_cv_prog_CC"
802 if test -n "$CC"; then
803 echo "$ac_t""$CC" 1>&6
804 else
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
815 else
816 cat > conftest.c <<EOF
817 #ifdef __GNUC__
818 yes;
819 #endif
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
822 ac_cv_prog_gcc=yes
823 else
824 ac_cv_prog_gcc=no
828 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
830 if test $ac_cv_prog_gcc = yes; then
831 GCC=yes
832 ac_test_CFLAGS="${CFLAGS+set}"
833 ac_save_CFLAGS="$CFLAGS"
834 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
839 else
840 echo 'void f(){}' > conftest.c
841 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
842 ac_cv_prog_cc_g=yes
843 else
844 ac_cv_prog_cc_g=no
846 rm -f conftest*
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
854 CFLAGS="-g -O2"
855 else
856 CFLAGS="-O2"
858 else
859 GCC=
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
868 then
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
876 CC="$CC -posix"
877 else
878 CC="$CC -Xp"
880 else
881 echo "$ac_t""no" 1>&6
882 ISC=
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
896 # IRIX /sbin/install
897 # AIX /bin/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
907 else
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.
911 case "$ac_dir/" in
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
916 # by default.
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.
923 else
924 ac_cv_path_install="$ac_dir/$ac_prog -c"
925 break 2
928 done
930 esac
931 done
932 IFS="$ac_save_IFS"
935 if test "${ac_cv_path_install+set}" = set; then
936 INSTALL="$ac_cv_path_install"
937 else
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
960 # something.
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
965 CPP=
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
970 else
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.
973 CPP="${CC-cc} -E"
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"
979 #include <assert.h>
980 Syntax Error
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
987 else
988 echo "$ac_err" >&5
989 echo "configure: failed program was:" >&5
990 cat conftest.$ac_ext >&5
991 rm -rf conftest*
992 CPP="${CC-cc} -E -traditional-cpp"
993 cat > conftest.$ac_ext <<EOF
994 #line 995 "configure"
995 #include "confdefs.h"
996 #include <assert.h>
997 Syntax Error
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
1004 else
1005 echo "$ac_err" >&5
1006 echo "configure: failed program was:" >&5
1007 cat conftest.$ac_ext >&5
1008 rm -rf conftest*
1009 CPP=/lib/cpp
1011 rm -f conftest*
1013 rm -f conftest*
1014 ac_cv_prog_CPP="$CPP"
1016 CPP="$ac_cv_prog_CPP"
1017 else
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 unistd.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
1029 else
1030 cat > conftest.$ac_ext <<EOF
1031 #line 1032 "configure"
1032 #include "confdefs.h"
1033 #include <$ac_hdr>
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
1039 rm -rf conftest*
1040 eval "ac_cv_header_$ac_safe=yes"
1041 else
1042 echo "$ac_err" >&5
1043 echo "configure: failed program was:" >&5
1044 cat conftest.$ac_ext >&5
1045 rm -rf conftest*
1046 eval "ac_cv_header_$ac_safe=no"
1048 rm -f conftest*
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
1057 else
1058 echo "$ac_t""no" 1>&6
1060 done
1063 # This is the list of functions which libiberty will provide if they
1064 # are not available on the host.
1066 funcs="asprintf"
1067 funcs="$funcs atexit"
1068 funcs="$funcs basename"
1069 funcs="$funcs bcmp"
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
1117 else
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. */
1123 #include <assert.h>
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. */
1127 char $ac_func();
1129 int main() {
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)
1135 choke me
1136 #else
1137 $ac_func();
1138 #endif
1140 ; return 0; }
1142 if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1143 rm -rf conftest*
1144 eval "ac_cv_func_$ac_func=yes"
1145 else
1146 echo "configure: failed program was:" >&5
1147 cat conftest.$ac_ext >&5
1148 rm -rf conftest*
1149 eval "ac_cv_func_$ac_func=no"
1151 rm -f conftest*
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
1161 else
1162 echo "$ac_t""no" 1>&6
1164 done
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
1172 else
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. */
1178 #include <assert.h>
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. */
1182 char $ac_func();
1184 int main() {
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)
1190 choke me
1191 #else
1192 $ac_func();
1193 #endif
1195 ; return 0; }
1197 if { (eval echo configure:1198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1198 rm -rf conftest*
1199 eval "ac_cv_func_$ac_func=yes"
1200 else
1201 echo "configure: failed program was:" >&5
1202 cat conftest.$ac_ext >&5
1203 rm -rf conftest*
1204 eval "ac_cv_func_$ac_func=no"
1206 rm -f conftest*
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
1216 else
1217 echo "$ac_t""no" 1>&6
1219 done
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
1227 else
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. */
1233 #include <assert.h>
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. */
1237 char $ac_func();
1239 int main() {
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)
1245 choke me
1246 #else
1247 $ac_func();
1248 #endif
1250 ; return 0; }
1252 if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1253 rm -rf conftest*
1254 eval "ac_cv_func_$ac_func=yes"
1255 else
1256 echo "configure: failed program was:" >&5
1257 cat conftest.$ac_ext >&5
1258 rm -rf conftest*
1259 eval "ac_cv_func_$ac_func=no"
1261 rm -f conftest*
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
1271 else
1272 echo "$ac_t""no" 1>&6
1274 done
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
1282 else
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. */
1288 #include <assert.h>
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. */
1292 char $ac_func();
1294 int main() {
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)
1300 choke me
1301 #else
1302 $ac_func();
1303 #endif
1305 ; return 0; }
1307 if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1308 rm -rf conftest*
1309 eval "ac_cv_func_$ac_func=yes"
1310 else
1311 echo "configure: failed program was:" >&5
1312 cat conftest.$ac_ext >&5
1313 rm -rf conftest*
1314 eval "ac_cv_func_$ac_func=no"
1316 rm -f conftest*
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
1326 else
1327 echo "$ac_t""no" 1>&6
1329 done
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
1337 else
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. */
1343 #include <assert.h>
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. */
1347 char $ac_func();
1349 int main() {
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)
1355 choke me
1356 #else
1357 $ac_func();
1358 #endif
1360 ; return 0; }
1362 if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1363 rm -rf conftest*
1364 eval "ac_cv_func_$ac_func=yes"
1365 else
1366 echo "configure: failed program was:" >&5
1367 cat conftest.$ac_ext >&5
1368 rm -rf conftest*
1369 eval "ac_cv_func_$ac_func=no"
1371 rm -f conftest*
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
1381 else
1382 echo "$ac_t""no" 1>&6
1384 done
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
1404 else
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. */
1410 #include <assert.h>
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. */
1414 char $ac_func();
1416 int main() {
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)
1422 choke me
1423 #else
1424 $ac_func();
1425 #endif
1427 ; return 0; }
1429 if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1430 rm -rf conftest*
1431 eval "ac_cv_func_$ac_func=yes"
1432 else
1433 echo "configure: failed program was:" >&5
1434 cat conftest.$ac_ext >&5
1435 rm -rf conftest*
1436 eval "ac_cv_func_$ac_func=no"
1438 rm -f conftest*
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
1448 else
1449 echo "$ac_t""no" 1>&6
1451 done
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
1460 setobjs=
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
1465 # link executables.
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
1471 ALLOCA="alloca.o"
1472 LIBOBJS="basename.o insque.o random.o strdup.o vasprintf.o"
1474 for f in $funcs; do
1475 case "$f" in
1476 basename | insque | random | strdup | vasprintf)
1479 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1480 cat >> confdefs.h <<EOF
1481 #define $n 1
1485 esac
1486 done
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
1497 setobjs=yes
1502 if test -z "${setobjs}"; then
1503 case "${host}" in
1505 *-*-vxworks*)
1506 # Handle VxWorks configuration specially, since on VxWorks the
1507 # libraries are actually on the target board, not in the file
1508 # system.
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"
1511 for f in $funcs; do
1512 case "$f" in
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
1520 #define $n 1
1524 esac
1525 done
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
1536 setobjs=yes
1539 esac
1542 if test -z "${setobjs}"; then
1544 case "${host}" in
1546 *-*-cygwin32*)
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
1556 # missing.
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//'`"
1564 *-*-mingw32*)
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
1578 esac
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
1585 ac_ext=c
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"
1595 main(){return(0);}
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
1602 else
1603 ac_cv_prog_cc_cross=yes
1605 else
1606 echo "configure: failed program was:" >&5
1607 cat conftest.$ac_ext >&5
1608 ac_cv_prog_cc_works=no
1610 rm -fr conftest*
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
1627 else
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. */
1633 #include <assert.h>
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. */
1637 char $ac_func();
1639 int main() {
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)
1645 choke me
1646 #else
1647 $ac_func();
1648 #endif
1650 ; return 0; }
1652 if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1653 rm -rf conftest*
1654 eval "ac_cv_func_$ac_func=yes"
1655 else
1656 echo "configure: failed program was:" >&5
1657 cat conftest.$ac_ext >&5
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 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1667 cat >> confdefs.h <<EOF
1668 #define $ac_tr_func 1
1671 else
1672 echo "$ac_t""no" 1>&6
1673 LIBOBJS="$LIBOBJS ${ac_func}.o"
1675 done
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
1684 else
1685 cat > conftest.$ac_ext <<EOF
1686 #line 1687 "configure"
1687 #include "confdefs.h"
1688 #include <alloca.h>
1689 int main() {
1690 char *p = alloca(2 * sizeof(int));
1691 ; return 0; }
1693 if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1694 rm -rf conftest*
1695 ac_cv_header_alloca_h=yes
1696 else
1697 echo "configure: failed program was:" >&5
1698 cat conftest.$ac_ext >&5
1699 rm -rf conftest*
1700 ac_cv_header_alloca_h=no
1702 rm -f conftest*
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
1717 else
1718 cat > conftest.$ac_ext <<EOF
1719 #line 1720 "configure"
1720 #include "confdefs.h"
1722 #ifdef __GNUC__
1723 # define alloca __builtin_alloca
1724 #else
1725 # if HAVE_ALLOCA_H
1726 # include <alloca.h>
1727 # else
1728 # ifdef _AIX
1729 #pragma alloca
1730 # else
1731 # ifndef alloca /* predefined by HP cc +Olibcalls */
1732 char *alloca ();
1733 # endif
1734 # endif
1735 # endif
1736 #endif
1738 int main() {
1739 char *p = (char *) alloca(1);
1740 ; return 0; }
1742 if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1743 rm -rf conftest*
1744 ac_cv_func_alloca_works=yes
1745 else
1746 echo "configure: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 rm -rf conftest*
1749 ac_cv_func_alloca_works=no
1751 rm -f conftest*
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.
1767 ALLOCA=alloca.o
1768 cat >> confdefs.h <<\EOF
1769 #define C_ALLOCA 1
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
1777 else
1778 cat > conftest.$ac_ext <<EOF
1779 #line 1780 "configure"
1780 #include "confdefs.h"
1781 #if defined(CRAY) && ! defined(CRAY2)
1782 webecray
1783 #else
1784 wenotbecray
1785 #endif
1788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1789 egrep "webecray" >/dev/null 2>&1; then
1790 rm -rf conftest*
1791 ac_cv_os_cray=yes
1792 else
1793 rm -rf conftest*
1794 ac_cv_os_cray=no
1796 rm -f conftest*
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
1807 else
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. */
1813 #include <assert.h>
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. */
1817 char $ac_func();
1819 int main() {
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)
1825 choke me
1826 #else
1827 $ac_func();
1828 #endif
1830 ; return 0; }
1832 if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1833 rm -rf conftest*
1834 eval "ac_cv_func_$ac_func=yes"
1835 else
1836 echo "configure: failed program was:" >&5
1837 cat conftest.$ac_ext >&5
1838 rm -rf conftest*
1839 eval "ac_cv_func_$ac_func=no"
1841 rm -f conftest*
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
1850 break
1851 else
1852 echo "$ac_t""no" 1>&6
1855 done
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
1862 else
1863 if test "$cross_compiling" = yes; then
1864 ac_cv_c_stack_direction=0
1865 else
1866 cat > conftest.$ac_ext <<EOF
1867 #line 1868 "configure"
1868 #include "confdefs.h"
1869 find_stack_direction ()
1871 static char *addr = 0;
1872 auto char dummy;
1873 if (addr == 0)
1875 addr = &dummy;
1876 return find_stack_direction ();
1878 else
1879 return (&dummy > addr) ? 1 : -1;
1881 main ()
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
1887 then
1888 ac_cv_c_stack_direction=1
1889 else
1890 echo "configure: failed program was:" >&5
1891 cat conftest.$ac_ext >&5
1892 rm -fr conftest*
1893 ac_cv_c_stack_direction=-1
1895 rm -fr conftest*
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
1911 else
1912 cat > conftest.$ac_ext <<EOF
1913 #line 1914 "configure"
1914 #include "confdefs.h"
1915 #include <stdlib.h>
1916 #include <stdarg.h>
1917 #include <string.h>
1918 #include <float.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
1924 rm -rf conftest*
1925 ac_cv_header_stdc=yes
1926 else
1927 echo "$ac_err" >&5
1928 echo "configure: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
1930 rm -rf conftest*
1931 ac_cv_header_stdc=no
1933 rm -f conftest*
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"
1940 #include <string.h>
1942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1943 egrep "memchr" >/dev/null 2>&1; then
1945 else
1946 rm -rf conftest*
1947 ac_cv_header_stdc=no
1949 rm -f conftest*
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"
1958 #include <stdlib.h>
1960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1961 egrep "free" >/dev/null 2>&1; then
1963 else
1964 rm -rf conftest*
1965 ac_cv_header_stdc=no
1967 rm -f conftest*
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
1975 else
1976 cat > conftest.$ac_ext <<EOF
1977 #line 1978 "configure"
1978 #include "confdefs.h"
1979 #include <ctype.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);
1985 exit (0); }
1988 if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1989 then
1991 else
1992 echo "configure: failed program was:" >&5
1993 cat conftest.$ac_ext >&5
1994 rm -fr conftest*
1995 ac_cv_header_stdc=no
1997 rm -fr conftest*
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
2015 else
2016 cat > conftest.$ac_ext <<EOF
2017 #line 2018 "configure"
2018 #include "confdefs.h"
2019 #include <sys/types.h>
2020 #if STDC_HEADERS
2021 #include <stdlib.h>
2022 #include <stddef.h>
2023 #endif
2025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2026 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2027 rm -rf conftest*
2028 ac_cv_type_pid_t=yes
2029 else
2030 rm -rf conftest*
2031 ac_cv_type_pid_t=no
2033 rm -f conftest*
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
2039 #define pid_t int
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
2049 else
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2053 #include <vfork.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
2059 rm -rf conftest*
2060 eval "ac_cv_header_$ac_safe=yes"
2061 else
2062 echo "$ac_err" >&5
2063 echo "configure: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 rm -rf conftest*
2066 eval "ac_cv_header_$ac_safe=no"
2068 rm -f conftest*
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
2076 else
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
2084 else
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
2090 else
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. */
2096 #include <assert.h>
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. */
2100 char vfork();
2102 int main() {
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)
2108 choke me
2109 #else
2110 vfork();
2111 #endif
2113 ; return 0; }
2115 if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2116 rm -rf conftest*
2117 eval "ac_cv_func_vfork=yes"
2118 else
2119 echo "configure: failed program was:" >&5
2120 cat conftest.$ac_ext >&5
2121 rm -rf conftest*
2122 eval "ac_cv_func_vfork=no"
2124 rm -f conftest*
2127 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2128 echo "$ac_t""yes" 1>&6
2130 else
2131 echo "$ac_t""no" 1>&6
2134 ac_cv_func_vfork_works=$ac_cv_func_vfork
2135 else
2136 cat > conftest.$ac_ext <<EOF
2137 #line 2138 "configure"
2138 #include "confdefs.h"
2139 /* Thanks to Paul Eggert for this test. */
2140 #include <stdio.h>
2141 #include <sys/types.h>
2142 #include <sys/stat.h>
2143 #ifdef HAVE_UNISTD_H
2144 #include <unistd.h>
2145 #endif
2146 #ifdef HAVE_VFORK_H
2147 #include <vfork.h>
2148 #endif
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. */
2155 static
2156 #ifdef __cplusplus
2157 sparc_address_test (int arg)
2158 #else
2159 sparc_address_test (arg) int arg;
2160 #endif
2162 static pid_t child;
2163 if (!child) {
2164 child = vfork ();
2165 if (child < 0) {
2166 perror ("vfork");
2167 _exit(2);
2169 if (!child) {
2170 arg = getpid();
2171 write(-1, "", 0);
2172 _exit (arg);
2176 main() {
2177 pid_t parent = getpid ();
2178 pid_t child;
2180 sparc_address_test ();
2182 child = vfork ();
2184 if (child == 0) {
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. */
2195 pid_t
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)
2202 _exit(1);
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);
2210 } else {
2211 int status;
2212 struct stat st;
2214 while (wait(&status) != child)
2216 exit(
2217 /* Was there some problem with vforking? */
2218 child < 0
2220 /* Did the child fail? (This shouldn't happen.) */
2221 || status
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
2233 then
2234 ac_cv_func_vfork_works=yes
2235 else
2236 echo "configure: failed program was:" >&5
2237 cat conftest.$ac_ext >&5
2238 rm -fr conftest*
2239 ac_cv_func_vfork_works=no
2241 rm -fr conftest*
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
2249 #define vfork fork
2254 if test $ac_cv_func_vfork_works = no; then
2255 LIBOBJS="$LIBOBJS vfork.o"
2257 for v in $vars; do
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
2262 else
2263 cat > conftest.$ac_ext <<EOF
2264 #line 2265 "configure"
2265 #include "confdefs.h"
2266 int *p;
2267 int main() {
2268 extern int $v; p = &$v;
2269 ; return 0; }
2271 if { (eval echo configure:2272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2272 rm -rf conftest*
2273 eval "libiberty_cv_var_$v=yes"
2274 else
2275 echo "configure: failed program was:" >&5
2276 cat conftest.$ac_ext >&5
2277 rm -rf conftest*
2278 eval "libiberty_cv_var_$v=no"
2280 rm -f conftest*
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
2287 #define $n 1
2290 else
2291 echo "$ac_t""no" 1>&6
2293 done
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
2300 else
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. */
2306 #include <assert.h>
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. */
2310 char $ac_func();
2312 int main() {
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)
2318 choke me
2319 #else
2320 $ac_func();
2321 #endif
2323 ; return 0; }
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2326 rm -rf conftest*
2327 eval "ac_cv_func_$ac_func=yes"
2328 else
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2331 rm -rf conftest*
2332 eval "ac_cv_func_$ac_func=no"
2334 rm -f conftest*
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
2344 else
2345 echo "$ac_t""no" 1>&6
2347 done
2351 # Install a library built with a cross compiler in $(tooldir) rather
2352 # than $(libdir).
2353 if test -z "${with_target_subdir}"; then
2354 INSTALL_DEST=libdir
2355 else
2356 INSTALL_DEST=tooldir
2360 # We need multilib support, but only if configuring for the target.
2361 trap '' 1 2 15
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.
2383 (set) 2>&1 |
2384 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
2385 *ac_space=\ *)
2386 # `set' does not quote correctly, so add quotes (double-quote substitution
2387 # turns \\\\ into \\, and sed turns \\ into \).
2388 sed -n \
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'
2396 esac >> confcache
2397 if cmp -s $cache_file confcache; then
2399 else
2400 if test -w $cache_file; then
2401 echo "updating cache $cache_file"
2402 cat confcache > $cache_file
2403 else
2404 echo "not updating unwritable cache $cache_file"
2407 rm -f confcache
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
2432 #! /bin/sh
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]"
2444 for ac_option
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"
2452 exit 0 ;;
2453 -help | --help | --hel | --he | --h)
2454 echo "\$ac_cs_usage"; exit 0 ;;
2455 *) echo "\$ac_cs_usage"; exit 1 ;;
2456 esac
2457 done
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
2469 $ac_vpsub
2470 $extrasub
2471 s%@SHELL@%$SHELL%g
2472 s%@CFLAGS@%$CFLAGS%g
2473 s%@CPPFLAGS@%$CPPFLAGS%g
2474 s%@CXXFLAGS@%$CXXFLAGS%g
2475 s%@DEFS@%$DEFS%g
2476 s%@LDFLAGS@%$LDFLAGS%g
2477 s%@LIBS@%$LIBS%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
2493 s%@host@%$host%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
2498 s%@build@%$build%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
2503 s%@AR@%$AR%g
2504 s%@RANLIB@%$RANLIB%g
2505 s%@CC@%$CC%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
2510 s%@CPP@%$CPP%g
2511 s%@LIBOBJS@%$LIBOBJS%g
2512 s%@ALLOCA@%$ALLOCA%g
2513 s%@INSTALL_DEST@%$INSTALL_DEST%g
2515 CEOF
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.
2526 ac_more_lines=:
2527 ac_sed_cmds=""
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
2531 else
2532 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2534 if test ! -s conftest.s$ac_file; then
2535 ac_more_lines=false
2536 rm -f conftest.s$ac_file
2537 else
2538 if test -z "$ac_sed_cmds"; then
2539 ac_sed_cmds="sed -f conftest.s$ac_file"
2540 else
2541 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2543 ac_file=`expr $ac_file + 1`
2544 ac_beg=$ac_end
2545 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2547 done
2548 if test -z "$ac_sed_cmds"; then
2549 ac_sed_cmds=cat
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".
2560 case "$ac_file" 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" ;;
2564 esac
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'`
2576 else
2577 ac_dir_suffix= ac_dots=
2580 case "$ac_given_srcdir" in
2581 .) srcdir=.
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" ;;
2585 *) # Relative path.
2586 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2587 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2588 esac
2590 case "$ac_given_INSTALL" in
2591 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2592 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2593 esac
2595 echo creating "$ac_file"
2596 rm -f "$ac_file"
2597 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2598 case "$ac_file" in
2599 *Makefile*) ac_comsub="1i\\
2600 # $configure_input" ;;
2601 *) ac_comsub= ;;
2602 esac
2604 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2605 sed -e "$ac_comsub
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
2611 fi; done
2612 rm -f conftest.s*
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'
2620 ac_dC='\3'
2621 ac_dD='%g'
2622 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2623 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2624 ac_uB='\([ ]\)%\1#\2define\3'
2625 ac_uC=' '
2626 ac_uD='\4%g'
2627 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2628 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2629 ac_eB='$%\1#\2define\3'
2630 ac_eC=' '
2631 ac_eD='%g'
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".
2642 case "$ac_file" 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" ;;
2646 esac
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.
2660 rm -f conftest.vals
2661 cat > conftest.hdr <<\EOF
2662 s/[\\&%]/\\&/g
2663 s%[\\$`]%\\&%g
2664 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2665 s%ac_d%ac_u%gp
2666 s%ac_u%ac_e%gp
2668 sed -n -f conftest.hdr confdefs.h > conftest.vals
2669 rm -f conftest.hdr
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.
2681 rm -f conftest.tail
2682 while :
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
2690 echo 'CEOF
2691 sed -f conftest.frag conftest.in > conftest.out
2692 rm -f conftest.in
2693 mv conftest.out conftest.in
2694 ' >> $CONFIG_STATUS
2695 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2696 rm -f conftest.vals
2697 mv conftest.tail conftest.vals
2698 done
2699 rm -f 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
2705 rm -f conftest.in
2706 if cmp -s $ac_file conftest.h 2>/dev/null; then
2707 echo "$ac_file is unchanged"
2708 rm -f conftest.h
2709 else
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"
2716 rm -f $ac_file
2717 mv conftest.h $ac_file
2719 fi; done
2722 cat >> $CONFIG_STATUS <<EOF
2723 srcdir=${srcdir}
2724 host=${host}
2725 target=${target}
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
2738 ac_file=Makefile
2739 . ${libiberty_topdir}/config-ml.in
2742 exit 0
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