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