merge from gcc
[deliverable/binutils-gdb.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=xmalloc.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 # Figure out which version of pexecute to use.
2997 case "${host}" in
2998 *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;;
2999 *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;;
3000 *-*-msdos*) pexecute=pex-msdos.o ;;
3001 *-*-os2-emx*) pexecute=pex-os2.o ;;
3002 *) pexecute=pex-unix.o ;;
3003 esac
3004
3005
3006 for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
3007 do
3008 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3009 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3010 echo "configure:3011: checking for $ac_hdr" >&5
3011 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3012 echo $ac_n "(cached) $ac_c" 1>&6
3013 else
3014 cat > conftest.$ac_ext <<EOF
3015 #line 3016 "configure"
3016 #include "confdefs.h"
3017 #include <$ac_hdr>
3018 EOF
3019 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3020 { (eval echo configure:3021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3021 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3022 if test -z "$ac_err"; then
3023 rm -rf conftest*
3024 eval "ac_cv_header_$ac_safe=yes"
3025 else
3026 echo "$ac_err" >&5
3027 echo "configure: failed program was:" >&5
3028 cat conftest.$ac_ext >&5
3029 rm -rf conftest*
3030 eval "ac_cv_header_$ac_safe=no"
3031 fi
3032 rm -f conftest*
3033 fi
3034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3035 echo "$ac_t""yes" 1>&6
3036 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3037 cat >> confdefs.h <<EOF
3038 #define $ac_tr_hdr 1
3039 EOF
3040
3041 else
3042 echo "$ac_t""no" 1>&6
3043 fi
3044 done
3045
3046 for ac_func in getpagesize
3047 do
3048 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3049 echo "configure:3050: checking for $ac_func" >&5
3050 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3051 echo $ac_n "(cached) $ac_c" 1>&6
3052 else
3053 cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 /* System header to define __stub macros and hopefully few prototypes,
3057 which can conflict with char $ac_func(); below. */
3058 #include <assert.h>
3059 /* Override any gcc2 internal prototype to avoid an error. */
3060 /* We use char because int might match the return type of a gcc2
3061 builtin and then its argument prototype would still apply. */
3062 char $ac_func();
3063
3064 int main() {
3065
3066 /* The GNU C library defines this for functions which it implements
3067 to always fail with ENOSYS. Some functions are actually named
3068 something starting with __ and the normal name is an alias. */
3069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3070 choke me
3071 #else
3072 $ac_func();
3073 #endif
3074
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3078 rm -rf conftest*
3079 eval "ac_cv_func_$ac_func=yes"
3080 else
3081 echo "configure: failed program was:" >&5
3082 cat conftest.$ac_ext >&5
3083 rm -rf conftest*
3084 eval "ac_cv_func_$ac_func=no"
3085 fi
3086 rm -f conftest*
3087 fi
3088
3089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3090 echo "$ac_t""yes" 1>&6
3091 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3092 cat >> confdefs.h <<EOF
3093 #define $ac_tr_func 1
3094 EOF
3095
3096 else
3097 echo "$ac_t""no" 1>&6
3098 fi
3099 done
3100
3101 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3102 echo "configure:3103: checking for working mmap" >&5
3103 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3104 echo $ac_n "(cached) $ac_c" 1>&6
3105 else
3106 if test "$cross_compiling" = yes; then
3107 ac_cv_func_mmap_fixed_mapped=no
3108 else
3109 cat > conftest.$ac_ext <<EOF
3110 #line 3111 "configure"
3111 #include "confdefs.h"
3112
3113 /* Thanks to Mike Haertel and Jim Avera for this test.
3114 Here is a matrix of mmap possibilities:
3115 mmap private not fixed
3116 mmap private fixed at somewhere currently unmapped
3117 mmap private fixed at somewhere already mapped
3118 mmap shared not fixed
3119 mmap shared fixed at somewhere currently unmapped
3120 mmap shared fixed at somewhere already mapped
3121 For private mappings, we should verify that changes cannot be read()
3122 back from the file, nor mmap's back from the file at a different
3123 address. (There have been systems where private was not correctly
3124 implemented like the infamous i386 svr4.0, and systems where the
3125 VM page cache was not coherent with the filesystem buffer cache
3126 like early versions of FreeBSD and possibly contemporary NetBSD.)
3127 For shared mappings, we should conversely verify that changes get
3128 propogated back to all the places they're supposed to be.
3129
3130 Grep wants private fixed already mapped.
3131 The main things grep needs to know about mmap are:
3132 * does it exist and is it safe to write into the mmap'd area
3133 * how to use it (BSD variants) */
3134 #include <sys/types.h>
3135 #include <fcntl.h>
3136 #include <sys/mman.h>
3137
3138 #if HAVE_SYS_TYPES_H
3139 # include <sys/types.h>
3140 #endif
3141
3142 #if HAVE_STDLIB_H
3143 # include <stdlib.h>
3144 #endif
3145
3146 #if HAVE_SYS_STAT_H
3147 # include <sys/stat.h>
3148 #endif
3149
3150 #if HAVE_UNISTD_H
3151 # include <unistd.h>
3152 #endif
3153
3154 /* This mess was copied from the GNU getpagesize.h. */
3155 #ifndef HAVE_GETPAGESIZE
3156
3157 /* Assume that all systems that can run configure have sys/param.h. */
3158 # ifndef HAVE_SYS_PARAM_H
3159 # define HAVE_SYS_PARAM_H 1
3160 # endif
3161
3162 # ifdef _SC_PAGESIZE
3163 # define getpagesize() sysconf(_SC_PAGESIZE)
3164 # else /* no _SC_PAGESIZE */
3165 # ifdef HAVE_SYS_PARAM_H
3166 # include <sys/param.h>
3167 # ifdef EXEC_PAGESIZE
3168 # define getpagesize() EXEC_PAGESIZE
3169 # else /* no EXEC_PAGESIZE */
3170 # ifdef NBPG
3171 # define getpagesize() NBPG * CLSIZE
3172 # ifndef CLSIZE
3173 # define CLSIZE 1
3174 # endif /* no CLSIZE */
3175 # else /* no NBPG */
3176 # ifdef NBPC
3177 # define getpagesize() NBPC
3178 # else /* no NBPC */
3179 # ifdef PAGESIZE
3180 # define getpagesize() PAGESIZE
3181 # endif /* PAGESIZE */
3182 # endif /* no NBPC */
3183 # endif /* no NBPG */
3184 # endif /* no EXEC_PAGESIZE */
3185 # else /* no HAVE_SYS_PARAM_H */
3186 # define getpagesize() 8192 /* punt totally */
3187 # endif /* no HAVE_SYS_PARAM_H */
3188 # endif /* no _SC_PAGESIZE */
3189
3190 #endif /* no HAVE_GETPAGESIZE */
3191
3192 #ifdef __cplusplus
3193 extern "C" { void *malloc(unsigned); }
3194 #else
3195 char *malloc();
3196 #endif
3197
3198 int
3199 main()
3200 {
3201 char *data, *data2, *data3;
3202 int i, pagesize;
3203 int fd;
3204
3205 pagesize = getpagesize();
3206
3207 /*
3208 * First, make a file with some known garbage in it.
3209 */
3210 data = malloc(pagesize);
3211 if (!data)
3212 exit(1);
3213 for (i = 0; i < pagesize; ++i)
3214 *(data + i) = rand();
3215 umask(0);
3216 fd = creat("conftestmmap", 0600);
3217 if (fd < 0)
3218 exit(1);
3219 if (write(fd, data, pagesize) != pagesize)
3220 exit(1);
3221 close(fd);
3222
3223 /*
3224 * Next, try to mmap the file at a fixed address which
3225 * already has something else allocated at it. If we can,
3226 * also make sure that we see the same garbage.
3227 */
3228 fd = open("conftestmmap", O_RDWR);
3229 if (fd < 0)
3230 exit(1);
3231 data2 = malloc(2 * pagesize);
3232 if (!data2)
3233 exit(1);
3234 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3235 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3236 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3237 exit(1);
3238 for (i = 0; i < pagesize; ++i)
3239 if (*(data + i) != *(data2 + i))
3240 exit(1);
3241
3242 /*
3243 * Finally, make sure that changes to the mapped area
3244 * do not percolate back to the file as seen by read().
3245 * (This is a bug on some variants of i386 svr4.0.)
3246 */
3247 for (i = 0; i < pagesize; ++i)
3248 *(data2 + i) = *(data2 + i) + 1;
3249 data3 = malloc(pagesize);
3250 if (!data3)
3251 exit(1);
3252 if (read(fd, data3, pagesize) != pagesize)
3253 exit(1);
3254 for (i = 0; i < pagesize; ++i)
3255 if (*(data + i) != *(data3 + i))
3256 exit(1);
3257 close(fd);
3258 unlink("conftestmmap");
3259 exit(0);
3260 }
3261
3262 EOF
3263 if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3264 then
3265 ac_cv_func_mmap_fixed_mapped=yes
3266 else
3267 echo "configure: failed program was:" >&5
3268 cat conftest.$ac_ext >&5
3269 rm -fr conftest*
3270 ac_cv_func_mmap_fixed_mapped=no
3271 fi
3272 rm -fr conftest*
3273 fi
3274
3275 fi
3276
3277 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3278 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3279 cat >> confdefs.h <<\EOF
3280 #define HAVE_MMAP 1
3281 EOF
3282
3283 fi
3284
3285
3286 echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
3287 echo "configure:3288: checking for working strncmp" >&5
3288 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
3289 echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291 if test "$cross_compiling" = yes; then
3292 ac_cv_func_strncmp_works=no
3293 else
3294 cat > conftest.$ac_ext <<EOF
3295 #line 3296 "configure"
3296 #include "confdefs.h"
3297
3298 /* Test by Jim Wilson and Kaveh Ghazi.
3299 Check whether strncmp reads past the end of its string parameters. */
3300 #include <sys/types.h>
3301
3302 #ifdef HAVE_FCNTL_H
3303 #include <fcntl.h>
3304 #endif
3305
3306 #ifdef HAVE_SYS_MMAN_H
3307 #include <sys/mman.h>
3308 #endif
3309
3310 #ifndef MAP_ANON
3311 #ifdef MAP_ANONYMOUS
3312 #define MAP_ANON MAP_ANONYMOUS
3313 #else
3314 #define MAP_ANON MAP_FILE
3315 #endif
3316 #endif
3317
3318 #ifndef MAP_FILE
3319 #define MAP_FILE 0
3320 #endif
3321 #ifndef O_RDONLY
3322 #define O_RDONLY 0
3323 #endif
3324
3325 #define MAP_LEN 0x10000
3326
3327 main ()
3328 {
3329 #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
3330 char *p;
3331 int dev_zero;
3332
3333 dev_zero = open ("/dev/zero", O_RDONLY);
3334 if (dev_zero < 0)
3335 exit (1);
3336
3337 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
3338 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
3339 if (p == (char *)-1)
3340 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
3341 MAP_ANON|MAP_PRIVATE, -1, 0);
3342 if (p == (char *)-1)
3343 exit (2);
3344 else
3345 {
3346 char *string = "__si_type_info";
3347 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
3348 char *r = (char *) p + 0xe;
3349
3350 strcpy (q, string);
3351 strcpy (r, string);
3352 strncmp (r, q, 14);
3353 }
3354 #endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
3355 exit (0);
3356 }
3357
3358 EOF
3359 if { (eval echo configure:3360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3360 then
3361 ac_cv_func_strncmp_works=yes
3362 else
3363 echo "configure: failed program was:" >&5
3364 cat conftest.$ac_ext >&5
3365 rm -fr conftest*
3366 ac_cv_func_strncmp_works=no
3367 fi
3368 rm -fr conftest*
3369 fi
3370
3371 rm -f core core.* *.core
3372 fi
3373
3374 echo "$ac_t""$ac_cv_func_strncmp_works" 1>&6
3375 if test $ac_cv_func_strncmp_works = no ; then
3376 LIBOBJS="$LIBOBJS strncmp.o"
3377 fi
3378
3379
3380 # Install a library built with a cross compiler in $(tooldir) rather
3381 # than $(libdir).
3382 if test -z "${with_cross_host}"; then
3383 INSTALL_DEST=libdir
3384 else
3385 INSTALL_DEST=tooldir
3386 fi
3387
3388
3389 # We need multilib support, but only if configuring for the target.
3390 trap '' 1 2 15
3391 cat > confcache <<\EOF
3392 # This file is a shell script that caches the results of configure
3393 # tests run on this system so they can be shared between configure
3394 # scripts and configure runs. It is not useful on other systems.
3395 # If it contains results you don't want to keep, you may remove or edit it.
3396 #
3397 # By default, configure uses ./config.cache as the cache file,
3398 # creating it if it does not exist already. You can give configure
3399 # the --cache-file=FILE option to use a different cache file; that is
3400 # what configure does when it calls configure scripts in
3401 # subdirectories, so they share the cache.
3402 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3403 # config.status only pays attention to the cache file if you give it the
3404 # --recheck option to rerun configure.
3405 #
3406 EOF
3407 # The following way of writing the cache mishandles newlines in values,
3408 # but we know of no workaround that is simple, portable, and efficient.
3409 # So, don't put newlines in cache variables' values.
3410 # Ultrix sh set writes to stderr and can't be redirected directly,
3411 # and sets the high bit in the cache file unless we assign to the vars.
3412 (set) 2>&1 |
3413 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3414 *ac_space=\ *)
3415 # `set' does not quote correctly, so add quotes (double-quote substitution
3416 # turns \\\\ into \\, and sed turns \\ into \).
3417 sed -n \
3418 -e "s/'/'\\\\''/g" \
3419 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3420 ;;
3421 *)
3422 # `set' quotes correctly as required by POSIX, so do not add quotes.
3423 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3424 ;;
3425 esac >> confcache
3426 if cmp -s $cache_file confcache; then
3427 :
3428 else
3429 if test -w $cache_file; then
3430 echo "updating cache $cache_file"
3431 cat confcache > $cache_file
3432 else
3433 echo "not updating unwritable cache $cache_file"
3434 fi
3435 fi
3436 rm -f confcache
3437
3438 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3439
3440 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3441 # Let make expand exec_prefix.
3442 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3443
3444 # Any assignment to VPATH causes Sun make to only execute
3445 # the first set of double-colon rules, so remove it if not needed.
3446 # If there is a colon in the path, we need to keep it.
3447 if test "x$srcdir" = x.; then
3448 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3449 fi
3450
3451 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3452
3453 DEFS=-DHAVE_CONFIG_H
3454
3455 # Without the "./", some shells look in PATH for config.status.
3456 : ${CONFIG_STATUS=./config.status}
3457
3458 echo creating $CONFIG_STATUS
3459 rm -f $CONFIG_STATUS
3460 cat > $CONFIG_STATUS <<EOF
3461 #! /bin/sh
3462 # Generated automatically by configure.
3463 # Run this file to recreate the current configuration.
3464 # This directory was configured as follows,
3465 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3466 #
3467 # $0 $ac_configure_args
3468 #
3469 # Compiler output produced by configure, useful for debugging
3470 # configure, is in ./config.log if it exists.
3471
3472 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3473 for ac_option
3474 do
3475 case "\$ac_option" in
3476 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3477 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3478 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3479 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3480 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3481 exit 0 ;;
3482 -help | --help | --hel | --he | --h)
3483 echo "\$ac_cs_usage"; exit 0 ;;
3484 *) echo "\$ac_cs_usage"; exit 1 ;;
3485 esac
3486 done
3487
3488 ac_given_srcdir=$srcdir
3489 ac_given_INSTALL="$INSTALL"
3490
3491 trap 'rm -fr `echo "Makefile testsuite/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3492 EOF
3493 cat >> $CONFIG_STATUS <<EOF
3494
3495 # Protect against being on the right side of a sed subst in config.status.
3496 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3497 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3498 $ac_vpsub
3499 $extrasub
3500 s%@SHELL@%$SHELL%g
3501 s%@CFLAGS@%$CFLAGS%g
3502 s%@CPPFLAGS@%$CPPFLAGS%g
3503 s%@CXXFLAGS@%$CXXFLAGS%g
3504 s%@FFLAGS@%$FFLAGS%g
3505 s%@DEFS@%$DEFS%g
3506 s%@LDFLAGS@%$LDFLAGS%g
3507 s%@LIBS@%$LIBS%g
3508 s%@exec_prefix@%$exec_prefix%g
3509 s%@prefix@%$prefix%g
3510 s%@program_transform_name@%$program_transform_name%g
3511 s%@bindir@%$bindir%g
3512 s%@sbindir@%$sbindir%g
3513 s%@libexecdir@%$libexecdir%g
3514 s%@datadir@%$datadir%g
3515 s%@sysconfdir@%$sysconfdir%g
3516 s%@sharedstatedir@%$sharedstatedir%g
3517 s%@localstatedir@%$localstatedir%g
3518 s%@libdir@%$libdir%g
3519 s%@includedir@%$includedir%g
3520 s%@oldincludedir@%$oldincludedir%g
3521 s%@infodir@%$infodir%g
3522 s%@mandir@%$mandir%g
3523 s%@MAINT@%$MAINT%g
3524 s%@NOTMAINT@%$NOTMAINT%g
3525 s%@MAKEINFO@%$MAKEINFO%g
3526 s%@BUILD_INFO@%$BUILD_INFO%g
3527 s%@PERL@%$PERL%g
3528 s%@HAVE_PERL@%$HAVE_PERL%g
3529 s%@host@%$host%g
3530 s%@host_alias@%$host_alias%g
3531 s%@host_cpu@%$host_cpu%g
3532 s%@host_vendor@%$host_vendor%g
3533 s%@host_os@%$host_os%g
3534 s%@build@%$build%g
3535 s%@build_alias@%$build_alias%g
3536 s%@build_cpu@%$build_cpu%g
3537 s%@build_vendor@%$build_vendor%g
3538 s%@build_os@%$build_os%g
3539 s%@AR@%$AR%g
3540 s%@RANLIB@%$RANLIB%g
3541 s%@CC@%$CC%g
3542 s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g
3543 s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
3544 s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
3545 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3546 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3547 s%@INSTALL_DATA@%$INSTALL_DATA%g
3548 /@host_makefile_frag@/r $host_makefile_frag
3549 s%@host_makefile_frag@%%g
3550 s%@CPP@%$CPP%g
3551 s%@CHECK@%$CHECK%g
3552 s%@target_header_dir@%$target_header_dir%g
3553 s%@LIBOBJS@%$LIBOBJS%g
3554 s%@pexecute@%$pexecute%g
3555 s%@INSTALL_DEST@%$INSTALL_DEST%g
3556
3557 CEOF
3558 EOF
3559
3560 cat >> $CONFIG_STATUS <<\EOF
3561
3562 # Split the substitutions into bite-sized pieces for seds with
3563 # small command number limits, like on Digital OSF/1 and HP-UX.
3564 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3565 ac_file=1 # Number of current file.
3566 ac_beg=1 # First line for current file.
3567 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3568 ac_more_lines=:
3569 ac_sed_cmds=""
3570 while $ac_more_lines; do
3571 if test $ac_beg -gt 1; then
3572 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3573 else
3574 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3575 fi
3576 if test ! -s conftest.s$ac_file; then
3577 ac_more_lines=false
3578 rm -f conftest.s$ac_file
3579 else
3580 if test -z "$ac_sed_cmds"; then
3581 ac_sed_cmds="sed -f conftest.s$ac_file"
3582 else
3583 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3584 fi
3585 ac_file=`expr $ac_file + 1`
3586 ac_beg=$ac_end
3587 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3588 fi
3589 done
3590 if test -z "$ac_sed_cmds"; then
3591 ac_sed_cmds=cat
3592 fi
3593 EOF
3594
3595 cat >> $CONFIG_STATUS <<EOF
3596
3597 CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
3598 EOF
3599 cat >> $CONFIG_STATUS <<\EOF
3600 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3601 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3602 case "$ac_file" in
3603 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3604 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3605 *) ac_file_in="${ac_file}.in" ;;
3606 esac
3607
3608 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3609
3610 # Remove last slash and all that follows it. Not all systems have dirname.
3611 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3612 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3613 # The file is in a subdirectory.
3614 test ! -d "$ac_dir" && mkdir "$ac_dir"
3615 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3616 # A "../" for each directory in $ac_dir_suffix.
3617 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3618 else
3619 ac_dir_suffix= ac_dots=
3620 fi
3621
3622 case "$ac_given_srcdir" in
3623 .) srcdir=.
3624 if test -z "$ac_dots"; then top_srcdir=.
3625 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3626 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3627 *) # Relative path.
3628 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3629 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3630 esac
3631
3632 case "$ac_given_INSTALL" in
3633 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3634 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3635 esac
3636
3637 echo creating "$ac_file"
3638 rm -f "$ac_file"
3639 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3640 case "$ac_file" in
3641 *Makefile*) ac_comsub="1i\\
3642 # $configure_input" ;;
3643 *) ac_comsub= ;;
3644 esac
3645
3646 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3647 sed -e "$ac_comsub
3648 s%@configure_input@%$configure_input%g
3649 s%@srcdir@%$srcdir%g
3650 s%@top_srcdir@%$top_srcdir%g
3651 s%@INSTALL@%$INSTALL%g
3652 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3653 fi; done
3654 rm -f conftest.s*
3655
3656 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3657 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3658 #
3659 # ac_d sets the value in "#define NAME VALUE" lines.
3660 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3661 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3662 ac_dC='\3'
3663 ac_dD='%g'
3664 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3665 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3666 ac_uB='\([ ]\)%\1#\2define\3'
3667 ac_uC=' '
3668 ac_uD='\4%g'
3669 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3670 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3671 ac_eB='$%\1#\2define\3'
3672 ac_eC=' '
3673 ac_eD='%g'
3674
3675 if test "${CONFIG_HEADERS+set}" != set; then
3676 EOF
3677 cat >> $CONFIG_STATUS <<EOF
3678 CONFIG_HEADERS="config.h:config.in"
3679 EOF
3680 cat >> $CONFIG_STATUS <<\EOF
3681 fi
3682 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3683 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3684 case "$ac_file" in
3685 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3686 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3687 *) ac_file_in="${ac_file}.in" ;;
3688 esac
3689
3690 echo creating $ac_file
3691
3692 rm -f conftest.frag conftest.in conftest.out
3693 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3694 cat $ac_file_inputs > conftest.in
3695
3696 EOF
3697
3698 # Transform confdefs.h into a sed script conftest.vals that substitutes
3699 # the proper values into config.h.in to produce config.h. And first:
3700 # Protect against being on the right side of a sed subst in config.status.
3701 # Protect against being in an unquoted here document in config.status.
3702 rm -f conftest.vals
3703 cat > conftest.hdr <<\EOF
3704 s/[\\&%]/\\&/g
3705 s%[\\$`]%\\&%g
3706 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3707 s%ac_d%ac_u%gp
3708 s%ac_u%ac_e%gp
3709 EOF
3710 sed -n -f conftest.hdr confdefs.h > conftest.vals
3711 rm -f conftest.hdr
3712
3713 # This sed command replaces #undef with comments. This is necessary, for
3714 # example, in the case of _POSIX_SOURCE, which is predefined and required
3715 # on some systems where configure will not decide to define it.
3716 cat >> conftest.vals <<\EOF
3717 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3718 EOF
3719
3720 # Break up conftest.vals because some shells have a limit on
3721 # the size of here documents, and old seds have small limits too.
3722
3723 rm -f conftest.tail
3724 while :
3725 do
3726 ac_lines=`grep -c . conftest.vals`
3727 # grep -c gives empty output for an empty file on some AIX systems.
3728 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3729 # Write a limited-size here document to conftest.frag.
3730 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3731 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3732 echo 'CEOF
3733 sed -f conftest.frag conftest.in > conftest.out
3734 rm -f conftest.in
3735 mv conftest.out conftest.in
3736 ' >> $CONFIG_STATUS
3737 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3738 rm -f conftest.vals
3739 mv conftest.tail conftest.vals
3740 done
3741 rm -f conftest.vals
3742
3743 cat >> $CONFIG_STATUS <<\EOF
3744 rm -f conftest.frag conftest.h
3745 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3746 cat conftest.in >> conftest.h
3747 rm -f conftest.in
3748 if cmp -s $ac_file conftest.h 2>/dev/null; then
3749 echo "$ac_file is unchanged"
3750 rm -f conftest.h
3751 else
3752 # Remove last slash and all that follows it. Not all systems have dirname.
3753 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3754 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3755 # The file is in a subdirectory.
3756 test ! -d "$ac_dir" && mkdir "$ac_dir"
3757 fi
3758 rm -f $ac_file
3759 mv conftest.h $ac_file
3760 fi
3761 fi; done
3762
3763 EOF
3764 cat >> $CONFIG_STATUS <<EOF
3765 srcdir=${srcdir}
3766 host=${host}
3767 target=${target}
3768 with_target_subdir=${with_target_subdir}
3769 with_build_subdir=${with_build_subdir}
3770 with_multisubdir=${with_multisubdir}
3771 ac_configure_args="--enable-multilib ${ac_configure_args}"
3772 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3773 libiberty_topdir=${libiberty_topdir}
3774
3775 EOF
3776 cat >> $CONFIG_STATUS <<\EOF
3777 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3778 if test -n "$CONFIG_FILES"; then
3779 if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
3780 # FIXME: We shouldn't need to set ac_file
3781 ac_file=Makefile
3782 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
3783 . ${libiberty_topdir}/config-ml.in
3784 fi
3785 fi
3786 exit 0
3787 EOF
3788 chmod +x $CONFIG_STATUS
3789 rm -fr confdefs* $ac_clean_files
3790 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3791
This page took 0.155036 seconds and 5 git commands to generate.