]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/configure
re PR rtl-optimization/10024 ([HP-PA] inline optimization ICE)
[thirdparty/gcc.git] / libiberty / configure
CommitLineData
0bc0cd11
JL
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
687361c8 4# Generated automatically using autoconf version 2.13
0bc0cd11
JL
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
cd862df8
L
15 --with-target-subdir=SUBDIR Configuring in a subdirectory for target"
16ac_help="$ac_help
17 --with-build-subdir=SUBDIR Configuring in a subdirectory for build"
ca6b370d
JL
18ac_help="$ac_help
19 --with-cross-host=HOST Configuring with a cross compiler"
0bc0cd11
JL
20ac_help="$ac_help
21 --with-newlib Configuring with newlib"
aaa5f039
DD
22ac_help="$ac_help
23 --enable-maintainer-mode
24 enable make rules and dependencies not useful
25 (and sometimes confusing) to the casual installer"
48d7db63
PE
26ac_help="$ac_help
27 --enable-install-libiberty Install headers for end users"
0bc0cd11
JL
28
29# Initialize some variables set by options.
30# The variables have the same names as the options, with
31# dashes changed to underlines.
32build=NONE
33cache_file=./config.cache
34exec_prefix=NONE
35host=NONE
36no_create=
37nonopt=NONE
38no_recursion=
39prefix=NONE
40program_prefix=NONE
41program_suffix=NONE
42program_transform_name=s,x,x,
43silent=
44site=
45srcdir=
46target=NONE
47verbose=
48x_includes=NONE
49x_libraries=NONE
50bindir='${exec_prefix}/bin'
51sbindir='${exec_prefix}/sbin'
52libexecdir='${exec_prefix}/libexec'
53datadir='${prefix}/share'
54sysconfdir='${prefix}/etc'
55sharedstatedir='${prefix}/com'
56localstatedir='${prefix}/var'
57libdir='${exec_prefix}/lib'
58includedir='${prefix}/include'
59oldincludedir='/usr/include'
60infodir='${prefix}/info'
61mandir='${prefix}/man'
62
63# Initialize some other variables.
64subdirs=
65MFLAGS= MAKEFLAGS=
66SHELL=${CONFIG_SHELL-/bin/sh}
67# Maximum number of lines to put in a shell here document.
68ac_max_here_lines=12
69
70ac_prev=
71for ac_option
72do
73
74 # If the previous option needs an argument, assign it.
75 if test -n "$ac_prev"; then
76 eval "$ac_prev=\$ac_option"
77 ac_prev=
78 continue
79 fi
80
81 case "$ac_option" in
82 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
83 *) ac_optarg= ;;
84 esac
85
86 # Accept the important Cygnus configure options, so we can diagnose typos.
87
88 case "$ac_option" in
89
90 -bindir | --bindir | --bindi | --bind | --bin | --bi)
91 ac_prev=bindir ;;
92 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
93 bindir="$ac_optarg" ;;
94
95 -build | --build | --buil | --bui | --bu)
96 ac_prev=build ;;
97 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
98 build="$ac_optarg" ;;
99
100 -cache-file | --cache-file | --cache-fil | --cache-fi \
101 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
102 ac_prev=cache_file ;;
103 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
104 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
105 cache_file="$ac_optarg" ;;
106
107 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
108 ac_prev=datadir ;;
109 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
110 | --da=*)
111 datadir="$ac_optarg" ;;
112
113 -disable-* | --disable-*)
114 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
115 # Reject names that are not valid shell variable names.
116 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
117 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118 fi
119 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120 eval "enable_${ac_feature}=no" ;;
121
122 -enable-* | --enable-*)
123 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
124 # Reject names that are not valid shell variable names.
125 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
126 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
127 fi
128 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
129 case "$ac_option" in
130 *=*) ;;
131 *) ac_optarg=yes ;;
132 esac
133 eval "enable_${ac_feature}='$ac_optarg'" ;;
134
135 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
136 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
137 | --exec | --exe | --ex)
138 ac_prev=exec_prefix ;;
139 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
140 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
141 | --exec=* | --exe=* | --ex=*)
142 exec_prefix="$ac_optarg" ;;
143
144 -gas | --gas | --ga | --g)
145 # Obsolete; use --with-gas.
146 with_gas=yes ;;
147
148 -help | --help | --hel | --he)
149 # Omit some internal or obsolete options to make the list less imposing.
150 # This message is too long to be a string in the A/UX 3.1 sh.
151 cat << EOF
152Usage: configure [options] [host]
153Options: [defaults in brackets after descriptions]
154Configuration:
155 --cache-file=FILE cache test results in FILE
156 --help print this message
157 --no-create do not create output files
158 --quiet, --silent do not print \`checking...' messages
159 --version print the version of autoconf that created configure
160Directory and file names:
161 --prefix=PREFIX install architecture-independent files in PREFIX
162 [$ac_default_prefix]
163 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
164 [same as prefix]
165 --bindir=DIR user executables in DIR [EPREFIX/bin]
166 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
167 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
168 --datadir=DIR read-only architecture-independent data in DIR
169 [PREFIX/share]
170 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
171 --sharedstatedir=DIR modifiable architecture-independent data in DIR
172 [PREFIX/com]
173 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
174 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
175 --includedir=DIR C header files in DIR [PREFIX/include]
176 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
177 --infodir=DIR info documentation in DIR [PREFIX/info]
178 --mandir=DIR man documentation in DIR [PREFIX/man]
179 --srcdir=DIR find the sources in DIR [configure dir or ..]
180 --program-prefix=PREFIX prepend PREFIX to installed program names
181 --program-suffix=SUFFIX append SUFFIX to installed program names
182 --program-transform-name=PROGRAM
183 run sed PROGRAM on installed program names
184EOF
185 cat << EOF
186Host type:
187 --build=BUILD configure for building on BUILD [BUILD=HOST]
188 --host=HOST configure for HOST [guessed]
189 --target=TARGET configure for TARGET [TARGET=HOST]
190Features and packages:
191 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
192 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
193 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
194 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
195 --x-includes=DIR X include files are in DIR
196 --x-libraries=DIR X library files are in DIR
197EOF
198 if test -n "$ac_help"; then
199 echo "--enable and --with options recognized:$ac_help"
200 fi
201 exit 0 ;;
202
203 -host | --host | --hos | --ho)
204 ac_prev=host ;;
205 -host=* | --host=* | --hos=* | --ho=*)
206 host="$ac_optarg" ;;
207
208 -includedir | --includedir | --includedi | --included | --include \
209 | --includ | --inclu | --incl | --inc)
210 ac_prev=includedir ;;
211 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
212 | --includ=* | --inclu=* | --incl=* | --inc=*)
213 includedir="$ac_optarg" ;;
214
215 -infodir | --infodir | --infodi | --infod | --info | --inf)
216 ac_prev=infodir ;;
217 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
218 infodir="$ac_optarg" ;;
219
220 -libdir | --libdir | --libdi | --libd)
221 ac_prev=libdir ;;
222 -libdir=* | --libdir=* | --libdi=* | --libd=*)
223 libdir="$ac_optarg" ;;
224
225 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
226 | --libexe | --libex | --libe)
227 ac_prev=libexecdir ;;
228 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
229 | --libexe=* | --libex=* | --libe=*)
230 libexecdir="$ac_optarg" ;;
231
232 -localstatedir | --localstatedir | --localstatedi | --localstated \
233 | --localstate | --localstat | --localsta | --localst \
234 | --locals | --local | --loca | --loc | --lo)
235 ac_prev=localstatedir ;;
236 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
237 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
238 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
239 localstatedir="$ac_optarg" ;;
240
241 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
242 ac_prev=mandir ;;
243 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
244 mandir="$ac_optarg" ;;
245
246 -nfp | --nfp | --nf)
247 # Obsolete; use --without-fp.
248 with_fp=no ;;
249
250 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
251 | --no-cr | --no-c)
252 no_create=yes ;;
253
254 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
255 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
256 no_recursion=yes ;;
257
258 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
259 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
260 | --oldin | --oldi | --old | --ol | --o)
261 ac_prev=oldincludedir ;;
262 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
263 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
264 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
265 oldincludedir="$ac_optarg" ;;
266
267 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
268 ac_prev=prefix ;;
269 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
270 prefix="$ac_optarg" ;;
271
272 -program-prefix | --program-prefix | --program-prefi | --program-pref \
273 | --program-pre | --program-pr | --program-p)
274 ac_prev=program_prefix ;;
275 -program-prefix=* | --program-prefix=* | --program-prefi=* \
276 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
277 program_prefix="$ac_optarg" ;;
278
279 -program-suffix | --program-suffix | --program-suffi | --program-suff \
280 | --program-suf | --program-su | --program-s)
281 ac_prev=program_suffix ;;
282 -program-suffix=* | --program-suffix=* | --program-suffi=* \
283 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
284 program_suffix="$ac_optarg" ;;
285
286 -program-transform-name | --program-transform-name \
287 | --program-transform-nam | --program-transform-na \
288 | --program-transform-n | --program-transform- \
289 | --program-transform | --program-transfor \
290 | --program-transfo | --program-transf \
291 | --program-trans | --program-tran \
292 | --progr-tra | --program-tr | --program-t)
293 ac_prev=program_transform_name ;;
294 -program-transform-name=* | --program-transform-name=* \
295 | --program-transform-nam=* | --program-transform-na=* \
296 | --program-transform-n=* | --program-transform-=* \
297 | --program-transform=* | --program-transfor=* \
298 | --program-transfo=* | --program-transf=* \
299 | --program-trans=* | --program-tran=* \
300 | --progr-tra=* | --program-tr=* | --program-t=*)
301 program_transform_name="$ac_optarg" ;;
302
303 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
304 | -silent | --silent | --silen | --sile | --sil)
305 silent=yes ;;
306
307 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
308 ac_prev=sbindir ;;
309 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
310 | --sbi=* | --sb=*)
311 sbindir="$ac_optarg" ;;
312
313 -sharedstatedir | --sharedstatedir | --sharedstatedi \
314 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
315 | --sharedst | --shareds | --shared | --share | --shar \
316 | --sha | --sh)
317 ac_prev=sharedstatedir ;;
318 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
319 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
320 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
321 | --sha=* | --sh=*)
322 sharedstatedir="$ac_optarg" ;;
323
324 -site | --site | --sit)
325 ac_prev=site ;;
326 -site=* | --site=* | --sit=*)
327 site="$ac_optarg" ;;
328
329 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
330 ac_prev=srcdir ;;
331 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
332 srcdir="$ac_optarg" ;;
333
334 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
335 | --syscon | --sysco | --sysc | --sys | --sy)
336 ac_prev=sysconfdir ;;
337 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
338 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
339 sysconfdir="$ac_optarg" ;;
340
341 -target | --target | --targe | --targ | --tar | --ta | --t)
342 ac_prev=target ;;
343 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
344 target="$ac_optarg" ;;
345
346 -v | -verbose | --verbose | --verbos | --verbo | --verb)
347 verbose=yes ;;
348
349 -version | --version | --versio | --versi | --vers)
687361c8 350 echo "configure generated by autoconf version 2.13"
0bc0cd11
JL
351 exit 0 ;;
352
353 -with-* | --with-*)
354 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
355 # Reject names that are not valid shell variable names.
356 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
357 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358 fi
359 ac_package=`echo $ac_package| sed 's/-/_/g'`
360 case "$ac_option" in
361 *=*) ;;
362 *) ac_optarg=yes ;;
363 esac
364 eval "with_${ac_package}='$ac_optarg'" ;;
365
366 -without-* | --without-*)
367 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
368 # Reject names that are not valid shell variable names.
369 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
370 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371 fi
372 ac_package=`echo $ac_package| sed 's/-/_/g'`
373 eval "with_${ac_package}=no" ;;
374
375 --x)
376 # Obsolete; use --with-x.
377 with_x=yes ;;
378
379 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
380 | --x-incl | --x-inc | --x-in | --x-i)
381 ac_prev=x_includes ;;
382 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
383 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
384 x_includes="$ac_optarg" ;;
385
386 -x-libraries | --x-libraries | --x-librarie | --x-librari \
387 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
388 ac_prev=x_libraries ;;
389 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
390 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
391 x_libraries="$ac_optarg" ;;
392
393 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
394 ;;
395
396 *)
397 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
398 echo "configure: warning: $ac_option: invalid host type" 1>&2
399 fi
400 if test "x$nonopt" != xNONE; then
401 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
402 fi
403 nonopt="$ac_option"
404 ;;
405
406 esac
407done
408
409if test -n "$ac_prev"; then
410 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411fi
412
413trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
414
415# File descriptor usage:
416# 0 standard input
417# 1 file creation
418# 2 errors and warnings
419# 3 some systems may open it to /dev/tty
420# 4 used on the Kubota Titan
421# 6 checking for... messages and results
422# 5 compiler messages saved in config.log
423if test "$silent" = yes; then
424 exec 6>/dev/null
425else
426 exec 6>&1
427fi
428exec 5>./config.log
429
430echo "\
431This file contains any messages produced by compilers while
432running configure, to aid debugging if configure makes a mistake.
433" 1>&5
434
435# Strip out --no-create and --no-recursion so they do not pile up.
436# Also quote any args containing shell metacharacters.
437ac_configure_args=
438for ac_arg
439do
440 case "$ac_arg" in
441 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
442 | --no-cr | --no-c) ;;
443 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
444 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
445 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
446 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
447 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
448 esac
449done
450
451# NLS nuisances.
452# Only set these to C if already set. These must not be set unconditionally
453# because not all systems understand e.g. LANG=C (notably SCO).
454# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
455# Non-C LC_CTYPE values break the ctype check.
456if test "${LANG+set}" = set; then LANG=C; export LANG; fi
457if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
458if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
459if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
460
461# confdefs.h avoids OS command line length limits that DEFS can exceed.
462rm -rf conftest* confdefs.h
463# AIX cpp loses on an empty file, so make sure it contains at least a newline.
464echo > confdefs.h
465
466# A filename unique to this package, relative to the directory that
467# configure is in, which we can look for to find out if srcdir is correct.
55d0e5e0 468ac_unique_file=xmalloc.c
0bc0cd11
JL
469
470# Find the source files, if location was not specified.
471if test -z "$srcdir"; then
472 ac_srcdir_defaulted=yes
473 # Try the directory containing this script, then its parent.
474 ac_prog=$0
475 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
476 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
477 srcdir=$ac_confdir
478 if test ! -r $srcdir/$ac_unique_file; then
479 srcdir=..
480 fi
481else
482 ac_srcdir_defaulted=no
483fi
484if test ! -r $srcdir/$ac_unique_file; then
485 if test "$ac_srcdir_defaulted" = yes; then
486 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
487 else
488 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
489 fi
490fi
491srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
492
493# Prefer explicitly selected file to automatically selected ones.
8ea4b195
AO
494if 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"
0bc0cd11
JL
499 fi
500fi
501for ac_site_file in $CONFIG_SITE; do
502 if test -r "$ac_site_file"; then
503 echo "loading site script $ac_site_file"
504 . "$ac_site_file"
505 fi
506done
507
508if test -r "$cache_file"; then
509 echo "loading cache $cache_file"
510 . $cache_file
511else
512 echo "creating cache $cache_file"
513 > $cache_file
514fi
515
516ac_ext=c
517# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
518ac_cpp='$CPP $CPPFLAGS'
519ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
687361c8 520ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
0bc0cd11
JL
521cross_compiling=$ac_cv_prog_cc_cross
522
687361c8
ME
523ac_exeext=
524ac_objext=o
0bc0cd11
JL
525if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
526 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
527 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
528 ac_n= ac_c='
529' ac_t=' '
530 else
531 ac_n=-n ac_c= ac_t=
532 fi
533else
534 ac_n= ac_c='\c' ac_t=
535fi
536
537
538
6706f116
AO
539# This works around the fact that libtool configuration may change LD
540# for this particular configuration, but some shells, instead of
541# keeping the changes in LD private, export them just because LD is
542# exported. We don't use libtool yet, but some day we might, so...
543ORIGINAL_LD_FOR_MULTILIBS=$LD
544
0bc0cd11
JL
545# Check whether --with-target-subdir or --without-target-subdir was given.
546if test "${with_target_subdir+set}" = set; then
547 withval="$with_target_subdir"
548 :
549fi
550
cd862df8
L
551# Check whether --with-build-subdir or --without-build-subdir was given.
552if test "${with_build_subdir+set}" = set; then
553 withval="$with_build_subdir"
554 :
555fi
556
ca6b370d
JL
557# Check whether --with-cross-host or --without-cross-host was given.
558if test "${with_cross_host+set}" = set; then
559 withval="$with_cross_host"
560 :
561fi
562
0bc0cd11
JL
563# Check whether --with-newlib or --without-newlib was given.
564if test "${with_newlib+set}" = set; then
565 withval="$with_newlib"
566 :
567fi
568
569
570if test "${srcdir}" = "."; then
cd862df8
L
571 if test -n "${with_build_subdir}"; then
572 libiberty_topdir="${srcdir}/../.."
573 with_target_subdir=
574 elif test -z "${with_target_subdir}"; then
0bc0cd11
JL
575 libiberty_topdir="${srcdir}/.."
576 else
577 if test "${with_target_subdir}" != "."; then
578 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
579 else
580 libiberty_topdir="${srcdir}/${with_multisrctop}.."
581 fi
582 fi
583else
584 libiberty_topdir="${srcdir}/.."
585fi
d8c22ce7 586
0bc0cd11
JL
587ac_aux_dir=
588for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
589 if test -f $ac_dir/install-sh; then
590 ac_aux_dir=$ac_dir
591 ac_install_sh="$ac_aux_dir/install-sh -c"
592 break
593 elif test -f $ac_dir/install.sh; then
594 ac_aux_dir=$ac_dir
595 ac_install_sh="$ac_aux_dir/install.sh -c"
596 break
597 fi
598done
599if test -z "$ac_aux_dir"; then
600 { echo "configure: error: can not find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" 1>&2; exit 1; }
601fi
602ac_config_guess=$ac_aux_dir/config.guess
603ac_config_sub=$ac_aux_dir/config.sub
604ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
605
606
607
aaa5f039 608echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
d8c22ce7 609echo "configure:610: checking whether to enable maintainer-specific portions of Makefiles" >&5
aaa5f039
DD
610 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
611if test "${enable_maintainer_mode+set}" = set; then
612 enableval="$enable_maintainer_mode"
613 maintainer_mode=$enableval
614else
615 maintainer_mode=no
616fi
617
618
619echo "$ac_t""$maintainer_mode" 1>&6
620
621if test "$maintainer_mode" = "yes"; then
622 MAINT=''
623 NOTMAINT='#'
624else
625 MAINT='#'
626 NOTMAINT=''
627fi
628
0e30ffc5
DD
629# Do we have a single-tree copy of texinfo? Even if we do, we can't
630# rely on it - libiberty is built before texinfo.
631# Extract the first word of "makeinfo", so it can be a program name with args.
aaa5f039
DD
632set dummy makeinfo; ac_word=$2
633echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d8c22ce7 634echo "configure:635: checking for $ac_word" >&5
aaa5f039
DD
635if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
636 echo $ac_n "(cached) $ac_c" 1>&6
637else
638 if test -n "$MAKEINFO"; then
639 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
640else
641 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
642 ac_dummy="$PATH"
643 for ac_dir in $ac_dummy; do
644 test -z "$ac_dir" && ac_dir=.
645 if test -f $ac_dir/$ac_word; then
646 ac_cv_prog_MAKEINFO="makeinfo"
647 break
648 fi
649 done
650 IFS="$ac_save_ifs"
651fi
652fi
653MAKEINFO="$ac_cv_prog_MAKEINFO"
654if test -n "$MAKEINFO"; then
655 echo "$ac_t""$MAKEINFO" 1>&6
656else
657 echo "$ac_t""no" 1>&6
658fi
659
f749bd83
AM
660if test "x$MAKEINFO" = "x"; then
661 MAKEINFO="@echo makeinfo missing; true"
0e30ffc5 662 BUILD_INFO=
f749bd83
AM
663else
664 BUILD_INFO=info
665 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
666 x*\ [1-3].* )
667 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
668 BUILD_INFO=
669 echo "configure: warning:
0e30ffc5 670*** Makeinfo is too old. Info documentation will not be built." 1>&2
f749bd83
AM
671 ;;
672 esac
673fi
0e30ffc5 674
aaa5f039
DD
675
676
677# Extract the first word of "perl", so it can be a program name with args.
678set dummy perl; ac_word=$2
679echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d8c22ce7 680echo "configure:681: checking for $ac_word" >&5
aaa5f039
DD
681if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
682 echo $ac_n "(cached) $ac_c" 1>&6
683else
684 if test -n "$PERL"; then
685 ac_cv_prog_PERL="$PERL" # Let the user override the test.
686else
687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
688 ac_dummy="$PATH"
689 for ac_dir in $ac_dummy; do
690 test -z "$ac_dir" && ac_dir=.
691 if test -f $ac_dir/$ac_word; then
692 ac_cv_prog_PERL="perl"
693 break
694 fi
695 done
696 IFS="$ac_save_ifs"
697fi
698fi
699PERL="$ac_cv_prog_PERL"
700if test -n "$PERL"; then
701 echo "$ac_t""$PERL" 1>&6
702else
703 echo "$ac_t""no" 1>&6
704fi
705
706if test x"$PERL" = x""; then
707 HAVE_PERL='#'
708else
709 HAVE_PERL=''
710fi
711
712
713
0bc0cd11
JL
714# Make sure we can run config.sub.
715if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
716else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
717fi
718
719echo $ac_n "checking host system type""... $ac_c" 1>&6
d8c22ce7 720echo "configure:721: checking host system type" >&5
0bc0cd11
JL
721
722host_alias=$host
723case "$host_alias" in
724NONE)
725 case $nonopt in
726 NONE)
727 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
728 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
729 fi ;;
730 *) host_alias=$nonopt ;;
731 esac ;;
732esac
733
734host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
735host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
736host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
737host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
738echo "$ac_t""$host" 1>&6
739
740
741
742echo $ac_n "checking build system type""... $ac_c" 1>&6
d8c22ce7 743echo "configure:744: checking build system type" >&5
0bc0cd11
JL
744
745build_alias=$build
746case "$build_alias" in
747NONE)
748 case $nonopt in
749 NONE) build_alias=$host_alias ;;
750 *) build_alias=$nonopt ;;
751 esac ;;
752esac
753
754build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
755build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
756build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
757build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
758echo "$ac_t""$build" 1>&6
759
760if test $host != $build; then
761 ac_tool_prefix=${host_alias}-
762else
763 ac_tool_prefix=
764fi
765
766# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
767set dummy ${ac_tool_prefix}ar; ac_word=$2
768echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d8c22ce7 769echo "configure:770: checking for $ac_word" >&5
0bc0cd11
JL
770if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
771 echo $ac_n "(cached) $ac_c" 1>&6
772else
773 if test -n "$AR"; then
774 ac_cv_prog_AR="$AR" # Let the user override the test.
775else
687361c8
ME
776 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
777 ac_dummy="$PATH"
778 for ac_dir in $ac_dummy; do
0bc0cd11
JL
779 test -z "$ac_dir" && ac_dir=.
780 if test -f $ac_dir/$ac_word; then
781 ac_cv_prog_AR="${ac_tool_prefix}ar"
782 break
783 fi
784 done
785 IFS="$ac_save_ifs"
786 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
787fi
788fi
789AR="$ac_cv_prog_AR"
790if test -n "$AR"; then
791 echo "$ac_t""$AR" 1>&6
792else
793 echo "$ac_t""no" 1>&6
794fi
795
796
797
798# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
799set dummy ${ac_tool_prefix}ranlib; ac_word=$2
800echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d8c22ce7 801echo "configure:802: checking for $ac_word" >&5
0bc0cd11
JL
802if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
803 echo $ac_n "(cached) $ac_c" 1>&6
804else
805 if test -n "$RANLIB"; then
806 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
807else
687361c8
ME
808 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
809 ac_dummy="$PATH"
810 for ac_dir in $ac_dummy; do
0bc0cd11
JL
811 test -z "$ac_dir" && ac_dir=.
812 if test -f $ac_dir/$ac_word; then
813 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
814 break
815 fi
816 done
817 IFS="$ac_save_ifs"
818fi
819fi
820RANLIB="$ac_cv_prog_RANLIB"
821if test -n "$RANLIB"; then
822 echo "$ac_t""$RANLIB" 1>&6
823else
824 echo "$ac_t""no" 1>&6
825fi
826
827
828if test -z "$ac_cv_prog_RANLIB"; then
829if test -n "$ac_tool_prefix"; then
830 # Extract the first word of "ranlib", so it can be a program name with args.
831set dummy ranlib; ac_word=$2
832echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d8c22ce7 833echo "configure:834: checking for $ac_word" >&5
0bc0cd11
JL
834if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
835 echo $ac_n "(cached) $ac_c" 1>&6
836else
837 if test -n "$RANLIB"; then
838 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
839else
687361c8
ME
840 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
841 ac_dummy="$PATH"
842 for ac_dir in $ac_dummy; do
0bc0cd11
JL
843 test -z "$ac_dir" && ac_dir=.
844 if test -f $ac_dir/$ac_word; then
845 ac_cv_prog_RANLIB="ranlib"
846 break
847 fi
848 done
849 IFS="$ac_save_ifs"
850 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
851fi
852fi
853RANLIB="$ac_cv_prog_RANLIB"
854if test -n "$RANLIB"; then
855 echo "$ac_t""$RANLIB" 1>&6
856else
857 echo "$ac_t""no" 1>&6
858fi
859
860else
861 RANLIB=":"
862fi
863fi
864
865
1eaf7d9c 866
0bc0cd11
JL
867# Extract the first word of "gcc", so it can be a program name with args.
868set dummy gcc; ac_word=$2
869echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d8c22ce7 870echo "configure:871: checking for $ac_word" >&5
0bc0cd11
JL
871if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
872 echo $ac_n "(cached) $ac_c" 1>&6
873else
874 if test -n "$CC"; then
875 ac_cv_prog_CC="$CC" # Let the user override the test.
876else
687361c8
ME
877 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
878 ac_dummy="$PATH"
879 for ac_dir in $ac_dummy; do
0bc0cd11
JL
880 test -z "$ac_dir" && ac_dir=.
881 if test -f $ac_dir/$ac_word; then
882 ac_cv_prog_CC="gcc"
883 break
884 fi
885 done
886 IFS="$ac_save_ifs"
887fi
888fi
889CC="$ac_cv_prog_CC"
890if test -n "$CC"; then
891 echo "$ac_t""$CC" 1>&6
892else
893 echo "$ac_t""no" 1>&6
894fi
895
896if test -z "$CC"; then
897 # Extract the first word of "cc", so it can be a program name with args.
898set dummy cc; ac_word=$2
899echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d8c22ce7 900echo "configure:901: checking for $ac_word" >&5
0bc0cd11
JL
901if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
902 echo $ac_n "(cached) $ac_c" 1>&6
903else
904 if test -n "$CC"; then
905 ac_cv_prog_CC="$CC" # Let the user override the test.
906else
687361c8 907 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
0bc0cd11 908 ac_prog_rejected=no
687361c8
ME
909 ac_dummy="$PATH"
910 for ac_dir in $ac_dummy; do
0bc0cd11
JL
911 test -z "$ac_dir" && ac_dir=.
912 if test -f $ac_dir/$ac_word; then
913 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
914 ac_prog_rejected=yes
915 continue
916 fi
917 ac_cv_prog_CC="cc"
918 break
919 fi
920 done
921 IFS="$ac_save_ifs"
922if test $ac_prog_rejected = yes; then
923 # We found a bogon in the path, so make sure we never use it.
924 set dummy $ac_cv_prog_CC
925 shift
926 if test $# -gt 0; then
927 # We chose a different compiler from the bogus one.
928 # However, it has the same basename, so the bogon will be chosen
929 # first if we set CC to just the basename; use the full file name.
930 shift
931 set dummy "$ac_dir/$ac_word" "$@"
932 shift
933 ac_cv_prog_CC="$@"
934 fi
935fi
936fi
937fi
938CC="$ac_cv_prog_CC"
939if test -n "$CC"; then
940 echo "$ac_t""$CC" 1>&6
941else
942 echo "$ac_t""no" 1>&6
943fi
944
945 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
946fi
947
948echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d8c22ce7 949echo "configure:950: checking whether we are using GNU C" >&5
0bc0cd11
JL
950if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
951 echo $ac_n "(cached) $ac_c" 1>&6
952else
953 cat > conftest.c <<EOF
954#ifdef __GNUC__
955 yes;
956#endif
957EOF
d8c22ce7 958if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
0bc0cd11
JL
959 ac_cv_prog_gcc=yes
960else
961 ac_cv_prog_gcc=no
962fi
963fi
964
965echo "$ac_t""$ac_cv_prog_gcc" 1>&6
966
967if test $ac_cv_prog_gcc = yes; then
968 GCC=yes
69197e7e 969 ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
0bc0cd11
JL
970 ac_test_CFLAGS="${CFLAGS+set}"
971 ac_save_CFLAGS="$CFLAGS"
972 CFLAGS=
973 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
d8c22ce7 974echo "configure:975: checking whether ${CC-cc} accepts -g" >&5
0bc0cd11
JL
975if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
976 echo $ac_n "(cached) $ac_c" 1>&6
977else
978 echo 'void f(){}' > conftest.c
979if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
980 ac_cv_prog_cc_g=yes
981else
982 ac_cv_prog_cc_g=no
983fi
984rm -f conftest*
985
986fi
987
988echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
989 if test "$ac_test_CFLAGS" = set; then
990 CFLAGS="$ac_save_CFLAGS"
991 elif test $ac_cv_prog_cc_g = yes; then
992 CFLAGS="-g -O2"
993 else
994 CFLAGS="-O2"
995 fi
996else
997 GCC=
1eaf7d9c 998 ac_libiberty_warn_cflags=
0bc0cd11
JL
999 test "${CFLAGS+set}" = set || CFLAGS="-g"
1000fi
1001
1002
d1209685 1003
7fda878c
DR
1004if test "x$CC" != xcc; then
1005 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
d8c22ce7 1006echo "configure:1007: checking whether $CC and cc understand -c and -o together" >&5
7fda878c
DR
1007else
1008 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
d8c22ce7 1009echo "configure:1010: checking whether cc understands -c and -o together" >&5
7fda878c
DR
1010fi
1011set dummy $CC; ac_cc="`echo $2 |
1012 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1013if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1014 echo $ac_n "(cached) $ac_c" 1>&6
1015else
1016 echo 'foo(){}' > conftest.c
1017# Make sure it works both with $CC and with simple cc.
1018# We do the test twice because some compilers refuse to overwrite an
1019# existing .o file with -o, though they will create one.
1020ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
d8c22ce7
CC
1021if { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1022 test -f conftest.o && { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
7fda878c
DR
1023then
1024 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1025 if test "x$CC" != xcc; then
1026 # Test first that cc exists at all.
d8c22ce7 1027 if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
7fda878c 1028 ac_try='cc -c conftest.c -o conftest.o 1>&5'
d8c22ce7
CC
1029 if { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1030 test -f conftest.o && { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
7fda878c
DR
1031 then
1032 # cc works too.
1033 :
1034 else
1035 # cc exists but doesn't like -o.
1036 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1037 fi
1038 fi
1039 fi
1040else
1041 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1042fi
1043rm -f conftest*
1044
1045fi
1046if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1047 echo "$ac_t""yes" 1>&6
1048else
1049 echo "$ac_t""no" 1>&6
1050 cat >> confdefs.h <<\EOF
1051#define NO_MINUS_C_MINUS_O 1
1052EOF
1053
1054fi
1055
1056# autoconf is lame and doesn't give us any substitution variable for this.
1057if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1058 NO_MINUS_C_MINUS_O=yes
1059else
1060 OUTPUT_OPTION='-o $@'
1061fi
1062
1063
1064
0bc0cd11 1065echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
d8c22ce7 1066echo "configure:1067: checking for POSIXized ISC" >&5
0bc0cd11
JL
1067if test -d /etc/conf/kconfig.d &&
1068 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1069then
1070 echo "$ac_t""yes" 1>&6
1071 ISC=yes # If later tests want to check for ISC.
1072 cat >> confdefs.h <<\EOF
1073#define _POSIX_SOURCE 1
1074EOF
1075
1076 if test "$GCC" = yes; then
1077 CC="$CC -posix"
1078 else
1079 CC="$CC -Xp"
1080 fi
1081else
1082 echo "$ac_t""no" 1>&6
1083 ISC=
1084fi
1085
d1209685 1086echo $ac_n "checking for working const""... $ac_c" 1>&6
d8c22ce7 1087echo "configure:1088: checking for working const" >&5
d1209685
ZW
1088if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1089 echo $ac_n "(cached) $ac_c" 1>&6
1090else
1091 cat > conftest.$ac_ext <<EOF
d8c22ce7 1092#line 1093 "configure"
d1209685
ZW
1093#include "confdefs.h"
1094
1095int main() {
1096
1097/* Ultrix mips cc rejects this. */
dac45916 1098typedef int charset[2]; const charset x;
d1209685
ZW
1099/* SunOS 4.1.1 cc rejects this. */
1100char const *const *ccp;
1101char **p;
1102/* NEC SVR4.0.2 mips cc rejects this. */
1103struct point {int x, y;};
1104static struct point const zero = {0,0};
1105/* AIX XL C 1.02.0.0 rejects this.
1106 It does not let you subtract one const X* pointer from another in an arm
1107 of an if-expression whose if-part is not a constant expression */
1108const char *g = "string";
1109ccp = &g + (g ? g-g : 0);
1110/* HPUX 7.0 cc rejects these. */
1111++ccp;
1112p = (char**) ccp;
1113ccp = (char const *const *) p;
1114{ /* SCO 3.2v4 cc rejects this. */
1115 char *t;
1116 char const *s = 0 ? (char *) 0 : (char const *) 0;
1117
1118 *t++ = 0;
1119}
1120{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1121 int x[] = {25, 17};
1122 const int *foo = &x[0];
1123 ++foo;
1124}
1125{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1126 typedef const int *iptr;
1127 iptr p = 0;
1128 ++p;
1129}
1130{ /* AIX XL C 1.02.0.0 rejects this saying
1131 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1132 struct s { int j; const int *ap[3]; };
1133 struct s *b; b->j = 5;
1134}
1135{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1136 const int foo = 10;
1137}
1138
1139; return 0; }
1140EOF
d8c22ce7 1141if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d1209685
ZW
1142 rm -rf conftest*
1143 ac_cv_c_const=yes
1144else
1145 echo "configure: failed program was:" >&5
1146 cat conftest.$ac_ext >&5
1147 rm -rf conftest*
1148 ac_cv_c_const=no
1149fi
1150rm -f conftest*
1151fi
1152
1153echo "$ac_t""$ac_cv_c_const" 1>&6
1154if test $ac_cv_c_const = no; then
1155 cat >> confdefs.h <<\EOF
1156#define const
1157EOF
1158
1159fi
1160
1161echo $ac_n "checking for inline""... $ac_c" 1>&6
d8c22ce7 1162echo "configure:1163: checking for inline" >&5
d1209685
ZW
1163if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165else
1166 ac_cv_c_inline=no
1167for ac_kw in inline __inline__ __inline; do
1168 cat > conftest.$ac_ext <<EOF
d8c22ce7 1169#line 1170 "configure"
d1209685
ZW
1170#include "confdefs.h"
1171
1172int main() {
dac45916 1173} $ac_kw foo() {
d1209685
ZW
1174; return 0; }
1175EOF
d8c22ce7 1176if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d1209685
ZW
1177 rm -rf conftest*
1178 ac_cv_c_inline=$ac_kw; break
1179else
1180 echo "configure: failed program was:" >&5
1181 cat conftest.$ac_ext >&5
1182fi
1183rm -f conftest*
1184done
1185
1186fi
1187
1188echo "$ac_t""$ac_cv_c_inline" 1>&6
1189case "$ac_cv_c_inline" in
1190 inline | yes) ;;
1191 no) cat >> confdefs.h <<\EOF
1192#define inline
1193EOF
1194 ;;
1195 *) cat >> confdefs.h <<EOF
1196#define inline $ac_cv_c_inline
1197EOF
1198 ;;
1199esac
1200
0bc0cd11
JL
1201
1202
1203
1204
1205
1206
1207# Find a good install program. We prefer a C program (faster),
1208# so one script is as good as another. But avoid the broken or
1209# incompatible versions:
1210# SysV /etc/install, /usr/sbin/install
1211# SunOS /usr/etc/install
1212# IRIX /sbin/install
1213# AIX /bin/install
1214# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1215# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1216# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1217# ./install, which can be erroneously created by make from ./install.sh.
1218echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
d8c22ce7 1219echo "configure:1220: checking for a BSD compatible install" >&5
0bc0cd11
JL
1220if test -z "$INSTALL"; then
1221if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1222 echo $ac_n "(cached) $ac_c" 1>&6
1223else
687361c8 1224 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
0bc0cd11
JL
1225 for ac_dir in $PATH; do
1226 # Account for people who put trailing slashes in PATH elements.
1227 case "$ac_dir/" in
1228 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1229 *)
1230 # OSF1 and SCO ODT 3.0 have their own names for install.
1231 # Don't use installbsd from OSF since it installs stuff as root
1232 # by default.
1233 for ac_prog in ginstall scoinst install; do
1234 if test -f $ac_dir/$ac_prog; then
1235 if test $ac_prog = install &&
1236 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1237 # AIX install. It has an incompatible calling convention.
1238 :
1239 else
1240 ac_cv_path_install="$ac_dir/$ac_prog -c"
1241 break 2
1242 fi
1243 fi
1244 done
1245 ;;
1246 esac
1247 done
1248 IFS="$ac_save_IFS"
1249
1250fi
1251 if test "${ac_cv_path_install+set}" = set; then
1252 INSTALL="$ac_cv_path_install"
1253 else
1254 # As a last resort, use the slow shell script. We don't cache a
1255 # path for INSTALL within a source directory, because that will
1256 # break other packages using the cache if that directory is
1257 # removed, or if the path is relative.
1258 INSTALL="$ac_install_sh"
1259 fi
1260fi
1261echo "$ac_t""$INSTALL" 1>&6
1262
1263# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1264# It thinks the first close brace ends the variable substitution.
1265test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1266
687361c8
ME
1267test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1268
0bc0cd11
JL
1269test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1270
1271
1272. ${srcdir}/config.table
1273host_makefile_frag=${frag}
1274
1275
1276# It's OK to check for header files. Although the compiler may not be
1277# able to link anything, it had better be able to at least compile
1278# something.
1279echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d8c22ce7 1280echo "configure:1281: checking how to run the C preprocessor" >&5
0bc0cd11
JL
1281# On Suns, sometimes $CPP names a directory.
1282if test -n "$CPP" && test -d "$CPP"; then
1283 CPP=
1284fi
1285if test -z "$CPP"; then
1286if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1287 echo $ac_n "(cached) $ac_c" 1>&6
1288else
1289 # This must be in double quotes, not single quotes, because CPP may get
1290 # substituted into the Makefile and "${CC-cc}" will confuse make.
1291 CPP="${CC-cc} -E"
1292 # On the NeXT, cc -E runs the code through the compiler's parser,
1293 # not just through cpp.
1294 cat > conftest.$ac_ext <<EOF
d8c22ce7 1295#line 1296 "configure"
0bc0cd11
JL
1296#include "confdefs.h"
1297#include <assert.h>
1298Syntax Error
1299EOF
1300ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d8c22ce7 1301{ (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
687361c8 1302ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
0bc0cd11
JL
1303if test -z "$ac_err"; then
1304 :
1305else
1306 echo "$ac_err" >&5
1307 echo "configure: failed program was:" >&5
1308 cat conftest.$ac_ext >&5
1309 rm -rf conftest*
1310 CPP="${CC-cc} -E -traditional-cpp"
1311 cat > conftest.$ac_ext <<EOF
d8c22ce7 1312#line 1313 "configure"
0bc0cd11
JL
1313#include "confdefs.h"
1314#include <assert.h>
1315Syntax Error
1316EOF
1317ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d8c22ce7 1318{ (eval echo configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
687361c8
ME
1319ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1320if test -z "$ac_err"; then
1321 :
1322else
1323 echo "$ac_err" >&5
1324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1326 rm -rf conftest*
1327 CPP="${CC-cc} -nologo -E"
1328 cat > conftest.$ac_ext <<EOF
d8c22ce7 1329#line 1330 "configure"
687361c8
ME
1330#include "confdefs.h"
1331#include <assert.h>
1332Syntax Error
1333EOF
1334ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d8c22ce7 1335{ (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
687361c8 1336ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
0bc0cd11
JL
1337if test -z "$ac_err"; then
1338 :
1339else
1340 echo "$ac_err" >&5
1341 echo "configure: failed program was:" >&5
1342 cat conftest.$ac_ext >&5
1343 rm -rf conftest*
1344 CPP=/lib/cpp
1345fi
1346rm -f conftest*
1347fi
687361c8
ME
1348rm -f conftest*
1349fi
0bc0cd11
JL
1350rm -f conftest*
1351 ac_cv_prog_CPP="$CPP"
1352fi
1353 CPP="$ac_cv_prog_CPP"
1354else
1355 ac_cv_prog_CPP="$CPP"
1356fi
1357echo "$ac_t""$CPP" 1>&6
1358
d47f75c4 1359for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
0bc0cd11
JL
1360do
1361ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1362echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d8c22ce7 1363echo "configure:1364: checking for $ac_hdr" >&5
0bc0cd11
JL
1364if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1365 echo $ac_n "(cached) $ac_c" 1>&6
1366else
1367 cat > conftest.$ac_ext <<EOF
d8c22ce7 1368#line 1369 "configure"
0bc0cd11
JL
1369#include "confdefs.h"
1370#include <$ac_hdr>
1371EOF
1372ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d8c22ce7 1373{ (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
687361c8 1374ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
0bc0cd11
JL
1375if test -z "$ac_err"; then
1376 rm -rf conftest*
1377 eval "ac_cv_header_$ac_safe=yes"
1378else
1379 echo "$ac_err" >&5
1380 echo "configure: failed program was:" >&5
1381 cat conftest.$ac_ext >&5
1382 rm -rf conftest*
1383 eval "ac_cv_header_$ac_safe=no"
1384fi
1385rm -f conftest*
1386fi
1387if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1388 echo "$ac_t""yes" 1>&6
1389 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1390 cat >> confdefs.h <<EOF
1391#define $ac_tr_hdr 1
1392EOF
1393
1394else
1395 echo "$ac_t""no" 1>&6
1396fi
1397done
1398
a6458d1d 1399echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
d8c22ce7 1400echo "configure:1401: checking for sys/wait.h that is POSIX.1 compatible" >&5
a6458d1d
KG
1401if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1402 echo $ac_n "(cached) $ac_c" 1>&6
1403else
1404 cat > conftest.$ac_ext <<EOF
d8c22ce7 1405#line 1406 "configure"
a6458d1d
KG
1406#include "confdefs.h"
1407#include <sys/types.h>
1408#include <sys/wait.h>
1409#ifndef WEXITSTATUS
1410#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1411#endif
1412#ifndef WIFEXITED
1413#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1414#endif
1415int main() {
1416int s;
1417wait (&s);
1418s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1419; return 0; }
1420EOF
d8c22ce7 1421if { (eval echo configure:1422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a6458d1d
KG
1422 rm -rf conftest*
1423 ac_cv_header_sys_wait_h=yes
1424else
1425 echo "configure: failed program was:" >&5
1426 cat conftest.$ac_ext >&5
1427 rm -rf conftest*
1428 ac_cv_header_sys_wait_h=no
1429fi
1430rm -f conftest*
1431fi
1432
1433echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1434if test $ac_cv_header_sys_wait_h = yes; then
1435 cat >> confdefs.h <<\EOF
1436#define HAVE_SYS_WAIT_H 1
1437EOF
1438
1439fi
1440
c6451ce1 1441echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
d8c22ce7 1442echo "configure:1443: checking whether time.h and sys/time.h may both be included" >&5
c6451ce1
MS
1443if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1444 echo $ac_n "(cached) $ac_c" 1>&6
1445else
1446 cat > conftest.$ac_ext <<EOF
d8c22ce7 1447#line 1448 "configure"
c6451ce1
MS
1448#include "confdefs.h"
1449#include <sys/types.h>
1450#include <sys/time.h>
1451#include <time.h>
1452int main() {
1453struct tm *tp;
1454; return 0; }
1455EOF
d8c22ce7 1456if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c6451ce1
MS
1457 rm -rf conftest*
1458 ac_cv_header_time=yes
1459else
1460 echo "configure: failed program was:" >&5
1461 cat conftest.$ac_ext >&5
1462 rm -rf conftest*
1463 ac_cv_header_time=no
1464fi
1465rm -f conftest*
1466fi
1467
1468echo "$ac_t""$ac_cv_header_time" 1>&6
1469if test $ac_cv_header_time = yes; then
1470 cat >> confdefs.h <<\EOF
1471#define TIME_WITH_SYS_TIME 1
1472EOF
1473
1474fi
1475
0bc0cd11 1476
3b58c099 1477echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
d8c22ce7 1478echo "configure:1479: checking whether errno must be declared" >&5
3b58c099
MS
1479if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
1480 echo $ac_n "(cached) $ac_c" 1>&6
1481else
1482 cat > conftest.$ac_ext <<EOF
d8c22ce7 1483#line 1484 "configure"
3b58c099
MS
1484#include "confdefs.h"
1485#include <errno.h>
1486int main() {
1487int x = errno;
1488; return 0; }
1489EOF
d8c22ce7 1490if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3b58c099
MS
1491 rm -rf conftest*
1492 libiberty_cv_declare_errno=no
1493else
1494 echo "configure: failed program was:" >&5
1495 cat conftest.$ac_ext >&5
1496 rm -rf conftest*
1497 libiberty_cv_declare_errno=yes
1498fi
1499rm -f conftest*
1500fi
1501
1502echo "$ac_t""$libiberty_cv_declare_errno" 1>&6
1503if test $libiberty_cv_declare_errno = yes
1504then cat >> confdefs.h <<\EOF
1505#define NEED_DECLARATION_ERRNO 1
1506EOF
1507
1508fi
1509
1510
fdfc290b 1511echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d8c22ce7 1512echo "configure:1513: checking for ANSI C header files" >&5
fdfc290b
DR
1513if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.$ac_ext <<EOF
d8c22ce7 1517#line 1518 "configure"
fdfc290b
DR
1518#include "confdefs.h"
1519#include <stdlib.h>
1520#include <stdarg.h>
1521#include <string.h>
1522#include <float.h>
1523EOF
1524ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d8c22ce7 1525{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
fdfc290b
DR
1526ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1527if test -z "$ac_err"; then
1528 rm -rf conftest*
1529 ac_cv_header_stdc=yes
1530else
1531 echo "$ac_err" >&5
1532 echo "configure: failed program was:" >&5
1533 cat conftest.$ac_ext >&5
1534 rm -rf conftest*
1535 ac_cv_header_stdc=no
1536fi
1537rm -f conftest*
1538
1539if test $ac_cv_header_stdc = yes; then
1540 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
d3982b71 1541cat > conftest.$ac_ext <<EOF
d8c22ce7 1542#line 1543 "configure"
fdfc290b
DR
1543#include "confdefs.h"
1544#include <string.h>
1545EOF
1546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1547 egrep "memchr" >/dev/null 2>&1; then
1548 :
1549else
1550 rm -rf conftest*
1551 ac_cv_header_stdc=no
1552fi
1553rm -f conftest*
1554
1555fi
1556
1557if test $ac_cv_header_stdc = yes; then
1558 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1559cat > conftest.$ac_ext <<EOF
d8c22ce7 1560#line 1561 "configure"
fdfc290b
DR
1561#include "confdefs.h"
1562#include <stdlib.h>
1563EOF
1564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1565 egrep "free" >/dev/null 2>&1; then
1566 :
1567else
1568 rm -rf conftest*
1569 ac_cv_header_stdc=no
1570fi
1571rm -f conftest*
1572
1573fi
1574
1575if test $ac_cv_header_stdc = yes; then
1576 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1577if test "$cross_compiling" = yes; then
1578 :
1579else
1580 cat > conftest.$ac_ext <<EOF
d8c22ce7 1581#line 1582 "configure"
fdfc290b
DR
1582#include "confdefs.h"
1583#include <ctype.h>
1584#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1585#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1586#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1587int main () { int i; for (i = 0; i < 256; i++)
1588if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1589exit (0); }
1590
1591EOF
d8c22ce7 1592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
fdfc290b
DR
1593then
1594 :
1595else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -fr conftest*
1599 ac_cv_header_stdc=no
1600fi
1601rm -fr conftest*
1602fi
1603
1604fi
1605fi
1606
1607echo "$ac_t""$ac_cv_header_stdc" 1>&6
1608if test $ac_cv_header_stdc = yes; then
1609 cat >> confdefs.h <<\EOF
1610#define STDC_HEADERS 1
1611EOF
1612
1613fi
1614
1615echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
d8c22ce7 1616echo "configure:1617: checking for uintptr_t" >&5
fdfc290b
DR
1617if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
1618 echo $ac_n "(cached) $ac_c" 1>&6
1619else
1620 cat > conftest.$ac_ext <<EOF
d8c22ce7 1621#line 1622 "configure"
d3982b71
JL
1622#include "confdefs.h"
1623#include <sys/types.h>
fdfc290b
DR
1624#if STDC_HEADERS
1625#include <stdlib.h>
1626#include <stddef.h>
1627#endif
d3982b71
JL
1628EOF
1629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
fdfc290b 1630 egrep "(^|[^a-zA-Z_0-9])uintptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
d3982b71 1631 rm -rf conftest*
fdfc290b 1632 ac_cv_type_uintptr_t=yes
d3982b71
JL
1633else
1634 rm -rf conftest*
fdfc290b 1635 ac_cv_type_uintptr_t=no
d3982b71
JL
1636fi
1637rm -f conftest*
1638
fdfc290b
DR
1639fi
1640echo "$ac_t""$ac_cv_type_uintptr_t" 1>&6
1641if test $ac_cv_type_uintptr_t = no; then
1642 cat >> confdefs.h <<\EOF
1643#define uintptr_t unsigned long
1644EOF
1645
1646fi
d3982b71 1647
fdfc290b
DR
1648
1649if test $ac_cv_type_uintptr_t = yes
d3982b71
JL
1650then
1651 cat >> confdefs.h <<\EOF
1652#define HAVE_UINTPTR_T 1
1653EOF
1654
d3982b71
JL
1655fi
1656
deae2ed9 1657echo $ac_n "checking for pid_t""... $ac_c" 1>&6
d8c22ce7 1658echo "configure:1659: checking for pid_t" >&5
deae2ed9
MM
1659if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1660 echo $ac_n "(cached) $ac_c" 1>&6
1661else
1662 cat > conftest.$ac_ext <<EOF
d8c22ce7 1663#line 1664 "configure"
deae2ed9
MM
1664#include "confdefs.h"
1665#include <sys/types.h>
1666#if STDC_HEADERS
1667#include <stdlib.h>
1668#include <stddef.h>
1669#endif
1670EOF
1671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1672 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1673 rm -rf conftest*
1674 ac_cv_type_pid_t=yes
1675else
1676 rm -rf conftest*
1677 ac_cv_type_pid_t=no
1678fi
1679rm -f conftest*
1680
1681fi
1682echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1683if test $ac_cv_type_pid_t = no; then
1684 cat >> confdefs.h <<\EOF
1685#define pid_t int
1686EOF
1687
1688fi
1689
1690
0bc0cd11
JL
1691# This is the list of functions which libiberty will provide if they
1692# are not available on the host.
1693
1694funcs="asprintf"
1695funcs="$funcs atexit"
1696funcs="$funcs basename"
1697funcs="$funcs bcmp"
1698funcs="$funcs bcopy"
dac45916 1699funcs="$funcs bsearch"
0bc0cd11 1700funcs="$funcs bzero"
a9acf741 1701funcs="$funcs calloc"
0bc0cd11 1702funcs="$funcs clock"
29650b2b 1703funcs="$funcs ffs"
0bc0cd11
JL
1704funcs="$funcs getcwd"
1705funcs="$funcs getpagesize"
1706funcs="$funcs index"
1707funcs="$funcs insque"
1708funcs="$funcs memchr"
1709funcs="$funcs memcmp"
1710funcs="$funcs memcpy"
1711funcs="$funcs memmove"
1712funcs="$funcs memset"
687361c8 1713funcs="$funcs mkstemps"
9eb4080f 1714funcs="$funcs putenv"
0bc0cd11
JL
1715funcs="$funcs random"
1716funcs="$funcs rename"
1717funcs="$funcs rindex"
9eb4080f 1718funcs="$funcs setenv"
0bc0cd11
JL
1719funcs="$funcs sigsetmask"
1720funcs="$funcs strcasecmp"
1721funcs="$funcs strchr"
1722funcs="$funcs strdup"
1723funcs="$funcs strncasecmp"
1724funcs="$funcs strrchr"
1725funcs="$funcs strstr"
1726funcs="$funcs strtod"
1727funcs="$funcs strtol"
1728funcs="$funcs strtoul"
1729funcs="$funcs tmpnam"
1730funcs="$funcs vasprintf"
1731funcs="$funcs vfprintf"
1732funcs="$funcs vprintf"
1733funcs="$funcs vsprintf"
1734funcs="$funcs waitpid"
1735
1736# Also in the old function.def file: alloca, vfork, getopt.
1737
d47f75c4 1738vars="sys_errlist sys_nerr sys_siglist _system_configuration"
0bc0cd11 1739
90e72e20 1740checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
64c7e556 1741checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
170230b7 1742checkfuncs="$checkfuncs getsysinfo table sysctl"
0bc0cd11
JL
1743
1744# These are neither executed nor required, but they help keep
1745# autoheader happy without adding a bunch of text to acconfig.h.
1746if test "x" = "y"; then
dac45916 1747 for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock
0bc0cd11
JL
1748do
1749echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 1750echo "configure:1751: checking for $ac_func" >&5
0bc0cd11
JL
1751if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1752 echo $ac_n "(cached) $ac_c" 1>&6
1753else
1754 cat > conftest.$ac_ext <<EOF
4a06f7f2 1755#line 1756 "configure"
0bc0cd11
JL
1756#include "confdefs.h"
1757/* System header to define __stub macros and hopefully few prototypes,
1758 which can conflict with char $ac_func(); below. */
1759#include <assert.h>
1760/* Override any gcc2 internal prototype to avoid an error. */
1761/* We use char because int might match the return type of a gcc2
1762 builtin and then its argument prototype would still apply. */
1763char $ac_func();
1764
1765int main() {
1766
1767/* The GNU C library defines this for functions which it implements
1768 to always fail with ENOSYS. Some functions are actually named
1769 something starting with __ and the normal name is an alias. */
1770#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1771choke me
1772#else
1773$ac_func();
1774#endif
1775
1776; return 0; }
1777EOF
4a06f7f2 1778if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
1779 rm -rf conftest*
1780 eval "ac_cv_func_$ac_func=yes"
1781else
1782 echo "configure: failed program was:" >&5
1783 cat conftest.$ac_ext >&5
1784 rm -rf conftest*
1785 eval "ac_cv_func_$ac_func=no"
1786fi
1787rm -f conftest*
1788fi
1789
1790if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1791 echo "$ac_t""yes" 1>&6
1792 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1793 cat >> confdefs.h <<EOF
1794#define $ac_tr_func 1
1795EOF
1796
1797else
1798 echo "$ac_t""no" 1>&6
1799fi
1800done
1801
dac45916 1802 for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy
0bc0cd11
JL
1803do
1804echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 1805echo "configure:1806: checking for $ac_func" >&5
0bc0cd11
JL
1806if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
1808else
1809 cat > conftest.$ac_ext <<EOF
4a06f7f2 1810#line 1811 "configure"
0bc0cd11
JL
1811#include "confdefs.h"
1812/* System header to define __stub macros and hopefully few prototypes,
1813 which can conflict with char $ac_func(); below. */
1814#include <assert.h>
1815/* Override any gcc2 internal prototype to avoid an error. */
1816/* We use char because int might match the return type of a gcc2
1817 builtin and then its argument prototype would still apply. */
1818char $ac_func();
1819
1820int main() {
1821
1822/* The GNU C library defines this for functions which it implements
1823 to always fail with ENOSYS. Some functions are actually named
1824 something starting with __ and the normal name is an alias. */
1825#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1826choke me
1827#else
1828$ac_func();
1829#endif
1830
1831; return 0; }
1832EOF
4a06f7f2 1833if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
1834 rm -rf conftest*
1835 eval "ac_cv_func_$ac_func=yes"
1836else
1837 echo "configure: failed program was:" >&5
1838 cat conftest.$ac_ext >&5
1839 rm -rf conftest*
1840 eval "ac_cv_func_$ac_func=no"
1841fi
1842rm -f conftest*
1843fi
1844
1845if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1846 echo "$ac_t""yes" 1>&6
1847 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1848 cat >> confdefs.h <<EOF
1849#define $ac_tr_func 1
1850EOF
1851
1852else
1853 echo "$ac_t""no" 1>&6
1854fi
1855done
1856
dac45916 1857 for ac_func in memmove memset putenv random rename rindex sigsetmask
0bc0cd11
JL
1858do
1859echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 1860echo "configure:1861: checking for $ac_func" >&5
0bc0cd11
JL
1861if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863else
1864 cat > conftest.$ac_ext <<EOF
4a06f7f2 1865#line 1866 "configure"
0bc0cd11
JL
1866#include "confdefs.h"
1867/* System header to define __stub macros and hopefully few prototypes,
1868 which can conflict with char $ac_func(); below. */
1869#include <assert.h>
1870/* Override any gcc2 internal prototype to avoid an error. */
1871/* We use char because int might match the return type of a gcc2
1872 builtin and then its argument prototype would still apply. */
1873char $ac_func();
1874
1875int main() {
1876
1877/* The GNU C library defines this for functions which it implements
1878 to always fail with ENOSYS. Some functions are actually named
1879 something starting with __ and the normal name is an alias. */
1880#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1881choke me
1882#else
1883$ac_func();
1884#endif
1885
1886; return 0; }
1887EOF
4a06f7f2 1888if { (eval echo configure:1889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
1889 rm -rf conftest*
1890 eval "ac_cv_func_$ac_func=yes"
1891else
1892 echo "configure: failed program was:" >&5
1893 cat conftest.$ac_ext >&5
1894 rm -rf conftest*
1895 eval "ac_cv_func_$ac_func=no"
1896fi
1897rm -f conftest*
1898fi
1899
1900if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1901 echo "$ac_t""yes" 1>&6
1902 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1903 cat >> confdefs.h <<EOF
1904#define $ac_tr_func 1
1905EOF
1906
1907else
1908 echo "$ac_t""no" 1>&6
1909fi
1910done
1911
dac45916 1912 for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr
0bc0cd11
JL
1913do
1914echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 1915echo "configure:1916: checking for $ac_func" >&5
0bc0cd11
JL
1916if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1917 echo $ac_n "(cached) $ac_c" 1>&6
1918else
1919 cat > conftest.$ac_ext <<EOF
4a06f7f2 1920#line 1921 "configure"
0bc0cd11
JL
1921#include "confdefs.h"
1922/* System header to define __stub macros and hopefully few prototypes,
1923 which can conflict with char $ac_func(); below. */
1924#include <assert.h>
1925/* Override any gcc2 internal prototype to avoid an error. */
1926/* We use char because int might match the return type of a gcc2
1927 builtin and then its argument prototype would still apply. */
1928char $ac_func();
1929
1930int main() {
1931
1932/* The GNU C library defines this for functions which it implements
1933 to always fail with ENOSYS. Some functions are actually named
1934 something starting with __ and the normal name is an alias. */
1935#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1936choke me
1937#else
1938$ac_func();
1939#endif
1940
1941; return 0; }
1942EOF
4a06f7f2 1943if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
1944 rm -rf conftest*
1945 eval "ac_cv_func_$ac_func=yes"
1946else
1947 echo "configure: failed program was:" >&5
1948 cat conftest.$ac_ext >&5
1949 rm -rf conftest*
1950 eval "ac_cv_func_$ac_func=no"
1951fi
1952rm -f conftest*
1953fi
1954
1955if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1956 echo "$ac_t""yes" 1>&6
1957 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1958 cat >> confdefs.h <<EOF
1959#define $ac_tr_func 1
1960EOF
1961
1962else
1963 echo "$ac_t""no" 1>&6
1964fi
1965done
1966
dac45916 1967 for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf
0bc0cd11
JL
1968do
1969echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 1970echo "configure:1971: checking for $ac_func" >&5
0bc0cd11
JL
1971if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1972 echo $ac_n "(cached) $ac_c" 1>&6
1973else
1974 cat > conftest.$ac_ext <<EOF
4a06f7f2 1975#line 1976 "configure"
0bc0cd11
JL
1976#include "confdefs.h"
1977/* System header to define __stub macros and hopefully few prototypes,
1978 which can conflict with char $ac_func(); below. */
1979#include <assert.h>
1980/* Override any gcc2 internal prototype to avoid an error. */
1981/* We use char because int might match the return type of a gcc2
1982 builtin and then its argument prototype would still apply. */
1983char $ac_func();
1984
1985int main() {
1986
1987/* The GNU C library defines this for functions which it implements
1988 to always fail with ENOSYS. Some functions are actually named
1989 something starting with __ and the normal name is an alias. */
1990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1991choke me
1992#else
1993$ac_func();
1994#endif
1995
1996; return 0; }
1997EOF
4a06f7f2 1998if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
1999 rm -rf conftest*
2000 eval "ac_cv_func_$ac_func=yes"
2001else
2002 echo "configure: failed program was:" >&5
2003 cat conftest.$ac_ext >&5
2004 rm -rf conftest*
2005 eval "ac_cv_func_$ac_func=no"
2006fi
2007rm -f conftest*
2008fi
2009
2010if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2011 echo "$ac_t""yes" 1>&6
2012 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2013 cat >> confdefs.h <<EOF
2014#define $ac_tr_func 1
2015EOF
2016
2017else
2018 echo "$ac_t""no" 1>&6
2019fi
2020done
2021
dac45916 2022 for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal
0bc0cd11
JL
2023do
2024echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 2025echo "configure:2026: checking for $ac_func" >&5
0bc0cd11
JL
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
4a06f7f2 2030#line 2031 "configure"
0bc0cd11
JL
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
4a06f7f2 2053if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
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 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2068 cat >> confdefs.h <<EOF
2069#define $ac_tr_func 1
2070EOF
2071
acbbd80a
MK
2072else
2073 echo "$ac_t""no" 1>&6
2074fi
2075done
2076
29650b2b 2077 for ac_func in sysconf times sbrk gettimeofday ffs
acbbd80a
MK
2078do
2079echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 2080echo "configure:2081: checking for $ac_func" >&5
acbbd80a
MK
2081if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2082 echo $ac_n "(cached) $ac_c" 1>&6
2083else
2084 cat > conftest.$ac_ext <<EOF
4a06f7f2 2085#line 2086 "configure"
acbbd80a
MK
2086#include "confdefs.h"
2087/* System header to define __stub macros and hopefully few prototypes,
2088 which can conflict with char $ac_func(); below. */
2089#include <assert.h>
2090/* Override any gcc2 internal prototype to avoid an error. */
2091/* We use char because int might match the return type of a gcc2
2092 builtin and then its argument prototype would still apply. */
2093char $ac_func();
2094
2095int main() {
2096
2097/* The GNU C library defines this for functions which it implements
2098 to always fail with ENOSYS. Some functions are actually named
2099 something starting with __ and the normal name is an alias. */
2100#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2101choke me
2102#else
2103$ac_func();
2104#endif
2105
2106; return 0; }
2107EOF
4a06f7f2 2108if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4876b2b4
DJ
2109 rm -rf conftest*
2110 eval "ac_cv_func_$ac_func=yes"
2111else
2112 echo "configure: failed program was:" >&5
2113 cat conftest.$ac_ext >&5
2114 rm -rf conftest*
2115 eval "ac_cv_func_$ac_func=no"
2116fi
2117rm -f conftest*
2118fi
2119
2120if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2121 echo "$ac_t""yes" 1>&6
2122 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2123 cat >> confdefs.h <<EOF
2124#define $ac_tr_func 1
2125EOF
2126
2127else
2128 echo "$ac_t""no" 1>&6
2129fi
2130done
2131
170230b7 2132 for ac_func in pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl
4876b2b4
DJ
2133do
2134echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 2135echo "configure:2136: checking for $ac_func" >&5
4876b2b4
DJ
2136if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2137 echo $ac_n "(cached) $ac_c" 1>&6
2138else
2139 cat > conftest.$ac_ext <<EOF
4a06f7f2 2140#line 2141 "configure"
4876b2b4
DJ
2141#include "confdefs.h"
2142/* System header to define __stub macros and hopefully few prototypes,
2143 which can conflict with char $ac_func(); below. */
2144#include <assert.h>
2145/* Override any gcc2 internal prototype to avoid an error. */
2146/* We use char because int might match the return type of a gcc2
2147 builtin and then its argument prototype would still apply. */
2148char $ac_func();
2149
2150int main() {
2151
2152/* The GNU C library defines this for functions which it implements
2153 to always fail with ENOSYS. Some functions are actually named
2154 something starting with __ and the normal name is an alias. */
2155#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2156choke me
2157#else
2158$ac_func();
2159#endif
2160
2161; return 0; }
2162EOF
4a06f7f2 2163if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
acbbd80a
MK
2164 rm -rf conftest*
2165 eval "ac_cv_func_$ac_func=yes"
2166else
2167 echo "configure: failed program was:" >&5
2168 cat conftest.$ac_ext >&5
2169 rm -rf conftest*
2170 eval "ac_cv_func_$ac_func=no"
2171fi
2172rm -f conftest*
2173fi
2174
2175if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2176 echo "$ac_t""yes" 1>&6
2177 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2178 cat >> confdefs.h <<EOF
2179#define $ac_tr_func 1
2180EOF
2181
e9019af6
KG
2182else
2183 echo "$ac_t""no" 1>&6
2184fi
2185done
2186
2187 for ac_func in realpath canonicalize_file_name
2188do
2189echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4a06f7f2 2190echo "configure:2191: checking for $ac_func" >&5
e9019af6
KG
2191if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2192 echo $ac_n "(cached) $ac_c" 1>&6
2193else
2194 cat > conftest.$ac_ext <<EOF
4a06f7f2 2195#line 2196 "configure"
e9019af6
KG
2196#include "confdefs.h"
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $ac_func(); below. */
2199#include <assert.h>
2200/* Override any gcc2 internal prototype to avoid an error. */
2201/* We use char because int might match the return type of a gcc2
2202 builtin and then its argument prototype would still apply. */
2203char $ac_func();
2204
2205int main() {
2206
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2211choke me
2212#else
2213$ac_func();
2214#endif
2215
2216; return 0; }
2217EOF
4a06f7f2 2218if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
e9019af6
KG
2219 rm -rf conftest*
2220 eval "ac_cv_func_$ac_func=yes"
2221else
2222 echo "configure: failed program was:" >&5
2223 cat conftest.$ac_ext >&5
2224 rm -rf conftest*
2225 eval "ac_cv_func_$ac_func=no"
2226fi
2227rm -f conftest*
2228fi
2229
2230if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2231 echo "$ac_t""yes" 1>&6
2232 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2233 cat >> confdefs.h <<EOF
2234#define $ac_tr_func 1
2235EOF
2236
0bc0cd11
JL
2237else
2238 echo "$ac_t""no" 1>&6
2239fi
2240done
2241
d1209685
ZW
2242 cat >> confdefs.h <<\EOF
2243#define HAVE_SYS_ERRLIST 1
2244EOF
2245
2246 cat >> confdefs.h <<\EOF
dac45916 2247#define HAVE_SYS_NERR 1
d1209685
ZW
2248EOF
2249
2250 cat >> confdefs.h <<\EOF
2251#define HAVE_SYS_SIGLIST 1
d47f75c4
KG
2252EOF
2253
2254 cat >> confdefs.h <<\EOF
2255#define HAVE__SYSTEM_CONFIGURATION 1
d1209685
ZW
2256EOF
2257
0bc0cd11
JL
2258fi
2259
2260# For each of these functions, if the host does not provide the
2261# function we want to put FN.o in LIBOBJS, and if the host does
b548dffb 2262# provide the function, we want to define HAVE_FN in config.h.
0bc0cd11
JL
2263
2264setobjs=
7c72138a 2265CHECK=
48d7db63 2266target_header_dir=
0bc0cd11
JL
2267if test -n "${with_target_subdir}"; then
2268
ca6b370d 2269 # We are being configured as a target library. AC_REPLACE_FUNCS
0bc0cd11 2270 # may not work correctly, because the compiler may not be able to
ca6b370d
JL
2271 # link executables. Note that we may still be being configured
2272 # native.
0bc0cd11
JL
2273
2274 # If we are being configured for newlib, we know which functions
2275 # newlib provide and which ones we will be expected to provide.
2276
2277 if test "x${with_newlib}" = "xyes"; then
ca6b370d 2278 LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o"
0bc0cd11
JL
2279
2280 for f in $funcs; do
2281 case "$f" in
ca6b370d 2282 asprintf | basename | insque | random | strdup | vasprintf)
0bc0cd11
JL
2283 ;;
2284 *)
2285 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2286 cat >> confdefs.h <<EOF
2287#define $n 1
2288EOF
2289
2290 ;;
2291 esac
2292 done
2293
2294 # newlib doesnt provide any of the variables in $vars, so we
2295 # dont have to check them here.
2296
ca6b370d 2297 # Of the functions in $checkfuncs, newlib only has strerror.
0bc0cd11
JL
2298 cat >> confdefs.h <<\EOF
2299#define HAVE_STRERROR 1
2300EOF
2301
2302
2303 setobjs=yes
2304
2305 fi
7c72138a 2306
48d7db63
PE
2307 # We may wish to install the target headers somewhere.
2308 # Check whether --enable-install-libiberty or --disable-install-libiberty was given.
2309if test "${enable_install_libiberty+set}" = set; then
2310 enableval="$enable_install_libiberty"
2311 enable_install_libiberty=$enableval
2312else
2313 enable_install_libiberty=no
2314fi
2315
2316 # Option parsed, now set things appropriately.
2317 case x"$enable_install_libiberty" in
2318 xyes|x)
2319 target_header_dir=libiberty
2320 ;;
2321 xno)
2322 target_header_dir=
2323 ;;
2324 *)
2325 # This could be sanity-checked in various ways...
2326 target_header_dir="${enable_install_libiberty}"
2327 ;;
2328 esac
2329
2330
7c72138a
TT
2331else
2332
2333 # Not a target library, so we set things up to run the test suite.
2334 CHECK=check-cplus-dem
2335
0bc0cd11
JL
2336fi
2337
7c72138a
TT
2338
2339
48d7db63 2340
b1c45ae4 2341case "${host}" in
46af757b 2342 *-*-cygwin* | *-*-mingw*)
b1c45ae4
CF
2343 cat >> confdefs.h <<\EOF
2344#define HAVE_SYS_ERRLIST 1
2345EOF
2346
2347 cat >> confdefs.h <<\EOF
2348#define HAVE_SYS_NERR 1
2349EOF
2350
2351 ;;
2352esac
2353
0bc0cd11
JL
2354if test -z "${setobjs}"; then
2355 case "${host}" in
2356
2357 *-*-vxworks*)
2358 # Handle VxWorks configuration specially, since on VxWorks the
2359 # libraries are actually on the target board, not in the file
2360 # system.
2361 LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o"
2362 LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o"
2363 for f in $funcs; do
2364 case "$f" in
2365 basename | getpagesize | insque | random | strcasecmp)
2366 ;;
2367 strncasecmp | strdup | vfork | waitpid | vasprintf)
2368 ;;
2369 *)
2370 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2371 cat >> confdefs.h <<EOF
2372#define $n 1
2373EOF
2374
2375 ;;
2376 esac
2377 done
2378
2379 # VxWorks doesn't provide any of the variables in $vars, so we
2380 # don't have to check them here.
2381
2382 # Of the functions in $checkfuncs, VxWorks only has strerror.
2383 cat >> confdefs.h <<\EOF
2384#define HAVE_STRERROR 1
2385EOF
2386
2387
2388 setobjs=yes
2389 ;;
2390
2391 esac
2392fi
2393
2394if test -z "${setobjs}"; then
2395
2396 case "${host}" in
2397
dd8f3ed5
GN
2398 *-*-cygwin*)
2399 # The Cygwin library actually uses a couple of files from
0bc0cd11 2400 # libiberty when it is built. If we are building a native
dd8f3ed5 2401 # Cygwin, and we run the tests, we will appear to have these
0bc0cd11
JL
2402 # files. However, when we go on to build winsup, we will wind up
2403 # with a library which does not have the files, since they should
2404 # have come from libiberty.
2405
2406 # We handle this by removing the functions the winsup library
2407 # provides from our shell variables, so that they appear to be
2408 # missing.
2409
2f31ed7e
DD
2410 # DJ - only if we're *building* cygwin, not just building *with* cygwin
2411
2412 if test -n "${with_target_subdir}"
2413 then
2414 funcs="`echo $funcs | sed -e 's/random//'`"
2415 LIBOBJS="$LIBOBJS random.o"
2416 vars="`echo $vars | sed -e 's/sys_siglist//'`"
2417 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
2418 fi
0bc0cd11
JL
2419 ;;
2420
2421 *-*-mingw32*)
2422 # Under mingw32, sys_nerr and sys_errlist exist, but they are
2423 # macros, so the test below won't find them.
d1209685
ZW
2424 libiberty_cv_var_sys_nerr=yes
2425 libiberty_cv_var_sys_errlist=yes
0bc0cd11
JL
2426 ;;
2427
89f602a7
MK
2428 *-*-uwin*)
2429 # Under some versions of uwin, vfork is notoriously buggy and the test
2430 # can hang configure; on other versions, vfork exists just as a stub.
2431 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
2432 ac_cv_func_vfork_works=no
62133b5e
MK
2433 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
2434 # macros (actually, these are imported from a DLL, but the end effect
2435 # is the same), so the test below won't find them.
d1209685
ZW
2436 libiberty_cv_var_sys_nerr=yes
2437 libiberty_cv_var_sys_errlist=yes
89f602a7
MK
2438 ;;
2439
ee262b6f
DR
2440 *-*-*vms*)
2441 # Under VMS, vfork works very different than on Unix. The standard test
2442 # won't work, and it isn't easily adaptable. It makes more sense to
2443 # just force it.
2444 ac_cv_func_vfork_works=yes
2445 ;;
2446
0bc0cd11
JL
2447 esac
2448
2449 # We haven't set the list of objects yet. Use the standard autoconf
2450 # tests. This will only work if the compiler works.
2451 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d47f75c4 2452echo "configure:2453: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
0bc0cd11
JL
2453
2454ac_ext=c
2455# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2456ac_cpp='$CPP $CPPFLAGS'
2457ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
687361c8 2458ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
0bc0cd11
JL
2459cross_compiling=$ac_cv_prog_cc_cross
2460
687361c8
ME
2461cat > conftest.$ac_ext << EOF
2462
d47f75c4 2463#line 2464 "configure"
0bc0cd11 2464#include "confdefs.h"
687361c8 2465
0bc0cd11
JL
2466main(){return(0);}
2467EOF
d47f75c4 2468if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
2469 ac_cv_prog_cc_works=yes
2470 # If we can't run a trivial program, we are probably using a cross compiler.
2471 if (./conftest; exit) 2>/dev/null; then
2472 ac_cv_prog_cc_cross=no
2473 else
2474 ac_cv_prog_cc_cross=yes
2475 fi
2476else
2477 echo "configure: failed program was:" >&5
2478 cat conftest.$ac_ext >&5
2479 ac_cv_prog_cc_works=no
2480fi
2481rm -fr conftest*
687361c8
ME
2482ac_ext=c
2483# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2484ac_cpp='$CPP $CPPFLAGS'
2485ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2486ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2487cross_compiling=$ac_cv_prog_cc_cross
0bc0cd11
JL
2488
2489echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2490if test $ac_cv_prog_cc_works = no; then
2491 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2492fi
2493echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d47f75c4 2494echo "configure:2495: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
0bc0cd11
JL
2495echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2496cross_compiling=$ac_cv_prog_cc_cross
2497
2498 for ac_func in $funcs
2499do
2500echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d47f75c4 2501echo "configure:2502: checking for $ac_func" >&5
0bc0cd11
JL
2502if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2503 echo $ac_n "(cached) $ac_c" 1>&6
2504else
2505 cat > conftest.$ac_ext <<EOF
d47f75c4 2506#line 2507 "configure"
0bc0cd11
JL
2507#include "confdefs.h"
2508/* System header to define __stub macros and hopefully few prototypes,
2509 which can conflict with char $ac_func(); below. */
2510#include <assert.h>
2511/* Override any gcc2 internal prototype to avoid an error. */
2512/* We use char because int might match the return type of a gcc2
2513 builtin and then its argument prototype would still apply. */
2514char $ac_func();
2515
2516int main() {
2517
2518/* The GNU C library defines this for functions which it implements
2519 to always fail with ENOSYS. Some functions are actually named
2520 something starting with __ and the normal name is an alias. */
2521#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2522choke me
2523#else
2524$ac_func();
2525#endif
2526
2527; return 0; }
2528EOF
d47f75c4 2529if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
2530 rm -rf conftest*
2531 eval "ac_cv_func_$ac_func=yes"
2532else
2533 echo "configure: failed program was:" >&5
2534 cat conftest.$ac_ext >&5
2535 rm -rf conftest*
2536 eval "ac_cv_func_$ac_func=no"
2537fi
2538rm -f conftest*
2539fi
2540
2541if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2542 echo "$ac_t""yes" 1>&6
2543 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2544 cat >> confdefs.h <<EOF
2545#define $ac_tr_func 1
2546EOF
2547
2548else
2549 echo "$ac_t""no" 1>&6
687361c8 2550LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
0bc0cd11
JL
2551fi
2552done
2553
2554
b548dffb 2555 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d47f75c4 2556echo "configure:2557: checking whether alloca needs Cray hooks" >&5
0bc0cd11
JL
2557if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2558 echo $ac_n "(cached) $ac_c" 1>&6
2559else
2560 cat > conftest.$ac_ext <<EOF
d47f75c4 2561#line 2562 "configure"
0bc0cd11
JL
2562#include "confdefs.h"
2563#if defined(CRAY) && ! defined(CRAY2)
2564webecray
2565#else
2566wenotbecray
2567#endif
2568
2569EOF
2570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2571 egrep "webecray" >/dev/null 2>&1; then
2572 rm -rf conftest*
2573 ac_cv_os_cray=yes
2574else
2575 rm -rf conftest*
2576 ac_cv_os_cray=no
2577fi
2578rm -f conftest*
2579
2580fi
2581
2582echo "$ac_t""$ac_cv_os_cray" 1>&6
2583if test $ac_cv_os_cray = yes; then
b548dffb
ZW
2584 for ac_func in _getb67 GETB67 getb67; do
2585 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d47f75c4 2586echo "configure:2587: checking for $ac_func" >&5
0bc0cd11
JL
2587if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2588 echo $ac_n "(cached) $ac_c" 1>&6
2589else
2590 cat > conftest.$ac_ext <<EOF
d47f75c4 2591#line 2592 "configure"
0bc0cd11
JL
2592#include "confdefs.h"
2593/* System header to define __stub macros and hopefully few prototypes,
2594 which can conflict with char $ac_func(); below. */
2595#include <assert.h>
2596/* Override any gcc2 internal prototype to avoid an error. */
2597/* We use char because int might match the return type of a gcc2
2598 builtin and then its argument prototype would still apply. */
2599char $ac_func();
2600
2601int main() {
2602
2603/* The GNU C library defines this for functions which it implements
2604 to always fail with ENOSYS. Some functions are actually named
2605 something starting with __ and the normal name is an alias. */
2606#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2607choke me
2608#else
2609$ac_func();
2610#endif
2611
2612; return 0; }
2613EOF
d47f75c4 2614if { (eval echo configure:2615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
2615 rm -rf conftest*
2616 eval "ac_cv_func_$ac_func=yes"
2617else
2618 echo "configure: failed program was:" >&5
2619 cat conftest.$ac_ext >&5
2620 rm -rf conftest*
2621 eval "ac_cv_func_$ac_func=no"
2622fi
2623rm -f conftest*
2624fi
2625
2626if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2627 echo "$ac_t""yes" 1>&6
2628 cat >> confdefs.h <<EOF
2629#define CRAY_STACKSEG_END $ac_func
2630EOF
0bc0cd11
JL
2631 break
2632else
2633 echo "$ac_t""no" 1>&6
2634fi
2635
b548dffb 2636 done
0bc0cd11
JL
2637fi
2638
2639echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d47f75c4 2640echo "configure:2641: checking stack direction for C alloca" >&5
0bc0cd11
JL
2641if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2642 echo $ac_n "(cached) $ac_c" 1>&6
2643else
2644 if test "$cross_compiling" = yes; then
2645 ac_cv_c_stack_direction=0
2646else
2647 cat > conftest.$ac_ext <<EOF
d47f75c4 2648#line 2649 "configure"
0bc0cd11
JL
2649#include "confdefs.h"
2650find_stack_direction ()
2651{
2652 static char *addr = 0;
2653 auto char dummy;
2654 if (addr == 0)
2655 {
2656 addr = &dummy;
2657 return find_stack_direction ();
2658 }
2659 else
2660 return (&dummy > addr) ? 1 : -1;
2661}
2662main ()
2663{
2664 exit (find_stack_direction() < 0);
2665}
2666EOF
d47f75c4 2667if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0bc0cd11
JL
2668then
2669 ac_cv_c_stack_direction=1
2670else
2671 echo "configure: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
2673 rm -fr conftest*
2674 ac_cv_c_stack_direction=-1
2675fi
2676rm -fr conftest*
2677fi
2678
2679fi
2680
2681echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2682cat >> confdefs.h <<EOF
2683#define STACK_DIRECTION $ac_cv_c_stack_direction
2684EOF
2685
7dd88617 2686
deae2ed9 2687 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
0bc0cd11 2688echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
d47f75c4 2689echo "configure:2690: checking for vfork.h" >&5
0bc0cd11
JL
2690if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2691 echo $ac_n "(cached) $ac_c" 1>&6
2692else
2693 cat > conftest.$ac_ext <<EOF
d47f75c4 2694#line 2695 "configure"
0bc0cd11
JL
2695#include "confdefs.h"
2696#include <vfork.h>
2697EOF
2698ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d47f75c4 2699{ (eval echo configure:2700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
687361c8 2700ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
0bc0cd11
JL
2701if test -z "$ac_err"; then
2702 rm -rf conftest*
2703 eval "ac_cv_header_$ac_safe=yes"
2704else
2705 echo "$ac_err" >&5
2706 echo "configure: failed program was:" >&5
2707 cat conftest.$ac_ext >&5
2708 rm -rf conftest*
2709 eval "ac_cv_header_$ac_safe=no"
2710fi
2711rm -f conftest*
2712fi
2713if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2714 echo "$ac_t""yes" 1>&6
2715 cat >> confdefs.h <<\EOF
2716#define HAVE_VFORK_H 1
2717EOF
2718
2719else
2720 echo "$ac_t""no" 1>&6
2721fi
2722
2723echo $ac_n "checking for working vfork""... $ac_c" 1>&6
d47f75c4 2724echo "configure:2725: checking for working vfork" >&5
0bc0cd11
JL
2725if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2726 echo $ac_n "(cached) $ac_c" 1>&6
2727else
2728 if test "$cross_compiling" = yes; then
2729 echo $ac_n "checking for vfork""... $ac_c" 1>&6
d47f75c4 2730echo "configure:2731: checking for vfork" >&5
0bc0cd11
JL
2731if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2732 echo $ac_n "(cached) $ac_c" 1>&6
2733else
2734 cat > conftest.$ac_ext <<EOF
d47f75c4 2735#line 2736 "configure"
0bc0cd11
JL
2736#include "confdefs.h"
2737/* System header to define __stub macros and hopefully few prototypes,
2738 which can conflict with char vfork(); below. */
2739#include <assert.h>
2740/* Override any gcc2 internal prototype to avoid an error. */
2741/* We use char because int might match the return type of a gcc2
2742 builtin and then its argument prototype would still apply. */
2743char vfork();
2744
2745int main() {
2746
2747/* The GNU C library defines this for functions which it implements
2748 to always fail with ENOSYS. Some functions are actually named
2749 something starting with __ and the normal name is an alias. */
2750#if defined (__stub_vfork) || defined (__stub___vfork)
2751choke me
2752#else
2753vfork();
2754#endif
2755
2756; return 0; }
2757EOF
d47f75c4 2758if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
2759 rm -rf conftest*
2760 eval "ac_cv_func_vfork=yes"
2761else
2762 echo "configure: failed program was:" >&5
2763 cat conftest.$ac_ext >&5
2764 rm -rf conftest*
2765 eval "ac_cv_func_vfork=no"
2766fi
2767rm -f conftest*
2768fi
2769
2770if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2771 echo "$ac_t""yes" 1>&6
2772 :
2773else
2774 echo "$ac_t""no" 1>&6
2775fi
2776
2777ac_cv_func_vfork_works=$ac_cv_func_vfork
2778else
2779 cat > conftest.$ac_ext <<EOF
d47f75c4 2780#line 2781 "configure"
0bc0cd11
JL
2781#include "confdefs.h"
2782/* Thanks to Paul Eggert for this test. */
2783#include <stdio.h>
2784#include <sys/types.h>
2785#include <sys/stat.h>
2786#ifdef HAVE_UNISTD_H
2787#include <unistd.h>
2788#endif
2789#ifdef HAVE_VFORK_H
2790#include <vfork.h>
2791#endif
2792/* On some sparc systems, changes by the child to local and incoming
2793 argument registers are propagated back to the parent.
2794 The compiler is told about this with #include <vfork.h>,
2795 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2796 Test for this by using a static variable whose address
2797 is put into a register that is clobbered by the vfork. */
2798static
2799#ifdef __cplusplus
2800sparc_address_test (int arg)
2801#else
2802sparc_address_test (arg) int arg;
2803#endif
2804{
2805 static pid_t child;
2806 if (!child) {
2807 child = vfork ();
2808 if (child < 0) {
2809 perror ("vfork");
2810 _exit(2);
2811 }
2812 if (!child) {
2813 arg = getpid();
2814 write(-1, "", 0);
2815 _exit (arg);
2816 }
2817 }
2818}
2819main() {
2820 pid_t parent = getpid ();
2821 pid_t child;
2822
2823 sparc_address_test ();
2824
2825 child = vfork ();
2826
2827 if (child == 0) {
2828 /* Here is another test for sparc vfork register problems.
2829 This test uses lots of local variables, at least
2830 as many local variables as main has allocated so far
2831 including compiler temporaries. 4 locals are enough for
2832 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2833 A buggy compiler should reuse the register of parent
2834 for one of the local variables, since it will think that
2835 parent can't possibly be used any more in this routine.
2836 Assigning to the local variable will thus munge parent
2837 in the parent process. */
2838 pid_t
2839 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2840 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2841 /* Convince the compiler that p..p7 are live; otherwise, it might
2842 use the same hardware register for all 8 local variables. */
2843 if (p != p1 || p != p2 || p != p3 || p != p4
2844 || p != p5 || p != p6 || p != p7)
2845 _exit(1);
2846
2847 /* On some systems (e.g. IRIX 3.3),
2848 vfork doesn't separate parent from child file descriptors.
2849 If the child closes a descriptor before it execs or exits,
2850 this munges the parent's descriptor as well.
2851 Test for this by closing stdout in the child. */
2852 _exit(close(fileno(stdout)) != 0);
2853 } else {
2854 int status;
2855 struct stat st;
2856
2857 while (wait(&status) != child)
2858 ;
2859 exit(
2860 /* Was there some problem with vforking? */
2861 child < 0
2862
2863 /* Did the child fail? (This shouldn't happen.) */
2864 || status
2865
2866 /* Did the vfork/compiler bug occur? */
2867 || parent != getpid()
2868
2869 /* Did the file descriptor bug occur? */
2870 || fstat(fileno(stdout), &st) != 0
2871 );
2872 }
2873}
2874EOF
d47f75c4 2875if { (eval echo configure:2876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0bc0cd11
JL
2876then
2877 ac_cv_func_vfork_works=yes
2878else
2879 echo "configure: failed program was:" >&5
2880 cat conftest.$ac_ext >&5
2881 rm -fr conftest*
2882 ac_cv_func_vfork_works=no
2883fi
2884rm -fr conftest*
2885fi
2886
2887fi
2888
2889echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2890if test $ac_cv_func_vfork_works = no; then
2891 cat >> confdefs.h <<\EOF
2892#define vfork fork
2893EOF
2894
2895fi
2896
2897 if test $ac_cv_func_vfork_works = no; then
2898 LIBOBJS="$LIBOBJS vfork.o"
2899 fi
e490616e
ZW
2900 # We only need _doprnt if we might use it to implement v*printf.
2901 if test $ac_cv_func_vprintf != yes \
2902 || test $ac_cv_func_vfprintf != yes \
2903 || test $ac_cv_func_vsprintf != yes; then
2904 for ac_func in _doprnt
2905do
2906echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d47f75c4 2907echo "configure:2908: checking for $ac_func" >&5
e490616e
ZW
2908if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2909 echo $ac_n "(cached) $ac_c" 1>&6
2910else
2911 cat > conftest.$ac_ext <<EOF
d47f75c4 2912#line 2913 "configure"
e490616e
ZW
2913#include "confdefs.h"
2914/* System header to define __stub macros and hopefully few prototypes,
2915 which can conflict with char $ac_func(); below. */
2916#include <assert.h>
2917/* Override any gcc2 internal prototype to avoid an error. */
2918/* We use char because int might match the return type of a gcc2
2919 builtin and then its argument prototype would still apply. */
2920char $ac_func();
2921
2922int main() {
2923
2924/* The GNU C library defines this for functions which it implements
2925 to always fail with ENOSYS. Some functions are actually named
2926 something starting with __ and the normal name is an alias. */
2927#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2928choke me
2929#else
2930$ac_func();
2931#endif
2932
2933; return 0; }
2934EOF
d47f75c4 2935if { (eval echo configure:2936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
e490616e
ZW
2936 rm -rf conftest*
2937 eval "ac_cv_func_$ac_func=yes"
2938else
2939 echo "configure: failed program was:" >&5
2940 cat conftest.$ac_ext >&5
2941 rm -rf conftest*
2942 eval "ac_cv_func_$ac_func=no"
2943fi
2944rm -f conftest*
2945fi
2946
2947if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2948 echo "$ac_t""yes" 1>&6
2949 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2950 cat >> confdefs.h <<EOF
2951#define $ac_tr_func 1
2952EOF
2953
2954else
2955 echo "$ac_t""no" 1>&6
2956LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2957fi
2958done
2959
2960
9ce3f7e5
DD
2961 else
2962 for ac_func in _doprnt
2963do
2964echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d47f75c4 2965echo "configure:2966: checking for $ac_func" >&5
9ce3f7e5
DD
2966if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2967 echo $ac_n "(cached) $ac_c" 1>&6
2968else
2969 cat > conftest.$ac_ext <<EOF
d47f75c4 2970#line 2971 "configure"
9ce3f7e5
DD
2971#include "confdefs.h"
2972/* System header to define __stub macros and hopefully few prototypes,
2973 which can conflict with char $ac_func(); below. */
2974#include <assert.h>
2975/* Override any gcc2 internal prototype to avoid an error. */
2976/* We use char because int might match the return type of a gcc2
2977 builtin and then its argument prototype would still apply. */
2978char $ac_func();
2979
2980int main() {
2981
2982/* The GNU C library defines this for functions which it implements
2983 to always fail with ENOSYS. Some functions are actually named
2984 something starting with __ and the normal name is an alias. */
2985#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2986choke me
2987#else
2988$ac_func();
2989#endif
2990
2991; return 0; }
2992EOF
d47f75c4 2993if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9ce3f7e5
DD
2994 rm -rf conftest*
2995 eval "ac_cv_func_$ac_func=yes"
2996else
2997 echo "configure: failed program was:" >&5
2998 cat conftest.$ac_ext >&5
2999 rm -rf conftest*
3000 eval "ac_cv_func_$ac_func=no"
3001fi
3002rm -f conftest*
3003fi
3004
3005if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3006 echo "$ac_t""yes" 1>&6
3007 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3008 cat >> confdefs.h <<EOF
3009#define $ac_tr_func 1
3010EOF
3011
3012else
3013 echo "$ac_t""no" 1>&6
3014fi
3015done
3016
e490616e
ZW
3017 fi
3018
0bc0cd11
JL
3019 for v in $vars; do
3020 echo $ac_n "checking for $v""... $ac_c" 1>&6
d47f75c4 3021echo "configure:3022: checking for $v" >&5
0bc0cd11
JL
3022 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
3023 echo $ac_n "(cached) $ac_c" 1>&6
3024else
3025 cat > conftest.$ac_ext <<EOF
d47f75c4 3026#line 3027 "configure"
0bc0cd11
JL
3027#include "confdefs.h"
3028int *p;
3029int main() {
9f3dbd92 3030extern int $v []; p = $v;
0bc0cd11
JL
3031; return 0; }
3032EOF
d47f75c4 3033if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
3034 rm -rf conftest*
3035 eval "libiberty_cv_var_$v=yes"
3036else
3037 echo "configure: failed program was:" >&5
3038 cat conftest.$ac_ext >&5
3039 rm -rf conftest*
3040 eval "libiberty_cv_var_$v=no"
3041fi
3042rm -f conftest*
3043fi
3044
3045 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
3046 echo "$ac_t""yes" 1>&6
3047 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3048 cat >> confdefs.h <<EOF
3049#define $n 1
3050EOF
3051
3052 else
3053 echo "$ac_t""no" 1>&6
3054 fi
3055 done
3056 for ac_func in $checkfuncs
3057do
3058echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d47f75c4 3059echo "configure:3060: checking for $ac_func" >&5
0bc0cd11
JL
3060if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3061 echo $ac_n "(cached) $ac_c" 1>&6
3062else
3063 cat > conftest.$ac_ext <<EOF
d47f75c4 3064#line 3065 "configure"
0bc0cd11
JL
3065#include "confdefs.h"
3066/* System header to define __stub macros and hopefully few prototypes,
3067 which can conflict with char $ac_func(); below. */
3068#include <assert.h>
3069/* Override any gcc2 internal prototype to avoid an error. */
3070/* We use char because int might match the return type of a gcc2
3071 builtin and then its argument prototype would still apply. */
3072char $ac_func();
3073
3074int main() {
3075
3076/* The GNU C library defines this for functions which it implements
3077 to always fail with ENOSYS. Some functions are actually named
3078 something starting with __ and the normal name is an alias. */
3079#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3080choke me
3081#else
3082$ac_func();
3083#endif
3084
3085; return 0; }
3086EOF
d47f75c4 3087if { (eval echo configure:3088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
0bc0cd11
JL
3088 rm -rf conftest*
3089 eval "ac_cv_func_$ac_func=yes"
3090else
3091 echo "configure: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3093 rm -rf conftest*
3094 eval "ac_cv_func_$ac_func=no"
3095fi
3096rm -f conftest*
3097fi
3098
3099if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3100 echo "$ac_t""yes" 1>&6
3101 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3102 cat >> confdefs.h <<EOF
3103#define $ac_tr_func 1
3104EOF
3105
3106else
3107 echo "$ac_t""no" 1>&6
3108fi
3109done
3110
4876b2b4 3111 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
d47f75c4 3112echo "configure:3113: checking whether canonicalize_file_name must be declared" >&5
4876b2b4
DJ
3113if eval "test \"`echo '$''{'libiberty_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
3114 echo $ac_n "(cached) $ac_c" 1>&6
3115else
3116 cat > conftest.$ac_ext <<EOF
d47f75c4 3117#line 3118 "configure"
4876b2b4
DJ
3118#include "confdefs.h"
3119
3120#include "confdefs.h"
3121#include <stdio.h>
3122#ifdef HAVE_STRING_H
3123#include <string.h>
3124#else
3125#ifdef HAVE_STRINGS_H
3126#include <strings.h>
3127#endif
3128#endif
3129#ifdef HAVE_STDLIB_H
3130#include <stdlib.h>
3131#endif
3132#ifdef HAVE_UNISTD_H
3133#include <unistd.h>
3134#endif
3135int main() {
3136char *(*pfn) = (char *(*)) canonicalize_file_name
3137; return 0; }
3138EOF
d47f75c4 3139if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4876b2b4
DJ
3140 rm -rf conftest*
3141 libiberty_cv_decl_needed_canonicalize_file_name=no
3142else
3143 echo "configure: failed program was:" >&5
3144 cat conftest.$ac_ext >&5
3145 rm -rf conftest*
3146 libiberty_cv_decl_needed_canonicalize_file_name=yes
3147fi
3148rm -f conftest*
3149fi
3150
3151echo "$ac_t""$libiberty_cv_decl_needed_canonicalize_file_name" 1>&6
3152if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
3153 cat >> confdefs.h <<\EOF
3154#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
3155EOF
3156
3157fi
3158
0bc0cd11
JL
3159fi
3160
55d0e5e0
ZW
3161# Figure out which version of pexecute to use.
3162case "${host}" in
55d0e5e0
ZW
3163 *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;;
3164 *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;;
3165 *-*-msdos*) pexecute=pex-msdos.o ;;
3166 *-*-os2-emx*) pexecute=pex-os2.o ;;
3167 *) pexecute=pex-unix.o ;;
3168esac
3169
3170
4876b2b4 3171for ac_hdr in unistd.h
a9266bfa
KG
3172do
3173ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3174echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d47f75c4 3175echo "configure:3176: checking for $ac_hdr" >&5
a9266bfa
KG
3176if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3177 echo $ac_n "(cached) $ac_c" 1>&6
3178else
3179 cat > conftest.$ac_ext <<EOF
d47f75c4 3180#line 3181 "configure"
a9266bfa
KG
3181#include "confdefs.h"
3182#include <$ac_hdr>
3183EOF
3184ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d47f75c4 3185{ (eval echo configure:3186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
a9266bfa
KG
3186ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3187if test -z "$ac_err"; then
3188 rm -rf conftest*
3189 eval "ac_cv_header_$ac_safe=yes"
3190else
3191 echo "$ac_err" >&5
3192 echo "configure: failed program was:" >&5
3193 cat conftest.$ac_ext >&5
3194 rm -rf conftest*
3195 eval "ac_cv_header_$ac_safe=no"
3196fi
3197rm -f conftest*
3198fi
3199if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3200 echo "$ac_t""yes" 1>&6
3201 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3202 cat >> confdefs.h <<EOF
3203#define $ac_tr_hdr 1
3204EOF
3205
3206else
3207 echo "$ac_t""no" 1>&6
3208fi
3209done
3210
3211for ac_func in getpagesize
3212do
3213echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d47f75c4 3214echo "configure:3215: checking for $ac_func" >&5
a9266bfa
KG
3215if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3216 echo $ac_n "(cached) $ac_c" 1>&6
3217else
3218 cat > conftest.$ac_ext <<EOF
d47f75c4 3219#line 3220 "configure"
a9266bfa
KG
3220#include "confdefs.h"
3221/* System header to define __stub macros and hopefully few prototypes,
3222 which can conflict with char $ac_func(); below. */
3223#include <assert.h>
3224/* Override any gcc2 internal prototype to avoid an error. */
3225/* We use char because int might match the return type of a gcc2
3226 builtin and then its argument prototype would still apply. */
3227char $ac_func();
3228
3229int main() {
3230
3231/* The GNU C library defines this for functions which it implements
3232 to always fail with ENOSYS. Some functions are actually named
3233 something starting with __ and the normal name is an alias. */
3234#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3235choke me
3236#else
3237$ac_func();
3238#endif
3239
3240; return 0; }
3241EOF
d47f75c4 3242if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
a9266bfa
KG
3243 rm -rf conftest*
3244 eval "ac_cv_func_$ac_func=yes"
3245else
3246 echo "configure: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
3248 rm -rf conftest*
3249 eval "ac_cv_func_$ac_func=no"
3250fi
3251rm -f conftest*
3252fi
3253
3254if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3255 echo "$ac_t""yes" 1>&6
3256 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3257 cat >> confdefs.h <<EOF
3258#define $ac_tr_func 1
3259EOF
3260
3261else
3262 echo "$ac_t""no" 1>&6
3263fi
3264done
3265
3266echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d47f75c4 3267echo "configure:3268: checking for working mmap" >&5
a9266bfa
KG
3268if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3269 echo $ac_n "(cached) $ac_c" 1>&6
3270else
3271 if test "$cross_compiling" = yes; then
3272 ac_cv_func_mmap_fixed_mapped=no
3273else
3274 cat > conftest.$ac_ext <<EOF
d47f75c4 3275#line 3276 "configure"
a9266bfa
KG
3276#include "confdefs.h"
3277
3278/* Thanks to Mike Haertel and Jim Avera for this test.
3279 Here is a matrix of mmap possibilities:
3280 mmap private not fixed
3281 mmap private fixed at somewhere currently unmapped
3282 mmap private fixed at somewhere already mapped
3283 mmap shared not fixed
3284 mmap shared fixed at somewhere currently unmapped
3285 mmap shared fixed at somewhere already mapped
3286 For private mappings, we should verify that changes cannot be read()
3287 back from the file, nor mmap's back from the file at a different
3288 address. (There have been systems where private was not correctly
3289 implemented like the infamous i386 svr4.0, and systems where the
3290 VM page cache was not coherent with the filesystem buffer cache
3291 like early versions of FreeBSD and possibly contemporary NetBSD.)
3292 For shared mappings, we should conversely verify that changes get
3293 propogated back to all the places they're supposed to be.
3294
3295 Grep wants private fixed already mapped.
3296 The main things grep needs to know about mmap are:
3297 * does it exist and is it safe to write into the mmap'd area
3298 * how to use it (BSD variants) */
3299#include <sys/types.h>
3300#include <fcntl.h>
3301#include <sys/mman.h>
3302
3303/* This mess was copied from the GNU getpagesize.h. */
3304#ifndef HAVE_GETPAGESIZE
4876b2b4
DJ
3305# ifdef HAVE_UNISTD_H
3306# include <unistd.h>
3307# endif
a9266bfa
KG
3308
3309/* Assume that all systems that can run configure have sys/param.h. */
3310# ifndef HAVE_SYS_PARAM_H
3311# define HAVE_SYS_PARAM_H 1
3312# endif
3313
3314# ifdef _SC_PAGESIZE
3315# define getpagesize() sysconf(_SC_PAGESIZE)
3316# else /* no _SC_PAGESIZE */
3317# ifdef HAVE_SYS_PARAM_H
3318# include <sys/param.h>
3319# ifdef EXEC_PAGESIZE
3320# define getpagesize() EXEC_PAGESIZE
3321# else /* no EXEC_PAGESIZE */
3322# ifdef NBPG
3323# define getpagesize() NBPG * CLSIZE
3324# ifndef CLSIZE
3325# define CLSIZE 1
3326# endif /* no CLSIZE */
3327# else /* no NBPG */
3328# ifdef NBPC
3329# define getpagesize() NBPC
3330# else /* no NBPC */
3331# ifdef PAGESIZE
3332# define getpagesize() PAGESIZE
3333# endif /* PAGESIZE */
3334# endif /* no NBPC */
3335# endif /* no NBPG */
3336# endif /* no EXEC_PAGESIZE */
3337# else /* no HAVE_SYS_PARAM_H */
3338# define getpagesize() 8192 /* punt totally */
3339# endif /* no HAVE_SYS_PARAM_H */
3340# endif /* no _SC_PAGESIZE */
3341
3342#endif /* no HAVE_GETPAGESIZE */
3343
3344#ifdef __cplusplus
3345extern "C" { void *malloc(unsigned); }
3346#else
3347char *malloc();
3348#endif
3349
3350int
3351main()
3352{
3353 char *data, *data2, *data3;
3354 int i, pagesize;
3355 int fd;
3356
3357 pagesize = getpagesize();
3358
3359 /*
3360 * First, make a file with some known garbage in it.
3361 */
dac45916 3362 data = malloc(pagesize);
a9266bfa
KG
3363 if (!data)
3364 exit(1);
3365 for (i = 0; i < pagesize; ++i)
3366 *(data + i) = rand();
3367 umask(0);
3368 fd = creat("conftestmmap", 0600);
3369 if (fd < 0)
3370 exit(1);
3371 if (write(fd, data, pagesize) != pagesize)
3372 exit(1);
3373 close(fd);
3374
3375 /*
3376 * Next, try to mmap the file at a fixed address which
3377 * already has something else allocated at it. If we can,
3378 * also make sure that we see the same garbage.
3379 */
3380 fd = open("conftestmmap", O_RDWR);
3381 if (fd < 0)
3382 exit(1);
dac45916 3383 data2 = malloc(2 * pagesize);
a9266bfa
KG
3384 if (!data2)
3385 exit(1);
3386 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3387 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3388 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3389 exit(1);
3390 for (i = 0; i < pagesize; ++i)
3391 if (*(data + i) != *(data2 + i))
3392 exit(1);
3393
3394 /*
3395 * Finally, make sure that changes to the mapped area
3396 * do not percolate back to the file as seen by read().
3397 * (This is a bug on some variants of i386 svr4.0.)
3398 */
3399 for (i = 0; i < pagesize; ++i)
3400 *(data2 + i) = *(data2 + i) + 1;
dac45916 3401 data3 = malloc(pagesize);
a9266bfa
KG
3402 if (!data3)
3403 exit(1);
3404 if (read(fd, data3, pagesize) != pagesize)
3405 exit(1);
3406 for (i = 0; i < pagesize; ++i)
3407 if (*(data + i) != *(data3 + i))
3408 exit(1);
3409 close(fd);
3410 unlink("conftestmmap");
3411 exit(0);
3412}
3413
3414EOF
d47f75c4 3415if { (eval echo configure:3416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
a9266bfa
KG
3416then
3417 ac_cv_func_mmap_fixed_mapped=yes
3418else
3419 echo "configure: failed program was:" >&5
3420 cat conftest.$ac_ext >&5
3421 rm -fr conftest*
3422 ac_cv_func_mmap_fixed_mapped=no
3423fi
3424rm -fr conftest*
3425fi
3426
3427fi
3428
3429echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3430if test $ac_cv_func_mmap_fixed_mapped = yes; then
3431 cat >> confdefs.h <<\EOF
3432#define HAVE_MMAP 1
3433EOF
3434
3435fi
3436
3437
3438echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
d47f75c4 3439echo "configure:3440: checking for working strncmp" >&5
a9266bfa
KG
3440if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
3441 echo $ac_n "(cached) $ac_c" 1>&6
3442else
3443 if test "$cross_compiling" = yes; then
3444 ac_cv_func_strncmp_works=no
3445else
3446 cat > conftest.$ac_ext <<EOF
d47f75c4 3447#line 3448 "configure"
a9266bfa
KG
3448#include "confdefs.h"
3449
3450/* Test by Jim Wilson and Kaveh Ghazi.
3451 Check whether strncmp reads past the end of its string parameters. */
3452#include <sys/types.h>
3453
3454#ifdef HAVE_FCNTL_H
3455#include <fcntl.h>
3456#endif
3457
3458#ifdef HAVE_SYS_MMAN_H
3459#include <sys/mman.h>
3460#endif
3461
3462#ifndef MAP_ANON
3463#ifdef MAP_ANONYMOUS
3464#define MAP_ANON MAP_ANONYMOUS
3465#else
3466#define MAP_ANON MAP_FILE
3467#endif
3468#endif
3469
3470#ifndef MAP_FILE
3471#define MAP_FILE 0
3472#endif
3473#ifndef O_RDONLY
3474#define O_RDONLY 0
3475#endif
3476
3477#define MAP_LEN 0x10000
3478
3479main ()
3480{
3481#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
3482 char *p;
3483 int dev_zero;
3484
3485 dev_zero = open ("/dev/zero", O_RDONLY);
3486 if (dev_zero < 0)
3487 exit (1);
3488
3489 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
3490 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
a4219437
IR
3491 if (p == (char *)-1)
3492 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
3493 MAP_ANON|MAP_PRIVATE, -1, 0);
a9266bfa
KG
3494 if (p == (char *)-1)
3495 exit (2);
3496 else
3497 {
3498 char *string = "__si_type_info";
3499 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
3500 char *r = (char *) p + 0xe;
3501
3502 strcpy (q, string);
3503 strcpy (r, string);
3504 strncmp (r, q, 14);
3505 }
3506#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
3507 exit (0);
3508}
3509
3510EOF
d47f75c4 3511if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
a9266bfa
KG
3512then
3513 ac_cv_func_strncmp_works=yes
3514else
3515 echo "configure: failed program was:" >&5
3516 cat conftest.$ac_ext >&5
3517 rm -fr conftest*
3518 ac_cv_func_strncmp_works=no
3519fi
3520rm -fr conftest*
3521fi
3522
3523rm -f core core.* *.core
3524fi
3525
3526echo "$ac_t""$ac_cv_func_strncmp_works" 1>&6
3527if test $ac_cv_func_strncmp_works = no ; then
3528 LIBOBJS="$LIBOBJS strncmp.o"
3529fi
3530
3531
0bc0cd11
JL
3532# Install a library built with a cross compiler in $(tooldir) rather
3533# than $(libdir).
ca6b370d 3534if test -z "${with_cross_host}"; then
0bc0cd11
JL
3535 INSTALL_DEST=libdir
3536else
3537 INSTALL_DEST=tooldir
3538fi
3539
3540
3541# We need multilib support, but only if configuring for the target.
3542trap '' 1 2 15
3543cat > confcache <<\EOF
3544# This file is a shell script that caches the results of configure
3545# tests run on this system so they can be shared between configure
3546# scripts and configure runs. It is not useful on other systems.
3547# If it contains results you don't want to keep, you may remove or edit it.
3548#
3549# By default, configure uses ./config.cache as the cache file,
3550# creating it if it does not exist already. You can give configure
3551# the --cache-file=FILE option to use a different cache file; that is
3552# what configure does when it calls configure scripts in
3553# subdirectories, so they share the cache.
3554# Giving --cache-file=/dev/null disables caching, for debugging configure.
3555# config.status only pays attention to the cache file if you give it the
3556# --recheck option to rerun configure.
3557#
3558EOF
3559# The following way of writing the cache mishandles newlines in values,
3560# but we know of no workaround that is simple, portable, and efficient.
3561# So, don't put newlines in cache variables' values.
3562# Ultrix sh set writes to stderr and can't be redirected directly,
3563# and sets the high bit in the cache file unless we assign to the vars.
3564(set) 2>&1 |
687361c8 3565 case `(ac_space=' '; set | grep ac_space) 2>&1` in
0bc0cd11
JL
3566 *ac_space=\ *)
3567 # `set' does not quote correctly, so add quotes (double-quote substitution
3568 # turns \\\\ into \\, and sed turns \\ into \).
3569 sed -n \
3570 -e "s/'/'\\\\''/g" \
3571 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3572 ;;
3573 *)
3574 # `set' quotes correctly as required by POSIX, so do not add quotes.
3575 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3576 ;;
3577 esac >> confcache
3578if cmp -s $cache_file confcache; then
3579 :
3580else
3581 if test -w $cache_file; then
3582 echo "updating cache $cache_file"
3583 cat confcache > $cache_file
3584 else
3585 echo "not updating unwritable cache $cache_file"
3586 fi
3587fi
3588rm -f confcache
3589
3590trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3591
3592test "x$prefix" = xNONE && prefix=$ac_default_prefix
3593# Let make expand exec_prefix.
3594test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3595
3596# Any assignment to VPATH causes Sun make to only execute
3597# the first set of double-colon rules, so remove it if not needed.
3598# If there is a colon in the path, we need to keep it.
3599if test "x$srcdir" = x.; then
3600 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3601fi
3602
3603trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3604
3605DEFS=-DHAVE_CONFIG_H
3606
3607# Without the "./", some shells look in PATH for config.status.
3608: ${CONFIG_STATUS=./config.status}
3609
3610echo creating $CONFIG_STATUS
3611rm -f $CONFIG_STATUS
3612cat > $CONFIG_STATUS <<EOF
3613#! /bin/sh
3614# Generated automatically by configure.
3615# Run this file to recreate the current configuration.
3616# This directory was configured as follows,
3617# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3618#
3619# $0 $ac_configure_args
3620#
3621# Compiler output produced by configure, useful for debugging
3622# configure, is in ./config.log if it exists.
3623
3624ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3625for ac_option
3626do
3627 case "\$ac_option" in
3628 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3629 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3630 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3631 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
687361c8 3632 echo "$CONFIG_STATUS generated by autoconf version 2.13"
0bc0cd11
JL
3633 exit 0 ;;
3634 -help | --help | --hel | --he | --h)
3635 echo "\$ac_cs_usage"; exit 0 ;;
3636 *) echo "\$ac_cs_usage"; exit 1 ;;
3637 esac
3638done
3639
3640ac_given_srcdir=$srcdir
3641ac_given_INSTALL="$INSTALL"
3642
7c72138a 3643trap 'rm -fr `echo "Makefile testsuite/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
0bc0cd11
JL
3644EOF
3645cat >> $CONFIG_STATUS <<EOF
3646
3647# Protect against being on the right side of a sed subst in config.status.
3648sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3649 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3650$ac_vpsub
3651$extrasub
3652s%@SHELL@%$SHELL%g
3653s%@CFLAGS@%$CFLAGS%g
3654s%@CPPFLAGS@%$CPPFLAGS%g
3655s%@CXXFLAGS@%$CXXFLAGS%g
687361c8 3656s%@FFLAGS@%$FFLAGS%g
0bc0cd11
JL
3657s%@DEFS@%$DEFS%g
3658s%@LDFLAGS@%$LDFLAGS%g
3659s%@LIBS@%$LIBS%g
3660s%@exec_prefix@%$exec_prefix%g
3661s%@prefix@%$prefix%g
3662s%@program_transform_name@%$program_transform_name%g
3663s%@bindir@%$bindir%g
3664s%@sbindir@%$sbindir%g
3665s%@libexecdir@%$libexecdir%g
3666s%@datadir@%$datadir%g
3667s%@sysconfdir@%$sysconfdir%g
3668s%@sharedstatedir@%$sharedstatedir%g
3669s%@localstatedir@%$localstatedir%g
3670s%@libdir@%$libdir%g
3671s%@includedir@%$includedir%g
3672s%@oldincludedir@%$oldincludedir%g
3673s%@infodir@%$infodir%g
3674s%@mandir@%$mandir%g
d8c22ce7 3675s%@libiberty_topdir@%$libiberty_topdir%g
aaa5f039
DD
3676s%@MAINT@%$MAINT%g
3677s%@NOTMAINT@%$NOTMAINT%g
3678s%@MAKEINFO@%$MAKEINFO%g
3679s%@BUILD_INFO@%$BUILD_INFO%g
3680s%@PERL@%$PERL%g
3681s%@HAVE_PERL@%$HAVE_PERL%g
0bc0cd11
JL
3682s%@host@%$host%g
3683s%@host_alias@%$host_alias%g
3684s%@host_cpu@%$host_cpu%g
3685s%@host_vendor@%$host_vendor%g
3686s%@host_os@%$host_os%g
3687s%@build@%$build%g
3688s%@build_alias@%$build_alias%g
3689s%@build_cpu@%$build_cpu%g
3690s%@build_vendor@%$build_vendor%g
3691s%@build_os@%$build_os%g
3692s%@AR@%$AR%g
3693s%@RANLIB@%$RANLIB%g
3694s%@CC@%$CC%g
d1209685 3695s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g
7fda878c
DR
3696s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
3697s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
0bc0cd11 3698s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
687361c8 3699s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
0bc0cd11
JL
3700s%@INSTALL_DATA@%$INSTALL_DATA%g
3701/@host_makefile_frag@/r $host_makefile_frag
3702s%@host_makefile_frag@%%g
3703s%@CPP@%$CPP%g
7c72138a 3704s%@CHECK@%$CHECK%g
48d7db63 3705s%@target_header_dir@%$target_header_dir%g
0bc0cd11 3706s%@LIBOBJS@%$LIBOBJS%g
55d0e5e0 3707s%@pexecute@%$pexecute%g
0bc0cd11
JL
3708s%@INSTALL_DEST@%$INSTALL_DEST%g
3709
3710CEOF
3711EOF
3712
3713cat >> $CONFIG_STATUS <<\EOF
3714
3715# Split the substitutions into bite-sized pieces for seds with
3716# small command number limits, like on Digital OSF/1 and HP-UX.
3717ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3718ac_file=1 # Number of current file.
3719ac_beg=1 # First line for current file.
3720ac_end=$ac_max_sed_cmds # Line after last line for current file.
3721ac_more_lines=:
3722ac_sed_cmds=""
3723while $ac_more_lines; do
3724 if test $ac_beg -gt 1; then
3725 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3726 else
3727 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3728 fi
3729 if test ! -s conftest.s$ac_file; then
3730 ac_more_lines=false
3731 rm -f conftest.s$ac_file
3732 else
3733 if test -z "$ac_sed_cmds"; then
3734 ac_sed_cmds="sed -f conftest.s$ac_file"
3735 else
3736 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3737 fi
3738 ac_file=`expr $ac_file + 1`
3739 ac_beg=$ac_end
3740 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3741 fi
3742done
3743if test -z "$ac_sed_cmds"; then
3744 ac_sed_cmds=cat
3745fi
3746EOF
3747
3748cat >> $CONFIG_STATUS <<EOF
3749
7c72138a 3750CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
0bc0cd11
JL
3751EOF
3752cat >> $CONFIG_STATUS <<\EOF
3753for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3754 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3755 case "$ac_file" in
3756 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3757 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3758 *) ac_file_in="${ac_file}.in" ;;
3759 esac
3760
3761 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3762
3763 # Remove last slash and all that follows it. Not all systems have dirname.
3764 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3765 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3766 # The file is in a subdirectory.
3767 test ! -d "$ac_dir" && mkdir "$ac_dir"
3768 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3769 # A "../" for each directory in $ac_dir_suffix.
3770 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3771 else
3772 ac_dir_suffix= ac_dots=
3773 fi
3774
3775 case "$ac_given_srcdir" in
3776 .) srcdir=.
3777 if test -z "$ac_dots"; then top_srcdir=.
3778 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3779 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3780 *) # Relative path.
3781 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3782 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3783 esac
3784
3785 case "$ac_given_INSTALL" in
3786 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3787 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3788 esac
3789
3790 echo creating "$ac_file"
3791 rm -f "$ac_file"
3792 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3793 case "$ac_file" in
3794 *Makefile*) ac_comsub="1i\\
3795# $configure_input" ;;
3796 *) ac_comsub= ;;
3797 esac
3798
3799 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3800 sed -e "$ac_comsub
3801s%@configure_input@%$configure_input%g
3802s%@srcdir@%$srcdir%g
3803s%@top_srcdir@%$top_srcdir%g
3804s%@INSTALL@%$INSTALL%g
3805" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3806fi; done
3807rm -f conftest.s*
3808
3809# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3810# NAME is the cpp macro being defined and VALUE is the value it is being given.
3811#
3812# ac_d sets the value in "#define NAME VALUE" lines.
3813ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3814ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3815ac_dC='\3'
3816ac_dD='%g'
3817# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3818ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3819ac_uB='\([ ]\)%\1#\2define\3'
3820ac_uC=' '
3821ac_uD='\4%g'
3822# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3823ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3824ac_eB='$%\1#\2define\3'
3825ac_eC=' '
3826ac_eD='%g'
3827
3828if test "${CONFIG_HEADERS+set}" != set; then
3829EOF
3830cat >> $CONFIG_STATUS <<EOF
3831 CONFIG_HEADERS="config.h:config.in"
3832EOF
3833cat >> $CONFIG_STATUS <<\EOF
3834fi
3835for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3836 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3837 case "$ac_file" in
3838 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3839 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3840 *) ac_file_in="${ac_file}.in" ;;
3841 esac
3842
3843 echo creating $ac_file
3844
3845 rm -f conftest.frag conftest.in conftest.out
3846 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3847 cat $ac_file_inputs > conftest.in
3848
3849EOF
3850
3851# Transform confdefs.h into a sed script conftest.vals that substitutes
3852# the proper values into config.h.in to produce config.h. And first:
3853# Protect against being on the right side of a sed subst in config.status.
3854# Protect against being in an unquoted here document in config.status.
3855rm -f conftest.vals
3856cat > conftest.hdr <<\EOF
3857s/[\\&%]/\\&/g
3858s%[\\$`]%\\&%g
3859s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3860s%ac_d%ac_u%gp
3861s%ac_u%ac_e%gp
3862EOF
3863sed -n -f conftest.hdr confdefs.h > conftest.vals
3864rm -f conftest.hdr
3865
3866# This sed command replaces #undef with comments. This is necessary, for
3867# example, in the case of _POSIX_SOURCE, which is predefined and required
3868# on some systems where configure will not decide to define it.
3869cat >> conftest.vals <<\EOF
3870s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3871EOF
3872
3873# Break up conftest.vals because some shells have a limit on
3874# the size of here documents, and old seds have small limits too.
3875
3876rm -f conftest.tail
3877while :
3878do
3879 ac_lines=`grep -c . conftest.vals`
3880 # grep -c gives empty output for an empty file on some AIX systems.
3881 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3882 # Write a limited-size here document to conftest.frag.
3883 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3884 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3885 echo 'CEOF
3886 sed -f conftest.frag conftest.in > conftest.out
3887 rm -f conftest.in
3888 mv conftest.out conftest.in
3889' >> $CONFIG_STATUS
3890 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3891 rm -f conftest.vals
3892 mv conftest.tail conftest.vals
3893done
3894rm -f conftest.vals
3895
3896cat >> $CONFIG_STATUS <<\EOF
3897 rm -f conftest.frag conftest.h
3898 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3899 cat conftest.in >> conftest.h
3900 rm -f conftest.in
3901 if cmp -s $ac_file conftest.h 2>/dev/null; then
3902 echo "$ac_file is unchanged"
3903 rm -f conftest.h
3904 else
3905 # Remove last slash and all that follows it. Not all systems have dirname.
3906 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3907 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3908 # The file is in a subdirectory.
3909 test ! -d "$ac_dir" && mkdir "$ac_dir"
3910 fi
3911 rm -f $ac_file
3912 mv conftest.h $ac_file
3913 fi
3914fi; done
3915
3916EOF
3917cat >> $CONFIG_STATUS <<EOF
3918srcdir=${srcdir}
3919host=${host}
3920target=${target}
3921with_target_subdir=${with_target_subdir}
cd862df8 3922with_build_subdir=${with_build_subdir}
0bc0cd11
JL
3923with_multisubdir=${with_multisubdir}
3924ac_configure_args="--enable-multilib ${ac_configure_args}"
3925CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3343fdd2 3926ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
0bc0cd11
JL
3927libiberty_topdir=${libiberty_topdir}
3928
3929EOF
3930cat >> $CONFIG_STATUS <<\EOF
3931test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3932if test -n "$CONFIG_FILES"; then
cd862df8 3933 if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
0bc0cd11
JL
3934 # FIXME: We shouldn't need to set ac_file
3935 ac_file=Makefile
6706f116 3936 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
0bc0cd11
JL
3937 . ${libiberty_topdir}/config-ml.in
3938 fi
3939fi
3940exit 0
3941EOF
3942chmod +x $CONFIG_STATUS
3943rm -fr confdefs* $ac_clean_files
3944test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3945