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