source: trunk/src/binutils/gas/configure@ 144

Last change on this file since 144 was 101, checked in by bird, 22 years ago

Regenerated configure scripts.

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