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