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