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