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