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