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