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