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