* objdump.c (disassemble_bytes): If the disassembler returns an
[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=
ac50feda 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
ac50feda 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
ac50feda
RH
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.
ac50feda
RH
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
ac50feda
RH
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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
819VERSION=2.9.4
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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 1128#line 1129 "configure"
252b5132
RH
1129#include "confdefs.h"
1130
1131main(){return(0);}
1132EOF
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 1259echo "configure:1260: checking for GNU ld" >&5
252b5132
RH
1260else
1261 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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"
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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.
ac50feda
RH
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
ac50feda 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
ac50feda 1624#line 1625 "configure"
bedf545c
ILT
1625#include "confdefs.h"
1626
1627int main() {
1628
1629; return 0; }
1630EOF
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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
ac50feda 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 ;;
2038 hppa-*-lites*) fmt=elf em=hppa ;;
2039 hppa-*-osf*) fmt=som em=hppa ;;
2040 hppa-*-rtems*) fmt=elf em=hppa ;;
2041 hppa-*-hpux*) fmt=som em=hppa ;;
2042 hppa-*-mpeix*) fmt=som em=hppa ;;
2043 hppa-*-bsd*) fmt=som em=hppa ;;
2044 hppa-*-hiux*) fmt=som em=hppa ;;
2045
2046 h8300-*-coff) fmt=coff ;;
2047
2048 i386-ibm-aix*) fmt=coff em=i386aix ;;
2049 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
2050 i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
2051 i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
2052 i386-*-bsd*) fmt=aout em=386bsd ;;
2053 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
2054 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
2055 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
2056 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
2057 i386-*-linux*coff*) fmt=coff em=linux ;;
2058 i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
2059 i386-*-lynxos*) fmt=coff em=lynx ;;
2060 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
2061 fmt=elf bfd_gas=yes ;;
008960a5
ILT
2062 i386-*-freebsdaout* | i386-*-freebsd12.* | i386-*-freebsd12)
2063 fmt=aout em=386bsd ;;
2064 i386-*-freebsd*) fmt=elf bfd_gas=yes ;;
252b5132
RH
2065 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
2066 fmt=coff ;;
2067 i386-*-sco3.2v5*) fmt=elf
2068 if test ${this_target} = $target; then
2069 cat >> confdefs.h <<\EOF
2070#define SCO_ELF 1
2071EOF
2072
2073 fi
2074 ;;
2075 i386-*-sco3.2*) fmt=coff ;;
2076 i386-*-vsta) fmt=aout ;;
2077 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
2078 fmt=coff em=go32;;
53f3de98 2079 i386-*-rtemself*) fmt=elf ;;
252b5132
RH
2080 i386-*-rtems*) fmt=coff ;;
2081 i386-*-gnu*) fmt=elf ;;
2082 i386-*-mach*)
2083 fmt=aout em=mach bfd_gas=yes ;;
2084 i386-*-msdos*) fmt=aout ;;
2085 i386-*-moss*) fmt=elf ;;
2086 i386-*-pe) fmt=coff em=pe ;;
2087 i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
2088 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
2089 i386-*-*nt*) fmt=coff em=pe ;;
2090 i960-*-bout) fmt=bout ;;
2091 i960-*-coff) fmt=coff em=ic960 ;;
2092 i960-*-rtems*) fmt=coff em=ic960 ;;
2093 i960-*-nindy*) fmt=bout ;;
2094 i960-*-vxworks4*) fmt=bout ;;
2095 i960-*-vxworks5.0) fmt=bout ;;
2096 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
2097 i960-*-vxworks*) fmt=bout ;;
bedf545c 2098 i960-*-elf*) fmt=elf ;;
252b5132
RH
2099
2100 m32r-*-*) fmt=elf bfd_gas=yes ;;
2101
2102 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
2103 fmt=aout em=sun3 ;;
2104 m68k-motorola-sysv*) fmt=coff em=delta ;;
2105 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
2106 m68k-apollo-*) fmt=coff em=apollo ;;
2107 m68k-*-sysv4*) # must be before -sysv*
2108 fmt=elf em=svr4 ;;
2109 m68k-*-elf*) fmt=elf ;;
2110 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
2111 fmt=coff ;;
2112 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
2113 m68k-*-linux*aout*) fmt=aout em=linux ;;
2114 m68k-*-linux-gnu*) fmt=elf em=linux ;;
2115 m68k-*-gnu*) fmt=elf ;;
2116 m68k-*-lynxos*) fmt=coff em=lynx ;;
2117 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
2118 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
2119 m68k-apple-aux*) fmt=coff em=aux ;;
2120 m68k-*-psos*) fmt=elf em=psos;;
2121
2122 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
2123 m88k-*-coff*) fmt=coff ;;
2124
2125 mcore-*-elf) fmt=elf bfd_gas=yes ;;
2126 mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
2127
2128 # don't change em like *-*-bsd does
2129 mips-dec-netbsd*) fmt=elf endian=little ;;
2130 mips-dec-openbsd*) fmt=elf endian=little ;;
2131 mips-dec-bsd*) fmt=aout endian=little ;;
2132 mips-sony-bsd*) fmt=ecoff ;;
2133 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
2134 mips-*-ultrix*) fmt=ecoff endian=little ;;
2135 mips-*-osf*) fmt=ecoff endian=little ;;
2136 mips-*-ecoff*) fmt=ecoff ;;
2137 mips-*-ecoff*) fmt=ecoff ;;
2138 mips-*-irix6*) fmt=elf ;;
2139 mips-*-irix5*) fmt=elf ;;
2140 mips-*-irix*) fmt=ecoff ;;
2141 mips-*-lnews*) fmt=ecoff em=lnews ;;
2142 mips-*-riscos*) fmt=ecoff ;;
2143 mips-*-sysv*) fmt=ecoff ;;
2144 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
2145 fmt=elf ;;
2146 mips-*-vxworks*) fmt=elf
2147 cat >> confdefs.h <<\EOF
2148#define MIPS_STABS_ELF 1
2149EOF
2150
2151 ;;
2152 mn10200-*-*) fmt=elf bfd_gas=yes ;;
2153 mn10300-*-*) fmt=elf bfd_gas=yes ;;
2154 ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
2155 fmt=coff em=pe ;;
2156 ppc-*-aix*) fmt=coff ;;
2157 ppc-*-beos*) fmt=coff ;;
2158 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
2159 fmt=elf ;;
2160 ppc-*-linux-gnu*) fmt=elf
2161 case "$endian" in
2162 big) ;;
2163 *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
2164 esac
2165 ;;
2166 ppc-*-solaris*) fmt=elf
2167 if test ${this_target} = $target; then
2168 cat >> confdefs.h <<\EOF
2169#define TARGET_SOLARIS_COMMENT 1
2170EOF
2171
2172 fi
2173 if test x${endian} = xbig; then
2174 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
2175 fi
2176 ;;
2177 ppc-*-rtems*) fmt=elf ;;
2178 ppc-*-macos* | ppc-*-mpw*)
2179 fmt=coff em=macos ;;
2180 ppc-*-netware*) fmt=elf em=ppcnw ;;
2181
2182 sh-*-elf*) fmt=elf ;;
2183 sh-*-coff*) fmt=coff ;;
53f3de98 2184 sh-*-rtemself*) fmt=elf ;;
252b5132
RH
2185 sh-*-rtems*) fmt=coff ;;
2186
2187 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
2188 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
2189 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
2190
2191 sparc-*-rtems*) fmt=aout ;;
2192 sparc-*-sunos4*) fmt=aout em=sun3 ;;
2193 sparc-*-aout | sparc*-*-vxworks*)
2194 fmt=aout em=sparcaout ;;
2195 sparc-*-coff) fmt=coff ;;
2196 sparc-*-linux*aout*) fmt=aout em=linux ;;
2197 sparc-*-linux-gnu*) fmt=elf em=linux ;;
2198 sparc-*-lynxos*) fmt=coff em=lynx ;;
2199 sparc-fujitsu-none) fmt=aout ;;
2200 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
2201 fmt=elf ;;
2202 sparc-*-netbsd*) fmt=aout em=nbsd ;;
2203 sparc-*-openbsd*) fmt=aout em=nbsd ;;
2204
2205 strongarm-*-coff) fmt=coff ;;
2206 strongarm-*-elf) fmt=elf ;;
2207
2208 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
2209 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
2210 tic80-*-*) fmt=coff ;;
2211
2212 v850-*-*) fmt=elf bfd_gas=yes ;;
2213 v850e-*-*) fmt=elf bfd_gas=yes ;;
2214 v850ea-*-*) fmt=elf bfd_gas=yes ;;
2215
2216 vax-*-bsd* | vax-*-ultrix*)
2217 fmt=aout ;;
2218 vax-*-vms) fmt=vms ;;
2219
2220
2221 z8k-*-coff | z8k-*-sim)
2222 fmt=coff ;;
2223
2224 w65-*-*) fmt=coff ;;
2225
2226 *-*-aout | *-*-scout)
2227 fmt=aout ;;
2228 *-*-nindy*)
2229 fmt=bout ;;
2230 *-*-bsd*)
2231 fmt=aout em=sun3 ;;
2232 *-*-generic) fmt=generic ;;
2233 *-*-xray | *-*-hms) fmt=coff ;;
2234 *-*-sim) fmt=coff ;;
2235 *-*-elf | *-*-sysv4* | *-*-solaris*)
2236 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
2237 fmt=elf dev=yes ;;
2238 *-*-vxworks) fmt=aout ;;
2239 *-*-netware) fmt=elf ;;
2240 esac
2241
2242 if test ${this_target} = $target ; then
2243 endian_def=
2244 if test x${endian} = xbig; then
2245 endian_def=1
2246 elif test x${endian} = xlittle; then
2247 endian_def=0
2248 fi
2249 if test x${endian_def} != x; then
2250 cat >> confdefs.h <<EOF
2251#define TARGET_BYTES_BIG_ENDIAN $endian_def
2252EOF
2253
2254 fi
2255 fi
2256
2257 case ${cpu_type}-${fmt} in
2258 alpha*-*) bfd_gas=yes ;;
2259 arm-*) bfd_gas=yes ;;
2260 # not yet
2261 # i386-aout) bfd_gas=preferred ;;
2262 mips-*) bfd_gas=yes ;;
2263 ns32k-*) bfd_gas=yes ;;
2264 ppc-*) bfd_gas=yes ;;
2265 sparc-*) bfd_gas=yes ;;
2266 strongarm-*) bfd_gas=yes ;;
2267 *-elf) bfd_gas=yes ;;
2268 *-ecoff) bfd_gas=yes ;;
2269 *-som) bfd_gas=yes ;;
2270 *) ;;
2271 esac
2272
2273# Other random stuff.
2274
2275 # Do we need the opcodes library?
2276 case ${cpu_type} in
2277 vax | i386 | tic30)
2278 ;;
2279
2280 *)
2281 need_opcodes=yes
2282
2283 case "${enable_shared}" in
2284 yes) shared_opcodes=true ;;
2285 *opcodes*) shared_opcodes=true ;;
2286 *) shared_opcodes=false ;;
2287 esac
2288 if test "${shared_opcodes}" = "true"; then
2289 # A shared libopcodes must be linked against libbfd.
2290 need_bfd=yes
2291 fi
2292 ;;
2293 esac
2294
2295 # Any other special object files needed ?
2296 case ${cpu_type} in
2297 fr30 | m32r)
2298 using_cgen=yes
2299 ;;
2300
2301 m68k)
2302 case ${extra_objects} in
2303 *m68k-parse.o*) ;;
2304 *) extra_objects="$extra_objects m68k-parse.o" ;;
2305 esac
2306 ;;
2307
2308 mips)
2309 echo ${extra_objects} | grep -s "itbl-parse.o"
2310 if test $? -ne 0 ; then
2311 extra_objects="$extra_objects itbl-parse.o"
2312 fi
2313
2314 echo ${extra_objects} | grep -s "itbl-lex.o"
2315 if test $? -ne 0 ; then
2316 extra_objects="$extra_objects itbl-lex.o"
2317 fi
2318
2319 echo ${extra_objects} | grep -s "itbl-ops.o"
2320 if test $? -ne 0 ; then
2321 extra_objects="$extra_objects itbl-ops.o"
2322 fi
2323 ;;
2324
2325 sparc)
2326 if test $this_target = $target ; then
2327 cat >> confdefs.h <<EOF
2328#define DEFAULT_ARCH "${arch}"
2329EOF
2330
2331 fi
2332 ;;
2333 *)
2334 ;;
2335 esac
2336
2337 if test $using_cgen = yes ; then
2338 case "x${extra_objects}" in
2339 *cgen.o*) ;;
2340 *) extra_objects="$extra_objects cgen.o" ;;
2341 esac
2342 fi
2343
2344# See if we really can support this configuration with the emulation code.
2345
2346 if test $this_target = $target ; then
2347 primary_bfd_gas=$bfd_gas
2348 obj_format=$fmt
2349 te_file=$em
2350
2351 if test $bfd_gas = no ; then
2352 # Can't support other configurations this way.
2353 break
2354 fi
2355 elif test $bfd_gas = no ; then
2356 # Can't support this configuration.
2357 break
2358 fi
2359
2360# From target name and format, produce a list of supported emulations.
2361
2362 case ${generic_target}-${fmt} in
2363 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2364 mips-*-linux-gnu*-*) case "$endian" in
2365 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2366 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
2367 esac ;;
2368 mips-*-lnews*-ecoff) ;;
2369 mips-*-*-ecoff) case "$endian" in
2370 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
2371 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
2372 esac ;;
2373 mips-*-*-elf) case "$endian" in
2374 big) emulation="mipsbelf mipslelf mipself" ;;
2375 *) emulation="mipslelf mipsbelf mipself" ;;
2376 # Uncommenting the next line will turn on support for i386 COFF
2377 # in any i386 ELF configuration. This probably doesn't work
2378 # correctly.
2379 # i386-*-*-elf) emulation="i386coff i386elf" ;;
2380 esac ;;
2381 esac
2382
2383 emulations="$emulations $emulation"
2384
2385done
2386
2387# Assign floating point type. Most processors with FP support
2388# IEEE FP. On those that don't support FP at all, usually IEEE
2389# is emulated.
2390case ${target_cpu} in
2391 vax | tahoe ) atof=${target_cpu} ;;
2392 *) atof=ieee ;;
2393esac
2394
2395case "${obj_format}" in
2396 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
2397esac
2398
2399# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
2400cgen_cpu_prefix=""
2401if test $using_cgen = yes ; then
2402 case ${target_cpu} in
2403 *) cgen_cpu_prefix=${target_cpu} ;;
2404 esac
2405
2406 cat >> confdefs.h <<\EOF
2407#define USING_CGEN 1
2408EOF
2409
2410fi
2411
2412
2413if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
2414 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
2415fi
2416
2417if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
2418 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
2419fi
2420
2421case ${user_bfd_gas}-${primary_bfd_gas} in
2422 yes-yes | no-no)
2423 # We didn't override user's choice.
2424 ;;
2425 no-yes)
2426 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
2427 ;;
2428 no-preferred)
2429 primary_bfd_gas=no
2430 ;;
2431 *-preferred)
2432 primary_bfd_gas=yes
2433 ;;
2434 yes-*)
2435 primary_bfd_gas=yes
2436 ;;
2437 -*)
2438 # User specified nothing.
2439 ;;
2440esac
2441
2442# Some COFF configurations want these random other flags set.
2443case ${obj_format} in
2444 coff)
2445 case ${target_cpu_type} in
2446 i386) cat >> confdefs.h <<\EOF
2447#define I386COFF 1
2448EOF
2449 ;;
2450 m68k) cat >> confdefs.h <<\EOF
2451#define M68KCOFF 1
2452EOF
2453 ;;
2454 m88k) cat >> confdefs.h <<\EOF
2455#define M88KCOFF 1
2456EOF
2457 ;;
2458 esac
2459 ;;
2460esac
2461
2462# Getting this done right is going to be a bitch. Each configuration specified
2463# with --enable-targets=... should be checked for environment, format, cpu, and
2464# bfd_gas setting.
2465#
2466# For each configuration, the necessary object file support code must be linked
2467# in. This might be only one, it might be up to four. The necessary emulation
2468# code needs to be provided, too.
2469#
2470# And then there's "--enable-targets=all"....
2471#
2472# For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
2473
2474formats="${obj_format}"
2475emfiles=""
2476EMULATIONS=""
2477_gas_uniq_list="$emulations"
2478_gas_uniq_newlist=""
2479for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2480 case $_gas_uniq_i in
2481 _gas_uniq_dummy) ;;
2482 *) case " $_gas_uniq_newlist " in
2483 *" $_gas_uniq_i "*) ;;
2484 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2485 esac ;;
2486 esac
2487done
2488emulations=$_gas_uniq_newlist
2489
2490for em in . $emulations ; do
2491 case $em in
2492 .) continue ;;
2493 mipsbelf | mipslelf)
2494 fmt=elf file=mipself ;;
2495 mipsbecoff | mipslecoff)
2496 fmt=ecoff file=mipsecoff ;;
2497 i386coff)
2498 fmt=coff file=i386coff ;;
2499 i386elf)
2500 fmt=elf file=i386elf ;;
2501 esac
2502 formats="$formats $fmt"
2503 emfiles="$emfiles e-$file.o"
2504 EMULATIONS="$EMULATIONS &$em,"
2505done
2506_gas_uniq_list="$formats"
2507_gas_uniq_newlist=""
2508for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2509 case $_gas_uniq_i in
2510 _gas_uniq_dummy) ;;
2511 *) case " $_gas_uniq_newlist " in
2512 *" $_gas_uniq_i "*) ;;
2513 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2514 esac ;;
2515 esac
2516done
2517formats=$_gas_uniq_newlist
2518
2519_gas_uniq_list="$emfiles"
2520_gas_uniq_newlist=""
2521for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2522 case $_gas_uniq_i in
2523 _gas_uniq_dummy) ;;
2524 *) case " $_gas_uniq_newlist " in
2525 *" $_gas_uniq_i "*) ;;
2526 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2527 esac ;;
2528 esac
2529done
2530emfiles=$_gas_uniq_newlist
2531
2532if test `set . $formats ; shift ; echo $#` -gt 1 ; then
2533 for fmt in $formats ; do
2534 case $fmt in
2535 aout) cat >> confdefs.h <<\EOF
2536#define OBJ_MAYBE_AOUT 1
2537EOF
2538 ;;
2539 bout) cat >> confdefs.h <<\EOF
2540#define OBJ_MAYBE_BOUT 1
2541EOF
2542 ;;
2543 coff) cat >> confdefs.h <<\EOF
2544#define OBJ_MAYBE_COFF 1
2545EOF
2546 ;;
2547 ecoff) cat >> confdefs.h <<\EOF
2548#define OBJ_MAYBE_ECOFF 1
2549EOF
2550 ;;
2551 elf) cat >> confdefs.h <<\EOF
2552#define OBJ_MAYBE_ELF 1
2553EOF
2554 ;;
2555 generic) cat >> confdefs.h <<\EOF
2556#define OBJ_MAYBE_GENERIC 1
2557EOF
2558 ;;
2559 hp300) cat >> confdefs.h <<\EOF
2560#define OBJ_MAYBE_HP300 1
2561EOF
2562 ;;
2563 ieee) cat >> confdefs.h <<\EOF
2564#define OBJ_MAYBE_IEEE 1
2565EOF
2566 ;;
2567 som) cat >> confdefs.h <<\EOF
2568#define OBJ_MAYBE_SOM 1
2569EOF
2570 ;;
2571 vms) cat >> confdefs.h <<\EOF
2572#define OBJ_MAYBE_VMS 1
2573EOF
2574 ;;
2575 esac
2576 extra_objects="$extra_objects obj-$fmt.o"
2577 done
2578 obj_format=multi
2579fi
2580if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
2581 te_file=multi
2582 extra_objects="$extra_objects $emfiles"
2583 DEFAULT_EMULATION=`set . $emulations ; echo $2`
2584 cat >> confdefs.h <<\EOF
2585#define USE_EMULATIONS 1
2586EOF
2587
2588fi
2589
2590cat >> confdefs.h <<EOF
2591#define EMULATIONS $EMULATIONS
2592EOF
2593
2594cat >> confdefs.h <<EOF
2595#define DEFAULT_EMULATION "$DEFAULT_EMULATION"
2596EOF
2597
2598
2599case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
2600 yes-*-coff) need_bfd=yes ;;
2601 no-*-coff) need_bfd=yes
2602 cat >> confdefs.h <<\EOF
2603#define MANY_SEGMENTS 1
2604EOF
2605 ;;
2606esac
2607
2608reject_dev_configs=yes
2609
2610case ${reject_dev_configs}-${dev} in
2611 yes-yes) # Oops.
2612 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
2613 ;;
2614esac
2615
2616
2617
2618
2619
2620
2621
2622case "${primary_bfd_gas}" in
2623 yes) cat >> confdefs.h <<\EOF
2624#define BFD_ASSEMBLER 1
2625EOF
2626
2627 need_bfd=yes ;;
2628esac
2629
2630# do we need the opcodes library?
2631case "${need_opcodes}" in
2632yes)
2633 OPCODES_LIB=../opcodes/libopcodes.la
2634 ;;
2635esac
2636
2637case "${need_bfd}" in
2638yes)
2639 BFDLIB=../bfd/libbfd.la
2640 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
2641 ;;
2642esac
2643
2644
2645
2646
2647
2648
2649cat >> confdefs.h <<EOF
2650#define TARGET_ALIAS "${target_alias}"
2651EOF
2652
2653cat >> confdefs.h <<EOF
2654#define TARGET_CANONICAL "${target}"
2655EOF
2656
2657cat >> confdefs.h <<EOF
2658#define TARGET_CPU "${target_cpu}"
2659EOF
2660
2661cat >> confdefs.h <<EOF
2662#define TARGET_VENDOR "${target_vendor}"
2663EOF
2664
2665cat >> confdefs.h <<EOF
2666#define TARGET_OS "${target_os}"
2667EOF
2668
2669
2670# Extract the first word of "gcc", so it can be a program name with args.
2671set dummy gcc; ac_word=$2
2672echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 2673echo "configure:2674: checking for $ac_word" >&5
252b5132
RH
2674if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2675 echo $ac_n "(cached) $ac_c" 1>&6
2676else
2677 if test -n "$CC"; then
2678 ac_cv_prog_CC="$CC" # Let the user override the test.
2679else
2680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2681 ac_dummy="$PATH"
2682 for ac_dir in $ac_dummy; do
2683 test -z "$ac_dir" && ac_dir=.
2684 if test -f $ac_dir/$ac_word; then
2685 ac_cv_prog_CC="gcc"
2686 break
2687 fi
2688 done
2689 IFS="$ac_save_ifs"
2690fi
2691fi
2692CC="$ac_cv_prog_CC"
2693if test -n "$CC"; then
2694 echo "$ac_t""$CC" 1>&6
2695else
2696 echo "$ac_t""no" 1>&6
2697fi
2698
2699if test -z "$CC"; then
2700 # Extract the first word of "cc", so it can be a program name with args.
2701set dummy cc; ac_word=$2
2702echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 2703echo "configure:2704: checking for $ac_word" >&5
252b5132
RH
2704if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2705 echo $ac_n "(cached) $ac_c" 1>&6
2706else
2707 if test -n "$CC"; then
2708 ac_cv_prog_CC="$CC" # Let the user override the test.
2709else
2710 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2711 ac_prog_rejected=no
2712 ac_dummy="$PATH"
2713 for ac_dir in $ac_dummy; do
2714 test -z "$ac_dir" && ac_dir=.
2715 if test -f $ac_dir/$ac_word; then
2716 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2717 ac_prog_rejected=yes
2718 continue
2719 fi
2720 ac_cv_prog_CC="cc"
2721 break
2722 fi
2723 done
2724 IFS="$ac_save_ifs"
2725if test $ac_prog_rejected = yes; then
2726 # We found a bogon in the path, so make sure we never use it.
2727 set dummy $ac_cv_prog_CC
2728 shift
2729 if test $# -gt 0; then
2730 # We chose a different compiler from the bogus one.
2731 # However, it has the same basename, so the bogon will be chosen
2732 # first if we set CC to just the basename; use the full file name.
2733 shift
2734 set dummy "$ac_dir/$ac_word" "$@"
2735 shift
2736 ac_cv_prog_CC="$@"
2737 fi
2738fi
2739fi
2740fi
2741CC="$ac_cv_prog_CC"
2742if test -n "$CC"; then
2743 echo "$ac_t""$CC" 1>&6
2744else
2745 echo "$ac_t""no" 1>&6
2746fi
2747
2748 if test -z "$CC"; then
2749 case "`uname -s`" in
2750 *win32* | *WIN32*)
2751 # Extract the first word of "cl", so it can be a program name with args.
2752set dummy cl; ac_word=$2
2753echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 2754echo "configure:2755: checking for $ac_word" >&5
252b5132
RH
2755if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2756 echo $ac_n "(cached) $ac_c" 1>&6
2757else
2758 if test -n "$CC"; then
2759 ac_cv_prog_CC="$CC" # Let the user override the test.
2760else
2761 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2762 ac_dummy="$PATH"
2763 for ac_dir in $ac_dummy; do
2764 test -z "$ac_dir" && ac_dir=.
2765 if test -f $ac_dir/$ac_word; then
2766 ac_cv_prog_CC="cl"
2767 break
2768 fi
2769 done
2770 IFS="$ac_save_ifs"
2771fi
2772fi
2773CC="$ac_cv_prog_CC"
2774if test -n "$CC"; then
2775 echo "$ac_t""$CC" 1>&6
2776else
2777 echo "$ac_t""no" 1>&6
2778fi
2779 ;;
2780 esac
2781 fi
2782 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2783fi
2784
2785echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
008960a5 2786echo "configure:2787: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
252b5132
RH
2787
2788ac_ext=c
2789# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2790ac_cpp='$CPP $CPPFLAGS'
2791ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2792ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2793cross_compiling=$ac_cv_prog_cc_cross
2794
2795cat > conftest.$ac_ext << EOF
2796
008960a5 2797#line 2798 "configure"
252b5132
RH
2798#include "confdefs.h"
2799
2800main(){return(0);}
2801EOF
008960a5 2802if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
2803 ac_cv_prog_cc_works=yes
2804 # If we can't run a trivial program, we are probably using a cross compiler.
2805 if (./conftest; exit) 2>/dev/null; then
2806 ac_cv_prog_cc_cross=no
2807 else
2808 ac_cv_prog_cc_cross=yes
2809 fi
2810else
2811 echo "configure: failed program was:" >&5
2812 cat conftest.$ac_ext >&5
2813 ac_cv_prog_cc_works=no
2814fi
2815rm -fr conftest*
2816ac_ext=c
2817# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2818ac_cpp='$CPP $CPPFLAGS'
2819ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2820ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2821cross_compiling=$ac_cv_prog_cc_cross
2822
2823echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2824if test $ac_cv_prog_cc_works = no; then
2825 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2826fi
2827echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
008960a5 2828echo "configure:2829: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
252b5132
RH
2829echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2830cross_compiling=$ac_cv_prog_cc_cross
2831
2832echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
008960a5 2833echo "configure:2834: checking whether we are using GNU C" >&5
252b5132
RH
2834if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2835 echo $ac_n "(cached) $ac_c" 1>&6
2836else
2837 cat > conftest.c <<EOF
2838#ifdef __GNUC__
2839 yes;
2840#endif
2841EOF
008960a5 2842if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
252b5132
RH
2843 ac_cv_prog_gcc=yes
2844else
2845 ac_cv_prog_gcc=no
2846fi
2847fi
2848
2849echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2850
2851if test $ac_cv_prog_gcc = yes; then
2852 GCC=yes
2853else
2854 GCC=
2855fi
2856
2857ac_test_CFLAGS="${CFLAGS+set}"
2858ac_save_CFLAGS="$CFLAGS"
2859CFLAGS=
2860echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
008960a5 2861echo "configure:2862: checking whether ${CC-cc} accepts -g" >&5
252b5132
RH
2862if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2863 echo $ac_n "(cached) $ac_c" 1>&6
2864else
2865 echo 'void f(){}' > conftest.c
2866if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2867 ac_cv_prog_cc_g=yes
2868else
2869 ac_cv_prog_cc_g=no
2870fi
2871rm -f conftest*
2872
2873fi
2874
2875echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2876if test "$ac_test_CFLAGS" = set; then
2877 CFLAGS="$ac_save_CFLAGS"
2878elif test $ac_cv_prog_cc_g = yes; then
2879 if test "$GCC" = yes; then
2880 CFLAGS="-g -O2"
2881 else
2882 CFLAGS="-g"
2883 fi
2884else
2885 if test "$GCC" = yes; then
2886 CFLAGS="-O2"
2887 else
2888 CFLAGS=
2889 fi
2890fi
2891
2892
2893for ac_prog in 'bison -y' byacc
2894do
2895# Extract the first word of "$ac_prog", so it can be a program name with args.
2896set dummy $ac_prog; ac_word=$2
2897echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 2898echo "configure:2899: checking for $ac_word" >&5
252b5132
RH
2899if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2900 echo $ac_n "(cached) $ac_c" 1>&6
2901else
2902 if test -n "$YACC"; then
2903 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2904else
2905 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2906 ac_dummy="$PATH"
2907 for ac_dir in $ac_dummy; do
2908 test -z "$ac_dir" && ac_dir=.
2909 if test -f $ac_dir/$ac_word; then
2910 ac_cv_prog_YACC="$ac_prog"
2911 break
2912 fi
2913 done
2914 IFS="$ac_save_ifs"
2915fi
2916fi
2917YACC="$ac_cv_prog_YACC"
2918if test -n "$YACC"; then
2919 echo "$ac_t""$YACC" 1>&6
2920else
2921 echo "$ac_t""no" 1>&6
2922fi
2923
2924test -n "$YACC" && break
2925done
2926test -n "$YACC" || YACC="yacc"
2927
2928echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
008960a5 2929echo "configure:2930: checking how to run the C preprocessor" >&5
252b5132
RH
2930# On Suns, sometimes $CPP names a directory.
2931if test -n "$CPP" && test -d "$CPP"; then
2932 CPP=
2933fi
2934if test -z "$CPP"; then
2935if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2936 echo $ac_n "(cached) $ac_c" 1>&6
2937else
2938 # This must be in double quotes, not single quotes, because CPP may get
2939 # substituted into the Makefile and "${CC-cc}" will confuse make.
2940 CPP="${CC-cc} -E"
2941 # On the NeXT, cc -E runs the code through the compiler's parser,
2942 # not just through cpp.
2943 cat > conftest.$ac_ext <<EOF
008960a5 2944#line 2945 "configure"
252b5132
RH
2945#include "confdefs.h"
2946#include <assert.h>
2947Syntax Error
2948EOF
2949ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 2950{ (eval echo configure:2951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2951ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2952if test -z "$ac_err"; then
2953 :
2954else
2955 echo "$ac_err" >&5
2956 echo "configure: failed program was:" >&5
2957 cat conftest.$ac_ext >&5
2958 rm -rf conftest*
2959 CPP="${CC-cc} -E -traditional-cpp"
2960 cat > conftest.$ac_ext <<EOF
008960a5 2961#line 2962 "configure"
252b5132
RH
2962#include "confdefs.h"
2963#include <assert.h>
2964Syntax Error
2965EOF
2966ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 2967{ (eval echo configure:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2968ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2969if test -z "$ac_err"; then
2970 :
2971else
2972 echo "$ac_err" >&5
2973 echo "configure: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 rm -rf conftest*
2976 CPP="${CC-cc} -nologo -E"
2977 cat > conftest.$ac_ext <<EOF
008960a5 2978#line 2979 "configure"
252b5132
RH
2979#include "confdefs.h"
2980#include <assert.h>
2981Syntax Error
2982EOF
2983ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 2984{ (eval echo configure:2985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
2985ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2986if test -z "$ac_err"; then
2987 :
2988else
2989 echo "$ac_err" >&5
2990 echo "configure: failed program was:" >&5
2991 cat conftest.$ac_ext >&5
2992 rm -rf conftest*
2993 CPP=/lib/cpp
2994fi
2995rm -f conftest*
2996fi
2997rm -f conftest*
2998fi
2999rm -f conftest*
3000 ac_cv_prog_CPP="$CPP"
3001fi
3002 CPP="$ac_cv_prog_CPP"
3003else
3004 ac_cv_prog_CPP="$CPP"
3005fi
3006echo "$ac_t""$CPP" 1>&6
3007
3008missing_dir=`cd $ac_aux_dir && pwd`
3009for ac_prog in flex lex
3010do
3011# Extract the first word of "$ac_prog", so it can be a program name with args.
3012set dummy $ac_prog; ac_word=$2
3013echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 3014echo "configure:3015: checking for $ac_word" >&5
252b5132
RH
3015if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3016 echo $ac_n "(cached) $ac_c" 1>&6
3017else
3018 if test -n "$LEX"; then
3019 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3020else
3021 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3022 ac_dummy="$PATH"
3023 for ac_dir in $ac_dummy; do
3024 test -z "$ac_dir" && ac_dir=.
3025 if test -f $ac_dir/$ac_word; then
3026 ac_cv_prog_LEX="$ac_prog"
3027 break
3028 fi
3029 done
3030 IFS="$ac_save_ifs"
3031fi
3032fi
3033LEX="$ac_cv_prog_LEX"
3034if test -n "$LEX"; then
3035 echo "$ac_t""$LEX" 1>&6
3036else
3037 echo "$ac_t""no" 1>&6
3038fi
3039
3040test -n "$LEX" && break
3041done
3042test -n "$LEX" || LEX=""$missing_dir/missing flex""
3043
3044# Extract the first word of "flex", so it can be a program name with args.
3045set dummy flex; ac_word=$2
3046echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 3047echo "configure:3048: checking for $ac_word" >&5
252b5132
RH
3048if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3049 echo $ac_n "(cached) $ac_c" 1>&6
3050else
3051 if test -n "$LEX"; then
3052 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3053else
3054 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3055 ac_dummy="$PATH"
3056 for ac_dir in $ac_dummy; do
3057 test -z "$ac_dir" && ac_dir=.
3058 if test -f $ac_dir/$ac_word; then
3059 ac_cv_prog_LEX="flex"
3060 break
3061 fi
3062 done
3063 IFS="$ac_save_ifs"
3064 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
3065fi
3066fi
3067LEX="$ac_cv_prog_LEX"
3068if test -n "$LEX"; then
3069 echo "$ac_t""$LEX" 1>&6
3070else
3071 echo "$ac_t""no" 1>&6
3072fi
3073
3074if test -z "$LEXLIB"
3075then
3076 case "$LEX" in
3077 flex*) ac_lib=fl ;;
3078 *) ac_lib=l ;;
3079 esac
3080 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
008960a5 3081echo "configure:3082: checking for yywrap in -l$ac_lib" >&5
252b5132
RH
3082ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
3083if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3084 echo $ac_n "(cached) $ac_c" 1>&6
3085else
3086 ac_save_LIBS="$LIBS"
3087LIBS="-l$ac_lib $LIBS"
3088cat > conftest.$ac_ext <<EOF
008960a5 3089#line 3090 "configure"
252b5132
RH
3090#include "confdefs.h"
3091/* Override any gcc2 internal prototype to avoid an error. */
3092/* We use char because int might match the return type of a gcc2
3093 builtin and then its argument prototype would still apply. */
3094char yywrap();
3095
3096int main() {
3097yywrap()
3098; return 0; }
3099EOF
008960a5 3100if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3101 rm -rf conftest*
3102 eval "ac_cv_lib_$ac_lib_var=yes"
3103else
3104 echo "configure: failed program was:" >&5
3105 cat conftest.$ac_ext >&5
3106 rm -rf conftest*
3107 eval "ac_cv_lib_$ac_lib_var=no"
3108fi
3109rm -f conftest*
3110LIBS="$ac_save_LIBS"
3111
3112fi
3113if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3114 echo "$ac_t""yes" 1>&6
3115 LEXLIB="-l$ac_lib"
3116else
3117 echo "$ac_t""no" 1>&6
3118fi
3119
3120fi
3121
3122echo $ac_n "checking lex output file root""... $ac_c" 1>&6
008960a5 3123echo "configure:3124: checking lex output file root" >&5
252b5132
RH
3124if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
3125 echo $ac_n "(cached) $ac_c" 1>&6
3126else
3127 # The minimal lex program is just a single line: %%. But some broken lexes
3128# (Solaris, I think it was) want two %% lines, so accommodate them.
3129echo '%%
3130%%' | $LEX
3131if test -f lex.yy.c; then
3132 ac_cv_prog_lex_root=lex.yy
3133elif test -f lexyy.c; then
3134 ac_cv_prog_lex_root=lexyy
3135else
3136 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
3137fi
3138fi
3139
3140echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
3141LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
3142
3143echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
008960a5 3144echo "configure:3145: checking whether yytext is a pointer" >&5
252b5132
RH
3145if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3147else
3148 # POSIX says lex can declare yytext either as a pointer or an array; the
3149# default is implementation-dependent. Figure out which it is, since
3150# not all implementations provide the %pointer and %array declarations.
3151ac_cv_prog_lex_yytext_pointer=no
3152echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
3153ac_save_LIBS="$LIBS"
3154LIBS="$LIBS $LEXLIB"
3155cat > conftest.$ac_ext <<EOF
008960a5 3156#line 3157 "configure"
252b5132
RH
3157#include "confdefs.h"
3158`cat $LEX_OUTPUT_ROOT.c`
3159int main() {
3160
3161; return 0; }
3162EOF
008960a5 3163if { (eval echo configure:3164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3164 rm -rf conftest*
3165 ac_cv_prog_lex_yytext_pointer=yes
3166else
3167 echo "configure: failed program was:" >&5
3168 cat conftest.$ac_ext >&5
3169fi
3170rm -f conftest*
3171LIBS="$ac_save_LIBS"
3172rm -f "${LEX_OUTPUT_ROOT}.c"
3173
3174fi
3175
3176echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
3177if test $ac_cv_prog_lex_yytext_pointer = yes; then
3178 cat >> confdefs.h <<\EOF
3179#define YYTEXT_POINTER 1
3180EOF
3181
3182fi
3183
3184
3185ALL_LINGUAS=
3186echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
008960a5 3187echo "configure:3188: checking for POSIXized ISC" >&5
252b5132
RH
3188if test -d /etc/conf/kconfig.d &&
3189 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3190then
3191 echo "$ac_t""yes" 1>&6
3192 ISC=yes # If later tests want to check for ISC.
3193 cat >> confdefs.h <<\EOF
3194#define _POSIX_SOURCE 1
3195EOF
3196
3197 if test "$GCC" = yes; then
3198 CC="$CC -posix"
3199 else
3200 CC="$CC -Xp"
3201 fi
3202else
3203 echo "$ac_t""no" 1>&6
3204 ISC=
3205fi
3206
3207echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
008960a5 3208echo "configure:3209: checking for ANSI C header files" >&5
252b5132
RH
3209if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3210 echo $ac_n "(cached) $ac_c" 1>&6
3211else
3212 cat > conftest.$ac_ext <<EOF
008960a5 3213#line 3214 "configure"
252b5132
RH
3214#include "confdefs.h"
3215#include <stdlib.h>
3216#include <stdarg.h>
3217#include <string.h>
3218#include <float.h>
3219EOF
3220ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 3221{ (eval echo configure:3222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3222ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3223if test -z "$ac_err"; then
3224 rm -rf conftest*
3225 ac_cv_header_stdc=yes
3226else
3227 echo "$ac_err" >&5
3228 echo "configure: failed program was:" >&5
3229 cat conftest.$ac_ext >&5
3230 rm -rf conftest*
3231 ac_cv_header_stdc=no
3232fi
3233rm -f conftest*
3234
3235if test $ac_cv_header_stdc = yes; then
3236 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3237cat > conftest.$ac_ext <<EOF
008960a5 3238#line 3239 "configure"
252b5132
RH
3239#include "confdefs.h"
3240#include <string.h>
3241EOF
3242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3243 egrep "memchr" >/dev/null 2>&1; then
3244 :
3245else
3246 rm -rf conftest*
3247 ac_cv_header_stdc=no
3248fi
3249rm -f conftest*
3250
3251fi
3252
3253if test $ac_cv_header_stdc = yes; then
3254 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3255cat > conftest.$ac_ext <<EOF
008960a5 3256#line 3257 "configure"
252b5132
RH
3257#include "confdefs.h"
3258#include <stdlib.h>
3259EOF
3260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3261 egrep "free" >/dev/null 2>&1; then
3262 :
3263else
3264 rm -rf conftest*
3265 ac_cv_header_stdc=no
3266fi
3267rm -f conftest*
3268
3269fi
3270
3271if test $ac_cv_header_stdc = yes; then
3272 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3273if test "$cross_compiling" = yes; then
3274 :
3275else
3276 cat > conftest.$ac_ext <<EOF
008960a5 3277#line 3278 "configure"
252b5132
RH
3278#include "confdefs.h"
3279#include <ctype.h>
3280#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3281#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3282#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3283int main () { int i; for (i = 0; i < 256; i++)
3284if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3285exit (0); }
3286
3287EOF
008960a5 3288if { (eval echo configure:3289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
3289then
3290 :
3291else
3292 echo "configure: failed program was:" >&5
3293 cat conftest.$ac_ext >&5
3294 rm -fr conftest*
3295 ac_cv_header_stdc=no
3296fi
3297rm -fr conftest*
3298fi
3299
3300fi
3301fi
3302
3303echo "$ac_t""$ac_cv_header_stdc" 1>&6
3304if test $ac_cv_header_stdc = yes; then
3305 cat >> confdefs.h <<\EOF
3306#define STDC_HEADERS 1
3307EOF
3308
3309fi
3310
3311echo $ac_n "checking for working const""... $ac_c" 1>&6
008960a5 3312echo "configure:3313: checking for working const" >&5
252b5132
RH
3313if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3314 echo $ac_n "(cached) $ac_c" 1>&6
3315else
3316 cat > conftest.$ac_ext <<EOF
008960a5 3317#line 3318 "configure"
252b5132
RH
3318#include "confdefs.h"
3319
3320int main() {
3321
3322/* Ultrix mips cc rejects this. */
3323typedef int charset[2]; const charset x;
3324/* SunOS 4.1.1 cc rejects this. */
3325char const *const *ccp;
3326char **p;
3327/* NEC SVR4.0.2 mips cc rejects this. */
3328struct point {int x, y;};
3329static struct point const zero = {0,0};
3330/* AIX XL C 1.02.0.0 rejects this.
3331 It does not let you subtract one const X* pointer from another in an arm
3332 of an if-expression whose if-part is not a constant expression */
3333const char *g = "string";
3334ccp = &g + (g ? g-g : 0);
3335/* HPUX 7.0 cc rejects these. */
3336++ccp;
3337p = (char**) ccp;
3338ccp = (char const *const *) p;
3339{ /* SCO 3.2v4 cc rejects this. */
3340 char *t;
3341 char const *s = 0 ? (char *) 0 : (char const *) 0;
3342
3343 *t++ = 0;
3344}
3345{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3346 int x[] = {25, 17};
3347 const int *foo = &x[0];
3348 ++foo;
3349}
3350{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3351 typedef const int *iptr;
3352 iptr p = 0;
3353 ++p;
3354}
3355{ /* AIX XL C 1.02.0.0 rejects this saying
3356 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3357 struct s { int j; const int *ap[3]; };
3358 struct s *b; b->j = 5;
3359}
3360{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3361 const int foo = 10;
3362}
3363
3364; return 0; }
3365EOF
008960a5 3366if { (eval echo configure:3367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
3367 rm -rf conftest*
3368 ac_cv_c_const=yes
3369else
3370 echo "configure: failed program was:" >&5
3371 cat conftest.$ac_ext >&5
3372 rm -rf conftest*
3373 ac_cv_c_const=no
3374fi
3375rm -f conftest*
3376fi
3377
3378echo "$ac_t""$ac_cv_c_const" 1>&6
3379if test $ac_cv_c_const = no; then
3380 cat >> confdefs.h <<\EOF
3381#define const
3382EOF
3383
3384fi
3385
3386echo $ac_n "checking for inline""... $ac_c" 1>&6
008960a5 3387echo "configure:3388: checking for inline" >&5
252b5132
RH
3388if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3389 echo $ac_n "(cached) $ac_c" 1>&6
3390else
3391 ac_cv_c_inline=no
3392for ac_kw in inline __inline__ __inline; do
3393 cat > conftest.$ac_ext <<EOF
008960a5 3394#line 3395 "configure"
252b5132
RH
3395#include "confdefs.h"
3396
3397int main() {
3398} $ac_kw foo() {
3399; return 0; }
3400EOF
008960a5 3401if { (eval echo configure:3402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
3402 rm -rf conftest*
3403 ac_cv_c_inline=$ac_kw; break
3404else
3405 echo "configure: failed program was:" >&5
3406 cat conftest.$ac_ext >&5
3407fi
3408rm -f conftest*
3409done
3410
3411fi
3412
3413echo "$ac_t""$ac_cv_c_inline" 1>&6
3414case "$ac_cv_c_inline" in
3415 inline | yes) ;;
3416 no) cat >> confdefs.h <<\EOF
3417#define inline
3418EOF
3419 ;;
3420 *) cat >> confdefs.h <<EOF
3421#define inline $ac_cv_c_inline
3422EOF
3423 ;;
3424esac
3425
3426echo $ac_n "checking for off_t""... $ac_c" 1>&6
008960a5 3427echo "configure:3428: checking for off_t" >&5
252b5132
RH
3428if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3429 echo $ac_n "(cached) $ac_c" 1>&6
3430else
3431 cat > conftest.$ac_ext <<EOF
008960a5 3432#line 3433 "configure"
252b5132
RH
3433#include "confdefs.h"
3434#include <sys/types.h>
3435#if STDC_HEADERS
3436#include <stdlib.h>
3437#include <stddef.h>
3438#endif
3439EOF
3440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3441 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3442 rm -rf conftest*
3443 ac_cv_type_off_t=yes
3444else
3445 rm -rf conftest*
3446 ac_cv_type_off_t=no
3447fi
3448rm -f conftest*
3449
3450fi
3451echo "$ac_t""$ac_cv_type_off_t" 1>&6
3452if test $ac_cv_type_off_t = no; then
3453 cat >> confdefs.h <<\EOF
3454#define off_t long
3455EOF
3456
3457fi
3458
3459echo $ac_n "checking for size_t""... $ac_c" 1>&6
008960a5 3460echo "configure:3461: checking for size_t" >&5
252b5132
RH
3461if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3462 echo $ac_n "(cached) $ac_c" 1>&6
3463else
3464 cat > conftest.$ac_ext <<EOF
008960a5 3465#line 3466 "configure"
252b5132
RH
3466#include "confdefs.h"
3467#include <sys/types.h>
3468#if STDC_HEADERS
3469#include <stdlib.h>
3470#include <stddef.h>
3471#endif
3472EOF
3473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3474 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3475 rm -rf conftest*
3476 ac_cv_type_size_t=yes
3477else
3478 rm -rf conftest*
3479 ac_cv_type_size_t=no
3480fi
3481rm -f conftest*
3482
3483fi
3484echo "$ac_t""$ac_cv_type_size_t" 1>&6
3485if test $ac_cv_type_size_t = no; then
3486 cat >> confdefs.h <<\EOF
3487#define size_t unsigned
3488EOF
3489
3490fi
3491
3492# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3493# for constant arguments. Useless!
3494echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
008960a5 3495echo "configure:3496: checking for working alloca.h" >&5
252b5132
RH
3496if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3497 echo $ac_n "(cached) $ac_c" 1>&6
3498else
3499 cat > conftest.$ac_ext <<EOF
008960a5 3500#line 3501 "configure"
252b5132
RH
3501#include "confdefs.h"
3502#include <alloca.h>
3503int main() {
3504char *p = alloca(2 * sizeof(int));
3505; return 0; }
3506EOF
008960a5 3507if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3508 rm -rf conftest*
3509 ac_cv_header_alloca_h=yes
3510else
3511 echo "configure: failed program was:" >&5
3512 cat conftest.$ac_ext >&5
3513 rm -rf conftest*
3514 ac_cv_header_alloca_h=no
3515fi
3516rm -f conftest*
3517fi
3518
3519echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3520if test $ac_cv_header_alloca_h = yes; then
3521 cat >> confdefs.h <<\EOF
3522#define HAVE_ALLOCA_H 1
3523EOF
3524
3525fi
3526
3527echo $ac_n "checking for alloca""... $ac_c" 1>&6
008960a5 3528echo "configure:3529: checking for alloca" >&5
252b5132
RH
3529if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3530 echo $ac_n "(cached) $ac_c" 1>&6
3531else
3532 cat > conftest.$ac_ext <<EOF
008960a5 3533#line 3534 "configure"
252b5132
RH
3534#include "confdefs.h"
3535
3536#ifdef __GNUC__
3537# define alloca __builtin_alloca
3538#else
3539# ifdef _MSC_VER
3540# include <malloc.h>
3541# define alloca _alloca
3542# else
3543# if HAVE_ALLOCA_H
3544# include <alloca.h>
3545# else
3546# ifdef _AIX
3547 #pragma alloca
3548# else
3549# ifndef alloca /* predefined by HP cc +Olibcalls */
3550char *alloca ();
3551# endif
3552# endif
3553# endif
3554# endif
3555#endif
3556
3557int main() {
3558char *p = (char *) alloca(1);
3559; return 0; }
3560EOF
008960a5 3561if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3562 rm -rf conftest*
3563 ac_cv_func_alloca_works=yes
3564else
3565 echo "configure: failed program was:" >&5
3566 cat conftest.$ac_ext >&5
3567 rm -rf conftest*
3568 ac_cv_func_alloca_works=no
3569fi
3570rm -f conftest*
3571fi
3572
3573echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3574if test $ac_cv_func_alloca_works = yes; then
3575 cat >> confdefs.h <<\EOF
3576#define HAVE_ALLOCA 1
3577EOF
3578
3579fi
3580
3581if test $ac_cv_func_alloca_works = no; then
3582 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3583 # that cause trouble. Some versions do not even contain alloca or
3584 # contain a buggy version. If you still want to use their alloca,
3585 # use ar to extract alloca.o from them instead of compiling alloca.c.
3586 ALLOCA=alloca.${ac_objext}
3587 cat >> confdefs.h <<\EOF
3588#define C_ALLOCA 1
3589EOF
3590
3591
3592echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
008960a5 3593echo "configure:3594: checking whether alloca needs Cray hooks" >&5
252b5132
RH
3594if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3595 echo $ac_n "(cached) $ac_c" 1>&6
3596else
3597 cat > conftest.$ac_ext <<EOF
008960a5 3598#line 3599 "configure"
252b5132
RH
3599#include "confdefs.h"
3600#if defined(CRAY) && ! defined(CRAY2)
3601webecray
3602#else
3603wenotbecray
3604#endif
3605
3606EOF
3607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3608 egrep "webecray" >/dev/null 2>&1; then
3609 rm -rf conftest*
3610 ac_cv_os_cray=yes
3611else
3612 rm -rf conftest*
3613 ac_cv_os_cray=no
3614fi
3615rm -f conftest*
3616
3617fi
3618
3619echo "$ac_t""$ac_cv_os_cray" 1>&6
3620if test $ac_cv_os_cray = yes; then
3621for ac_func in _getb67 GETB67 getb67; do
3622 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
008960a5 3623echo "configure:3624: checking for $ac_func" >&5
252b5132
RH
3624if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3625 echo $ac_n "(cached) $ac_c" 1>&6
3626else
3627 cat > conftest.$ac_ext <<EOF
008960a5 3628#line 3629 "configure"
252b5132
RH
3629#include "confdefs.h"
3630/* System header to define __stub macros and hopefully few prototypes,
3631 which can conflict with char $ac_func(); below. */
3632#include <assert.h>
3633/* Override any gcc2 internal prototype to avoid an error. */
3634/* We use char because int might match the return type of a gcc2
3635 builtin and then its argument prototype would still apply. */
3636char $ac_func();
3637
3638int main() {
3639
3640/* The GNU C library defines this for functions which it implements
3641 to always fail with ENOSYS. Some functions are actually named
3642 something starting with __ and the normal name is an alias. */
3643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3644choke me
3645#else
3646$ac_func();
3647#endif
3648
3649; return 0; }
3650EOF
008960a5 3651if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3652 rm -rf conftest*
3653 eval "ac_cv_func_$ac_func=yes"
3654else
3655 echo "configure: failed program was:" >&5
3656 cat conftest.$ac_ext >&5
3657 rm -rf conftest*
3658 eval "ac_cv_func_$ac_func=no"
3659fi
3660rm -f conftest*
3661fi
3662
3663if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3664 echo "$ac_t""yes" 1>&6
3665 cat >> confdefs.h <<EOF
3666#define CRAY_STACKSEG_END $ac_func
3667EOF
3668
3669 break
3670else
3671 echo "$ac_t""no" 1>&6
3672fi
3673
3674done
3675fi
3676
3677echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
008960a5 3678echo "configure:3679: checking stack direction for C alloca" >&5
252b5132
RH
3679if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3680 echo $ac_n "(cached) $ac_c" 1>&6
3681else
3682 if test "$cross_compiling" = yes; then
3683 ac_cv_c_stack_direction=0
3684else
3685 cat > conftest.$ac_ext <<EOF
008960a5 3686#line 3687 "configure"
252b5132
RH
3687#include "confdefs.h"
3688find_stack_direction ()
3689{
3690 static char *addr = 0;
3691 auto char dummy;
3692 if (addr == 0)
3693 {
3694 addr = &dummy;
3695 return find_stack_direction ();
3696 }
3697 else
3698 return (&dummy > addr) ? 1 : -1;
3699}
3700main ()
3701{
3702 exit (find_stack_direction() < 0);
3703}
3704EOF
008960a5 3705if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
3706then
3707 ac_cv_c_stack_direction=1
3708else
3709 echo "configure: failed program was:" >&5
3710 cat conftest.$ac_ext >&5
3711 rm -fr conftest*
3712 ac_cv_c_stack_direction=-1
3713fi
3714rm -fr conftest*
3715fi
3716
3717fi
3718
3719echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3720cat >> confdefs.h <<EOF
3721#define STACK_DIRECTION $ac_cv_c_stack_direction
3722EOF
3723
3724fi
3725
3726for ac_hdr in unistd.h
3727do
3728ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3729echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
008960a5 3730echo "configure:3731: checking for $ac_hdr" >&5
252b5132
RH
3731if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3732 echo $ac_n "(cached) $ac_c" 1>&6
3733else
3734 cat > conftest.$ac_ext <<EOF
008960a5 3735#line 3736 "configure"
252b5132
RH
3736#include "confdefs.h"
3737#include <$ac_hdr>
3738EOF
3739ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 3740{ (eval echo configure:3741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
3741ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3742if test -z "$ac_err"; then
3743 rm -rf conftest*
3744 eval "ac_cv_header_$ac_safe=yes"
3745else
3746 echo "$ac_err" >&5
3747 echo "configure: failed program was:" >&5
3748 cat conftest.$ac_ext >&5
3749 rm -rf conftest*
3750 eval "ac_cv_header_$ac_safe=no"
3751fi
3752rm -f conftest*
3753fi
3754if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3755 echo "$ac_t""yes" 1>&6
3756 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3757 cat >> confdefs.h <<EOF
3758#define $ac_tr_hdr 1
3759EOF
3760
3761else
3762 echo "$ac_t""no" 1>&6
3763fi
3764done
3765
3766for ac_func in getpagesize
3767do
3768echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
008960a5 3769echo "configure:3770: checking for $ac_func" >&5
252b5132
RH
3770if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3771 echo $ac_n "(cached) $ac_c" 1>&6
3772else
3773 cat > conftest.$ac_ext <<EOF
008960a5 3774#line 3775 "configure"
252b5132
RH
3775#include "confdefs.h"
3776/* System header to define __stub macros and hopefully few prototypes,
3777 which can conflict with char $ac_func(); below. */
3778#include <assert.h>
3779/* Override any gcc2 internal prototype to avoid an error. */
3780/* We use char because int might match the return type of a gcc2
3781 builtin and then its argument prototype would still apply. */
3782char $ac_func();
3783
3784int main() {
3785
3786/* The GNU C library defines this for functions which it implements
3787 to always fail with ENOSYS. Some functions are actually named
3788 something starting with __ and the normal name is an alias. */
3789#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3790choke me
3791#else
3792$ac_func();
3793#endif
3794
3795; return 0; }
3796EOF
008960a5 3797if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
3798 rm -rf conftest*
3799 eval "ac_cv_func_$ac_func=yes"
3800else
3801 echo "configure: failed program was:" >&5
3802 cat conftest.$ac_ext >&5
3803 rm -rf conftest*
3804 eval "ac_cv_func_$ac_func=no"
3805fi
3806rm -f conftest*
3807fi
3808
3809if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3810 echo "$ac_t""yes" 1>&6
3811 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3812 cat >> confdefs.h <<EOF
3813#define $ac_tr_func 1
3814EOF
3815
3816else
3817 echo "$ac_t""no" 1>&6
3818fi
3819done
3820
3821echo $ac_n "checking for working mmap""... $ac_c" 1>&6
008960a5 3822echo "configure:3823: checking for working mmap" >&5
252b5132
RH
3823if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3824 echo $ac_n "(cached) $ac_c" 1>&6
3825else
3826 if test "$cross_compiling" = yes; then
3827 ac_cv_func_mmap_fixed_mapped=no
3828else
3829 cat > conftest.$ac_ext <<EOF
008960a5 3830#line 3831 "configure"
252b5132
RH
3831#include "confdefs.h"
3832
3833/* Thanks to Mike Haertel and Jim Avera for this test.
3834 Here is a matrix of mmap possibilities:
3835 mmap private not fixed
3836 mmap private fixed at somewhere currently unmapped
3837 mmap private fixed at somewhere already mapped
3838 mmap shared not fixed
3839 mmap shared fixed at somewhere currently unmapped
3840 mmap shared fixed at somewhere already mapped
3841 For private mappings, we should verify that changes cannot be read()
3842 back from the file, nor mmap's back from the file at a different
3843 address. (There have been systems where private was not correctly
3844 implemented like the infamous i386 svr4.0, and systems where the
3845 VM page cache was not coherent with the filesystem buffer cache
3846 like early versions of FreeBSD and possibly contemporary NetBSD.)
3847 For shared mappings, we should conversely verify that changes get
3848 propogated back to all the places they're supposed to be.
3849
3850 Grep wants private fixed already mapped.
3851 The main things grep needs to know about mmap are:
3852 * does it exist and is it safe to write into the mmap'd area
3853 * how to use it (BSD variants) */
3854#include <sys/types.h>
3855#include <fcntl.h>
3856#include <sys/mman.h>
3857
3858/* This mess was copied from the GNU getpagesize.h. */
3859#ifndef HAVE_GETPAGESIZE
3860# ifdef HAVE_UNISTD_H
3861# include <unistd.h>
3862# endif
3863
3864/* Assume that all systems that can run configure have sys/param.h. */
3865# ifndef HAVE_SYS_PARAM_H
3866# define HAVE_SYS_PARAM_H 1
3867# endif
3868
3869# ifdef _SC_PAGESIZE
3870# define getpagesize() sysconf(_SC_PAGESIZE)
3871# else /* no _SC_PAGESIZE */
3872# ifdef HAVE_SYS_PARAM_H
3873# include <sys/param.h>
3874# ifdef EXEC_PAGESIZE
3875# define getpagesize() EXEC_PAGESIZE
3876# else /* no EXEC_PAGESIZE */
3877# ifdef NBPG
3878# define getpagesize() NBPG * CLSIZE
3879# ifndef CLSIZE
3880# define CLSIZE 1
3881# endif /* no CLSIZE */
3882# else /* no NBPG */
3883# ifdef NBPC
3884# define getpagesize() NBPC
3885# else /* no NBPC */
3886# ifdef PAGESIZE
3887# define getpagesize() PAGESIZE
3888# endif /* PAGESIZE */
3889# endif /* no NBPC */
3890# endif /* no NBPG */
3891# endif /* no EXEC_PAGESIZE */
3892# else /* no HAVE_SYS_PARAM_H */
3893# define getpagesize() 8192 /* punt totally */
3894# endif /* no HAVE_SYS_PARAM_H */
3895# endif /* no _SC_PAGESIZE */
3896
3897#endif /* no HAVE_GETPAGESIZE */
3898
3899#ifdef __cplusplus
3900extern "C" { void *malloc(unsigned); }
3901#else
3902char *malloc();
3903#endif
3904
3905int
3906main()
3907{
3908 char *data, *data2, *data3;
3909 int i, pagesize;
3910 int fd;
3911
3912 pagesize = getpagesize();
3913
3914 /*
3915 * First, make a file with some known garbage in it.
3916 */
3917 data = malloc(pagesize);
3918 if (!data)
3919 exit(1);
3920 for (i = 0; i < pagesize; ++i)
3921 *(data + i) = rand();
3922 umask(0);
3923 fd = creat("conftestmmap", 0600);
3924 if (fd < 0)
3925 exit(1);
3926 if (write(fd, data, pagesize) != pagesize)
3927 exit(1);
3928 close(fd);
3929
3930 /*
3931 * Next, try to mmap the file at a fixed address which
3932 * already has something else allocated at it. If we can,
3933 * also make sure that we see the same garbage.
3934 */
3935 fd = open("conftestmmap", O_RDWR);
3936 if (fd < 0)
3937 exit(1);
3938 data2 = malloc(2 * pagesize);
3939 if (!data2)
3940 exit(1);
3941 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3942 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3943 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3944 exit(1);
3945 for (i = 0; i < pagesize; ++i)
3946 if (*(data + i) != *(data2 + i))
3947 exit(1);
3948
3949 /*
3950 * Finally, make sure that changes to the mapped area
3951 * do not percolate back to the file as seen by read().
3952 * (This is a bug on some variants of i386 svr4.0.)
3953 */
3954 for (i = 0; i < pagesize; ++i)
3955 *(data2 + i) = *(data2 + i) + 1;
3956 data3 = malloc(pagesize);
3957 if (!data3)
3958 exit(1);
3959 if (read(fd, data3, pagesize) != pagesize)
3960 exit(1);
3961 for (i = 0; i < pagesize; ++i)
3962 if (*(data + i) != *(data3 + i))
3963 exit(1);
3964 close(fd);
3965 unlink("conftestmmap");
3966 exit(0);
3967}
3968
3969EOF
008960a5 3970if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
3971then
3972 ac_cv_func_mmap_fixed_mapped=yes
3973else
3974 echo "configure: failed program was:" >&5
3975 cat conftest.$ac_ext >&5
3976 rm -fr conftest*
3977 ac_cv_func_mmap_fixed_mapped=no
3978fi
3979rm -fr conftest*
3980fi
3981
3982fi
3983
3984echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3985if test $ac_cv_func_mmap_fixed_mapped = yes; then
3986 cat >> confdefs.h <<\EOF
3987#define HAVE_MMAP 1
3988EOF
3989
3990fi
3991
3992
3993 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3994unistd.h values.h sys/param.h
3995do
3996ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3997echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
008960a5 3998echo "configure:3999: checking for $ac_hdr" >&5
252b5132
RH
3999if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4000 echo $ac_n "(cached) $ac_c" 1>&6
4001else
4002 cat > conftest.$ac_ext <<EOF
008960a5 4003#line 4004 "configure"
252b5132
RH
4004#include "confdefs.h"
4005#include <$ac_hdr>
4006EOF
4007ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 4008{ (eval echo configure:4009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
4009ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4010if test -z "$ac_err"; then
4011 rm -rf conftest*
4012 eval "ac_cv_header_$ac_safe=yes"
4013else
4014 echo "$ac_err" >&5
4015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
4017 rm -rf conftest*
4018 eval "ac_cv_header_$ac_safe=no"
4019fi
4020rm -f conftest*
4021fi
4022if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4023 echo "$ac_t""yes" 1>&6
4024 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4025 cat >> confdefs.h <<EOF
4026#define $ac_tr_hdr 1
4027EOF
4028
4029else
4030 echo "$ac_t""no" 1>&6
4031fi
4032done
4033
4034 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
4035__argz_count __argz_stringify __argz_next
4036do
4037echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
008960a5 4038echo "configure:4039: checking for $ac_func" >&5
252b5132
RH
4039if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4040 echo $ac_n "(cached) $ac_c" 1>&6
4041else
4042 cat > conftest.$ac_ext <<EOF
008960a5 4043#line 4044 "configure"
252b5132
RH
4044#include "confdefs.h"
4045/* System header to define __stub macros and hopefully few prototypes,
4046 which can conflict with char $ac_func(); below. */
4047#include <assert.h>
4048/* Override any gcc2 internal prototype to avoid an error. */
4049/* We use char because int might match the return type of a gcc2
4050 builtin and then its argument prototype would still apply. */
4051char $ac_func();
4052
4053int main() {
4054
4055/* The GNU C library defines this for functions which it implements
4056 to always fail with ENOSYS. Some functions are actually named
4057 something starting with __ and the normal name is an alias. */
4058#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4059choke me
4060#else
4061$ac_func();
4062#endif
4063
4064; return 0; }
4065EOF
008960a5 4066if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4067 rm -rf conftest*
4068 eval "ac_cv_func_$ac_func=yes"
4069else
4070 echo "configure: failed program was:" >&5
4071 cat conftest.$ac_ext >&5
4072 rm -rf conftest*
4073 eval "ac_cv_func_$ac_func=no"
4074fi
4075rm -f conftest*
4076fi
4077
4078if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4079 echo "$ac_t""yes" 1>&6
4080 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4081 cat >> confdefs.h <<EOF
4082#define $ac_tr_func 1
4083EOF
4084
4085else
4086 echo "$ac_t""no" 1>&6
4087fi
4088done
4089
4090
4091 if test "${ac_cv_func_stpcpy+set}" != "set"; then
4092 for ac_func in stpcpy
4093do
4094echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
008960a5 4095echo "configure:4096: checking for $ac_func" >&5
252b5132
RH
4096if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4097 echo $ac_n "(cached) $ac_c" 1>&6
4098else
4099 cat > conftest.$ac_ext <<EOF
008960a5 4100#line 4101 "configure"
252b5132
RH
4101#include "confdefs.h"
4102/* System header to define __stub macros and hopefully few prototypes,
4103 which can conflict with char $ac_func(); below. */
4104#include <assert.h>
4105/* Override any gcc2 internal prototype to avoid an error. */
4106/* We use char because int might match the return type of a gcc2
4107 builtin and then its argument prototype would still apply. */
4108char $ac_func();
4109
4110int main() {
4111
4112/* The GNU C library defines this for functions which it implements
4113 to always fail with ENOSYS. Some functions are actually named
4114 something starting with __ and the normal name is an alias. */
4115#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4116choke me
4117#else
4118$ac_func();
4119#endif
4120
4121; return 0; }
4122EOF
008960a5 4123if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4124 rm -rf conftest*
4125 eval "ac_cv_func_$ac_func=yes"
4126else
4127 echo "configure: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129 rm -rf conftest*
4130 eval "ac_cv_func_$ac_func=no"
4131fi
4132rm -f conftest*
4133fi
4134
4135if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4136 echo "$ac_t""yes" 1>&6
4137 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4138 cat >> confdefs.h <<EOF
4139#define $ac_tr_func 1
4140EOF
4141
4142else
4143 echo "$ac_t""no" 1>&6
4144fi
4145done
4146
4147 fi
4148 if test "${ac_cv_func_stpcpy}" = "yes"; then
4149 cat >> confdefs.h <<\EOF
4150#define HAVE_STPCPY 1
4151EOF
4152
4153 fi
4154
4155 if test $ac_cv_header_locale_h = yes; then
4156 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
008960a5 4157echo "configure:4158: checking for LC_MESSAGES" >&5
252b5132
RH
4158if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4159 echo $ac_n "(cached) $ac_c" 1>&6
4160else
4161 cat > conftest.$ac_ext <<EOF
008960a5 4162#line 4163 "configure"
252b5132
RH
4163#include "confdefs.h"
4164#include <locale.h>
4165int main() {
4166return LC_MESSAGES
4167; return 0; }
4168EOF
008960a5 4169if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4170 rm -rf conftest*
4171 am_cv_val_LC_MESSAGES=yes
4172else
4173 echo "configure: failed program was:" >&5
4174 cat conftest.$ac_ext >&5
4175 rm -rf conftest*
4176 am_cv_val_LC_MESSAGES=no
4177fi
4178rm -f conftest*
4179fi
4180
4181echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4182 if test $am_cv_val_LC_MESSAGES = yes; then
4183 cat >> confdefs.h <<\EOF
4184#define HAVE_LC_MESSAGES 1
4185EOF
4186
4187 fi
4188 fi
4189 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
008960a5 4190echo "configure:4191: checking whether NLS is requested" >&5
252b5132
RH
4191 # Check whether --enable-nls or --disable-nls was given.
4192if test "${enable_nls+set}" = set; then
4193 enableval="$enable_nls"
4194 USE_NLS=$enableval
4195else
4196 USE_NLS=yes
4197fi
4198
4199 echo "$ac_t""$USE_NLS" 1>&6
4200
4201
4202 USE_INCLUDED_LIBINTL=no
4203
4204 if test "$USE_NLS" = "yes"; then
4205 cat >> confdefs.h <<\EOF
4206#define ENABLE_NLS 1
4207EOF
4208
4209 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
008960a5 4210echo "configure:4211: checking whether included gettext is requested" >&5
252b5132
RH
4211 # Check whether --with-included-gettext or --without-included-gettext was given.
4212if test "${with_included_gettext+set}" = set; then
4213 withval="$with_included_gettext"
4214 nls_cv_force_use_gnu_gettext=$withval
4215else
4216 nls_cv_force_use_gnu_gettext=no
4217fi
4218
4219 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
4220
4221 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4222 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4223 nls_cv_header_intl=
4224 nls_cv_header_libgt=
4225 CATOBJEXT=NONE
4226
4227 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
4228echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
008960a5 4229echo "configure:4230: checking for libintl.h" >&5
252b5132
RH
4230if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4231 echo $ac_n "(cached) $ac_c" 1>&6
4232else
4233 cat > conftest.$ac_ext <<EOF
008960a5 4234#line 4235 "configure"
252b5132
RH
4235#include "confdefs.h"
4236#include <libintl.h>
4237EOF
4238ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 4239{ (eval echo configure:4240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
4240ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4241if test -z "$ac_err"; then
4242 rm -rf conftest*
4243 eval "ac_cv_header_$ac_safe=yes"
4244else
4245 echo "$ac_err" >&5
4246 echo "configure: failed program was:" >&5
4247 cat conftest.$ac_ext >&5
4248 rm -rf conftest*
4249 eval "ac_cv_header_$ac_safe=no"
4250fi
4251rm -f conftest*
4252fi
4253if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4254 echo "$ac_t""yes" 1>&6
4255 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
008960a5 4256echo "configure:4257: checking for gettext in libc" >&5
252b5132
RH
4257if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
4258 echo $ac_n "(cached) $ac_c" 1>&6
4259else
4260 cat > conftest.$ac_ext <<EOF
008960a5 4261#line 4262 "configure"
252b5132
RH
4262#include "confdefs.h"
4263#include <libintl.h>
4264int main() {
4265return (int) gettext ("")
4266; return 0; }
4267EOF
008960a5 4268if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4269 rm -rf conftest*
4270 gt_cv_func_gettext_libc=yes
4271else
4272 echo "configure: failed program was:" >&5
4273 cat conftest.$ac_ext >&5
4274 rm -rf conftest*
4275 gt_cv_func_gettext_libc=no
4276fi
4277rm -f conftest*
4278fi
4279
4280echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
4281
4282 if test "$gt_cv_func_gettext_libc" != "yes"; then
4283 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
008960a5 4284echo "configure:4285: checking for bindtextdomain in -lintl" >&5
252b5132
RH
4285ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
4286if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4287 echo $ac_n "(cached) $ac_c" 1>&6
4288else
4289 ac_save_LIBS="$LIBS"
4290LIBS="-lintl $LIBS"
4291cat > conftest.$ac_ext <<EOF
008960a5 4292#line 4293 "configure"
252b5132
RH
4293#include "confdefs.h"
4294/* Override any gcc2 internal prototype to avoid an error. */
4295/* We use char because int might match the return type of a gcc2
4296 builtin and then its argument prototype would still apply. */
4297char bindtextdomain();
4298
4299int main() {
4300bindtextdomain()
4301; return 0; }
4302EOF
008960a5 4303if { (eval echo configure:4304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4304 rm -rf conftest*
4305 eval "ac_cv_lib_$ac_lib_var=yes"
4306else
4307 echo "configure: failed program was:" >&5
4308 cat conftest.$ac_ext >&5
4309 rm -rf conftest*
4310 eval "ac_cv_lib_$ac_lib_var=no"
4311fi
4312rm -f conftest*
4313LIBS="$ac_save_LIBS"
4314
4315fi
4316if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4317 echo "$ac_t""yes" 1>&6
4318 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
008960a5 4319echo "configure:4320: checking for gettext in libintl" >&5
252b5132
RH
4320if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
4321 echo $ac_n "(cached) $ac_c" 1>&6
4322else
4323 cat > conftest.$ac_ext <<EOF
008960a5 4324#line 4325 "configure"
252b5132
RH
4325#include "confdefs.h"
4326
4327int main() {
4328return (int) gettext ("")
4329; return 0; }
4330EOF
008960a5 4331if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4332 rm -rf conftest*
4333 gt_cv_func_gettext_libintl=yes
4334else
4335 echo "configure: failed program was:" >&5
4336 cat conftest.$ac_ext >&5
4337 rm -rf conftest*
4338 gt_cv_func_gettext_libintl=no
4339fi
4340rm -f conftest*
4341fi
4342
4343echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
4344else
4345 echo "$ac_t""no" 1>&6
4346fi
4347
4348 fi
4349
4350 if test "$gt_cv_func_gettext_libc" = "yes" \
4351 || test "$gt_cv_func_gettext_libintl" = "yes"; then
4352 cat >> confdefs.h <<\EOF
4353#define HAVE_GETTEXT 1
4354EOF
4355
4356 # Extract the first word of "msgfmt", so it can be a program name with args.
4357set dummy msgfmt; ac_word=$2
4358echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 4359echo "configure:4360: checking for $ac_word" >&5
252b5132
RH
4360if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4361 echo $ac_n "(cached) $ac_c" 1>&6
4362else
4363 case "$MSGFMT" in
4364 /*)
4365 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4366 ;;
4367 *)
4368 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4369 for ac_dir in $PATH; do
4370 test -z "$ac_dir" && ac_dir=.
4371 if test -f $ac_dir/$ac_word; then
4372 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4373 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4374 break
4375 fi
4376 fi
4377 done
4378 IFS="$ac_save_ifs"
4379 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
4380 ;;
4381esac
4382fi
4383MSGFMT="$ac_cv_path_MSGFMT"
4384if test -n "$MSGFMT"; then
4385 echo "$ac_t""$MSGFMT" 1>&6
4386else
4387 echo "$ac_t""no" 1>&6
4388fi
4389 if test "$MSGFMT" != "no"; then
4390 for ac_func in dcgettext
4391do
4392echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
008960a5 4393echo "configure:4394: checking for $ac_func" >&5
252b5132
RH
4394if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4395 echo $ac_n "(cached) $ac_c" 1>&6
4396else
4397 cat > conftest.$ac_ext <<EOF
008960a5 4398#line 4399 "configure"
252b5132
RH
4399#include "confdefs.h"
4400/* System header to define __stub macros and hopefully few prototypes,
4401 which can conflict with char $ac_func(); below. */
4402#include <assert.h>
4403/* Override any gcc2 internal prototype to avoid an error. */
4404/* We use char because int might match the return type of a gcc2
4405 builtin and then its argument prototype would still apply. */
4406char $ac_func();
4407
4408int main() {
4409
4410/* The GNU C library defines this for functions which it implements
4411 to always fail with ENOSYS. Some functions are actually named
4412 something starting with __ and the normal name is an alias. */
4413#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4414choke me
4415#else
4416$ac_func();
4417#endif
4418
4419; return 0; }
4420EOF
008960a5 4421if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4422 rm -rf conftest*
4423 eval "ac_cv_func_$ac_func=yes"
4424else
4425 echo "configure: failed program was:" >&5
4426 cat conftest.$ac_ext >&5
4427 rm -rf conftest*
4428 eval "ac_cv_func_$ac_func=no"
4429fi
4430rm -f conftest*
4431fi
4432
4433if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4434 echo "$ac_t""yes" 1>&6
4435 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4436 cat >> confdefs.h <<EOF
4437#define $ac_tr_func 1
4438EOF
4439
4440else
4441 echo "$ac_t""no" 1>&6
4442fi
4443done
4444
4445 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4446set dummy gmsgfmt; ac_word=$2
4447echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 4448echo "configure:4449: checking for $ac_word" >&5
252b5132
RH
4449if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4450 echo $ac_n "(cached) $ac_c" 1>&6
4451else
4452 case "$GMSGFMT" in
4453 /*)
4454 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4455 ;;
4456 ?:/*)
4457 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4458 ;;
4459 *)
4460 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4461 ac_dummy="$PATH"
4462 for ac_dir in $ac_dummy; do
4463 test -z "$ac_dir" && ac_dir=.
4464 if test -f $ac_dir/$ac_word; then
4465 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4466 break
4467 fi
4468 done
4469 IFS="$ac_save_ifs"
4470 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4471 ;;
4472esac
4473fi
4474GMSGFMT="$ac_cv_path_GMSGFMT"
4475if test -n "$GMSGFMT"; then
4476 echo "$ac_t""$GMSGFMT" 1>&6
4477else
4478 echo "$ac_t""no" 1>&6
4479fi
4480
4481 # Extract the first word of "xgettext", so it can be a program name with args.
4482set dummy xgettext; ac_word=$2
4483echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 4484echo "configure:4485: checking for $ac_word" >&5
252b5132
RH
4485if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4486 echo $ac_n "(cached) $ac_c" 1>&6
4487else
4488 case "$XGETTEXT" in
4489 /*)
4490 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4491 ;;
4492 *)
4493 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4494 for ac_dir in $PATH; do
4495 test -z "$ac_dir" && ac_dir=.
4496 if test -f $ac_dir/$ac_word; then
4497 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4498 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4499 break
4500 fi
4501 fi
4502 done
4503 IFS="$ac_save_ifs"
4504 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4505 ;;
4506esac
4507fi
4508XGETTEXT="$ac_cv_path_XGETTEXT"
4509if test -n "$XGETTEXT"; then
4510 echo "$ac_t""$XGETTEXT" 1>&6
4511else
4512 echo "$ac_t""no" 1>&6
4513fi
4514
4515 cat > conftest.$ac_ext <<EOF
008960a5 4516#line 4517 "configure"
252b5132
RH
4517#include "confdefs.h"
4518
4519int main() {
4520extern int _nl_msg_cat_cntr;
4521 return _nl_msg_cat_cntr
4522; return 0; }
4523EOF
008960a5 4524if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
4525 rm -rf conftest*
4526 CATOBJEXT=.gmo
4527 DATADIRNAME=share
4528else
4529 echo "configure: failed program was:" >&5
4530 cat conftest.$ac_ext >&5
4531 rm -rf conftest*
4532 CATOBJEXT=.mo
4533 DATADIRNAME=lib
4534fi
4535rm -f conftest*
4536 INSTOBJEXT=.mo
4537 fi
4538 fi
4539
4540else
4541 echo "$ac_t""no" 1>&6
4542fi
4543
4544
4545
4546 if test "$CATOBJEXT" = "NONE"; then
4547 nls_cv_use_gnu_gettext=yes
4548 fi
4549 fi
4550
4551 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4552 INTLOBJS="\$(GETTOBJS)"
4553 # Extract the first word of "msgfmt", so it can be a program name with args.
4554set dummy msgfmt; ac_word=$2
4555echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 4556echo "configure:4557: checking for $ac_word" >&5
252b5132
RH
4557if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4558 echo $ac_n "(cached) $ac_c" 1>&6
4559else
4560 case "$MSGFMT" in
4561 /*)
4562 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4563 ;;
4564 *)
4565 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4566 for ac_dir in $PATH; do
4567 test -z "$ac_dir" && ac_dir=.
4568 if test -f $ac_dir/$ac_word; then
4569 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4570 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4571 break
4572 fi
4573 fi
4574 done
4575 IFS="$ac_save_ifs"
4576 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4577 ;;
4578esac
4579fi
4580MSGFMT="$ac_cv_path_MSGFMT"
4581if test -n "$MSGFMT"; then
4582 echo "$ac_t""$MSGFMT" 1>&6
4583else
4584 echo "$ac_t""no" 1>&6
4585fi
4586
4587 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4588set dummy gmsgfmt; ac_word=$2
4589echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 4590echo "configure:4591: checking for $ac_word" >&5
252b5132
RH
4591if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4592 echo $ac_n "(cached) $ac_c" 1>&6
4593else
4594 case "$GMSGFMT" in
4595 /*)
4596 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4597 ;;
4598 ?:/*)
4599 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4600 ;;
4601 *)
4602 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4603 ac_dummy="$PATH"
4604 for ac_dir in $ac_dummy; do
4605 test -z "$ac_dir" && ac_dir=.
4606 if test -f $ac_dir/$ac_word; then
4607 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4608 break
4609 fi
4610 done
4611 IFS="$ac_save_ifs"
4612 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4613 ;;
4614esac
4615fi
4616GMSGFMT="$ac_cv_path_GMSGFMT"
4617if test -n "$GMSGFMT"; then
4618 echo "$ac_t""$GMSGFMT" 1>&6
4619else
4620 echo "$ac_t""no" 1>&6
4621fi
4622
4623 # Extract the first word of "xgettext", so it can be a program name with args.
4624set dummy xgettext; ac_word=$2
4625echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
008960a5 4626echo "configure:4627: checking for $ac_word" >&5
252b5132
RH
4627if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4628 echo $ac_n "(cached) $ac_c" 1>&6
4629else
4630 case "$XGETTEXT" in
4631 /*)
4632 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4633 ;;
4634 *)
4635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4636 for ac_dir in $PATH; do
4637 test -z "$ac_dir" && ac_dir=.
4638 if test -f $ac_dir/$ac_word; then
4639 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4640 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4641 break
4642 fi
4643 fi
4644 done
4645 IFS="$ac_save_ifs"
4646 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4647 ;;
4648esac
4649fi
4650XGETTEXT="$ac_cv_path_XGETTEXT"
4651if test -n "$XGETTEXT"; then
4652 echo "$ac_t""$XGETTEXT" 1>&6
4653else
4654 echo "$ac_t""no" 1>&6
4655fi
4656
4657
4658 USE_INCLUDED_LIBINTL=yes
4659 CATOBJEXT=.gmo
4660 INSTOBJEXT=.mo
4661 DATADIRNAME=share
4662 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4663 INTLLIBS=$INTLDEPS
4664 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4665 nls_cv_header_intl=libintl.h
4666 nls_cv_header_libgt=libgettext.h
4667 fi
4668
4669 if test "$XGETTEXT" != ":"; then
4670 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4671 : ;
4672 else
4673 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4674 XGETTEXT=":"
4675 fi
4676 fi
4677
4678 # We need to process the po/ directory.
4679 POSUB=po
4680 else
4681 DATADIRNAME=share
4682 nls_cv_header_intl=libintl.h
4683 nls_cv_header_libgt=libgettext.h
4684 fi
4685
4686 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4687 # because some of the sources are only built for this goal.
4688 if test "$PACKAGE" = gettext; then
4689 USE_NLS=yes
4690 USE_INCLUDED_LIBINTL=yes
4691 fi
4692
4693 for lang in $ALL_LINGUAS; do
4694 GMOFILES="$GMOFILES $lang.gmo"
4695 POFILES="$POFILES $lang.po"
4696 done
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711 if test "x$CATOBJEXT" != "x"; then
4712 if test "x$ALL_LINGUAS" = "x"; then
4713 LINGUAS=
4714 else
4715 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
008960a5 4716echo "configure:4717: checking for catalogs to be installed" >&5
252b5132
RH
4717 NEW_LINGUAS=
4718 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4719 case "$ALL_LINGUAS" in
4720 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4721 esac
4722 done
4723 LINGUAS=$NEW_LINGUAS
4724 echo "$ac_t""$LINGUAS" 1>&6
4725 fi
4726
4727 if test -n "$LINGUAS"; then
4728 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4729 fi
4730 fi
4731
4732 if test $ac_cv_header_locale_h = yes; then
4733 INCLUDE_LOCALE_H="#include <locale.h>"
4734 else
4735 INCLUDE_LOCALE_H="\
4736/* The system does not provide the header <locale.h>. Take care yourself. */"
4737 fi
4738
4739
4740 if test -f $srcdir/po2tbl.sed.in; then
4741 if test "$CATOBJEXT" = ".cat"; then
4742 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4743echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
008960a5 4744echo "configure:4745: checking for linux/version.h" >&5
252b5132
RH
4745if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4746 echo $ac_n "(cached) $ac_c" 1>&6
4747else
4748 cat > conftest.$ac_ext <<EOF
008960a5 4749#line 4750 "configure"
252b5132
RH
4750#include "confdefs.h"
4751#include <linux/version.h>
4752EOF
4753ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 4754{ (eval echo configure:4755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
4755ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4756if test -z "$ac_err"; then
4757 rm -rf conftest*
4758 eval "ac_cv_header_$ac_safe=yes"
4759else
4760 echo "$ac_err" >&5
4761 echo "configure: failed program was:" >&5
4762 cat conftest.$ac_ext >&5
4763 rm -rf conftest*
4764 eval "ac_cv_header_$ac_safe=no"
4765fi
4766rm -f conftest*
4767fi
4768if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4769 echo "$ac_t""yes" 1>&6
4770 msgformat=linux
4771else
4772 echo "$ac_t""no" 1>&6
4773msgformat=xopen
4774fi
4775
4776
4777 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4778 fi
4779 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4780 $srcdir/po2tbl.sed.in > po2tbl.sed
4781 fi
4782
4783 if test "$PACKAGE" = "gettext"; then
4784 GT_NO="#NO#"
4785 GT_YES=
4786 else
4787 GT_NO=
4788 GT_YES="#YES#"
4789 fi
4790
4791
4792
4793 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4794
4795
4796 l=
4797
4798
4799 if test -d $srcdir/po; then
4800 test -d po || mkdir po
4801 if test "x$srcdir" != "x."; then
4802 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4803 posrcprefix="$srcdir/"
4804 else
4805 posrcprefix="../$srcdir/"
4806 fi
4807 else
4808 posrcprefix="../"
4809 fi
4810 rm -f po/POTFILES
4811 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4812 < $srcdir/po/POTFILES.in > po/POTFILES
4813 fi
4814
4815
4816echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
008960a5 4817echo "configure:4818: checking whether to enable maintainer-specific portions of Makefiles" >&5
252b5132
RH
4818 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4819if test "${enable_maintainer_mode+set}" = set; then
4820 enableval="$enable_maintainer_mode"
4821 USE_MAINTAINER_MODE=$enableval
4822else
4823 USE_MAINTAINER_MODE=no
4824fi
4825
4826 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4827
4828
4829if test $USE_MAINTAINER_MODE = yes; then
4830 MAINTAINER_MODE_TRUE=
4831 MAINTAINER_MODE_FALSE='#'
4832else
4833 MAINTAINER_MODE_TRUE='#'
4834 MAINTAINER_MODE_FALSE=
4835fi
4836 MAINT=$MAINTAINER_MODE_TRUE
4837
4838
4839echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
008960a5 4840echo "configure:4841: checking for Cygwin environment" >&5
252b5132
RH
4841if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
4842 echo $ac_n "(cached) $ac_c" 1>&6
4843else
4844 cat > conftest.$ac_ext <<EOF
008960a5 4845#line 4846 "configure"
252b5132
RH
4846#include "confdefs.h"
4847
4848int main() {
4849
4850#ifndef __CYGWIN__
4851#define __CYGWIN__ __CYGWIN32__
4852#endif
4853return __CYGWIN__;
4854; return 0; }
4855EOF
008960a5 4856if { (eval echo configure:4857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4857 rm -rf conftest*
4858 ac_cv_cygwin=yes
4859else
4860 echo "configure: failed program was:" >&5
4861 cat conftest.$ac_ext >&5
4862 rm -rf conftest*
4863 ac_cv_cygwin=no
4864fi
4865rm -f conftest*
4866rm -f conftest*
4867fi
4868
4869echo "$ac_t""$ac_cv_cygwin" 1>&6
4870CYGWIN=
4871test "$ac_cv_cygwin" = yes && CYGWIN=yes
4872echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
008960a5 4873echo "configure:4874: checking for mingw32 environment" >&5
252b5132
RH
4874if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4875 echo $ac_n "(cached) $ac_c" 1>&6
4876else
4877 cat > conftest.$ac_ext <<EOF
008960a5 4878#line 4879 "configure"
252b5132
RH
4879#include "confdefs.h"
4880
4881int main() {
4882return __MINGW32__;
4883; return 0; }
4884EOF
008960a5 4885if { (eval echo configure:4886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
4886 rm -rf conftest*
4887 ac_cv_mingw32=yes
4888else
4889 echo "configure: failed program was:" >&5
4890 cat conftest.$ac_ext >&5
4891 rm -rf conftest*
4892 ac_cv_mingw32=no
4893fi
4894rm -f conftest*
4895rm -f conftest*
4896fi
4897
4898echo "$ac_t""$ac_cv_mingw32" 1>&6
4899MINGW32=
4900test "$ac_cv_mingw32" = yes && MINGW32=yes
4901
4902
4903echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
008960a5 4904echo "configure:4905: checking for executable suffix" >&5
252b5132
RH
4905if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4906 echo $ac_n "(cached) $ac_c" 1>&6
4907else
4908 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4909 ac_cv_exeext=.exe
4910else
4911 rm -f conftest*
4912 echo 'int main () { return 0; }' > conftest.$ac_ext
4913 ac_cv_exeext=
008960a5 4914 if { (eval echo configure:4915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
252b5132
RH
4915 for file in conftest.*; do
4916 case $file in
bedf545c 4917 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
252b5132
RH
4918 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4919 esac
4920 done
4921 else
4922 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4923 fi
4924 rm -f conftest*
4925 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4926fi
4927fi
4928
4929EXEEXT=""
4930test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4931echo "$ac_t""${ac_cv_exeext}" 1>&6
4932ac_exeext=$EXEEXT
4933
4934
4935for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
4936do
4937ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4938echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
008960a5 4939echo "configure:4940: checking for $ac_hdr" >&5
252b5132
RH
4940if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4941 echo $ac_n "(cached) $ac_c" 1>&6
4942else
4943 cat > conftest.$ac_ext <<EOF
008960a5 4944#line 4945 "configure"
252b5132
RH
4945#include "confdefs.h"
4946#include <$ac_hdr>
4947EOF
4948ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
008960a5 4949{ (eval echo configure:4950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
252b5132
RH
4950ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4951if test -z "$ac_err"; then
4952 rm -rf conftest*
4953 eval "ac_cv_header_$ac_safe=yes"
4954else
4955 echo "$ac_err" >&5
4956 echo "configure: failed program was:" >&5
4957 cat conftest.$ac_ext >&5
4958 rm -rf conftest*
4959 eval "ac_cv_header_$ac_safe=no"
4960fi
4961rm -f conftest*
4962fi
4963if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4964 echo "$ac_t""yes" 1>&6
4965 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4966 cat >> confdefs.h <<EOF
4967#define $ac_tr_hdr 1
4968EOF
4969
4970else
4971 echo "$ac_t""no" 1>&6
4972fi
4973done
4974
4975
4976# Put this here so that autoconf's "cross-compiling" message doesn't confuse
4977# people who are not cross-compiling but are compiling cross-assemblers.
4978echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
008960a5 4979echo "configure:4980: checking whether compiling a cross-assembler" >&5
252b5132
RH
4980if test "${host}" = "${target}"; then
4981 cross_gas=no
4982else
4983 cross_gas=yes
4984 cat >> confdefs.h <<\EOF
4985#define CROSS_COMPILE 1
4986EOF
4987
4988fi
4989echo "$ac_t""$cross_gas" 1>&6
4990
4991# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4992# for constant arguments. Useless!
4993echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
008960a5 4994echo "configure:4995: checking for working alloca.h" >&5
252b5132
RH
4995if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4996 echo $ac_n "(cached) $ac_c" 1>&6
4997else
4998 cat > conftest.$ac_ext <<EOF
008960a5 4999#line 5000 "configure"
252b5132
RH
5000#include "confdefs.h"
5001#include <alloca.h>
5002int main() {
5003char *p = alloca(2 * sizeof(int));
5004; return 0; }
5005EOF
008960a5 5006if { (eval echo configure:5007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5007 rm -rf conftest*
5008 ac_cv_header_alloca_h=yes
5009else
5010 echo "configure: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 rm -rf conftest*
5013 ac_cv_header_alloca_h=no
5014fi
5015rm -f conftest*
5016fi
5017
5018echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5019if test $ac_cv_header_alloca_h = yes; then
5020 cat >> confdefs.h <<\EOF
5021#define HAVE_ALLOCA_H 1
5022EOF
5023
5024fi
5025
5026echo $ac_n "checking for alloca""... $ac_c" 1>&6
008960a5 5027echo "configure:5028: checking for alloca" >&5
252b5132
RH
5028if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5029 echo $ac_n "(cached) $ac_c" 1>&6
5030else
5031 cat > conftest.$ac_ext <<EOF
008960a5 5032#line 5033 "configure"
252b5132
RH
5033#include "confdefs.h"
5034
5035#ifdef __GNUC__
5036# define alloca __builtin_alloca
5037#else
5038# ifdef _MSC_VER
5039# include <malloc.h>
5040# define alloca _alloca
5041# else
5042# if HAVE_ALLOCA_H
5043# include <alloca.h>
5044# else
5045# ifdef _AIX
5046 #pragma alloca
5047# else
5048# ifndef alloca /* predefined by HP cc +Olibcalls */
5049char *alloca ();
5050# endif
5051# endif
5052# endif
5053# endif
5054#endif
5055
5056int main() {
5057char *p = (char *) alloca(1);
5058; return 0; }
5059EOF
008960a5 5060if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5061 rm -rf conftest*
5062 ac_cv_func_alloca_works=yes
5063else
5064 echo "configure: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 rm -rf conftest*
5067 ac_cv_func_alloca_works=no
5068fi
5069rm -f conftest*
5070fi
5071
5072echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5073if test $ac_cv_func_alloca_works = yes; then
5074 cat >> confdefs.h <<\EOF
5075#define HAVE_ALLOCA 1
5076EOF
5077
5078fi
5079
5080if test $ac_cv_func_alloca_works = no; then
5081 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5082 # that cause trouble. Some versions do not even contain alloca or
5083 # contain a buggy version. If you still want to use their alloca,
5084 # use ar to extract alloca.o from them instead of compiling alloca.c.
5085 ALLOCA=alloca.${ac_objext}
5086 cat >> confdefs.h <<\EOF
5087#define C_ALLOCA 1
5088EOF
5089
5090
5091echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
008960a5 5092echo "configure:5093: checking whether alloca needs Cray hooks" >&5
252b5132
RH
5093if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5094 echo $ac_n "(cached) $ac_c" 1>&6
5095else
5096 cat > conftest.$ac_ext <<EOF
008960a5 5097#line 5098 "configure"
252b5132
RH
5098#include "confdefs.h"
5099#if defined(CRAY) && ! defined(CRAY2)
5100webecray
5101#else
5102wenotbecray
5103#endif
5104
5105EOF
5106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5107 egrep "webecray" >/dev/null 2>&1; then
5108 rm -rf conftest*
5109 ac_cv_os_cray=yes
5110else
5111 rm -rf conftest*
5112 ac_cv_os_cray=no
5113fi
5114rm -f conftest*
5115
5116fi
5117
5118echo "$ac_t""$ac_cv_os_cray" 1>&6
5119if test $ac_cv_os_cray = yes; then
5120for ac_func in _getb67 GETB67 getb67; do
5121 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
008960a5 5122echo "configure:5123: checking for $ac_func" >&5
252b5132
RH
5123if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5124 echo $ac_n "(cached) $ac_c" 1>&6
5125else
5126 cat > conftest.$ac_ext <<EOF
008960a5 5127#line 5128 "configure"
252b5132
RH
5128#include "confdefs.h"
5129/* System header to define __stub macros and hopefully few prototypes,
5130 which can conflict with char $ac_func(); below. */
5131#include <assert.h>
5132/* Override any gcc2 internal prototype to avoid an error. */
5133/* We use char because int might match the return type of a gcc2
5134 builtin and then its argument prototype would still apply. */
5135char $ac_func();
5136
5137int main() {
5138
5139/* The GNU C library defines this for functions which it implements
5140 to always fail with ENOSYS. Some functions are actually named
5141 something starting with __ and the normal name is an alias. */
5142#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5143choke me
5144#else
5145$ac_func();
5146#endif
5147
5148; return 0; }
5149EOF
008960a5 5150if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5151 rm -rf conftest*
5152 eval "ac_cv_func_$ac_func=yes"
5153else
5154 echo "configure: failed program was:" >&5
5155 cat conftest.$ac_ext >&5
5156 rm -rf conftest*
5157 eval "ac_cv_func_$ac_func=no"
5158fi
5159rm -f conftest*
5160fi
5161
5162if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5163 echo "$ac_t""yes" 1>&6
5164 cat >> confdefs.h <<EOF
5165#define CRAY_STACKSEG_END $ac_func
5166EOF
5167
5168 break
5169else
5170 echo "$ac_t""no" 1>&6
5171fi
5172
5173done
5174fi
5175
5176echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
008960a5 5177echo "configure:5178: checking stack direction for C alloca" >&5
252b5132
RH
5178if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5179 echo $ac_n "(cached) $ac_c" 1>&6
5180else
5181 if test "$cross_compiling" = yes; then
5182 ac_cv_c_stack_direction=0
5183else
5184 cat > conftest.$ac_ext <<EOF
008960a5 5185#line 5186 "configure"
252b5132
RH
5186#include "confdefs.h"
5187find_stack_direction ()
5188{
5189 static char *addr = 0;
5190 auto char dummy;
5191 if (addr == 0)
5192 {
5193 addr = &dummy;
5194 return find_stack_direction ();
5195 }
5196 else
5197 return (&dummy > addr) ? 1 : -1;
5198}
5199main ()
5200{
5201 exit (find_stack_direction() < 0);
5202}
5203EOF
008960a5 5204if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
252b5132
RH
5205then
5206 ac_cv_c_stack_direction=1
5207else
5208 echo "configure: failed program was:" >&5
5209 cat conftest.$ac_ext >&5
5210 rm -fr conftest*
5211 ac_cv_c_stack_direction=-1
5212fi
5213rm -fr conftest*
5214fi
5215
5216fi
5217
5218echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5219cat >> confdefs.h <<EOF
5220#define STACK_DIRECTION $ac_cv_c_stack_direction
5221EOF
5222
5223fi
5224
5225echo $ac_n "checking for inline""... $ac_c" 1>&6
008960a5 5226echo "configure:5227: checking for inline" >&5
252b5132
RH
5227if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5228 echo $ac_n "(cached) $ac_c" 1>&6
5229else
5230 ac_cv_c_inline=no
5231for ac_kw in inline __inline__ __inline; do
5232 cat > conftest.$ac_ext <<EOF
008960a5 5233#line 5234 "configure"
252b5132
RH
5234#include "confdefs.h"
5235
5236int main() {
5237} $ac_kw foo() {
5238; return 0; }
5239EOF
008960a5 5240if { (eval echo configure:5241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
252b5132
RH
5241 rm -rf conftest*
5242 ac_cv_c_inline=$ac_kw; break
5243else
5244 echo "configure: failed program was:" >&5
5245 cat conftest.$ac_ext >&5
5246fi
5247rm -f conftest*
5248done
5249
5250fi
5251
5252echo "$ac_t""$ac_cv_c_inline" 1>&6
5253case "$ac_cv_c_inline" in
5254 inline | yes) ;;
5255 no) cat >> confdefs.h <<\EOF
5256#define inline
5257EOF
5258 ;;
5259 *) cat >> confdefs.h <<EOF
5260#define inline $ac_cv_c_inline
5261EOF
5262 ;;
5263esac
5264
5265
5266# VMS doesn't have unlink.
5267for ac_func in unlink remove
5268do
5269echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
008960a5 5270echo "configure:5271: checking for $ac_func" >&5
252b5132
RH
5271if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5272 echo $ac_n "(cached) $ac_c" 1>&6
5273else
5274 cat > conftest.$ac_ext <<EOF
008960a5 5275#line 5276 "configure"
252b5132
RH
5276#include "confdefs.h"
5277/* System header to define __stub macros and hopefully few prototypes,
5278 which can conflict with char $ac_func(); below. */
5279#include <assert.h>
5280/* Override any gcc2 internal prototype to avoid an error. */
5281/* We use char because int might match the return type of a gcc2
5282 builtin and then its argument prototype would still apply. */
5283char $ac_func();
5284
5285int main() {
5286
5287/* The GNU C library defines this for functions which it implements
5288 to always fail with ENOSYS. Some functions are actually named
5289 something starting with __ and the normal name is an alias. */
5290#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5291choke me
5292#else
5293$ac_func();
5294#endif
5295
5296; return 0; }
5297EOF
008960a5 5298if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5299 rm -rf conftest*
5300 eval "ac_cv_func_$ac_func=yes"
5301else
5302 echo "configure: failed program was:" >&5
5303 cat conftest.$ac_ext >&5
5304 rm -rf conftest*
5305 eval "ac_cv_func_$ac_func=no"
5306fi
5307rm -f conftest*
5308fi
5309
5310if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5311 echo "$ac_t""yes" 1>&6
5312 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5313 cat >> confdefs.h <<EOF
5314#define $ac_tr_func 1
5315EOF
5316 break
5317else
5318 echo "$ac_t""no" 1>&6
5319fi
5320done
5321
5322
5323# Some systems don't have sbrk().
5324for ac_func in sbrk
5325do
5326echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
008960a5 5327echo "configure:5328: checking for $ac_func" >&5
252b5132
RH
5328if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5329 echo $ac_n "(cached) $ac_c" 1>&6
5330else
5331 cat > conftest.$ac_ext <<EOF
008960a5 5332#line 5333 "configure"
252b5132
RH
5333#include "confdefs.h"
5334/* System header to define __stub macros and hopefully few prototypes,
5335 which can conflict with char $ac_func(); below. */
5336#include <assert.h>
5337/* Override any gcc2 internal prototype to avoid an error. */
5338/* We use char because int might match the return type of a gcc2
5339 builtin and then its argument prototype would still apply. */
5340char $ac_func();
5341
5342int main() {
5343
5344/* The GNU C library defines this for functions which it implements
5345 to always fail with ENOSYS. Some functions are actually named
5346 something starting with __ and the normal name is an alias. */
5347#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5348choke me
5349#else
5350$ac_func();
5351#endif
5352
5353; return 0; }
5354EOF
008960a5 5355if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5356 rm -rf conftest*
5357 eval "ac_cv_func_$ac_func=yes"
5358else
5359 echo "configure: failed program was:" >&5
5360 cat conftest.$ac_ext >&5
5361 rm -rf conftest*
5362 eval "ac_cv_func_$ac_func=no"
5363fi
5364rm -f conftest*
5365fi
5366
5367if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5368 echo "$ac_t""yes" 1>&6
5369 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5370 cat >> confdefs.h <<EOF
5371#define $ac_tr_func 1
5372EOF
5373
5374else
5375 echo "$ac_t""no" 1>&6
5376fi
5377done
5378
5379
5380# Some non-ANSI preprocessors botch requoting inside strings. That's bad
5381# enough, but on some of those systems, the assert macro relies on requoting
5382# working properly!
5383echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
008960a5 5384echo "configure:5385: checking for working assert macro" >&5
252b5132
RH
5385if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
5386 echo $ac_n "(cached) $ac_c" 1>&6
5387else
5388 cat > conftest.$ac_ext <<EOF
008960a5 5389#line 5390 "configure"
252b5132
RH
5390#include "confdefs.h"
5391#include <assert.h>
5392#include <stdio.h>
5393int main() {
5394
5395/* check for requoting problems */
5396static int a, b, c, d;
5397static char *s;
5398assert (!strcmp(s, "foo bar baz quux"));
5399/* check for newline handling */
5400assert (a == b
5401 || c == d);
5402
5403; return 0; }
5404EOF
008960a5 5405if { (eval echo configure:5406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5406 rm -rf conftest*
5407 gas_cv_assert_ok=yes
5408else
5409 echo "configure: failed program was:" >&5
5410 cat conftest.$ac_ext >&5
5411 rm -rf conftest*
5412 gas_cv_assert_ok=no
5413fi
5414rm -f conftest*
5415fi
5416echo "$ac_t""$gas_cv_assert_ok" 1>&6
5417test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
5418#define BROKEN_ASSERT 1
5419EOF
5420
5421
5422
5423# On some systems, the system header files may not declare malloc, realloc,
5424# and free. There are places where gas needs these functions to have been
5425# declared -- such as when taking their addresses.
5426gas_test_headers="
5427#ifdef HAVE_MEMORY_H
5428#include <memory.h>
5429#endif
5430#ifdef HAVE_STRING_H
5431#include <string.h>
5432#else
5433#ifdef HAVE_STRINGS_H
5434#include <strings.h>
5435#endif
5436#endif
5437#ifdef HAVE_STDLIB_H
5438#include <stdlib.h>
5439#endif
5440#ifdef HAVE_UNISTD_H
5441#include <unistd.h>
5442#endif
5443"
5444
5445echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
008960a5 5446echo "configure:5447: checking whether declaration is required for strstr" >&5
252b5132
RH
5447if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
5448 echo $ac_n "(cached) $ac_c" 1>&6
5449else
5450 cat > conftest.$ac_ext <<EOF
008960a5 5451#line 5452 "configure"
252b5132
RH
5452#include "confdefs.h"
5453$gas_test_headers
5454int main() {
5455
5456typedef char *(*f)();
5457f x;
5458x = (f) strstr;
5459
5460; return 0; }
5461EOF
008960a5 5462if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5463 rm -rf conftest*
5464 gas_cv_decl_needed_strstr=no
5465else
5466 echo "configure: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5468 rm -rf conftest*
5469 gas_cv_decl_needed_strstr=yes
5470fi
5471rm -f conftest*
5472fi
5473echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
5474if test $gas_cv_decl_needed_strstr = yes; then
5475 cat >> confdefs.h <<\EOF
5476#define NEED_DECLARATION_STRSTR 1
5477EOF
5478
5479fi
5480
5481
5482echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
008960a5 5483echo "configure:5484: checking whether declaration is required for malloc" >&5
252b5132
RH
5484if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
5485 echo $ac_n "(cached) $ac_c" 1>&6
5486else
5487 cat > conftest.$ac_ext <<EOF
008960a5 5488#line 5489 "configure"
252b5132
RH
5489#include "confdefs.h"
5490$gas_test_headers
5491int main() {
5492
5493typedef char *(*f)();
5494f x;
5495x = (f) malloc;
5496
5497; return 0; }
5498EOF
008960a5 5499if { (eval echo configure:5500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5500 rm -rf conftest*
5501 gas_cv_decl_needed_malloc=no
5502else
5503 echo "configure: failed program was:" >&5
5504 cat conftest.$ac_ext >&5
5505 rm -rf conftest*
5506 gas_cv_decl_needed_malloc=yes
5507fi
5508rm -f conftest*
5509fi
5510echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
5511if test $gas_cv_decl_needed_malloc = yes; then
5512 cat >> confdefs.h <<\EOF
5513#define NEED_DECLARATION_MALLOC 1
5514EOF
5515
5516fi
5517
5518
5519echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
008960a5 5520echo "configure:5521: checking whether declaration is required for free" >&5
252b5132
RH
5521if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
5522 echo $ac_n "(cached) $ac_c" 1>&6
5523else
5524 cat > conftest.$ac_ext <<EOF
008960a5 5525#line 5526 "configure"
252b5132
RH
5526#include "confdefs.h"
5527$gas_test_headers
5528int main() {
5529
5530typedef void (*f)();
5531f x;
5532x = (f) free;
5533
5534; return 0; }
5535EOF
008960a5 5536if { (eval echo configure:5537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5537 rm -rf conftest*
5538 gas_cv_decl_needed_free=no
5539else
5540 echo "configure: failed program was:" >&5
5541 cat conftest.$ac_ext >&5
5542 rm -rf conftest*
5543 gas_cv_decl_needed_free=yes
5544fi
5545rm -f conftest*
5546fi
5547echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
5548if test $gas_cv_decl_needed_free = yes; then
5549 cat >> confdefs.h <<\EOF
5550#define NEED_DECLARATION_FREE 1
5551EOF
5552
5553fi
5554
5555
5556echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
008960a5 5557echo "configure:5558: checking whether declaration is required for sbrk" >&5
252b5132
RH
5558if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
5559 echo $ac_n "(cached) $ac_c" 1>&6
5560else
5561 cat > conftest.$ac_ext <<EOF
008960a5 5562#line 5563 "configure"
252b5132
RH
5563#include "confdefs.h"
5564$gas_test_headers
5565int main() {
5566
5567typedef char *(*f)();
5568f x;
5569x = (f) sbrk;
5570
5571; return 0; }
5572EOF
008960a5 5573if { (eval echo configure:5574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5574 rm -rf conftest*
5575 gas_cv_decl_needed_sbrk=no
5576else
5577 echo "configure: failed program was:" >&5
5578 cat conftest.$ac_ext >&5
5579 rm -rf conftest*
5580 gas_cv_decl_needed_sbrk=yes
5581fi
5582rm -f conftest*
5583fi
5584echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
5585if test $gas_cv_decl_needed_sbrk = yes; then
5586 cat >> confdefs.h <<\EOF
5587#define NEED_DECLARATION_SBRK 1
5588EOF
5589
5590fi
5591
5592
5593echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
008960a5 5594echo "configure:5595: checking whether declaration is required for environ" >&5
252b5132
RH
5595if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then
5596 echo $ac_n "(cached) $ac_c" 1>&6
5597else
5598 cat > conftest.$ac_ext <<EOF
008960a5 5599#line 5600 "configure"
252b5132
RH
5600#include "confdefs.h"
5601$gas_test_headers
5602int main() {
5603
5604typedef char **f;
5605f x;
5606x = (f) environ;
5607
5608; return 0; }
5609EOF
008960a5 5610if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5611 rm -rf conftest*
5612 gas_cv_decl_needed_environ=no
5613else
5614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5616 rm -rf conftest*
5617 gas_cv_decl_needed_environ=yes
5618fi
5619rm -f conftest*
5620fi
5621echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6
5622if test $gas_cv_decl_needed_environ = yes; then
5623 cat >> confdefs.h <<\EOF
5624#define NEED_DECLARATION_ENVIRON 1
5625EOF
5626
5627fi
5628
5629
5630# Does errno.h declare errno, or do we have to add a separate declaration
5631# for it?
5632
5633echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
008960a5 5634echo "configure:5635: checking whether declaration is required for errno" >&5
252b5132
RH
5635if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
5636 echo $ac_n "(cached) $ac_c" 1>&6
5637else
5638 cat > conftest.$ac_ext <<EOF
008960a5 5639#line 5640 "configure"
252b5132
RH
5640#include "confdefs.h"
5641
5642#ifdef HAVE_ERRNO_H
5643#include <errno.h>
5644#endif
5645
5646int main() {
5647
5648typedef int f;
5649f x;
5650x = (f) errno;
5651
5652; return 0; }
5653EOF
008960a5 5654if { (eval echo configure:5655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
252b5132
RH
5655 rm -rf conftest*
5656 gas_cv_decl_needed_errno=no
5657else
5658 echo "configure: failed program was:" >&5
5659 cat conftest.$ac_ext >&5
5660 rm -rf conftest*
5661 gas_cv_decl_needed_errno=yes
5662fi
5663rm -f conftest*
5664fi
5665echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
5666if test $gas_cv_decl_needed_errno = yes; then
5667 cat >> confdefs.h <<\EOF
5668#define NEED_DECLARATION_ERRNO 1
5669EOF
5670
5671fi
5672
5673
5674
5675
5676trap '' 1 2 15
5677cat > confcache <<\EOF
5678# This file is a shell script that caches the results of configure
5679# tests run on this system so they can be shared between configure
5680# scripts and configure runs. It is not useful on other systems.
5681# If it contains results you don't want to keep, you may remove or edit it.
5682#
5683# By default, configure uses ./config.cache as the cache file,
5684# creating it if it does not exist already. You can give configure
5685# the --cache-file=FILE option to use a different cache file; that is
5686# what configure does when it calls configure scripts in
5687# subdirectories, so they share the cache.
5688# Giving --cache-file=/dev/null disables caching, for debugging configure.
5689# config.status only pays attention to the cache file if you give it the
5690# --recheck option to rerun configure.
5691#
5692EOF
5693# The following way of writing the cache mishandles newlines in values,
5694# but we know of no workaround that is simple, portable, and efficient.
5695# So, don't put newlines in cache variables' values.
5696# Ultrix sh set writes to stderr and can't be redirected directly,
5697# and sets the high bit in the cache file unless we assign to the vars.
5698(set) 2>&1 |
5699 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5700 *ac_space=\ *)
5701 # `set' does not quote correctly, so add quotes (double-quote substitution
5702 # turns \\\\ into \\, and sed turns \\ into \).
5703 sed -n \
5704 -e "s/'/'\\\\''/g" \
5705 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5706 ;;
5707 *)
5708 # `set' quotes correctly as required by POSIX, so do not add quotes.
5709 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5710 ;;
5711 esac >> confcache
5712if cmp -s $cache_file confcache; then
5713 :
5714else
5715 if test -w $cache_file; then
5716 echo "updating cache $cache_file"
5717 cat confcache > $cache_file
5718 else
5719 echo "not updating unwritable cache $cache_file"
5720 fi
5721fi
5722rm -f confcache
5723
5724trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5725
5726test "x$prefix" = xNONE && prefix=$ac_default_prefix
5727# Let make expand exec_prefix.
5728test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5729
5730# Any assignment to VPATH causes Sun make to only execute
5731# the first set of double-colon rules, so remove it if not needed.
5732# If there is a colon in the path, we need to keep it.
5733if test "x$srcdir" = x.; then
5734 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5735fi
5736
5737trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5738
5739DEFS=-DHAVE_CONFIG_H
5740
5741# Without the "./", some shells look in PATH for config.status.
5742: ${CONFIG_STATUS=./config.status}
5743
5744echo creating $CONFIG_STATUS
5745rm -f $CONFIG_STATUS
5746cat > $CONFIG_STATUS <<EOF
5747#! /bin/sh
5748# Generated automatically by configure.
5749# Run this file to recreate the current configuration.
5750# This directory was configured as follows,
5751# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5752#
5753# $0 $ac_configure_args
5754#
5755# Compiler output produced by configure, useful for debugging
5756# configure, is in ./config.log if it exists.
5757
5758ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5759for ac_option
5760do
5761 case "\$ac_option" in
5762 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5763 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5764 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5765 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5766 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5767 exit 0 ;;
5768 -help | --help | --hel | --he | --h)
5769 echo "\$ac_cs_usage"; exit 0 ;;
5770 *) echo "\$ac_cs_usage"; exit 1 ;;
5771 esac
5772done
5773
5774ac_given_srcdir=$srcdir
5775ac_given_INSTALL="$INSTALL"
5776
5777trap '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
5778EOF
5779cat >> $CONFIG_STATUS <<EOF
5780
5781# Protect against being on the right side of a sed subst in config.status.
5782sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5783 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5784$ac_vpsub
5785$extrasub
5786s%@SHELL@%$SHELL%g
5787s%@CFLAGS@%$CFLAGS%g
5788s%@CPPFLAGS@%$CPPFLAGS%g
5789s%@CXXFLAGS@%$CXXFLAGS%g
5790s%@FFLAGS@%$FFLAGS%g
5791s%@DEFS@%$DEFS%g
5792s%@LDFLAGS@%$LDFLAGS%g
5793s%@LIBS@%$LIBS%g
5794s%@exec_prefix@%$exec_prefix%g
5795s%@prefix@%$prefix%g
5796s%@program_transform_name@%$program_transform_name%g
5797s%@bindir@%$bindir%g
5798s%@sbindir@%$sbindir%g
5799s%@libexecdir@%$libexecdir%g
5800s%@datadir@%$datadir%g
5801s%@sysconfdir@%$sysconfdir%g
5802s%@sharedstatedir@%$sharedstatedir%g
5803s%@localstatedir@%$localstatedir%g
5804s%@libdir@%$libdir%g
5805s%@includedir@%$includedir%g
5806s%@oldincludedir@%$oldincludedir%g
5807s%@infodir@%$infodir%g
5808s%@mandir@%$mandir%g
5809s%@host@%$host%g
5810s%@host_alias@%$host_alias%g
5811s%@host_cpu@%$host_cpu%g
5812s%@host_vendor@%$host_vendor%g
5813s%@host_os@%$host_os%g
5814s%@target@%$target%g
5815s%@target_alias@%$target_alias%g
5816s%@target_cpu@%$target_cpu%g
5817s%@target_vendor@%$target_vendor%g
5818s%@target_os@%$target_os%g
5819s%@build@%$build%g
5820s%@build_alias@%$build_alias%g
5821s%@build_cpu@%$build_cpu%g
5822s%@build_vendor@%$build_vendor%g
5823s%@build_os@%$build_os%g
5824s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5825s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5826s%@INSTALL_DATA@%$INSTALL_DATA%g
5827s%@PACKAGE@%$PACKAGE%g
5828s%@VERSION@%$VERSION%g
5829s%@ACLOCAL@%$ACLOCAL%g
5830s%@AUTOCONF@%$AUTOCONF%g
5831s%@AUTOMAKE@%$AUTOMAKE%g
5832s%@AUTOHEADER@%$AUTOHEADER%g
5833s%@MAKEINFO@%$MAKEINFO%g
5834s%@SET_MAKE@%$SET_MAKE%g
5835s%@RANLIB@%$RANLIB%g
5836s%@CC@%$CC%g
5837s%@LD@%$LD%g
5838s%@NM@%$NM%g
bedf545c 5839s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g
252b5132 5840s%@LN_S@%$LN_S%g
252b5132
RH
5841s%@DLLTOOL@%$DLLTOOL%g
5842s%@AS@%$AS%g
bedf545c 5843s%@LIBTOOL@%$LIBTOOL%g
252b5132
RH
5844s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
5845s%@extra_objects@%$extra_objects%g
5846s%@target_cpu_type@%$target_cpu_type%g
5847s%@obj_format@%$obj_format%g
5848s%@te_file@%$te_file%g
5849s%@install_tooldir@%$install_tooldir%g
5850s%@atof@%$atof%g
5851s%@BFDLIB@%$BFDLIB%g
5852s%@OPCODES_LIB@%$OPCODES_LIB%g
5853s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
5854s%@YACC@%$YACC%g
5855s%@LEX@%$LEX%g
5856s%@LEXLIB@%$LEXLIB%g
5857s%@CPP@%$CPP%g
5858s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5859s%@ALLOCA@%$ALLOCA%g
5860s%@USE_NLS@%$USE_NLS%g
5861s%@MSGFMT@%$MSGFMT%g
5862s%@GMSGFMT@%$GMSGFMT%g
5863s%@XGETTEXT@%$XGETTEXT%g
5864s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5865s%@CATALOGS@%$CATALOGS%g
5866s%@CATOBJEXT@%$CATOBJEXT%g
5867s%@DATADIRNAME@%$DATADIRNAME%g
5868s%@GMOFILES@%$GMOFILES%g
5869s%@INSTOBJEXT@%$INSTOBJEXT%g
5870s%@INTLDEPS@%$INTLDEPS%g
5871s%@INTLLIBS@%$INTLLIBS%g
5872s%@INTLOBJS@%$INTLOBJS%g
5873s%@POFILES@%$POFILES%g
5874s%@POSUB@%$POSUB%g
5875s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5876s%@GT_NO@%$GT_NO%g
5877s%@GT_YES@%$GT_YES%g
5878s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5879s%@l@%$l%g
5880s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5881s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5882s%@MAINT@%$MAINT%g
5883s%@EXEEXT@%$EXEEXT%g
5884
5885CEOF
5886EOF
5887
5888cat >> $CONFIG_STATUS <<\EOF
5889
5890# Split the substitutions into bite-sized pieces for seds with
5891# small command number limits, like on Digital OSF/1 and HP-UX.
5892ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5893ac_file=1 # Number of current file.
5894ac_beg=1 # First line for current file.
5895ac_end=$ac_max_sed_cmds # Line after last line for current file.
5896ac_more_lines=:
5897ac_sed_cmds=""
5898while $ac_more_lines; do
5899 if test $ac_beg -gt 1; then
5900 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5901 else
5902 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5903 fi
5904 if test ! -s conftest.s$ac_file; then
5905 ac_more_lines=false
5906 rm -f conftest.s$ac_file
5907 else
5908 if test -z "$ac_sed_cmds"; then
5909 ac_sed_cmds="sed -f conftest.s$ac_file"
5910 else
5911 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5912 fi
5913 ac_file=`expr $ac_file + 1`
5914 ac_beg=$ac_end
5915 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5916 fi
5917done
5918if test -z "$ac_sed_cmds"; then
5919 ac_sed_cmds=cat
5920fi
5921EOF
5922
5923cat >> $CONFIG_STATUS <<EOF
5924
5925CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in"}
5926EOF
5927cat >> $CONFIG_STATUS <<\EOF
5928for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5929 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5930 case "$ac_file" in
5931 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5932 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5933 *) ac_file_in="${ac_file}.in" ;;
5934 esac
5935
5936 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5937
5938 # Remove last slash and all that follows it. Not all systems have dirname.
5939 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5940 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5941 # The file is in a subdirectory.
5942 test ! -d "$ac_dir" && mkdir "$ac_dir"
5943 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5944 # A "../" for each directory in $ac_dir_suffix.
5945 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5946 else
5947 ac_dir_suffix= ac_dots=
5948 fi
5949
5950 case "$ac_given_srcdir" in
5951 .) srcdir=.
5952 if test -z "$ac_dots"; then top_srcdir=.
5953 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5954 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5955 *) # Relative path.
5956 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5957 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5958 esac
5959
5960 case "$ac_given_INSTALL" in
5961 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5962 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5963 esac
5964
5965 echo creating "$ac_file"
5966 rm -f "$ac_file"
5967 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5968 case "$ac_file" in
5969 *Makefile*) ac_comsub="1i\\
5970# $configure_input" ;;
5971 *) ac_comsub= ;;
5972 esac
5973
5974 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5975 sed -e "$ac_comsub
5976s%@configure_input@%$configure_input%g
5977s%@srcdir@%$srcdir%g
5978s%@top_srcdir@%$top_srcdir%g
5979s%@INSTALL@%$INSTALL%g
5980" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5981fi; done
5982rm -f conftest.s*
5983
5984# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5985# NAME is the cpp macro being defined and VALUE is the value it is being given.
5986#
5987# ac_d sets the value in "#define NAME VALUE" lines.
5988ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5989ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5990ac_dC='\3'
5991ac_dD='%g'
5992# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5993ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5994ac_uB='\([ ]\)%\1#\2define\3'
5995ac_uC=' '
5996ac_uD='\4%g'
5997# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5998ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5999ac_eB='$%\1#\2define\3'
6000ac_eC=' '
6001ac_eD='%g'
6002
6003if test "${CONFIG_HEADERS+set}" != set; then
6004EOF
6005cat >> $CONFIG_STATUS <<EOF
6006 CONFIG_HEADERS="config.h:config.in"
6007EOF
6008cat >> $CONFIG_STATUS <<\EOF
6009fi
6010for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6011 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6012 case "$ac_file" in
6013 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6014 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6015 *) ac_file_in="${ac_file}.in" ;;
6016 esac
6017
6018 echo creating $ac_file
6019
6020 rm -f conftest.frag conftest.in conftest.out
6021 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6022 cat $ac_file_inputs > conftest.in
6023
6024EOF
6025
6026# Transform confdefs.h into a sed script conftest.vals that substitutes
6027# the proper values into config.h.in to produce config.h. And first:
6028# Protect against being on the right side of a sed subst in config.status.
6029# Protect against being in an unquoted here document in config.status.
6030rm -f conftest.vals
6031cat > conftest.hdr <<\EOF
6032s/[\\&%]/\\&/g
6033s%[\\$`]%\\&%g
6034s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6035s%ac_d%ac_u%gp
6036s%ac_u%ac_e%gp
6037EOF
6038sed -n -f conftest.hdr confdefs.h > conftest.vals
6039rm -f conftest.hdr
6040
6041# This sed command replaces #undef with comments. This is necessary, for
6042# example, in the case of _POSIX_SOURCE, which is predefined and required
6043# on some systems where configure will not decide to define it.
6044cat >> conftest.vals <<\EOF
6045s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6046EOF
6047
6048# Break up conftest.vals because some shells have a limit on
6049# the size of here documents, and old seds have small limits too.
6050
6051rm -f conftest.tail
6052while :
6053do
6054 ac_lines=`grep -c . conftest.vals`
6055 # grep -c gives empty output for an empty file on some AIX systems.
6056 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6057 # Write a limited-size here document to conftest.frag.
6058 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6059 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6060 echo 'CEOF
6061 sed -f conftest.frag conftest.in > conftest.out
6062 rm -f conftest.in
6063 mv conftest.out conftest.in
6064' >> $CONFIG_STATUS
6065 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6066 rm -f conftest.vals
6067 mv conftest.tail conftest.vals
6068done
6069rm -f conftest.vals
6070
6071cat >> $CONFIG_STATUS <<\EOF
6072 rm -f conftest.frag conftest.h
6073 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6074 cat conftest.in >> conftest.h
6075 rm -f conftest.in
6076 if cmp -s $ac_file conftest.h 2>/dev/null; then
6077 echo "$ac_file is unchanged"
6078 rm -f conftest.h
6079 else
6080 # Remove last slash and all that follows it. Not all systems have dirname.
6081 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6082 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6083 # The file is in a subdirectory.
6084 test ! -d "$ac_dir" && mkdir "$ac_dir"
6085 fi
6086 rm -f $ac_file
6087 mv conftest.h $ac_file
6088 fi
6089fi; done
6090
6091EOF
6092cat >> $CONFIG_STATUS <<EOF
6093
6094target_cpu_type=${target_cpu_type}
6095 cgen_cpu_prefix=${cgen_cpu_prefix}
6096 obj_format=${obj_format}
6097 te_file=${te_file}
6098EOF
6099cat >> $CONFIG_STATUS <<\EOF
6100test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6101rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
6102 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
6103 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
6104 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
6105 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
6106 if test "x$cgen_cpu_prefix" != x ; then
6107 echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
6108 fi
6109
6110 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
6111exit 0
6112EOF
6113chmod +x $CONFIG_STATUS
6114rm -fr confdefs* $ac_clean_files
6115test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6116
This page took 0.387963 seconds and 4 git commands to generate.