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