source: trunk/src/binutils/libiberty/configure@ 607

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

Regenerated configure scripts.

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