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