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