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