source: trunk/src/gcc/libiberty/configure@ 80

Last change on this file since 80 was 80, checked in by bird, 22 years ago

Regenerated configure on OS/2.

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