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