]> Git Repo - binutils.git/blame - libiberty/configure
Remove entries from gcc. They don't make much senses here since
[binutils.git] / libiberty / configure
CommitLineData
252b5132
RH
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-target-subdir=SUBDIR Configuring in a subdirectory"
16ac_help="$ac_help
17 --with-cross-host=HOST Configuring with a cross compiler"
18ac_help="$ac_help
19 --with-newlib Configuring with newlib"
20
21# Initialize some variables set by options.
22# The variables have the same names as the options, with
23# dashes changed to underlines.
24build=NONE
25cache_file=./config.cache
26exec_prefix=NONE
27host=NONE
28no_create=
29nonopt=NONE
30no_recursion=
31prefix=NONE
32program_prefix=NONE
33program_suffix=NONE
34program_transform_name=s,x,x,
35silent=
36site=
9cc28cc8 37sitefile=
252b5132
RH
38srcdir=
39target=NONE
40verbose=
41x_includes=NONE
42x_libraries=NONE
43bindir='${exec_prefix}/bin'
44sbindir='${exec_prefix}/sbin'
45libexecdir='${exec_prefix}/libexec'
46datadir='${prefix}/share'
47sysconfdir='${prefix}/etc'
48sharedstatedir='${prefix}/com'
49localstatedir='${prefix}/var'
50libdir='${exec_prefix}/lib'
51includedir='${prefix}/include'
52oldincludedir='/usr/include'
53infodir='${prefix}/info'
54mandir='${prefix}/man'
55
56# Initialize some other variables.
57subdirs=
58MFLAGS= MAKEFLAGS=
59SHELL=${CONFIG_SHELL-/bin/sh}
60# Maximum number of lines to put in a shell here document.
61ac_max_here_lines=12
62
63ac_prev=
64for ac_option
65do
66
67 # If the previous option needs an argument, assign it.
68 if test -n "$ac_prev"; then
69 eval "$ac_prev=\$ac_option"
70 ac_prev=
71 continue
72 fi
73
74 case "$ac_option" in
75 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
76 *) ac_optarg= ;;
77 esac
78
79 # Accept the important Cygnus configure options, so we can diagnose typos.
80
81 case "$ac_option" in
82
83 -bindir | --bindir | --bindi | --bind | --bin | --bi)
84 ac_prev=bindir ;;
85 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
86 bindir="$ac_optarg" ;;
87
88 -build | --build | --buil | --bui | --bu)
89 ac_prev=build ;;
90 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
91 build="$ac_optarg" ;;
92
93 -cache-file | --cache-file | --cache-fil | --cache-fi \
94 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
95 ac_prev=cache_file ;;
96 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
97 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
98 cache_file="$ac_optarg" ;;
99
100 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
101 ac_prev=datadir ;;
102 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
103 | --da=*)
104 datadir="$ac_optarg" ;;
105
106 -disable-* | --disable-*)
107 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
108 # Reject names that are not valid shell variable names.
109 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
110 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
111 fi
112 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
113 eval "enable_${ac_feature}=no" ;;
114
115 -enable-* | --enable-*)
116 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
117 # Reject names that are not valid shell variable names.
118 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
119 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120 fi
121 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122 case "$ac_option" in
123 *=*) ;;
124 *) ac_optarg=yes ;;
125 esac
126 eval "enable_${ac_feature}='$ac_optarg'" ;;
127
128 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
129 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
130 | --exec | --exe | --ex)
131 ac_prev=exec_prefix ;;
132 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
133 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
134 | --exec=* | --exe=* | --ex=*)
135 exec_prefix="$ac_optarg" ;;
136
137 -gas | --gas | --ga | --g)
138 # Obsolete; use --with-gas.
139 with_gas=yes ;;
140
141 -help | --help | --hel | --he)
142 # Omit some internal or obsolete options to make the list less imposing.
143 # This message is too long to be a string in the A/UX 3.1 sh.
144 cat << EOF
145Usage: configure [options] [host]
146Options: [defaults in brackets after descriptions]
147Configuration:
148 --cache-file=FILE cache test results in FILE
149 --help print this message
150 --no-create do not create output files
151 --quiet, --silent do not print \`checking...' messages
9cc28cc8 152 --site-file=FILE use FILE as the site file
252b5132
RH
153 --version print the version of autoconf that created configure
154Directory and file names:
155 --prefix=PREFIX install architecture-independent files in PREFIX
156 [$ac_default_prefix]
157 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
158 [same as prefix]
159 --bindir=DIR user executables in DIR [EPREFIX/bin]
160 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
161 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
162 --datadir=DIR read-only architecture-independent data in DIR
163 [PREFIX/share]
164 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
165 --sharedstatedir=DIR modifiable architecture-independent data in DIR
166 [PREFIX/com]
167 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
168 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
169 --includedir=DIR C header files in DIR [PREFIX/include]
170 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
171 --infodir=DIR info documentation in DIR [PREFIX/info]
172 --mandir=DIR man documentation in DIR [PREFIX/man]
173 --srcdir=DIR find the sources in DIR [configure dir or ..]
174 --program-prefix=PREFIX prepend PREFIX to installed program names
175 --program-suffix=SUFFIX append SUFFIX to installed program names
176 --program-transform-name=PROGRAM
177 run sed PROGRAM on installed program names
178EOF
179 cat << EOF
180Host type:
181 --build=BUILD configure for building on BUILD [BUILD=HOST]
182 --host=HOST configure for HOST [guessed]
183 --target=TARGET configure for TARGET [TARGET=HOST]
184Features and packages:
185 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
186 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
187 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
188 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
189 --x-includes=DIR X include files are in DIR
190 --x-libraries=DIR X library files are in DIR
191EOF
192 if test -n "$ac_help"; then
193 echo "--enable and --with options recognized:$ac_help"
194 fi
195 exit 0 ;;
196
197 -host | --host | --hos | --ho)
198 ac_prev=host ;;
199 -host=* | --host=* | --hos=* | --ho=*)
200 host="$ac_optarg" ;;
201
202 -includedir | --includedir | --includedi | --included | --include \
203 | --includ | --inclu | --incl | --inc)
204 ac_prev=includedir ;;
205 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
206 | --includ=* | --inclu=* | --incl=* | --inc=*)
207 includedir="$ac_optarg" ;;
208
209 -infodir | --infodir | --infodi | --infod | --info | --inf)
210 ac_prev=infodir ;;
211 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
212 infodir="$ac_optarg" ;;
213
214 -libdir | --libdir | --libdi | --libd)
215 ac_prev=libdir ;;
216 -libdir=* | --libdir=* | --libdi=* | --libd=*)
217 libdir="$ac_optarg" ;;
218
219 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
220 | --libexe | --libex | --libe)
221 ac_prev=libexecdir ;;
222 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
223 | --libexe=* | --libex=* | --libe=*)
224 libexecdir="$ac_optarg" ;;
225
226 -localstatedir | --localstatedir | --localstatedi | --localstated \
227 | --localstate | --localstat | --localsta | --localst \
228 | --locals | --local | --loca | --loc | --lo)
229 ac_prev=localstatedir ;;
230 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
231 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
232 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
233 localstatedir="$ac_optarg" ;;
234
235 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
236 ac_prev=mandir ;;
237 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238 mandir="$ac_optarg" ;;
239
240 -nfp | --nfp | --nf)
241 # Obsolete; use --without-fp.
242 with_fp=no ;;
243
244 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
245 | --no-cr | --no-c)
246 no_create=yes ;;
247
248 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
249 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
250 no_recursion=yes ;;
251
252 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
253 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
254 | --oldin | --oldi | --old | --ol | --o)
255 ac_prev=oldincludedir ;;
256 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
257 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
258 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
259 oldincludedir="$ac_optarg" ;;
260
261 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
262 ac_prev=prefix ;;
263 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
264 prefix="$ac_optarg" ;;
265
266 -program-prefix | --program-prefix | --program-prefi | --program-pref \
267 | --program-pre | --program-pr | --program-p)
268 ac_prev=program_prefix ;;
269 -program-prefix=* | --program-prefix=* | --program-prefi=* \
270 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
271 program_prefix="$ac_optarg" ;;
272
273 -program-suffix | --program-suffix | --program-suffi | --program-suff \
274 | --program-suf | --program-su | --program-s)
275 ac_prev=program_suffix ;;
276 -program-suffix=* | --program-suffix=* | --program-suffi=* \
277 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
278 program_suffix="$ac_optarg" ;;
279
280 -program-transform-name | --program-transform-name \
281 | --program-transform-nam | --program-transform-na \
282 | --program-transform-n | --program-transform- \
283 | --program-transform | --program-transfor \
284 | --program-transfo | --program-transf \
285 | --program-trans | --program-tran \
286 | --progr-tra | --program-tr | --program-t)
287 ac_prev=program_transform_name ;;
288 -program-transform-name=* | --program-transform-name=* \
289 | --program-transform-nam=* | --program-transform-na=* \
290 | --program-transform-n=* | --program-transform-=* \
291 | --program-transform=* | --program-transfor=* \
292 | --program-transfo=* | --program-transf=* \
293 | --program-trans=* | --program-tran=* \
294 | --progr-tra=* | --program-tr=* | --program-t=*)
295 program_transform_name="$ac_optarg" ;;
296
297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
298 | -silent | --silent | --silen | --sile | --sil)
299 silent=yes ;;
300
301 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
302 ac_prev=sbindir ;;
303 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
304 | --sbi=* | --sb=*)
305 sbindir="$ac_optarg" ;;
306
307 -sharedstatedir | --sharedstatedir | --sharedstatedi \
308 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
309 | --sharedst | --shareds | --shared | --share | --shar \
310 | --sha | --sh)
311 ac_prev=sharedstatedir ;;
312 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
313 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
314 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
315 | --sha=* | --sh=*)
316 sharedstatedir="$ac_optarg" ;;
317
318 -site | --site | --sit)
319 ac_prev=site ;;
320 -site=* | --site=* | --sit=*)
321 site="$ac_optarg" ;;
322
9cc28cc8
DD
323 -site-file | --site-file | --site-fil | --site-fi | --site-f)
324 ac_prev=sitefile ;;
325 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
326 sitefile="$ac_optarg" ;;
327
252b5132
RH
328 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329 ac_prev=srcdir ;;
330 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
331 srcdir="$ac_optarg" ;;
332
333 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
334 | --syscon | --sysco | --sysc | --sys | --sy)
335 ac_prev=sysconfdir ;;
336 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
337 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
338 sysconfdir="$ac_optarg" ;;
339
340 -target | --target | --targe | --targ | --tar | --ta | --t)
341 ac_prev=target ;;
342 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
343 target="$ac_optarg" ;;
344
345 -v | -verbose | --verbose | --verbos | --verbo | --verb)
346 verbose=yes ;;
347
348 -version | --version | --versio | --versi | --vers)
349 echo "configure generated by autoconf version 2.13"
350 exit 0 ;;
351
352 -with-* | --with-*)
353 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
354 # Reject names that are not valid shell variable names.
355 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
356 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357 fi
358 ac_package=`echo $ac_package| sed 's/-/_/g'`
359 case "$ac_option" in
360 *=*) ;;
361 *) ac_optarg=yes ;;
362 esac
363 eval "with_${ac_package}='$ac_optarg'" ;;
364
365 -without-* | --without-*)
366 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
367 # Reject names that are not valid shell variable names.
368 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
369 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370 fi
371 ac_package=`echo $ac_package| sed 's/-/_/g'`
372 eval "with_${ac_package}=no" ;;
373
374 --x)
375 # Obsolete; use --with-x.
376 with_x=yes ;;
377
378 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
379 | --x-incl | --x-inc | --x-in | --x-i)
380 ac_prev=x_includes ;;
381 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
382 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
383 x_includes="$ac_optarg" ;;
384
385 -x-libraries | --x-libraries | --x-librarie | --x-librari \
386 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
387 ac_prev=x_libraries ;;
388 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
389 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
390 x_libraries="$ac_optarg" ;;
391
392 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
393 ;;
394
395 *)
396 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
397 echo "configure: warning: $ac_option: invalid host type" 1>&2
398 fi
399 if test "x$nonopt" != xNONE; then
400 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
401 fi
402 nonopt="$ac_option"
403 ;;
404
405 esac
406done
407
408if test -n "$ac_prev"; then
409 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
410fi
411
412trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413
414# File descriptor usage:
415# 0 standard input
416# 1 file creation
417# 2 errors and warnings
418# 3 some systems may open it to /dev/tty
419# 4 used on the Kubota Titan
420# 6 checking for... messages and results
421# 5 compiler messages saved in config.log
422if test "$silent" = yes; then
423 exec 6>/dev/null
424else
425 exec 6>&1
426fi
427exec 5>./config.log
428
429echo "\
430This file contains any messages produced by compilers while
431running configure, to aid debugging if configure makes a mistake.
432" 1>&5
433
434# Strip out --no-create and --no-recursion so they do not pile up.
435# Also quote any args containing shell metacharacters.
436ac_configure_args=
437for ac_arg
438do
439 case "$ac_arg" in
440 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
441 | --no-cr | --no-c) ;;
442 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
443 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
444 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
445 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
446 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
447 esac
448done
449
450# NLS nuisances.
451# Only set these to C if already set. These must not be set unconditionally
452# because not all systems understand e.g. LANG=C (notably SCO).
453# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
454# Non-C LC_CTYPE values break the ctype check.
455if test "${LANG+set}" = set; then LANG=C; export LANG; fi
456if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
457if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
458if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
459
460# confdefs.h avoids OS command line length limits that DEFS can exceed.
461rm -rf conftest* confdefs.h
462# AIX cpp loses on an empty file, so make sure it contains at least a newline.
463echo > confdefs.h
464
465# A filename unique to this package, relative to the directory that
466# configure is in, which we can look for to find out if srcdir is correct.
467ac_unique_file=pexecute.c
468
469# Find the source files, if location was not specified.
470if test -z "$srcdir"; then
471 ac_srcdir_defaulted=yes
472 # Try the directory containing this script, then its parent.
473 ac_prog=$0
474 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
475 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
476 srcdir=$ac_confdir
477 if test ! -r $srcdir/$ac_unique_file; then
478 srcdir=..
479 fi
480else
481 ac_srcdir_defaulted=no
482fi
483if test ! -r $srcdir/$ac_unique_file; then
484 if test "$ac_srcdir_defaulted" = yes; then
485 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
486 else
487 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
488 fi
489fi
490srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
491
492# Prefer explicitly selected file to automatically selected ones.
9cc28cc8
DD
493if test -z "$sitefile"; then
494 if test -z "$CONFIG_SITE"; then
495 if test "x$prefix" != xNONE; then
496 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
497 else
498 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 fi
252b5132 500 fi
9cc28cc8
DD
501else
502 CONFIG_SITE="$sitefile"
252b5132
RH
503fi
504for ac_site_file in $CONFIG_SITE; do
505 if test -r "$ac_site_file"; then
506 echo "loading site script $ac_site_file"
507 . "$ac_site_file"
508 fi
509done
510
511if test -r "$cache_file"; then
512 echo "loading cache $cache_file"
513 . $cache_file
514else
515 echo "creating cache $cache_file"
516 > $cache_file
517fi
518
519ac_ext=c
520# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
521ac_cpp='$CPP $CPPFLAGS'
522ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
523ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
524cross_compiling=$ac_cv_prog_cc_cross
525
526ac_exeext=
527ac_objext=o
528if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
529 # Stardent Vistra SVR4 grep lacks -e, says [email protected].
530 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
531 ac_n= ac_c='
532' ac_t=' '
533 else
534 ac_n=-n ac_c= ac_t=
535 fi
536else
537 ac_n= ac_c='\c' ac_t=
538fi
539
540
541
542# Check whether --with-target-subdir or --without-target-subdir was given.
543if test "${with_target_subdir+set}" = set; then
544 withval="$with_target_subdir"
545 :
546fi
547
548# Check whether --with-cross-host or --without-cross-host was given.
549if test "${with_cross_host+set}" = set; then
550 withval="$with_cross_host"
551 :
552fi
553
554# Check whether --with-newlib or --without-newlib was given.
555if test "${with_newlib+set}" = set; then
556 withval="$with_newlib"
557 :
558fi
559
560
561if test "${srcdir}" = "."; then
562 if test -z "${with_target_subdir}"; then
563 libiberty_topdir="${srcdir}/.."
564 else
565 if test "${with_target_subdir}" != "."; then
566 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
567 else
568 libiberty_topdir="${srcdir}/${with_multisrctop}.."
569 fi
570 fi
571else
572 libiberty_topdir="${srcdir}/.."
573fi
574ac_aux_dir=
575for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
576 if test -f $ac_dir/install-sh; then
577 ac_aux_dir=$ac_dir
578 ac_install_sh="$ac_aux_dir/install-sh -c"
579 break
580 elif test -f $ac_dir/install.sh; then
581 ac_aux_dir=$ac_dir
582 ac_install_sh="$ac_aux_dir/install.sh -c"
583 break
584 fi
585done
586if test -z "$ac_aux_dir"; then
587 { echo "configure: error: can not find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" 1>&2; exit 1; }
588fi
589ac_config_guess=$ac_aux_dir/config.guess
590ac_config_sub=$ac_aux_dir/config.sub
591ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
592
593
594
595# Make sure we can run config.sub.
596if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
597else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
598fi
599
600echo $ac_n "checking host system type""... $ac_c" 1>&6
9cc28cc8 601echo "configure:602: checking host system type" >&5
252b5132
RH
602
603host_alias=$host
604case "$host_alias" in
605NONE)
606 case $nonopt in
607 NONE)
608 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
609 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
610 fi ;;
611 *) host_alias=$nonopt ;;
612 esac ;;
613esac
614
615host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
616host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
617host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
618host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
619echo "$ac_t""$host" 1>&6
620
621
622
623echo $ac_n "checking build system type""... $ac_c" 1>&6
9cc28cc8 624echo "configure:625: checking build system type" >&5
252b5132
RH
625
626build_alias=$build
627case "$build_alias" in
628NONE)
629 case $nonopt in
630 NONE) build_alias=$host_alias ;;
631 *) build_alias=$nonopt ;;
632 esac ;;
633esac
634
635build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
636build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
637build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
638build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
639echo "$ac_t""$build" 1>&6
640
641if test $host != $build; then
642 ac_tool_prefix=${host_alias}-
643else
644 ac_tool_prefix=
645fi
646
647# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
648set dummy ${ac_tool_prefix}ar; ac_word=$2
649echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc28cc8 650echo "configure:651: checking for $ac_word" >&5
252b5132
RH
651if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
652 echo $ac_n "(cached) $ac_c" 1>&6
653else
654 if test -n "$AR"; then
655 ac_cv_prog_AR="$AR" # Let the user override the test.
656else
657 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
658 ac_dummy="$PATH"
659 for ac_dir in $ac_dummy; do
660 test -z "$ac_dir" && ac_dir=.
661 if test -f $ac_dir/$ac_word; then
662 ac_cv_prog_AR="${ac_tool_prefix}ar"
663 break
664 fi
665 done
666 IFS="$ac_save_ifs"
667 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
668fi
669fi
670AR="$ac_cv_prog_AR"
671if test -n "$AR"; then
672 echo "$ac_t""$AR" 1>&6
673else
674 echo "$ac_t""no" 1>&6
675fi
676
677
678
679# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
680set dummy ${ac_tool_prefix}ranlib; ac_word=$2
681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc28cc8 682echo "configure:683: checking for $ac_word" >&5
252b5132
RH
683if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
684 echo $ac_n "(cached) $ac_c" 1>&6
685else
686 if test -n "$RANLIB"; then
687 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
688else
689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
690 ac_dummy="$PATH"
691 for ac_dir in $ac_dummy; do
692 test -z "$ac_dir" && ac_dir=.
693 if test -f $ac_dir/$ac_word; then
694 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
695 break
696 fi
697 done
698 IFS="$ac_save_ifs"
699fi
700fi
701RANLIB="$ac_cv_prog_RANLIB"
702if test -n "$RANLIB"; then
703 echo "$ac_t""$RANLIB" 1>&6
704else
705 echo "$ac_t""no" 1>&6
706fi
707
708
709if test -z "$ac_cv_prog_RANLIB"; then
710if test -n "$ac_tool_prefix"; then
711 # Extract the first word of "ranlib", so it can be a program name with args.
712set dummy ranlib; ac_word=$2
713echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc28cc8 714echo "configure:715: checking for $ac_word" >&5
252b5132
RH
715if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
716 echo $ac_n "(cached) $ac_c" 1>&6
717else
718 if test -n "$RANLIB"; then
719 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
720else
721 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
722 ac_dummy="$PATH"
723 for ac_dir in $ac_dummy; do
724 test -z "$ac_dir" && ac_dir=.
725 if test -f $ac_dir/$ac_word; then
726 ac_cv_prog_RANLIB="ranlib"
727 break
728 fi
729 done
730 IFS="$ac_save_ifs"
731 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
732fi
733fi
734RANLIB="$ac_cv_prog_RANLIB"
735if test -n "$RANLIB"; then
736 echo "$ac_t""$RANLIB" 1>&6
737else
738 echo "$ac_t""no" 1>&6
739fi
740
741else
742 RANLIB=":"
743fi
744fi
745
746
747# FIXME: We temporarily define our own version of AC_PROG_CC. This is
748# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
749# are probably using a cross compiler, which will not be able to fully
750# link an executable. This should really be fixed in autoconf
751# itself.
752
753
754
755
0c0a36a4 756
252b5132
RH
757# Extract the first word of "gcc", so it can be a program name with args.
758set dummy gcc; ac_word=$2
759echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc28cc8 760echo "configure:761: checking for $ac_word" >&5
252b5132
RH
761if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
762 echo $ac_n "(cached) $ac_c" 1>&6
763else
764 if test -n "$CC"; then
765 ac_cv_prog_CC="$CC" # Let the user override the test.
766else
767 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
768 ac_dummy="$PATH"
769 for ac_dir in $ac_dummy; do
770 test -z "$ac_dir" && ac_dir=.
771 if test -f $ac_dir/$ac_word; then
772 ac_cv_prog_CC="gcc"
773 break
774 fi
775 done
776 IFS="$ac_save_ifs"
777fi
778fi
779CC="$ac_cv_prog_CC"
780if test -n "$CC"; then
781 echo "$ac_t""$CC" 1>&6
782else
783 echo "$ac_t""no" 1>&6
784fi
785
786if test -z "$CC"; then
787 # Extract the first word of "cc", so it can be a program name with args.
788set dummy cc; ac_word=$2
789echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9cc28cc8 790echo "configure:791: checking for $ac_word" >&5
252b5132
RH
791if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
792 echo $ac_n "(cached) $ac_c" 1>&6
793else
794 if test -n "$CC"; then
795 ac_cv_prog_CC="$CC" # Let the user override the test.
796else
797 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
798 ac_prog_rejected=no
799 ac_dummy="$PATH"
800 for ac_dir in $ac_dummy; do
801 test -z "$ac_dir" && ac_dir=.
802 if test -f $ac_dir/$ac_word; then
803 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
804 ac_prog_rejected=yes
805 continue
806 fi
807 ac_cv_prog_CC="cc"
808 break
809 fi
810 done
811 IFS="$ac_save_ifs"
812if test $ac_prog_rejected = yes; then
813 # We found a bogon in the path, so make sure we never use it.
814 set dummy $ac_cv_prog_CC
815 shift
816 if test $# -gt 0; then
817 # We chose a different compiler from the bogus one.
818 # However, it has the same basename, so the bogon will be chosen
819 # first if we set CC to just the basename; use the full file name.
820 shift
821 set dummy "$ac_dir/$ac_word" "$@"
822 shift
823 ac_cv_prog_CC="$@"
824 fi
825fi
826fi
827fi
828CC="$ac_cv_prog_CC"
829if test -n "$CC"; then
830 echo "$ac_t""$CC" 1>&6
831else
832 echo "$ac_t""no" 1>&6
833fi
834
835 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
836fi
837
838echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
9cc28cc8 839echo "configure:840: checking whether we are using GNU C" >&5
252b5132
RH
840if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842else
843 cat > conftest.c <<EOF
844#ifdef __GNUC__
845 yes;
846#endif
847EOF
9cc28cc8 848if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
252b5132
RH
849 ac_cv_prog_gcc=yes
850else
851 ac_cv_prog_gcc=no
852fi
853fi
854
855echo "$ac_t""$ac_cv_prog_gcc" 1>&6
856
857if test $ac_cv_prog_gcc = yes; then
858 GCC=yes
0c0a36a4 859 ac_libiberty_warn_cflags='-W -Wall -Wtraditional'
252b5132
RH
860 ac_test_CFLAGS="${CFLAGS+set}"
861 ac_save_CFLAGS="$CFLAGS"
862 CFLAGS=
863 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
9cc28cc8 864echo "configure:865: checking whether ${CC-cc} accepts -g" >&5
252b5132
RH
865if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
866 echo $ac_n "(cached) $ac_c" 1>&6
867else
868 echo 'void f(){}' > conftest.c
869if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
870 ac_cv_prog_cc_g=yes
871else
872 ac_cv_prog_cc_g=no
873fi
874rm -f conftest*
875
876fi
877
878echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
879 if test "$ac_test_CFLAGS" = set; then
880 CFLAGS="$ac_save_CFLAGS"
881 elif test $ac_cv_prog_cc_g = yes; then
882 CFLAGS="-g -O2"
883 else
884 CFLAGS="-O2"
885 fi
886else
887 GCC=
0c0a36a4 888 ac_libiberty_warn_cflags=
252b5132
RH
889 test "${CFLAGS+set}" = set || CFLAGS="-g"
890fi
891
892
893echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
9cc28cc8 894echo "configure:895: checking for POSIXized ISC" >&5
252b5132
RH
895if test -d /etc/conf/kconfig.d &&
896 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
897then
898 echo "$ac_t""yes" 1>&6
899 ISC=yes # If later tests want to check for ISC.
900 cat >> confdefs.h <<\EOF
901#define _POSIX_SOURCE 1
902EOF
903
904 if test "$GCC" = yes; then
905 CC="$CC -posix"
906 else
907 CC="$CC -Xp"
908 fi
909else
910 echo "$ac_t""no" 1>&6
911 ISC=
912fi
913
914
915
916
917
918
919
920# Find a good install program. We prefer a C program (faster),
921# so one script is as good as another. But avoid the broken or
922# incompatible versions:
923# SysV /etc/install, /usr/sbin/install
924# SunOS /usr/etc/install
925# IRIX /sbin/install
926# AIX /bin/install
927# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
928# AFS /usr/afsws/bin/install, which mishandles nonexistent args
929# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
930# ./install, which can be erroneously created by make from ./install.sh.
931echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
9cc28cc8 932echo "configure:933: checking for a BSD compatible install" >&5
252b5132
RH
933if test -z "$INSTALL"; then
934if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
935 echo $ac_n "(cached) $ac_c" 1>&6
936else
937 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
938 for ac_dir in $PATH; do
939 # Account for people who put trailing slashes in PATH elements.
940 case "$ac_dir/" in
941 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
942 *)
943 # OSF1 and SCO ODT 3.0 have their own names for install.
944 # Don't use installbsd from OSF since it installs stuff as root
945 # by default.
946 for ac_prog in ginstall scoinst install; do
947 if test -f $ac_dir/$ac_prog; then
948 if test $ac_prog = install &&
949 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
950 # AIX install. It has an incompatible calling convention.
951 :
952 else
953 ac_cv_path_install="$ac_dir/$ac_prog -c"
954 break 2
955 fi
956 fi
957 done
958 ;;
959 esac
960 done
961 IFS="$ac_save_IFS"
962
963fi
964 if test "${ac_cv_path_install+set}" = set; then
965 INSTALL="$ac_cv_path_install"
966 else
967 # As a last resort, use the slow shell script. We don't cache a
968 # path for INSTALL within a source directory, because that will
969 # break other packages using the cache if that directory is
970 # removed, or if the path is relative.
971 INSTALL="$ac_install_sh"
972 fi
973fi
974echo "$ac_t""$INSTALL" 1>&6
975
976# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
977# It thinks the first close brace ends the variable substitution.
978test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
979
980test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
981
982test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
983
984
985. ${srcdir}/config.table
986host_makefile_frag=${frag}
987
988
989# It's OK to check for header files. Although the compiler may not be
990# able to link anything, it had better be able to at least compile
991# something.
992echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
9cc28cc8 993echo "configure:994: checking how to run the C preprocessor" >&5
252b5132
RH
994# On Suns, sometimes $CPP names a directory.
995if test -n "$CPP" && test -d "$CPP"; then
996 CPP=
997fi
998if test -z "$CPP"; then
999if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1000 echo $ac_n "(cached) $ac_c" 1>&6
1001else
1002 # This must be in double quotes, not single quotes, because CPP may get
1003 # substituted into the Makefile and "${CC-cc}" will confuse make.
1004 CPP="${CC-cc} -E"
1005 # On the NeXT, cc -E runs the code through the compiler's parser,
1006 # not just through cpp.
1007 cat > conftest.$ac_ext <<EOF
9cc28cc8 1008#line 1009 "configure"
252b5132
RH
1009#include "confdefs.h"
1010#include <assert.h>
1011Syntax Error
1012EOF
1013ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc28cc8 1014{ (eval echo configure:1015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1015ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1016if test -z "$ac_err"; then
1017 :
1018else
1019 echo "$ac_err" >&5
1020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
1022 rm -rf conftest*
1023 CPP="${CC-cc} -E -traditional-cpp"
1024 cat > conftest.$ac_ext <<EOF
9cc28cc8 1025#line 1026 "configure"
252b5132
RH
1026#include "confdefs.h"
1027#include <assert.h>
1028Syntax Error
1029EOF
1030ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc28cc8 1031{ (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1032ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1033if test -z "$ac_err"; then
1034 :
1035else
1036 echo "$ac_err" >&5
1037 echo "configure: failed program was:" >&5
1038 cat conftest.$ac_ext >&5
1039 rm -rf conftest*
1040 CPP="${CC-cc} -nologo -E"
1041 cat > conftest.$ac_ext <<EOF
9cc28cc8 1042#line 1043 "configure"
252b5132
RH
1043#include "confdefs.h"
1044#include <assert.h>
1045Syntax Error
1046EOF
1047ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc28cc8 1048{ (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1049ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1050if test -z "$ac_err"; then
1051 :
1052else
1053 echo "$ac_err" >&5
1054 echo "configure: failed program was:" >&5
1055 cat conftest.$ac_ext >&5
1056 rm -rf conftest*
1057 CPP=/lib/cpp
1058fi
1059rm -f conftest*
1060fi
1061rm -f conftest*
1062fi
1063rm -f conftest*
1064 ac_cv_prog_CPP="$CPP"
1065fi
1066 CPP="$ac_cv_prog_CPP"
1067else
1068 ac_cv_prog_CPP="$CPP"
1069fi
1070echo "$ac_t""$CPP" 1>&6
1071
0c0a36a4 1072for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h sys/stat.h
252b5132
RH
1073do
1074ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1075echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9cc28cc8 1076echo "configure:1077: checking for $ac_hdr" >&5
252b5132
RH
1077if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1078 echo $ac_n "(cached) $ac_c" 1>&6
1079else
1080 cat > conftest.$ac_ext <<EOF
9cc28cc8 1081#line 1082 "configure"
252b5132
RH
1082#include "confdefs.h"
1083#include <$ac_hdr>
1084EOF
1085ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc28cc8 1086{ (eval echo configure:1087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1087ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1088if test -z "$ac_err"; then
1089 rm -rf conftest*
1090 eval "ac_cv_header_$ac_safe=yes"
1091else
1092 echo "$ac_err" >&5
1093 echo "configure: failed program was:" >&5
1094 cat conftest.$ac_ext >&5
1095 rm -rf conftest*
1096 eval "ac_cv_header_$ac_safe=no"
1097fi
1098rm -f conftest*
1099fi
1100if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1101 echo "$ac_t""yes" 1>&6
1102 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1103 cat >> confdefs.h <<EOF
1104#define $ac_tr_hdr 1
1105EOF
1106
1107else
1108 echo "$ac_t""no" 1>&6
1109fi
1110done
1111
1112echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
9cc28cc8 1113echo "configure:1114: checking for sys/wait.h that is POSIX.1 compatible" >&5
252b5132
RH
1114if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1115 echo $ac_n "(cached) $ac_c" 1>&6
1116else
1117 cat > conftest.$ac_ext <<EOF
9cc28cc8 1118#line 1119 "configure"
252b5132
RH
1119#include "confdefs.h"
1120#include <sys/types.h>
1121#include <sys/wait.h>
1122#ifndef WEXITSTATUS
1123#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1124#endif
1125#ifndef WIFEXITED
1126#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1127#endif
1128int main() {
1129int s;
1130wait (&s);
1131s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1132; return 0; }
1133EOF
9cc28cc8 1134if { (eval echo configure:1135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
1135 rm -rf conftest*
1136 ac_cv_header_sys_wait_h=yes
1137else
1138 echo "configure: failed program was:" >&5
1139 cat conftest.$ac_ext >&5
1140 rm -rf conftest*
1141 ac_cv_header_sys_wait_h=no
1142fi
1143rm -f conftest*
1144fi
1145
1146echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1147if test $ac_cv_header_sys_wait_h = yes; then
1148 cat >> confdefs.h <<\EOF
1149#define HAVE_SYS_WAIT_H 1
1150EOF
1151
1152fi
1153
1154
1155# This is the list of functions which libiberty will provide if they
1156# are not available on the host.
1157
1158funcs="asprintf"
1159funcs="$funcs atexit"
1160funcs="$funcs basename"
1161funcs="$funcs bcmp"
1162funcs="$funcs bcopy"
1163funcs="$funcs bzero"
1164funcs="$funcs calloc"
1165funcs="$funcs clock"
1166funcs="$funcs getcwd"
1167funcs="$funcs getpagesize"
1168funcs="$funcs index"
1169funcs="$funcs insque"
1170funcs="$funcs memchr"
1171funcs="$funcs memcmp"
1172funcs="$funcs memcpy"
1173funcs="$funcs memmove"
1174funcs="$funcs memset"
1175funcs="$funcs mkstemps"
0c0a36a4 1176funcs="$funcs putenv"
252b5132
RH
1177funcs="$funcs random"
1178funcs="$funcs rename"
1179funcs="$funcs rindex"
0c0a36a4 1180funcs="$funcs setenv"
252b5132
RH
1181funcs="$funcs sigsetmask"
1182funcs="$funcs strcasecmp"
1183funcs="$funcs strchr"
1184funcs="$funcs strdup"
1185funcs="$funcs strncasecmp"
1186funcs="$funcs strrchr"
1187funcs="$funcs strstr"
1188funcs="$funcs strtod"
1189funcs="$funcs strtol"
1190funcs="$funcs strtoul"
1191funcs="$funcs tmpnam"
1192funcs="$funcs vasprintf"
1193funcs="$funcs vfprintf"
1194funcs="$funcs vprintf"
1195funcs="$funcs vsprintf"
1196funcs="$funcs waitpid"
1197
1198# Also in the old function.def file: alloca, vfork, getopt.
1199
1200vars="sys_errlist sys_nerr sys_siglist"
1201
0c0a36a4 1202checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
252b5132
RH
1203
1204# These are neither executed nor required, but they help keep
1205# autoheader happy without adding a bunch of text to acconfig.h.
1206if test "x" = "y"; then
1207 for ac_func in asprintf atexit basename bcmp bcopy bzero calloc clock getcwd
1208do
1209echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 1210echo "configure:1211: checking for $ac_func" >&5
252b5132
RH
1211if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1212 echo $ac_n "(cached) $ac_c" 1>&6
1213else
1214 cat > conftest.$ac_ext <<EOF
9cc28cc8 1215#line 1216 "configure"
252b5132
RH
1216#include "confdefs.h"
1217/* System header to define __stub macros and hopefully few prototypes,
1218 which can conflict with char $ac_func(); below. */
1219#include <assert.h>
1220/* Override any gcc2 internal prototype to avoid an error. */
1221/* We use char because int might match the return type of a gcc2
1222 builtin and then its argument prototype would still apply. */
1223char $ac_func();
1224
1225int main() {
1226
1227/* The GNU C library defines this for functions which it implements
1228 to always fail with ENOSYS. Some functions are actually named
1229 something starting with __ and the normal name is an alias. */
1230#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1231choke me
1232#else
1233$ac_func();
1234#endif
1235
1236; return 0; }
1237EOF
9cc28cc8 1238if { (eval echo configure:1239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1239 rm -rf conftest*
1240 eval "ac_cv_func_$ac_func=yes"
1241else
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1244 rm -rf conftest*
1245 eval "ac_cv_func_$ac_func=no"
1246fi
1247rm -f conftest*
1248fi
1249
1250if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1251 echo "$ac_t""yes" 1>&6
1252 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1253 cat >> confdefs.h <<EOF
1254#define $ac_tr_func 1
1255EOF
1256
1257else
1258 echo "$ac_t""no" 1>&6
1259fi
1260done
1261
1262 for ac_func in getpagesize index insque mkstemps memchr memcmp memcpy memmove
1263do
1264echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 1265echo "configure:1266: checking for $ac_func" >&5
252b5132
RH
1266if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269 cat > conftest.$ac_ext <<EOF
9cc28cc8 1270#line 1271 "configure"
252b5132
RH
1271#include "confdefs.h"
1272/* System header to define __stub macros and hopefully few prototypes,
1273 which can conflict with char $ac_func(); below. */
1274#include <assert.h>
1275/* Override any gcc2 internal prototype to avoid an error. */
1276/* We use char because int might match the return type of a gcc2
1277 builtin and then its argument prototype would still apply. */
1278char $ac_func();
1279
1280int main() {
1281
1282/* The GNU C library defines this for functions which it implements
1283 to always fail with ENOSYS. Some functions are actually named
1284 something starting with __ and the normal name is an alias. */
1285#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1286choke me
1287#else
1288$ac_func();
1289#endif
1290
1291; return 0; }
1292EOF
9cc28cc8 1293if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1294 rm -rf conftest*
1295 eval "ac_cv_func_$ac_func=yes"
1296else
1297 echo "configure: failed program was:" >&5
1298 cat conftest.$ac_ext >&5
1299 rm -rf conftest*
1300 eval "ac_cv_func_$ac_func=no"
1301fi
1302rm -f conftest*
1303fi
1304
1305if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1306 echo "$ac_t""yes" 1>&6
1307 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1308 cat >> confdefs.h <<EOF
1309#define $ac_tr_func 1
1310EOF
1311
1312else
1313 echo "$ac_t""no" 1>&6
1314fi
1315done
1316
0c0a36a4 1317 for ac_func in memset putenv random rename rindex sigsetmask strcasecmp
252b5132
RH
1318do
1319echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 1320echo "configure:1321: checking for $ac_func" >&5
252b5132
RH
1321if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1322 echo $ac_n "(cached) $ac_c" 1>&6
1323else
1324 cat > conftest.$ac_ext <<EOF
9cc28cc8 1325#line 1326 "configure"
252b5132
RH
1326#include "confdefs.h"
1327/* System header to define __stub macros and hopefully few prototypes,
1328 which can conflict with char $ac_func(); below. */
1329#include <assert.h>
1330/* Override any gcc2 internal prototype to avoid an error. */
1331/* We use char because int might match the return type of a gcc2
1332 builtin and then its argument prototype would still apply. */
1333char $ac_func();
1334
1335int main() {
1336
1337/* The GNU C library defines this for functions which it implements
1338 to always fail with ENOSYS. Some functions are actually named
1339 something starting with __ and the normal name is an alias. */
1340#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1341choke me
1342#else
1343$ac_func();
1344#endif
1345
1346; return 0; }
1347EOF
9cc28cc8 1348if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1349 rm -rf conftest*
1350 eval "ac_cv_func_$ac_func=yes"
1351else
1352 echo "configure: failed program was:" >&5
1353 cat conftest.$ac_ext >&5
1354 rm -rf conftest*
1355 eval "ac_cv_func_$ac_func=no"
1356fi
1357rm -f conftest*
1358fi
1359
1360if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1361 echo "$ac_t""yes" 1>&6
1362 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1363 cat >> confdefs.h <<EOF
1364#define $ac_tr_func 1
1365EOF
1366
1367else
1368 echo "$ac_t""no" 1>&6
1369fi
1370done
1371
0c0a36a4 1372 for ac_func in setenv strchr strdup strncasecmp strrchr strstr strtod strtol
252b5132
RH
1373do
1374echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 1375echo "configure:1376: checking for $ac_func" >&5
252b5132
RH
1376if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1377 echo $ac_n "(cached) $ac_c" 1>&6
1378else
1379 cat > conftest.$ac_ext <<EOF
9cc28cc8 1380#line 1381 "configure"
252b5132
RH
1381#include "confdefs.h"
1382/* System header to define __stub macros and hopefully few prototypes,
1383 which can conflict with char $ac_func(); below. */
1384#include <assert.h>
1385/* Override any gcc2 internal prototype to avoid an error. */
1386/* We use char because int might match the return type of a gcc2
1387 builtin and then its argument prototype would still apply. */
1388char $ac_func();
1389
1390int main() {
1391
1392/* The GNU C library defines this for functions which it implements
1393 to always fail with ENOSYS. Some functions are actually named
1394 something starting with __ and the normal name is an alias. */
1395#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1396choke me
1397#else
1398$ac_func();
1399#endif
1400
1401; return 0; }
1402EOF
9cc28cc8 1403if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1404 rm -rf conftest*
1405 eval "ac_cv_func_$ac_func=yes"
1406else
1407 echo "configure: failed program was:" >&5
1408 cat conftest.$ac_ext >&5
1409 rm -rf conftest*
1410 eval "ac_cv_func_$ac_func=no"
1411fi
1412rm -f conftest*
1413fi
1414
1415if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1416 echo "$ac_t""yes" 1>&6
1417 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1418 cat >> confdefs.h <<EOF
1419#define $ac_tr_func 1
1420EOF
1421
1422else
1423 echo "$ac_t""no" 1>&6
1424fi
1425done
1426
1427 for ac_func in strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid
1428do
1429echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 1430echo "configure:1431: checking for $ac_func" >&5
252b5132
RH
1431if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1432 echo $ac_n "(cached) $ac_c" 1>&6
1433else
1434 cat > conftest.$ac_ext <<EOF
9cc28cc8 1435#line 1436 "configure"
252b5132
RH
1436#include "confdefs.h"
1437/* System header to define __stub macros and hopefully few prototypes,
1438 which can conflict with char $ac_func(); below. */
1439#include <assert.h>
1440/* Override any gcc2 internal prototype to avoid an error. */
1441/* We use char because int might match the return type of a gcc2
1442 builtin and then its argument prototype would still apply. */
1443char $ac_func();
1444
1445int main() {
1446
1447/* The GNU C library defines this for functions which it implements
1448 to always fail with ENOSYS. Some functions are actually named
1449 something starting with __ and the normal name is an alias. */
1450#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1451choke me
1452#else
1453$ac_func();
1454#endif
1455
1456; return 0; }
1457EOF
9cc28cc8 1458if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1459 rm -rf conftest*
1460 eval "ac_cv_func_$ac_func=yes"
1461else
1462 echo "configure: failed program was:" >&5
1463 cat conftest.$ac_ext >&5
1464 rm -rf conftest*
1465 eval "ac_cv_func_$ac_func=no"
1466fi
1467rm -f conftest*
1468fi
1469
1470if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1471 echo "$ac_t""yes" 1>&6
1472 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1473 cat >> confdefs.h <<EOF
1474#define $ac_tr_func 1
1475EOF
1476
1477else
1478 echo "$ac_t""no" 1>&6
1479fi
1480done
1481
1482 cat >> confdefs.h <<\EOF
1483#define HAVE_SYS_ERRLIST 1
1484EOF
1485
1486 cat >> confdefs.h <<\EOF
1487#define HAVE_SYS_NERR 1
1488EOF
1489
1490 cat >> confdefs.h <<\EOF
1491#define HAVE_SYS_SIGLIST 1
1492EOF
1493
1494 for ac_func in getrusage on_exit psignal strerror strsignal sysconf times
1495do
1496echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 1497echo "configure:1498: checking for $ac_func" >&5
c1687039
ILT
1498if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1499 echo $ac_n "(cached) $ac_c" 1>&6
1500else
1501 cat > conftest.$ac_ext <<EOF
9cc28cc8 1502#line 1503 "configure"
c1687039
ILT
1503#include "confdefs.h"
1504/* System header to define __stub macros and hopefully few prototypes,
1505 which can conflict with char $ac_func(); below. */
1506#include <assert.h>
1507/* Override any gcc2 internal prototype to avoid an error. */
1508/* We use char because int might match the return type of a gcc2
1509 builtin and then its argument prototype would still apply. */
1510char $ac_func();
1511
1512int main() {
1513
1514/* The GNU C library defines this for functions which it implements
1515 to always fail with ENOSYS. Some functions are actually named
1516 something starting with __ and the normal name is an alias. */
1517#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1518choke me
1519#else
1520$ac_func();
1521#endif
1522
1523; return 0; }
1524EOF
9cc28cc8 1525if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c1687039
ILT
1526 rm -rf conftest*
1527 eval "ac_cv_func_$ac_func=yes"
1528else
1529 echo "configure: failed program was:" >&5
1530 cat conftest.$ac_ext >&5
1531 rm -rf conftest*
1532 eval "ac_cv_func_$ac_func=no"
1533fi
1534rm -f conftest*
1535fi
1536
1537if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1538 echo "$ac_t""yes" 1>&6
1539 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1540 cat >> confdefs.h <<EOF
1541#define $ac_tr_func 1
1542EOF
1543
1544else
1545 echo "$ac_t""no" 1>&6
1546fi
1547done
1548
0c0a36a4 1549 for ac_func in sbrk gettimeofday
c1687039
ILT
1550do
1551echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 1552echo "configure:1553: checking for $ac_func" >&5
252b5132
RH
1553if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1554 echo $ac_n "(cached) $ac_c" 1>&6
1555else
1556 cat > conftest.$ac_ext <<EOF
9cc28cc8 1557#line 1558 "configure"
252b5132
RH
1558#include "confdefs.h"
1559/* System header to define __stub macros and hopefully few prototypes,
1560 which can conflict with char $ac_func(); below. */
1561#include <assert.h>
1562/* Override any gcc2 internal prototype to avoid an error. */
1563/* We use char because int might match the return type of a gcc2
1564 builtin and then its argument prototype would still apply. */
1565char $ac_func();
1566
1567int main() {
1568
1569/* The GNU C library defines this for functions which it implements
1570 to always fail with ENOSYS. Some functions are actually named
1571 something starting with __ and the normal name is an alias. */
1572#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1573choke me
1574#else
1575$ac_func();
1576#endif
1577
1578; return 0; }
1579EOF
9cc28cc8 1580if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1581 rm -rf conftest*
1582 eval "ac_cv_func_$ac_func=yes"
1583else
1584 echo "configure: failed program was:" >&5
1585 cat conftest.$ac_ext >&5
1586 rm -rf conftest*
1587 eval "ac_cv_func_$ac_func=no"
1588fi
1589rm -f conftest*
1590fi
1591
1592if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1593 echo "$ac_t""yes" 1>&6
1594 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1595 cat >> confdefs.h <<EOF
1596#define $ac_tr_func 1
1597EOF
1598
1599else
1600 echo "$ac_t""no" 1>&6
1601fi
1602done
1603
1604fi
1605
1606# For each of these functions, if the host does not provide the
1607# function we want to put FN.o in LIBOBJS, and if the host does
1608# provide the function, we want to define HAVE_FN in config.h. Also,
1609# if the host does not provide alloca, we set ALLOCA to alloca.o
1610
1611setobjs=
0c0a36a4 1612CHECK=
252b5132
RH
1613if test -n "${with_target_subdir}"; then
1614
1615 # We are being configured as a target library. AC_REPLACE_FUNCS
1616 # may not work correctly, because the compiler may not be able to
1617 # link executables. Note that we may still be being configured
1618 # native.
1619
1620 # If we are being configured for newlib, we know which functions
1621 # newlib provide and which ones we will be expected to provide.
1622
1623 if test "x${with_newlib}" = "xyes"; then
1624 ALLOCA="alloca.o"
1625 LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o"
1626
1627 for f in $funcs; do
1628 case "$f" in
1629 asprintf | basename | insque | random | strdup | vasprintf)
1630 ;;
1631 *)
1632 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1633 cat >> confdefs.h <<EOF
1634#define $n 1
1635EOF
1636
1637 ;;
1638 esac
1639 done
1640
1641 # newlib doesnt provide any of the variables in $vars, so we
1642 # dont have to check them here.
1643
1644 # Of the functions in $checkfuncs, newlib only has strerror.
1645 cat >> confdefs.h <<\EOF
1646#define HAVE_STRERROR 1
1647EOF
1648
1649
1650 setobjs=yes
1651
9cc28cc8
DD
1652 if test -d ${libiberty_topdir}/newlib
1653 then
1654 EXTRA_INCS="-I${libiberty_topdir}/newlib/libc/include"
1655 fi
1656
252b5132 1657 fi
0c0a36a4
ILT
1658
1659else
1660
1661 # Not a target library, so we set things up to run the test suite.
1662 CHECK=check-cplus-dem
1663
252b5132
RH
1664fi
1665
0c0a36a4
ILT
1666
1667
9cc28cc8 1668
252b5132
RH
1669if test -z "${setobjs}"; then
1670 case "${host}" in
1671
1672 *-*-vxworks*)
1673 # Handle VxWorks configuration specially, since on VxWorks the
1674 # libraries are actually on the target board, not in the file
1675 # system.
1676 LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o"
1677 LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o"
1678 for f in $funcs; do
1679 case "$f" in
1680 basename | getpagesize | insque | random | strcasecmp)
1681 ;;
1682 strncasecmp | strdup | vfork | waitpid | vasprintf)
1683 ;;
1684 *)
1685 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1686 cat >> confdefs.h <<EOF
1687#define $n 1
1688EOF
1689
1690 ;;
1691 esac
1692 done
1693
1694 # VxWorks doesn't provide any of the variables in $vars, so we
1695 # don't have to check them here.
1696
1697 # Of the functions in $checkfuncs, VxWorks only has strerror.
1698 cat >> confdefs.h <<\EOF
1699#define HAVE_STRERROR 1
1700EOF
1701
1702
1703 setobjs=yes
1704 ;;
1705
1706 esac
1707fi
1708
1709if test -z "${setobjs}"; then
1710
1711 case "${host}" in
1712
1713 *-*-cygwin*)
1714 # The Cygwin library actually uses a couple of files from
1715 # libiberty when it is built. If we are building a native
1716 # Cygwin, and we run the tests, we will appear to have these
1717 # files. However, when we go on to build winsup, we will wind up
1718 # with a library which does not have the files, since they should
1719 # have come from libiberty.
1720
1721 # We handle this by removing the functions the winsup library
1722 # provides from our shell variables, so that they appear to be
1723 # missing.
1724
9cc28cc8
DD
1725 # DJ - only if we're *building* cygwin, not just building *with* cygwin
1726
1727 if test -n "${with_target_subdir}"
1728 then
1729 funcs="`echo $funcs | sed -e 's/random//'`"
1730 LIBOBJS="$LIBOBJS random.o"
1731 vars="`echo $vars | sed -e 's/sys_siglist//'`"
1732 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
1733 fi
252b5132
RH
1734 ;;
1735
1736 *-*-mingw32*)
1737 # Under mingw32, sys_nerr and sys_errlist exist, but they are
1738 # macros, so the test below won't find them.
1739 vars="`echo $vars | sed -e 's/sys_nerr//' -e 's/sys_errlist//'`"
1740 cat >> confdefs.h <<\EOF
1741#define HAVE_SYS_NERR 1
1742EOF
1743
1744 cat >> confdefs.h <<\EOF
1745#define HAVE_SYS_ERRLIST 1
1746EOF
1747
1748 ;;
1749
1750 *-*-uwin*)
1751 # Under some versions of uwin, vfork is notoriously buggy and the test
1752 # can hang configure; on other versions, vfork exists just as a stub.
1753 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
1754 ac_cv_func_vfork_works=no
0c0a36a4
ILT
1755 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
1756 # macros (actually, these are imported from a DLL, but the end effect
1757 # is the same), so the test below won't find them.
1758 cat >> confdefs.h <<\EOF
1759#define HAVE_SYS_NERR 1
1760EOF
1761
1762 cat >> confdefs.h <<\EOF
1763#define HAVE_SYS_ERRLIST 1
1764EOF
1765
252b5132
RH
1766 ;;
1767
1768 esac
1769
1770 # We haven't set the list of objects yet. Use the standard autoconf
1771 # tests. This will only work if the compiler works.
1772 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
9cc28cc8 1773echo "configure:1774: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132
RH
1774
1775ac_ext=c
1776# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1777ac_cpp='$CPP $CPPFLAGS'
1778ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1779ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1780cross_compiling=$ac_cv_prog_cc_cross
1781
1782cat > conftest.$ac_ext << EOF
1783
9cc28cc8 1784#line 1785 "configure"
252b5132
RH
1785#include "confdefs.h"
1786
1787main(){return(0);}
1788EOF
9cc28cc8 1789if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1790 ac_cv_prog_cc_works=yes
1791 # If we can't run a trivial program, we are probably using a cross compiler.
1792 if (./conftest; exit) 2>/dev/null; then
1793 ac_cv_prog_cc_cross=no
1794 else
1795 ac_cv_prog_cc_cross=yes
1796 fi
1797else
1798 echo "configure: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1800 ac_cv_prog_cc_works=no
1801fi
1802rm -fr conftest*
1803ac_ext=c
1804# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1805ac_cpp='$CPP $CPPFLAGS'
1806ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1807ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1808cross_compiling=$ac_cv_prog_cc_cross
1809
1810echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1811if test $ac_cv_prog_cc_works = no; then
1812 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1813fi
1814echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
9cc28cc8 1815echo "configure:1816: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
252b5132
RH
1816echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1817cross_compiling=$ac_cv_prog_cc_cross
1818
1819 for ac_func in $funcs
1820do
1821echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 1822echo "configure:1823: checking for $ac_func" >&5
252b5132
RH
1823if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1825else
1826 cat > conftest.$ac_ext <<EOF
9cc28cc8 1827#line 1828 "configure"
252b5132
RH
1828#include "confdefs.h"
1829/* System header to define __stub macros and hopefully few prototypes,
1830 which can conflict with char $ac_func(); below. */
1831#include <assert.h>
1832/* Override any gcc2 internal prototype to avoid an error. */
1833/* We use char because int might match the return type of a gcc2
1834 builtin and then its argument prototype would still apply. */
1835char $ac_func();
1836
1837int main() {
1838
1839/* The GNU C library defines this for functions which it implements
1840 to always fail with ENOSYS. Some functions are actually named
1841 something starting with __ and the normal name is an alias. */
1842#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1843choke me
1844#else
1845$ac_func();
1846#endif
1847
1848; return 0; }
1849EOF
9cc28cc8 1850if { (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1851 rm -rf conftest*
1852 eval "ac_cv_func_$ac_func=yes"
1853else
1854 echo "configure: failed program was:" >&5
1855 cat conftest.$ac_ext >&5
1856 rm -rf conftest*
1857 eval "ac_cv_func_$ac_func=no"
1858fi
1859rm -f conftest*
1860fi
1861
1862if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1863 echo "$ac_t""yes" 1>&6
1864 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1865 cat >> confdefs.h <<EOF
1866#define $ac_tr_func 1
1867EOF
1868
1869else
1870 echo "$ac_t""no" 1>&6
1871LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
1872fi
1873done
1874
1875
0c0a36a4
ILT
1876
1877 case "${host}" in
1878 *-*-interix)
1879 # On Interix, it wrongly concludes that the MSVC compiler supports alloca.
1880 # (MSVC does on Win32, not on Interix.)
1881 # This should be temporary.
1882
1883 ac_cv_header_alloca_h=no
1884 ac_cv_func_alloca_works=no
1885 ALLOCA=alloca.o
1886 cat >> confdefs.h <<\EOF
1887#define C_ALLOCA 1
1888EOF
1889 cat >> confdefs.h <<EOF
1890#define STACK_DIRECTION -1
1891EOF
1892 ;;
1893 *)
1894 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
252b5132
RH
1895# for constant arguments. Useless!
1896echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9cc28cc8 1897echo "configure:1898: checking for working alloca.h" >&5
252b5132
RH
1898if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1899 echo $ac_n "(cached) $ac_c" 1>&6
1900else
1901 cat > conftest.$ac_ext <<EOF
9cc28cc8 1902#line 1903 "configure"
252b5132
RH
1903#include "confdefs.h"
1904#include <alloca.h>
1905int main() {
1906char *p = alloca(2 * sizeof(int));
1907; return 0; }
1908EOF
9cc28cc8 1909if { (eval echo configure:1910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1910 rm -rf conftest*
1911 ac_cv_header_alloca_h=yes
1912else
1913 echo "configure: failed program was:" >&5
1914 cat conftest.$ac_ext >&5
1915 rm -rf conftest*
1916 ac_cv_header_alloca_h=no
1917fi
1918rm -f conftest*
1919fi
1920
1921echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1922if test $ac_cv_header_alloca_h = yes; then
1923 cat >> confdefs.h <<\EOF
1924#define HAVE_ALLOCA_H 1
1925EOF
1926
1927fi
1928
1929echo $ac_n "checking for alloca""... $ac_c" 1>&6
9cc28cc8 1930echo "configure:1931: checking for alloca" >&5
252b5132
RH
1931if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1932 echo $ac_n "(cached) $ac_c" 1>&6
1933else
1934 cat > conftest.$ac_ext <<EOF
9cc28cc8 1935#line 1936 "configure"
252b5132
RH
1936#include "confdefs.h"
1937
1938#ifdef __GNUC__
1939# define alloca __builtin_alloca
1940#else
1941# ifdef _MSC_VER
1942# include <malloc.h>
1943# define alloca _alloca
1944# else
1945# if HAVE_ALLOCA_H
1946# include <alloca.h>
1947# else
1948# ifdef _AIX
1949 #pragma alloca
1950# else
1951# ifndef alloca /* predefined by HP cc +Olibcalls */
1952char *alloca ();
1953# endif
1954# endif
1955# endif
1956# endif
1957#endif
1958
1959int main() {
1960char *p = (char *) alloca(1);
1961; return 0; }
1962EOF
9cc28cc8 1963if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1964 rm -rf conftest*
1965 ac_cv_func_alloca_works=yes
1966else
1967 echo "configure: failed program was:" >&5
1968 cat conftest.$ac_ext >&5
1969 rm -rf conftest*
1970 ac_cv_func_alloca_works=no
1971fi
1972rm -f conftest*
1973fi
1974
1975echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1976if test $ac_cv_func_alloca_works = yes; then
1977 cat >> confdefs.h <<\EOF
1978#define HAVE_ALLOCA 1
1979EOF
1980
1981fi
1982
1983if test $ac_cv_func_alloca_works = no; then
1984 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1985 # that cause trouble. Some versions do not even contain alloca or
1986 # contain a buggy version. If you still want to use their alloca,
1987 # use ar to extract alloca.o from them instead of compiling alloca.c.
1988 ALLOCA=alloca.${ac_objext}
1989 cat >> confdefs.h <<\EOF
1990#define C_ALLOCA 1
1991EOF
1992
1993
1994echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9cc28cc8 1995echo "configure:1996: checking whether alloca needs Cray hooks" >&5
252b5132
RH
1996if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1997 echo $ac_n "(cached) $ac_c" 1>&6
1998else
1999 cat > conftest.$ac_ext <<EOF
9cc28cc8 2000#line 2001 "configure"
252b5132
RH
2001#include "confdefs.h"
2002#if defined(CRAY) && ! defined(CRAY2)
2003webecray
2004#else
2005wenotbecray
2006#endif
2007
2008EOF
2009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2010 egrep "webecray" >/dev/null 2>&1; then
2011 rm -rf conftest*
2012 ac_cv_os_cray=yes
2013else
2014 rm -rf conftest*
2015 ac_cv_os_cray=no
2016fi
2017rm -f conftest*
2018
2019fi
2020
2021echo "$ac_t""$ac_cv_os_cray" 1>&6
2022if test $ac_cv_os_cray = yes; then
2023for ac_func in _getb67 GETB67 getb67; do
2024 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 2025echo "configure:2026: checking for $ac_func" >&5
252b5132
RH
2026if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2027 echo $ac_n "(cached) $ac_c" 1>&6
2028else
2029 cat > conftest.$ac_ext <<EOF
9cc28cc8 2030#line 2031 "configure"
252b5132
RH
2031#include "confdefs.h"
2032/* System header to define __stub macros and hopefully few prototypes,
2033 which can conflict with char $ac_func(); below. */
2034#include <assert.h>
2035/* Override any gcc2 internal prototype to avoid an error. */
2036/* We use char because int might match the return type of a gcc2
2037 builtin and then its argument prototype would still apply. */
2038char $ac_func();
2039
2040int main() {
2041
2042/* The GNU C library defines this for functions which it implements
2043 to always fail with ENOSYS. Some functions are actually named
2044 something starting with __ and the normal name is an alias. */
2045#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2046choke me
2047#else
2048$ac_func();
2049#endif
2050
2051; return 0; }
2052EOF
9cc28cc8 2053if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2054 rm -rf conftest*
2055 eval "ac_cv_func_$ac_func=yes"
2056else
2057 echo "configure: failed program was:" >&5
2058 cat conftest.$ac_ext >&5
2059 rm -rf conftest*
2060 eval "ac_cv_func_$ac_func=no"
2061fi
2062rm -f conftest*
2063fi
2064
2065if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2066 echo "$ac_t""yes" 1>&6
2067 cat >> confdefs.h <<EOF
2068#define CRAY_STACKSEG_END $ac_func
2069EOF
2070
2071 break
2072else
2073 echo "$ac_t""no" 1>&6
2074fi
2075
2076done
2077fi
2078
2079echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9cc28cc8 2080echo "configure:2081: checking stack direction for C alloca" >&5
252b5132
RH
2081if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2082 echo $ac_n "(cached) $ac_c" 1>&6
2083else
2084 if test "$cross_compiling" = yes; then
2085 ac_cv_c_stack_direction=0
2086else
2087 cat > conftest.$ac_ext <<EOF
9cc28cc8 2088#line 2089 "configure"
252b5132
RH
2089#include "confdefs.h"
2090find_stack_direction ()
2091{
2092 static char *addr = 0;
2093 auto char dummy;
2094 if (addr == 0)
2095 {
2096 addr = &dummy;
2097 return find_stack_direction ();
2098 }
2099 else
2100 return (&dummy > addr) ? 1 : -1;
2101}
2102main ()
2103{
2104 exit (find_stack_direction() < 0);
2105}
2106EOF
9cc28cc8 2107if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2108then
2109 ac_cv_c_stack_direction=1
2110else
2111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
2113 rm -fr conftest*
2114 ac_cv_c_stack_direction=-1
2115fi
2116rm -fr conftest*
2117fi
2118
2119fi
2120
2121echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2122cat >> confdefs.h <<EOF
2123#define STACK_DIRECTION $ac_cv_c_stack_direction
2124EOF
2125
2126fi
2127
0c0a36a4
ILT
2128 ;;
2129 esac
2130
252b5132 2131 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9cc28cc8 2132echo "configure:2133: checking for ANSI C header files" >&5
252b5132
RH
2133if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2134 echo $ac_n "(cached) $ac_c" 1>&6
2135else
2136 cat > conftest.$ac_ext <<EOF
9cc28cc8 2137#line 2138 "configure"
252b5132
RH
2138#include "confdefs.h"
2139#include <stdlib.h>
2140#include <stdarg.h>
2141#include <string.h>
2142#include <float.h>
2143EOF
2144ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc28cc8 2145{ (eval echo configure:2146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2146ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2147if test -z "$ac_err"; then
2148 rm -rf conftest*
2149 ac_cv_header_stdc=yes
2150else
2151 echo "$ac_err" >&5
2152 echo "configure: failed program was:" >&5
2153 cat conftest.$ac_ext >&5
2154 rm -rf conftest*
2155 ac_cv_header_stdc=no
2156fi
2157rm -f conftest*
2158
2159if test $ac_cv_header_stdc = yes; then
2160 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2161cat > conftest.$ac_ext <<EOF
9cc28cc8 2162#line 2163 "configure"
252b5132
RH
2163#include "confdefs.h"
2164#include <string.h>
2165EOF
2166if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2167 egrep "memchr" >/dev/null 2>&1; then
2168 :
2169else
2170 rm -rf conftest*
2171 ac_cv_header_stdc=no
2172fi
2173rm -f conftest*
2174
2175fi
2176
2177if test $ac_cv_header_stdc = yes; then
2178 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2179cat > conftest.$ac_ext <<EOF
9cc28cc8 2180#line 2181 "configure"
252b5132
RH
2181#include "confdefs.h"
2182#include <stdlib.h>
2183EOF
2184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2185 egrep "free" >/dev/null 2>&1; then
2186 :
2187else
2188 rm -rf conftest*
2189 ac_cv_header_stdc=no
2190fi
2191rm -f conftest*
2192
2193fi
2194
2195if test $ac_cv_header_stdc = yes; then
2196 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2197if test "$cross_compiling" = yes; then
2198 :
2199else
2200 cat > conftest.$ac_ext <<EOF
9cc28cc8 2201#line 2202 "configure"
252b5132
RH
2202#include "confdefs.h"
2203#include <ctype.h>
2204#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2205#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2206#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2207int main () { int i; for (i = 0; i < 256; i++)
2208if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2209exit (0); }
2210
2211EOF
9cc28cc8 2212if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2213then
2214 :
2215else
2216 echo "configure: failed program was:" >&5
2217 cat conftest.$ac_ext >&5
2218 rm -fr conftest*
2219 ac_cv_header_stdc=no
2220fi
2221rm -fr conftest*
2222fi
2223
2224fi
2225fi
2226
2227echo "$ac_t""$ac_cv_header_stdc" 1>&6
2228if test $ac_cv_header_stdc = yes; then
2229 cat >> confdefs.h <<\EOF
2230#define STDC_HEADERS 1
2231EOF
2232
2233fi
2234
2235echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9cc28cc8 2236echo "configure:2237: checking for pid_t" >&5
252b5132
RH
2237if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2238 echo $ac_n "(cached) $ac_c" 1>&6
2239else
2240 cat > conftest.$ac_ext <<EOF
9cc28cc8 2241#line 2242 "configure"
252b5132
RH
2242#include "confdefs.h"
2243#include <sys/types.h>
2244#if STDC_HEADERS
2245#include <stdlib.h>
2246#include <stddef.h>
2247#endif
2248EOF
2249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2250 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2251 rm -rf conftest*
2252 ac_cv_type_pid_t=yes
2253else
2254 rm -rf conftest*
2255 ac_cv_type_pid_t=no
2256fi
2257rm -f conftest*
2258
2259fi
2260echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2261if test $ac_cv_type_pid_t = no; then
2262 cat >> confdefs.h <<\EOF
2263#define pid_t int
2264EOF
2265
2266fi
2267
2268ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2269echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9cc28cc8 2270echo "configure:2271: checking for vfork.h" >&5
252b5132
RH
2271if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2272 echo $ac_n "(cached) $ac_c" 1>&6
2273else
2274 cat > conftest.$ac_ext <<EOF
9cc28cc8 2275#line 2276 "configure"
252b5132
RH
2276#include "confdefs.h"
2277#include <vfork.h>
2278EOF
2279ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9cc28cc8 2280{ (eval echo configure:2281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2281ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2282if test -z "$ac_err"; then
2283 rm -rf conftest*
2284 eval "ac_cv_header_$ac_safe=yes"
2285else
2286 echo "$ac_err" >&5
2287 echo "configure: failed program was:" >&5
2288 cat conftest.$ac_ext >&5
2289 rm -rf conftest*
2290 eval "ac_cv_header_$ac_safe=no"
2291fi
2292rm -f conftest*
2293fi
2294if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2295 echo "$ac_t""yes" 1>&6
2296 cat >> confdefs.h <<\EOF
2297#define HAVE_VFORK_H 1
2298EOF
2299
2300else
2301 echo "$ac_t""no" 1>&6
2302fi
2303
2304echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9cc28cc8 2305echo "configure:2306: checking for working vfork" >&5
252b5132
RH
2306if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2307 echo $ac_n "(cached) $ac_c" 1>&6
2308else
2309 if test "$cross_compiling" = yes; then
2310 echo $ac_n "checking for vfork""... $ac_c" 1>&6
9cc28cc8 2311echo "configure:2312: checking for vfork" >&5
252b5132
RH
2312if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2313 echo $ac_n "(cached) $ac_c" 1>&6
2314else
2315 cat > conftest.$ac_ext <<EOF
9cc28cc8 2316#line 2317 "configure"
252b5132
RH
2317#include "confdefs.h"
2318/* System header to define __stub macros and hopefully few prototypes,
2319 which can conflict with char vfork(); below. */
2320#include <assert.h>
2321/* Override any gcc2 internal prototype to avoid an error. */
2322/* We use char because int might match the return type of a gcc2
2323 builtin and then its argument prototype would still apply. */
2324char vfork();
2325
2326int main() {
2327
2328/* The GNU C library defines this for functions which it implements
2329 to always fail with ENOSYS. Some functions are actually named
2330 something starting with __ and the normal name is an alias. */
2331#if defined (__stub_vfork) || defined (__stub___vfork)
2332choke me
2333#else
2334vfork();
2335#endif
2336
2337; return 0; }
2338EOF
9cc28cc8 2339if { (eval echo configure:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2340 rm -rf conftest*
2341 eval "ac_cv_func_vfork=yes"
2342else
2343 echo "configure: failed program was:" >&5
2344 cat conftest.$ac_ext >&5
2345 rm -rf conftest*
2346 eval "ac_cv_func_vfork=no"
2347fi
2348rm -f conftest*
2349fi
2350
2351if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2352 echo "$ac_t""yes" 1>&6
2353 :
2354else
2355 echo "$ac_t""no" 1>&6
2356fi
2357
2358ac_cv_func_vfork_works=$ac_cv_func_vfork
2359else
2360 cat > conftest.$ac_ext <<EOF
9cc28cc8 2361#line 2362 "configure"
252b5132
RH
2362#include "confdefs.h"
2363/* Thanks to Paul Eggert for this test. */
2364#include <stdio.h>
2365#include <sys/types.h>
2366#include <sys/stat.h>
2367#ifdef HAVE_UNISTD_H
2368#include <unistd.h>
2369#endif
2370#ifdef HAVE_VFORK_H
2371#include <vfork.h>
2372#endif
2373/* On some sparc systems, changes by the child to local and incoming
2374 argument registers are propagated back to the parent.
2375 The compiler is told about this with #include <vfork.h>,
2376 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2377 Test for this by using a static variable whose address
2378 is put into a register that is clobbered by the vfork. */
2379static
2380#ifdef __cplusplus
2381sparc_address_test (int arg)
2382#else
2383sparc_address_test (arg) int arg;
2384#endif
2385{
2386 static pid_t child;
2387 if (!child) {
2388 child = vfork ();
2389 if (child < 0) {
2390 perror ("vfork");
2391 _exit(2);
2392 }
2393 if (!child) {
2394 arg = getpid();
2395 write(-1, "", 0);
2396 _exit (arg);
2397 }
2398 }
2399}
2400main() {
2401 pid_t parent = getpid ();
2402 pid_t child;
2403
2404 sparc_address_test ();
2405
2406 child = vfork ();
2407
2408 if (child == 0) {
2409 /* Here is another test for sparc vfork register problems.
2410 This test uses lots of local variables, at least
2411 as many local variables as main has allocated so far
2412 including compiler temporaries. 4 locals are enough for
2413 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2414 A buggy compiler should reuse the register of parent
2415 for one of the local variables, since it will think that
2416 parent can't possibly be used any more in this routine.
2417 Assigning to the local variable will thus munge parent
2418 in the parent process. */
2419 pid_t
2420 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2421 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2422 /* Convince the compiler that p..p7 are live; otherwise, it might
2423 use the same hardware register for all 8 local variables. */
2424 if (p != p1 || p != p2 || p != p3 || p != p4
2425 || p != p5 || p != p6 || p != p7)
2426 _exit(1);
2427
2428 /* On some systems (e.g. IRIX 3.3),
2429 vfork doesn't separate parent from child file descriptors.
2430 If the child closes a descriptor before it execs or exits,
2431 this munges the parent's descriptor as well.
2432 Test for this by closing stdout in the child. */
2433 _exit(close(fileno(stdout)) != 0);
2434 } else {
2435 int status;
2436 struct stat st;
2437
2438 while (wait(&status) != child)
2439 ;
2440 exit(
2441 /* Was there some problem with vforking? */
2442 child < 0
2443
2444 /* Did the child fail? (This shouldn't happen.) */
2445 || status
2446
2447 /* Did the vfork/compiler bug occur? */
2448 || parent != getpid()
2449
2450 /* Did the file descriptor bug occur? */
2451 || fstat(fileno(stdout), &st) != 0
2452 );
2453 }
2454}
2455EOF
9cc28cc8 2456if { (eval echo configure:2457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2457then
2458 ac_cv_func_vfork_works=yes
2459else
2460 echo "configure: failed program was:" >&5
2461 cat conftest.$ac_ext >&5
2462 rm -fr conftest*
2463 ac_cv_func_vfork_works=no
2464fi
2465rm -fr conftest*
2466fi
2467
2468fi
2469
2470echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2471if test $ac_cv_func_vfork_works = no; then
2472 cat >> confdefs.h <<\EOF
2473#define vfork fork
2474EOF
2475
2476fi
2477
2478 if test $ac_cv_func_vfork_works = no; then
2479 LIBOBJS="$LIBOBJS vfork.o"
2480 fi
2481 for v in $vars; do
2482 echo $ac_n "checking for $v""... $ac_c" 1>&6
9cc28cc8 2483echo "configure:2484: checking for $v" >&5
252b5132
RH
2484 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
2485 echo $ac_n "(cached) $ac_c" 1>&6
2486else
2487 cat > conftest.$ac_ext <<EOF
9cc28cc8 2488#line 2489 "configure"
252b5132
RH
2489#include "confdefs.h"
2490int *p;
2491int main() {
2492extern int $v; p = &$v;
2493; return 0; }
2494EOF
9cc28cc8 2495if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2496 rm -rf conftest*
2497 eval "libiberty_cv_var_$v=yes"
2498else
2499 echo "configure: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 rm -rf conftest*
2502 eval "libiberty_cv_var_$v=no"
2503fi
2504rm -f conftest*
2505fi
2506
2507 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
2508 echo "$ac_t""yes" 1>&6
2509 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2510 cat >> confdefs.h <<EOF
2511#define $n 1
2512EOF
2513
2514 else
2515 echo "$ac_t""no" 1>&6
2516 fi
2517 done
2518 for ac_func in $checkfuncs
2519do
2520echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9cc28cc8 2521echo "configure:2522: checking for $ac_func" >&5
252b5132
RH
2522if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2523 echo $ac_n "(cached) $ac_c" 1>&6
2524else
2525 cat > conftest.$ac_ext <<EOF
9cc28cc8 2526#line 2527 "configure"
252b5132
RH
2527#include "confdefs.h"
2528/* System header to define __stub macros and hopefully few prototypes,
2529 which can conflict with char $ac_func(); below. */
2530#include <assert.h>
2531/* Override any gcc2 internal prototype to avoid an error. */
2532/* We use char because int might match the return type of a gcc2
2533 builtin and then its argument prototype would still apply. */
2534char $ac_func();
2535
2536int main() {
2537
2538/* The GNU C library defines this for functions which it implements
2539 to always fail with ENOSYS. Some functions are actually named
2540 something starting with __ and the normal name is an alias. */
2541#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2542choke me
2543#else
2544$ac_func();
2545#endif
2546
2547; return 0; }
2548EOF
9cc28cc8 2549if { (eval echo configure:2550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2550 rm -rf conftest*
2551 eval "ac_cv_func_$ac_func=yes"
2552else
2553 echo "configure: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2555 rm -rf conftest*
2556 eval "ac_cv_func_$ac_func=no"
2557fi
2558rm -f conftest*
2559fi
2560
2561if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2562 echo "$ac_t""yes" 1>&6
2563 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2564 cat >> confdefs.h <<EOF
2565#define $ac_tr_func 1
2566EOF
2567
2568else
2569 echo "$ac_t""no" 1>&6
2570fi
2571done
2572
2573fi
2574
2575# Install a library built with a cross compiler in $(tooldir) rather
2576# than $(libdir).
2577if test -z "${with_cross_host}"; then
2578 INSTALL_DEST=libdir
2579else
2580 INSTALL_DEST=tooldir
2581fi
2582
2583
2584# We need multilib support, but only if configuring for the target.
2585trap '' 1 2 15
2586cat > confcache <<\EOF
2587# This file is a shell script that caches the results of configure
2588# tests run on this system so they can be shared between configure
2589# scripts and configure runs. It is not useful on other systems.
2590# If it contains results you don't want to keep, you may remove or edit it.
2591#
2592# By default, configure uses ./config.cache as the cache file,
2593# creating it if it does not exist already. You can give configure
2594# the --cache-file=FILE option to use a different cache file; that is
2595# what configure does when it calls configure scripts in
2596# subdirectories, so they share the cache.
2597# Giving --cache-file=/dev/null disables caching, for debugging configure.
2598# config.status only pays attention to the cache file if you give it the
2599# --recheck option to rerun configure.
2600#
2601EOF
2602# The following way of writing the cache mishandles newlines in values,
2603# but we know of no workaround that is simple, portable, and efficient.
2604# So, don't put newlines in cache variables' values.
2605# Ultrix sh set writes to stderr and can't be redirected directly,
2606# and sets the high bit in the cache file unless we assign to the vars.
2607(set) 2>&1 |
2608 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2609 *ac_space=\ *)
2610 # `set' does not quote correctly, so add quotes (double-quote substitution
2611 # turns \\\\ into \\, and sed turns \\ into \).
2612 sed -n \
2613 -e "s/'/'\\\\''/g" \
2614 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2615 ;;
2616 *)
2617 # `set' quotes correctly as required by POSIX, so do not add quotes.
2618 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2619 ;;
2620 esac >> confcache
2621if cmp -s $cache_file confcache; then
2622 :
2623else
2624 if test -w $cache_file; then
2625 echo "updating cache $cache_file"
2626 cat confcache > $cache_file
2627 else
2628 echo "not updating unwritable cache $cache_file"
2629 fi
2630fi
2631rm -f confcache
2632
2633trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2634
2635test "x$prefix" = xNONE && prefix=$ac_default_prefix
2636# Let make expand exec_prefix.
2637test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2638
2639# Any assignment to VPATH causes Sun make to only execute
2640# the first set of double-colon rules, so remove it if not needed.
2641# If there is a colon in the path, we need to keep it.
2642if test "x$srcdir" = x.; then
2643 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2644fi
2645
2646trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2647
2648DEFS=-DHAVE_CONFIG_H
2649
2650# Without the "./", some shells look in PATH for config.status.
2651: ${CONFIG_STATUS=./config.status}
2652
2653echo creating $CONFIG_STATUS
2654rm -f $CONFIG_STATUS
2655cat > $CONFIG_STATUS <<EOF
2656#! /bin/sh
2657# Generated automatically by configure.
2658# Run this file to recreate the current configuration.
2659# This directory was configured as follows,
2660# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2661#
2662# $0 $ac_configure_args
2663#
2664# Compiler output produced by configure, useful for debugging
2665# configure, is in ./config.log if it exists.
2666
2667ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2668for ac_option
2669do
2670 case "\$ac_option" in
2671 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2672 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2673 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2674 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2675 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2676 exit 0 ;;
2677 -help | --help | --hel | --he | --h)
2678 echo "\$ac_cs_usage"; exit 0 ;;
2679 *) echo "\$ac_cs_usage"; exit 1 ;;
2680 esac
2681done
2682
2683ac_given_srcdir=$srcdir
2684ac_given_INSTALL="$INSTALL"
2685
0c0a36a4 2686trap 'rm -fr `echo "Makefile testsuite/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
252b5132
RH
2687EOF
2688cat >> $CONFIG_STATUS <<EOF
2689
2690# Protect against being on the right side of a sed subst in config.status.
2691sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2692 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2693$ac_vpsub
2694$extrasub
2695s%@SHELL@%$SHELL%g
2696s%@CFLAGS@%$CFLAGS%g
2697s%@CPPFLAGS@%$CPPFLAGS%g
2698s%@CXXFLAGS@%$CXXFLAGS%g
2699s%@FFLAGS@%$FFLAGS%g
2700s%@DEFS@%$DEFS%g
2701s%@LDFLAGS@%$LDFLAGS%g
2702s%@LIBS@%$LIBS%g
2703s%@exec_prefix@%$exec_prefix%g
2704s%@prefix@%$prefix%g
2705s%@program_transform_name@%$program_transform_name%g
2706s%@bindir@%$bindir%g
2707s%@sbindir@%$sbindir%g
2708s%@libexecdir@%$libexecdir%g
2709s%@datadir@%$datadir%g
2710s%@sysconfdir@%$sysconfdir%g
2711s%@sharedstatedir@%$sharedstatedir%g
2712s%@localstatedir@%$localstatedir%g
2713s%@libdir@%$libdir%g
2714s%@includedir@%$includedir%g
2715s%@oldincludedir@%$oldincludedir%g
2716s%@infodir@%$infodir%g
2717s%@mandir@%$mandir%g
2718s%@host@%$host%g
2719s%@host_alias@%$host_alias%g
2720s%@host_cpu@%$host_cpu%g
2721s%@host_vendor@%$host_vendor%g
2722s%@host_os@%$host_os%g
2723s%@build@%$build%g
2724s%@build_alias@%$build_alias%g
2725s%@build_cpu@%$build_cpu%g
2726s%@build_vendor@%$build_vendor%g
2727s%@build_os@%$build_os%g
2728s%@AR@%$AR%g
2729s%@RANLIB@%$RANLIB%g
0c0a36a4 2730s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g
252b5132
RH
2731s%@CC@%$CC%g
2732s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2733s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2734s%@INSTALL_DATA@%$INSTALL_DATA%g
2735/@host_makefile_frag@/r $host_makefile_frag
2736s%@host_makefile_frag@%%g
2737s%@CPP@%$CPP%g
9cc28cc8 2738s%@EXTRA_INCS@%$EXTRA_INCS%g
0c0a36a4 2739s%@CHECK@%$CHECK%g
252b5132
RH
2740s%@LIBOBJS@%$LIBOBJS%g
2741s%@ALLOCA@%$ALLOCA%g
2742s%@INSTALL_DEST@%$INSTALL_DEST%g
2743
2744CEOF
2745EOF
2746
2747cat >> $CONFIG_STATUS <<\EOF
2748
2749# Split the substitutions into bite-sized pieces for seds with
2750# small command number limits, like on Digital OSF/1 and HP-UX.
2751ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2752ac_file=1 # Number of current file.
2753ac_beg=1 # First line for current file.
2754ac_end=$ac_max_sed_cmds # Line after last line for current file.
2755ac_more_lines=:
2756ac_sed_cmds=""
2757while $ac_more_lines; do
2758 if test $ac_beg -gt 1; then
2759 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2760 else
2761 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2762 fi
2763 if test ! -s conftest.s$ac_file; then
2764 ac_more_lines=false
2765 rm -f conftest.s$ac_file
2766 else
2767 if test -z "$ac_sed_cmds"; then
2768 ac_sed_cmds="sed -f conftest.s$ac_file"
2769 else
2770 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2771 fi
2772 ac_file=`expr $ac_file + 1`
2773 ac_beg=$ac_end
2774 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2775 fi
2776done
2777if test -z "$ac_sed_cmds"; then
2778 ac_sed_cmds=cat
2779fi
2780EOF
2781
2782cat >> $CONFIG_STATUS <<EOF
2783
0c0a36a4 2784CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
252b5132
RH
2785EOF
2786cat >> $CONFIG_STATUS <<\EOF
2787for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2788 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2789 case "$ac_file" in
2790 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2791 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2792 *) ac_file_in="${ac_file}.in" ;;
2793 esac
2794
2795 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2796
2797 # Remove last slash and all that follows it. Not all systems have dirname.
2798 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2799 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2800 # The file is in a subdirectory.
2801 test ! -d "$ac_dir" && mkdir "$ac_dir"
2802 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2803 # A "../" for each directory in $ac_dir_suffix.
2804 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2805 else
2806 ac_dir_suffix= ac_dots=
2807 fi
2808
2809 case "$ac_given_srcdir" in
2810 .) srcdir=.
2811 if test -z "$ac_dots"; then top_srcdir=.
2812 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2813 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2814 *) # Relative path.
2815 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2816 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2817 esac
2818
2819 case "$ac_given_INSTALL" in
2820 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2821 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2822 esac
2823
2824 echo creating "$ac_file"
2825 rm -f "$ac_file"
2826 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2827 case "$ac_file" in
2828 *Makefile*) ac_comsub="1i\\
2829# $configure_input" ;;
2830 *) ac_comsub= ;;
2831 esac
2832
2833 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2834 sed -e "$ac_comsub
2835s%@configure_input@%$configure_input%g
2836s%@srcdir@%$srcdir%g
2837s%@top_srcdir@%$top_srcdir%g
2838s%@INSTALL@%$INSTALL%g
2839" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2840fi; done
2841rm -f conftest.s*
2842
2843# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2844# NAME is the cpp macro being defined and VALUE is the value it is being given.
2845#
2846# ac_d sets the value in "#define NAME VALUE" lines.
2847ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2848ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2849ac_dC='\3'
2850ac_dD='%g'
2851# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2852ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2853ac_uB='\([ ]\)%\1#\2define\3'
2854ac_uC=' '
2855ac_uD='\4%g'
2856# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2857ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2858ac_eB='$%\1#\2define\3'
2859ac_eC=' '
2860ac_eD='%g'
2861
2862if test "${CONFIG_HEADERS+set}" != set; then
2863EOF
2864cat >> $CONFIG_STATUS <<EOF
2865 CONFIG_HEADERS="config.h:config.in"
2866EOF
2867cat >> $CONFIG_STATUS <<\EOF
2868fi
2869for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2870 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2871 case "$ac_file" in
2872 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2873 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2874 *) ac_file_in="${ac_file}.in" ;;
2875 esac
2876
2877 echo creating $ac_file
2878
2879 rm -f conftest.frag conftest.in conftest.out
2880 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2881 cat $ac_file_inputs > conftest.in
2882
2883EOF
2884
2885# Transform confdefs.h into a sed script conftest.vals that substitutes
2886# the proper values into config.h.in to produce config.h. And first:
2887# Protect against being on the right side of a sed subst in config.status.
2888# Protect against being in an unquoted here document in config.status.
2889rm -f conftest.vals
2890cat > conftest.hdr <<\EOF
2891s/[\\&%]/\\&/g
2892s%[\\$`]%\\&%g
2893s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2894s%ac_d%ac_u%gp
2895s%ac_u%ac_e%gp
2896EOF
2897sed -n -f conftest.hdr confdefs.h > conftest.vals
2898rm -f conftest.hdr
2899
2900# This sed command replaces #undef with comments. This is necessary, for
2901# example, in the case of _POSIX_SOURCE, which is predefined and required
2902# on some systems where configure will not decide to define it.
2903cat >> conftest.vals <<\EOF
2904s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2905EOF
2906
2907# Break up conftest.vals because some shells have a limit on
2908# the size of here documents, and old seds have small limits too.
2909
2910rm -f conftest.tail
2911while :
2912do
2913 ac_lines=`grep -c . conftest.vals`
2914 # grep -c gives empty output for an empty file on some AIX systems.
2915 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2916 # Write a limited-size here document to conftest.frag.
2917 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2918 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2919 echo 'CEOF
2920 sed -f conftest.frag conftest.in > conftest.out
2921 rm -f conftest.in
2922 mv conftest.out conftest.in
2923' >> $CONFIG_STATUS
2924 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2925 rm -f conftest.vals
2926 mv conftest.tail conftest.vals
2927done
2928rm -f conftest.vals
2929
2930cat >> $CONFIG_STATUS <<\EOF
2931 rm -f conftest.frag conftest.h
2932 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2933 cat conftest.in >> conftest.h
2934 rm -f conftest.in
2935 if cmp -s $ac_file conftest.h 2>/dev/null; then
2936 echo "$ac_file is unchanged"
2937 rm -f conftest.h
2938 else
2939 # Remove last slash and all that follows it. Not all systems have dirname.
2940 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2941 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2942 # The file is in a subdirectory.
2943 test ! -d "$ac_dir" && mkdir "$ac_dir"
2944 fi
2945 rm -f $ac_file
2946 mv conftest.h $ac_file
2947 fi
2948fi; done
2949
2950EOF
2951cat >> $CONFIG_STATUS <<EOF
2952srcdir=${srcdir}
2953host=${host}
2954target=${target}
2955with_target_subdir=${with_target_subdir}
2956with_multisubdir=${with_multisubdir}
2957ac_configure_args="--enable-multilib ${ac_configure_args}"
2958CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2959libiberty_topdir=${libiberty_topdir}
2960
2961EOF
2962cat >> $CONFIG_STATUS <<\EOF
2963test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2964if test -n "$CONFIG_FILES"; then
2965 if test -n "${with_target_subdir}"; then
2966 # FIXME: We shouldn't need to set ac_file
2967 ac_file=Makefile
2968 . ${libiberty_topdir}/config-ml.in
2969 fi
2970fi
2971exit 0
2972EOF
2973chmod +x $CONFIG_STATUS
2974rm -fr confdefs* $ac_clean_files
2975test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2976
This page took 0.472951 seconds and 4 git commands to generate.