]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/configure
*** empty log message ***
[thirdparty/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.
3c3bdf30
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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 587#line 588 "configure"
ac48eca1
AO
588#include "confdefs.h"
589
590int main() {
591return __MINGW32__;
592; return 0; }
593EOF
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 1195#line 1196 "configure"
a2b64bed
NC
1196#include "confdefs.h"
1197
1198main(){return(0);}
1199EOF
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 1332echo "configure:1333: checking for GNU ld" >&5
252b5132
RH
1333else
1334 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
3c3bdf30 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
NC
1529hpux10.20*|hpux11*)
1530 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
ac48eca1
AO
1531 lt_cv_file_magic_cmd=/usr/bin/file
1532 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1533 ;;
1534
1535irix5* | irix6*)
c7e40348 1536 case $host_os in
ac48eca1
AO
1537 irix5*)
1538 # this will be overridden with pass_all, but let us keep it just in case
1539 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1540 ;;
1541 *)
c7e40348 1542 case $LD in
ac48eca1
AO
1543 *-32|*"-32 ") libmagic=32-bit;;
1544 *-n32|*"-n32 ") libmagic=N32;;
1545 *-64|*"-64 ") libmagic=64-bit;;
1546 *) libmagic=never-match;;
1547 esac
1548 # this will be overridden with pass_all, but let us keep it just in case
c7e40348
NC
1549 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1550 ;;
ac48eca1
AO
1551 esac
1552 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1553 lt_cv_deplibs_check_method=pass_all
1554 ;;
1555
1556# This must be Linux ELF.
58cccadb 1557linux-gnu*)
c7e40348 1558 case $host_cpu in
6be7c12c 1559 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
ac48eca1
AO
1560 lt_cv_deplibs_check_method=pass_all ;;
1561 *)
1562 # glibc up to 2.1.1 does not perform some relocations on ARM
c7e40348
NC
1563 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1564 esac
ac48eca1
AO
1565 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1566 ;;
1567
1568netbsd*)
c7e40348
NC
1569 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1570 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
ac48eca1 1571 else
c7e40348 1572 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
ac48eca1
AO
1573 fi
1574 ;;
1575
c7e40348
NC
1576newsos6)
1577 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1578 lt_cv_file_magic_cmd=/usr/bin/file
1579 lt_cv_file_magic_test_file=/usr/lib/libnls.so
1580 ;;
1581
ac48eca1
AO
1582osf3* | osf4* | osf5*)
1583 # this will be overridden with pass_all, but let us keep it just in case
1584 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1585 lt_cv_file_magic_test_file=/shlib/libc.so
1586 lt_cv_deplibs_check_method=pass_all
1587 ;;
1588
1589sco3.2v5*)
1590 lt_cv_deplibs_check_method=pass_all
1591 ;;
1592
1593solaris*)
1594 lt_cv_deplibs_check_method=pass_all
1595 lt_cv_file_magic_test_file=/lib/libc.so
1596 ;;
1597
6be7c12c
AO
1598sysv5uw[78]* | sysv4*uw2*)
1599 lt_cv_deplibs_check_method=pass_all
1600 ;;
1601
ac48eca1 1602sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
c7e40348 1603 case $host_vendor in
ac48eca1
AO
1604 ncr)
1605 lt_cv_deplibs_check_method=pass_all
1606 ;;
1607 motorola)
c7e40348
NC
1608 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]'
1609 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
ac48eca1
AO
1610 ;;
1611 esac
1612 ;;
1613esac
1614
1615fi
1616
1617echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1618file_magic_cmd=$lt_cv_file_magic_cmd
1619deplibs_check_method=$lt_cv_deplibs_check_method
1620
1621echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3c3bdf30 1622echo "configure:1623: checking for object suffix" >&5
ac48eca1
AO
1623if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1624 echo $ac_n "(cached) $ac_c" 1>&6
1625else
1626 rm -f conftest*
1627echo 'int i = 1;' > conftest.$ac_ext
3c3bdf30 1628if { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ac48eca1
AO
1629 for ac_file in conftest.*; do
1630 case $ac_file in
1631 *.c) ;;
1632 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1633 esac
1634 done
1635else
1636 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1637fi
1638rm -f conftest*
1639fi
1640
1641echo "$ac_t""$ac_cv_objext" 1>&6
1642OBJEXT=$ac_cv_objext
1643ac_objext=$ac_cv_objext
1644
1645
1646
1647echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3c3bdf30 1648echo "configure:1649: checking for executable suffix" >&5
ac48eca1
AO
1649if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1650 echo $ac_n "(cached) $ac_c" 1>&6
1651else
1652 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1653 ac_cv_exeext=.exe
1654else
1655 rm -f conftest*
1656 echo 'int main () { return 0; }' > conftest.$ac_ext
1657 ac_cv_exeext=
3c3bdf30 1658 if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
ac48eca1
AO
1659 for file in conftest.*; do
1660 case $file in
3c3bdf30 1661 *.c | *.o | *.obj) ;;
ac48eca1
AO
1662 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1663 esac
1664 done
1665 else
1666 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1667 fi
1668 rm -f conftest*
1669 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1670fi
1671fi
1672
1673EXEEXT=""
1674test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1675echo "$ac_t""${ac_cv_exeext}" 1>&6
1676ac_exeext=$EXEEXT
1677
1678if test $host != $build; then
1679 ac_tool_prefix=${host_alias}-
1680else
1681 ac_tool_prefix=
1682fi
1683
1684# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1685
1686# Only perform the check for file, if the check method requires it
c7e40348 1687case $deplibs_check_method in
ac48eca1 1688file_magic*)
d64552c5 1689 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
ac48eca1 1690 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
3c3bdf30 1691echo "configure:1692: checking for ${ac_tool_prefix}file" >&5
d64552c5 1692if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
ac48eca1
AO
1693 echo $ac_n "(cached) $ac_c" 1>&6
1694else
c7e40348 1695 case $MAGIC_CMD in
ac48eca1 1696 /*)
d64552c5 1697 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ac48eca1
AO
1698 ;;
1699 ?:/*)
d64552c5 1700 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
ac48eca1
AO
1701 ;;
1702 *)
d64552c5 1703 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
1704 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1705 ac_dummy="/usr/bin:$PATH"
1706 for ac_dir in $ac_dummy; do
1707 test -z "$ac_dir" && ac_dir=.
1708 if test -f $ac_dir/${ac_tool_prefix}file; then
d64552c5 1709 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
ac48eca1 1710 if test -n "$file_magic_test_file"; then
c7e40348 1711 case $deplibs_check_method in
ac48eca1
AO
1712 "file_magic "*)
1713 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 1714 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
1715 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1716 egrep "$file_magic_regex" > /dev/null; then
1717 :
1718 else
1719 cat <<EOF 1>&2
1720
1721*** Warning: the command libtool uses to detect shared libraries,
1722*** $file_magic_cmd, produces output that libtool cannot recognize.
1723*** The result is that libtool may fail to recognize shared libraries
1724*** as such. This will affect the creation of libtool libraries that
1725*** depend on shared libraries, but programs linked with such libtool
1726*** libraries will work regardless of this problem. Nevertheless, you
1727*** may want to report the problem to your system manager and/or to
1728*** bug-libtool@gnu.org
1729
1730EOF
1731 fi ;;
1732 esac
1733 fi
1734 break
1735 fi
1736 done
1737 IFS="$ac_save_ifs"
d64552c5 1738 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
1739 ;;
1740esac
1741fi
1742
d64552c5
AO
1743MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1744if test -n "$MAGIC_CMD"; then
1745 echo "$ac_t""$MAGIC_CMD" 1>&6
ac48eca1
AO
1746else
1747 echo "$ac_t""no" 1>&6
1748fi
1749
d64552c5 1750if test -z "$lt_cv_path_MAGIC_CMD"; then
ac48eca1
AO
1751 if test -n "$ac_tool_prefix"; then
1752 echo $ac_n "checking for file""... $ac_c" 1>&6
3c3bdf30 1753echo "configure:1754: checking for file" >&5
d64552c5 1754if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
ac48eca1
AO
1755 echo $ac_n "(cached) $ac_c" 1>&6
1756else
c7e40348 1757 case $MAGIC_CMD in
ac48eca1 1758 /*)
d64552c5 1759 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ac48eca1
AO
1760 ;;
1761 ?:/*)
d64552c5 1762 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
ac48eca1
AO
1763 ;;
1764 *)
d64552c5 1765 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
1766 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1767 ac_dummy="/usr/bin:$PATH"
1768 for ac_dir in $ac_dummy; do
1769 test -z "$ac_dir" && ac_dir=.
1770 if test -f $ac_dir/file; then
d64552c5 1771 lt_cv_path_MAGIC_CMD="$ac_dir/file"
ac48eca1 1772 if test -n "$file_magic_test_file"; then
c7e40348 1773 case $deplibs_check_method in
ac48eca1
AO
1774 "file_magic "*)
1775 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 1776 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
1777 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1778 egrep "$file_magic_regex" > /dev/null; then
1779 :
1780 else
1781 cat <<EOF 1>&2
1782
1783*** Warning: the command libtool uses to detect shared libraries,
1784*** $file_magic_cmd, produces output that libtool cannot recognize.
1785*** The result is that libtool may fail to recognize shared libraries
1786*** as such. This will affect the creation of libtool libraries that
1787*** depend on shared libraries, but programs linked with such libtool
1788*** libraries will work regardless of this problem. Nevertheless, you
1789*** may want to report the problem to your system manager and/or to
1790*** bug-libtool@gnu.org
1791
1792EOF
1793 fi ;;
1794 esac
1795 fi
1796 break
1797 fi
1798 done
1799 IFS="$ac_save_ifs"
d64552c5 1800 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
1801 ;;
1802esac
1803fi
1804
d64552c5
AO
1805MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1806if test -n "$MAGIC_CMD"; then
1807 echo "$ac_t""$MAGIC_CMD" 1>&6
ac48eca1
AO
1808else
1809 echo "$ac_t""no" 1>&6
1810fi
1811
1812 else
d64552c5 1813 MAGIC_CMD=:
ac48eca1
AO
1814 fi
1815fi
252b5132 1816
ac48eca1
AO
1817 fi
1818 ;;
a74801ba 1819esac
252b5132 1820
ac48eca1
AO
1821# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1822set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1823echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 1824echo "configure:1825: checking for $ac_word" >&5
ac48eca1
AO
1825if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1826 echo $ac_n "(cached) $ac_c" 1>&6
1827else
1828 if test -n "$RANLIB"; then
1829 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1830else
1831 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1832 ac_dummy="$PATH"
1833 for ac_dir in $ac_dummy; do
1834 test -z "$ac_dir" && ac_dir=.
1835 if test -f $ac_dir/$ac_word; then
1836 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1837 break
1838 fi
1839 done
1840 IFS="$ac_save_ifs"
1841fi
1842fi
1843RANLIB="$ac_cv_prog_RANLIB"
1844if test -n "$RANLIB"; then
1845 echo "$ac_t""$RANLIB" 1>&6
1846else
1847 echo "$ac_t""no" 1>&6
1848fi
1849
1850
1851if test -z "$ac_cv_prog_RANLIB"; then
1852if test -n "$ac_tool_prefix"; then
1853 # Extract the first word of "ranlib", so it can be a program name with args.
1854set dummy ranlib; ac_word=$2
1855echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 1856echo "configure:1857: checking for $ac_word" >&5
ac48eca1
AO
1857if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1858 echo $ac_n "(cached) $ac_c" 1>&6
1859else
1860 if test -n "$RANLIB"; then
1861 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1862else
1863 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1864 ac_dummy="$PATH"
1865 for ac_dir in $ac_dummy; do
1866 test -z "$ac_dir" && ac_dir=.
1867 if test -f $ac_dir/$ac_word; then
1868 ac_cv_prog_RANLIB="ranlib"
1869 break
1870 fi
1871 done
1872 IFS="$ac_save_ifs"
1873 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1874fi
1875fi
1876RANLIB="$ac_cv_prog_RANLIB"
1877if test -n "$RANLIB"; then
1878 echo "$ac_t""$RANLIB" 1>&6
1879else
1880 echo "$ac_t""no" 1>&6
1881fi
1882
1883else
1884 RANLIB=":"
1885fi
1886fi
1887
1888# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1889set dummy ${ac_tool_prefix}strip; ac_word=$2
1890echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 1891echo "configure:1892: checking for $ac_word" >&5
ac48eca1
AO
1892if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1893 echo $ac_n "(cached) $ac_c" 1>&6
1894else
1895 if test -n "$STRIP"; then
1896 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1897else
1898 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1899 ac_dummy="$PATH"
1900 for ac_dir in $ac_dummy; do
1901 test -z "$ac_dir" && ac_dir=.
1902 if test -f $ac_dir/$ac_word; then
1903 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1904 break
1905 fi
1906 done
1907 IFS="$ac_save_ifs"
1908fi
1909fi
1910STRIP="$ac_cv_prog_STRIP"
1911if test -n "$STRIP"; then
1912 echo "$ac_t""$STRIP" 1>&6
1913else
1914 echo "$ac_t""no" 1>&6
1915fi
1916
1917
1918if test -z "$ac_cv_prog_STRIP"; then
1919if test -n "$ac_tool_prefix"; then
1920 # Extract the first word of "strip", so it can be a program name with args.
1921set dummy strip; ac_word=$2
1922echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 1923echo "configure:1924: checking for $ac_word" >&5
ac48eca1
AO
1924if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1925 echo $ac_n "(cached) $ac_c" 1>&6
1926else
1927 if test -n "$STRIP"; then
1928 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1929else
1930 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1931 ac_dummy="$PATH"
1932 for ac_dir in $ac_dummy; do
1933 test -z "$ac_dir" && ac_dir=.
1934 if test -f $ac_dir/$ac_word; then
1935 ac_cv_prog_STRIP="strip"
1936 break
1937 fi
1938 done
1939 IFS="$ac_save_ifs"
1940 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1941fi
1942fi
1943STRIP="$ac_cv_prog_STRIP"
1944if test -n "$STRIP"; then
1945 echo "$ac_t""$STRIP" 1>&6
1946else
1947 echo "$ac_t""no" 1>&6
1948fi
1949
1950else
1951 STRIP=":"
1952fi
1953fi
1954
1955
252b5132
RH
1956# Check for any special flags to pass to ltconfig.
1957libtool_flags="--cache-file=$cache_file"
1958test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1959test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1960test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
c7e40348
NC
1961test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
1962test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
252b5132 1963
a74801ba
ILT
1964
1965# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1966if test "${enable_libtool_lock+set}" = set; then
1967 enableval="$enable_libtool_lock"
1968 :
1969fi
1970
1971test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1972test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1973
ac48eca1
AO
1974# Check whether --with-pic or --without-pic was given.
1975if test "${with_pic+set}" = set; then
1976 withval="$with_pic"
1977 pic_mode="$withval"
1978else
1979 pic_mode=default
1980fi
1981
1982test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
1983test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
1984
252b5132
RH
1985# Some flags need to be propagated to the compiler or linker for good
1986# libtool support.
c7e40348 1987case $host in
252b5132
RH
1988*-*-irix6*)
1989 # Find out which ABI we are using.
3c3bdf30
NC
1990 echo '#line 1991 "configure"' > conftest.$ac_ext
1991 if { (eval echo configure:1992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c7e40348 1992 case `/usr/bin/file conftest.$ac_objext` in
252b5132
RH
1993 *32-bit*)
1994 LD="${LD-ld} -32"
1995 ;;
1996 *N32*)
1997 LD="${LD-ld} -n32"
1998 ;;
1999 *64-bit*)
2000 LD="${LD-ld} -64"
2001 ;;
2002 esac
2003 fi
2004 rm -rf conftest*
2005 ;;
2006
2007*-*-sco3.2v5*)
2008 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2009 SAVE_CFLAGS="$CFLAGS"
2010 CFLAGS="$CFLAGS -belf"
2011 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
3c3bdf30 2012echo "configure:2013: checking whether the C compiler needs -belf" >&5
a2d91340 2013if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
252b5132
RH
2014 echo $ac_n "(cached) $ac_c" 1>&6
2015else
ac48eca1
AO
2016
2017 ac_ext=c
2018# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2019ac_cpp='$CPP $CPPFLAGS'
2020ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2021ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2022cross_compiling=$ac_cv_prog_cc_cross
2023
2024 cat > conftest.$ac_ext <<EOF
3c3bdf30 2025#line 2026 "configure"
252b5132
RH
2026#include "confdefs.h"
2027
2028int main() {
2029
2030; return 0; }
2031EOF
3c3bdf30 2032if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2033 rm -rf conftest*
2034 lt_cv_cc_needs_belf=yes
2035else
2036 echo "configure: failed program was:" >&5
2037 cat conftest.$ac_ext >&5
2038 rm -rf conftest*
2039 lt_cv_cc_needs_belf=no
2040fi
2041rm -f conftest*
ac48eca1
AO
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
252b5132
RH
2049fi
2050
2051echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2052 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2053 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2054 CFLAGS="$SAVE_CFLAGS"
2055 fi
2056 ;;
2057
252b5132
RH
2058
2059esac
2060
252b5132
RH
2061
2062# Save cache, so that ltconfig can load it
2063cat > confcache <<\EOF
2064# This file is a shell script that caches the results of configure
2065# tests run on this system so they can be shared between configure
2066# scripts and configure runs. It is not useful on other systems.
2067# If it contains results you don't want to keep, you may remove or edit it.
2068#
2069# By default, configure uses ./config.cache as the cache file,
2070# creating it if it does not exist already. You can give configure
2071# the --cache-file=FILE option to use a different cache file; that is
2072# what configure does when it calls configure scripts in
2073# subdirectories, so they share the cache.
2074# Giving --cache-file=/dev/null disables caching, for debugging configure.
2075# config.status only pays attention to the cache file if you give it the
2076# --recheck option to rerun configure.
2077#
2078EOF
2079# The following way of writing the cache mishandles newlines in values,
2080# but we know of no workaround that is simple, portable, and efficient.
2081# So, don't put newlines in cache variables' values.
2082# Ultrix sh set writes to stderr and can't be redirected directly,
2083# and sets the high bit in the cache file unless we assign to the vars.
2084(set) 2>&1 |
2085 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2086 *ac_space=\ *)
2087 # `set' does not quote correctly, so add quotes (double-quote substitution
2088 # turns \\\\ into \\, and sed turns \\ into \).
2089 sed -n \
2090 -e "s/'/'\\\\''/g" \
2091 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2092 ;;
2093 *)
2094 # `set' quotes correctly as required by POSIX, so do not add quotes.
2095 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2096 ;;
2097 esac >> confcache
2098if cmp -s $cache_file confcache; then
2099 :
2100else
2101 if test -w $cache_file; then
2102 echo "updating cache $cache_file"
2103 cat confcache > $cache_file
2104 else
2105 echo "not updating unwritable cache $cache_file"
2106 fi
2107fi
2108rm -f confcache
2109
2110
2111# Actually configure libtool. ac_aux_dir is where install-sh is found.
ac48eca1 2112AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
d64552c5 2113MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
ac48eca1
AO
2114LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2115AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2116objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2117deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
252b5132 2118${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
ac48eca1 2119$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
252b5132
RH
2120|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2121
2122# Reload cache, that may have been modified by ltconfig
2123if test -r "$cache_file"; then
2124 echo "loading cache $cache_file"
a2d91340 2125 . $cache_file
252b5132
RH
2126else
2127 echo "creating cache $cache_file"
2128 > $cache_file
2129fi
2130
2131
2132# This can be used to rebuild libtool when needed
ac48eca1 2133LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
252b5132
RH
2134
2135# Always use our own libtool.
2136LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2137
2138# Redirect the config.log output again, so that the ltconfig log is not
2139# clobbered by the next message.
2140exec 5>>./config.log
2141
ac48eca1
AO
2142
2143
2144
2145
d64552c5 2146
ac48eca1 2147
252b5132
RH
2148# Check whether --enable-targets or --disable-targets was given.
2149if test "${enable_targets+set}" = set; then
2150 enableval="$enable_targets"
2151 case "${enableval}" in
2152 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
2153 ;;
2154 no) enable_targets= ;;
2155 *) enable_targets=$enableval ;;
2156esac
2157fi
2158# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
2159if test "${enable_64_bit_bfd+set}" = set; then
2160 enableval="$enable_64_bit_bfd"
2161 case "${enableval}" in
2162 yes) want64=true ;;
2163 no) want64=false ;;
2164 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
2165esac
2166else
2167 want64=false
2168fi
2169
0218d1e4 2170build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
a2d91340
AC
2171# Check whether --enable-build-warnings or --disable-build-warnings was given.
2172if test "${enable_build_warnings+set}" = set; then
2173 enableval="$enable_build_warnings"
2174 case "${enableval}" in
2175 yes) ;;
2176 no) build_warnings="-w";;
2177 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2178 build_warnings="${build_warnings} ${t}";;
2179 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2180 build_warnings="${t} ${build_warnings}";;
2181 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
2182esac
2183if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
2184 echo "Setting warning flags = $build_warnings" 6>&1
2185fi
2186fi
2187WARN_CFLAGS=""
2188if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
2189 WARN_CFLAGS="${build_warnings}"
2190fi
2191
2192
252b5132
RH
2193
2194
2195
2196
2197if test -z "$target" ; then
2198 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
2199fi
2200if test -z "$host" ; then
2201 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
2202fi
2203
2204# host-specific stuff:
2205
2206# Extract the first word of "gcc", so it can be a program name with args.
2207set dummy gcc; ac_word=$2
2208echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 2209echo "configure:2210: checking for $ac_word" >&5
a2d91340 2210if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
252b5132
RH
2211 echo $ac_n "(cached) $ac_c" 1>&6
2212else
2213 if test -n "$CC"; then
2214 ac_cv_prog_CC="$CC" # Let the user override the test.
2215else
2216 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2217 ac_dummy="$PATH"
2218 for ac_dir in $ac_dummy; do
2219 test -z "$ac_dir" && ac_dir=.
2220 if test -f $ac_dir/$ac_word; then
2221 ac_cv_prog_CC="gcc"
2222 break
2223 fi
2224 done
2225 IFS="$ac_save_ifs"
2226fi
2227fi
2228CC="$ac_cv_prog_CC"
2229if test -n "$CC"; then
2230 echo "$ac_t""$CC" 1>&6
2231else
2232 echo "$ac_t""no" 1>&6
2233fi
2234
2235if test -z "$CC"; then
2236 # Extract the first word of "cc", so it can be a program name with args.
2237set dummy cc; ac_word=$2
2238echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 2239echo "configure:2240: checking for $ac_word" >&5
a2d91340 2240if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
252b5132
RH
2241 echo $ac_n "(cached) $ac_c" 1>&6
2242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
2246 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2247 ac_prog_rejected=no
2248 ac_dummy="$PATH"
2249 for ac_dir in $ac_dummy; do
2250 test -z "$ac_dir" && ac_dir=.
2251 if test -f $ac_dir/$ac_word; then
2252 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2253 ac_prog_rejected=yes
2254 continue
2255 fi
2256 ac_cv_prog_CC="cc"
2257 break
2258 fi
2259 done
2260 IFS="$ac_save_ifs"
2261if test $ac_prog_rejected = yes; then
2262 # We found a bogon in the path, so make sure we never use it.
2263 set dummy $ac_cv_prog_CC
2264 shift
2265 if test $# -gt 0; then
2266 # We chose a different compiler from the bogus one.
2267 # However, it has the same basename, so the bogon will be chosen
2268 # first if we set CC to just the basename; use the full file name.
2269 shift
2270 set dummy "$ac_dir/$ac_word" "$@"
2271 shift
2272 ac_cv_prog_CC="$@"
2273 fi
2274fi
2275fi
2276fi
2277CC="$ac_cv_prog_CC"
2278if test -n "$CC"; then
2279 echo "$ac_t""$CC" 1>&6
2280else
2281 echo "$ac_t""no" 1>&6
2282fi
2283
2284 if test -z "$CC"; then
2285 case "`uname -s`" in
a2d91340 2286 *win32* | *WIN32*)
252b5132
RH
2287 # Extract the first word of "cl", so it can be a program name with args.
2288set dummy cl; ac_word=$2
2289echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 2290echo "configure:2291: checking for $ac_word" >&5
a2d91340 2291if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
252b5132
RH
2292 echo $ac_n "(cached) $ac_c" 1>&6
2293else
2294 if test -n "$CC"; then
2295 ac_cv_prog_CC="$CC" # Let the user override the test.
2296else
2297 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2298 ac_dummy="$PATH"
2299 for ac_dir in $ac_dummy; do
2300 test -z "$ac_dir" && ac_dir=.
2301 if test -f $ac_dir/$ac_word; then
2302 ac_cv_prog_CC="cl"
2303 break
2304 fi
2305 done
2306 IFS="$ac_save_ifs"
2307fi
2308fi
2309CC="$ac_cv_prog_CC"
2310if test -n "$CC"; then
2311 echo "$ac_t""$CC" 1>&6
2312else
2313 echo "$ac_t""no" 1>&6
2314fi
2315 ;;
2316 esac
2317 fi
2318 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2319fi
2320
a2d91340 2321echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3c3bdf30 2322echo "configure:2323: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132
RH
2323
2324ac_ext=c
2325# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2326ac_cpp='$CPP $CPPFLAGS'
2327ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2328ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2329cross_compiling=$ac_cv_prog_cc_cross
2330
2331cat > conftest.$ac_ext << EOF
2332
3c3bdf30 2333#line 2334 "configure"
252b5132
RH
2334#include "confdefs.h"
2335
2336main(){return(0);}
2337EOF
3c3bdf30 2338if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2339 ac_cv_prog_cc_works=yes
2340 # If we can't run a trivial program, we are probably using a cross compiler.
2341 if (./conftest; exit) 2>/dev/null; then
2342 ac_cv_prog_cc_cross=no
2343 else
2344 ac_cv_prog_cc_cross=yes
2345 fi
2346else
2347 echo "configure: failed program was:" >&5
2348 cat conftest.$ac_ext >&5
2349 ac_cv_prog_cc_works=no
2350fi
2351rm -fr conftest*
2352ac_ext=c
2353# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2354ac_cpp='$CPP $CPPFLAGS'
2355ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2356ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2357cross_compiling=$ac_cv_prog_cc_cross
2358
2359echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2360if test $ac_cv_prog_cc_works = no; then
2361 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2362fi
a2d91340 2363echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3c3bdf30 2364echo "configure:2365: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
252b5132
RH
2365echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2366cross_compiling=$ac_cv_prog_cc_cross
2367
2368echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3c3bdf30 2369echo "configure:2370: checking whether we are using GNU C" >&5
a2d91340 2370if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
252b5132
RH
2371 echo $ac_n "(cached) $ac_c" 1>&6
2372else
2373 cat > conftest.c <<EOF
2374#ifdef __GNUC__
2375 yes;
2376#endif
2377EOF
3c3bdf30 2378if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
252b5132
RH
2379 ac_cv_prog_gcc=yes
2380else
2381 ac_cv_prog_gcc=no
2382fi
2383fi
2384
2385echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2386
2387if test $ac_cv_prog_gcc = yes; then
2388 GCC=yes
2389else
2390 GCC=
2391fi
2392
2393ac_test_CFLAGS="${CFLAGS+set}"
2394ac_save_CFLAGS="$CFLAGS"
2395CFLAGS=
2396echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3c3bdf30 2397echo "configure:2398: checking whether ${CC-cc} accepts -g" >&5
a2d91340 2398if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
252b5132
RH
2399 echo $ac_n "(cached) $ac_c" 1>&6
2400else
2401 echo 'void f(){}' > conftest.c
2402if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2403 ac_cv_prog_cc_g=yes
2404else
2405 ac_cv_prog_cc_g=no
2406fi
2407rm -f conftest*
2408
2409fi
2410
2411echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2412if test "$ac_test_CFLAGS" = set; then
2413 CFLAGS="$ac_save_CFLAGS"
2414elif test $ac_cv_prog_cc_g = yes; then
2415 if test "$GCC" = yes; then
2416 CFLAGS="-g -O2"
2417 else
2418 CFLAGS="-g"
2419 fi
2420else
2421 if test "$GCC" = yes; then
2422 CFLAGS="-O2"
2423 else
2424 CFLAGS=
2425 fi
2426fi
2427
2428# Find a good install program. We prefer a C program (faster),
2429# so one script is as good as another. But avoid the broken or
2430# incompatible versions:
2431# SysV /etc/install, /usr/sbin/install
2432# SunOS /usr/etc/install
2433# IRIX /sbin/install
2434# AIX /bin/install
2435# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2436# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2437# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2438# ./install, which can be erroneously created by make from ./install.sh.
2439echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3c3bdf30 2440echo "configure:2441: checking for a BSD compatible install" >&5
252b5132 2441if test -z "$INSTALL"; then
a2d91340 2442if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
252b5132
RH
2443 echo $ac_n "(cached) $ac_c" 1>&6
2444else
2445 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2446 for ac_dir in $PATH; do
2447 # Account for people who put trailing slashes in PATH elements.
2448 case "$ac_dir/" in
2449 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2450 *)
2451 # OSF1 and SCO ODT 3.0 have their own names for install.
2452 # Don't use installbsd from OSF since it installs stuff as root
2453 # by default.
2454 for ac_prog in ginstall scoinst install; do
2455 if test -f $ac_dir/$ac_prog; then
2456 if test $ac_prog = install &&
2457 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2458 # AIX install. It has an incompatible calling convention.
2459 :
2460 else
2461 ac_cv_path_install="$ac_dir/$ac_prog -c"
2462 break 2
2463 fi
2464 fi
2465 done
2466 ;;
2467 esac
2468 done
2469 IFS="$ac_save_IFS"
2470
2471fi
2472 if test "${ac_cv_path_install+set}" = set; then
2473 INSTALL="$ac_cv_path_install"
2474 else
2475 # As a last resort, use the slow shell script. We don't cache a
2476 # path for INSTALL within a source directory, because that will
2477 # break other packages using the cache if that directory is
2478 # removed, or if the path is relative.
2479 INSTALL="$ac_install_sh"
2480 fi
2481fi
2482echo "$ac_t""$INSTALL" 1>&6
2483
2484# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2485# It thinks the first close brace ends the variable substitution.
2486test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2487
a2d91340 2488test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
252b5132
RH
2489
2490test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2491
2492
be2d1673 2493ALL_LINGUAS="fr sv tr es"
252b5132 2494echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3c3bdf30 2495echo "configure:2496: checking how to run the C preprocessor" >&5
252b5132
RH
2496# On Suns, sometimes $CPP names a directory.
2497if test -n "$CPP" && test -d "$CPP"; then
2498 CPP=
2499fi
2500if test -z "$CPP"; then
a2d91340 2501if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
252b5132
RH
2502 echo $ac_n "(cached) $ac_c" 1>&6
2503else
2504 # This must be in double quotes, not single quotes, because CPP may get
2505 # substituted into the Makefile and "${CC-cc}" will confuse make.
2506 CPP="${CC-cc} -E"
2507 # On the NeXT, cc -E runs the code through the compiler's parser,
2508 # not just through cpp.
2509 cat > conftest.$ac_ext <<EOF
3c3bdf30 2510#line 2511 "configure"
252b5132
RH
2511#include "confdefs.h"
2512#include <assert.h>
2513Syntax Error
2514EOF
2515ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 2516{ (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2517ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2518if test -z "$ac_err"; then
2519 :
2520else
2521 echo "$ac_err" >&5
2522 echo "configure: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
2524 rm -rf conftest*
2525 CPP="${CC-cc} -E -traditional-cpp"
2526 cat > conftest.$ac_ext <<EOF
3c3bdf30 2527#line 2528 "configure"
252b5132
RH
2528#include "confdefs.h"
2529#include <assert.h>
2530Syntax Error
2531EOF
2532ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 2533{ (eval echo configure:2534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2534ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2535if test -z "$ac_err"; then
2536 :
2537else
2538 echo "$ac_err" >&5
2539 echo "configure: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2541 rm -rf conftest*
2542 CPP="${CC-cc} -nologo -E"
2543 cat > conftest.$ac_ext <<EOF
3c3bdf30 2544#line 2545 "configure"
252b5132
RH
2545#include "confdefs.h"
2546#include <assert.h>
2547Syntax Error
2548EOF
2549ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 2550{ (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2551ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2552if test -z "$ac_err"; then
2553 :
2554else
2555 echo "$ac_err" >&5
2556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 rm -rf conftest*
2559 CPP=/lib/cpp
2560fi
2561rm -f conftest*
2562fi
2563rm -f conftest*
2564fi
2565rm -f conftest*
2566 ac_cv_prog_CPP="$CPP"
2567fi
2568 CPP="$ac_cv_prog_CPP"
2569else
2570 ac_cv_prog_CPP="$CPP"
2571fi
2572echo "$ac_t""$CPP" 1>&6
2573
ac48eca1
AO
2574# Extract the first word of "ranlib", so it can be a program name with args.
2575set dummy ranlib; ac_word=$2
2576echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 2577echo "configure:2578: checking for $ac_word" >&5
ac48eca1
AO
2578if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2579 echo $ac_n "(cached) $ac_c" 1>&6
2580else
2581 if test -n "$RANLIB"; then
2582 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2583else
2584 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2585 ac_dummy="$PATH"
2586 for ac_dir in $ac_dummy; do
2587 test -z "$ac_dir" && ac_dir=.
2588 if test -f $ac_dir/$ac_word; then
2589 ac_cv_prog_RANLIB="ranlib"
2590 break
2591 fi
2592 done
2593 IFS="$ac_save_ifs"
2594 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2595fi
2596fi
2597RANLIB="$ac_cv_prog_RANLIB"
2598if test -n "$RANLIB"; then
2599 echo "$ac_t""$RANLIB" 1>&6
2600else
2601 echo "$ac_t""no" 1>&6
2602fi
2603
252b5132 2604echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3c3bdf30 2605echo "configure:2606: checking for ANSI C header files" >&5
a2d91340 2606if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
252b5132
RH
2607 echo $ac_n "(cached) $ac_c" 1>&6
2608else
2609 cat > conftest.$ac_ext <<EOF
3c3bdf30 2610#line 2611 "configure"
252b5132
RH
2611#include "confdefs.h"
2612#include <stdlib.h>
2613#include <stdarg.h>
2614#include <string.h>
2615#include <float.h>
2616EOF
2617ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 2618{ (eval echo configure:2619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2619ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2620if test -z "$ac_err"; then
2621 rm -rf conftest*
2622 ac_cv_header_stdc=yes
2623else
2624 echo "$ac_err" >&5
2625 echo "configure: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 rm -rf conftest*
2628 ac_cv_header_stdc=no
2629fi
2630rm -f conftest*
2631
2632if test $ac_cv_header_stdc = yes; then
2633 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2634cat > conftest.$ac_ext <<EOF
3c3bdf30 2635#line 2636 "configure"
252b5132
RH
2636#include "confdefs.h"
2637#include <string.h>
2638EOF
2639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2640 egrep "memchr" >/dev/null 2>&1; then
2641 :
2642else
2643 rm -rf conftest*
2644 ac_cv_header_stdc=no
2645fi
2646rm -f conftest*
2647
2648fi
2649
2650if test $ac_cv_header_stdc = yes; then
2651 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2652cat > conftest.$ac_ext <<EOF
3c3bdf30 2653#line 2654 "configure"
252b5132
RH
2654#include "confdefs.h"
2655#include <stdlib.h>
2656EOF
2657if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2658 egrep "free" >/dev/null 2>&1; then
2659 :
2660else
2661 rm -rf conftest*
2662 ac_cv_header_stdc=no
2663fi
2664rm -f conftest*
2665
2666fi
2667
2668if test $ac_cv_header_stdc = yes; then
2669 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2670if test "$cross_compiling" = yes; then
2671 :
2672else
2673 cat > conftest.$ac_ext <<EOF
3c3bdf30 2674#line 2675 "configure"
252b5132
RH
2675#include "confdefs.h"
2676#include <ctype.h>
2677#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2678#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2679#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2680int main () { int i; for (i = 0; i < 256; i++)
2681if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2682exit (0); }
2683
2684EOF
3c3bdf30 2685if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
2686then
2687 :
2688else
2689 echo "configure: failed program was:" >&5
2690 cat conftest.$ac_ext >&5
2691 rm -fr conftest*
2692 ac_cv_header_stdc=no
2693fi
2694rm -fr conftest*
2695fi
2696
2697fi
2698fi
2699
2700echo "$ac_t""$ac_cv_header_stdc" 1>&6
2701if test $ac_cv_header_stdc = yes; then
2702 cat >> confdefs.h <<\EOF
2703#define STDC_HEADERS 1
2704EOF
2705
2706fi
2707
2708echo $ac_n "checking for working const""... $ac_c" 1>&6
3c3bdf30 2709echo "configure:2710: checking for working const" >&5
a2d91340 2710if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
252b5132
RH
2711 echo $ac_n "(cached) $ac_c" 1>&6
2712else
2713 cat > conftest.$ac_ext <<EOF
3c3bdf30 2714#line 2715 "configure"
252b5132
RH
2715#include "confdefs.h"
2716
2717int main() {
2718
2719/* Ultrix mips cc rejects this. */
2720typedef int charset[2]; const charset x;
2721/* SunOS 4.1.1 cc rejects this. */
2722char const *const *ccp;
2723char **p;
2724/* NEC SVR4.0.2 mips cc rejects this. */
2725struct point {int x, y;};
2726static struct point const zero = {0,0};
2727/* AIX XL C 1.02.0.0 rejects this.
2728 It does not let you subtract one const X* pointer from another in an arm
2729 of an if-expression whose if-part is not a constant expression */
2730const char *g = "string";
2731ccp = &g + (g ? g-g : 0);
2732/* HPUX 7.0 cc rejects these. */
2733++ccp;
2734p = (char**) ccp;
2735ccp = (char const *const *) p;
2736{ /* SCO 3.2v4 cc rejects this. */
2737 char *t;
2738 char const *s = 0 ? (char *) 0 : (char const *) 0;
2739
2740 *t++ = 0;
2741}
2742{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2743 int x[] = {25, 17};
2744 const int *foo = &x[0];
2745 ++foo;
2746}
2747{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2748 typedef const int *iptr;
2749 iptr p = 0;
2750 ++p;
2751}
2752{ /* AIX XL C 1.02.0.0 rejects this saying
2753 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2754 struct s { int j; const int *ap[3]; };
2755 struct s *b; b->j = 5;
2756}
2757{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2758 const int foo = 10;
2759}
2760
2761; return 0; }
2762EOF
3c3bdf30 2763if { (eval echo configure:2764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
2764 rm -rf conftest*
2765 ac_cv_c_const=yes
2766else
2767 echo "configure: failed program was:" >&5
2768 cat conftest.$ac_ext >&5
2769 rm -rf conftest*
2770 ac_cv_c_const=no
2771fi
2772rm -f conftest*
2773fi
2774
2775echo "$ac_t""$ac_cv_c_const" 1>&6
2776if test $ac_cv_c_const = no; then
2777 cat >> confdefs.h <<\EOF
2778#define const
2779EOF
2780
2781fi
2782
2783echo $ac_n "checking for inline""... $ac_c" 1>&6
3c3bdf30 2784echo "configure:2785: checking for inline" >&5
a2d91340 2785if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
252b5132
RH
2786 echo $ac_n "(cached) $ac_c" 1>&6
2787else
2788 ac_cv_c_inline=no
2789for ac_kw in inline __inline__ __inline; do
2790 cat > conftest.$ac_ext <<EOF
3c3bdf30 2791#line 2792 "configure"
252b5132
RH
2792#include "confdefs.h"
2793
2794int main() {
a2d91340 2795} $ac_kw foo() {
252b5132
RH
2796; return 0; }
2797EOF
3c3bdf30 2798if { (eval echo configure:2799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
2799 rm -rf conftest*
2800 ac_cv_c_inline=$ac_kw; break
2801else
2802 echo "configure: failed program was:" >&5
2803 cat conftest.$ac_ext >&5
2804fi
2805rm -f conftest*
2806done
2807
2808fi
2809
2810echo "$ac_t""$ac_cv_c_inline" 1>&6
2811case "$ac_cv_c_inline" in
2812 inline | yes) ;;
2813 no) cat >> confdefs.h <<\EOF
2814#define inline
2815EOF
2816 ;;
2817 *) cat >> confdefs.h <<EOF
2818#define inline $ac_cv_c_inline
2819EOF
2820 ;;
2821esac
2822
2823echo $ac_n "checking for off_t""... $ac_c" 1>&6
3c3bdf30 2824echo "configure:2825: checking for off_t" >&5
a2d91340 2825if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
252b5132
RH
2826 echo $ac_n "(cached) $ac_c" 1>&6
2827else
2828 cat > conftest.$ac_ext <<EOF
3c3bdf30 2829#line 2830 "configure"
252b5132
RH
2830#include "confdefs.h"
2831#include <sys/types.h>
2832#if STDC_HEADERS
2833#include <stdlib.h>
2834#include <stddef.h>
2835#endif
2836EOF
2837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2838 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2839 rm -rf conftest*
a2d91340 2840 ac_cv_type_off_t=yes
252b5132
RH
2841else
2842 rm -rf conftest*
a2d91340 2843 ac_cv_type_off_t=no
252b5132
RH
2844fi
2845rm -f conftest*
2846
2847fi
a2d91340
AC
2848echo "$ac_t""$ac_cv_type_off_t" 1>&6
2849if test $ac_cv_type_off_t = no; then
2850 cat >> confdefs.h <<\EOF
252b5132
RH
2851#define off_t long
2852EOF
2853
2854fi
2855
2856echo $ac_n "checking for size_t""... $ac_c" 1>&6
3c3bdf30 2857echo "configure:2858: checking for size_t" >&5
a2d91340 2858if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
252b5132
RH
2859 echo $ac_n "(cached) $ac_c" 1>&6
2860else
2861 cat > conftest.$ac_ext <<EOF
3c3bdf30 2862#line 2863 "configure"
252b5132
RH
2863#include "confdefs.h"
2864#include <sys/types.h>
2865#if STDC_HEADERS
2866#include <stdlib.h>
2867#include <stddef.h>
2868#endif
2869EOF
2870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2871 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2872 rm -rf conftest*
a2d91340 2873 ac_cv_type_size_t=yes
252b5132
RH
2874else
2875 rm -rf conftest*
a2d91340 2876 ac_cv_type_size_t=no
252b5132
RH
2877fi
2878rm -f conftest*
2879
2880fi
a2d91340
AC
2881echo "$ac_t""$ac_cv_type_size_t" 1>&6
2882if test $ac_cv_type_size_t = no; then
2883 cat >> confdefs.h <<\EOF
252b5132
RH
2884#define size_t unsigned
2885EOF
2886
2887fi
2888
2889# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2890# for constant arguments. Useless!
2891echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3c3bdf30 2892echo "configure:2893: checking for working alloca.h" >&5
a2d91340 2893if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
252b5132
RH
2894 echo $ac_n "(cached) $ac_c" 1>&6
2895else
2896 cat > conftest.$ac_ext <<EOF
3c3bdf30 2897#line 2898 "configure"
252b5132
RH
2898#include "confdefs.h"
2899#include <alloca.h>
2900int main() {
2901char *p = alloca(2 * sizeof(int));
2902; return 0; }
2903EOF
3c3bdf30 2904if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2905 rm -rf conftest*
2906 ac_cv_header_alloca_h=yes
2907else
2908 echo "configure: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 rm -rf conftest*
2911 ac_cv_header_alloca_h=no
2912fi
2913rm -f conftest*
2914fi
2915
2916echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2917if test $ac_cv_header_alloca_h = yes; then
2918 cat >> confdefs.h <<\EOF
2919#define HAVE_ALLOCA_H 1
2920EOF
2921
2922fi
2923
2924echo $ac_n "checking for alloca""... $ac_c" 1>&6
3c3bdf30 2925echo "configure:2926: checking for alloca" >&5
a2d91340 2926if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
252b5132
RH
2927 echo $ac_n "(cached) $ac_c" 1>&6
2928else
2929 cat > conftest.$ac_ext <<EOF
3c3bdf30 2930#line 2931 "configure"
252b5132
RH
2931#include "confdefs.h"
2932
2933#ifdef __GNUC__
2934# define alloca __builtin_alloca
2935#else
2936# ifdef _MSC_VER
2937# include <malloc.h>
2938# define alloca _alloca
2939# else
2940# if HAVE_ALLOCA_H
2941# include <alloca.h>
2942# else
2943# ifdef _AIX
2944 #pragma alloca
2945# else
2946# ifndef alloca /* predefined by HP cc +Olibcalls */
2947char *alloca ();
2948# endif
2949# endif
2950# endif
2951# endif
2952#endif
2953
2954int main() {
2955char *p = (char *) alloca(1);
2956; return 0; }
2957EOF
3c3bdf30 2958if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2959 rm -rf conftest*
2960 ac_cv_func_alloca_works=yes
2961else
2962 echo "configure: failed program was:" >&5
2963 cat conftest.$ac_ext >&5
2964 rm -rf conftest*
2965 ac_cv_func_alloca_works=no
2966fi
2967rm -f conftest*
2968fi
2969
2970echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2971if test $ac_cv_func_alloca_works = yes; then
2972 cat >> confdefs.h <<\EOF
2973#define HAVE_ALLOCA 1
2974EOF
2975
2976fi
2977
2978if test $ac_cv_func_alloca_works = no; then
2979 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2980 # that cause trouble. Some versions do not even contain alloca or
2981 # contain a buggy version. If you still want to use their alloca,
2982 # use ar to extract alloca.o from them instead of compiling alloca.c.
2983 ALLOCA=alloca.${ac_objext}
2984 cat >> confdefs.h <<\EOF
2985#define C_ALLOCA 1
2986EOF
2987
2988
2989echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3c3bdf30 2990echo "configure:2991: checking whether alloca needs Cray hooks" >&5
a2d91340 2991if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
252b5132
RH
2992 echo $ac_n "(cached) $ac_c" 1>&6
2993else
2994 cat > conftest.$ac_ext <<EOF
3c3bdf30 2995#line 2996 "configure"
252b5132
RH
2996#include "confdefs.h"
2997#if defined(CRAY) && ! defined(CRAY2)
2998webecray
2999#else
3000wenotbecray
3001#endif
3002
3003EOF
3004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3005 egrep "webecray" >/dev/null 2>&1; then
3006 rm -rf conftest*
3007 ac_cv_os_cray=yes
3008else
3009 rm -rf conftest*
3010 ac_cv_os_cray=no
3011fi
3012rm -f conftest*
3013
3014fi
3015
3016echo "$ac_t""$ac_cv_os_cray" 1>&6
3017if test $ac_cv_os_cray = yes; then
3018for ac_func in _getb67 GETB67 getb67; do
3019 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3c3bdf30 3020echo "configure:3021: checking for $ac_func" >&5
a2d91340 3021if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
252b5132
RH
3022 echo $ac_n "(cached) $ac_c" 1>&6
3023else
3024 cat > conftest.$ac_ext <<EOF
3c3bdf30 3025#line 3026 "configure"
252b5132
RH
3026#include "confdefs.h"
3027/* System header to define __stub macros and hopefully few prototypes,
3028 which can conflict with char $ac_func(); below. */
3029#include <assert.h>
3030/* Override any gcc2 internal prototype to avoid an error. */
3031/* We use char because int might match the return type of a gcc2
3032 builtin and then its argument prototype would still apply. */
3033char $ac_func();
3034
3035int main() {
3036
3037/* The GNU C library defines this for functions which it implements
3038 to always fail with ENOSYS. Some functions are actually named
3039 something starting with __ and the normal name is an alias. */
3040#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3041choke me
3042#else
a2d91340 3043$ac_func();
252b5132
RH
3044#endif
3045
3046; return 0; }
3047EOF
3c3bdf30 3048if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3049 rm -rf conftest*
3050 eval "ac_cv_func_$ac_func=yes"
3051else
3052 echo "configure: failed program was:" >&5
3053 cat conftest.$ac_ext >&5
3054 rm -rf conftest*
3055 eval "ac_cv_func_$ac_func=no"
3056fi
3057rm -f conftest*
3058fi
3059
3060if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3061 echo "$ac_t""yes" 1>&6
3062 cat >> confdefs.h <<EOF
3063#define CRAY_STACKSEG_END $ac_func
3064EOF
3065
3066 break
3067else
3068 echo "$ac_t""no" 1>&6
3069fi
3070
3071done
3072fi
3073
3074echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3c3bdf30 3075echo "configure:3076: checking stack direction for C alloca" >&5
a2d91340 3076if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
252b5132
RH
3077 echo $ac_n "(cached) $ac_c" 1>&6
3078else
3079 if test "$cross_compiling" = yes; then
3080 ac_cv_c_stack_direction=0
3081else
3082 cat > conftest.$ac_ext <<EOF
3c3bdf30 3083#line 3084 "configure"
252b5132
RH
3084#include "confdefs.h"
3085find_stack_direction ()
3086{
3087 static char *addr = 0;
3088 auto char dummy;
3089 if (addr == 0)
3090 {
3091 addr = &dummy;
3092 return find_stack_direction ();
3093 }
3094 else
3095 return (&dummy > addr) ? 1 : -1;
3096}
3097main ()
3098{
3099 exit (find_stack_direction() < 0);
3100}
3101EOF
3c3bdf30 3102if { (eval echo configure:3103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
3103then
3104 ac_cv_c_stack_direction=1
3105else
3106 echo "configure: failed program was:" >&5
3107 cat conftest.$ac_ext >&5
3108 rm -fr conftest*
3109 ac_cv_c_stack_direction=-1
3110fi
3111rm -fr conftest*
3112fi
3113
3114fi
3115
3116echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3117cat >> confdefs.h <<EOF
3118#define STACK_DIRECTION $ac_cv_c_stack_direction
3119EOF
3120
3121fi
3122
3c3bdf30 3123for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
252b5132
RH
3124do
3125ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3126echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3c3bdf30 3127echo "configure:3128: checking for $ac_hdr" >&5
a2d91340 3128if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
252b5132
RH
3129 echo $ac_n "(cached) $ac_c" 1>&6
3130else
3131 cat > conftest.$ac_ext <<EOF
3c3bdf30 3132#line 3133 "configure"
252b5132
RH
3133#include "confdefs.h"
3134#include <$ac_hdr>
3135EOF
3136ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 3137{ (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3138ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3139if test -z "$ac_err"; then
3140 rm -rf conftest*
3141 eval "ac_cv_header_$ac_safe=yes"
3142else
3143 echo "$ac_err" >&5
3144 echo "configure: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3146 rm -rf conftest*
3147 eval "ac_cv_header_$ac_safe=no"
3148fi
3149rm -f conftest*
3150fi
3151if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3152 echo "$ac_t""yes" 1>&6
3153 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3154 cat >> confdefs.h <<EOF
3155#define $ac_tr_hdr 1
3156EOF
3157
3158else
3159 echo "$ac_t""no" 1>&6
3160fi
3161done
3162
3163for ac_func in getpagesize
3164do
3165echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3c3bdf30 3166echo "configure:3167: checking for $ac_func" >&5
a2d91340 3167if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
252b5132
RH
3168 echo $ac_n "(cached) $ac_c" 1>&6
3169else
3170 cat > conftest.$ac_ext <<EOF
3c3bdf30 3171#line 3172 "configure"
252b5132
RH
3172#include "confdefs.h"
3173/* System header to define __stub macros and hopefully few prototypes,
3174 which can conflict with char $ac_func(); below. */
3175#include <assert.h>
3176/* Override any gcc2 internal prototype to avoid an error. */
3177/* We use char because int might match the return type of a gcc2
3178 builtin and then its argument prototype would still apply. */
3179char $ac_func();
3180
3181int main() {
3182
3183/* The GNU C library defines this for functions which it implements
3184 to always fail with ENOSYS. Some functions are actually named
3185 something starting with __ and the normal name is an alias. */
3186#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3187choke me
3188#else
a2d91340 3189$ac_func();
252b5132
RH
3190#endif
3191
3192; return 0; }
3193EOF
3c3bdf30 3194if { (eval echo configure:3195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3195 rm -rf conftest*
3196 eval "ac_cv_func_$ac_func=yes"
3197else
3198 echo "configure: failed program was:" >&5
3199 cat conftest.$ac_ext >&5
3200 rm -rf conftest*
3201 eval "ac_cv_func_$ac_func=no"
3202fi
3203rm -f conftest*
3204fi
3205
3206if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3207 echo "$ac_t""yes" 1>&6
3208 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3209 cat >> confdefs.h <<EOF
3210#define $ac_tr_func 1
3211EOF
3212
3213else
3214 echo "$ac_t""no" 1>&6
3215fi
3216done
3217
3218echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3c3bdf30 3219echo "configure:3220: checking for working mmap" >&5
a2d91340 3220if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
252b5132
RH
3221 echo $ac_n "(cached) $ac_c" 1>&6
3222else
3223 if test "$cross_compiling" = yes; then
3224 ac_cv_func_mmap_fixed_mapped=no
3225else
3226 cat > conftest.$ac_ext <<EOF
3c3bdf30 3227#line 3228 "configure"
252b5132
RH
3228#include "confdefs.h"
3229
3230/* Thanks to Mike Haertel and Jim Avera for this test.
3231 Here is a matrix of mmap possibilities:
3232 mmap private not fixed
3233 mmap private fixed at somewhere currently unmapped
3234 mmap private fixed at somewhere already mapped
3235 mmap shared not fixed
3236 mmap shared fixed at somewhere currently unmapped
3237 mmap shared fixed at somewhere already mapped
3238 For private mappings, we should verify that changes cannot be read()
3239 back from the file, nor mmap's back from the file at a different
3240 address. (There have been systems where private was not correctly
3241 implemented like the infamous i386 svr4.0, and systems where the
3242 VM page cache was not coherent with the filesystem buffer cache
3243 like early versions of FreeBSD and possibly contemporary NetBSD.)
3244 For shared mappings, we should conversely verify that changes get
3245 propogated back to all the places they're supposed to be.
3246
3247 Grep wants private fixed already mapped.
3248 The main things grep needs to know about mmap are:
3249 * does it exist and is it safe to write into the mmap'd area
3250 * how to use it (BSD variants) */
3251#include <sys/types.h>
3252#include <fcntl.h>
3253#include <sys/mman.h>
3254
3c3bdf30
NC
3255#if HAVE_SYS_TYPES_H
3256# include <sys/types.h>
3257#endif
3258
3259#if HAVE_STDLIB_H
3260# include <stdlib.h>
3261#endif
3262
3263#if HAVE_SYS_STAT_H
3264# include <sys/stat.h>
3265#endif
3266
3267#if HAVE_UNISTD_H
3268# include <unistd.h>
3269#endif
3270
252b5132
RH
3271/* This mess was copied from the GNU getpagesize.h. */
3272#ifndef HAVE_GETPAGESIZE
252b5132
RH
3273
3274/* Assume that all systems that can run configure have sys/param.h. */
3275# ifndef HAVE_SYS_PARAM_H
3276# define HAVE_SYS_PARAM_H 1
3277# endif
3278
3279# ifdef _SC_PAGESIZE
3280# define getpagesize() sysconf(_SC_PAGESIZE)
3281# else /* no _SC_PAGESIZE */
3282# ifdef HAVE_SYS_PARAM_H
3283# include <sys/param.h>
3284# ifdef EXEC_PAGESIZE
3285# define getpagesize() EXEC_PAGESIZE
3286# else /* no EXEC_PAGESIZE */
3287# ifdef NBPG
3288# define getpagesize() NBPG * CLSIZE
3289# ifndef CLSIZE
3290# define CLSIZE 1
3291# endif /* no CLSIZE */
3292# else /* no NBPG */
3293# ifdef NBPC
3294# define getpagesize() NBPC
3295# else /* no NBPC */
3296# ifdef PAGESIZE
3297# define getpagesize() PAGESIZE
3298# endif /* PAGESIZE */
3299# endif /* no NBPC */
3300# endif /* no NBPG */
3301# endif /* no EXEC_PAGESIZE */
3302# else /* no HAVE_SYS_PARAM_H */
3303# define getpagesize() 8192 /* punt totally */
3304# endif /* no HAVE_SYS_PARAM_H */
3305# endif /* no _SC_PAGESIZE */
3306
3307#endif /* no HAVE_GETPAGESIZE */
3308
3309#ifdef __cplusplus
3310extern "C" { void *malloc(unsigned); }
3311#else
3312char *malloc();
3313#endif
3314
3315int
3316main()
3317{
3318 char *data, *data2, *data3;
3319 int i, pagesize;
3320 int fd;
3321
3322 pagesize = getpagesize();
3323
3324 /*
3325 * First, make a file with some known garbage in it.
3326 */
3327 data = malloc(pagesize);
3328 if (!data)
3329 exit(1);
3330 for (i = 0; i < pagesize; ++i)
3331 *(data + i) = rand();
3332 umask(0);
3333 fd = creat("conftestmmap", 0600);
3334 if (fd < 0)
3335 exit(1);
3336 if (write(fd, data, pagesize) != pagesize)
3337 exit(1);
3338 close(fd);
3339
3340 /*
3341 * Next, try to mmap the file at a fixed address which
3342 * already has something else allocated at it. If we can,
3343 * also make sure that we see the same garbage.
3344 */
3345 fd = open("conftestmmap", O_RDWR);
3346 if (fd < 0)
3347 exit(1);
3348 data2 = malloc(2 * pagesize);
3349 if (!data2)
3350 exit(1);
3351 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3352 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3353 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3354 exit(1);
3355 for (i = 0; i < pagesize; ++i)
3356 if (*(data + i) != *(data2 + i))
3357 exit(1);
3358
3359 /*
3360 * Finally, make sure that changes to the mapped area
3361 * do not percolate back to the file as seen by read().
3362 * (This is a bug on some variants of i386 svr4.0.)
3363 */
3364 for (i = 0; i < pagesize; ++i)
3365 *(data2 + i) = *(data2 + i) + 1;
3366 data3 = malloc(pagesize);
3367 if (!data3)
3368 exit(1);
3369 if (read(fd, data3, pagesize) != pagesize)
3370 exit(1);
3371 for (i = 0; i < pagesize; ++i)
3372 if (*(data + i) != *(data3 + i))
3373 exit(1);
3374 close(fd);
3375 unlink("conftestmmap");
3376 exit(0);
3377}
3378
3379EOF
3c3bdf30 3380if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
3381then
3382 ac_cv_func_mmap_fixed_mapped=yes
3383else
3384 echo "configure: failed program was:" >&5
3385 cat conftest.$ac_ext >&5
3386 rm -fr conftest*
3387 ac_cv_func_mmap_fixed_mapped=no
3388fi
3389rm -fr conftest*
3390fi
3391
3392fi
3393
3394echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3395if test $ac_cv_func_mmap_fixed_mapped = yes; then
3396 cat >> confdefs.h <<\EOF
3397#define HAVE_MMAP 1
3398EOF
3399
3400fi
3401
3402
3403 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3404unistd.h values.h sys/param.h
3405do
3406ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3407echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3c3bdf30 3408echo "configure:3409: checking for $ac_hdr" >&5
a2d91340 3409if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
252b5132
RH
3410 echo $ac_n "(cached) $ac_c" 1>&6
3411else
3412 cat > conftest.$ac_ext <<EOF
3c3bdf30 3413#line 3414 "configure"
252b5132
RH
3414#include "confdefs.h"
3415#include <$ac_hdr>
3416EOF
3417ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 3418{ (eval echo configure:3419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3419ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3420if test -z "$ac_err"; then
3421 rm -rf conftest*
3422 eval "ac_cv_header_$ac_safe=yes"
3423else
3424 echo "$ac_err" >&5
3425 echo "configure: failed program was:" >&5
3426 cat conftest.$ac_ext >&5
3427 rm -rf conftest*
3428 eval "ac_cv_header_$ac_safe=no"
3429fi
3430rm -f conftest*
3431fi
3432if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3433 echo "$ac_t""yes" 1>&6
3434 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3435 cat >> confdefs.h <<EOF
3436#define $ac_tr_hdr 1
3437EOF
3438
3439else
3440 echo "$ac_t""no" 1>&6
3441fi
3442done
3443
3444 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3445__argz_count __argz_stringify __argz_next
3446do
3447echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3c3bdf30 3448echo "configure:3449: checking for $ac_func" >&5
a2d91340 3449if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
252b5132
RH
3450 echo $ac_n "(cached) $ac_c" 1>&6
3451else
3452 cat > conftest.$ac_ext <<EOF
3c3bdf30 3453#line 3454 "configure"
252b5132
RH
3454#include "confdefs.h"
3455/* System header to define __stub macros and hopefully few prototypes,
3456 which can conflict with char $ac_func(); below. */
3457#include <assert.h>
3458/* Override any gcc2 internal prototype to avoid an error. */
3459/* We use char because int might match the return type of a gcc2
3460 builtin and then its argument prototype would still apply. */
3461char $ac_func();
3462
3463int main() {
3464
3465/* The GNU C library defines this for functions which it implements
3466 to always fail with ENOSYS. Some functions are actually named
3467 something starting with __ and the normal name is an alias. */
3468#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3469choke me
3470#else
a2d91340 3471$ac_func();
252b5132
RH
3472#endif
3473
3474; return 0; }
3475EOF
3c3bdf30 3476if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3477 rm -rf conftest*
3478 eval "ac_cv_func_$ac_func=yes"
3479else
3480 echo "configure: failed program was:" >&5
3481 cat conftest.$ac_ext >&5
3482 rm -rf conftest*
3483 eval "ac_cv_func_$ac_func=no"
3484fi
3485rm -f conftest*
3486fi
3487
3488if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3489 echo "$ac_t""yes" 1>&6
3490 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3491 cat >> confdefs.h <<EOF
3492#define $ac_tr_func 1
3493EOF
3494
3495else
3496 echo "$ac_t""no" 1>&6
3497fi
3498done
3499
3500
3501 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3502 for ac_func in stpcpy
3503do
3504echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3c3bdf30 3505echo "configure:3506: checking for $ac_func" >&5
a2d91340 3506if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
252b5132
RH
3507 echo $ac_n "(cached) $ac_c" 1>&6
3508else
3509 cat > conftest.$ac_ext <<EOF
3c3bdf30 3510#line 3511 "configure"
252b5132
RH
3511#include "confdefs.h"
3512/* System header to define __stub macros and hopefully few prototypes,
3513 which can conflict with char $ac_func(); below. */
3514#include <assert.h>
3515/* Override any gcc2 internal prototype to avoid an error. */
3516/* We use char because int might match the return type of a gcc2
3517 builtin and then its argument prototype would still apply. */
3518char $ac_func();
3519
3520int main() {
3521
3522/* The GNU C library defines this for functions which it implements
3523 to always fail with ENOSYS. Some functions are actually named
3524 something starting with __ and the normal name is an alias. */
3525#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3526choke me
3527#else
a2d91340 3528$ac_func();
252b5132
RH
3529#endif
3530
3531; return 0; }
3532EOF
3c3bdf30 3533if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3534 rm -rf conftest*
3535 eval "ac_cv_func_$ac_func=yes"
3536else
3537 echo "configure: failed program was:" >&5
3538 cat conftest.$ac_ext >&5
3539 rm -rf conftest*
3540 eval "ac_cv_func_$ac_func=no"
3541fi
3542rm -f conftest*
3543fi
3544
3545if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3546 echo "$ac_t""yes" 1>&6
3547 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3548 cat >> confdefs.h <<EOF
3549#define $ac_tr_func 1
3550EOF
3551
3552else
3553 echo "$ac_t""no" 1>&6
3554fi
3555done
3556
3557 fi
3558 if test "${ac_cv_func_stpcpy}" = "yes"; then
3559 cat >> confdefs.h <<\EOF
3560#define HAVE_STPCPY 1
3561EOF
3562
3563 fi
3564
3565 if test $ac_cv_header_locale_h = yes; then
3566 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3c3bdf30 3567echo "configure:3568: checking for LC_MESSAGES" >&5
a2d91340 3568if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
252b5132
RH
3569 echo $ac_n "(cached) $ac_c" 1>&6
3570else
3571 cat > conftest.$ac_ext <<EOF
3c3bdf30 3572#line 3573 "configure"
252b5132
RH
3573#include "confdefs.h"
3574#include <locale.h>
3575int main() {
3576return LC_MESSAGES
3577; return 0; }
3578EOF
3c3bdf30 3579if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3580 rm -rf conftest*
3581 am_cv_val_LC_MESSAGES=yes
3582else
3583 echo "configure: failed program was:" >&5
3584 cat conftest.$ac_ext >&5
3585 rm -rf conftest*
3586 am_cv_val_LC_MESSAGES=no
3587fi
3588rm -f conftest*
3589fi
3590
3591echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3592 if test $am_cv_val_LC_MESSAGES = yes; then
3593 cat >> confdefs.h <<\EOF
3594#define HAVE_LC_MESSAGES 1
3595EOF
3596
3597 fi
3598 fi
3599 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3c3bdf30 3600echo "configure:3601: checking whether NLS is requested" >&5
252b5132
RH
3601 # Check whether --enable-nls or --disable-nls was given.
3602if test "${enable_nls+set}" = set; then
3603 enableval="$enable_nls"
3604 USE_NLS=$enableval
3605else
3606 USE_NLS=yes
3607fi
3608
3609 echo "$ac_t""$USE_NLS" 1>&6
3610
3611
3612 USE_INCLUDED_LIBINTL=no
3613
3614 if test "$USE_NLS" = "yes"; then
3615 cat >> confdefs.h <<\EOF
3616#define ENABLE_NLS 1
3617EOF
3618
3619 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3c3bdf30 3620echo "configure:3621: checking whether included gettext is requested" >&5
252b5132
RH
3621 # Check whether --with-included-gettext or --without-included-gettext was given.
3622if test "${with_included_gettext+set}" = set; then
3623 withval="$with_included_gettext"
3624 nls_cv_force_use_gnu_gettext=$withval
3625else
3626 nls_cv_force_use_gnu_gettext=no
3627fi
3628
3629 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3630
3631 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3632 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3633 nls_cv_header_intl=
3634 nls_cv_header_libgt=
3635 CATOBJEXT=NONE
3636
3637 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3638echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3c3bdf30 3639echo "configure:3640: checking for libintl.h" >&5
a2d91340 3640if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
252b5132
RH
3641 echo $ac_n "(cached) $ac_c" 1>&6
3642else
3643 cat > conftest.$ac_ext <<EOF
3c3bdf30 3644#line 3645 "configure"
252b5132
RH
3645#include "confdefs.h"
3646#include <libintl.h>
3647EOF
3648ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 3649{ (eval echo configure:3650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3650ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3651if test -z "$ac_err"; then
3652 rm -rf conftest*
3653 eval "ac_cv_header_$ac_safe=yes"
3654else
3655 echo "$ac_err" >&5
3656 echo "configure: failed program was:" >&5
3657 cat conftest.$ac_ext >&5
3658 rm -rf conftest*
3659 eval "ac_cv_header_$ac_safe=no"
3660fi
3661rm -f conftest*
3662fi
3663if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3664 echo "$ac_t""yes" 1>&6
3665 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3c3bdf30 3666echo "configure:3667: checking for gettext in libc" >&5
a2d91340 3667if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
252b5132
RH
3668 echo $ac_n "(cached) $ac_c" 1>&6
3669else
3670 cat > conftest.$ac_ext <<EOF
3c3bdf30 3671#line 3672 "configure"
252b5132
RH
3672#include "confdefs.h"
3673#include <libintl.h>
3674int main() {
3675return (int) gettext ("")
3676; return 0; }
3677EOF
3c3bdf30 3678if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3679 rm -rf conftest*
3680 gt_cv_func_gettext_libc=yes
3681else
3682 echo "configure: failed program was:" >&5
3683 cat conftest.$ac_ext >&5
3684 rm -rf conftest*
3685 gt_cv_func_gettext_libc=no
3686fi
3687rm -f conftest*
3688fi
3689
3690echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3691
3692 if test "$gt_cv_func_gettext_libc" != "yes"; then
3693 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3c3bdf30 3694echo "configure:3695: checking for bindtextdomain in -lintl" >&5
a2d91340
AC
3695ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3696if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
252b5132
RH
3697 echo $ac_n "(cached) $ac_c" 1>&6
3698else
3699 ac_save_LIBS="$LIBS"
3700LIBS="-lintl $LIBS"
3701cat > conftest.$ac_ext <<EOF
3c3bdf30 3702#line 3703 "configure"
252b5132
RH
3703#include "confdefs.h"
3704/* Override any gcc2 internal prototype to avoid an error. */
3705/* We use char because int might match the return type of a gcc2
3706 builtin and then its argument prototype would still apply. */
3707char bindtextdomain();
3708
3709int main() {
3710bindtextdomain()
3711; return 0; }
3712EOF
3c3bdf30 3713if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3714 rm -rf conftest*
3715 eval "ac_cv_lib_$ac_lib_var=yes"
3716else
3717 echo "configure: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3719 rm -rf conftest*
3720 eval "ac_cv_lib_$ac_lib_var=no"
3721fi
3722rm -f conftest*
3723LIBS="$ac_save_LIBS"
3724
3725fi
3726if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3727 echo "$ac_t""yes" 1>&6
3728 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3c3bdf30 3729echo "configure:3730: checking for gettext in libintl" >&5
a2d91340 3730if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
252b5132
RH
3731 echo $ac_n "(cached) $ac_c" 1>&6
3732else
3733 cat > conftest.$ac_ext <<EOF
3c3bdf30 3734#line 3735 "configure"
252b5132
RH
3735#include "confdefs.h"
3736
3737int main() {
3738return (int) gettext ("")
3739; return 0; }
3740EOF
3c3bdf30 3741if { (eval echo configure:3742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3742 rm -rf conftest*
3743 gt_cv_func_gettext_libintl=yes
3744else
3745 echo "configure: failed program was:" >&5
3746 cat conftest.$ac_ext >&5
3747 rm -rf conftest*
3748 gt_cv_func_gettext_libintl=no
3749fi
3750rm -f conftest*
3751fi
3752
3753echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3754else
3755 echo "$ac_t""no" 1>&6
3756fi
3757
3758 fi
3759
3760 if test "$gt_cv_func_gettext_libc" = "yes" \
3761 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3762 cat >> confdefs.h <<\EOF
3763#define HAVE_GETTEXT 1
3764EOF
3765
3766 # Extract the first word of "msgfmt", so it can be a program name with args.
3767set dummy msgfmt; ac_word=$2
3768echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 3769echo "configure:3770: checking for $ac_word" >&5
a2d91340 3770if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
252b5132
RH
3771 echo $ac_n "(cached) $ac_c" 1>&6
3772else
3773 case "$MSGFMT" in
3774 /*)
3775 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3776 ;;
3777 *)
3778 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3779 for ac_dir in $PATH; do
3780 test -z "$ac_dir" && ac_dir=.
3781 if test -f $ac_dir/$ac_word; then
3782 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3783 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3784 break
3785 fi
3786 fi
3787 done
3788 IFS="$ac_save_ifs"
3789 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3790 ;;
3791esac
3792fi
3793MSGFMT="$ac_cv_path_MSGFMT"
3794if test -n "$MSGFMT"; then
3795 echo "$ac_t""$MSGFMT" 1>&6
3796else
3797 echo "$ac_t""no" 1>&6
3798fi
3799 if test "$MSGFMT" != "no"; then
3800 for ac_func in dcgettext
3801do
3802echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3c3bdf30 3803echo "configure:3804: checking for $ac_func" >&5
a2d91340 3804if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
252b5132
RH
3805 echo $ac_n "(cached) $ac_c" 1>&6
3806else
3807 cat > conftest.$ac_ext <<EOF
3c3bdf30 3808#line 3809 "configure"
252b5132
RH
3809#include "confdefs.h"
3810/* System header to define __stub macros and hopefully few prototypes,
3811 which can conflict with char $ac_func(); below. */
3812#include <assert.h>
3813/* Override any gcc2 internal prototype to avoid an error. */
3814/* We use char because int might match the return type of a gcc2
3815 builtin and then its argument prototype would still apply. */
3816char $ac_func();
3817
3818int main() {
3819
3820/* The GNU C library defines this for functions which it implements
3821 to always fail with ENOSYS. Some functions are actually named
3822 something starting with __ and the normal name is an alias. */
3823#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3824choke me
3825#else
a2d91340 3826$ac_func();
252b5132
RH
3827#endif
3828
3829; return 0; }
3830EOF
3c3bdf30 3831if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3832 rm -rf conftest*
3833 eval "ac_cv_func_$ac_func=yes"
3834else
3835 echo "configure: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3837 rm -rf conftest*
3838 eval "ac_cv_func_$ac_func=no"
3839fi
3840rm -f conftest*
3841fi
3842
3843if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3844 echo "$ac_t""yes" 1>&6
3845 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3846 cat >> confdefs.h <<EOF
3847#define $ac_tr_func 1
3848EOF
3849
3850else
3851 echo "$ac_t""no" 1>&6
3852fi
3853done
3854
3855 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3856set dummy gmsgfmt; ac_word=$2
3857echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 3858echo "configure:3859: checking for $ac_word" >&5
a2d91340 3859if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
252b5132
RH
3860 echo $ac_n "(cached) $ac_c" 1>&6
3861else
3862 case "$GMSGFMT" in
3863 /*)
3864 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3865 ;;
3866 ?:/*)
3867 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3868 ;;
3869 *)
3870 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3871 ac_dummy="$PATH"
3872 for ac_dir in $ac_dummy; do
3873 test -z "$ac_dir" && ac_dir=.
3874 if test -f $ac_dir/$ac_word; then
3875 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3876 break
3877 fi
3878 done
3879 IFS="$ac_save_ifs"
3880 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3881 ;;
3882esac
3883fi
3884GMSGFMT="$ac_cv_path_GMSGFMT"
3885if test -n "$GMSGFMT"; then
3886 echo "$ac_t""$GMSGFMT" 1>&6
3887else
3888 echo "$ac_t""no" 1>&6
3889fi
3890
3891 # Extract the first word of "xgettext", so it can be a program name with args.
3892set dummy xgettext; ac_word=$2
3893echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 3894echo "configure:3895: checking for $ac_word" >&5
a2d91340 3895if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
252b5132
RH
3896 echo $ac_n "(cached) $ac_c" 1>&6
3897else
3898 case "$XGETTEXT" in
3899 /*)
3900 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3901 ;;
3902 *)
3903 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3904 for ac_dir in $PATH; do
3905 test -z "$ac_dir" && ac_dir=.
3906 if test -f $ac_dir/$ac_word; then
3907 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3908 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3909 break
3910 fi
3911 fi
3912 done
3913 IFS="$ac_save_ifs"
3914 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3915 ;;
3916esac
3917fi
3918XGETTEXT="$ac_cv_path_XGETTEXT"
3919if test -n "$XGETTEXT"; then
3920 echo "$ac_t""$XGETTEXT" 1>&6
3921else
3922 echo "$ac_t""no" 1>&6
3923fi
3924
3925 cat > conftest.$ac_ext <<EOF
3c3bdf30 3926#line 3927 "configure"
252b5132
RH
3927#include "confdefs.h"
3928
3929int main() {
3930extern int _nl_msg_cat_cntr;
3931 return _nl_msg_cat_cntr
3932; return 0; }
3933EOF
3c3bdf30 3934if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3935 rm -rf conftest*
3936 CATOBJEXT=.gmo
3937 DATADIRNAME=share
3938else
3939 echo "configure: failed program was:" >&5
3940 cat conftest.$ac_ext >&5
3941 rm -rf conftest*
3942 CATOBJEXT=.mo
3943 DATADIRNAME=lib
3944fi
3945rm -f conftest*
3946 INSTOBJEXT=.mo
3947 fi
3948 fi
3949
3950else
3951 echo "$ac_t""no" 1>&6
3952fi
3953
3954
3955
3956 if test "$CATOBJEXT" = "NONE"; then
3957 nls_cv_use_gnu_gettext=yes
3958 fi
3959 fi
3960
3961 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3962 INTLOBJS="\$(GETTOBJS)"
3963 # Extract the first word of "msgfmt", so it can be a program name with args.
3964set dummy msgfmt; ac_word=$2
3965echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 3966echo "configure:3967: checking for $ac_word" >&5
a2d91340 3967if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
252b5132
RH
3968 echo $ac_n "(cached) $ac_c" 1>&6
3969else
3970 case "$MSGFMT" in
3971 /*)
3972 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3973 ;;
3974 *)
3975 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3976 for ac_dir in $PATH; do
3977 test -z "$ac_dir" && ac_dir=.
3978 if test -f $ac_dir/$ac_word; then
3979 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3980 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3981 break
3982 fi
3983 fi
3984 done
3985 IFS="$ac_save_ifs"
3986 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3987 ;;
3988esac
3989fi
3990MSGFMT="$ac_cv_path_MSGFMT"
3991if test -n "$MSGFMT"; then
3992 echo "$ac_t""$MSGFMT" 1>&6
3993else
3994 echo "$ac_t""no" 1>&6
3995fi
3996
3997 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3998set dummy gmsgfmt; ac_word=$2
3999echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 4000echo "configure:4001: checking for $ac_word" >&5
a2d91340 4001if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
252b5132
RH
4002 echo $ac_n "(cached) $ac_c" 1>&6
4003else
4004 case "$GMSGFMT" in
4005 /*)
4006 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4007 ;;
4008 ?:/*)
4009 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4010 ;;
4011 *)
4012 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4013 ac_dummy="$PATH"
4014 for ac_dir in $ac_dummy; do
4015 test -z "$ac_dir" && ac_dir=.
4016 if test -f $ac_dir/$ac_word; then
4017 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4018 break
4019 fi
4020 done
4021 IFS="$ac_save_ifs"
4022 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4023 ;;
4024esac
4025fi
4026GMSGFMT="$ac_cv_path_GMSGFMT"
4027if test -n "$GMSGFMT"; then
4028 echo "$ac_t""$GMSGFMT" 1>&6
4029else
4030 echo "$ac_t""no" 1>&6
4031fi
4032
4033 # Extract the first word of "xgettext", so it can be a program name with args.
4034set dummy xgettext; ac_word=$2
4035echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 4036echo "configure:4037: checking for $ac_word" >&5
a2d91340 4037if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
252b5132
RH
4038 echo $ac_n "(cached) $ac_c" 1>&6
4039else
4040 case "$XGETTEXT" in
4041 /*)
4042 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4043 ;;
4044 *)
4045 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4046 for ac_dir in $PATH; do
4047 test -z "$ac_dir" && ac_dir=.
4048 if test -f $ac_dir/$ac_word; then
4049 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4050 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4051 break
4052 fi
4053 fi
4054 done
4055 IFS="$ac_save_ifs"
4056 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4057 ;;
4058esac
4059fi
4060XGETTEXT="$ac_cv_path_XGETTEXT"
4061if test -n "$XGETTEXT"; then
4062 echo "$ac_t""$XGETTEXT" 1>&6
4063else
4064 echo "$ac_t""no" 1>&6
4065fi
4066
4067
4068 USE_INCLUDED_LIBINTL=yes
4069 CATOBJEXT=.gmo
4070 INSTOBJEXT=.mo
4071 DATADIRNAME=share
4072 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4073 INTLLIBS=$INTLDEPS
4074 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4075 nls_cv_header_intl=libintl.h
4076 nls_cv_header_libgt=libgettext.h
4077 fi
4078
4079 if test "$XGETTEXT" != ":"; then
4080 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4081 : ;
4082 else
4083 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4084 XGETTEXT=":"
4085 fi
4086 fi
4087
4088 # We need to process the po/ directory.
4089 POSUB=po
4090 else
4091 DATADIRNAME=share
4092 nls_cv_header_intl=libintl.h
4093 nls_cv_header_libgt=libgettext.h
4094 fi
4095
4096 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4097 # because some of the sources are only built for this goal.
4098 if test "$PACKAGE" = gettext; then
4099 USE_NLS=yes
4100 USE_INCLUDED_LIBINTL=yes
4101 fi
4102
4103 for lang in $ALL_LINGUAS; do
4104 GMOFILES="$GMOFILES $lang.gmo"
4105 POFILES="$POFILES $lang.po"
4106 done
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121 if test "x$CATOBJEXT" != "x"; then
4122 if test "x$ALL_LINGUAS" = "x"; then
4123 LINGUAS=
4124 else
4125 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3c3bdf30 4126echo "configure:4127: checking for catalogs to be installed" >&5
252b5132
RH
4127 NEW_LINGUAS=
4128 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4129 case "$ALL_LINGUAS" in
4130 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4131 esac
4132 done
4133 LINGUAS=$NEW_LINGUAS
4134 echo "$ac_t""$LINGUAS" 1>&6
4135 fi
4136
4137 if test -n "$LINGUAS"; then
4138 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4139 fi
4140 fi
4141
4142 if test $ac_cv_header_locale_h = yes; then
4143 INCLUDE_LOCALE_H="#include <locale.h>"
4144 else
4145 INCLUDE_LOCALE_H="\
4146/* The system does not provide the header <locale.h>. Take care yourself. */"
4147 fi
4148
4149
4150 if test -f $srcdir/po2tbl.sed.in; then
4151 if test "$CATOBJEXT" = ".cat"; then
4152 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4153echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3c3bdf30 4154echo "configure:4155: checking for linux/version.h" >&5
a2d91340 4155if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
252b5132
RH
4156 echo $ac_n "(cached) $ac_c" 1>&6
4157else
4158 cat > conftest.$ac_ext <<EOF
3c3bdf30 4159#line 4160 "configure"
252b5132
RH
4160#include "confdefs.h"
4161#include <linux/version.h>
4162EOF
4163ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 4164{ (eval echo configure:4165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
4165ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4166if test -z "$ac_err"; then
4167 rm -rf conftest*
4168 eval "ac_cv_header_$ac_safe=yes"
4169else
4170 echo "$ac_err" >&5
4171 echo "configure: failed program was:" >&5
4172 cat conftest.$ac_ext >&5
4173 rm -rf conftest*
4174 eval "ac_cv_header_$ac_safe=no"
4175fi
4176rm -f conftest*
4177fi
4178if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4179 echo "$ac_t""yes" 1>&6
4180 msgformat=linux
4181else
4182 echo "$ac_t""no" 1>&6
4183msgformat=xopen
4184fi
4185
4186
4187 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4188 fi
4189 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4190 $srcdir/po2tbl.sed.in > po2tbl.sed
4191 fi
4192
4193 if test "$PACKAGE" = "gettext"; then
4194 GT_NO="#NO#"
4195 GT_YES=
4196 else
4197 GT_NO=
4198 GT_YES="#YES#"
4199 fi
4200
4201
4202
4203 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4204
4205
4206 l=
4207
4208
fcd8210c 4209 if test -f $srcdir/po/POTFILES.in; then
252b5132
RH
4210 test -d po || mkdir po
4211 if test "x$srcdir" != "x."; then
4212 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4213 posrcprefix="$srcdir/"
4214 else
4215 posrcprefix="../$srcdir/"
4216 fi
4217 else
4218 posrcprefix="../"
4219 fi
4220 rm -f po/POTFILES
4221 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4222 < $srcdir/po/POTFILES.in > po/POTFILES
4223 fi
4224
4225
252b5132
RH
4226
4227
4228echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3c3bdf30 4229echo "configure:4230: checking for executable suffix" >&5
a2d91340 4230if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
252b5132
RH
4231 echo $ac_n "(cached) $ac_c" 1>&6
4232else
a2d91340 4233 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
252b5132
RH
4234 ac_cv_exeext=.exe
4235else
4236 rm -f conftest*
4237 echo 'int main () { return 0; }' > conftest.$ac_ext
4238 ac_cv_exeext=
3c3bdf30 4239 if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
252b5132
RH
4240 for file in conftest.*; do
4241 case $file in
3c3bdf30 4242 *.c | *.o | *.obj) ;;
252b5132
RH
4243 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4244 esac
4245 done
4246 else
4247 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4248 fi
4249 rm -f conftest*
4250 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4251fi
4252fi
4253
4254EXEEXT=""
4255test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4256echo "$ac_t""${ac_cv_exeext}" 1>&6
4257ac_exeext=$EXEEXT
4258
4259
4260for ac_prog in 'bison -y' byacc
4261do
4262# Extract the first word of "$ac_prog", so it can be a program name with args.
4263set dummy $ac_prog; ac_word=$2
4264echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 4265echo "configure:4266: checking for $ac_word" >&5
a2d91340 4266if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
252b5132
RH
4267 echo $ac_n "(cached) $ac_c" 1>&6
4268else
4269 if test -n "$YACC"; then
4270 ac_cv_prog_YACC="$YACC" # Let the user override the test.
4271else
4272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4273 ac_dummy="$PATH"
4274 for ac_dir in $ac_dummy; do
4275 test -z "$ac_dir" && ac_dir=.
4276 if test -f $ac_dir/$ac_word; then
4277 ac_cv_prog_YACC="$ac_prog"
4278 break
4279 fi
4280 done
4281 IFS="$ac_save_ifs"
4282fi
4283fi
4284YACC="$ac_cv_prog_YACC"
4285if test -n "$YACC"; then
4286 echo "$ac_t""$YACC" 1>&6
4287else
4288 echo "$ac_t""no" 1>&6
4289fi
4290
4291test -n "$YACC" && break
4292done
4293test -n "$YACC" || YACC="yacc"
4294
4295missing_dir=`cd $ac_aux_dir && pwd`
4296for ac_prog in flex lex
4297do
4298# Extract the first word of "$ac_prog", so it can be a program name with args.
4299set dummy $ac_prog; ac_word=$2
4300echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 4301echo "configure:4302: checking for $ac_word" >&5
a2d91340 4302if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
252b5132
RH
4303 echo $ac_n "(cached) $ac_c" 1>&6
4304else
4305 if test -n "$LEX"; then
4306 ac_cv_prog_LEX="$LEX" # Let the user override the test.
4307else
4308 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4309 ac_dummy="$PATH"
4310 for ac_dir in $ac_dummy; do
4311 test -z "$ac_dir" && ac_dir=.
4312 if test -f $ac_dir/$ac_word; then
4313 ac_cv_prog_LEX="$ac_prog"
4314 break
4315 fi
4316 done
4317 IFS="$ac_save_ifs"
4318fi
4319fi
4320LEX="$ac_cv_prog_LEX"
4321if test -n "$LEX"; then
4322 echo "$ac_t""$LEX" 1>&6
4323else
4324 echo "$ac_t""no" 1>&6
4325fi
4326
4327test -n "$LEX" && break
4328done
4329test -n "$LEX" || LEX=""$missing_dir/missing flex""
4330
4331# Extract the first word of "flex", so it can be a program name with args.
4332set dummy flex; ac_word=$2
4333echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3c3bdf30 4334echo "configure:4335: checking for $ac_word" >&5
a2d91340 4335if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
252b5132
RH
4336 echo $ac_n "(cached) $ac_c" 1>&6
4337else
4338 if test -n "$LEX"; then
4339 ac_cv_prog_LEX="$LEX" # Let the user override the test.
4340else
4341 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4342 ac_dummy="$PATH"
4343 for ac_dir in $ac_dummy; do
4344 test -z "$ac_dir" && ac_dir=.
4345 if test -f $ac_dir/$ac_word; then
4346 ac_cv_prog_LEX="flex"
4347 break
4348 fi
4349 done
4350 IFS="$ac_save_ifs"
4351 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
4352fi
4353fi
4354LEX="$ac_cv_prog_LEX"
4355if test -n "$LEX"; then
4356 echo "$ac_t""$LEX" 1>&6
4357else
4358 echo "$ac_t""no" 1>&6
4359fi
4360
4361if test -z "$LEXLIB"
4362then
4363 case "$LEX" in
4364 flex*) ac_lib=fl ;;
4365 *) ac_lib=l ;;
4366 esac
4367 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
3c3bdf30 4368echo "configure:4369: checking for yywrap in -l$ac_lib" >&5
a2d91340
AC
4369ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
4370if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
252b5132
RH
4371 echo $ac_n "(cached) $ac_c" 1>&6
4372else
4373 ac_save_LIBS="$LIBS"
4374LIBS="-l$ac_lib $LIBS"
4375cat > conftest.$ac_ext <<EOF
3c3bdf30 4376#line 4377 "configure"
252b5132
RH
4377#include "confdefs.h"
4378/* Override any gcc2 internal prototype to avoid an error. */
4379/* We use char because int might match the return type of a gcc2
4380 builtin and then its argument prototype would still apply. */
4381char yywrap();
4382
4383int main() {
4384yywrap()
4385; return 0; }
4386EOF
3c3bdf30 4387if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4388 rm -rf conftest*
4389 eval "ac_cv_lib_$ac_lib_var=yes"
4390else
4391 echo "configure: failed program was:" >&5
4392 cat conftest.$ac_ext >&5
4393 rm -rf conftest*
4394 eval "ac_cv_lib_$ac_lib_var=no"
4395fi
4396rm -f conftest*
4397LIBS="$ac_save_LIBS"
4398
4399fi
4400if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4401 echo "$ac_t""yes" 1>&6
4402 LEXLIB="-l$ac_lib"
4403else
4404 echo "$ac_t""no" 1>&6
4405fi
4406
4407fi
4408
4409echo $ac_n "checking lex output file root""... $ac_c" 1>&6
3c3bdf30 4410echo "configure:4411: checking lex output file root" >&5
a2d91340 4411if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
252b5132
RH
4412 echo $ac_n "(cached) $ac_c" 1>&6
4413else
4414 # The minimal lex program is just a single line: %%. But some broken lexes
4415# (Solaris, I think it was) want two %% lines, so accommodate them.
4416echo '%%
4417%%' | $LEX
4418if test -f lex.yy.c; then
4419 ac_cv_prog_lex_root=lex.yy
4420elif test -f lexyy.c; then
4421 ac_cv_prog_lex_root=lexyy
4422else
4423 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
4424fi
4425fi
4426
4427echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
4428LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
4429
4430echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
3c3bdf30 4431echo "configure:4432: checking whether yytext is a pointer" >&5
a2d91340 4432if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
252b5132
RH
4433 echo $ac_n "(cached) $ac_c" 1>&6
4434else
4435 # POSIX says lex can declare yytext either as a pointer or an array; the
4436# default is implementation-dependent. Figure out which it is, since
4437# not all implementations provide the %pointer and %array declarations.
4438ac_cv_prog_lex_yytext_pointer=no
4439echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
4440ac_save_LIBS="$LIBS"
4441LIBS="$LIBS $LEXLIB"
4442cat > conftest.$ac_ext <<EOF
3c3bdf30 4443#line 4444 "configure"
252b5132
RH
4444#include "confdefs.h"
4445`cat $LEX_OUTPUT_ROOT.c`
4446int main() {
4447
4448; return 0; }
4449EOF
3c3bdf30 4450if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4451 rm -rf conftest*
4452 ac_cv_prog_lex_yytext_pointer=yes
4453else
4454 echo "configure: failed program was:" >&5
4455 cat conftest.$ac_ext >&5
4456fi
4457rm -f conftest*
4458LIBS="$ac_save_LIBS"
4459rm -f "${LEX_OUTPUT_ROOT}.c"
4460
4461fi
4462
4463echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
4464if test $ac_cv_prog_lex_yytext_pointer = yes; then
4465 cat >> confdefs.h <<\EOF
4466#define YYTEXT_POINTER 1
4467EOF
4468
4469fi
4470
4471
4472echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
3c3bdf30 4473echo "configure:4474: checking whether to enable maintainer-specific portions of Makefiles" >&5
252b5132
RH
4474 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4475if test "${enable_maintainer_mode+set}" = set; then
4476 enableval="$enable_maintainer_mode"
4477 USE_MAINTAINER_MODE=$enableval
4478else
4479 USE_MAINTAINER_MODE=no
4480fi
4481
4482 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4483
4484
4485if test $USE_MAINTAINER_MODE = yes; then
4486 MAINTAINER_MODE_TRUE=
4487 MAINTAINER_MODE_FALSE='#'
4488else
4489 MAINTAINER_MODE_TRUE='#'
4490 MAINTAINER_MODE_FALSE=
4491fi
4492 MAINT=$MAINTAINER_MODE_TRUE
4493
4494
4495
4496. ${srcdir}/configure.host
4497
4498
4499
4500
4501
4502
4503for ac_hdr in string.h strings.h stdlib.h unistd.h
4504do
4505ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4506echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3c3bdf30 4507echo "configure:4508: checking for $ac_hdr" >&5
a2d91340 4508if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
252b5132
RH
4509 echo $ac_n "(cached) $ac_c" 1>&6
4510else
4511 cat > conftest.$ac_ext <<EOF
3c3bdf30 4512#line 4513 "configure"
252b5132
RH
4513#include "confdefs.h"
4514#include <$ac_hdr>
4515EOF
4516ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3c3bdf30 4517{ (eval echo configure:4518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
4518ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4519if test -z "$ac_err"; then
4520 rm -rf conftest*
4521 eval "ac_cv_header_$ac_safe=yes"
4522else
4523 echo "$ac_err" >&5
4524 echo "configure: failed program was:" >&5
4525 cat conftest.$ac_ext >&5
4526 rm -rf conftest*
4527 eval "ac_cv_header_$ac_safe=no"
4528fi
4529rm -f conftest*
4530fi
4531if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4532 echo "$ac_t""yes" 1>&6
4533 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4534 cat >> confdefs.h <<EOF
4535#define $ac_tr_hdr 1
4536EOF
4537
4538else
4539 echo "$ac_t""no" 1>&6
4540fi
4541done
4542
4543for ac_func in sbrk
4544do
4545echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3c3bdf30 4546echo "configure:4547: checking for $ac_func" >&5
a2d91340 4547if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
252b5132
RH
4548 echo $ac_n "(cached) $ac_c" 1>&6
4549else
4550 cat > conftest.$ac_ext <<EOF
3c3bdf30 4551#line 4552 "configure"
252b5132
RH
4552#include "confdefs.h"
4553/* System header to define __stub macros and hopefully few prototypes,
4554 which can conflict with char $ac_func(); below. */
4555#include <assert.h>
4556/* Override any gcc2 internal prototype to avoid an error. */
4557/* We use char because int might match the return type of a gcc2
4558 builtin and then its argument prototype would still apply. */
4559char $ac_func();
4560
4561int main() {
4562
4563/* The GNU C library defines this for functions which it implements
4564 to always fail with ENOSYS. Some functions are actually named
4565 something starting with __ and the normal name is an alias. */
4566#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4567choke me
4568#else
a2d91340 4569$ac_func();
252b5132
RH
4570#endif
4571
4572; return 0; }
4573EOF
3c3bdf30 4574if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4575 rm -rf conftest*
4576 eval "ac_cv_func_$ac_func=yes"
4577else
4578 echo "configure: failed program was:" >&5
4579 cat conftest.$ac_ext >&5
4580 rm -rf conftest*
4581 eval "ac_cv_func_$ac_func=no"
4582fi
4583rm -f conftest*
4584fi
4585
4586if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4587 echo "$ac_t""yes" 1>&6
4588 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4589 cat >> confdefs.h <<EOF
4590#define $ac_tr_func 1
4591EOF
4592
4593else
4594 echo "$ac_t""no" 1>&6
4595fi
4596done
4597
4598ac_header_dirent=no
4599for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4600do
4601ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4602echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3c3bdf30 4603echo "configure:4604: checking for $ac_hdr that defines DIR" >&5
a2d91340 4604if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
252b5132
RH
4605 echo $ac_n "(cached) $ac_c" 1>&6
4606else
4607 cat > conftest.$ac_ext <<EOF
3c3bdf30 4608#line 4609 "configure"
252b5132
RH
4609#include "confdefs.h"
4610#include <sys/types.h>
4611#include <$ac_hdr>
4612int main() {
4613DIR *dirp = 0;
4614; return 0; }
4615EOF
3c3bdf30 4616if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4617 rm -rf conftest*
4618 eval "ac_cv_header_dirent_$ac_safe=yes"
4619else
4620 echo "configure: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4622 rm -rf conftest*
4623 eval "ac_cv_header_dirent_$ac_safe=no"
4624fi
4625rm -f conftest*
4626fi
4627if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4628 echo "$ac_t""yes" 1>&6
4629 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4630 cat >> confdefs.h <<EOF
4631#define $ac_tr_hdr 1
4632EOF
4633 ac_header_dirent=$ac_hdr; break
4634else
4635 echo "$ac_t""no" 1>&6
4636fi
4637done
4638# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4639if test $ac_header_dirent = dirent.h; then
4640echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3c3bdf30 4641echo "configure:4642: checking for opendir in -ldir" >&5
a2d91340
AC
4642ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4643if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
252b5132
RH
4644 echo $ac_n "(cached) $ac_c" 1>&6
4645else
4646 ac_save_LIBS="$LIBS"
4647LIBS="-ldir $LIBS"
4648cat > conftest.$ac_ext <<EOF
3c3bdf30 4649#line 4650 "configure"
252b5132
RH
4650#include "confdefs.h"
4651/* Override any gcc2 internal prototype to avoid an error. */
4652/* We use char because int might match the return type of a gcc2
4653 builtin and then its argument prototype would still apply. */
4654char opendir();
4655
4656int main() {
4657opendir()
4658; return 0; }
4659EOF
3c3bdf30 4660if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4661 rm -rf conftest*
4662 eval "ac_cv_lib_$ac_lib_var=yes"
4663else
4664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4666 rm -rf conftest*
4667 eval "ac_cv_lib_$ac_lib_var=no"
4668fi
4669rm -f conftest*
4670LIBS="$ac_save_LIBS"
4671
4672fi
4673if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4674 echo "$ac_t""yes" 1>&6
4675 LIBS="$LIBS -ldir"
4676else
4677 echo "$ac_t""no" 1>&6
4678fi
4679
4680else
4681echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3c3bdf30 4682echo "configure:4683: checking for opendir in -lx" >&5
a2d91340
AC
4683ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4684if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
252b5132
RH
4685 echo $ac_n "(cached) $ac_c" 1>&6
4686else
4687 ac_save_LIBS="$LIBS"
4688LIBS="-lx $LIBS"
4689cat > conftest.$ac_ext <<EOF
3c3bdf30 4690#line 4691 "configure"
252b5132
RH
4691#include "confdefs.h"
4692/* Override any gcc2 internal prototype to avoid an error. */
4693/* We use char because int might match the return type of a gcc2
4694 builtin and then its argument prototype would still apply. */
4695char opendir();
4696
4697int main() {
4698opendir()
4699; return 0; }
4700EOF
3c3bdf30 4701if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4702 rm -rf conftest*
4703 eval "ac_cv_lib_$ac_lib_var=yes"
4704else
4705 echo "configure: failed program was:" >&5
4706 cat conftest.$ac_ext >&5
4707 rm -rf conftest*
4708 eval "ac_cv_lib_$ac_lib_var=no"
4709fi
4710rm -f conftest*
4711LIBS="$ac_save_LIBS"
4712
4713fi
4714if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4715 echo "$ac_t""yes" 1>&6
4716 LIBS="$LIBS -lx"
4717else
4718 echo "$ac_t""no" 1>&6
4719fi
4720
4721fi
4722
4723
4724
4725case "${host}" in
a8100d5b 4726*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
252b5132
RH
4727 cat >> confdefs.h <<\EOF
4728#define USE_BINARY_FOPEN 1
4729EOF
4730 ;;
4731esac
4732
4733echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
3c3bdf30 4734echo "configure:4735: checking whether strstr must be declared" >&5
a2d91340 4735if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
252b5132
RH
4736 echo $ac_n "(cached) $ac_c" 1>&6
4737else
4738 cat > conftest.$ac_ext <<EOF
3c3bdf30 4739#line 4740 "configure"
252b5132
RH
4740#include "confdefs.h"
4741
4742#include <stdio.h>
4743#ifdef HAVE_STRING_H
4744#include <string.h>
4745#else
4746#ifdef HAVE_STRINGS_H
4747#include <strings.h>
4748#endif
4749#endif
4750#ifdef HAVE_STDLIB_H
4751#include <stdlib.h>
4752#endif
4753#ifdef HAVE_UNISTD_H
4754#include <unistd.h>
4755#endif
4756int main() {
4757char *(*pfn) = (char *(*)) strstr
4758; return 0; }
4759EOF
3c3bdf30 4760if { (eval echo configure:4761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4761 rm -rf conftest*
4762 bfd_cv_decl_needed_strstr=no
4763else
4764 echo "configure: failed program was:" >&5
4765 cat conftest.$ac_ext >&5
4766 rm -rf conftest*
4767 bfd_cv_decl_needed_strstr=yes
4768fi
4769rm -f conftest*
4770fi
4771
4772echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4773if test $bfd_cv_decl_needed_strstr = yes; then
4774 cat >> confdefs.h <<\EOF
4775#define NEED_DECLARATION_STRSTR 1
4776EOF
4777
4778fi
4779
4780echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
3c3bdf30 4781echo "configure:4782: checking whether free must be declared" >&5
a2d91340 4782if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
252b5132
RH
4783 echo $ac_n "(cached) $ac_c" 1>&6
4784else
4785 cat > conftest.$ac_ext <<EOF
3c3bdf30 4786#line 4787 "configure"
252b5132
RH
4787#include "confdefs.h"
4788
4789#include <stdio.h>
4790#ifdef HAVE_STRING_H
4791#include <string.h>
4792#else
4793#ifdef HAVE_STRINGS_H
4794#include <strings.h>
4795#endif
4796#endif
4797#ifdef HAVE_STDLIB_H
4798#include <stdlib.h>
4799#endif
4800#ifdef HAVE_UNISTD_H
4801#include <unistd.h>
4802#endif
4803int main() {
4804char *(*pfn) = (char *(*)) free
4805; return 0; }
4806EOF
3c3bdf30 4807if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4808 rm -rf conftest*
4809 bfd_cv_decl_needed_free=no
4810else
4811 echo "configure: failed program was:" >&5
4812 cat conftest.$ac_ext >&5
4813 rm -rf conftest*
4814 bfd_cv_decl_needed_free=yes
4815fi
4816rm -f conftest*
4817fi
4818
4819echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4820if test $bfd_cv_decl_needed_free = yes; then
4821 cat >> confdefs.h <<\EOF
4822#define NEED_DECLARATION_FREE 1
4823EOF
4824
4825fi
4826
4827echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
3c3bdf30 4828echo "configure:4829: checking whether sbrk must be declared" >&5
a2d91340 4829if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
252b5132
RH
4830 echo $ac_n "(cached) $ac_c" 1>&6
4831else
4832 cat > conftest.$ac_ext <<EOF
3c3bdf30 4833#line 4834 "configure"
252b5132
RH
4834#include "confdefs.h"
4835
4836#include <stdio.h>
4837#ifdef HAVE_STRING_H
4838#include <string.h>
4839#else
4840#ifdef HAVE_STRINGS_H
4841#include <strings.h>
4842#endif
4843#endif
4844#ifdef HAVE_STDLIB_H
4845#include <stdlib.h>
4846#endif
4847#ifdef HAVE_UNISTD_H
4848#include <unistd.h>
4849#endif
4850int main() {
4851char *(*pfn) = (char *(*)) sbrk
4852; return 0; }
4853EOF
3c3bdf30 4854if { (eval echo configure:4855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4855 rm -rf conftest*
4856 bfd_cv_decl_needed_sbrk=no
4857else
4858 echo "configure: failed program was:" >&5
4859 cat conftest.$ac_ext >&5
4860 rm -rf conftest*
4861 bfd_cv_decl_needed_sbrk=yes
4862fi
4863rm -f conftest*
4864fi
4865
4866echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
4867if test $bfd_cv_decl_needed_sbrk = yes; then
4868 cat >> confdefs.h <<\EOF
4869#define NEED_DECLARATION_SBRK 1
4870EOF
4871
4872fi
4873
4874echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
3c3bdf30 4875echo "configure:4876: checking whether getenv must be declared" >&5
a2d91340 4876if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
252b5132
RH
4877 echo $ac_n "(cached) $ac_c" 1>&6
4878else
4879 cat > conftest.$ac_ext <<EOF
3c3bdf30 4880#line 4881 "configure"
252b5132
RH
4881#include "confdefs.h"
4882
4883#include <stdio.h>
4884#ifdef HAVE_STRING_H
4885#include <string.h>
4886#else
4887#ifdef HAVE_STRINGS_H
4888#include <strings.h>
4889#endif
4890#endif
4891#ifdef HAVE_STDLIB_H
4892#include <stdlib.h>
4893#endif
4894#ifdef HAVE_UNISTD_H
4895#include <unistd.h>
4896#endif
4897int main() {
4898char *(*pfn) = (char *(*)) getenv
4899; return 0; }
4900EOF
3c3bdf30 4901if { (eval echo configure:4902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4902 rm -rf conftest*
4903 bfd_cv_decl_needed_getenv=no
4904else
4905 echo "configure: failed program was:" >&5
4906 cat conftest.$ac_ext >&5
4907 rm -rf conftest*
4908 bfd_cv_decl_needed_getenv=yes
4909fi
4910rm -f conftest*
4911fi
4912
4913echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4914if test $bfd_cv_decl_needed_getenv = yes; then
4915 cat >> confdefs.h <<\EOF
4916#define NEED_DECLARATION_GETENV 1
4917EOF
4918
4919fi
4920
4921echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
3c3bdf30 4922echo "configure:4923: checking whether environ must be declared" >&5
a2d91340 4923if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
252b5132
RH
4924 echo $ac_n "(cached) $ac_c" 1>&6
4925else
4926 cat > conftest.$ac_ext <<EOF
3c3bdf30 4927#line 4928 "configure"
252b5132
RH
4928#include "confdefs.h"
4929
4930#include <stdio.h>
4931#ifdef HAVE_STRING_H
4932#include <string.h>
4933#else
4934#ifdef HAVE_STRINGS_H
4935#include <strings.h>
4936#endif
4937#endif
4938#ifdef HAVE_STDLIB_H
4939#include <stdlib.h>
4940#endif
4941#ifdef HAVE_UNISTD_H
4942#include <unistd.h>
4943#endif
4944int main() {
4945char *(*pfn) = (char *(*)) environ
4946; return 0; }
4947EOF
3c3bdf30 4948if { (eval echo configure:4949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4949 rm -rf conftest*
4950 bfd_cv_decl_needed_environ=no
4951else
4952 echo "configure: failed program was:" >&5
4953 cat conftest.$ac_ext >&5
4954 rm -rf conftest*
4955 bfd_cv_decl_needed_environ=yes
4956fi
4957rm -f conftest*
4958fi
4959
4960echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
4961if test $bfd_cv_decl_needed_environ = yes; then
4962 cat >> confdefs.h <<\EOF
4963#define NEED_DECLARATION_ENVIRON 1
4964EOF
4965
4966fi
4967
4968
597e2591
ILT
4969# When converting linker scripts into strings for use in emulation
4970# files, use astring.sed if the compiler supports ANSI string
4971# concatenation, or ostring.sed otherwise. This is to support the
4972# broken Microsoft MSVC compiler, which limits the length of string
4973# constants, while still supporting pre-ANSI compilers which do not
4974# support string concatenation.
e4dabd0e 4975echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
3c3bdf30 4976echo "configure:4977: checking whether ANSI C string concatenation works" >&5
a2d91340 4977if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then
597e2591
ILT
4978 echo $ac_n "(cached) $ac_c" 1>&6
4979else
4980 cat > conftest.$ac_ext <<EOF
3c3bdf30 4981#line 4982 "configure"
597e2591
ILT
4982#include "confdefs.h"
4983
4984int main() {
4985char *a = "a" "a";
4986; return 0; }
4987EOF
3c3bdf30 4988if { (eval echo configure:4989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
597e2591 4989 rm -rf conftest*
e4dabd0e 4990 ld_cv_string_concatenation=yes
597e2591
ILT
4991else
4992 echo "configure: failed program was:" >&5
4993 cat conftest.$ac_ext >&5
4994 rm -rf conftest*
e4dabd0e 4995 ld_cv_string_concatenation=no
597e2591
ILT
4996fi
4997rm -f conftest*
4998fi
4999
e4dabd0e
AS
5000echo "$ac_t""$ld_cv_string_concatenation" 1>&6
5001if test "$ld_cv_string_concatenation" = "yes"; then
597e2591
ILT
5002 STRINGIFY=astring.sed
5003else
5004 STRINGIFY=ostring.sed
5005fi
5006
5007
252b5132
RH
5008# target-specific stuff:
5009
5010all_targets=
5011EMUL=
5012all_emuls=
5013all_emul_extras=
ba2be581 5014all_libpath=
252b5132
RH
5015
5016rm -f tdirs
5017
5018for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
5019do
5020 if test "$targ_alias" = "all"; then
5021 all_targets=true
5022 else
5023 # Canonicalize the secondary target names.
a8100d5b 5024 result=`$ac_config_sub $targ_alias 2>/dev/null`
252b5132
RH
5025 if test -n "$result"; then
5026 targ=$result
5027 else
5028 targ=$targ_alias
5029 fi
5030
5031 . ${srcdir}/configure.tgt
5032
5033 if test "$targ" = "$target"; then
5034 EMUL=$targ_emul
5035 fi
5036
3336653a 5037 for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
252b5132
RH
5038 case " $all_emuls " in
5039 *" e${i}.o "*) ;;
5040 *)
5041 all_emuls="$all_emuls e${i}.o"
5042 eval result=\$tdir_$i
5043 test -z "$result" && result=$targ_alias
5044 echo tdir_$i=$result >> tdirs
5045 ;;
5046 esac
5047 done
5048
ba2be581 5049 for i in $targ_emul $targ_extra_libpath; do
3336653a
RH
5050 case " $all_libpath " in
5051 *" ${i} "*) ;;
5052 *)
ba2be581
RH
5053 if test -z "$all_libpath"; then
5054 all_libpath=${i}
5055 else
5056 all_libpath="$all_libpath ${i}"
5057 fi
3336653a
RH
5058 ;;
5059 esac
5060 done
5061
252b5132
RH
5062 for i in $targ_extra_ofiles; do
5063 case " $all_emul_extras " in
5064 *" ${i} "*) ;;
5065 *)
5066 all_emul_extras="$all_emul_extras ${i}"
5067 ;;
5068 esac
5069 done
5070 fi
5071done
5072
5073
5074
5075TDIRS=tdirs
5076
5077
5078if test x${all_targets} = xtrue; then
5079 if test x${want64} = xtrue; then
5080 EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
5081 else
5082 EMULATION_OFILES='$(ALL_EMULATIONS)'
5083 fi
5084 EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES)'
5085else
5086 EMULATION_OFILES=$all_emuls
5087 EMUL_EXTRA_OFILES=$all_emul_extras
5088fi
5089
5090
5091
3336653a
RH
5092EMULATION_LIBPATH=$all_libpath
5093
5094
252b5132
RH
5095if test x${enable_static} = xno; then
5096 TESTBFDLIB="--rpath ../bfd/.libs ../bfd/.libs/libbfd.so"
5097else
5098 TESTBFDLIB="../bfd/.libs/libbfd.a"
5099fi
5100
5101
93a6d436
JL
5102target_vendor=${target_vendor=$host_vendor}
5103case "$target_vendor" in
5104 hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
5105 *) EXTRA_SHLIB_EXTENSION= ;;
5106esac
5107if test x${EXTRA_SHLIB_EXTENSION} != x ; then
5108 cat >> confdefs.h <<EOF
5109#define EXTRA_SHLIB_EXTENSION "$EXTRA_SHLIB_EXTENSION"
5110EOF
5111
5112fi
5113
252b5132
RH
5114trap '' 1 2 15
5115cat > confcache <<\EOF
5116# This file is a shell script that caches the results of configure
5117# tests run on this system so they can be shared between configure
5118# scripts and configure runs. It is not useful on other systems.
5119# If it contains results you don't want to keep, you may remove or edit it.
5120#
5121# By default, configure uses ./config.cache as the cache file,
5122# creating it if it does not exist already. You can give configure
5123# the --cache-file=FILE option to use a different cache file; that is
5124# what configure does when it calls configure scripts in
5125# subdirectories, so they share the cache.
5126# Giving --cache-file=/dev/null disables caching, for debugging configure.
5127# config.status only pays attention to the cache file if you give it the
5128# --recheck option to rerun configure.
5129#
5130EOF
5131# The following way of writing the cache mishandles newlines in values,
5132# but we know of no workaround that is simple, portable, and efficient.
5133# So, don't put newlines in cache variables' values.
5134# Ultrix sh set writes to stderr and can't be redirected directly,
5135# and sets the high bit in the cache file unless we assign to the vars.
5136(set) 2>&1 |
5137 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5138 *ac_space=\ *)
5139 # `set' does not quote correctly, so add quotes (double-quote substitution
5140 # turns \\\\ into \\, and sed turns \\ into \).
5141 sed -n \
5142 -e "s/'/'\\\\''/g" \
5143 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5144 ;;
5145 *)
5146 # `set' quotes correctly as required by POSIX, so do not add quotes.
5147 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5148 ;;
5149 esac >> confcache
5150if cmp -s $cache_file confcache; then
5151 :
5152else
5153 if test -w $cache_file; then
5154 echo "updating cache $cache_file"
5155 cat confcache > $cache_file
5156 else
5157 echo "not updating unwritable cache $cache_file"
5158 fi
5159fi
5160rm -f confcache
5161
5162trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5163
5164test "x$prefix" = xNONE && prefix=$ac_default_prefix
5165# Let make expand exec_prefix.
5166test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5167
5168# Any assignment to VPATH causes Sun make to only execute
5169# the first set of double-colon rules, so remove it if not needed.
5170# If there is a colon in the path, we need to keep it.
5171if test "x$srcdir" = x.; then
5172 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5173fi
5174
5175trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5176
5177DEFS=-DHAVE_CONFIG_H
5178
5179# Without the "./", some shells look in PATH for config.status.
5180: ${CONFIG_STATUS=./config.status}
5181
5182echo creating $CONFIG_STATUS
5183rm -f $CONFIG_STATUS
5184cat > $CONFIG_STATUS <<EOF
5185#! /bin/sh
5186# Generated automatically by configure.
5187# Run this file to recreate the current configuration.
5188# This directory was configured as follows,
5189# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5190#
5191# $0 $ac_configure_args
5192#
5193# Compiler output produced by configure, useful for debugging
5194# configure, is in ./config.log if it exists.
5195
5196ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5197for ac_option
5198do
5199 case "\$ac_option" in
5200 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5201 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5202 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5203 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
a2d91340 5204 echo "$CONFIG_STATUS generated by autoconf version 2.13"
252b5132
RH
5205 exit 0 ;;
5206 -help | --help | --hel | --he | --h)
5207 echo "\$ac_cs_usage"; exit 0 ;;
5208 *) echo "\$ac_cs_usage"; exit 1 ;;
5209 esac
5210done
5211
5212ac_given_srcdir=$srcdir
5213ac_given_INSTALL="$INSTALL"
5214
5215trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5216EOF
5217cat >> $CONFIG_STATUS <<EOF
5218
5219# Protect against being on the right side of a sed subst in config.status.
5220sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5221 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5222$ac_vpsub
5223$extrasub
5224s%@SHELL@%$SHELL%g
5225s%@CFLAGS@%$CFLAGS%g
5226s%@CPPFLAGS@%$CPPFLAGS%g
5227s%@CXXFLAGS@%$CXXFLAGS%g
5228s%@FFLAGS@%$FFLAGS%g
5229s%@DEFS@%$DEFS%g
5230s%@LDFLAGS@%$LDFLAGS%g
5231s%@LIBS@%$LIBS%g
5232s%@exec_prefix@%$exec_prefix%g
5233s%@prefix@%$prefix%g
5234s%@program_transform_name@%$program_transform_name%g
5235s%@bindir@%$bindir%g
5236s%@sbindir@%$sbindir%g
5237s%@libexecdir@%$libexecdir%g
5238s%@datadir@%$datadir%g
5239s%@sysconfdir@%$sysconfdir%g
5240s%@sharedstatedir@%$sharedstatedir%g
5241s%@localstatedir@%$localstatedir%g
5242s%@libdir@%$libdir%g
5243s%@includedir@%$includedir%g
5244s%@oldincludedir@%$oldincludedir%g
5245s%@infodir@%$infodir%g
5246s%@mandir@%$mandir%g
5247s%@host@%$host%g
5248s%@host_alias@%$host_alias%g
5249s%@host_cpu@%$host_cpu%g
5250s%@host_vendor@%$host_vendor%g
5251s%@host_os@%$host_os%g
5252s%@target@%$target%g
5253s%@target_alias@%$target_alias%g
5254s%@target_cpu@%$target_cpu%g
5255s%@target_vendor@%$target_vendor%g
5256s%@target_os@%$target_os%g
5257s%@build@%$build%g
5258s%@build_alias@%$build_alias%g
5259s%@build_cpu@%$build_cpu%g
5260s%@build_vendor@%$build_vendor%g
5261s%@build_os@%$build_os%g
5262s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5263s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5264s%@INSTALL_DATA@%$INSTALL_DATA%g
5265s%@PACKAGE@%$PACKAGE%g
5266s%@VERSION@%$VERSION%g
5267s%@ACLOCAL@%$ACLOCAL%g
5268s%@AUTOCONF@%$AUTOCONF%g
5269s%@AUTOMAKE@%$AUTOMAKE%g
5270s%@AUTOHEADER@%$AUTOHEADER%g
5271s%@MAKEINFO@%$MAKEINFO%g
5272s%@SET_MAKE@%$SET_MAKE%g
a2b64bed 5273s%@CC@%$CC%g
252b5132 5274s%@LN_S@%$LN_S%g
ac48eca1
AO
5275s%@OBJEXT@%$OBJEXT%g
5276s%@EXEEXT@%$EXEEXT%g
5277s%@RANLIB@%$RANLIB%g
5278s%@STRIP@%$STRIP%g
252b5132 5279s%@LIBTOOL@%$LIBTOOL%g
a2d91340 5280s%@WARN_CFLAGS@%$WARN_CFLAGS%g
252b5132
RH
5281s%@CPP@%$CPP%g
5282s%@ALLOCA@%$ALLOCA%g
5283s%@USE_NLS@%$USE_NLS%g
5284s%@MSGFMT@%$MSGFMT%g
5285s%@GMSGFMT@%$GMSGFMT%g
5286s%@XGETTEXT@%$XGETTEXT%g
5287s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5288s%@CATALOGS@%$CATALOGS%g
5289s%@CATOBJEXT@%$CATOBJEXT%g
5290s%@DATADIRNAME@%$DATADIRNAME%g
5291s%@GMOFILES@%$GMOFILES%g
5292s%@INSTOBJEXT@%$INSTOBJEXT%g
5293s%@INTLDEPS@%$INTLDEPS%g
5294s%@INTLLIBS@%$INTLLIBS%g
5295s%@INTLOBJS@%$INTLOBJS%g
5296s%@POFILES@%$POFILES%g
5297s%@POSUB@%$POSUB%g
5298s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5299s%@GT_NO@%$GT_NO%g
5300s%@GT_YES@%$GT_YES%g
5301s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5302s%@l@%$l%g
252b5132
RH
5303s%@YACC@%$YACC%g
5304s%@LEX@%$LEX%g
5305s%@LEXLIB@%$LEXLIB%g
5306s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5307s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5308s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5309s%@MAINT@%$MAINT%g
5310s%@HDEFINES@%$HDEFINES%g
5311s%@HOSTING_CRT0@%$HOSTING_CRT0%g
5312s%@HOSTING_LIBS@%$HOSTING_LIBS%g
5313s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
597e2591 5314s%@STRINGIFY@%$STRINGIFY%g
252b5132
RH
5315s%@EMUL@%$EMUL%g
5316/@TDIRS@/r $TDIRS
5317s%@TDIRS@%%g
5318s%@EMULATION_OFILES@%$EMULATION_OFILES%g
5319s%@EMUL_EXTRA_OFILES@%$EMUL_EXTRA_OFILES%g
3336653a 5320s%@EMULATION_LIBPATH@%$EMULATION_LIBPATH%g
252b5132
RH
5321s%@TESTBFDLIB@%$TESTBFDLIB%g
5322
5323CEOF
5324EOF
5325
5326cat >> $CONFIG_STATUS <<\EOF
5327
5328# Split the substitutions into bite-sized pieces for seds with
5329# small command number limits, like on Digital OSF/1 and HP-UX.
5330ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5331ac_file=1 # Number of current file.
5332ac_beg=1 # First line for current file.
5333ac_end=$ac_max_sed_cmds # Line after last line for current file.
5334ac_more_lines=:
5335ac_sed_cmds=""
5336while $ac_more_lines; do
5337 if test $ac_beg -gt 1; then
5338 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5339 else
5340 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5341 fi
5342 if test ! -s conftest.s$ac_file; then
5343 ac_more_lines=false
5344 rm -f conftest.s$ac_file
5345 else
5346 if test -z "$ac_sed_cmds"; then
5347 ac_sed_cmds="sed -f conftest.s$ac_file"
5348 else
5349 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5350 fi
5351 ac_file=`expr $ac_file + 1`
5352 ac_beg=$ac_end
5353 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5354 fi
5355done
5356if test -z "$ac_sed_cmds"; then
5357 ac_sed_cmds=cat
5358fi
5359EOF
5360
5361cat >> $CONFIG_STATUS <<EOF
5362
5363CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
5364EOF
5365cat >> $CONFIG_STATUS <<\EOF
5366for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5367 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5368 case "$ac_file" in
5369 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5370 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5371 *) ac_file_in="${ac_file}.in" ;;
5372 esac
5373
5374 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5375
5376 # Remove last slash and all that follows it. Not all systems have dirname.
5377 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5378 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5379 # The file is in a subdirectory.
5380 test ! -d "$ac_dir" && mkdir "$ac_dir"
5381 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5382 # A "../" for each directory in $ac_dir_suffix.
5383 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5384 else
5385 ac_dir_suffix= ac_dots=
5386 fi
5387
5388 case "$ac_given_srcdir" in
5389 .) srcdir=.
5390 if test -z "$ac_dots"; then top_srcdir=.
5391 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5392 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5393 *) # Relative path.
5394 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5395 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5396 esac
5397
5398 case "$ac_given_INSTALL" in
5399 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5400 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5401 esac
5402
5403 echo creating "$ac_file"
5404 rm -f "$ac_file"
5405 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5406 case "$ac_file" in
5407 *Makefile*) ac_comsub="1i\\
5408# $configure_input" ;;
5409 *) ac_comsub= ;;
5410 esac
5411
5412 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5413 sed -e "$ac_comsub
5414s%@configure_input@%$configure_input%g
5415s%@srcdir@%$srcdir%g
5416s%@top_srcdir@%$top_srcdir%g
5417s%@INSTALL@%$INSTALL%g
5418" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5419fi; done
5420rm -f conftest.s*
5421
5422# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5423# NAME is the cpp macro being defined and VALUE is the value it is being given.
5424#
5425# ac_d sets the value in "#define NAME VALUE" lines.
5426ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5427ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5428ac_dC='\3'
5429ac_dD='%g'
5430# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5431ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5432ac_uB='\([ ]\)%\1#\2define\3'
5433ac_uC=' '
5434ac_uD='\4%g'
5435# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5436ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5437ac_eB='$%\1#\2define\3'
5438ac_eC=' '
5439ac_eD='%g'
5440
5441if test "${CONFIG_HEADERS+set}" != set; then
5442EOF
5443cat >> $CONFIG_STATUS <<EOF
5444 CONFIG_HEADERS="config.h:config.in"
5445EOF
5446cat >> $CONFIG_STATUS <<\EOF
5447fi
5448for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5449 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5450 case "$ac_file" in
5451 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5452 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5453 *) ac_file_in="${ac_file}.in" ;;
5454 esac
5455
5456 echo creating $ac_file
5457
5458 rm -f conftest.frag conftest.in conftest.out
5459 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5460 cat $ac_file_inputs > conftest.in
5461
5462EOF
5463
5464# Transform confdefs.h into a sed script conftest.vals that substitutes
5465# the proper values into config.h.in to produce config.h. And first:
5466# Protect against being on the right side of a sed subst in config.status.
5467# Protect against being in an unquoted here document in config.status.
5468rm -f conftest.vals
5469cat > conftest.hdr <<\EOF
5470s/[\\&%]/\\&/g
5471s%[\\$`]%\\&%g
5472s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5473s%ac_d%ac_u%gp
5474s%ac_u%ac_e%gp
5475EOF
5476sed -n -f conftest.hdr confdefs.h > conftest.vals
5477rm -f conftest.hdr
5478
5479# This sed command replaces #undef with comments. This is necessary, for
5480# example, in the case of _POSIX_SOURCE, which is predefined and required
5481# on some systems where configure will not decide to define it.
5482cat >> conftest.vals <<\EOF
5483s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5484EOF
5485
5486# Break up conftest.vals because some shells have a limit on
5487# the size of here documents, and old seds have small limits too.
5488
5489rm -f conftest.tail
5490while :
5491do
5492 ac_lines=`grep -c . conftest.vals`
5493 # grep -c gives empty output for an empty file on some AIX systems.
5494 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5495 # Write a limited-size here document to conftest.frag.
5496 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5497 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5498 echo 'CEOF
5499 sed -f conftest.frag conftest.in > conftest.out
5500 rm -f conftest.in
5501 mv conftest.out conftest.in
5502' >> $CONFIG_STATUS
5503 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5504 rm -f conftest.vals
5505 mv conftest.tail conftest.vals
5506done
5507rm -f conftest.vals
5508
5509cat >> $CONFIG_STATUS <<\EOF
5510 rm -f conftest.frag conftest.h
5511 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5512 cat conftest.in >> conftest.h
5513 rm -f conftest.in
5514 if cmp -s $ac_file conftest.h 2>/dev/null; then
5515 echo "$ac_file is unchanged"
5516 rm -f conftest.h
5517 else
5518 # Remove last slash and all that follows it. Not all systems have dirname.
5519 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5520 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5521 # The file is in a subdirectory.
5522 test ! -d "$ac_dir" && mkdir "$ac_dir"
5523 fi
5524 rm -f $ac_file
5525 mv conftest.h $ac_file
5526 fi
5527fi; done
5528
5529EOF
5530cat >> $CONFIG_STATUS <<EOF
5531
5532
5533EOF
5534cat >> $CONFIG_STATUS <<\EOF
5535test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5536sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
5537exit 0
5538EOF
5539chmod +x $CONFIG_STATUS
5540rm -fr confdefs* $ac_clean_files
a2d91340 5541test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
252b5132 5542