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