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