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