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