Fix bug in sh_elf_reloc_loop
[deliverable/binutils-gdb.git] / binutils / configure
CommitLineData
252b5132
RH
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-shared[=PKGS] build shared libraries [default=yes]"
16ac_help="$ac_help
17 --enable-static[=PKGS] build static libraries [default=yes]"
18ac_help="$ac_help
19 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
20ac_help="$ac_help
21 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
22ac_help="$ac_help
a74801ba 23 --disable-libtool-lock avoid locking (might break parallel builds)"
252b5132
RH
24ac_help="$ac_help
25 --enable-targets alternative target configurations"
26ac_help="$ac_help
27 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
a2d91340
AC
28ac_help="$ac_help
29 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
252b5132
RH
30ac_help="$ac_help
31 --disable-nls do not use Native Language Support"
32ac_help="$ac_help
33 --with-included-gettext use the GNU gettext library included here"
34ac_help="$ac_help
35 --enable-maintainer-mode enable make rules and dependencies not useful
36 (and sometimes confusing) to the casual installer"
37
38# Initialize some variables set by options.
39# The variables have the same names as the options, with
40# dashes changed to underlines.
41build=NONE
42cache_file=./config.cache
43exec_prefix=NONE
44host=NONE
45no_create=
46nonopt=NONE
47no_recursion=
48prefix=NONE
49program_prefix=NONE
50program_suffix=NONE
51program_transform_name=s,x,x,
52silent=
53site=
f353eb8a 54sitefile=
252b5132
RH
55srcdir=
56target=NONE
57verbose=
58x_includes=NONE
59x_libraries=NONE
60bindir='${exec_prefix}/bin'
61sbindir='${exec_prefix}/sbin'
62libexecdir='${exec_prefix}/libexec'
63datadir='${prefix}/share'
64sysconfdir='${prefix}/etc'
65sharedstatedir='${prefix}/com'
66localstatedir='${prefix}/var'
67libdir='${exec_prefix}/lib'
68includedir='${prefix}/include'
69oldincludedir='/usr/include'
70infodir='${prefix}/info'
71mandir='${prefix}/man'
72
73# Initialize some other variables.
74subdirs=
75MFLAGS= MAKEFLAGS=
76SHELL=${CONFIG_SHELL-/bin/sh}
77# Maximum number of lines to put in a shell here document.
78ac_max_here_lines=12
79
80ac_prev=
81for ac_option
82do
83
84 # If the previous option needs an argument, assign it.
85 if test -n "$ac_prev"; then
86 eval "$ac_prev=\$ac_option"
87 ac_prev=
88 continue
89 fi
90
91 case "$ac_option" in
92 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
93 *) ac_optarg= ;;
94 esac
95
96 # Accept the important Cygnus configure options, so we can diagnose typos.
97
98 case "$ac_option" in
99
100 -bindir | --bindir | --bindi | --bind | --bin | --bi)
101 ac_prev=bindir ;;
102 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
103 bindir="$ac_optarg" ;;
104
105 -build | --build | --buil | --bui | --bu)
106 ac_prev=build ;;
107 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
108 build="$ac_optarg" ;;
109
110 -cache-file | --cache-file | --cache-fil | --cache-fi \
111 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
112 ac_prev=cache_file ;;
113 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
114 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
115 cache_file="$ac_optarg" ;;
116
117 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
118 ac_prev=datadir ;;
119 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
120 | --da=*)
121 datadir="$ac_optarg" ;;
122
123 -disable-* | --disable-*)
124 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
125 # Reject names that are not valid shell variable names.
126 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
127 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
128 fi
129 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130 eval "enable_${ac_feature}=no" ;;
131
132 -enable-* | --enable-*)
133 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
134 # Reject names that are not valid shell variable names.
135 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
136 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
137 fi
138 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
139 case "$ac_option" in
140 *=*) ;;
141 *) ac_optarg=yes ;;
142 esac
143 eval "enable_${ac_feature}='$ac_optarg'" ;;
144
145 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
146 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
147 | --exec | --exe | --ex)
148 ac_prev=exec_prefix ;;
149 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
150 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
151 | --exec=* | --exe=* | --ex=*)
152 exec_prefix="$ac_optarg" ;;
153
154 -gas | --gas | --ga | --g)
155 # Obsolete; use --with-gas.
156 with_gas=yes ;;
157
158 -help | --help | --hel | --he)
159 # Omit some internal or obsolete options to make the list less imposing.
160 # This message is too long to be a string in the A/UX 3.1 sh.
161 cat << EOF
162Usage: configure [options] [host]
163Options: [defaults in brackets after descriptions]
164Configuration:
165 --cache-file=FILE cache test results in FILE
166 --help print this message
167 --no-create do not create output files
168 --quiet, --silent do not print \`checking...' messages
f353eb8a 169 --site-file=FILE use FILE as the site file
252b5132
RH
170 --version print the version of autoconf that created configure
171Directory and file names:
172 --prefix=PREFIX install architecture-independent files in PREFIX
173 [$ac_default_prefix]
174 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
175 [same as prefix]
176 --bindir=DIR user executables in DIR [EPREFIX/bin]
177 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
178 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
179 --datadir=DIR read-only architecture-independent data in DIR
180 [PREFIX/share]
181 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
182 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 [PREFIX/com]
184 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
185 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
186 --includedir=DIR C header files in DIR [PREFIX/include]
187 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
188 --infodir=DIR info documentation in DIR [PREFIX/info]
189 --mandir=DIR man documentation in DIR [PREFIX/man]
190 --srcdir=DIR find the sources in DIR [configure dir or ..]
191 --program-prefix=PREFIX prepend PREFIX to installed program names
192 --program-suffix=SUFFIX append SUFFIX to installed program names
193 --program-transform-name=PROGRAM
194 run sed PROGRAM on installed program names
195EOF
196 cat << EOF
197Host type:
198 --build=BUILD configure for building on BUILD [BUILD=HOST]
199 --host=HOST configure for HOST [guessed]
200 --target=TARGET configure for TARGET [TARGET=HOST]
201Features and packages:
202 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
203 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
204 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
205 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
206 --x-includes=DIR X include files are in DIR
207 --x-libraries=DIR X library files are in DIR
208EOF
209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
211 fi
212 exit 0 ;;
213
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
218
219 -includedir | --includedir | --includedi | --included | --include \
220 | --includ | --inclu | --incl | --inc)
221 ac_prev=includedir ;;
222 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223 | --includ=* | --inclu=* | --incl=* | --inc=*)
224 includedir="$ac_optarg" ;;
225
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
230
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
235
236 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237 | --libexe | --libex | --libe)
238 ac_prev=libexecdir ;;
239 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240 | --libexe=* | --libex=* | --libe=*)
241 libexecdir="$ac_optarg" ;;
242
243 -localstatedir | --localstatedir | --localstatedi | --localstated \
244 | --localstate | --localstat | --localsta | --localst \
245 | --locals | --local | --loca | --loc | --lo)
246 ac_prev=localstatedir ;;
247 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250 localstatedir="$ac_optarg" ;;
251
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
256
257 -nfp | --nfp | --nf)
258 # Obsolete; use --without-fp.
259 with_fp=no ;;
260
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
264
265 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267 no_recursion=yes ;;
268
269 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271 | --oldin | --oldi | --old | --ol | --o)
272 ac_prev=oldincludedir ;;
273 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276 oldincludedir="$ac_optarg" ;;
277
278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
282
283 -program-prefix | --program-prefix | --program-prefi | --program-pref \
284 | --program-pre | --program-pr | --program-p)
285 ac_prev=program_prefix ;;
286 -program-prefix=* | --program-prefix=* | --program-prefi=* \
287 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288 program_prefix="$ac_optarg" ;;
289
290 -program-suffix | --program-suffix | --program-suffi | --program-suff \
291 | --program-suf | --program-su | --program-s)
292 ac_prev=program_suffix ;;
293 -program-suffix=* | --program-suffix=* | --program-suffi=* \
294 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295 program_suffix="$ac_optarg" ;;
296
297 -program-transform-name | --program-transform-name \
298 | --program-transform-nam | --program-transform-na \
299 | --program-transform-n | --program-transform- \
300 | --program-transform | --program-transfor \
301 | --program-transfo | --program-transf \
302 | --program-trans | --program-tran \
303 | --progr-tra | --program-tr | --program-t)
304 ac_prev=program_transform_name ;;
305 -program-transform-name=* | --program-transform-name=* \
306 | --program-transform-nam=* | --program-transform-na=* \
307 | --program-transform-n=* | --program-transform-=* \
308 | --program-transform=* | --program-transfor=* \
309 | --program-transfo=* | --program-transf=* \
310 | --program-trans=* | --program-tran=* \
311 | --progr-tra=* | --program-tr=* | --program-t=*)
312 program_transform_name="$ac_optarg" ;;
313
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
317
318 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 ac_prev=sbindir ;;
320 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 | --sbi=* | --sb=*)
322 sbindir="$ac_optarg" ;;
323
324 -sharedstatedir | --sharedstatedir | --sharedstatedi \
325 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326 | --sharedst | --shareds | --shared | --share | --shar \
327 | --sha | --sh)
328 ac_prev=sharedstatedir ;;
329 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 | --sha=* | --sh=*)
333 sharedstatedir="$ac_optarg" ;;
334
335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
339
f353eb8a
ILT
340 -site-file | --site-file | --site-fil | --site-fi | --site-f)
341 ac_prev=sitefile ;;
342 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
343 sitefile="$ac_optarg" ;;
344
252b5132
RH
345 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
346 ac_prev=srcdir ;;
347 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
348 srcdir="$ac_optarg" ;;
349
350 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
351 | --syscon | --sysco | --sysc | --sys | --sy)
352 ac_prev=sysconfdir ;;
353 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
354 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
355 sysconfdir="$ac_optarg" ;;
356
357 -target | --target | --targe | --targ | --tar | --ta | --t)
358 ac_prev=target ;;
359 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
360 target="$ac_optarg" ;;
361
362 -v | -verbose | --verbose | --verbos | --verbo | --verb)
363 verbose=yes ;;
364
365 -version | --version | --versio | --versi | --vers)
366 echo "configure generated by autoconf version 2.13"
367 exit 0 ;;
368
369 -with-* | --with-*)
370 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
371 # Reject names that are not valid shell variable names.
372 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374 fi
375 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 case "$ac_option" in
377 *=*) ;;
378 *) ac_optarg=yes ;;
379 esac
380 eval "with_${ac_package}='$ac_optarg'" ;;
381
382 -without-* | --without-*)
383 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
384 # Reject names that are not valid shell variable names.
385 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
386 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
387 fi
388 ac_package=`echo $ac_package| sed 's/-/_/g'`
389 eval "with_${ac_package}=no" ;;
390
391 --x)
392 # Obsolete; use --with-x.
393 with_x=yes ;;
394
395 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
396 | --x-incl | --x-inc | --x-in | --x-i)
397 ac_prev=x_includes ;;
398 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
399 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
400 x_includes="$ac_optarg" ;;
401
402 -x-libraries | --x-libraries | --x-librarie | --x-librari \
403 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
404 ac_prev=x_libraries ;;
405 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
406 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
407 x_libraries="$ac_optarg" ;;
408
409 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
410 ;;
411
412 *)
413 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
414 echo "configure: warning: $ac_option: invalid host type" 1>&2
415 fi
416 if test "x$nonopt" != xNONE; then
417 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
418 fi
419 nonopt="$ac_option"
420 ;;
421
422 esac
423done
424
425if test -n "$ac_prev"; then
426 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
427fi
428
429trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
430
431# File descriptor usage:
432# 0 standard input
433# 1 file creation
434# 2 errors and warnings
435# 3 some systems may open it to /dev/tty
436# 4 used on the Kubota Titan
437# 6 checking for... messages and results
438# 5 compiler messages saved in config.log
439if test "$silent" = yes; then
440 exec 6>/dev/null
441else
442 exec 6>&1
443fi
444exec 5>./config.log
445
446echo "\
447This file contains any messages produced by compilers while
448running configure, to aid debugging if configure makes a mistake.
449" 1>&5
450
451# Strip out --no-create and --no-recursion so they do not pile up.
452# Also quote any args containing shell metacharacters.
453ac_configure_args=
454for ac_arg
455do
456 case "$ac_arg" in
457 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
458 | --no-cr | --no-c) ;;
459 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
460 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
461 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
462 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
463 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
464 esac
465done
466
467# NLS nuisances.
468# Only set these to C if already set. These must not be set unconditionally
469# because not all systems understand e.g. LANG=C (notably SCO).
470# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
471# Non-C LC_CTYPE values break the ctype check.
472if test "${LANG+set}" = set; then LANG=C; export LANG; fi
473if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
474if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
475if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
476
477# confdefs.h avoids OS command line length limits that DEFS can exceed.
478rm -rf conftest* confdefs.h
479# AIX cpp loses on an empty file, so make sure it contains at least a newline.
480echo > confdefs.h
481
482# A filename unique to this package, relative to the directory that
483# configure is in, which we can look for to find out if srcdir is correct.
484ac_unique_file=ar.c
485
486# Find the source files, if location was not specified.
487if test -z "$srcdir"; then
488 ac_srcdir_defaulted=yes
489 # Try the directory containing this script, then its parent.
490 ac_prog=$0
491 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
492 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
493 srcdir=$ac_confdir
494 if test ! -r $srcdir/$ac_unique_file; then
495 srcdir=..
496 fi
497else
498 ac_srcdir_defaulted=no
499fi
500if test ! -r $srcdir/$ac_unique_file; then
501 if test "$ac_srcdir_defaulted" = yes; then
502 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
503 else
504 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
505 fi
506fi
507srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
508
509# Prefer explicitly selected file to automatically selected ones.
f353eb8a
ILT
510if test -z "$sitefile"; then
511 if test -z "$CONFIG_SITE"; then
512 if test "x$prefix" != xNONE; then
513 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
514 else
515 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
516 fi
252b5132 517 fi
f353eb8a
ILT
518else
519 CONFIG_SITE="$sitefile"
252b5132
RH
520fi
521for ac_site_file in $CONFIG_SITE; do
522 if test -r "$ac_site_file"; then
523 echo "loading site script $ac_site_file"
524 . "$ac_site_file"
525 fi
526done
527
528if test -r "$cache_file"; then
529 echo "loading cache $cache_file"
530 . $cache_file
531else
532 echo "creating cache $cache_file"
533 > $cache_file
534fi
535
536ac_ext=c
537# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
538ac_cpp='$CPP $CPPFLAGS'
539ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
540ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
541cross_compiling=$ac_cv_prog_cc_cross
542
543ac_exeext=
544ac_objext=o
545if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
546 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
547 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
548 ac_n= ac_c='
549' ac_t=' '
550 else
551 ac_n=-n ac_c= ac_t=
552 fi
553else
554 ac_n= ac_c='\c' ac_t=
555fi
556
557
558
559ac_aux_dir=
560for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
561 if test -f $ac_dir/install-sh; then
562 ac_aux_dir=$ac_dir
563 ac_install_sh="$ac_aux_dir/install-sh -c"
564 break
565 elif test -f $ac_dir/install.sh; then
566 ac_aux_dir=$ac_dir
567 ac_install_sh="$ac_aux_dir/install.sh -c"
568 break
569 fi
570done
571if test -z "$ac_aux_dir"; then
572 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
573fi
574ac_config_guess=$ac_aux_dir/config.guess
575ac_config_sub=$ac_aux_dir/config.sub
576ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
577
578
579# Do some error checking and defaulting for the host and target type.
580# The inputs are:
581# configure --host=HOST --target=TARGET --build=BUILD NONOPT
582#
583# The rules are:
584# 1. You are not allowed to specify --host, --target, and nonopt at the
585# same time.
586# 2. Host defaults to nonopt.
587# 3. If nonopt is not specified, then host defaults to the current host,
588# as determined by config.guess.
589# 4. Target and build default to nonopt.
590# 5. If nonopt is not specified, then target and build default to host.
591
592# The aliases save the names the user supplied, while $host etc.
593# will get canonicalized.
594case $host---$target---$nonopt in
595NONE---*---* | *---NONE---* | *---*---NONE) ;;
596*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
597esac
598
599
600# Make sure we can run config.sub.
601if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
602else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
603fi
604
605echo $ac_n "checking host system type""... $ac_c" 1>&6
a2d91340 606echo "configure:607: checking host system type" >&5
252b5132
RH
607
608host_alias=$host
609case "$host_alias" in
610NONE)
611 case $nonopt in
612 NONE)
613 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
614 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
615 fi ;;
616 *) host_alias=$nonopt ;;
617 esac ;;
618esac
619
620host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
621host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
622host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
623host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
624echo "$ac_t""$host" 1>&6
625
626echo $ac_n "checking target system type""... $ac_c" 1>&6
a2d91340 627echo "configure:628: checking target system type" >&5
252b5132
RH
628
629target_alias=$target
630case "$target_alias" in
631NONE)
632 case $nonopt in
633 NONE) target_alias=$host_alias ;;
634 *) target_alias=$nonopt ;;
635 esac ;;
636esac
637
638target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
639target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
640target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
641target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
642echo "$ac_t""$target" 1>&6
643
644echo $ac_n "checking build system type""... $ac_c" 1>&6
a2d91340 645echo "configure:646: checking build system type" >&5
252b5132
RH
646
647build_alias=$build
648case "$build_alias" in
649NONE)
650 case $nonopt in
651 NONE) build_alias=$host_alias ;;
652 *) build_alias=$nonopt ;;
653 esac ;;
654esac
655
656build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
657build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
658build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
659build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
660echo "$ac_t""$build" 1>&6
661
662test "$host_alias" != "$target_alias" &&
663 test "$program_prefix$program_suffix$program_transform_name" = \
664 NONENONEs,x,x, &&
665 program_prefix=${target_alias}-
666
667
668# Find a good install program. We prefer a C program (faster),
669# so one script is as good as another. But avoid the broken or
670# incompatible versions:
671# SysV /etc/install, /usr/sbin/install
672# SunOS /usr/etc/install
673# IRIX /sbin/install
674# AIX /bin/install
675# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
676# AFS /usr/afsws/bin/install, which mishandles nonexistent args
677# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
678# ./install, which can be erroneously created by make from ./install.sh.
679echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
a2d91340 680echo "configure:681: checking for a BSD compatible install" >&5
252b5132
RH
681if test -z "$INSTALL"; then
682if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
683 echo $ac_n "(cached) $ac_c" 1>&6
684else
685 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
686 for ac_dir in $PATH; do
687 # Account for people who put trailing slashes in PATH elements.
688 case "$ac_dir/" in
689 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
690 *)
691 # OSF1 and SCO ODT 3.0 have their own names for install.
692 # Don't use installbsd from OSF since it installs stuff as root
693 # by default.
694 for ac_prog in ginstall scoinst install; do
695 if test -f $ac_dir/$ac_prog; then
696 if test $ac_prog = install &&
697 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
698 # AIX install. It has an incompatible calling convention.
699 :
700 else
701 ac_cv_path_install="$ac_dir/$ac_prog -c"
702 break 2
703 fi
704 fi
705 done
706 ;;
707 esac
708 done
709 IFS="$ac_save_IFS"
710
711fi
712 if test "${ac_cv_path_install+set}" = set; then
713 INSTALL="$ac_cv_path_install"
714 else
715 # As a last resort, use the slow shell script. We don't cache a
716 # path for INSTALL within a source directory, because that will
717 # break other packages using the cache if that directory is
718 # removed, or if the path is relative.
719 INSTALL="$ac_install_sh"
720 fi
721fi
722echo "$ac_t""$INSTALL" 1>&6
723
724# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
725# It thinks the first close brace ends the variable substitution.
726test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
727
728test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
729
730test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
731
732echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
a2d91340 733echo "configure:734: checking whether build environment is sane" >&5
252b5132
RH
734# Just in case
735sleep 1
736echo timestamp > conftestfile
737# Do `set' in a subshell so we don't clobber the current shell's
738# arguments. Must try -L first in case configure is actually a
739# symlink; some systems play weird games with the mod time of symlinks
740# (eg FreeBSD returns the mod time of the symlink's containing
741# directory).
742if (
743 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
744 if test "$*" = "X"; then
745 # -L didn't work.
746 set X `ls -t $srcdir/configure conftestfile`
747 fi
748 if test "$*" != "X $srcdir/configure conftestfile" \
749 && test "$*" != "X conftestfile $srcdir/configure"; then
750
751 # If neither matched, then we have a broken ls. This can happen
752 # if, for instance, CONFIG_SHELL is bash and it inherits a
753 # broken ls alias from the environment. This has actually
754 # happened. Such a system could not be considered "sane".
755 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
756alias in your environment" 1>&2; exit 1; }
757 fi
758
759 test "$2" = conftestfile
760 )
761then
762 # Ok.
763 :
764else
765 { echo "configure: error: newly created file is older than distributed files!
766Check your system clock" 1>&2; exit 1; }
767fi
768rm -f conftest*
769echo "$ac_t""yes" 1>&6
770if test "$program_transform_name" = s,x,x,; then
771 program_transform_name=
772else
773 # Double any \ or $. echo might interpret backslashes.
774 cat <<\EOF_SED > conftestsed
775s,\\,\\\\,g; s,\$,$$,g
776EOF_SED
777 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
778 rm -f conftestsed
779fi
780test "$program_prefix" != NONE &&
781 program_transform_name="s,^,${program_prefix},; $program_transform_name"
782# Use a double $ so make ignores it.
783test "$program_suffix" != NONE &&
784 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
785
786# sed with no file args requires a program.
787test "$program_transform_name" = "" && program_transform_name="s,x,x,"
788
789echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
a2d91340 790echo "configure:791: checking whether ${MAKE-make} sets \${MAKE}" >&5
252b5132
RH
791set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
792if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
793 echo $ac_n "(cached) $ac_c" 1>&6
794else
795 cat > conftestmake <<\EOF
796all:
797 @echo 'ac_maketemp="${MAKE}"'
798EOF
799# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
800eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
801if test -n "$ac_maketemp"; then
802 eval ac_cv_prog_make_${ac_make}_set=yes
803else
804 eval ac_cv_prog_make_${ac_make}_set=no
805fi
806rm -f conftestmake
807fi
808if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
809 echo "$ac_t""yes" 1>&6
810 SET_MAKE=
811else
812 echo "$ac_t""no" 1>&6
813 SET_MAKE="MAKE=${MAKE-make}"
814fi
815
816
817PACKAGE=binutils
818
bcef29e6 819VERSION=2.10.90
252b5132
RH
820
821if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
822 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
823fi
824cat >> confdefs.h <<EOF
825#define PACKAGE "$PACKAGE"
826EOF
827
828cat >> confdefs.h <<EOF
829#define VERSION "$VERSION"
830EOF
831
832
833
834missing_dir=`cd $ac_aux_dir && pwd`
835echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
a2d91340 836echo "configure:837: checking for working aclocal" >&5
252b5132
RH
837# Run test in a subshell; some versions of sh will print an error if
838# an executable is not found, even if stderr is redirected.
839# Redirect stdin to placate older versions of autoconf. Sigh.
840if (aclocal --version) < /dev/null > /dev/null 2>&1; then
841 ACLOCAL=aclocal
842 echo "$ac_t""found" 1>&6
843else
844 ACLOCAL="$missing_dir/missing aclocal"
845 echo "$ac_t""missing" 1>&6
846fi
847
848echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
a2d91340 849echo "configure:850: checking for working autoconf" >&5
252b5132
RH
850# Run test in a subshell; some versions of sh will print an error if
851# an executable is not found, even if stderr is redirected.
852# Redirect stdin to placate older versions of autoconf. Sigh.
853if (autoconf --version) < /dev/null > /dev/null 2>&1; then
854 AUTOCONF=autoconf
855 echo "$ac_t""found" 1>&6
856else
857 AUTOCONF="$missing_dir/missing autoconf"
858 echo "$ac_t""missing" 1>&6
859fi
860
861echo $ac_n "checking for working automake""... $ac_c" 1>&6
a2d91340 862echo "configure:863: checking for working automake" >&5
252b5132
RH
863# Run test in a subshell; some versions of sh will print an error if
864# an executable is not found, even if stderr is redirected.
865# Redirect stdin to placate older versions of autoconf. Sigh.
866if (automake --version) < /dev/null > /dev/null 2>&1; then
867 AUTOMAKE=automake
868 echo "$ac_t""found" 1>&6
869else
870 AUTOMAKE="$missing_dir/missing automake"
871 echo "$ac_t""missing" 1>&6
872fi
873
874echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
a2d91340 875echo "configure:876: checking for working autoheader" >&5
252b5132
RH
876# Run test in a subshell; some versions of sh will print an error if
877# an executable is not found, even if stderr is redirected.
878# Redirect stdin to placate older versions of autoconf. Sigh.
879if (autoheader --version) < /dev/null > /dev/null 2>&1; then
880 AUTOHEADER=autoheader
881 echo "$ac_t""found" 1>&6
882else
883 AUTOHEADER="$missing_dir/missing autoheader"
884 echo "$ac_t""missing" 1>&6
885fi
886
887echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
a2d91340 888echo "configure:889: checking for working makeinfo" >&5
252b5132
RH
889# Run test in a subshell; some versions of sh will print an error if
890# an executable is not found, even if stderr is redirected.
891# Redirect stdin to placate older versions of autoconf. Sigh.
892if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
893 MAKEINFO=makeinfo
894 echo "$ac_t""found" 1>&6
895else
896 MAKEINFO="$missing_dir/missing makeinfo"
897 echo "$ac_t""missing" 1>&6
898fi
899
900
901
902# Check whether --enable-shared or --disable-shared was given.
903if test "${enable_shared+set}" = set; then
904 enableval="$enable_shared"
905 p=${PACKAGE-default}
906case "$enableval" in
907yes) enable_shared=yes ;;
908no) enable_shared=no ;;
909*)
910 enable_shared=no
911 # Look at the argument we got. We use all the common list separators.
912 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
913 for pkg in $enableval; do
914 if test "X$pkg" = "X$p"; then
915 enable_shared=yes
916 fi
917 done
918 IFS="$ac_save_ifs"
919 ;;
920esac
921else
922 enable_shared=yes
923fi
924
925# Check whether --enable-static or --disable-static was given.
926if test "${enable_static+set}" = set; then
927 enableval="$enable_static"
928 p=${PACKAGE-default}
929case "$enableval" in
930yes) enable_static=yes ;;
931no) enable_static=no ;;
932*)
933 enable_static=no
934 # Look at the argument we got. We use all the common list separators.
935 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
936 for pkg in $enableval; do
937 if test "X$pkg" = "X$p"; then
938 enable_static=yes
939 fi
940 done
941 IFS="$ac_save_ifs"
942 ;;
943esac
944else
945 enable_static=yes
946fi
947
948# Check whether --enable-fast-install or --disable-fast-install was given.
949if test "${enable_fast_install+set}" = set; then
950 enableval="$enable_fast_install"
951 p=${PACKAGE-default}
952case "$enableval" in
953yes) enable_fast_install=yes ;;
954no) enable_fast_install=no ;;
955*)
956 enable_fast_install=no
957 # Look at the argument we got. We use all the common list separators.
958 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
959 for pkg in $enableval; do
960 if test "X$pkg" = "X$p"; then
961 enable_fast_install=yes
962 fi
963 done
964 IFS="$ac_save_ifs"
965 ;;
966esac
967else
968 enable_fast_install=yes
969fi
970
971# Extract the first word of "ranlib", so it can be a program name with args.
972set dummy ranlib; ac_word=$2
973echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 974echo "configure:975: checking for $ac_word" >&5
252b5132
RH
975if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
976 echo $ac_n "(cached) $ac_c" 1>&6
977else
978 if test -n "$RANLIB"; then
979 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
980else
981 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
982 ac_dummy="$PATH"
983 for ac_dir in $ac_dummy; do
984 test -z "$ac_dir" && ac_dir=.
985 if test -f $ac_dir/$ac_word; then
986 ac_cv_prog_RANLIB="ranlib"
987 break
988 fi
989 done
990 IFS="$ac_save_ifs"
991 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
992fi
993fi
994RANLIB="$ac_cv_prog_RANLIB"
995if test -n "$RANLIB"; then
996 echo "$ac_t""$RANLIB" 1>&6
997else
998 echo "$ac_t""no" 1>&6
999fi
1000
1001# Extract the first word of "gcc", so it can be a program name with args.
1002set dummy gcc; ac_word=$2
1003echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1004echo "configure:1005: checking for $ac_word" >&5
252b5132
RH
1005if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1006 echo $ac_n "(cached) $ac_c" 1>&6
1007else
1008 if test -n "$CC"; then
1009 ac_cv_prog_CC="$CC" # Let the user override the test.
1010else
1011 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1012 ac_dummy="$PATH"
1013 for ac_dir in $ac_dummy; do
1014 test -z "$ac_dir" && ac_dir=.
1015 if test -f $ac_dir/$ac_word; then
1016 ac_cv_prog_CC="gcc"
1017 break
1018 fi
1019 done
1020 IFS="$ac_save_ifs"
1021fi
1022fi
1023CC="$ac_cv_prog_CC"
1024if test -n "$CC"; then
1025 echo "$ac_t""$CC" 1>&6
1026else
1027 echo "$ac_t""no" 1>&6
1028fi
1029
1030if test -z "$CC"; then
1031 # Extract the first word of "cc", so it can be a program name with args.
1032set dummy cc; ac_word=$2
1033echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1034echo "configure:1035: checking for $ac_word" >&5
252b5132
RH
1035if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1036 echo $ac_n "(cached) $ac_c" 1>&6
1037else
1038 if test -n "$CC"; then
1039 ac_cv_prog_CC="$CC" # Let the user override the test.
1040else
1041 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1042 ac_prog_rejected=no
1043 ac_dummy="$PATH"
1044 for ac_dir in $ac_dummy; do
1045 test -z "$ac_dir" && ac_dir=.
1046 if test -f $ac_dir/$ac_word; then
1047 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1048 ac_prog_rejected=yes
1049 continue
1050 fi
1051 ac_cv_prog_CC="cc"
1052 break
1053 fi
1054 done
1055 IFS="$ac_save_ifs"
1056if test $ac_prog_rejected = yes; then
1057 # We found a bogon in the path, so make sure we never use it.
1058 set dummy $ac_cv_prog_CC
1059 shift
1060 if test $# -gt 0; then
1061 # We chose a different compiler from the bogus one.
1062 # However, it has the same basename, so the bogon will be chosen
1063 # first if we set CC to just the basename; use the full file name.
1064 shift
1065 set dummy "$ac_dir/$ac_word" "$@"
1066 shift
1067 ac_cv_prog_CC="$@"
1068 fi
1069fi
1070fi
1071fi
1072CC="$ac_cv_prog_CC"
1073if test -n "$CC"; then
1074 echo "$ac_t""$CC" 1>&6
1075else
1076 echo "$ac_t""no" 1>&6
1077fi
1078
1079 if test -z "$CC"; then
1080 case "`uname -s`" in
1081 *win32* | *WIN32*)
1082 # Extract the first word of "cl", so it can be a program name with args.
1083set dummy cl; ac_word=$2
1084echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1085echo "configure:1086: checking for $ac_word" >&5
252b5132
RH
1086if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1087 echo $ac_n "(cached) $ac_c" 1>&6
1088else
1089 if test -n "$CC"; then
1090 ac_cv_prog_CC="$CC" # Let the user override the test.
1091else
1092 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1093 ac_dummy="$PATH"
1094 for ac_dir in $ac_dummy; do
1095 test -z "$ac_dir" && ac_dir=.
1096 if test -f $ac_dir/$ac_word; then
1097 ac_cv_prog_CC="cl"
1098 break
1099 fi
1100 done
1101 IFS="$ac_save_ifs"
1102fi
1103fi
1104CC="$ac_cv_prog_CC"
1105if test -n "$CC"; then
1106 echo "$ac_t""$CC" 1>&6
1107else
1108 echo "$ac_t""no" 1>&6
1109fi
1110 ;;
1111 esac
1112 fi
1113 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1114fi
1115
1116echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
a2d91340 1117echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132
RH
1118
1119ac_ext=c
1120# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1121ac_cpp='$CPP $CPPFLAGS'
1122ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1123ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1124cross_compiling=$ac_cv_prog_cc_cross
1125
1126cat > conftest.$ac_ext << EOF
1127
a2d91340 1128#line 1129 "configure"
252b5132
RH
1129#include "confdefs.h"
1130
1131main(){return(0);}
1132EOF
a2d91340 1133if { (eval echo configure:1134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1134 ac_cv_prog_cc_works=yes
1135 # If we can't run a trivial program, we are probably using a cross compiler.
1136 if (./conftest; exit) 2>/dev/null; then
1137 ac_cv_prog_cc_cross=no
1138 else
1139 ac_cv_prog_cc_cross=yes
1140 fi
1141else
1142 echo "configure: failed program was:" >&5
1143 cat conftest.$ac_ext >&5
1144 ac_cv_prog_cc_works=no
1145fi
1146rm -fr conftest*
1147ac_ext=c
1148# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1149ac_cpp='$CPP $CPPFLAGS'
1150ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1151ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1152cross_compiling=$ac_cv_prog_cc_cross
1153
1154echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1155if test $ac_cv_prog_cc_works = no; then
1156 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1157fi
1158echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
a2d91340 1159echo "configure:1160: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
252b5132
RH
1160echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1161cross_compiling=$ac_cv_prog_cc_cross
1162
1163echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
a2d91340 1164echo "configure:1165: checking whether we are using GNU C" >&5
252b5132
RH
1165if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167else
1168 cat > conftest.c <<EOF
1169#ifdef __GNUC__
1170 yes;
1171#endif
1172EOF
a2d91340 1173if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
252b5132
RH
1174 ac_cv_prog_gcc=yes
1175else
1176 ac_cv_prog_gcc=no
1177fi
1178fi
1179
1180echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1181
1182if test $ac_cv_prog_gcc = yes; then
1183 GCC=yes
1184else
1185 GCC=
1186fi
1187
1188ac_test_CFLAGS="${CFLAGS+set}"
1189ac_save_CFLAGS="$CFLAGS"
1190CFLAGS=
1191echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
a2d91340 1192echo "configure:1193: checking whether ${CC-cc} accepts -g" >&5
252b5132
RH
1193if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1194 echo $ac_n "(cached) $ac_c" 1>&6
1195else
1196 echo 'void f(){}' > conftest.c
1197if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1198 ac_cv_prog_cc_g=yes
1199else
1200 ac_cv_prog_cc_g=no
1201fi
1202rm -f conftest*
1203
1204fi
1205
1206echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1207if test "$ac_test_CFLAGS" = set; then
1208 CFLAGS="$ac_save_CFLAGS"
1209elif test $ac_cv_prog_cc_g = yes; then
1210 if test "$GCC" = yes; then
1211 CFLAGS="-g -O2"
1212 else
1213 CFLAGS="-g"
1214 fi
1215else
1216 if test "$GCC" = yes; then
1217 CFLAGS="-O2"
1218 else
1219 CFLAGS=
1220 fi
1221fi
1222
1223# Check whether --with-gnu-ld or --without-gnu-ld was given.
1224if test "${with_gnu_ld+set}" = set; then
1225 withval="$with_gnu_ld"
1226 test "$withval" = no || with_gnu_ld=yes
1227else
1228 with_gnu_ld=no
1229fi
1230
1231ac_prog=ld
1232if test "$ac_cv_prog_gcc" = yes; then
1233 # Check if gcc -print-prog-name=ld gives a path.
1234 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
a2d91340 1235echo "configure:1236: checking for ld used by GCC" >&5
252b5132
RH
1236 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1237 case "$ac_prog" in
1238 # Accept absolute paths.
a74801ba 1239 [\\/]* | [A-Za-z]:[\\/]*)
252b5132
RH
1240 re_direlt='/[^/][^/]*/\.\./'
1241 # Canonicalize the path of ld
1242 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1243 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1244 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1245 done
1246 test -z "$LD" && LD="$ac_prog"
1247 ;;
1248 "")
1249 # If it fails, then pretend we aren't using GCC.
1250 ac_prog=ld
1251 ;;
1252 *)
1253 # If it is relative, then search for the first ld in PATH.
1254 with_gnu_ld=unknown
1255 ;;
1256 esac
1257elif test "$with_gnu_ld" = yes; then
1258 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
a2d91340 1259echo "configure:1260: checking for GNU ld" >&5
252b5132
RH
1260else
1261 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
a2d91340 1262echo "configure:1263: checking for non-GNU ld" >&5
252b5132
RH
1263fi
1264if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
1266else
1267 if test -z "$LD"; then
a74801ba 1268 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
1269 for ac_dir in $PATH; do
1270 test -z "$ac_dir" && ac_dir=.
a74801ba 1271 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
252b5132
RH
1272 ac_cv_path_LD="$ac_dir/$ac_prog"
1273 # Check to see if the program is GNU ld. I'd rather use --version,
1274 # but apparently some GNU ld's only accept -v.
1275 # Break only if it was the GNU/non-GNU ld that we prefer.
1276 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1277 test "$with_gnu_ld" != no && break
1278 else
1279 test "$with_gnu_ld" != yes && break
1280 fi
1281 fi
1282 done
1283 IFS="$ac_save_ifs"
1284else
1285 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1286fi
1287fi
1288
1289LD="$ac_cv_path_LD"
1290if test -n "$LD"; then
1291 echo "$ac_t""$LD" 1>&6
1292else
1293 echo "$ac_t""no" 1>&6
1294fi
1295test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
252b5132 1296echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
a2d91340 1297echo "configure:1298: checking if the linker ($LD) is GNU ld" >&5
252b5132
RH
1298if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1299 echo $ac_n "(cached) $ac_c" 1>&6
1300else
1301 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1302if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1303 ac_cv_prog_gnu_ld=yes
1304else
1305 ac_cv_prog_gnu_ld=no
1306fi
1307fi
1308
1309echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1310
1311
1312echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
a2d91340 1313echo "configure:1314: checking for BSD-compatible nm" >&5
252b5132
RH
1314if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1315 echo $ac_n "(cached) $ac_c" 1>&6
1316else
1317 if test -n "$NM"; then
1318 # Let the user override the test.
1319 ac_cv_path_NM="$NM"
1320else
a74801ba 1321 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
1322 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1323 test -z "$ac_dir" && ac_dir=.
a74801ba 1324 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
252b5132
RH
1325 # Check to see if the nm accepts a BSD-compat flag.
1326 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1327 # nm: unknown option "B" ignored
1328 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1329 ac_cv_path_NM="$ac_dir/nm -B"
1330 break
1331 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1332 ac_cv_path_NM="$ac_dir/nm -p"
1333 break
1334 else
1335 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1336 continue # so that we can try to find one that supports BSD flags
1337 fi
1338 fi
1339 done
1340 IFS="$ac_save_ifs"
1341 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1342fi
1343fi
1344
1345NM="$ac_cv_path_NM"
1346echo "$ac_t""$NM" 1>&6
1347
252b5132 1348echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
a2d91340 1349echo "configure:1350: checking whether ln -s works" >&5
252b5132
RH
1350if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1351 echo $ac_n "(cached) $ac_c" 1>&6
1352else
1353 rm -f conftestdata
1354if ln -s X conftestdata 2>/dev/null
1355then
1356 rm -f conftestdata
1357 ac_cv_prog_LN_S="ln -s"
1358else
1359 ac_cv_prog_LN_S=ln
1360fi
1361fi
1362LN_S="$ac_cv_prog_LN_S"
1363if test "$ac_cv_prog_LN_S" = "ln -s"; then
1364 echo "$ac_t""yes" 1>&6
1365else
1366 echo "$ac_t""no" 1>&6
1367fi
1368
252b5132 1369
a74801ba
ILT
1370case "$target" in
1371NONE) lt_target="$host" ;;
1372*) lt_target="$target" ;;
1373esac
252b5132
RH
1374
1375# Check for any special flags to pass to ltconfig.
1376libtool_flags="--cache-file=$cache_file"
1377test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1378test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1379test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
252b5132
RH
1380test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1381test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1382
a74801ba
ILT
1383
1384# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1385if test "${enable_libtool_lock+set}" = set; then
1386 enableval="$enable_libtool_lock"
1387 :
1388fi
1389
1390test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1391test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1392
252b5132
RH
1393# Some flags need to be propagated to the compiler or linker for good
1394# libtool support.
a74801ba 1395case "$lt_target" in
252b5132
RH
1396*-*-irix6*)
1397 # Find out which ABI we are using.
a2d91340
AC
1398 echo '#line 1399 "configure"' > conftest.$ac_ext
1399 if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
1400 case "`/usr/bin/file conftest.o`" in
1401 *32-bit*)
1402 LD="${LD-ld} -32"
1403 ;;
1404 *N32*)
1405 LD="${LD-ld} -n32"
1406 ;;
1407 *64-bit*)
1408 LD="${LD-ld} -64"
1409 ;;
1410 esac
1411 fi
1412 rm -rf conftest*
1413 ;;
1414
1415*-*-sco3.2v5*)
1416 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1417 SAVE_CFLAGS="$CFLAGS"
1418 CFLAGS="$CFLAGS -belf"
1419 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
a2d91340 1420echo "configure:1421: checking whether the C compiler needs -belf" >&5
252b5132
RH
1421if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1422 echo $ac_n "(cached) $ac_c" 1>&6
1423else
1424 cat > conftest.$ac_ext <<EOF
a2d91340 1425#line 1426 "configure"
252b5132
RH
1426#include "confdefs.h"
1427
1428int main() {
1429
1430; return 0; }
1431EOF
a2d91340 1432if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1433 rm -rf conftest*
1434 lt_cv_cc_needs_belf=yes
1435else
1436 echo "configure: failed program was:" >&5
1437 cat conftest.$ac_ext >&5
1438 rm -rf conftest*
1439 lt_cv_cc_needs_belf=no
1440fi
1441rm -f conftest*
1442fi
1443
1444echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1445 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1446 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1447 CFLAGS="$SAVE_CFLAGS"
1448 fi
1449 ;;
1450
252b5132
RH
1451
1452esac
1453
252b5132
RH
1454
1455# Save cache, so that ltconfig can load it
1456cat > confcache <<\EOF
1457# This file is a shell script that caches the results of configure
1458# tests run on this system so they can be shared between configure
1459# scripts and configure runs. It is not useful on other systems.
1460# If it contains results you don't want to keep, you may remove or edit it.
1461#
1462# By default, configure uses ./config.cache as the cache file,
1463# creating it if it does not exist already. You can give configure
1464# the --cache-file=FILE option to use a different cache file; that is
1465# what configure does when it calls configure scripts in
1466# subdirectories, so they share the cache.
1467# Giving --cache-file=/dev/null disables caching, for debugging configure.
1468# config.status only pays attention to the cache file if you give it the
1469# --recheck option to rerun configure.
1470#
1471EOF
1472# The following way of writing the cache mishandles newlines in values,
1473# but we know of no workaround that is simple, portable, and efficient.
1474# So, don't put newlines in cache variables' values.
1475# Ultrix sh set writes to stderr and can't be redirected directly,
1476# and sets the high bit in the cache file unless we assign to the vars.
1477(set) 2>&1 |
1478 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1479 *ac_space=\ *)
1480 # `set' does not quote correctly, so add quotes (double-quote substitution
1481 # turns \\\\ into \\, and sed turns \\ into \).
1482 sed -n \
1483 -e "s/'/'\\\\''/g" \
1484 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1485 ;;
1486 *)
1487 # `set' quotes correctly as required by POSIX, so do not add quotes.
1488 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1489 ;;
1490 esac >> confcache
1491if cmp -s $cache_file confcache; then
1492 :
1493else
1494 if test -w $cache_file; then
1495 echo "updating cache $cache_file"
1496 cat confcache > $cache_file
1497 else
1498 echo "not updating unwritable cache $cache_file"
1499 fi
1500fi
1501rm -f confcache
1502
1503
1504# Actually configure libtool. ac_aux_dir is where install-sh is found.
1505CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
a74801ba
ILT
1506LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1507LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1508DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
252b5132 1509${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
a74801ba 1510$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
252b5132
RH
1511|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1512
1513# Reload cache, that may have been modified by ltconfig
1514if test -r "$cache_file"; then
1515 echo "loading cache $cache_file"
1516 . $cache_file
1517else
1518 echo "creating cache $cache_file"
1519 > $cache_file
1520fi
1521
1522
1523# This can be used to rebuild libtool when needed
1524LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1525
1526# Always use our own libtool.
1527LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1528
1529# Redirect the config.log output again, so that the ltconfig log is not
1530# clobbered by the next message.
1531exec 5>>./config.log
1532
1533
1534# Check whether --enable-targets or --disable-targets was given.
1535if test "${enable_targets+set}" = set; then
1536 enableval="$enable_targets"
1537 case "${enableval}" in
1538 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1539 ;;
1540 no) enable_targets= ;;
1541 *) enable_targets=$enableval ;;
1542esac
1543fi
1544# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1545if test "${enable_commonbfdlib+set}" = set; then
1546 enableval="$enable_commonbfdlib"
1547 case "${enableval}" in
1548 yes) commonbfdlib=true ;;
1549 no) commonbfdlib=false ;;
1550 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1551esac
1552fi
1553
a2d91340
AC
1554build_warnings="-W -Wall"
1555# Check whether --enable-build-warnings or --disable-build-warnings was given.
1556if test "${enable_build_warnings+set}" = set; then
1557 enableval="$enable_build_warnings"
1558 case "${enableval}" in
1559 yes) ;;
1560 no) build_warnings="-w";;
1561 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
1562 build_warnings="${build_warnings} ${t}";;
1563 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
1564 build_warnings="${t} ${build_warnings}";;
1565 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1566esac
1567if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
1568 echo "Setting warning flags = $build_warnings" 6>&1
1569fi
1570fi
1571WARN_CFLAGS=""
1572if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
1573 WARN_CFLAGS="${build_warnings}"
1574fi
1575
1576
252b5132
RH
1577
1578
1579
1580
1581if test -z "$target" ; then
1582 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1583fi
1584if test -z "$host" ; then
1585 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1586fi
1587
1588# Extract the first word of "gcc", so it can be a program name with args.
1589set dummy gcc; ac_word=$2
1590echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1591echo "configure:1592: checking for $ac_word" >&5
252b5132
RH
1592if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
1594else
1595 if test -n "$CC"; then
1596 ac_cv_prog_CC="$CC" # Let the user override the test.
1597else
1598 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1599 ac_dummy="$PATH"
1600 for ac_dir in $ac_dummy; do
1601 test -z "$ac_dir" && ac_dir=.
1602 if test -f $ac_dir/$ac_word; then
1603 ac_cv_prog_CC="gcc"
1604 break
1605 fi
1606 done
1607 IFS="$ac_save_ifs"
1608fi
1609fi
1610CC="$ac_cv_prog_CC"
1611if test -n "$CC"; then
1612 echo "$ac_t""$CC" 1>&6
1613else
1614 echo "$ac_t""no" 1>&6
1615fi
1616
1617if test -z "$CC"; then
1618 # Extract the first word of "cc", so it can be a program name with args.
1619set dummy cc; ac_word=$2
1620echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1621echo "configure:1622: checking for $ac_word" >&5
252b5132
RH
1622if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1623 echo $ac_n "(cached) $ac_c" 1>&6
1624else
1625 if test -n "$CC"; then
1626 ac_cv_prog_CC="$CC" # Let the user override the test.
1627else
1628 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1629 ac_prog_rejected=no
1630 ac_dummy="$PATH"
1631 for ac_dir in $ac_dummy; do
1632 test -z "$ac_dir" && ac_dir=.
1633 if test -f $ac_dir/$ac_word; then
1634 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1635 ac_prog_rejected=yes
1636 continue
1637 fi
1638 ac_cv_prog_CC="cc"
1639 break
1640 fi
1641 done
1642 IFS="$ac_save_ifs"
1643if test $ac_prog_rejected = yes; then
1644 # We found a bogon in the path, so make sure we never use it.
1645 set dummy $ac_cv_prog_CC
1646 shift
1647 if test $# -gt 0; then
1648 # We chose a different compiler from the bogus one.
1649 # However, it has the same basename, so the bogon will be chosen
1650 # first if we set CC to just the basename; use the full file name.
1651 shift
1652 set dummy "$ac_dir/$ac_word" "$@"
1653 shift
1654 ac_cv_prog_CC="$@"
1655 fi
1656fi
1657fi
1658fi
1659CC="$ac_cv_prog_CC"
1660if test -n "$CC"; then
1661 echo "$ac_t""$CC" 1>&6
1662else
1663 echo "$ac_t""no" 1>&6
1664fi
1665
1666 if test -z "$CC"; then
1667 case "`uname -s`" in
1668 *win32* | *WIN32*)
1669 # Extract the first word of "cl", so it can be a program name with args.
1670set dummy cl; ac_word=$2
1671echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1672echo "configure:1673: checking for $ac_word" >&5
252b5132
RH
1673if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1674 echo $ac_n "(cached) $ac_c" 1>&6
1675else
1676 if test -n "$CC"; then
1677 ac_cv_prog_CC="$CC" # Let the user override the test.
1678else
1679 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1680 ac_dummy="$PATH"
1681 for ac_dir in $ac_dummy; do
1682 test -z "$ac_dir" && ac_dir=.
1683 if test -f $ac_dir/$ac_word; then
1684 ac_cv_prog_CC="cl"
1685 break
1686 fi
1687 done
1688 IFS="$ac_save_ifs"
1689fi
1690fi
1691CC="$ac_cv_prog_CC"
1692if test -n "$CC"; then
1693 echo "$ac_t""$CC" 1>&6
1694else
1695 echo "$ac_t""no" 1>&6
1696fi
1697 ;;
1698 esac
1699 fi
1700 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1701fi
1702
1703echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
a2d91340 1704echo "configure:1705: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132
RH
1705
1706ac_ext=c
1707# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1708ac_cpp='$CPP $CPPFLAGS'
1709ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1710ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1711cross_compiling=$ac_cv_prog_cc_cross
1712
1713cat > conftest.$ac_ext << EOF
1714
a2d91340 1715#line 1716 "configure"
252b5132
RH
1716#include "confdefs.h"
1717
1718main(){return(0);}
1719EOF
a2d91340 1720if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
1721 ac_cv_prog_cc_works=yes
1722 # If we can't run a trivial program, we are probably using a cross compiler.
1723 if (./conftest; exit) 2>/dev/null; then
1724 ac_cv_prog_cc_cross=no
1725 else
1726 ac_cv_prog_cc_cross=yes
1727 fi
1728else
1729 echo "configure: failed program was:" >&5
1730 cat conftest.$ac_ext >&5
1731 ac_cv_prog_cc_works=no
1732fi
1733rm -fr conftest*
1734ac_ext=c
1735# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1736ac_cpp='$CPP $CPPFLAGS'
1737ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1738ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1739cross_compiling=$ac_cv_prog_cc_cross
1740
1741echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1742if test $ac_cv_prog_cc_works = no; then
1743 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1744fi
1745echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
a2d91340 1746echo "configure:1747: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
252b5132
RH
1747echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1748cross_compiling=$ac_cv_prog_cc_cross
1749
1750echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
a2d91340 1751echo "configure:1752: checking whether we are using GNU C" >&5
252b5132
RH
1752if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1753 echo $ac_n "(cached) $ac_c" 1>&6
1754else
1755 cat > conftest.c <<EOF
1756#ifdef __GNUC__
1757 yes;
1758#endif
1759EOF
a2d91340 1760if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
252b5132
RH
1761 ac_cv_prog_gcc=yes
1762else
1763 ac_cv_prog_gcc=no
1764fi
1765fi
1766
1767echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1768
1769if test $ac_cv_prog_gcc = yes; then
1770 GCC=yes
1771else
1772 GCC=
1773fi
1774
1775ac_test_CFLAGS="${CFLAGS+set}"
1776ac_save_CFLAGS="$CFLAGS"
1777CFLAGS=
1778echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
a2d91340 1779echo "configure:1780: checking whether ${CC-cc} accepts -g" >&5
252b5132
RH
1780if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1781 echo $ac_n "(cached) $ac_c" 1>&6
1782else
1783 echo 'void f(){}' > conftest.c
1784if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1785 ac_cv_prog_cc_g=yes
1786else
1787 ac_cv_prog_cc_g=no
1788fi
1789rm -f conftest*
1790
1791fi
1792
1793echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1794if test "$ac_test_CFLAGS" = set; then
1795 CFLAGS="$ac_save_CFLAGS"
1796elif test $ac_cv_prog_cc_g = yes; then
1797 if test "$GCC" = yes; then
1798 CFLAGS="-g -O2"
1799 else
1800 CFLAGS="-g"
1801 fi
1802else
1803 if test "$GCC" = yes; then
1804 CFLAGS="-O2"
1805 else
1806 CFLAGS=
1807 fi
1808fi
1809
1810
1811for ac_prog in 'bison -y' byacc
1812do
1813# Extract the first word of "$ac_prog", so it can be a program name with args.
1814set dummy $ac_prog; ac_word=$2
1815echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1816echo "configure:1817: checking for $ac_word" >&5
252b5132
RH
1817if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1818 echo $ac_n "(cached) $ac_c" 1>&6
1819else
1820 if test -n "$YACC"; then
1821 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1822else
1823 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1824 ac_dummy="$PATH"
1825 for ac_dir in $ac_dummy; do
1826 test -z "$ac_dir" && ac_dir=.
1827 if test -f $ac_dir/$ac_word; then
1828 ac_cv_prog_YACC="$ac_prog"
1829 break
1830 fi
1831 done
1832 IFS="$ac_save_ifs"
1833fi
1834fi
1835YACC="$ac_cv_prog_YACC"
1836if test -n "$YACC"; then
1837 echo "$ac_t""$YACC" 1>&6
1838else
1839 echo "$ac_t""no" 1>&6
1840fi
1841
1842test -n "$YACC" && break
1843done
1844test -n "$YACC" || YACC="yacc"
1845
1846echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
a2d91340 1847echo "configure:1848: checking how to run the C preprocessor" >&5
252b5132
RH
1848# On Suns, sometimes $CPP names a directory.
1849if test -n "$CPP" && test -d "$CPP"; then
1850 CPP=
1851fi
1852if test -z "$CPP"; then
1853if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1854 echo $ac_n "(cached) $ac_c" 1>&6
1855else
1856 # This must be in double quotes, not single quotes, because CPP may get
1857 # substituted into the Makefile and "${CC-cc}" will confuse make.
1858 CPP="${CC-cc} -E"
1859 # On the NeXT, cc -E runs the code through the compiler's parser,
1860 # not just through cpp.
1861 cat > conftest.$ac_ext <<EOF
a2d91340 1862#line 1863 "configure"
252b5132
RH
1863#include "confdefs.h"
1864#include <assert.h>
1865Syntax Error
1866EOF
1867ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 1868{ (eval echo configure:1869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1869ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1870if test -z "$ac_err"; then
1871 :
1872else
1873 echo "$ac_err" >&5
1874 echo "configure: failed program was:" >&5
1875 cat conftest.$ac_ext >&5
1876 rm -rf conftest*
1877 CPP="${CC-cc} -E -traditional-cpp"
1878 cat > conftest.$ac_ext <<EOF
a2d91340 1879#line 1880 "configure"
252b5132
RH
1880#include "confdefs.h"
1881#include <assert.h>
1882Syntax Error
1883EOF
1884ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 1885{ (eval echo configure:1886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1886ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1887if test -z "$ac_err"; then
1888 :
1889else
1890 echo "$ac_err" >&5
1891 echo "configure: failed program was:" >&5
1892 cat conftest.$ac_ext >&5
1893 rm -rf conftest*
1894 CPP="${CC-cc} -nologo -E"
1895 cat > conftest.$ac_ext <<EOF
a2d91340 1896#line 1897 "configure"
252b5132
RH
1897#include "confdefs.h"
1898#include <assert.h>
1899Syntax Error
1900EOF
1901ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 1902{ (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
1903ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1904if test -z "$ac_err"; then
1905 :
1906else
1907 echo "$ac_err" >&5
1908 echo "configure: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 rm -rf conftest*
1911 CPP=/lib/cpp
1912fi
1913rm -f conftest*
1914fi
1915rm -f conftest*
1916fi
1917rm -f conftest*
1918 ac_cv_prog_CPP="$CPP"
1919fi
1920 CPP="$ac_cv_prog_CPP"
1921else
1922 ac_cv_prog_CPP="$CPP"
1923fi
1924echo "$ac_t""$CPP" 1>&6
1925
1926missing_dir=`cd $ac_aux_dir && pwd`
1927for ac_prog in flex lex
1928do
1929# Extract the first word of "$ac_prog", so it can be a program name with args.
1930set dummy $ac_prog; ac_word=$2
1931echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1932echo "configure:1933: checking for $ac_word" >&5
252b5132
RH
1933if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1934 echo $ac_n "(cached) $ac_c" 1>&6
1935else
1936 if test -n "$LEX"; then
1937 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1938else
1939 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1940 ac_dummy="$PATH"
1941 for ac_dir in $ac_dummy; do
1942 test -z "$ac_dir" && ac_dir=.
1943 if test -f $ac_dir/$ac_word; then
1944 ac_cv_prog_LEX="$ac_prog"
1945 break
1946 fi
1947 done
1948 IFS="$ac_save_ifs"
1949fi
1950fi
1951LEX="$ac_cv_prog_LEX"
1952if test -n "$LEX"; then
1953 echo "$ac_t""$LEX" 1>&6
1954else
1955 echo "$ac_t""no" 1>&6
1956fi
1957
1958test -n "$LEX" && break
1959done
1960test -n "$LEX" || LEX=""$missing_dir/missing flex""
1961
1962# Extract the first word of "flex", so it can be a program name with args.
1963set dummy flex; ac_word=$2
1964echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 1965echo "configure:1966: checking for $ac_word" >&5
252b5132
RH
1966if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1967 echo $ac_n "(cached) $ac_c" 1>&6
1968else
1969 if test -n "$LEX"; then
1970 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1971else
1972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1973 ac_dummy="$PATH"
1974 for ac_dir in $ac_dummy; do
1975 test -z "$ac_dir" && ac_dir=.
1976 if test -f $ac_dir/$ac_word; then
1977 ac_cv_prog_LEX="flex"
1978 break
1979 fi
1980 done
1981 IFS="$ac_save_ifs"
1982 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1983fi
1984fi
1985LEX="$ac_cv_prog_LEX"
1986if test -n "$LEX"; then
1987 echo "$ac_t""$LEX" 1>&6
1988else
1989 echo "$ac_t""no" 1>&6
1990fi
1991
1992if test -z "$LEXLIB"
1993then
1994 case "$LEX" in
1995 flex*) ac_lib=fl ;;
1996 *) ac_lib=l ;;
1997 esac
1998 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
a2d91340 1999echo "configure:2000: checking for yywrap in -l$ac_lib" >&5
252b5132
RH
2000ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2001if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2002 echo $ac_n "(cached) $ac_c" 1>&6
2003else
2004 ac_save_LIBS="$LIBS"
2005LIBS="-l$ac_lib $LIBS"
2006cat > conftest.$ac_ext <<EOF
a2d91340 2007#line 2008 "configure"
252b5132
RH
2008#include "confdefs.h"
2009/* Override any gcc2 internal prototype to avoid an error. */
2010/* We use char because int might match the return type of a gcc2
2011 builtin and then its argument prototype would still apply. */
2012char yywrap();
2013
2014int main() {
2015yywrap()
2016; return 0; }
2017EOF
a2d91340 2018if { (eval echo configure:2019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2019 rm -rf conftest*
2020 eval "ac_cv_lib_$ac_lib_var=yes"
2021else
2022 echo "configure: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2024 rm -rf conftest*
2025 eval "ac_cv_lib_$ac_lib_var=no"
2026fi
2027rm -f conftest*
2028LIBS="$ac_save_LIBS"
2029
2030fi
2031if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2032 echo "$ac_t""yes" 1>&6
2033 LEXLIB="-l$ac_lib"
2034else
2035 echo "$ac_t""no" 1>&6
2036fi
2037
2038fi
2039
2040echo $ac_n "checking lex output file root""... $ac_c" 1>&6
a2d91340 2041echo "configure:2042: checking lex output file root" >&5
252b5132
RH
2042if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2043 echo $ac_n "(cached) $ac_c" 1>&6
2044else
2045 # The minimal lex program is just a single line: %%. But some broken lexes
2046# (Solaris, I think it was) want two %% lines, so accommodate them.
2047echo '%%
2048%%' | $LEX
2049if test -f lex.yy.c; then
2050 ac_cv_prog_lex_root=lex.yy
2051elif test -f lexyy.c; then
2052 ac_cv_prog_lex_root=lexyy
2053else
2054 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2055fi
2056fi
2057
2058echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2059LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2060
2061echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
a2d91340 2062echo "configure:2063: checking whether yytext is a pointer" >&5
252b5132
RH
2063if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2064 echo $ac_n "(cached) $ac_c" 1>&6
2065else
2066 # POSIX says lex can declare yytext either as a pointer or an array; the
2067# default is implementation-dependent. Figure out which it is, since
2068# not all implementations provide the %pointer and %array declarations.
2069ac_cv_prog_lex_yytext_pointer=no
2070echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2071ac_save_LIBS="$LIBS"
2072LIBS="$LIBS $LEXLIB"
2073cat > conftest.$ac_ext <<EOF
a2d91340 2074#line 2075 "configure"
252b5132
RH
2075#include "confdefs.h"
2076`cat $LEX_OUTPUT_ROOT.c`
2077int main() {
2078
2079; return 0; }
2080EOF
a2d91340 2081if { (eval echo configure:2082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2082 rm -rf conftest*
2083 ac_cv_prog_lex_yytext_pointer=yes
2084else
2085 echo "configure: failed program was:" >&5
2086 cat conftest.$ac_ext >&5
2087fi
2088rm -f conftest*
2089LIBS="$ac_save_LIBS"
2090rm -f "${LEX_OUTPUT_ROOT}.c"
2091
2092fi
2093
2094echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2095if test $ac_cv_prog_lex_yytext_pointer = yes; then
2096 cat >> confdefs.h <<\EOF
2097#define YYTEXT_POINTER 1
2098EOF
2099
2100fi
2101
2102
2103ALL_LINGUAS=
2104echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
a2d91340 2105echo "configure:2106: checking for POSIXized ISC" >&5
252b5132
RH
2106if test -d /etc/conf/kconfig.d &&
2107 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2108then
2109 echo "$ac_t""yes" 1>&6
2110 ISC=yes # If later tests want to check for ISC.
2111 cat >> confdefs.h <<\EOF
2112#define _POSIX_SOURCE 1
2113EOF
2114
2115 if test "$GCC" = yes; then
2116 CC="$CC -posix"
2117 else
2118 CC="$CC -Xp"
2119 fi
2120else
2121 echo "$ac_t""no" 1>&6
2122 ISC=
2123fi
2124
2125echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
a2d91340 2126echo "configure:2127: checking for ANSI C header files" >&5
252b5132
RH
2127if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2128 echo $ac_n "(cached) $ac_c" 1>&6
2129else
2130 cat > conftest.$ac_ext <<EOF
a2d91340 2131#line 2132 "configure"
252b5132
RH
2132#include "confdefs.h"
2133#include <stdlib.h>
2134#include <stdarg.h>
2135#include <string.h>
2136#include <float.h>
2137EOF
2138ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 2139{ (eval echo configure:2140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2140ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2141if test -z "$ac_err"; then
2142 rm -rf conftest*
2143 ac_cv_header_stdc=yes
2144else
2145 echo "$ac_err" >&5
2146 echo "configure: failed program was:" >&5
2147 cat conftest.$ac_ext >&5
2148 rm -rf conftest*
2149 ac_cv_header_stdc=no
2150fi
2151rm -f conftest*
2152
2153if test $ac_cv_header_stdc = yes; then
2154 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2155cat > conftest.$ac_ext <<EOF
a2d91340 2156#line 2157 "configure"
252b5132
RH
2157#include "confdefs.h"
2158#include <string.h>
2159EOF
2160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2161 egrep "memchr" >/dev/null 2>&1; then
2162 :
2163else
2164 rm -rf conftest*
2165 ac_cv_header_stdc=no
2166fi
2167rm -f conftest*
2168
2169fi
2170
2171if test $ac_cv_header_stdc = yes; then
2172 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2173cat > conftest.$ac_ext <<EOF
a2d91340 2174#line 2175 "configure"
252b5132
RH
2175#include "confdefs.h"
2176#include <stdlib.h>
2177EOF
2178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2179 egrep "free" >/dev/null 2>&1; then
2180 :
2181else
2182 rm -rf conftest*
2183 ac_cv_header_stdc=no
2184fi
2185rm -f conftest*
2186
2187fi
2188
2189if test $ac_cv_header_stdc = yes; then
2190 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2191if test "$cross_compiling" = yes; then
2192 :
2193else
2194 cat > conftest.$ac_ext <<EOF
a2d91340 2195#line 2196 "configure"
252b5132
RH
2196#include "confdefs.h"
2197#include <ctype.h>
2198#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2199#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2200#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2201int main () { int i; for (i = 0; i < 256; i++)
2202if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2203exit (0); }
2204
2205EOF
a2d91340 2206if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2207then
2208 :
2209else
2210 echo "configure: failed program was:" >&5
2211 cat conftest.$ac_ext >&5
2212 rm -fr conftest*
2213 ac_cv_header_stdc=no
2214fi
2215rm -fr conftest*
2216fi
2217
2218fi
2219fi
2220
2221echo "$ac_t""$ac_cv_header_stdc" 1>&6
2222if test $ac_cv_header_stdc = yes; then
2223 cat >> confdefs.h <<\EOF
2224#define STDC_HEADERS 1
2225EOF
2226
2227fi
2228
2229echo $ac_n "checking for working const""... $ac_c" 1>&6
a2d91340 2230echo "configure:2231: checking for working const" >&5
252b5132
RH
2231if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2232 echo $ac_n "(cached) $ac_c" 1>&6
2233else
2234 cat > conftest.$ac_ext <<EOF
a2d91340 2235#line 2236 "configure"
252b5132
RH
2236#include "confdefs.h"
2237
2238int main() {
2239
2240/* Ultrix mips cc rejects this. */
2241typedef int charset[2]; const charset x;
2242/* SunOS 4.1.1 cc rejects this. */
2243char const *const *ccp;
2244char **p;
2245/* NEC SVR4.0.2 mips cc rejects this. */
2246struct point {int x, y;};
2247static struct point const zero = {0,0};
2248/* AIX XL C 1.02.0.0 rejects this.
2249 It does not let you subtract one const X* pointer from another in an arm
2250 of an if-expression whose if-part is not a constant expression */
2251const char *g = "string";
2252ccp = &g + (g ? g-g : 0);
2253/* HPUX 7.0 cc rejects these. */
2254++ccp;
2255p = (char**) ccp;
2256ccp = (char const *const *) p;
2257{ /* SCO 3.2v4 cc rejects this. */
2258 char *t;
2259 char const *s = 0 ? (char *) 0 : (char const *) 0;
2260
2261 *t++ = 0;
2262}
2263{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2264 int x[] = {25, 17};
2265 const int *foo = &x[0];
2266 ++foo;
2267}
2268{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2269 typedef const int *iptr;
2270 iptr p = 0;
2271 ++p;
2272}
2273{ /* AIX XL C 1.02.0.0 rejects this saying
2274 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2275 struct s { int j; const int *ap[3]; };
2276 struct s *b; b->j = 5;
2277}
2278{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2279 const int foo = 10;
2280}
2281
2282; return 0; }
2283EOF
a2d91340 2284if { (eval echo configure:2285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
2285 rm -rf conftest*
2286 ac_cv_c_const=yes
2287else
2288 echo "configure: failed program was:" >&5
2289 cat conftest.$ac_ext >&5
2290 rm -rf conftest*
2291 ac_cv_c_const=no
2292fi
2293rm -f conftest*
2294fi
2295
2296echo "$ac_t""$ac_cv_c_const" 1>&6
2297if test $ac_cv_c_const = no; then
2298 cat >> confdefs.h <<\EOF
2299#define const
2300EOF
2301
2302fi
2303
2304echo $ac_n "checking for inline""... $ac_c" 1>&6
a2d91340 2305echo "configure:2306: checking for inline" >&5
252b5132
RH
2306if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2307 echo $ac_n "(cached) $ac_c" 1>&6
2308else
2309 ac_cv_c_inline=no
2310for ac_kw in inline __inline__ __inline; do
2311 cat > conftest.$ac_ext <<EOF
a2d91340 2312#line 2313 "configure"
252b5132
RH
2313#include "confdefs.h"
2314
2315int main() {
2316} $ac_kw foo() {
2317; return 0; }
2318EOF
a2d91340 2319if { (eval echo configure:2320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
2320 rm -rf conftest*
2321 ac_cv_c_inline=$ac_kw; break
2322else
2323 echo "configure: failed program was:" >&5
2324 cat conftest.$ac_ext >&5
2325fi
2326rm -f conftest*
2327done
2328
2329fi
2330
2331echo "$ac_t""$ac_cv_c_inline" 1>&6
2332case "$ac_cv_c_inline" in
2333 inline | yes) ;;
2334 no) cat >> confdefs.h <<\EOF
2335#define inline
2336EOF
2337 ;;
2338 *) cat >> confdefs.h <<EOF
2339#define inline $ac_cv_c_inline
2340EOF
2341 ;;
2342esac
2343
2344echo $ac_n "checking for off_t""... $ac_c" 1>&6
a2d91340 2345echo "configure:2346: checking for off_t" >&5
252b5132
RH
2346if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2347 echo $ac_n "(cached) $ac_c" 1>&6
2348else
2349 cat > conftest.$ac_ext <<EOF
a2d91340 2350#line 2351 "configure"
252b5132
RH
2351#include "confdefs.h"
2352#include <sys/types.h>
2353#if STDC_HEADERS
2354#include <stdlib.h>
2355#include <stddef.h>
2356#endif
2357EOF
2358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2359 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2360 rm -rf conftest*
2361 ac_cv_type_off_t=yes
2362else
2363 rm -rf conftest*
2364 ac_cv_type_off_t=no
2365fi
2366rm -f conftest*
2367
2368fi
2369echo "$ac_t""$ac_cv_type_off_t" 1>&6
2370if test $ac_cv_type_off_t = no; then
2371 cat >> confdefs.h <<\EOF
2372#define off_t long
2373EOF
2374
2375fi
2376
2377echo $ac_n "checking for size_t""... $ac_c" 1>&6
a2d91340 2378echo "configure:2379: checking for size_t" >&5
252b5132
RH
2379if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2380 echo $ac_n "(cached) $ac_c" 1>&6
2381else
2382 cat > conftest.$ac_ext <<EOF
a2d91340 2383#line 2384 "configure"
252b5132
RH
2384#include "confdefs.h"
2385#include <sys/types.h>
2386#if STDC_HEADERS
2387#include <stdlib.h>
2388#include <stddef.h>
2389#endif
2390EOF
2391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2392 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2393 rm -rf conftest*
2394 ac_cv_type_size_t=yes
2395else
2396 rm -rf conftest*
2397 ac_cv_type_size_t=no
2398fi
2399rm -f conftest*
2400
2401fi
2402echo "$ac_t""$ac_cv_type_size_t" 1>&6
2403if test $ac_cv_type_size_t = no; then
2404 cat >> confdefs.h <<\EOF
2405#define size_t unsigned
2406EOF
2407
2408fi
2409
2410# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2411# for constant arguments. Useless!
2412echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
a2d91340 2413echo "configure:2414: checking for working alloca.h" >&5
252b5132
RH
2414if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2415 echo $ac_n "(cached) $ac_c" 1>&6
2416else
2417 cat > conftest.$ac_ext <<EOF
a2d91340 2418#line 2419 "configure"
252b5132
RH
2419#include "confdefs.h"
2420#include <alloca.h>
2421int main() {
2422char *p = alloca(2 * sizeof(int));
2423; return 0; }
2424EOF
a2d91340 2425if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2426 rm -rf conftest*
2427 ac_cv_header_alloca_h=yes
2428else
2429 echo "configure: failed program was:" >&5
2430 cat conftest.$ac_ext >&5
2431 rm -rf conftest*
2432 ac_cv_header_alloca_h=no
2433fi
2434rm -f conftest*
2435fi
2436
2437echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2438if test $ac_cv_header_alloca_h = yes; then
2439 cat >> confdefs.h <<\EOF
2440#define HAVE_ALLOCA_H 1
2441EOF
2442
2443fi
2444
2445echo $ac_n "checking for alloca""... $ac_c" 1>&6
a2d91340 2446echo "configure:2447: checking for alloca" >&5
252b5132
RH
2447if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2448 echo $ac_n "(cached) $ac_c" 1>&6
2449else
2450 cat > conftest.$ac_ext <<EOF
a2d91340 2451#line 2452 "configure"
252b5132
RH
2452#include "confdefs.h"
2453
2454#ifdef __GNUC__
2455# define alloca __builtin_alloca
2456#else
2457# ifdef _MSC_VER
2458# include <malloc.h>
2459# define alloca _alloca
2460# else
2461# if HAVE_ALLOCA_H
2462# include <alloca.h>
2463# else
2464# ifdef _AIX
2465 #pragma alloca
2466# else
2467# ifndef alloca /* predefined by HP cc +Olibcalls */
2468char *alloca ();
2469# endif
2470# endif
2471# endif
2472# endif
2473#endif
2474
2475int main() {
2476char *p = (char *) alloca(1);
2477; return 0; }
2478EOF
a2d91340 2479if { (eval echo configure:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2480 rm -rf conftest*
2481 ac_cv_func_alloca_works=yes
2482else
2483 echo "configure: failed program was:" >&5
2484 cat conftest.$ac_ext >&5
2485 rm -rf conftest*
2486 ac_cv_func_alloca_works=no
2487fi
2488rm -f conftest*
2489fi
2490
2491echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2492if test $ac_cv_func_alloca_works = yes; then
2493 cat >> confdefs.h <<\EOF
2494#define HAVE_ALLOCA 1
2495EOF
2496
2497fi
2498
2499if test $ac_cv_func_alloca_works = no; then
2500 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2501 # that cause trouble. Some versions do not even contain alloca or
2502 # contain a buggy version. If you still want to use their alloca,
2503 # use ar to extract alloca.o from them instead of compiling alloca.c.
2504 ALLOCA=alloca.${ac_objext}
2505 cat >> confdefs.h <<\EOF
2506#define C_ALLOCA 1
2507EOF
2508
2509
2510echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
a2d91340 2511echo "configure:2512: checking whether alloca needs Cray hooks" >&5
252b5132
RH
2512if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2513 echo $ac_n "(cached) $ac_c" 1>&6
2514else
2515 cat > conftest.$ac_ext <<EOF
a2d91340 2516#line 2517 "configure"
252b5132
RH
2517#include "confdefs.h"
2518#if defined(CRAY) && ! defined(CRAY2)
2519webecray
2520#else
2521wenotbecray
2522#endif
2523
2524EOF
2525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2526 egrep "webecray" >/dev/null 2>&1; then
2527 rm -rf conftest*
2528 ac_cv_os_cray=yes
2529else
2530 rm -rf conftest*
2531 ac_cv_os_cray=no
2532fi
2533rm -f conftest*
2534
2535fi
2536
2537echo "$ac_t""$ac_cv_os_cray" 1>&6
2538if test $ac_cv_os_cray = yes; then
2539for ac_func in _getb67 GETB67 getb67; do
2540 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a2d91340 2541echo "configure:2542: checking for $ac_func" >&5
252b5132
RH
2542if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2543 echo $ac_n "(cached) $ac_c" 1>&6
2544else
2545 cat > conftest.$ac_ext <<EOF
a2d91340 2546#line 2547 "configure"
252b5132
RH
2547#include "confdefs.h"
2548/* System header to define __stub macros and hopefully few prototypes,
2549 which can conflict with char $ac_func(); below. */
2550#include <assert.h>
2551/* Override any gcc2 internal prototype to avoid an error. */
2552/* We use char because int might match the return type of a gcc2
2553 builtin and then its argument prototype would still apply. */
2554char $ac_func();
2555
2556int main() {
2557
2558/* The GNU C library defines this for functions which it implements
2559 to always fail with ENOSYS. Some functions are actually named
2560 something starting with __ and the normal name is an alias. */
2561#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2562choke me
2563#else
2564$ac_func();
2565#endif
2566
2567; return 0; }
2568EOF
a2d91340 2569if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2570 rm -rf conftest*
2571 eval "ac_cv_func_$ac_func=yes"
2572else
2573 echo "configure: failed program was:" >&5
2574 cat conftest.$ac_ext >&5
2575 rm -rf conftest*
2576 eval "ac_cv_func_$ac_func=no"
2577fi
2578rm -f conftest*
2579fi
2580
2581if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2582 echo "$ac_t""yes" 1>&6
2583 cat >> confdefs.h <<EOF
2584#define CRAY_STACKSEG_END $ac_func
2585EOF
2586
2587 break
2588else
2589 echo "$ac_t""no" 1>&6
2590fi
2591
2592done
2593fi
2594
2595echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
a2d91340 2596echo "configure:2597: checking stack direction for C alloca" >&5
252b5132
RH
2597if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2598 echo $ac_n "(cached) $ac_c" 1>&6
2599else
2600 if test "$cross_compiling" = yes; then
2601 ac_cv_c_stack_direction=0
2602else
2603 cat > conftest.$ac_ext <<EOF
a2d91340 2604#line 2605 "configure"
252b5132
RH
2605#include "confdefs.h"
2606find_stack_direction ()
2607{
2608 static char *addr = 0;
2609 auto char dummy;
2610 if (addr == 0)
2611 {
2612 addr = &dummy;
2613 return find_stack_direction ();
2614 }
2615 else
2616 return (&dummy > addr) ? 1 : -1;
2617}
2618main ()
2619{
2620 exit (find_stack_direction() < 0);
2621}
2622EOF
a2d91340 2623if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2624then
2625 ac_cv_c_stack_direction=1
2626else
2627 echo "configure: failed program was:" >&5
2628 cat conftest.$ac_ext >&5
2629 rm -fr conftest*
2630 ac_cv_c_stack_direction=-1
2631fi
2632rm -fr conftest*
2633fi
2634
2635fi
2636
2637echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2638cat >> confdefs.h <<EOF
2639#define STACK_DIRECTION $ac_cv_c_stack_direction
2640EOF
2641
2642fi
2643
2644for ac_hdr in unistd.h
2645do
2646ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2647echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a2d91340 2648echo "configure:2649: checking for $ac_hdr" >&5
252b5132
RH
2649if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2650 echo $ac_n "(cached) $ac_c" 1>&6
2651else
2652 cat > conftest.$ac_ext <<EOF
a2d91340 2653#line 2654 "configure"
252b5132
RH
2654#include "confdefs.h"
2655#include <$ac_hdr>
2656EOF
2657ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 2658{ (eval echo configure:2659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2659ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2660if test -z "$ac_err"; then
2661 rm -rf conftest*
2662 eval "ac_cv_header_$ac_safe=yes"
2663else
2664 echo "$ac_err" >&5
2665 echo "configure: failed program was:" >&5
2666 cat conftest.$ac_ext >&5
2667 rm -rf conftest*
2668 eval "ac_cv_header_$ac_safe=no"
2669fi
2670rm -f conftest*
2671fi
2672if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2673 echo "$ac_t""yes" 1>&6
2674 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2675 cat >> confdefs.h <<EOF
2676#define $ac_tr_hdr 1
2677EOF
2678
2679else
2680 echo "$ac_t""no" 1>&6
2681fi
2682done
2683
2684for ac_func in getpagesize
2685do
2686echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a2d91340 2687echo "configure:2688: checking for $ac_func" >&5
252b5132
RH
2688if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2689 echo $ac_n "(cached) $ac_c" 1>&6
2690else
2691 cat > conftest.$ac_ext <<EOF
a2d91340 2692#line 2693 "configure"
252b5132
RH
2693#include "confdefs.h"
2694/* System header to define __stub macros and hopefully few prototypes,
2695 which can conflict with char $ac_func(); below. */
2696#include <assert.h>
2697/* Override any gcc2 internal prototype to avoid an error. */
2698/* We use char because int might match the return type of a gcc2
2699 builtin and then its argument prototype would still apply. */
2700char $ac_func();
2701
2702int main() {
2703
2704/* The GNU C library defines this for functions which it implements
2705 to always fail with ENOSYS. Some functions are actually named
2706 something starting with __ and the normal name is an alias. */
2707#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2708choke me
2709#else
2710$ac_func();
2711#endif
2712
2713; return 0; }
2714EOF
a2d91340 2715if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2716 rm -rf conftest*
2717 eval "ac_cv_func_$ac_func=yes"
2718else
2719 echo "configure: failed program was:" >&5
2720 cat conftest.$ac_ext >&5
2721 rm -rf conftest*
2722 eval "ac_cv_func_$ac_func=no"
2723fi
2724rm -f conftest*
2725fi
2726
2727if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2728 echo "$ac_t""yes" 1>&6
2729 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2730 cat >> confdefs.h <<EOF
2731#define $ac_tr_func 1
2732EOF
2733
2734else
2735 echo "$ac_t""no" 1>&6
2736fi
2737done
2738
2739echo $ac_n "checking for working mmap""... $ac_c" 1>&6
a2d91340 2740echo "configure:2741: checking for working mmap" >&5
252b5132
RH
2741if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2742 echo $ac_n "(cached) $ac_c" 1>&6
2743else
2744 if test "$cross_compiling" = yes; then
2745 ac_cv_func_mmap_fixed_mapped=no
2746else
2747 cat > conftest.$ac_ext <<EOF
a2d91340 2748#line 2749 "configure"
252b5132
RH
2749#include "confdefs.h"
2750
2751/* Thanks to Mike Haertel and Jim Avera for this test.
2752 Here is a matrix of mmap possibilities:
2753 mmap private not fixed
2754 mmap private fixed at somewhere currently unmapped
2755 mmap private fixed at somewhere already mapped
2756 mmap shared not fixed
2757 mmap shared fixed at somewhere currently unmapped
2758 mmap shared fixed at somewhere already mapped
2759 For private mappings, we should verify that changes cannot be read()
2760 back from the file, nor mmap's back from the file at a different
2761 address. (There have been systems where private was not correctly
2762 implemented like the infamous i386 svr4.0, and systems where the
2763 VM page cache was not coherent with the filesystem buffer cache
2764 like early versions of FreeBSD and possibly contemporary NetBSD.)
2765 For shared mappings, we should conversely verify that changes get
2766 propogated back to all the places they're supposed to be.
2767
2768 Grep wants private fixed already mapped.
2769 The main things grep needs to know about mmap are:
2770 * does it exist and is it safe to write into the mmap'd area
2771 * how to use it (BSD variants) */
2772#include <sys/types.h>
2773#include <fcntl.h>
2774#include <sys/mman.h>
2775
2776/* This mess was copied from the GNU getpagesize.h. */
2777#ifndef HAVE_GETPAGESIZE
2778# ifdef HAVE_UNISTD_H
2779# include <unistd.h>
2780# endif
2781
2782/* Assume that all systems that can run configure have sys/param.h. */
2783# ifndef HAVE_SYS_PARAM_H
2784# define HAVE_SYS_PARAM_H 1
2785# endif
2786
2787# ifdef _SC_PAGESIZE
2788# define getpagesize() sysconf(_SC_PAGESIZE)
2789# else /* no _SC_PAGESIZE */
2790# ifdef HAVE_SYS_PARAM_H
2791# include <sys/param.h>
2792# ifdef EXEC_PAGESIZE
2793# define getpagesize() EXEC_PAGESIZE
2794# else /* no EXEC_PAGESIZE */
2795# ifdef NBPG
2796# define getpagesize() NBPG * CLSIZE
2797# ifndef CLSIZE
2798# define CLSIZE 1
2799# endif /* no CLSIZE */
2800# else /* no NBPG */
2801# ifdef NBPC
2802# define getpagesize() NBPC
2803# else /* no NBPC */
2804# ifdef PAGESIZE
2805# define getpagesize() PAGESIZE
2806# endif /* PAGESIZE */
2807# endif /* no NBPC */
2808# endif /* no NBPG */
2809# endif /* no EXEC_PAGESIZE */
2810# else /* no HAVE_SYS_PARAM_H */
2811# define getpagesize() 8192 /* punt totally */
2812# endif /* no HAVE_SYS_PARAM_H */
2813# endif /* no _SC_PAGESIZE */
2814
2815#endif /* no HAVE_GETPAGESIZE */
2816
2817#ifdef __cplusplus
2818extern "C" { void *malloc(unsigned); }
2819#else
2820char *malloc();
2821#endif
2822
2823int
2824main()
2825{
2826 char *data, *data2, *data3;
2827 int i, pagesize;
2828 int fd;
2829
2830 pagesize = getpagesize();
2831
2832 /*
2833 * First, make a file with some known garbage in it.
2834 */
2835 data = malloc(pagesize);
2836 if (!data)
2837 exit(1);
2838 for (i = 0; i < pagesize; ++i)
2839 *(data + i) = rand();
2840 umask(0);
2841 fd = creat("conftestmmap", 0600);
2842 if (fd < 0)
2843 exit(1);
2844 if (write(fd, data, pagesize) != pagesize)
2845 exit(1);
2846 close(fd);
2847
2848 /*
2849 * Next, try to mmap the file at a fixed address which
2850 * already has something else allocated at it. If we can,
2851 * also make sure that we see the same garbage.
2852 */
2853 fd = open("conftestmmap", O_RDWR);
2854 if (fd < 0)
2855 exit(1);
2856 data2 = malloc(2 * pagesize);
2857 if (!data2)
2858 exit(1);
2859 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2860 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2861 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2862 exit(1);
2863 for (i = 0; i < pagesize; ++i)
2864 if (*(data + i) != *(data2 + i))
2865 exit(1);
2866
2867 /*
2868 * Finally, make sure that changes to the mapped area
2869 * do not percolate back to the file as seen by read().
2870 * (This is a bug on some variants of i386 svr4.0.)
2871 */
2872 for (i = 0; i < pagesize; ++i)
2873 *(data2 + i) = *(data2 + i) + 1;
2874 data3 = malloc(pagesize);
2875 if (!data3)
2876 exit(1);
2877 if (read(fd, data3, pagesize) != pagesize)
2878 exit(1);
2879 for (i = 0; i < pagesize; ++i)
2880 if (*(data + i) != *(data3 + i))
2881 exit(1);
2882 close(fd);
2883 unlink("conftestmmap");
2884 exit(0);
2885}
2886
2887EOF
a2d91340 2888if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2889then
2890 ac_cv_func_mmap_fixed_mapped=yes
2891else
2892 echo "configure: failed program was:" >&5
2893 cat conftest.$ac_ext >&5
2894 rm -fr conftest*
2895 ac_cv_func_mmap_fixed_mapped=no
2896fi
2897rm -fr conftest*
2898fi
2899
2900fi
2901
2902echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2903if test $ac_cv_func_mmap_fixed_mapped = yes; then
2904 cat >> confdefs.h <<\EOF
2905#define HAVE_MMAP 1
2906EOF
2907
2908fi
2909
2910
2911 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2912unistd.h values.h sys/param.h
2913do
2914ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2915echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a2d91340 2916echo "configure:2917: checking for $ac_hdr" >&5
252b5132
RH
2917if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2918 echo $ac_n "(cached) $ac_c" 1>&6
2919else
2920 cat > conftest.$ac_ext <<EOF
a2d91340 2921#line 2922 "configure"
252b5132
RH
2922#include "confdefs.h"
2923#include <$ac_hdr>
2924EOF
2925ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 2926{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2927ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2928if test -z "$ac_err"; then
2929 rm -rf conftest*
2930 eval "ac_cv_header_$ac_safe=yes"
2931else
2932 echo "$ac_err" >&5
2933 echo "configure: failed program was:" >&5
2934 cat conftest.$ac_ext >&5
2935 rm -rf conftest*
2936 eval "ac_cv_header_$ac_safe=no"
2937fi
2938rm -f conftest*
2939fi
2940if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2941 echo "$ac_t""yes" 1>&6
2942 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2943 cat >> confdefs.h <<EOF
2944#define $ac_tr_hdr 1
2945EOF
2946
2947else
2948 echo "$ac_t""no" 1>&6
2949fi
2950done
2951
2952 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2953__argz_count __argz_stringify __argz_next
2954do
2955echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a2d91340 2956echo "configure:2957: checking for $ac_func" >&5
252b5132
RH
2957if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2958 echo $ac_n "(cached) $ac_c" 1>&6
2959else
2960 cat > conftest.$ac_ext <<EOF
a2d91340 2961#line 2962 "configure"
252b5132
RH
2962#include "confdefs.h"
2963/* System header to define __stub macros and hopefully few prototypes,
2964 which can conflict with char $ac_func(); below. */
2965#include <assert.h>
2966/* Override any gcc2 internal prototype to avoid an error. */
2967/* We use char because int might match the return type of a gcc2
2968 builtin and then its argument prototype would still apply. */
2969char $ac_func();
2970
2971int main() {
2972
2973/* The GNU C library defines this for functions which it implements
2974 to always fail with ENOSYS. Some functions are actually named
2975 something starting with __ and the normal name is an alias. */
2976#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2977choke me
2978#else
2979$ac_func();
2980#endif
2981
2982; return 0; }
2983EOF
a2d91340 2984if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2985 rm -rf conftest*
2986 eval "ac_cv_func_$ac_func=yes"
2987else
2988 echo "configure: failed program was:" >&5
2989 cat conftest.$ac_ext >&5
2990 rm -rf conftest*
2991 eval "ac_cv_func_$ac_func=no"
2992fi
2993rm -f conftest*
2994fi
2995
2996if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2997 echo "$ac_t""yes" 1>&6
2998 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2999 cat >> confdefs.h <<EOF
3000#define $ac_tr_func 1
3001EOF
3002
3003else
3004 echo "$ac_t""no" 1>&6
3005fi
3006done
3007
3008
3009 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3010 for ac_func in stpcpy
3011do
3012echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a2d91340 3013echo "configure:3014: checking for $ac_func" >&5
252b5132
RH
3014if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3015 echo $ac_n "(cached) $ac_c" 1>&6
3016else
3017 cat > conftest.$ac_ext <<EOF
a2d91340 3018#line 3019 "configure"
252b5132
RH
3019#include "confdefs.h"
3020/* System header to define __stub macros and hopefully few prototypes,
3021 which can conflict with char $ac_func(); below. */
3022#include <assert.h>
3023/* Override any gcc2 internal prototype to avoid an error. */
3024/* We use char because int might match the return type of a gcc2
3025 builtin and then its argument prototype would still apply. */
3026char $ac_func();
3027
3028int main() {
3029
3030/* The GNU C library defines this for functions which it implements
3031 to always fail with ENOSYS. Some functions are actually named
3032 something starting with __ and the normal name is an alias. */
3033#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3034choke me
3035#else
3036$ac_func();
3037#endif
3038
3039; return 0; }
3040EOF
a2d91340 3041if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3042 rm -rf conftest*
3043 eval "ac_cv_func_$ac_func=yes"
3044else
3045 echo "configure: failed program was:" >&5
3046 cat conftest.$ac_ext >&5
3047 rm -rf conftest*
3048 eval "ac_cv_func_$ac_func=no"
3049fi
3050rm -f conftest*
3051fi
3052
3053if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3054 echo "$ac_t""yes" 1>&6
3055 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3056 cat >> confdefs.h <<EOF
3057#define $ac_tr_func 1
3058EOF
3059
3060else
3061 echo "$ac_t""no" 1>&6
3062fi
3063done
3064
3065 fi
3066 if test "${ac_cv_func_stpcpy}" = "yes"; then
3067 cat >> confdefs.h <<\EOF
3068#define HAVE_STPCPY 1
3069EOF
3070
3071 fi
3072
3073 if test $ac_cv_header_locale_h = yes; then
3074 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
a2d91340 3075echo "configure:3076: checking for LC_MESSAGES" >&5
252b5132
RH
3076if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3077 echo $ac_n "(cached) $ac_c" 1>&6
3078else
3079 cat > conftest.$ac_ext <<EOF
a2d91340 3080#line 3081 "configure"
252b5132
RH
3081#include "confdefs.h"
3082#include <locale.h>
3083int main() {
3084return LC_MESSAGES
3085; return 0; }
3086EOF
a2d91340 3087if { (eval echo configure:3088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3088 rm -rf conftest*
3089 am_cv_val_LC_MESSAGES=yes
3090else
3091 echo "configure: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3093 rm -rf conftest*
3094 am_cv_val_LC_MESSAGES=no
3095fi
3096rm -f conftest*
3097fi
3098
3099echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3100 if test $am_cv_val_LC_MESSAGES = yes; then
3101 cat >> confdefs.h <<\EOF
3102#define HAVE_LC_MESSAGES 1
3103EOF
3104
3105 fi
3106 fi
3107 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
a2d91340 3108echo "configure:3109: checking whether NLS is requested" >&5
252b5132
RH
3109 # Check whether --enable-nls or --disable-nls was given.
3110if test "${enable_nls+set}" = set; then
3111 enableval="$enable_nls"
3112 USE_NLS=$enableval
3113else
3114 USE_NLS=yes
3115fi
3116
3117 echo "$ac_t""$USE_NLS" 1>&6
3118
3119
3120 USE_INCLUDED_LIBINTL=no
3121
3122 if test "$USE_NLS" = "yes"; then
3123 cat >> confdefs.h <<\EOF
3124#define ENABLE_NLS 1
3125EOF
3126
3127 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
a2d91340 3128echo "configure:3129: checking whether included gettext is requested" >&5
252b5132
RH
3129 # Check whether --with-included-gettext or --without-included-gettext was given.
3130if test "${with_included_gettext+set}" = set; then
3131 withval="$with_included_gettext"
3132 nls_cv_force_use_gnu_gettext=$withval
3133else
3134 nls_cv_force_use_gnu_gettext=no
3135fi
3136
3137 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3138
3139 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3140 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3141 nls_cv_header_intl=
3142 nls_cv_header_libgt=
3143 CATOBJEXT=NONE
3144
3145 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3146echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
a2d91340 3147echo "configure:3148: checking for libintl.h" >&5
252b5132
RH
3148if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3149 echo $ac_n "(cached) $ac_c" 1>&6
3150else
3151 cat > conftest.$ac_ext <<EOF
a2d91340 3152#line 3153 "configure"
252b5132
RH
3153#include "confdefs.h"
3154#include <libintl.h>
3155EOF
3156ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 3157{ (eval echo configure:3158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3158ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3159if test -z "$ac_err"; then
3160 rm -rf conftest*
3161 eval "ac_cv_header_$ac_safe=yes"
3162else
3163 echo "$ac_err" >&5
3164 echo "configure: failed program was:" >&5
3165 cat conftest.$ac_ext >&5
3166 rm -rf conftest*
3167 eval "ac_cv_header_$ac_safe=no"
3168fi
3169rm -f conftest*
3170fi
3171if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3172 echo "$ac_t""yes" 1>&6
3173 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
a2d91340 3174echo "configure:3175: checking for gettext in libc" >&5
252b5132
RH
3175if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3176 echo $ac_n "(cached) $ac_c" 1>&6
3177else
3178 cat > conftest.$ac_ext <<EOF
a2d91340 3179#line 3180 "configure"
252b5132
RH
3180#include "confdefs.h"
3181#include <libintl.h>
3182int main() {
3183return (int) gettext ("")
3184; return 0; }
3185EOF
a2d91340 3186if { (eval echo configure:3187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3187 rm -rf conftest*
3188 gt_cv_func_gettext_libc=yes
3189else
3190 echo "configure: failed program was:" >&5
3191 cat conftest.$ac_ext >&5
3192 rm -rf conftest*
3193 gt_cv_func_gettext_libc=no
3194fi
3195rm -f conftest*
3196fi
3197
3198echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3199
3200 if test "$gt_cv_func_gettext_libc" != "yes"; then
3201 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
a2d91340 3202echo "configure:3203: checking for bindtextdomain in -lintl" >&5
252b5132
RH
3203ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3204if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3205 echo $ac_n "(cached) $ac_c" 1>&6
3206else
3207 ac_save_LIBS="$LIBS"
3208LIBS="-lintl $LIBS"
3209cat > conftest.$ac_ext <<EOF
a2d91340 3210#line 3211 "configure"
252b5132
RH
3211#include "confdefs.h"
3212/* Override any gcc2 internal prototype to avoid an error. */
3213/* We use char because int might match the return type of a gcc2
3214 builtin and then its argument prototype would still apply. */
3215char bindtextdomain();
3216
3217int main() {
3218bindtextdomain()
3219; return 0; }
3220EOF
a2d91340 3221if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3222 rm -rf conftest*
3223 eval "ac_cv_lib_$ac_lib_var=yes"
3224else
3225 echo "configure: failed program was:" >&5
3226 cat conftest.$ac_ext >&5
3227 rm -rf conftest*
3228 eval "ac_cv_lib_$ac_lib_var=no"
3229fi
3230rm -f conftest*
3231LIBS="$ac_save_LIBS"
3232
3233fi
3234if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3235 echo "$ac_t""yes" 1>&6
3236 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
a2d91340 3237echo "configure:3238: checking for gettext in libintl" >&5
252b5132
RH
3238if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3239 echo $ac_n "(cached) $ac_c" 1>&6
3240else
3241 cat > conftest.$ac_ext <<EOF
a2d91340 3242#line 3243 "configure"
252b5132
RH
3243#include "confdefs.h"
3244
3245int main() {
3246return (int) gettext ("")
3247; return 0; }
3248EOF
a2d91340 3249if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3250 rm -rf conftest*
3251 gt_cv_func_gettext_libintl=yes
3252else
3253 echo "configure: failed program was:" >&5
3254 cat conftest.$ac_ext >&5
3255 rm -rf conftest*
3256 gt_cv_func_gettext_libintl=no
3257fi
3258rm -f conftest*
3259fi
3260
3261echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3262else
3263 echo "$ac_t""no" 1>&6
3264fi
3265
3266 fi
3267
3268 if test "$gt_cv_func_gettext_libc" = "yes" \
3269 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3270 cat >> confdefs.h <<\EOF
3271#define HAVE_GETTEXT 1
3272EOF
3273
3274 # Extract the first word of "msgfmt", so it can be a program name with args.
3275set dummy msgfmt; ac_word=$2
3276echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 3277echo "configure:3278: checking for $ac_word" >&5
252b5132
RH
3278if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3279 echo $ac_n "(cached) $ac_c" 1>&6
3280else
3281 case "$MSGFMT" in
3282 /*)
3283 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3284 ;;
3285 *)
3286 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3287 for ac_dir in $PATH; do
3288 test -z "$ac_dir" && ac_dir=.
3289 if test -f $ac_dir/$ac_word; then
3290 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3291 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3292 break
3293 fi
3294 fi
3295 done
3296 IFS="$ac_save_ifs"
3297 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3298 ;;
3299esac
3300fi
3301MSGFMT="$ac_cv_path_MSGFMT"
3302if test -n "$MSGFMT"; then
3303 echo "$ac_t""$MSGFMT" 1>&6
3304else
3305 echo "$ac_t""no" 1>&6
3306fi
3307 if test "$MSGFMT" != "no"; then
3308 for ac_func in dcgettext
3309do
3310echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a2d91340 3311echo "configure:3312: checking for $ac_func" >&5
252b5132
RH
3312if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3313 echo $ac_n "(cached) $ac_c" 1>&6
3314else
3315 cat > conftest.$ac_ext <<EOF
a2d91340 3316#line 3317 "configure"
252b5132
RH
3317#include "confdefs.h"
3318/* System header to define __stub macros and hopefully few prototypes,
3319 which can conflict with char $ac_func(); below. */
3320#include <assert.h>
3321/* Override any gcc2 internal prototype to avoid an error. */
3322/* We use char because int might match the return type of a gcc2
3323 builtin and then its argument prototype would still apply. */
3324char $ac_func();
3325
3326int main() {
3327
3328/* The GNU C library defines this for functions which it implements
3329 to always fail with ENOSYS. Some functions are actually named
3330 something starting with __ and the normal name is an alias. */
3331#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3332choke me
3333#else
3334$ac_func();
3335#endif
3336
3337; return 0; }
3338EOF
a2d91340 3339if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3340 rm -rf conftest*
3341 eval "ac_cv_func_$ac_func=yes"
3342else
3343 echo "configure: failed program was:" >&5
3344 cat conftest.$ac_ext >&5
3345 rm -rf conftest*
3346 eval "ac_cv_func_$ac_func=no"
3347fi
3348rm -f conftest*
3349fi
3350
3351if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3352 echo "$ac_t""yes" 1>&6
3353 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3354 cat >> confdefs.h <<EOF
3355#define $ac_tr_func 1
3356EOF
3357
3358else
3359 echo "$ac_t""no" 1>&6
3360fi
3361done
3362
3363 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3364set dummy gmsgfmt; ac_word=$2
3365echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 3366echo "configure:3367: checking for $ac_word" >&5
252b5132
RH
3367if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3368 echo $ac_n "(cached) $ac_c" 1>&6
3369else
3370 case "$GMSGFMT" in
3371 /*)
3372 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3373 ;;
3374 ?:/*)
3375 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3376 ;;
3377 *)
3378 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3379 ac_dummy="$PATH"
3380 for ac_dir in $ac_dummy; do
3381 test -z "$ac_dir" && ac_dir=.
3382 if test -f $ac_dir/$ac_word; then
3383 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3384 break
3385 fi
3386 done
3387 IFS="$ac_save_ifs"
3388 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3389 ;;
3390esac
3391fi
3392GMSGFMT="$ac_cv_path_GMSGFMT"
3393if test -n "$GMSGFMT"; then
3394 echo "$ac_t""$GMSGFMT" 1>&6
3395else
3396 echo "$ac_t""no" 1>&6
3397fi
3398
3399 # Extract the first word of "xgettext", so it can be a program name with args.
3400set dummy xgettext; ac_word=$2
3401echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 3402echo "configure:3403: checking for $ac_word" >&5
252b5132
RH
3403if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3404 echo $ac_n "(cached) $ac_c" 1>&6
3405else
3406 case "$XGETTEXT" in
3407 /*)
3408 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3409 ;;
3410 *)
3411 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3412 for ac_dir in $PATH; do
3413 test -z "$ac_dir" && ac_dir=.
3414 if test -f $ac_dir/$ac_word; then
3415 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3416 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3417 break
3418 fi
3419 fi
3420 done
3421 IFS="$ac_save_ifs"
3422 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3423 ;;
3424esac
3425fi
3426XGETTEXT="$ac_cv_path_XGETTEXT"
3427if test -n "$XGETTEXT"; then
3428 echo "$ac_t""$XGETTEXT" 1>&6
3429else
3430 echo "$ac_t""no" 1>&6
3431fi
3432
3433 cat > conftest.$ac_ext <<EOF
a2d91340 3434#line 3435 "configure"
252b5132
RH
3435#include "confdefs.h"
3436
3437int main() {
3438extern int _nl_msg_cat_cntr;
3439 return _nl_msg_cat_cntr
3440; return 0; }
3441EOF
a2d91340 3442if { (eval echo configure:3443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3443 rm -rf conftest*
3444 CATOBJEXT=.gmo
3445 DATADIRNAME=share
3446else
3447 echo "configure: failed program was:" >&5
3448 cat conftest.$ac_ext >&5
3449 rm -rf conftest*
3450 CATOBJEXT=.mo
3451 DATADIRNAME=lib
3452fi
3453rm -f conftest*
3454 INSTOBJEXT=.mo
3455 fi
3456 fi
3457
3458else
3459 echo "$ac_t""no" 1>&6
3460fi
3461
3462
3463
3464 if test "$CATOBJEXT" = "NONE"; then
3465 nls_cv_use_gnu_gettext=yes
3466 fi
3467 fi
3468
3469 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3470 INTLOBJS="\$(GETTOBJS)"
3471 # Extract the first word of "msgfmt", so it can be a program name with args.
3472set dummy msgfmt; ac_word=$2
3473echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 3474echo "configure:3475: checking for $ac_word" >&5
252b5132
RH
3475if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3476 echo $ac_n "(cached) $ac_c" 1>&6
3477else
3478 case "$MSGFMT" in
3479 /*)
3480 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3481 ;;
3482 *)
3483 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3484 for ac_dir in $PATH; do
3485 test -z "$ac_dir" && ac_dir=.
3486 if test -f $ac_dir/$ac_word; then
3487 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3488 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3489 break
3490 fi
3491 fi
3492 done
3493 IFS="$ac_save_ifs"
3494 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3495 ;;
3496esac
3497fi
3498MSGFMT="$ac_cv_path_MSGFMT"
3499if test -n "$MSGFMT"; then
3500 echo "$ac_t""$MSGFMT" 1>&6
3501else
3502 echo "$ac_t""no" 1>&6
3503fi
3504
3505 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3506set dummy gmsgfmt; ac_word=$2
3507echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 3508echo "configure:3509: checking for $ac_word" >&5
252b5132
RH
3509if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3510 echo $ac_n "(cached) $ac_c" 1>&6
3511else
3512 case "$GMSGFMT" in
3513 /*)
3514 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3515 ;;
3516 ?:/*)
3517 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3518 ;;
3519 *)
3520 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3521 ac_dummy="$PATH"
3522 for ac_dir in $ac_dummy; do
3523 test -z "$ac_dir" && ac_dir=.
3524 if test -f $ac_dir/$ac_word; then
3525 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3526 break
3527 fi
3528 done
3529 IFS="$ac_save_ifs"
3530 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3531 ;;
3532esac
3533fi
3534GMSGFMT="$ac_cv_path_GMSGFMT"
3535if test -n "$GMSGFMT"; then
3536 echo "$ac_t""$GMSGFMT" 1>&6
3537else
3538 echo "$ac_t""no" 1>&6
3539fi
3540
3541 # Extract the first word of "xgettext", so it can be a program name with args.
3542set dummy xgettext; ac_word=$2
3543echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 3544echo "configure:3545: checking for $ac_word" >&5
252b5132
RH
3545if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3546 echo $ac_n "(cached) $ac_c" 1>&6
3547else
3548 case "$XGETTEXT" in
3549 /*)
3550 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3551 ;;
3552 *)
3553 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3554 for ac_dir in $PATH; do
3555 test -z "$ac_dir" && ac_dir=.
3556 if test -f $ac_dir/$ac_word; then
3557 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3558 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3559 break
3560 fi
3561 fi
3562 done
3563 IFS="$ac_save_ifs"
3564 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3565 ;;
3566esac
3567fi
3568XGETTEXT="$ac_cv_path_XGETTEXT"
3569if test -n "$XGETTEXT"; then
3570 echo "$ac_t""$XGETTEXT" 1>&6
3571else
3572 echo "$ac_t""no" 1>&6
3573fi
3574
3575
3576 USE_INCLUDED_LIBINTL=yes
3577 CATOBJEXT=.gmo
3578 INSTOBJEXT=.mo
3579 DATADIRNAME=share
3580 INTLDEPS='$(top_builddir)/../intl/libintl.a'
3581 INTLLIBS=$INTLDEPS
3582 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3583 nls_cv_header_intl=libintl.h
3584 nls_cv_header_libgt=libgettext.h
3585 fi
3586
3587 if test "$XGETTEXT" != ":"; then
3588 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3589 : ;
3590 else
3591 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3592 XGETTEXT=":"
3593 fi
3594 fi
3595
3596 # We need to process the po/ directory.
3597 POSUB=po
3598 else
3599 DATADIRNAME=share
3600 nls_cv_header_intl=libintl.h
3601 nls_cv_header_libgt=libgettext.h
3602 fi
3603
3604 # If this is used in GNU gettext we have to set USE_NLS to `yes'
3605 # because some of the sources are only built for this goal.
3606 if test "$PACKAGE" = gettext; then
3607 USE_NLS=yes
3608 USE_INCLUDED_LIBINTL=yes
3609 fi
3610
3611 for lang in $ALL_LINGUAS; do
3612 GMOFILES="$GMOFILES $lang.gmo"
3613 POFILES="$POFILES $lang.po"
3614 done
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629 if test "x$CATOBJEXT" != "x"; then
3630 if test "x$ALL_LINGUAS" = "x"; then
3631 LINGUAS=
3632 else
3633 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
a2d91340 3634echo "configure:3635: checking for catalogs to be installed" >&5
252b5132
RH
3635 NEW_LINGUAS=
3636 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3637 case "$ALL_LINGUAS" in
3638 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3639 esac
3640 done
3641 LINGUAS=$NEW_LINGUAS
3642 echo "$ac_t""$LINGUAS" 1>&6
3643 fi
3644
3645 if test -n "$LINGUAS"; then
3646 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3647 fi
3648 fi
3649
3650 if test $ac_cv_header_locale_h = yes; then
3651 INCLUDE_LOCALE_H="#include <locale.h>"
3652 else
3653 INCLUDE_LOCALE_H="\
3654/* The system does not provide the header <locale.h>. Take care yourself. */"
3655 fi
3656
3657
3658 if test -f $srcdir/po2tbl.sed.in; then
3659 if test "$CATOBJEXT" = ".cat"; then
3660 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3661echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
a2d91340 3662echo "configure:3663: checking for linux/version.h" >&5
252b5132
RH
3663if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3664 echo $ac_n "(cached) $ac_c" 1>&6
3665else
3666 cat > conftest.$ac_ext <<EOF
a2d91340 3667#line 3668 "configure"
252b5132
RH
3668#include "confdefs.h"
3669#include <linux/version.h>
3670EOF
3671ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 3672{ (eval echo configure:3673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3673ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3674if test -z "$ac_err"; then
3675 rm -rf conftest*
3676 eval "ac_cv_header_$ac_safe=yes"
3677else
3678 echo "$ac_err" >&5
3679 echo "configure: failed program was:" >&5
3680 cat conftest.$ac_ext >&5
3681 rm -rf conftest*
3682 eval "ac_cv_header_$ac_safe=no"
3683fi
3684rm -f conftest*
3685fi
3686if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3687 echo "$ac_t""yes" 1>&6
3688 msgformat=linux
3689else
3690 echo "$ac_t""no" 1>&6
3691msgformat=xopen
3692fi
3693
3694
3695 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
3696 fi
3697 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
3698 $srcdir/po2tbl.sed.in > po2tbl.sed
3699 fi
3700
3701 if test "$PACKAGE" = "gettext"; then
3702 GT_NO="#NO#"
3703 GT_YES=
3704 else
3705 GT_NO=
3706 GT_YES="#YES#"
3707 fi
3708
3709
3710
3711 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
3712
3713
3714 l=
3715
3716
3717 if test -d $srcdir/po; then
3718 test -d po || mkdir po
3719 if test "x$srcdir" != "x."; then
3720 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3721 posrcprefix="$srcdir/"
3722 else
3723 posrcprefix="../$srcdir/"
3724 fi
3725 else
3726 posrcprefix="../"
3727 fi
3728 rm -f po/POTFILES
3729 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
3730 < $srcdir/po/POTFILES.in > po/POTFILES
3731 fi
3732
3733
3734echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
a2d91340 3735echo "configure:3736: checking whether to enable maintainer-specific portions of Makefiles" >&5
252b5132
RH
3736 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3737if test "${enable_maintainer_mode+set}" = set; then
3738 enableval="$enable_maintainer_mode"
3739 USE_MAINTAINER_MODE=$enableval
3740else
3741 USE_MAINTAINER_MODE=no
3742fi
3743
3744 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
3745
3746
3747if test $USE_MAINTAINER_MODE = yes; then
3748 MAINTAINER_MODE_TRUE=
3749 MAINTAINER_MODE_FALSE='#'
3750else
3751 MAINTAINER_MODE_TRUE='#'
3752 MAINTAINER_MODE_FALSE=
3753fi
3754 MAINT=$MAINTAINER_MODE_TRUE
3755
3756
3757echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
a2d91340 3758echo "configure:3759: checking for Cygwin environment" >&5
252b5132
RH
3759if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
3760 echo $ac_n "(cached) $ac_c" 1>&6
3761else
3762 cat > conftest.$ac_ext <<EOF
a2d91340 3763#line 3764 "configure"
252b5132
RH
3764#include "confdefs.h"
3765
3766int main() {
3767
3768#ifndef __CYGWIN__
3769#define __CYGWIN__ __CYGWIN32__
3770#endif
3771return __CYGWIN__;
3772; return 0; }
3773EOF
a2d91340 3774if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
3775 rm -rf conftest*
3776 ac_cv_cygwin=yes
3777else
3778 echo "configure: failed program was:" >&5
3779 cat conftest.$ac_ext >&5
3780 rm -rf conftest*
3781 ac_cv_cygwin=no
3782fi
3783rm -f conftest*
3784rm -f conftest*
3785fi
3786
3787echo "$ac_t""$ac_cv_cygwin" 1>&6
3788CYGWIN=
3789test "$ac_cv_cygwin" = yes && CYGWIN=yes
3790echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
a2d91340 3791echo "configure:3792: checking for mingw32 environment" >&5
252b5132
RH
3792if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
3793 echo $ac_n "(cached) $ac_c" 1>&6
3794else
3795 cat > conftest.$ac_ext <<EOF
a2d91340 3796#line 3797 "configure"
252b5132
RH
3797#include "confdefs.h"
3798
3799int main() {
3800return __MINGW32__;
3801; return 0; }
3802EOF
a2d91340 3803if { (eval echo configure:3804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
3804 rm -rf conftest*
3805 ac_cv_mingw32=yes
3806else
3807 echo "configure: failed program was:" >&5
3808 cat conftest.$ac_ext >&5
3809 rm -rf conftest*
3810 ac_cv_mingw32=no
3811fi
3812rm -f conftest*
3813rm -f conftest*
3814fi
3815
3816echo "$ac_t""$ac_cv_mingw32" 1>&6
3817MINGW32=
3818test "$ac_cv_mingw32" = yes && MINGW32=yes
3819
3820
3821echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
a2d91340 3822echo "configure:3823: checking for executable suffix" >&5
252b5132
RH
3823if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3824 echo $ac_n "(cached) $ac_c" 1>&6
3825else
3826 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3827 ac_cv_exeext=.exe
3828else
3829 rm -f conftest*
3830 echo 'int main () { return 0; }' > conftest.$ac_ext
3831 ac_cv_exeext=
a2d91340 3832 if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
252b5132
RH
3833 for file in conftest.*; do
3834 case $file in
3835 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3836 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3837 esac
3838 done
3839 else
3840 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3841 fi
3842 rm -f conftest*
3843 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3844fi
3845fi
3846
3847EXEEXT=""
3848test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3849echo "$ac_t""${ac_cv_exeext}" 1>&6
3850ac_exeext=$EXEEXT
3851
2481e6a2
ILT
3852if test -n "$EXEEXT"; then
3853 cat >> confdefs.h <<\EOF
3854#define HAVE_EXECUTABLE_SUFFIX 1
3855EOF
3856
3857fi
bb0cb4db
ILT
3858cat >> confdefs.h <<EOF
3859#define EXECUTABLE_SUFFIX "${EXEEXT}"
3860EOF
3861
252b5132
RH
3862
3863# host-specific stuff:
3864
3865HDEFINES=
3866
3867. ${srcdir}/../bfd/configure.host
3868
3869
3870AR=${AR-ar}
3871
3872# Extract the first word of "ranlib", so it can be a program name with args.
3873set dummy ranlib; ac_word=$2
3874echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a2d91340 3875echo "configure:3876: checking for $ac_word" >&5
252b5132
RH
3876if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3877 echo $ac_n "(cached) $ac_c" 1>&6
3878else
3879 if test -n "$RANLIB"; then
3880 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3881else
3882 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3883 ac_dummy="$PATH"
3884 for ac_dir in $ac_dummy; do
3885 test -z "$ac_dir" && ac_dir=.
3886 if test -f $ac_dir/$ac_word; then
3887 ac_cv_prog_RANLIB="ranlib"
3888 break
3889 fi
3890 done
3891 IFS="$ac_save_ifs"
3892 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3893fi
3894fi
3895RANLIB="$ac_cv_prog_RANLIB"
3896if test -n "$RANLIB"; then
3897 echo "$ac_t""$RANLIB" 1>&6
3898else
3899 echo "$ac_t""no" 1>&6
3900fi
3901
3902# Find a good install program. We prefer a C program (faster),
3903# so one script is as good as another. But avoid the broken or
3904# incompatible versions:
3905# SysV /etc/install, /usr/sbin/install
3906# SunOS /usr/etc/install
3907# IRIX /sbin/install
3908# AIX /bin/install
3909# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3910# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3911# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3912# ./install, which can be erroneously created by make from ./install.sh.
3913echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
a2d91340 3914echo "configure:3915: checking for a BSD compatible install" >&5
252b5132
RH
3915if test -z "$INSTALL"; then
3916if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3917 echo $ac_n "(cached) $ac_c" 1>&6
3918else
3919 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3920 for ac_dir in $PATH; do
3921 # Account for people who put trailing slashes in PATH elements.
3922 case "$ac_dir/" in
3923 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3924 *)
3925 # OSF1 and SCO ODT 3.0 have their own names for install.
3926 # Don't use installbsd from OSF since it installs stuff as root
3927 # by default.
3928 for ac_prog in ginstall scoinst install; do
3929 if test -f $ac_dir/$ac_prog; then
3930 if test $ac_prog = install &&
3931 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3932 # AIX install. It has an incompatible calling convention.
3933 :
3934 else
3935 ac_cv_path_install="$ac_dir/$ac_prog -c"
3936 break 2
3937 fi
3938 fi
3939 done
3940 ;;
3941 esac
3942 done
3943 IFS="$ac_save_IFS"
3944
3945fi
3946 if test "${ac_cv_path_install+set}" = set; then
3947 INSTALL="$ac_cv_path_install"
3948 else
3949 # As a last resort, use the slow shell script. We don't cache a
3950 # path for INSTALL within a source directory, because that will
3951 # break other packages using the cache if that directory is
3952 # removed, or if the path is relative.
3953 INSTALL="$ac_install_sh"
3954 fi
3955fi
3956echo "$ac_t""$INSTALL" 1>&6
3957
3958# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3959# It thinks the first close brace ends the variable substitution.
3960test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3961
3962test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3963
3964test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3965
3966
3967# Put a plausible default for CC_FOR_BUILD in Makefile.
3968if test -z "$CC_FOR_BUILD"; then
3969 if test "x$cross_compiling" = "xno"; then
3970 CC_FOR_BUILD='$(CC)'
3971 else
3972 CC_FOR_BUILD=gcc
3973 fi
3974fi
3975
3976# Also set EXEEXT_FOR_BUILD.
3977if test "x$cross_compiling" = "xno"; then
3978 EXEEXT_FOR_BUILD='$(EXEEXT)'
3979else
3980 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
a2d91340 3981echo "configure:3982: checking for build system executable suffix" >&5
252b5132
RH
3982if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
3983 echo $ac_n "(cached) $ac_c" 1>&6
3984else
7a7b06ef
ILT
3985 rm -f conftest*
3986 echo 'int main () { return 0; }' > conftest.c
3987 bfd_cv_build_exeext=
3988 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
3989 for file in conftest.*; do
3990 case $file in
3991 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3992 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
3993 esac
3994 done
3995 rm -f conftest*
3996 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
252b5132
RH
3997fi
3998
3999echo "$ac_t""$bfd_cv_build_exeext" 1>&6
4000 EXEEXT_FOR_BUILD=""
4001 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4002fi
4003
4004
8a965946
ILT
4005DEMANGLER_NAME=c++filt
4006case "${host}" in
4007 *-*-go32* | *-*-msdos*)
4008 DEMANGLER_NAME=cxxfilt
4009esac
4010
4011
252b5132
RH
4012for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
4013do
4014ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4015echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a2d91340 4016echo "configure:4017: checking for $ac_hdr" >&5
252b5132
RH
4017if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4018 echo $ac_n "(cached) $ac_c" 1>&6
4019else
4020 cat > conftest.$ac_ext <<EOF
a2d91340 4021#line 4022 "configure"
252b5132
RH
4022#include "confdefs.h"
4023#include <$ac_hdr>
4024EOF
4025ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a2d91340 4026{ (eval echo configure:4027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
4027ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4028if test -z "$ac_err"; then
4029 rm -rf conftest*
4030 eval "ac_cv_header_$ac_safe=yes"
4031else
4032 echo "$ac_err" >&5
4033 echo "configure: failed program was:" >&5
4034 cat conftest.$ac_ext >&5
4035 rm -rf conftest*
4036 eval "ac_cv_header_$ac_safe=no"
4037fi
4038rm -f conftest*
4039fi
4040if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4041 echo "$ac_t""yes" 1>&6
4042 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4043 cat >> confdefs.h <<EOF
4044#define $ac_tr_hdr 1
4045EOF
4046
4047else
4048 echo "$ac_t""no" 1>&6
4049fi
4050done
4051
4052echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
a2d91340 4053echo "configure:4054: checking for sys/wait.h that is POSIX.1 compatible" >&5
252b5132
RH
4054if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4055 echo $ac_n "(cached) $ac_c" 1>&6
4056else
4057 cat > conftest.$ac_ext <<EOF
a2d91340 4058#line 4059 "configure"
252b5132
RH
4059#include "confdefs.h"
4060#include <sys/types.h>
4061#include <sys/wait.h>
4062#ifndef WEXITSTATUS
4063#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4064#endif
4065#ifndef WIFEXITED
4066#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4067#endif
4068int main() {
4069int s;
4070wait (&s);
4071s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4072; return 0; }
4073EOF
a2d91340 4074if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4075 rm -rf conftest*
4076 ac_cv_header_sys_wait_h=yes
4077else
4078 echo "configure: failed program was:" >&5
4079 cat conftest.$ac_ext >&5
4080 rm -rf conftest*
4081 ac_cv_header_sys_wait_h=no
4082fi
4083rm -f conftest*
4084fi
4085
4086echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4087if test $ac_cv_header_sys_wait_h = yes; then
4088 cat >> confdefs.h <<\EOF
4089#define HAVE_SYS_WAIT_H 1
4090EOF
4091
4092fi
4093
4094# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4095# for constant arguments. Useless!
4096echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
a2d91340 4097echo "configure:4098: checking for working alloca.h" >&5
252b5132
RH
4098if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4099 echo $ac_n "(cached) $ac_c" 1>&6
4100else
4101 cat > conftest.$ac_ext <<EOF
a2d91340 4102#line 4103 "configure"
252b5132
RH
4103#include "confdefs.h"
4104#include <alloca.h>
4105int main() {
4106char *p = alloca(2 * sizeof(int));
4107; return 0; }
4108EOF
a2d91340 4109if { (eval echo configure:4110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4110 rm -rf conftest*
4111 ac_cv_header_alloca_h=yes
4112else
4113 echo "configure: failed program was:" >&5
4114 cat conftest.$ac_ext >&5
4115 rm -rf conftest*
4116 ac_cv_header_alloca_h=no
4117fi
4118rm -f conftest*
4119fi
4120
4121echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4122if test $ac_cv_header_alloca_h = yes; then
4123 cat >> confdefs.h <<\EOF
4124#define HAVE_ALLOCA_H 1
4125EOF
4126
4127fi
4128
4129echo $ac_n "checking for alloca""... $ac_c" 1>&6
a2d91340 4130echo "configure:4131: checking for alloca" >&5
252b5132
RH
4131if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4132 echo $ac_n "(cached) $ac_c" 1>&6
4133else
4134 cat > conftest.$ac_ext <<EOF
a2d91340 4135#line 4136 "configure"
252b5132
RH
4136#include "confdefs.h"
4137
4138#ifdef __GNUC__
4139# define alloca __builtin_alloca
4140#else
4141# ifdef _MSC_VER
4142# include <malloc.h>
4143# define alloca _alloca
4144# else
4145# if HAVE_ALLOCA_H
4146# include <alloca.h>
4147# else
4148# ifdef _AIX
4149 #pragma alloca
4150# else
4151# ifndef alloca /* predefined by HP cc +Olibcalls */
4152char *alloca ();
4153# endif
4154# endif
4155# endif
4156# endif
4157#endif
4158
4159int main() {
4160char *p = (char *) alloca(1);
4161; return 0; }
4162EOF
a2d91340 4163if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4164 rm -rf conftest*
4165 ac_cv_func_alloca_works=yes
4166else
4167 echo "configure: failed program was:" >&5
4168 cat conftest.$ac_ext >&5
4169 rm -rf conftest*
4170 ac_cv_func_alloca_works=no
4171fi
4172rm -f conftest*
4173fi
4174
4175echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4176if test $ac_cv_func_alloca_works = yes; then
4177 cat >> confdefs.h <<\EOF
4178#define HAVE_ALLOCA 1
4179EOF
4180
4181fi
4182
4183if test $ac_cv_func_alloca_works = no; then
4184 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4185 # that cause trouble. Some versions do not even contain alloca or
4186 # contain a buggy version. If you still want to use their alloca,
4187 # use ar to extract alloca.o from them instead of compiling alloca.c.
4188 ALLOCA=alloca.${ac_objext}
4189 cat >> confdefs.h <<\EOF
4190#define C_ALLOCA 1
4191EOF
4192
4193
4194echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
a2d91340 4195echo "configure:4196: checking whether alloca needs Cray hooks" >&5
252b5132
RH
4196if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4197 echo $ac_n "(cached) $ac_c" 1>&6
4198else
4199 cat > conftest.$ac_ext <<EOF
a2d91340 4200#line 4201 "configure"
252b5132
RH
4201#include "confdefs.h"
4202#if defined(CRAY) && ! defined(CRAY2)
4203webecray
4204#else
4205wenotbecray
4206#endif
4207
4208EOF
4209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4210 egrep "webecray" >/dev/null 2>&1; then
4211 rm -rf conftest*
4212 ac_cv_os_cray=yes
4213else
4214 rm -rf conftest*
4215 ac_cv_os_cray=no
4216fi
4217rm -f conftest*
4218
4219fi
4220
4221echo "$ac_t""$ac_cv_os_cray" 1>&6
4222if test $ac_cv_os_cray = yes; then
4223for ac_func in _getb67 GETB67 getb67; do
4224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a2d91340 4225echo "configure:4226: checking for $ac_func" >&5
252b5132
RH
4226if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4227 echo $ac_n "(cached) $ac_c" 1>&6
4228else
4229 cat > conftest.$ac_ext <<EOF
a2d91340 4230#line 4231 "configure"
252b5132
RH
4231#include "confdefs.h"
4232/* System header to define __stub macros and hopefully few prototypes,
4233 which can conflict with char $ac_func(); below. */
4234#include <assert.h>
4235/* Override any gcc2 internal prototype to avoid an error. */
4236/* We use char because int might match the return type of a gcc2
4237 builtin and then its argument prototype would still apply. */
4238char $ac_func();
4239
4240int main() {
4241
4242/* The GNU C library defines this for functions which it implements
4243 to always fail with ENOSYS. Some functions are actually named
4244 something starting with __ and the normal name is an alias. */
4245#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4246choke me
4247#else
4248$ac_func();
4249#endif
4250
4251; return 0; }
4252EOF
a2d91340 4253if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4254 rm -rf conftest*
4255 eval "ac_cv_func_$ac_func=yes"
4256else
4257 echo "configure: failed program was:" >&5
4258 cat conftest.$ac_ext >&5
4259 rm -rf conftest*
4260 eval "ac_cv_func_$ac_func=no"
4261fi
4262rm -f conftest*
4263fi
4264
4265if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4266 echo "$ac_t""yes" 1>&6
4267 cat >> confdefs.h <<EOF
4268#define CRAY_STACKSEG_END $ac_func
4269EOF
4270
4271 break
4272else
4273 echo "$ac_t""no" 1>&6
4274fi
4275
4276done
4277fi
4278
4279echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
a2d91340 4280echo "configure:4281: checking stack direction for C alloca" >&5
252b5132
RH
4281if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4282 echo $ac_n "(cached) $ac_c" 1>&6
4283else
4284 if test "$cross_compiling" = yes; then
4285 ac_cv_c_stack_direction=0
4286else
4287 cat > conftest.$ac_ext <<EOF
a2d91340 4288#line 4289 "configure"
252b5132
RH
4289#include "confdefs.h"
4290find_stack_direction ()
4291{
4292 static char *addr = 0;
4293 auto char dummy;
4294 if (addr == 0)
4295 {
4296 addr = &dummy;
4297 return find_stack_direction ();
4298 }
4299 else
4300 return (&dummy > addr) ? 1 : -1;
4301}
4302main ()
4303{
4304 exit (find_stack_direction() < 0);
4305}
4306EOF
a2d91340 4307if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
4308then
4309 ac_cv_c_stack_direction=1
4310else
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4313 rm -fr conftest*
4314 ac_cv_c_stack_direction=-1
4315fi
4316rm -fr conftest*
4317fi
4318
4319fi
4320
4321echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4322cat >> confdefs.h <<EOF
4323#define STACK_DIRECTION $ac_cv_c_stack_direction
4324EOF
4325
4326fi
4327
5af11cab 4328for ac_func in sbrk utimes setmode
252b5132
RH
4329do
4330echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a2d91340 4331echo "configure:4332: checking for $ac_func" >&5
252b5132
RH
4332if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4333 echo $ac_n "(cached) $ac_c" 1>&6
4334else
4335 cat > conftest.$ac_ext <<EOF
a2d91340 4336#line 4337 "configure"
252b5132
RH
4337#include "confdefs.h"
4338/* System header to define __stub macros and hopefully few prototypes,
4339 which can conflict with char $ac_func(); below. */
4340#include <assert.h>
4341/* Override any gcc2 internal prototype to avoid an error. */
4342/* We use char because int might match the return type of a gcc2
4343 builtin and then its argument prototype would still apply. */
4344char $ac_func();
4345
4346int main() {
4347
4348/* The GNU C library defines this for functions which it implements
4349 to always fail with ENOSYS. Some functions are actually named
4350 something starting with __ and the normal name is an alias. */
4351#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4352choke me
4353#else
4354$ac_func();
4355#endif
4356
4357; return 0; }
4358EOF
a2d91340 4359if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4360 rm -rf conftest*
4361 eval "ac_cv_func_$ac_func=yes"
4362else
4363 echo "configure: failed program was:" >&5
4364 cat conftest.$ac_ext >&5
4365 rm -rf conftest*
4366 eval "ac_cv_func_$ac_func=no"
4367fi
4368rm -f conftest*
4369fi
4370
4371if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4372 echo "$ac_t""yes" 1>&6
4373 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4374 cat >> confdefs.h <<EOF
4375#define $ac_tr_func 1
4376EOF
4377
4378else
4379 echo "$ac_t""no" 1>&6
4380fi
4381done
4382
4383
f353eb8a
ILT
4384# Some systems have frexp only in -lm, not in -lc.
4385
4386echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
a2d91340 4387echo "configure:4388: checking for library containing frexp" >&5
f353eb8a
ILT
4388if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
4389 echo $ac_n "(cached) $ac_c" 1>&6
4390else
4391 ac_func_search_save_LIBS="$LIBS"
4392ac_cv_search_frexp="no"
4393cat > conftest.$ac_ext <<EOF
a2d91340 4394#line 4395 "configure"
f353eb8a
ILT
4395#include "confdefs.h"
4396/* Override any gcc2 internal prototype to avoid an error. */
4397/* We use char because int might match the return type of a gcc2
4398 builtin and then its argument prototype would still apply. */
4399char frexp();
4400
4401int main() {
4402frexp()
4403; return 0; }
4404EOF
a2d91340 4405if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f353eb8a
ILT
4406 rm -rf conftest*
4407 ac_cv_search_frexp="none required"
4408else
4409 echo "configure: failed program was:" >&5
4410 cat conftest.$ac_ext >&5
4411fi
4412rm -f conftest*
9a1cab10 4413test "$ac_cv_search_frexp" = "no" && for i in m; do
f353eb8a
ILT
4414LIBS="-l$i $ac_func_search_save_LIBS"
4415cat > conftest.$ac_ext <<EOF
a2d91340 4416#line 4417 "configure"
f353eb8a
ILT
4417#include "confdefs.h"
4418/* Override any gcc2 internal prototype to avoid an error. */
4419/* We use char because int might match the return type of a gcc2
4420 builtin and then its argument prototype would still apply. */
4421char frexp();
4422
4423int main() {
4424frexp()
4425; return 0; }
4426EOF
a2d91340 4427if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
f353eb8a
ILT
4428 rm -rf conftest*
4429 ac_cv_search_frexp="-l$i"
4430break
4431else
4432 echo "configure: failed program was:" >&5
4433 cat conftest.$ac_ext >&5
4434fi
4435rm -f conftest*
4436done
4437LIBS="$ac_func_search_save_LIBS"
4438fi
4439
4440echo "$ac_t""$ac_cv_search_frexp" 1>&6
4441if test "$ac_cv_search_frexp" != "no"; then
4442 test "$ac_cv_search_frexp" = "none required" || LIBS="$ac_cv_search_frexp $LIBS"
4443
4444else :
4445
4446fi
4447
252b5132 4448echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
a2d91340 4449echo "configure:4450: checking for time_t in time.h" >&5
252b5132
RH
4450if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
4451 echo $ac_n "(cached) $ac_c" 1>&6
4452else
4453 cat > conftest.$ac_ext <<EOF
a2d91340 4454#line 4455 "configure"
252b5132
RH
4455#include "confdefs.h"
4456#include <time.h>
4457int main() {
4458time_t i;
4459; return 0; }
4460EOF
a2d91340 4461if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4462 rm -rf conftest*
4463 bu_cv_decl_time_t_time_h=yes
4464else
4465 echo "configure: failed program was:" >&5
4466 cat conftest.$ac_ext >&5
4467 rm -rf conftest*
4468 bu_cv_decl_time_t_time_h=no
4469fi
4470rm -f conftest*
4471fi
4472
4473echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
4474if test $bu_cv_decl_time_t_time_h = yes; then
4475 cat >> confdefs.h <<\EOF
4476#define HAVE_TIME_T_IN_TIME_H 1
4477EOF
4478
4479fi
4480
4481echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
a2d91340 4482echo "configure:4483: checking for time_t in sys/types.h" >&5
252b5132
RH
4483if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
4484 echo $ac_n "(cached) $ac_c" 1>&6
4485else
4486 cat > conftest.$ac_ext <<EOF
a2d91340 4487#line 4488 "configure"
252b5132
RH
4488#include "confdefs.h"
4489#include <sys/types.h>
4490int main() {
4491time_t i;
4492; return 0; }
4493EOF
a2d91340 4494if { (eval echo configure:4495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4495 rm -rf conftest*
4496 bu_cv_decl_time_t_types_h=yes
4497else
4498 echo "configure: failed program was:" >&5
4499 cat conftest.$ac_ext >&5
4500 rm -rf conftest*
4501 bu_cv_decl_time_t_types_h=no
4502fi
4503rm -f conftest*
4504fi
4505
4506echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
4507if test $bu_cv_decl_time_t_types_h = yes; then
4508 cat >> confdefs.h <<\EOF
4509#define HAVE_TIME_T_IN_TYPES_H 1
4510EOF
4511
4512fi
4513
4514# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
4515# by default.
4516echo $ac_n "checking for utime.h""... $ac_c" 1>&6
a2d91340 4517echo "configure:4518: checking for utime.h" >&5
252b5132
RH
4518if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
4519 echo $ac_n "(cached) $ac_c" 1>&6
4520else
4521 cat > conftest.$ac_ext <<EOF
a2d91340 4522#line 4523 "configure"
252b5132
RH
4523#include "confdefs.h"
4524#include <sys/types.h>
4525#ifdef HAVE_TIME_H
4526#include <time.h>
4527#endif
4528#include <utime.h>
4529int main() {
4530struct utimbuf s;
4531; return 0; }
4532EOF
a2d91340 4533if { (eval echo configure:4534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4534 rm -rf conftest*
4535 bu_cv_header_utime_h=yes
4536else
4537 echo "configure: failed program was:" >&5
4538 cat conftest.$ac_ext >&5
4539 rm -rf conftest*
4540 bu_cv_header_utime_h=no
4541fi
4542rm -f conftest*
4543fi
4544
4545echo "$ac_t""$bu_cv_header_utime_h" 1>&6
4546if test $bu_cv_header_utime_h = yes; then
4547 cat >> confdefs.h <<\EOF
4548#define HAVE_GOOD_UTIME_H 1
4549EOF
4550
4551fi
4552
4553echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
a2d91340 4554echo "configure:4555: checking whether fprintf must be declared" >&5
252b5132
RH
4555if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
4556 echo $ac_n "(cached) $ac_c" 1>&6
4557else
4558 cat > conftest.$ac_ext <<EOF
a2d91340 4559#line 4560 "configure"
252b5132
RH
4560#include "confdefs.h"
4561
4562#include <stdio.h>
4563#ifdef HAVE_STRING_H
4564#include <string.h>
4565#else
4566#ifdef HAVE_STRINGS_H
4567#include <strings.h>
4568#endif
4569#endif
4570#ifdef HAVE_STDLIB_H
4571#include <stdlib.h>
4572#endif
4573#ifdef HAVE_UNISTD_H
4574#include <unistd.h>
4575#endif
4576int main() {
4577char *(*pfn) = (char *(*)) fprintf
4578; return 0; }
4579EOF
a2d91340 4580if { (eval echo configure:4581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4581 rm -rf conftest*
4582 bfd_cv_decl_needed_fprintf=no
4583else
4584 echo "configure: failed program was:" >&5
4585 cat conftest.$ac_ext >&5
4586 rm -rf conftest*
4587 bfd_cv_decl_needed_fprintf=yes
4588fi
4589rm -f conftest*
4590fi
4591
4592echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
4593if test $bfd_cv_decl_needed_fprintf = yes; then
4594 cat >> confdefs.h <<\EOF
4595#define NEED_DECLARATION_FPRINTF 1
4596EOF
4597
4598fi
4599
4600echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
a2d91340 4601echo "configure:4602: checking whether strstr must be declared" >&5
252b5132
RH
4602if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4603 echo $ac_n "(cached) $ac_c" 1>&6
4604else
4605 cat > conftest.$ac_ext <<EOF
a2d91340 4606#line 4607 "configure"
252b5132
RH
4607#include "confdefs.h"
4608
4609#include <stdio.h>
4610#ifdef HAVE_STRING_H
4611#include <string.h>
4612#else
4613#ifdef HAVE_STRINGS_H
4614#include <strings.h>
4615#endif
4616#endif
4617#ifdef HAVE_STDLIB_H
4618#include <stdlib.h>
4619#endif
4620#ifdef HAVE_UNISTD_H
4621#include <unistd.h>
4622#endif
4623int main() {
4624char *(*pfn) = (char *(*)) strstr
4625; return 0; }
4626EOF
a2d91340 4627if { (eval echo configure:4628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4628 rm -rf conftest*
4629 bfd_cv_decl_needed_strstr=no
4630else
4631 echo "configure: failed program was:" >&5
4632 cat conftest.$ac_ext >&5
4633 rm -rf conftest*
4634 bfd_cv_decl_needed_strstr=yes
4635fi
4636rm -f conftest*
4637fi
4638
4639echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4640if test $bfd_cv_decl_needed_strstr = yes; then
4641 cat >> confdefs.h <<\EOF
4642#define NEED_DECLARATION_STRSTR 1
4643EOF
4644
4645fi
4646
4647echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
a2d91340 4648echo "configure:4649: checking whether sbrk must be declared" >&5
252b5132
RH
4649if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
4650 echo $ac_n "(cached) $ac_c" 1>&6
4651else
4652 cat > conftest.$ac_ext <<EOF
a2d91340 4653#line 4654 "configure"
252b5132
RH
4654#include "confdefs.h"
4655
4656#include <stdio.h>
4657#ifdef HAVE_STRING_H
4658#include <string.h>
4659#else
4660#ifdef HAVE_STRINGS_H
4661#include <strings.h>
4662#endif
4663#endif
4664#ifdef HAVE_STDLIB_H
4665#include <stdlib.h>
4666#endif
4667#ifdef HAVE_UNISTD_H
4668#include <unistd.h>
4669#endif
4670int main() {
4671char *(*pfn) = (char *(*)) sbrk
4672; return 0; }
4673EOF
a2d91340 4674if { (eval echo configure:4675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4675 rm -rf conftest*
4676 bfd_cv_decl_needed_sbrk=no
4677else
4678 echo "configure: failed program was:" >&5
4679 cat conftest.$ac_ext >&5
4680 rm -rf conftest*
4681 bfd_cv_decl_needed_sbrk=yes
4682fi
4683rm -f conftest*
4684fi
4685
4686echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
4687if test $bfd_cv_decl_needed_sbrk = yes; then
4688 cat >> confdefs.h <<\EOF
4689#define NEED_DECLARATION_SBRK 1
4690EOF
4691
4692fi
4693
4694echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
a2d91340 4695echo "configure:4696: checking whether getenv must be declared" >&5
252b5132
RH
4696if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4697 echo $ac_n "(cached) $ac_c" 1>&6
4698else
4699 cat > conftest.$ac_ext <<EOF
a2d91340 4700#line 4701 "configure"
252b5132
RH
4701#include "confdefs.h"
4702
4703#include <stdio.h>
4704#ifdef HAVE_STRING_H
4705#include <string.h>
4706#else
4707#ifdef HAVE_STRINGS_H
4708#include <strings.h>
4709#endif
4710#endif
4711#ifdef HAVE_STDLIB_H
4712#include <stdlib.h>
4713#endif
4714#ifdef HAVE_UNISTD_H
4715#include <unistd.h>
4716#endif
4717int main() {
4718char *(*pfn) = (char *(*)) getenv
4719; return 0; }
4720EOF
a2d91340 4721if { (eval echo configure:4722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4722 rm -rf conftest*
4723 bfd_cv_decl_needed_getenv=no
4724else
4725 echo "configure: failed program was:" >&5
4726 cat conftest.$ac_ext >&5
4727 rm -rf conftest*
4728 bfd_cv_decl_needed_getenv=yes
4729fi
4730rm -f conftest*
4731fi
4732
4733echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4734if test $bfd_cv_decl_needed_getenv = yes; then
4735 cat >> confdefs.h <<\EOF
4736#define NEED_DECLARATION_GETENV 1
4737EOF
4738
4739fi
4740
4741echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
a2d91340 4742echo "configure:4743: checking whether environ must be declared" >&5
252b5132
RH
4743if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
4744 echo $ac_n "(cached) $ac_c" 1>&6
4745else
4746 cat > conftest.$ac_ext <<EOF
a2d91340 4747#line 4748 "configure"
252b5132
RH
4748#include "confdefs.h"
4749
4750#include <stdio.h>
4751#ifdef HAVE_STRING_H
4752#include <string.h>
4753#else
4754#ifdef HAVE_STRINGS_H
4755#include <strings.h>
4756#endif
4757#endif
4758#ifdef HAVE_STDLIB_H
4759#include <stdlib.h>
4760#endif
4761#ifdef HAVE_UNISTD_H
4762#include <unistd.h>
4763#endif
4764int main() {
4765char *(*pfn) = (char *(*)) environ
4766; return 0; }
4767EOF
a2d91340 4768if { (eval echo configure:4769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4769 rm -rf conftest*
4770 bfd_cv_decl_needed_environ=no
4771else
4772 echo "configure: failed program was:" >&5
4773 cat conftest.$ac_ext >&5
4774 rm -rf conftest*
4775 bfd_cv_decl_needed_environ=yes
4776fi
4777rm -f conftest*
4778fi
4779
4780echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
4781if test $bfd_cv_decl_needed_environ = yes; then
4782 cat >> confdefs.h <<\EOF
4783#define NEED_DECLARATION_ENVIRON 1
4784EOF
4785
4786fi
4787
4788
4789
4790case "${host}" in
8a965946 4791*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
252b5132
RH
4792 cat >> confdefs.h <<\EOF
4793#define USE_BINARY_FOPEN 1
4794EOF
4795 ;;
4796esac
4797
4798# target-specific stuff:
4799
4800# Canonicalize the secondary target names.
4801if test -n "$enable_targets"; then
4802 for targ in `echo $enable_targets | sed 's/,/ /g'`
4803 do
6d83c84b 4804 result=`$ac_config_sub $targ 2>/dev/null`
252b5132
RH
4805 if test -n "$result"; then
4806 canon_targets="$canon_targets $result"
4807 else
4808 # Allow targets that config.sub doesn't recognize, like "all".
4809 canon_targets="$canon_targets $targ"
4810 fi
4811 done
4812fi
4813
4814all_targets=false
4815BUILD_NLMCONV=
4816NLMCONV_DEFS=
4817BUILD_SRCONV=
4818BUILD_DLLTOOL=
4819DLLTOOL_DEFS=
4820BUILD_WINDRES=
4821BUILD_DLLWRAP=
4822BUILD_MISC=
4823
4824for targ in $target $canon_targets
4825do
4826 if test "x$targ" = "xall"; then
4827 all_targets=true
4828 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4829 BUILD_SRCONV='$(SRCONV_PROG)'
4830 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
4831 else
4832 case $targ in
4833 i[3456]86*-*-netware*)
4834 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4835 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
4836 ;;
4837 alpha*-*-netware*)
4838 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4839 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
4840 ;;
4841 powerpc*-*-netware*)
4842 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4843 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
4844 ;;
4845 sparc*-*-netware*)
4846 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
4847 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
4848 ;;
4849 esac
4850 case $targ in
4851 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
4852 esac
4853 case $targ in
8a0e0f38 4854 arm-*pe* | arm-*-wince)
252b5132
RH
4855 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4856 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
4857 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
7a7b06ef 4858 ;;
252b5132
RH
4859 thumb-*pe*)
4860 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4861 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
4862 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
7a7b06ef 4863 ;;
252b5132
RH
4864 i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*)
4865 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4866 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
4867 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4868 BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
7a7b06ef
ILT
4869 ;;
4870 i3-686-*-interix)
4871 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
4872 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
4873 ;;
252b5132
RH
4874 powerpc*-*-*pe* | powerpc*-*-cygwin*)
4875 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4876 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
4877 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
8a0e0f38
NC
4878 ;;
4879 sh*-*-*pe)
4880 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4881 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
4882 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
4883 ;;
4884 mips*-*-*pe)
4885 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4886 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
4887 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
7a7b06ef 4888 ;;
661016bb
NC
4889 mcore-*pe)
4890 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4891 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
4892 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
7a7b06ef 4893 ;;
661016bb
NC
4894 mcore-*elf)
4895 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
4896 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
7a7b06ef 4897 ;;
252b5132
RH
4898 esac
4899 fi
4900done
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911cat >> confdefs.h <<EOF
4912#define TARGET "${target}"
4913EOF
4914
4915
4916targ=$target
4917. $srcdir/../bfd/config.bfd
4918if test "x$targ_underscore" = "xyes"; then
4919 UNDERSCORE=1
4920else
4921 UNDERSCORE=0
4922fi
4923
4924
4925trap '' 1 2 15
4926cat > confcache <<\EOF
4927# This file is a shell script that caches the results of configure
4928# tests run on this system so they can be shared between configure
4929# scripts and configure runs. It is not useful on other systems.
4930# If it contains results you don't want to keep, you may remove or edit it.
4931#
4932# By default, configure uses ./config.cache as the cache file,
4933# creating it if it does not exist already. You can give configure
4934# the --cache-file=FILE option to use a different cache file; that is
4935# what configure does when it calls configure scripts in
4936# subdirectories, so they share the cache.
4937# Giving --cache-file=/dev/null disables caching, for debugging configure.
4938# config.status only pays attention to the cache file if you give it the
4939# --recheck option to rerun configure.
4940#
4941EOF
4942# The following way of writing the cache mishandles newlines in values,
4943# but we know of no workaround that is simple, portable, and efficient.
4944# So, don't put newlines in cache variables' values.
4945# Ultrix sh set writes to stderr and can't be redirected directly,
4946# and sets the high bit in the cache file unless we assign to the vars.
4947(set) 2>&1 |
4948 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4949 *ac_space=\ *)
4950 # `set' does not quote correctly, so add quotes (double-quote substitution
4951 # turns \\\\ into \\, and sed turns \\ into \).
4952 sed -n \
4953 -e "s/'/'\\\\''/g" \
4954 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4955 ;;
4956 *)
4957 # `set' quotes correctly as required by POSIX, so do not add quotes.
4958 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4959 ;;
4960 esac >> confcache
4961if cmp -s $cache_file confcache; then
4962 :
4963else
4964 if test -w $cache_file; then
4965 echo "updating cache $cache_file"
4966 cat confcache > $cache_file
4967 else
4968 echo "not updating unwritable cache $cache_file"
4969 fi
4970fi
4971rm -f confcache
4972
4973trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4974
4975test "x$prefix" = xNONE && prefix=$ac_default_prefix
4976# Let make expand exec_prefix.
4977test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4978
4979# Any assignment to VPATH causes Sun make to only execute
4980# the first set of double-colon rules, so remove it if not needed.
4981# If there is a colon in the path, we need to keep it.
4982if test "x$srcdir" = x.; then
4983 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4984fi
4985
4986trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4987
4988DEFS=-DHAVE_CONFIG_H
4989
4990# Without the "./", some shells look in PATH for config.status.
4991: ${CONFIG_STATUS=./config.status}
4992
4993echo creating $CONFIG_STATUS
4994rm -f $CONFIG_STATUS
4995cat > $CONFIG_STATUS <<EOF
4996#! /bin/sh
4997# Generated automatically by configure.
4998# Run this file to recreate the current configuration.
4999# This directory was configured as follows,
5000# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5001#
5002# $0 $ac_configure_args
5003#
5004# Compiler output produced by configure, useful for debugging
5005# configure, is in ./config.log if it exists.
5006
5007ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5008for ac_option
5009do
5010 case "\$ac_option" in
5011 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5012 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5013 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5014 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5015 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5016 exit 0 ;;
5017 -help | --help | --hel | --he | --h)
5018 echo "\$ac_cs_usage"; exit 0 ;;
5019 *) echo "\$ac_cs_usage"; exit 1 ;;
5020 esac
5021done
5022
5023ac_given_srcdir=$srcdir
5024ac_given_INSTALL="$INSTALL"
5025
5026trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5027EOF
5028cat >> $CONFIG_STATUS <<EOF
5029
5030# Protect against being on the right side of a sed subst in config.status.
5031sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5032 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5033$ac_vpsub
5034$extrasub
5035s%@SHELL@%$SHELL%g
5036s%@CFLAGS@%$CFLAGS%g
5037s%@CPPFLAGS@%$CPPFLAGS%g
5038s%@CXXFLAGS@%$CXXFLAGS%g
5039s%@FFLAGS@%$FFLAGS%g
5040s%@DEFS@%$DEFS%g
5041s%@LDFLAGS@%$LDFLAGS%g
5042s%@LIBS@%$LIBS%g
5043s%@exec_prefix@%$exec_prefix%g
5044s%@prefix@%$prefix%g
5045s%@program_transform_name@%$program_transform_name%g
5046s%@bindir@%$bindir%g
5047s%@sbindir@%$sbindir%g
5048s%@libexecdir@%$libexecdir%g
5049s%@datadir@%$datadir%g
5050s%@sysconfdir@%$sysconfdir%g
5051s%@sharedstatedir@%$sharedstatedir%g
5052s%@localstatedir@%$localstatedir%g
5053s%@libdir@%$libdir%g
5054s%@includedir@%$includedir%g
5055s%@oldincludedir@%$oldincludedir%g
5056s%@infodir@%$infodir%g
5057s%@mandir@%$mandir%g
5058s%@host@%$host%g
5059s%@host_alias@%$host_alias%g
5060s%@host_cpu@%$host_cpu%g
5061s%@host_vendor@%$host_vendor%g
5062s%@host_os@%$host_os%g
5063s%@target@%$target%g
5064s%@target_alias@%$target_alias%g
5065s%@target_cpu@%$target_cpu%g
5066s%@target_vendor@%$target_vendor%g
5067s%@target_os@%$target_os%g
5068s%@build@%$build%g
5069s%@build_alias@%$build_alias%g
5070s%@build_cpu@%$build_cpu%g
5071s%@build_vendor@%$build_vendor%g
5072s%@build_os@%$build_os%g
5073s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5074s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5075s%@INSTALL_DATA@%$INSTALL_DATA%g
5076s%@PACKAGE@%$PACKAGE%g
5077s%@VERSION@%$VERSION%g
5078s%@ACLOCAL@%$ACLOCAL%g
5079s%@AUTOCONF@%$AUTOCONF%g
5080s%@AUTOMAKE@%$AUTOMAKE%g
5081s%@AUTOHEADER@%$AUTOHEADER%g
5082s%@MAKEINFO@%$MAKEINFO%g
5083s%@SET_MAKE@%$SET_MAKE%g
5084s%@RANLIB@%$RANLIB%g
5085s%@CC@%$CC%g
252b5132 5086s%@LN_S@%$LN_S%g
252b5132 5087s%@LIBTOOL@%$LIBTOOL%g
a2d91340 5088s%@WARN_CFLAGS@%$WARN_CFLAGS%g
252b5132
RH
5089s%@YACC@%$YACC%g
5090s%@LEX@%$LEX%g
5091s%@LEXLIB@%$LEXLIB%g
5092s%@CPP@%$CPP%g
5093s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5094s%@ALLOCA@%$ALLOCA%g
5095s%@USE_NLS@%$USE_NLS%g
5096s%@MSGFMT@%$MSGFMT%g
5097s%@GMSGFMT@%$GMSGFMT%g
5098s%@XGETTEXT@%$XGETTEXT%g
5099s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5100s%@CATALOGS@%$CATALOGS%g
5101s%@CATOBJEXT@%$CATOBJEXT%g
5102s%@DATADIRNAME@%$DATADIRNAME%g
5103s%@GMOFILES@%$GMOFILES%g
5104s%@INSTOBJEXT@%$INSTOBJEXT%g
5105s%@INTLDEPS@%$INTLDEPS%g
5106s%@INTLLIBS@%$INTLLIBS%g
5107s%@INTLOBJS@%$INTLOBJS%g
5108s%@POFILES@%$POFILES%g
5109s%@POSUB@%$POSUB%g
5110s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5111s%@GT_NO@%$GT_NO%g
5112s%@GT_YES@%$GT_YES%g
5113s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5114s%@l@%$l%g
5115s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5116s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5117s%@MAINT@%$MAINT%g
5118s%@EXEEXT@%$EXEEXT%g
5119s%@HDEFINES@%$HDEFINES%g
5120s%@AR@%$AR%g
5121s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5122s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
8a965946 5123s%@DEMANGLER_NAME@%$DEMANGLER_NAME%g
252b5132
RH
5124s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
5125s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
5126s%@BUILD_SRCONV@%$BUILD_SRCONV%g
5127s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
5128s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
5129s%@BUILD_WINDRES@%$BUILD_WINDRES%g
5130s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
5131s%@BUILD_MISC@%$BUILD_MISC%g
5132s%@UNDERSCORE@%$UNDERSCORE%g
5133
5134CEOF
5135EOF
5136
5137cat >> $CONFIG_STATUS <<\EOF
5138
5139# Split the substitutions into bite-sized pieces for seds with
5140# small command number limits, like on Digital OSF/1 and HP-UX.
5141ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5142ac_file=1 # Number of current file.
5143ac_beg=1 # First line for current file.
5144ac_end=$ac_max_sed_cmds # Line after last line for current file.
5145ac_more_lines=:
5146ac_sed_cmds=""
5147while $ac_more_lines; do
5148 if test $ac_beg -gt 1; then
5149 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5150 else
5151 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5152 fi
5153 if test ! -s conftest.s$ac_file; then
5154 ac_more_lines=false
5155 rm -f conftest.s$ac_file
5156 else
5157 if test -z "$ac_sed_cmds"; then
5158 ac_sed_cmds="sed -f conftest.s$ac_file"
5159 else
5160 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5161 fi
5162 ac_file=`expr $ac_file + 1`
5163 ac_beg=$ac_end
5164 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5165 fi
5166done
5167if test -z "$ac_sed_cmds"; then
5168 ac_sed_cmds=cat
5169fi
5170EOF
5171
5172cat >> $CONFIG_STATUS <<EOF
5173
5174CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
5175EOF
5176cat >> $CONFIG_STATUS <<\EOF
5177for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5178 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5179 case "$ac_file" in
5180 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5181 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5182 *) ac_file_in="${ac_file}.in" ;;
5183 esac
5184
5185 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5186
5187 # Remove last slash and all that follows it. Not all systems have dirname.
5188 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5189 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5190 # The file is in a subdirectory.
5191 test ! -d "$ac_dir" && mkdir "$ac_dir"
5192 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5193 # A "../" for each directory in $ac_dir_suffix.
5194 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5195 else
5196 ac_dir_suffix= ac_dots=
5197 fi
5198
5199 case "$ac_given_srcdir" in
5200 .) srcdir=.
5201 if test -z "$ac_dots"; then top_srcdir=.
5202 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5203 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5204 *) # Relative path.
5205 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5206 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5207 esac
5208
5209 case "$ac_given_INSTALL" in
5210 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5211 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5212 esac
5213
5214 echo creating "$ac_file"
5215 rm -f "$ac_file"
5216 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5217 case "$ac_file" in
5218 *Makefile*) ac_comsub="1i\\
5219# $configure_input" ;;
5220 *) ac_comsub= ;;
5221 esac
5222
5223 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5224 sed -e "$ac_comsub
5225s%@configure_input@%$configure_input%g
5226s%@srcdir@%$srcdir%g
5227s%@top_srcdir@%$top_srcdir%g
5228s%@INSTALL@%$INSTALL%g
5229" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5230fi; done
5231rm -f conftest.s*
5232
5233# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5234# NAME is the cpp macro being defined and VALUE is the value it is being given.
5235#
5236# ac_d sets the value in "#define NAME VALUE" lines.
5237ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5238ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5239ac_dC='\3'
5240ac_dD='%g'
5241# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5242ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5243ac_uB='\([ ]\)%\1#\2define\3'
5244ac_uC=' '
5245ac_uD='\4%g'
5246# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5247ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5248ac_eB='$%\1#\2define\3'
5249ac_eC=' '
5250ac_eD='%g'
5251
5252if test "${CONFIG_HEADERS+set}" != set; then
5253EOF
5254cat >> $CONFIG_STATUS <<EOF
5255 CONFIG_HEADERS="config.h:config.in"
5256EOF
5257cat >> $CONFIG_STATUS <<\EOF
5258fi
5259for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5260 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5261 case "$ac_file" in
5262 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5263 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5264 *) ac_file_in="${ac_file}.in" ;;
5265 esac
5266
5267 echo creating $ac_file
5268
5269 rm -f conftest.frag conftest.in conftest.out
5270 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5271 cat $ac_file_inputs > conftest.in
5272
5273EOF
5274
5275# Transform confdefs.h into a sed script conftest.vals that substitutes
5276# the proper values into config.h.in to produce config.h. And first:
5277# Protect against being on the right side of a sed subst in config.status.
5278# Protect against being in an unquoted here document in config.status.
5279rm -f conftest.vals
5280cat > conftest.hdr <<\EOF
5281s/[\\&%]/\\&/g
5282s%[\\$`]%\\&%g
5283s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5284s%ac_d%ac_u%gp
5285s%ac_u%ac_e%gp
5286EOF
5287sed -n -f conftest.hdr confdefs.h > conftest.vals
5288rm -f conftest.hdr
5289
5290# This sed command replaces #undef with comments. This is necessary, for
5291# example, in the case of _POSIX_SOURCE, which is predefined and required
5292# on some systems where configure will not decide to define it.
5293cat >> conftest.vals <<\EOF
5294s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5295EOF
5296
5297# Break up conftest.vals because some shells have a limit on
5298# the size of here documents, and old seds have small limits too.
5299
5300rm -f conftest.tail
5301while :
5302do
5303 ac_lines=`grep -c . conftest.vals`
5304 # grep -c gives empty output for an empty file on some AIX systems.
5305 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5306 # Write a limited-size here document to conftest.frag.
5307 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5308 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5309 echo 'CEOF
5310 sed -f conftest.frag conftest.in > conftest.out
5311 rm -f conftest.in
5312 mv conftest.out conftest.in
5313' >> $CONFIG_STATUS
5314 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5315 rm -f conftest.vals
5316 mv conftest.tail conftest.vals
5317done
5318rm -f conftest.vals
5319
5320cat >> $CONFIG_STATUS <<\EOF
5321 rm -f conftest.frag conftest.h
5322 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5323 cat conftest.in >> conftest.h
5324 rm -f conftest.in
5325 if cmp -s $ac_file conftest.h 2>/dev/null; then
5326 echo "$ac_file is unchanged"
5327 rm -f conftest.h
5328 else
5329 # Remove last slash and all that follows it. Not all systems have dirname.
5330 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5331 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5332 # The file is in a subdirectory.
5333 test ! -d "$ac_dir" && mkdir "$ac_dir"
5334 fi
5335 rm -f $ac_file
5336 mv conftest.h $ac_file
5337 fi
5338fi; done
5339
5340EOF
5341cat >> $CONFIG_STATUS <<EOF
5342
5343
5344EOF
5345cat >> $CONFIG_STATUS <<\EOF
5346test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5347
5348case "x$CONFIG_FILES" in
5349*) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
5350esac
5351
5352exit 0
5353EOF
5354chmod +x $CONFIG_STATUS
5355rm -fr confdefs* $ac_clean_files
5356test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5357
This page took 0.268833 seconds and 4 git commands to generate.