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