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

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

Initial revision

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