source: branches/libc-0.6/src/binutils/libiberty/configure

Last change on this file was 1124, checked in by bird, 22 years ago

Regenerated with new autoconf (forced to use stable).

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