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