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