2000-02-27 Thomas de Lellis <tdel@windriver.com>
[binutils.git] / gas / configure
blobe7d4901914509a732e12b8ed1ccb71efd784f7b2
1 #! /bin/sh
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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-shared[=PKGS] build shared libraries [default=yes]"
16 ac_help="$ac_help
17 --enable-static[=PKGS] build static libraries [default=yes]"
18 ac_help="$ac_help
19 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23 --disable-libtool-lock avoid locking (might break parallel builds)"
24 ac_help="$ac_help
25 --enable-bfd-assembler use BFD back end for writing object files"
26 ac_help="$ac_help
27 targets alternative target configurations besides the primary"
28 ac_help="$ac_help
29 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
30 ac_help="$ac_help
31 --disable-nls do not use Native Language Support"
32 ac_help="$ac_help
33 --with-included-gettext use the GNU gettext library included here"
34 ac_help="$ac_help
35 --enable-maintainer-mode enable make rules and dependencies not useful
36 (and sometimes confusing) to the casual installer"
38 # Initialize some variables set by options.
39 # The variables have the same names as the options, with
40 # dashes changed to underlines.
41 build=NONE
42 cache_file=./config.cache
43 exec_prefix=NONE
44 host=NONE
45 no_create=
46 nonopt=NONE
47 no_recursion=
48 prefix=NONE
49 program_prefix=NONE
50 program_suffix=NONE
51 program_transform_name=s,x,x,
52 silent=
53 site=
54 sitefile=
55 srcdir=
56 target=NONE
57 verbose=
58 x_includes=NONE
59 x_libraries=NONE
60 bindir='${exec_prefix}/bin'
61 sbindir='${exec_prefix}/sbin'
62 libexecdir='${exec_prefix}/libexec'
63 datadir='${prefix}/share'
64 sysconfdir='${prefix}/etc'
65 sharedstatedir='${prefix}/com'
66 localstatedir='${prefix}/var'
67 libdir='${exec_prefix}/lib'
68 includedir='${prefix}/include'
69 oldincludedir='/usr/include'
70 infodir='${prefix}/info'
71 mandir='${prefix}/man'
73 # Initialize some other variables.
74 subdirs=
75 MFLAGS= MAKEFLAGS=
76 SHELL=${CONFIG_SHELL-/bin/sh}
77 # Maximum number of lines to put in a shell here document.
78 ac_max_here_lines=12
80 ac_prev=
81 for ac_option
84 # If the previous option needs an argument, assign it.
85 if test -n "$ac_prev"; then
86 eval "$ac_prev=\$ac_option"
87 ac_prev=
88 continue
91 case "$ac_option" in
92 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
93 *) ac_optarg= ;;
94 esac
96 # Accept the important Cygnus configure options, so we can diagnose typos.
98 case "$ac_option" in
100 -bindir | --bindir | --bindi | --bind | --bin | --bi)
101 ac_prev=bindir ;;
102 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
103 bindir="$ac_optarg" ;;
105 -build | --build | --buil | --bui | --bu)
106 ac_prev=build ;;
107 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
108 build="$ac_optarg" ;;
110 -cache-file | --cache-file | --cache-fil | --cache-fi \
111 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
112 ac_prev=cache_file ;;
113 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
114 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
115 cache_file="$ac_optarg" ;;
117 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
118 ac_prev=datadir ;;
119 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
120 | --da=*)
121 datadir="$ac_optarg" ;;
123 -disable-* | --disable-*)
124 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
125 # Reject names that are not valid shell variable names.
126 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
127 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130 eval "enable_${ac_feature}=no" ;;
132 -enable-* | --enable-*)
133 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
134 # Reject names that are not valid shell variable names.
135 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
136 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
138 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
139 case "$ac_option" in
140 *=*) ;;
141 *) ac_optarg=yes ;;
142 esac
143 eval "enable_${ac_feature}='$ac_optarg'" ;;
145 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
146 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
147 | --exec | --exe | --ex)
148 ac_prev=exec_prefix ;;
149 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
150 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
151 | --exec=* | --exe=* | --ex=*)
152 exec_prefix="$ac_optarg" ;;
154 -gas | --gas | --ga | --g)
155 # Obsolete; use --with-gas.
156 with_gas=yes ;;
158 -help | --help | --hel | --he)
159 # Omit some internal or obsolete options to make the list less imposing.
160 # This message is too long to be a string in the A/UX 3.1 sh.
161 cat << EOF
162 Usage: configure [options] [host]
163 Options: [defaults in brackets after descriptions]
164 Configuration:
165 --cache-file=FILE cache test results in FILE
166 --help print this message
167 --no-create do not create output files
168 --quiet, --silent do not print \`checking...' messages
169 --site-file=FILE use FILE as the site file
170 --version print the version of autoconf that created configure
171 Directory and file names:
172 --prefix=PREFIX install architecture-independent files in PREFIX
173 [$ac_default_prefix]
174 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
175 [same as prefix]
176 --bindir=DIR user executables in DIR [EPREFIX/bin]
177 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
178 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
179 --datadir=DIR read-only architecture-independent data in DIR
180 [PREFIX/share]
181 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
182 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 [PREFIX/com]
184 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
185 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
186 --includedir=DIR C header files in DIR [PREFIX/include]
187 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
188 --infodir=DIR info documentation in DIR [PREFIX/info]
189 --mandir=DIR man documentation in DIR [PREFIX/man]
190 --srcdir=DIR find the sources in DIR [configure dir or ..]
191 --program-prefix=PREFIX prepend PREFIX to installed program names
192 --program-suffix=SUFFIX append SUFFIX to installed program names
193 --program-transform-name=PROGRAM
194 run sed PROGRAM on installed program names
196 cat << EOF
197 Host type:
198 --build=BUILD configure for building on BUILD [BUILD=HOST]
199 --host=HOST configure for HOST [guessed]
200 --target=TARGET configure for TARGET [TARGET=HOST]
201 Features and packages:
202 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
203 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
204 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
205 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
206 --x-includes=DIR X include files are in DIR
207 --x-libraries=DIR X library files are in DIR
209 if test -n "$ac_help"; then
210 echo "--enable and --with options recognized:$ac_help"
212 exit 0 ;;
214 -host | --host | --hos | --ho)
215 ac_prev=host ;;
216 -host=* | --host=* | --hos=* | --ho=*)
217 host="$ac_optarg" ;;
219 -includedir | --includedir | --includedi | --included | --include \
220 | --includ | --inclu | --incl | --inc)
221 ac_prev=includedir ;;
222 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223 | --includ=* | --inclu=* | --incl=* | --inc=*)
224 includedir="$ac_optarg" ;;
226 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 ac_prev=infodir ;;
228 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229 infodir="$ac_optarg" ;;
231 -libdir | --libdir | --libdi | --libd)
232 ac_prev=libdir ;;
233 -libdir=* | --libdir=* | --libdi=* | --libd=*)
234 libdir="$ac_optarg" ;;
236 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237 | --libexe | --libex | --libe)
238 ac_prev=libexecdir ;;
239 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240 | --libexe=* | --libex=* | --libe=*)
241 libexecdir="$ac_optarg" ;;
243 -localstatedir | --localstatedir | --localstatedi | --localstated \
244 | --localstate | --localstat | --localsta | --localst \
245 | --locals | --local | --loca | --loc | --lo)
246 ac_prev=localstatedir ;;
247 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250 localstatedir="$ac_optarg" ;;
252 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 ac_prev=mandir ;;
254 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255 mandir="$ac_optarg" ;;
257 -nfp | --nfp | --nf)
258 # Obsolete; use --without-fp.
259 with_fp=no ;;
261 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262 | --no-cr | --no-c)
263 no_create=yes ;;
265 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267 no_recursion=yes ;;
269 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271 | --oldin | --oldi | --old | --ol | --o)
272 ac_prev=oldincludedir ;;
273 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276 oldincludedir="$ac_optarg" ;;
278 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 ac_prev=prefix ;;
280 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281 prefix="$ac_optarg" ;;
283 -program-prefix | --program-prefix | --program-prefi | --program-pref \
284 | --program-pre | --program-pr | --program-p)
285 ac_prev=program_prefix ;;
286 -program-prefix=* | --program-prefix=* | --program-prefi=* \
287 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288 program_prefix="$ac_optarg" ;;
290 -program-suffix | --program-suffix | --program-suffi | --program-suff \
291 | --program-suf | --program-su | --program-s)
292 ac_prev=program_suffix ;;
293 -program-suffix=* | --program-suffix=* | --program-suffi=* \
294 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295 program_suffix="$ac_optarg" ;;
297 -program-transform-name | --program-transform-name \
298 | --program-transform-nam | --program-transform-na \
299 | --program-transform-n | --program-transform- \
300 | --program-transform | --program-transfor \
301 | --program-transfo | --program-transf \
302 | --program-trans | --program-tran \
303 | --progr-tra | --program-tr | --program-t)
304 ac_prev=program_transform_name ;;
305 -program-transform-name=* | --program-transform-name=* \
306 | --program-transform-nam=* | --program-transform-na=* \
307 | --program-transform-n=* | --program-transform-=* \
308 | --program-transform=* | --program-transfor=* \
309 | --program-transfo=* | --program-transf=* \
310 | --program-trans=* | --program-tran=* \
311 | --progr-tra=* | --program-tr=* | --program-t=*)
312 program_transform_name="$ac_optarg" ;;
314 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315 | -silent | --silent | --silen | --sile | --sil)
316 silent=yes ;;
318 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 ac_prev=sbindir ;;
320 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 | --sbi=* | --sb=*)
322 sbindir="$ac_optarg" ;;
324 -sharedstatedir | --sharedstatedir | --sharedstatedi \
325 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326 | --sharedst | --shareds | --shared | --share | --shar \
327 | --sha | --sh)
328 ac_prev=sharedstatedir ;;
329 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 | --sha=* | --sh=*)
333 sharedstatedir="$ac_optarg" ;;
335 -site | --site | --sit)
336 ac_prev=site ;;
337 -site=* | --site=* | --sit=*)
338 site="$ac_optarg" ;;
340 -site-file | --site-file | --site-fil | --site-fi | --site-f)
341 ac_prev=sitefile ;;
342 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
343 sitefile="$ac_optarg" ;;
345 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
346 ac_prev=srcdir ;;
347 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
348 srcdir="$ac_optarg" ;;
350 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
351 | --syscon | --sysco | --sysc | --sys | --sy)
352 ac_prev=sysconfdir ;;
353 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
354 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
355 sysconfdir="$ac_optarg" ;;
357 -target | --target | --targe | --targ | --tar | --ta | --t)
358 ac_prev=target ;;
359 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
360 target="$ac_optarg" ;;
362 -v | -verbose | --verbose | --verbos | --verbo | --verb)
363 verbose=yes ;;
365 -version | --version | --versio | --versi | --vers)
366 echo "configure generated by autoconf version 2.13"
367 exit 0 ;;
369 -with-* | --with-*)
370 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
371 # Reject names that are not valid shell variable names.
372 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 case "$ac_option" in
377 *=*) ;;
378 *) ac_optarg=yes ;;
379 esac
380 eval "with_${ac_package}='$ac_optarg'" ;;
382 -without-* | --without-*)
383 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
384 # Reject names that are not valid shell variable names.
385 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
386 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
388 ac_package=`echo $ac_package| sed 's/-/_/g'`
389 eval "with_${ac_package}=no" ;;
391 --x)
392 # Obsolete; use --with-x.
393 with_x=yes ;;
395 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
396 | --x-incl | --x-inc | --x-in | --x-i)
397 ac_prev=x_includes ;;
398 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
399 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
400 x_includes="$ac_optarg" ;;
402 -x-libraries | --x-libraries | --x-librarie | --x-librari \
403 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
404 ac_prev=x_libraries ;;
405 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
406 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
407 x_libraries="$ac_optarg" ;;
409 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
413 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
414 echo "configure: warning: $ac_option: invalid host type" 1>&2
416 if test "x$nonopt" != xNONE; then
417 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
419 nonopt="$ac_option"
422 esac
423 done
425 if test -n "$ac_prev"; then
426 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
429 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
431 # File descriptor usage:
432 # 0 standard input
433 # 1 file creation
434 # 2 errors and warnings
435 # 3 some systems may open it to /dev/tty
436 # 4 used on the Kubota Titan
437 # 6 checking for... messages and results
438 # 5 compiler messages saved in config.log
439 if test "$silent" = yes; then
440 exec 6>/dev/null
441 else
442 exec 6>&1
444 exec 5>./config.log
446 echo "\
447 This file contains any messages produced by compilers while
448 running configure, to aid debugging if configure makes a mistake.
449 " 1>&5
451 # Strip out --no-create and --no-recursion so they do not pile up.
452 # Also quote any args containing shell metacharacters.
453 ac_configure_args=
454 for ac_arg
456 case "$ac_arg" in
457 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
458 | --no-cr | --no-c) ;;
459 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
460 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
461 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
462 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
463 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
464 esac
465 done
467 # NLS nuisances.
468 # Only set these to C if already set. These must not be set unconditionally
469 # because not all systems understand e.g. LANG=C (notably SCO).
470 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
471 # Non-C LC_CTYPE values break the ctype check.
472 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
473 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
474 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
475 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
477 # confdefs.h avoids OS command line length limits that DEFS can exceed.
478 rm -rf conftest* confdefs.h
479 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
480 echo > confdefs.h
482 # A filename unique to this package, relative to the directory that
483 # configure is in, which we can look for to find out if srcdir is correct.
484 ac_unique_file=as.h
486 # Find the source files, if location was not specified.
487 if test -z "$srcdir"; then
488 ac_srcdir_defaulted=yes
489 # Try the directory containing this script, then its parent.
490 ac_prog=$0
491 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
492 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
493 srcdir=$ac_confdir
494 if test ! -r $srcdir/$ac_unique_file; then
495 srcdir=..
497 else
498 ac_srcdir_defaulted=no
500 if test ! -r $srcdir/$ac_unique_file; then
501 if test "$ac_srcdir_defaulted" = yes; then
502 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
503 else
504 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
507 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
509 # Prefer explicitly selected file to automatically selected ones.
510 if test -z "$sitefile"; then
511 if test -z "$CONFIG_SITE"; then
512 if test "x$prefix" != xNONE; then
513 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
514 else
515 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
518 else
519 CONFIG_SITE="$sitefile"
521 for ac_site_file in $CONFIG_SITE; do
522 if test -r "$ac_site_file"; then
523 echo "loading site script $ac_site_file"
524 . "$ac_site_file"
526 done
528 if test -r "$cache_file"; then
529 echo "loading cache $cache_file"
530 . $cache_file
531 else
532 echo "creating cache $cache_file"
533 > $cache_file
536 ac_ext=c
537 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
538 ac_cpp='$CPP $CPPFLAGS'
539 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
540 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
541 cross_compiling=$ac_cv_prog_cc_cross
543 ac_exeext=
544 ac_objext=o
545 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
546 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
547 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
548 ac_n= ac_c='
549 ' ac_t=' '
550 else
551 ac_n=-n ac_c= ac_t=
553 else
554 ac_n= ac_c='\c' ac_t=
559 ac_aux_dir=
560 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
561 if test -f $ac_dir/install-sh; then
562 ac_aux_dir=$ac_dir
563 ac_install_sh="$ac_aux_dir/install-sh -c"
564 break
565 elif test -f $ac_dir/install.sh; then
566 ac_aux_dir=$ac_dir
567 ac_install_sh="$ac_aux_dir/install.sh -c"
568 break
570 done
571 if test -z "$ac_aux_dir"; then
572 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
574 ac_config_guess=$ac_aux_dir/config.guess
575 ac_config_sub=$ac_aux_dir/config.sub
576 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
579 # Do some error checking and defaulting for the host and target type.
580 # The inputs are:
581 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
583 # The rules are:
584 # 1. You are not allowed to specify --host, --target, and nonopt at the
585 # same time.
586 # 2. Host defaults to nonopt.
587 # 3. If nonopt is not specified, then host defaults to the current host,
588 # as determined by config.guess.
589 # 4. Target and build default to nonopt.
590 # 5. If nonopt is not specified, then target and build default to host.
592 # The aliases save the names the user supplied, while $host etc.
593 # will get canonicalized.
594 case $host---$target---$nonopt in
595 NONE---*---* | *---NONE---* | *---*---NONE) ;;
596 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
597 esac
600 # Make sure we can run config.sub.
601 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
602 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
605 echo $ac_n "checking host system type""... $ac_c" 1>&6
606 echo "configure:607: checking host system type" >&5
608 host_alias=$host
609 case "$host_alias" in
610 NONE)
611 case $nonopt in
612 NONE)
613 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
614 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
615 fi ;;
616 *) host_alias=$nonopt ;;
617 esac ;;
618 esac
620 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
621 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
622 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
623 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
624 echo "$ac_t""$host" 1>&6
626 echo $ac_n "checking target system type""... $ac_c" 1>&6
627 echo "configure:628: checking target system type" >&5
629 target_alias=$target
630 case "$target_alias" in
631 NONE)
632 case $nonopt in
633 NONE) target_alias=$host_alias ;;
634 *) target_alias=$nonopt ;;
635 esac ;;
636 esac
638 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
639 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
640 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
641 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
642 echo "$ac_t""$target" 1>&6
644 echo $ac_n "checking build system type""... $ac_c" 1>&6
645 echo "configure:646: checking build system type" >&5
647 build_alias=$build
648 case "$build_alias" in
649 NONE)
650 case $nonopt in
651 NONE) build_alias=$host_alias ;;
652 *) build_alias=$nonopt ;;
653 esac ;;
654 esac
656 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
657 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
658 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
659 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
660 echo "$ac_t""$build" 1>&6
662 test "$host_alias" != "$target_alias" &&
663 test "$program_prefix$program_suffix$program_transform_name" = \
664 NONENONEs,x,x, &&
665 program_prefix=${target_alias}-
668 # Find a good install program. We prefer a C program (faster),
669 # so one script is as good as another. But avoid the broken or
670 # incompatible versions:
671 # SysV /etc/install, /usr/sbin/install
672 # SunOS /usr/etc/install
673 # IRIX /sbin/install
674 # AIX /bin/install
675 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
676 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
677 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
678 # ./install, which can be erroneously created by make from ./install.sh.
679 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
680 echo "configure:681: checking for a BSD compatible install" >&5
681 if test -z "$INSTALL"; then
682 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
683 echo $ac_n "(cached) $ac_c" 1>&6
684 else
685 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
686 for ac_dir in $PATH; do
687 # Account for people who put trailing slashes in PATH elements.
688 case "$ac_dir/" in
689 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
691 # OSF1 and SCO ODT 3.0 have their own names for install.
692 # Don't use installbsd from OSF since it installs stuff as root
693 # by default.
694 for ac_prog in ginstall scoinst install; do
695 if test -f $ac_dir/$ac_prog; then
696 if test $ac_prog = install &&
697 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
698 # AIX install. It has an incompatible calling convention.
700 else
701 ac_cv_path_install="$ac_dir/$ac_prog -c"
702 break 2
705 done
707 esac
708 done
709 IFS="$ac_save_IFS"
712 if test "${ac_cv_path_install+set}" = set; then
713 INSTALL="$ac_cv_path_install"
714 else
715 # As a last resort, use the slow shell script. We don't cache a
716 # path for INSTALL within a source directory, because that will
717 # break other packages using the cache if that directory is
718 # removed, or if the path is relative.
719 INSTALL="$ac_install_sh"
722 echo "$ac_t""$INSTALL" 1>&6
724 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
725 # It thinks the first close brace ends the variable substitution.
726 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
728 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
730 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
732 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
733 echo "configure:734: checking whether build environment is sane" >&5
734 # Just in case
735 sleep 1
736 echo timestamp > conftestfile
737 # Do `set' in a subshell so we don't clobber the current shell's
738 # arguments. Must try -L first in case configure is actually a
739 # symlink; some systems play weird games with the mod time of symlinks
740 # (eg FreeBSD returns the mod time of the symlink's containing
741 # directory).
742 if (
743 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
744 if test "$*" = "X"; then
745 # -L didn't work.
746 set X `ls -t $srcdir/configure conftestfile`
748 if test "$*" != "X $srcdir/configure conftestfile" \
749 && test "$*" != "X conftestfile $srcdir/configure"; then
751 # If neither matched, then we have a broken ls. This can happen
752 # if, for instance, CONFIG_SHELL is bash and it inherits a
753 # broken ls alias from the environment. This has actually
754 # happened. Such a system could not be considered "sane".
755 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
756 alias in your environment" 1>&2; exit 1; }
759 test "$2" = conftestfile
761 then
762 # Ok.
764 else
765 { echo "configure: error: newly created file is older than distributed files!
766 Check your system clock" 1>&2; exit 1; }
768 rm -f conftest*
769 echo "$ac_t""yes" 1>&6
770 if test "$program_transform_name" = s,x,x,; then
771 program_transform_name=
772 else
773 # Double any \ or $. echo might interpret backslashes.
774 cat <<\EOF_SED > conftestsed
775 s,\\,\\\\,g; s,\$,$$,g
776 EOF_SED
777 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
778 rm -f conftestsed
780 test "$program_prefix" != NONE &&
781 program_transform_name="s,^,${program_prefix},; $program_transform_name"
782 # Use a double $ so make ignores it.
783 test "$program_suffix" != NONE &&
784 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
786 # sed with no file args requires a program.
787 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
789 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
790 echo "configure:791: checking whether ${MAKE-make} sets \${MAKE}" >&5
791 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
792 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
793 echo $ac_n "(cached) $ac_c" 1>&6
794 else
795 cat > conftestmake <<\EOF
796 all:
797 @echo 'ac_maketemp="${MAKE}"'
799 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
800 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
801 if test -n "$ac_maketemp"; then
802 eval ac_cv_prog_make_${ac_make}_set=yes
803 else
804 eval ac_cv_prog_make_${ac_make}_set=no
806 rm -f conftestmake
808 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
809 echo "$ac_t""yes" 1>&6
810 SET_MAKE=
811 else
812 echo "$ac_t""no" 1>&6
813 SET_MAKE="MAKE=${MAKE-make}"
817 PACKAGE=gas
819 VERSION=2.9.5
821 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
822 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
824 cat >> confdefs.h <<EOF
825 #define PACKAGE "$PACKAGE"
828 cat >> confdefs.h <<EOF
829 #define VERSION "$VERSION"
834 missing_dir=`cd $ac_aux_dir && pwd`
835 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
836 echo "configure:837: checking for working aclocal" >&5
837 # Run test in a subshell; some versions of sh will print an error if
838 # an executable is not found, even if stderr is redirected.
839 # Redirect stdin to placate older versions of autoconf. Sigh.
840 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
841 ACLOCAL=aclocal
842 echo "$ac_t""found" 1>&6
843 else
844 ACLOCAL="$missing_dir/missing aclocal"
845 echo "$ac_t""missing" 1>&6
848 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
849 echo "configure:850: checking for working autoconf" >&5
850 # Run test in a subshell; some versions of sh will print an error if
851 # an executable is not found, even if stderr is redirected.
852 # Redirect stdin to placate older versions of autoconf. Sigh.
853 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
854 AUTOCONF=autoconf
855 echo "$ac_t""found" 1>&6
856 else
857 AUTOCONF="$missing_dir/missing autoconf"
858 echo "$ac_t""missing" 1>&6
861 echo $ac_n "checking for working automake""... $ac_c" 1>&6
862 echo "configure:863: checking for working automake" >&5
863 # Run test in a subshell; some versions of sh will print an error if
864 # an executable is not found, even if stderr is redirected.
865 # Redirect stdin to placate older versions of autoconf. Sigh.
866 if (automake --version) < /dev/null > /dev/null 2>&1; then
867 AUTOMAKE=automake
868 echo "$ac_t""found" 1>&6
869 else
870 AUTOMAKE="$missing_dir/missing automake"
871 echo "$ac_t""missing" 1>&6
874 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
875 echo "configure:876: checking for working autoheader" >&5
876 # Run test in a subshell; some versions of sh will print an error if
877 # an executable is not found, even if stderr is redirected.
878 # Redirect stdin to placate older versions of autoconf. Sigh.
879 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
880 AUTOHEADER=autoheader
881 echo "$ac_t""found" 1>&6
882 else
883 AUTOHEADER="$missing_dir/missing autoheader"
884 echo "$ac_t""missing" 1>&6
887 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
888 echo "configure:889: checking for working makeinfo" >&5
889 # Run test in a subshell; some versions of sh will print an error if
890 # an executable is not found, even if stderr is redirected.
891 # Redirect stdin to placate older versions of autoconf. Sigh.
892 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
893 MAKEINFO=makeinfo
894 echo "$ac_t""found" 1>&6
895 else
896 MAKEINFO="$missing_dir/missing makeinfo"
897 echo "$ac_t""missing" 1>&6
902 # Check whether --enable-shared or --disable-shared was given.
903 if test "${enable_shared+set}" = set; then
904 enableval="$enable_shared"
905 p=${PACKAGE-default}
906 case "$enableval" in
907 yes) enable_shared=yes ;;
908 no) enable_shared=no ;;
910 enable_shared=no
911 # Look at the argument we got. We use all the common list separators.
912 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
913 for pkg in $enableval; do
914 if test "X$pkg" = "X$p"; then
915 enable_shared=yes
917 done
918 IFS="$ac_save_ifs"
920 esac
921 else
922 enable_shared=yes
925 # Check whether --enable-static or --disable-static was given.
926 if test "${enable_static+set}" = set; then
927 enableval="$enable_static"
928 p=${PACKAGE-default}
929 case "$enableval" in
930 yes) enable_static=yes ;;
931 no) enable_static=no ;;
933 enable_static=no
934 # Look at the argument we got. We use all the common list separators.
935 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
936 for pkg in $enableval; do
937 if test "X$pkg" = "X$p"; then
938 enable_static=yes
940 done
941 IFS="$ac_save_ifs"
943 esac
944 else
945 enable_static=yes
948 # Check whether --enable-fast-install or --disable-fast-install was given.
949 if test "${enable_fast_install+set}" = set; then
950 enableval="$enable_fast_install"
951 p=${PACKAGE-default}
952 case "$enableval" in
953 yes) enable_fast_install=yes ;;
954 no) enable_fast_install=no ;;
956 enable_fast_install=no
957 # Look at the argument we got. We use all the common list separators.
958 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
959 for pkg in $enableval; do
960 if test "X$pkg" = "X$p"; then
961 enable_fast_install=yes
963 done
964 IFS="$ac_save_ifs"
966 esac
967 else
968 enable_fast_install=yes
971 # Extract the first word of "ranlib", so it can be a program name with args.
972 set dummy ranlib; ac_word=$2
973 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
974 echo "configure:975: checking for $ac_word" >&5
975 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
976 echo $ac_n "(cached) $ac_c" 1>&6
977 else
978 if test -n "$RANLIB"; then
979 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
980 else
981 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
982 ac_dummy="$PATH"
983 for ac_dir in $ac_dummy; do
984 test -z "$ac_dir" && ac_dir=.
985 if test -f $ac_dir/$ac_word; then
986 ac_cv_prog_RANLIB="ranlib"
987 break
989 done
990 IFS="$ac_save_ifs"
991 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
994 RANLIB="$ac_cv_prog_RANLIB"
995 if test -n "$RANLIB"; then
996 echo "$ac_t""$RANLIB" 1>&6
997 else
998 echo "$ac_t""no" 1>&6
1001 # Extract the first word of "gcc", so it can be a program name with args.
1002 set dummy gcc; ac_word=$2
1003 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1004 echo "configure:1005: checking for $ac_word" >&5
1005 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1006 echo $ac_n "(cached) $ac_c" 1>&6
1007 else
1008 if test -n "$CC"; then
1009 ac_cv_prog_CC="$CC" # Let the user override the test.
1010 else
1011 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1012 ac_dummy="$PATH"
1013 for ac_dir in $ac_dummy; do
1014 test -z "$ac_dir" && ac_dir=.
1015 if test -f $ac_dir/$ac_word; then
1016 ac_cv_prog_CC="gcc"
1017 break
1019 done
1020 IFS="$ac_save_ifs"
1023 CC="$ac_cv_prog_CC"
1024 if test -n "$CC"; then
1025 echo "$ac_t""$CC" 1>&6
1026 else
1027 echo "$ac_t""no" 1>&6
1030 if test -z "$CC"; then
1031 # Extract the first word of "cc", so it can be a program name with args.
1032 set dummy cc; ac_word=$2
1033 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1034 echo "configure:1035: checking for $ac_word" >&5
1035 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1036 echo $ac_n "(cached) $ac_c" 1>&6
1037 else
1038 if test -n "$CC"; then
1039 ac_cv_prog_CC="$CC" # Let the user override the test.
1040 else
1041 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1042 ac_prog_rejected=no
1043 ac_dummy="$PATH"
1044 for ac_dir in $ac_dummy; do
1045 test -z "$ac_dir" && ac_dir=.
1046 if test -f $ac_dir/$ac_word; then
1047 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1048 ac_prog_rejected=yes
1049 continue
1051 ac_cv_prog_CC="cc"
1052 break
1054 done
1055 IFS="$ac_save_ifs"
1056 if test $ac_prog_rejected = yes; then
1057 # We found a bogon in the path, so make sure we never use it.
1058 set dummy $ac_cv_prog_CC
1059 shift
1060 if test $# -gt 0; then
1061 # We chose a different compiler from the bogus one.
1062 # However, it has the same basename, so the bogon will be chosen
1063 # first if we set CC to just the basename; use the full file name.
1064 shift
1065 set dummy "$ac_dir/$ac_word" "$@"
1066 shift
1067 ac_cv_prog_CC="$@"
1072 CC="$ac_cv_prog_CC"
1073 if test -n "$CC"; then
1074 echo "$ac_t""$CC" 1>&6
1075 else
1076 echo "$ac_t""no" 1>&6
1079 if test -z "$CC"; then
1080 case "`uname -s`" in
1081 *win32* | *WIN32*)
1082 # Extract the first word of "cl", so it can be a program name with args.
1083 set dummy cl; ac_word=$2
1084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1085 echo "configure:1086: checking for $ac_word" >&5
1086 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1087 echo $ac_n "(cached) $ac_c" 1>&6
1088 else
1089 if test -n "$CC"; then
1090 ac_cv_prog_CC="$CC" # Let the user override the test.
1091 else
1092 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1093 ac_dummy="$PATH"
1094 for ac_dir in $ac_dummy; do
1095 test -z "$ac_dir" && ac_dir=.
1096 if test -f $ac_dir/$ac_word; then
1097 ac_cv_prog_CC="cl"
1098 break
1100 done
1101 IFS="$ac_save_ifs"
1104 CC="$ac_cv_prog_CC"
1105 if test -n "$CC"; then
1106 echo "$ac_t""$CC" 1>&6
1107 else
1108 echo "$ac_t""no" 1>&6
1111 esac
1113 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1116 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1117 echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1119 ac_ext=c
1120 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1121 ac_cpp='$CPP $CPPFLAGS'
1122 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1123 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1124 cross_compiling=$ac_cv_prog_cc_cross
1126 cat > conftest.$ac_ext << EOF
1128 #line 1129 "configure"
1129 #include "confdefs.h"
1131 main(){return(0);}
1133 if { (eval echo configure:1134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1134 ac_cv_prog_cc_works=yes
1135 # If we can't run a trivial program, we are probably using a cross compiler.
1136 if (./conftest; exit) 2>/dev/null; then
1137 ac_cv_prog_cc_cross=no
1138 else
1139 ac_cv_prog_cc_cross=yes
1141 else
1142 echo "configure: failed program was:" >&5
1143 cat conftest.$ac_ext >&5
1144 ac_cv_prog_cc_works=no
1146 rm -fr conftest*
1147 ac_ext=c
1148 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1149 ac_cpp='$CPP $CPPFLAGS'
1150 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1151 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1152 cross_compiling=$ac_cv_prog_cc_cross
1154 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1155 if test $ac_cv_prog_cc_works = no; then
1156 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1158 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1159 echo "configure:1160: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1160 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1161 cross_compiling=$ac_cv_prog_cc_cross
1163 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1164 echo "configure:1165: checking whether we are using GNU C" >&5
1165 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167 else
1168 cat > conftest.c <<EOF
1169 #ifdef __GNUC__
1170 yes;
1171 #endif
1173 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1174 ac_cv_prog_gcc=yes
1175 else
1176 ac_cv_prog_gcc=no
1180 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1182 if test $ac_cv_prog_gcc = yes; then
1183 GCC=yes
1184 else
1185 GCC=
1188 ac_test_CFLAGS="${CFLAGS+set}"
1189 ac_save_CFLAGS="$CFLAGS"
1190 CFLAGS=
1191 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1192 echo "configure:1193: checking whether ${CC-cc} accepts -g" >&5
1193 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1194 echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196 echo 'void f(){}' > conftest.c
1197 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1198 ac_cv_prog_cc_g=yes
1199 else
1200 ac_cv_prog_cc_g=no
1202 rm -f conftest*
1206 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1207 if test "$ac_test_CFLAGS" = set; then
1208 CFLAGS="$ac_save_CFLAGS"
1209 elif test $ac_cv_prog_cc_g = yes; then
1210 if test "$GCC" = yes; then
1211 CFLAGS="-g -O2"
1212 else
1213 CFLAGS="-g"
1215 else
1216 if test "$GCC" = yes; then
1217 CFLAGS="-O2"
1218 else
1219 CFLAGS=
1223 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1224 if test "${with_gnu_ld+set}" = set; then
1225 withval="$with_gnu_ld"
1226 test "$withval" = no || with_gnu_ld=yes
1227 else
1228 with_gnu_ld=no
1231 ac_prog=ld
1232 if test "$ac_cv_prog_gcc" = yes; then
1233 # Check if gcc -print-prog-name=ld gives a path.
1234 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1235 echo "configure:1236: checking for ld used by GCC" >&5
1236 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1237 case "$ac_prog" in
1238 # Accept absolute paths.
1239 [\\/]* | [A-Za-z]:[\\/]*)
1240 re_direlt='/[^/][^/]*/\.\./'
1241 # Canonicalize the path of ld
1242 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1243 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1244 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1245 done
1246 test -z "$LD" && LD="$ac_prog"
1249 # If it fails, then pretend we aren't using GCC.
1250 ac_prog=ld
1253 # If it is relative, then search for the first ld in PATH.
1254 with_gnu_ld=unknown
1256 esac
1257 elif test "$with_gnu_ld" = yes; then
1258 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1259 echo "configure:1260: checking for GNU ld" >&5
1260 else
1261 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1262 echo "configure:1263: checking for non-GNU ld" >&5
1264 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
1266 else
1267 if test -z "$LD"; then
1268 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1269 for ac_dir in $PATH; do
1270 test -z "$ac_dir" && ac_dir=.
1271 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1272 ac_cv_path_LD="$ac_dir/$ac_prog"
1273 # Check to see if the program is GNU ld. I'd rather use --version,
1274 # but apparently some GNU ld's only accept -v.
1275 # Break only if it was the GNU/non-GNU ld that we prefer.
1276 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1277 test "$with_gnu_ld" != no && break
1278 else
1279 test "$with_gnu_ld" != yes && break
1282 done
1283 IFS="$ac_save_ifs"
1284 else
1285 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1289 LD="$ac_cv_path_LD"
1290 if test -n "$LD"; then
1291 echo "$ac_t""$LD" 1>&6
1292 else
1293 echo "$ac_t""no" 1>&6
1295 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1296 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1297 echo "configure:1298: checking if the linker ($LD) is GNU ld" >&5
1298 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1299 echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1302 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1303 ac_cv_prog_gnu_ld=yes
1304 else
1305 ac_cv_prog_gnu_ld=no
1309 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1312 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1313 echo "configure:1314: checking for BSD-compatible nm" >&5
1314 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1315 echo $ac_n "(cached) $ac_c" 1>&6
1316 else
1317 if test -n "$NM"; then
1318 # Let the user override the test.
1319 ac_cv_path_NM="$NM"
1320 else
1321 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1322 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1323 test -z "$ac_dir" && ac_dir=.
1324 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1325 # Check to see if the nm accepts a BSD-compat flag.
1326 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1327 # nm: unknown option "B" ignored
1328 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1329 ac_cv_path_NM="$ac_dir/nm -B"
1330 break
1331 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1332 ac_cv_path_NM="$ac_dir/nm -p"
1333 break
1334 else
1335 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1336 continue # so that we can try to find one that supports BSD flags
1339 done
1340 IFS="$ac_save_ifs"
1341 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1345 NM="$ac_cv_path_NM"
1346 echo "$ac_t""$NM" 1>&6
1348 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1349 echo "configure:1350: checking whether ln -s works" >&5
1350 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1351 echo $ac_n "(cached) $ac_c" 1>&6
1352 else
1353 rm -f conftestdata
1354 if ln -s X conftestdata 2>/dev/null
1355 then
1356 rm -f conftestdata
1357 ac_cv_prog_LN_S="ln -s"
1358 else
1359 ac_cv_prog_LN_S=ln
1362 LN_S="$ac_cv_prog_LN_S"
1363 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1364 echo "$ac_t""yes" 1>&6
1365 else
1366 echo "$ac_t""no" 1>&6
1370 case "$target" in
1371 NONE) lt_target="$host" ;;
1372 *) lt_target="$target" ;;
1373 esac
1375 # Check for any special flags to pass to ltconfig.
1376 libtool_flags="--cache-file=$cache_file"
1377 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1378 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1379 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1380 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1381 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1384 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1385 if test "${enable_libtool_lock+set}" = set; then
1386 enableval="$enable_libtool_lock"
1390 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1391 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1393 # Some flags need to be propagated to the compiler or linker for good
1394 # libtool support.
1395 case "$lt_target" in
1396 *-*-irix6*)
1397 # Find out which ABI we are using.
1398 echo '#line 1399 "configure"' > conftest.$ac_ext
1399 if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1400 case "`/usr/bin/file conftest.o`" in
1401 *32-bit*)
1402 LD="${LD-ld} -32"
1404 *N32*)
1405 LD="${LD-ld} -n32"
1407 *64-bit*)
1408 LD="${LD-ld} -64"
1410 esac
1412 rm -rf conftest*
1415 *-*-sco3.2v5*)
1416 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1417 SAVE_CFLAGS="$CFLAGS"
1418 CFLAGS="$CFLAGS -belf"
1419 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1420 echo "configure:1421: checking whether the C compiler needs -belf" >&5
1421 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1422 echo $ac_n "(cached) $ac_c" 1>&6
1423 else
1424 cat > conftest.$ac_ext <<EOF
1425 #line 1426 "configure"
1426 #include "confdefs.h"
1428 int main() {
1430 ; return 0; }
1432 if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1433 rm -rf conftest*
1434 lt_cv_cc_needs_belf=yes
1435 else
1436 echo "configure: failed program was:" >&5
1437 cat conftest.$ac_ext >&5
1438 rm -rf conftest*
1439 lt_cv_cc_needs_belf=no
1441 rm -f conftest*
1444 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1445 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1446 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1447 CFLAGS="$SAVE_CFLAGS"
1452 esac
1455 # Save cache, so that ltconfig can load it
1456 cat > confcache <<\EOF
1457 # This file is a shell script that caches the results of configure
1458 # tests run on this system so they can be shared between configure
1459 # scripts and configure runs. It is not useful on other systems.
1460 # If it contains results you don't want to keep, you may remove or edit it.
1462 # By default, configure uses ./config.cache as the cache file,
1463 # creating it if it does not exist already. You can give configure
1464 # the --cache-file=FILE option to use a different cache file; that is
1465 # what configure does when it calls configure scripts in
1466 # subdirectories, so they share the cache.
1467 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1468 # config.status only pays attention to the cache file if you give it the
1469 # --recheck option to rerun configure.
1472 # The following way of writing the cache mishandles newlines in values,
1473 # but we know of no workaround that is simple, portable, and efficient.
1474 # So, don't put newlines in cache variables' values.
1475 # Ultrix sh set writes to stderr and can't be redirected directly,
1476 # and sets the high bit in the cache file unless we assign to the vars.
1477 (set) 2>&1 |
1478 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1479 *ac_space=\ *)
1480 # `set' does not quote correctly, so add quotes (double-quote substitution
1481 # turns \\\\ into \\, and sed turns \\ into \).
1482 sed -n \
1483 -e "s/'/'\\\\''/g" \
1484 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1487 # `set' quotes correctly as required by POSIX, so do not add quotes.
1488 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1490 esac >> confcache
1491 if cmp -s $cache_file confcache; then
1493 else
1494 if test -w $cache_file; then
1495 echo "updating cache $cache_file"
1496 cat confcache > $cache_file
1497 else
1498 echo "not updating unwritable cache $cache_file"
1501 rm -f confcache
1504 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1505 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1506 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1507 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1508 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1509 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1510 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1511 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1513 # Reload cache, that may have been modified by ltconfig
1514 if test -r "$cache_file"; then
1515 echo "loading cache $cache_file"
1516 . $cache_file
1517 else
1518 echo "creating cache $cache_file"
1519 > $cache_file
1523 # This can be used to rebuild libtool when needed
1524 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1526 # Always use our own libtool.
1527 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1529 # Redirect the config.log output again, so that the ltconfig log is not
1530 # clobbered by the next message.
1531 exec 5>>./config.log
1534 user_bfd_gas=
1535 # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
1536 if test "${enable_bfd_assembler+set}" = set; then
1537 enableval="$enable_bfd_assembler"
1538 case "${enableval}" in
1539 yes) need_bfd=yes user_bfd_gas=yes ;;
1540 no) user_bfd_gas=no ;;
1541 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
1542 esac
1544 # Check whether --enable-targets or --disable-targets was given.
1545 if test "${enable_targets+set}" = set; then
1546 enableval="$enable_targets"
1547 case "${enableval}" in
1548 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1550 no) enable_targets= ;;
1551 *) enable_targets=$enableval ;;
1552 esac
1554 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1555 if test "${enable_commonbfdlib+set}" = set; then
1556 enableval="$enable_commonbfdlib"
1557 case "${enableval}" in
1558 yes) commonbfdlib=true ;;
1559 no) commonbfdlib=false ;;
1560 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1561 esac
1564 using_cgen=no
1566 # Generate a header file
1571 # If we are on a DOS filesystem, we must use gdb.ini rather than
1572 # .gdbinit.
1573 GDBINIT=".gdbinit"
1574 case "${host}" in
1575 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
1576 GDBINIT="gdb.ini"
1578 esac
1581 te_file=generic
1583 # Makefile target for installing gas in $(tooldir)/bin.
1584 install_tooldir=install-exec-tooldir
1586 canon_targets=""
1587 if test -n "$enable_targets" ; then
1588 for t in `echo $enable_targets | sed 's/,/ /g'`; do
1589 result=`$ac_config_sub $t 2>/dev/null`
1590 if test -n "$result" ; then
1591 canon_targets="$canon_targets $result"
1592 # else
1593 # # Permit "all", etc. We don't support it yet though.
1594 # canon_targets="$canon_targets $t"
1596 done
1597 _gas_uniq_list="$canon_targets"
1598 _gas_uniq_newlist=""
1599 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1600 case $_gas_uniq_i in
1601 _gas_uniq_dummy) ;;
1602 *) case " $_gas_uniq_newlist " in
1603 *" $_gas_uniq_i "*) ;;
1604 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1605 esac ;;
1606 esac
1607 done
1608 canon_targets=$_gas_uniq_newlist
1612 emulations=""
1614 for this_target in $target $canon_targets ; do
1616 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
1618 # check for architecture variants
1619 arch=
1620 endian=
1621 case ${cpu} in
1622 alpha*) cpu_type=alpha ;;
1623 armeb) cpu_type=arm endian=big ;;
1624 arm*) cpu_type=arm endian=little ;;
1625 armb*) cpu_type=arm endian=little ;;
1626 armv*l) cpu_type=arm endian=little ;;
1627 armv*b) cpu_type=arm endian=big ;;
1628 strongarm*) cpu_type=arm endian=little ;;
1629 thumb*) cpu_type=arm endian=little ;;
1630 hppa*) cpu_type=hppa ;;
1631 i[456]86) cpu_type=i386 ;;
1632 m680[012346]0) cpu_type=m68k ;;
1633 m68008) cpu_type=m68k ;;
1634 m683??) cpu_type=m68k ;;
1635 m5200) cpu_type=m68k ;;
1636 m8*) cpu_type=m88k ;;
1637 mips*el) cpu_type=mips endian=little ;;
1638 mips*) cpu_type=mips endian=big ;;
1639 pjl*) cpu_type=pj endian=little ;;
1640 pj*) cpu_type=pj endian=big ;;
1641 powerpcle*) cpu_type=ppc endian=little ;;
1642 powerpc*) cpu_type=ppc endian=big ;;
1643 rs6000*) cpu_type=ppc ;;
1644 sparclite*) cpu_type=sparc arch=sparclite ;;
1645 sparclet*) cpu_type=sparc arch=sparclet ;;
1646 sparc64*) cpu_type=sparc arch=v9-64 ;;
1647 sparc86x*) cpu_type=sparc arch=sparc86x ;;
1648 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
1649 v850*) cpu_type=v850 ;;
1650 *) cpu_type=${cpu} ;;
1651 esac
1653 if test ${this_target} = $target ; then
1654 target_cpu_type=${cpu_type}
1655 elif test ${target_cpu_type} != ${cpu_type} ; then
1656 continue
1659 generic_target=${cpu_type}-$vendor-$os
1660 dev=no
1661 bfd_gas=no
1662 em=generic
1664 # assign object format
1665 case ${generic_target} in
1666 a29k-*-coff) fmt=coff ;;
1667 a29k-amd-udi) fmt=coff ;;
1668 a29k-amd-ebmon) fmt=coff ;;
1669 a29k-nyu-sym1) fmt=coff ;;
1670 a29k-*-vxworks*) fmt=coff ;;
1672 alpha*-*-*vms*) fmt=evax ;;
1673 alpha*-*-netware*) fmt=ecoff ;;
1674 alpha*-*-openbsd*) fmt=ecoff ;;
1675 alpha*-*-osf*) fmt=ecoff ;;
1676 alpha*-*-linuxecoff*) fmt=ecoff ;;
1677 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
1678 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
1680 arc-*-elf*) fmt=elf bfd_gas=yes ;;
1682 arm-*-aout) fmt=aout ;;
1683 arm-*-coff | thumb-*-coff) fmt=coff ;;
1684 arm-*-elf | thumb-*-elf) fmt=elf ;;
1685 arm*-*-conix*) fmt=elf ;;
1686 arm-*-linux*aout*) fmt=aout em=linux ;;
1687 arm*-*-linux-gnu*) fmt=elf em=linux ;;
1688 arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1689 arm-*-oabi | thumb-*-oabi) fmt=elf ;;
1690 arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
1691 arm-*-wince) fmt=coff em=wince-pe bfd_gas=yes;;
1692 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
1693 arm-*-riscix*) fmt=aout em=riscix ;;
1695 d10v-*-*) fmt=elf bfd_gas=yes ;;
1696 d30v-*-*) fmt=elf bfd_gas=yes ;;
1699 fr30-*-*) fmt=elf bfd_gas=yes ;;
1701 hppa-*-*elf*) fmt=elf em=hppa ;;
1702 hppa-*-linux-gnu*) fmt=elf em=hppa ;;
1703 hppa-*-lites*) fmt=elf em=hppa ;;
1704 hppa-*-osf*) fmt=som em=hppa ;;
1705 hppa-*-rtems*) fmt=elf em=hppa ;;
1706 hppa-*-hpux*) fmt=som em=hppa ;;
1707 hppa-*-mpeix*) fmt=som em=hppa ;;
1708 hppa-*-bsd*) fmt=som em=hppa ;;
1709 hppa-*-hiux*) fmt=som em=hppa ;;
1711 h8300-*-coff) fmt=coff ;;
1713 i370-*-elf* | i370-*-linux*) fmt=elf ;;
1714 i386-ibm-aix*) fmt=coff em=i386aix ;;
1715 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
1716 i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
1717 i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
1718 i386-*-bsd*) fmt=aout em=386bsd ;;
1719 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
1720 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
1721 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
1722 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
1723 i386-*-linux*coff*) fmt=coff em=linux ;;
1724 i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
1725 i386-*-lynxos*) fmt=coff em=lynx ;;
1726 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
1727 fmt=elf bfd_gas=yes ;;
1728 i386-*-freebsdaout* | i386-*-freebsd12.* | i386-*-freebsd12)
1729 fmt=aout em=386bsd ;;
1730 i386-*-freebsd*) fmt=elf bfd_gas=yes ;;
1731 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
1732 fmt=coff ;;
1733 i386-*-sco3.2v5*) fmt=elf
1734 if test ${this_target} = $target; then
1735 cat >> confdefs.h <<\EOF
1736 #define SCO_ELF 1
1741 i386-*-sco3.2*) fmt=coff ;;
1742 i386-*-vsta) fmt=aout ;;
1743 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
1744 fmt=coff em=go32;;
1745 i386-*-rtemself*) fmt=elf ;;
1746 i386-*-rtems*) fmt=coff ;;
1747 i386-*-gnu*) fmt=elf ;;
1748 i386-*-mach*)
1749 fmt=aout em=mach bfd_gas=yes ;;
1750 i386-*-msdos*) fmt=aout ;;
1751 i386-*-moss*) fmt=elf ;;
1752 i386-*-pe) fmt=coff em=pe ;;
1753 i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
1754 i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;;
1755 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
1756 i386-*-*nt*) fmt=coff em=pe ;;
1757 i386-*-vxworks*) fmt=aout ;;
1758 i960-*-bout) fmt=bout ;;
1759 i960-*-coff) fmt=coff em=ic960 ;;
1760 i960-*-rtems*) fmt=coff em=ic960 ;;
1761 i960-*-nindy*) fmt=bout ;;
1762 i960-*-vxworks4*) fmt=bout ;;
1763 i960-*-vxworks5.0) fmt=bout ;;
1764 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
1765 i960-*-vxworks*) fmt=bout ;;
1766 i960-*-elf*) fmt=elf ;;
1768 m32r-*-*) fmt=elf bfd_gas=yes ;;
1770 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
1771 fmt=aout em=sun3 ;;
1772 m68k-motorola-sysv*) fmt=coff em=delta ;;
1773 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
1774 m68k-apollo-*) fmt=coff em=apollo ;;
1775 m68k-*-sysv4*) # must be before -sysv*
1776 fmt=elf em=svr4 ;;
1777 m68k-*-elf*) fmt=elf ;;
1778 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
1779 fmt=coff ;;
1780 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
1781 m68k-*-linux*aout*) fmt=aout em=linux ;;
1782 m68k-*-linux-gnu*) fmt=elf em=linux ;;
1783 m68k-*-gnu*) fmt=elf ;;
1784 m68k-*-lynxos*) fmt=coff em=lynx ;;
1785 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1786 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1787 m68k-apple-aux*) fmt=coff em=aux ;;
1788 m68k-*-psos*) fmt=elf em=psos;;
1790 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
1791 m88k-*-coff*) fmt=coff ;;
1793 mcore-*-elf) fmt=elf bfd_gas=yes ;;
1794 mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
1796 # don't change em like *-*-bsd does
1797 mips-dec-netbsd*) fmt=elf endian=little ;;
1798 mips-dec-openbsd*) fmt=elf endian=little ;;
1799 mips-dec-bsd*) fmt=aout endian=little ;;
1800 mips-sony-bsd*) fmt=ecoff ;;
1801 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
1802 mips-*-ultrix*) fmt=ecoff endian=little ;;
1803 mips-*-osf*) fmt=ecoff endian=little ;;
1804 mips-*-ecoff*) fmt=ecoff ;;
1805 mips-*-ecoff*) fmt=ecoff ;;
1806 mips-*-pe*) fmt=coff endian=little em=pe ;;
1807 mips-*-irix6*) fmt=elf ;;
1808 mips-*-irix5*) fmt=elf ;;
1809 mips-*-irix*) fmt=ecoff ;;
1810 mips-*-lnews*) fmt=ecoff em=lnews ;;
1811 mips-*-riscos*) fmt=ecoff ;;
1812 mips-*-sysv*) fmt=ecoff ;;
1813 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
1814 fmt=elf ;;
1815 mips-*-vxworks*) fmt=elf
1816 cat >> confdefs.h <<\EOF
1817 #define MIPS_STABS_ELF 1
1821 mn10200-*-*) fmt=elf bfd_gas=yes ;;
1822 mn10300-*-*) fmt=elf bfd_gas=yes ;;
1823 pj*) fmt=elf ;;
1824 ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
1825 fmt=coff em=pe ;;
1826 ppc-*-aix*) fmt=coff ;;
1827 ppc-*-beos*) fmt=coff ;;
1828 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
1829 fmt=elf ;;
1830 ppc-*-linux-gnu*) fmt=elf
1831 case "$endian" in
1832 big) ;;
1833 *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
1834 esac
1836 ppc-*-solaris*) fmt=elf
1837 if test ${this_target} = $target; then
1838 cat >> confdefs.h <<\EOF
1839 #define TARGET_SOLARIS_COMMENT 1
1843 if test x${endian} = xbig; then
1844 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
1847 ppc-*-rtems*) fmt=elf ;;
1848 ppc-*-macos* | ppc-*-mpw*)
1849 fmt=coff em=macos ;;
1850 ppc-*-netware*) fmt=elf em=ppcnw ;;
1851 ppc-*-vxworks*) fmt=elf ;;
1853 sh-*-elf*) fmt=elf ;;
1854 sh-*-coff*) fmt=coff ;;
1855 sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
1856 sh-*-rtemself*) fmt=elf ;;
1857 sh-*-rtems*) fmt=coff ;;
1859 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
1860 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
1861 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
1863 sparc-*-rtems*) fmt=aout ;;
1864 sparc-*-sunos4*) fmt=aout em=sun3 ;;
1865 sparc-*-aout | sparc*-*-vxworks*)
1866 fmt=aout em=sparcaout ;;
1867 sparc-*-coff) fmt=coff ;;
1868 sparc-*-linux*aout*) fmt=aout em=linux ;;
1869 sparc-*-linux-gnu*) fmt=elf em=linux ;;
1870 sparc-*-lynxos*) fmt=coff em=lynx ;;
1871 sparc-fujitsu-none) fmt=aout ;;
1872 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
1873 fmt=elf ;;
1874 sparc-*-netbsd*) fmt=aout em=nbsd ;;
1875 sparc-*-openbsd*) fmt=aout em=nbsd ;;
1877 strongarm-*-coff) fmt=coff ;;
1878 strongarm-*-elf) fmt=elf ;;
1880 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
1881 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
1882 tic80-*-*) fmt=coff ;;
1884 v850-*-*) fmt=elf bfd_gas=yes ;;
1885 v850e-*-*) fmt=elf bfd_gas=yes ;;
1886 v850ea-*-*) fmt=elf bfd_gas=yes ;;
1888 vax-*-bsd* | vax-*-ultrix*)
1889 fmt=aout ;;
1890 vax-*-vms) fmt=vms ;;
1893 z8k-*-coff | z8k-*-sim)
1894 fmt=coff ;;
1896 w65-*-*) fmt=coff ;;
1898 *-*-aout | *-*-scout)
1899 fmt=aout ;;
1900 *-*-nindy*)
1901 fmt=bout ;;
1902 *-*-bsd*)
1903 fmt=aout em=sun3 ;;
1904 *-*-generic) fmt=generic ;;
1905 *-*-xray | *-*-hms) fmt=coff ;;
1906 *-*-sim) fmt=coff ;;
1907 *-*-elf | *-*-sysv4* | *-*-solaris*)
1908 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
1909 fmt=elf dev=yes ;;
1910 *-*-vxworks) fmt=aout ;;
1911 *-*-netware) fmt=elf ;;
1912 esac
1914 if test ${this_target} = $target ; then
1915 endian_def=
1916 if test x${endian} = xbig; then
1917 endian_def=1
1918 elif test x${endian} = xlittle; then
1919 endian_def=0
1921 if test x${endian_def} != x; then
1922 cat >> confdefs.h <<EOF
1923 #define TARGET_BYTES_BIG_ENDIAN $endian_def
1929 case ${cpu_type}-${fmt} in
1930 alpha*-*) bfd_gas=yes ;;
1931 arm-*) bfd_gas=yes ;;
1932 # not yet
1933 # i386-aout) bfd_gas=preferred ;;
1934 mips-*) bfd_gas=yes ;;
1935 ns32k-*) bfd_gas=yes ;;
1936 ppc-*) bfd_gas=yes ;;
1937 sparc-*) bfd_gas=yes ;;
1938 strongarm-*) bfd_gas=yes ;;
1939 *-elf) bfd_gas=yes ;;
1940 *-ecoff) bfd_gas=yes ;;
1941 *-som) bfd_gas=yes ;;
1942 #enable bfd for coff and aout to allow testing if a bfd target is
1943 #the primary target, but not for coff or aout as the primary target
1944 i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
1945 i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
1946 *) ;;
1947 esac
1949 # Other random stuff.
1951 # Do we need the opcodes library?
1952 case ${cpu_type} in
1953 vax | i386 | tic30)
1957 need_opcodes=yes
1959 case "${enable_shared}" in
1960 yes) shared_opcodes=true ;;
1961 *opcodes*) shared_opcodes=true ;;
1962 *) shared_opcodes=false ;;
1963 esac
1964 if test "${shared_opcodes}" = "true"; then
1965 # A shared libopcodes must be linked against libbfd.
1966 need_bfd=yes
1969 esac
1971 # Any other special object files needed ?
1972 case ${cpu_type} in
1973 fr30 | m32r)
1974 using_cgen=yes
1977 m68k)
1978 case ${extra_objects} in
1979 *m68k-parse.o*) ;;
1980 *) extra_objects="$extra_objects m68k-parse.o" ;;
1981 esac
1984 mips)
1985 echo ${extra_objects} | grep -s "itbl-parse.o"
1986 if test $? -ne 0 ; then
1987 extra_objects="$extra_objects itbl-parse.o"
1990 echo ${extra_objects} | grep -s "itbl-lex.o"
1991 if test $? -ne 0 ; then
1992 extra_objects="$extra_objects itbl-lex.o"
1995 echo ${extra_objects} | grep -s "itbl-ops.o"
1996 if test $? -ne 0 ; then
1997 extra_objects="$extra_objects itbl-ops.o"
2001 sparc)
2002 if test $this_target = $target ; then
2003 cat >> confdefs.h <<EOF
2004 #define DEFAULT_ARCH "${arch}"
2011 esac
2013 if test $using_cgen = yes ; then
2014 case "x${extra_objects}" in
2015 *cgen.o*) ;;
2016 *) extra_objects="$extra_objects cgen.o" ;;
2017 esac
2020 # See if we really can support this configuration with the emulation code.
2022 if test $this_target = $target ; then
2023 primary_bfd_gas=$bfd_gas
2024 obj_format=$fmt
2025 te_file=$em
2027 if test $bfd_gas = no ; then
2028 # Can't support other configurations this way.
2029 break
2031 elif test $bfd_gas = no ; then
2032 # Can't support this configuration.
2033 break
2036 # From target name and format, produce a list of supported emulations.
2038 case ${generic_target}-${fmt} in
2039 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2040 mips-*-linux-gnu*-*) case "$endian" in
2041 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2042 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
2043 esac ;;
2044 mips-*-lnews*-ecoff) ;;
2045 mips-*-*-ecoff) case "$endian" in
2046 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
2047 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
2048 esac ;;
2049 mips-*-*-elf) case "$endian" in
2050 big) emulation="mipsbelf mipslelf mipself" ;;
2051 *) emulation="mipslelf mipsbelf mipself" ;;
2052 esac ;;
2053 # Uncommenting the next line will turn on support for i386 AOUT
2054 # for the default linux configuration
2055 # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
2057 i386-*-aout) emulation="i386aout" ;;
2058 i386-*-coff) emulation="i386coff" ;;
2059 i386-*-elf) emulation="i386elf" ;;
2060 esac
2062 emulations="$emulations $emulation"
2064 done
2066 # Assign floating point type. Most processors with FP support
2067 # IEEE FP. On those that don't support FP at all, usually IEEE
2068 # is emulated.
2069 case ${target_cpu} in
2070 vax | tahoe ) atof=${target_cpu} ;;
2071 *) atof=ieee ;;
2072 esac
2074 case "${obj_format}" in
2075 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
2076 esac
2078 # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
2079 cgen_cpu_prefix=""
2080 if test $using_cgen = yes ; then
2081 case ${target_cpu} in
2082 *) cgen_cpu_prefix=${target_cpu} ;;
2083 esac
2085 cat >> confdefs.h <<\EOF
2086 #define USING_CGEN 1
2092 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
2093 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
2096 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
2097 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
2100 case ${user_bfd_gas}-${primary_bfd_gas} in
2101 yes-yes | no-no)
2102 # We didn't override user's choice.
2104 no-yes)
2105 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
2107 no-preferred)
2108 primary_bfd_gas=no
2110 *-preferred)
2111 primary_bfd_gas=yes
2113 yes-*)
2114 primary_bfd_gas=yes
2117 # User specified nothing.
2119 esac
2121 # Some COFF configurations want these random other flags set.
2122 case ${obj_format} in
2123 coff)
2124 case ${target_cpu_type} in
2125 i386) cat >> confdefs.h <<\EOF
2126 #define I386COFF 1
2129 m68k) cat >> confdefs.h <<\EOF
2130 #define M68KCOFF 1
2133 m88k) cat >> confdefs.h <<\EOF
2134 #define M88KCOFF 1
2137 esac
2139 esac
2141 # Getting this done right is going to be a bitch. Each configuration specified
2142 # with --enable-targets=... should be checked for environment, format, cpu, and
2143 # bfd_gas setting.
2145 # For each configuration, the necessary object file support code must be linked
2146 # in. This might be only one, it might be up to four. The necessary emulation
2147 # code needs to be provided, too.
2149 # And then there's "--enable-targets=all"....
2151 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
2153 formats="${obj_format}"
2154 emfiles=""
2155 EMULATIONS=""
2156 _gas_uniq_list="$emulations"
2157 _gas_uniq_newlist=""
2158 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2159 case $_gas_uniq_i in
2160 _gas_uniq_dummy) ;;
2161 *) case " $_gas_uniq_newlist " in
2162 *" $_gas_uniq_i "*) ;;
2163 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2164 esac ;;
2165 esac
2166 done
2167 emulations=$_gas_uniq_newlist
2169 for em in . $emulations ; do
2170 case $em in
2171 .) continue ;;
2172 mipsbelf | mipslelf)
2173 fmt=elf file=mipself ;;
2174 mipsbecoff | mipslecoff)
2175 fmt=ecoff file=mipsecoff ;;
2176 i386aout)
2177 fmt=aout file=i386aout ;;
2178 i386coff)
2179 fmt=coff file=i386coff ;;
2180 i386elf)
2181 fmt=elf file=i386elf ;;
2182 esac
2183 formats="$formats $fmt"
2184 emfiles="$emfiles e-$file.o"
2185 EMULATIONS="$EMULATIONS &$em,"
2186 done
2187 _gas_uniq_list="$formats"
2188 _gas_uniq_newlist=""
2189 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2190 case $_gas_uniq_i in
2191 _gas_uniq_dummy) ;;
2192 *) case " $_gas_uniq_newlist " in
2193 *" $_gas_uniq_i "*) ;;
2194 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2195 esac ;;
2196 esac
2197 done
2198 formats=$_gas_uniq_newlist
2200 _gas_uniq_list="$emfiles"
2201 _gas_uniq_newlist=""
2202 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2203 case $_gas_uniq_i in
2204 _gas_uniq_dummy) ;;
2205 *) case " $_gas_uniq_newlist " in
2206 *" $_gas_uniq_i "*) ;;
2207 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2208 esac ;;
2209 esac
2210 done
2211 emfiles=$_gas_uniq_newlist
2213 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
2214 for fmt in $formats ; do
2215 case $fmt in
2216 aout) cat >> confdefs.h <<\EOF
2217 #define OBJ_MAYBE_AOUT 1
2220 bout) cat >> confdefs.h <<\EOF
2221 #define OBJ_MAYBE_BOUT 1
2224 coff) cat >> confdefs.h <<\EOF
2225 #define OBJ_MAYBE_COFF 1
2228 ecoff) cat >> confdefs.h <<\EOF
2229 #define OBJ_MAYBE_ECOFF 1
2232 elf) cat >> confdefs.h <<\EOF
2233 #define OBJ_MAYBE_ELF 1
2236 generic) cat >> confdefs.h <<\EOF
2237 #define OBJ_MAYBE_GENERIC 1
2240 hp300) cat >> confdefs.h <<\EOF
2241 #define OBJ_MAYBE_HP300 1
2244 ieee) cat >> confdefs.h <<\EOF
2245 #define OBJ_MAYBE_IEEE 1
2248 som) cat >> confdefs.h <<\EOF
2249 #define OBJ_MAYBE_SOM 1
2252 vms) cat >> confdefs.h <<\EOF
2253 #define OBJ_MAYBE_VMS 1
2256 esac
2257 extra_objects="$extra_objects obj-$fmt.o"
2258 done
2259 obj_format=multi
2261 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
2262 DEFAULT_EMULATION=`set . $emulations ; echo $2`
2263 # e-mips* has more than one emulation per file, e-i386* has just one at the
2264 # moment. If only one emulation is specified, then don't define
2265 # USE_EMULATIONS or include any of the e-files as they will only be bloat.
2266 case "${obj_format}${emfiles}" in
2267 multi* | *mips*)
2268 extra_objects="$extra_objects $emfiles"
2269 cat >> confdefs.h <<\EOF
2270 #define USE_EMULATIONS 1
2273 esac
2276 cat >> confdefs.h <<EOF
2277 #define EMULATIONS $EMULATIONS
2280 cat >> confdefs.h <<EOF
2281 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
2285 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
2286 yes-*-coff) need_bfd=yes ;;
2287 no-*-coff) need_bfd=yes
2288 cat >> confdefs.h <<\EOF
2289 #define MANY_SEGMENTS 1
2292 esac
2294 reject_dev_configs=yes
2296 case ${reject_dev_configs}-${dev} in
2297 yes-yes) # Oops.
2298 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
2300 esac
2308 case "${primary_bfd_gas}" in
2309 yes) cat >> confdefs.h <<\EOF
2310 #define BFD_ASSEMBLER 1
2313 need_bfd=yes ;;
2314 esac
2316 # do we need the opcodes library?
2317 case "${need_opcodes}" in
2318 yes)
2319 OPCODES_LIB=../opcodes/libopcodes.la
2321 esac
2323 case "${need_bfd}" in
2324 yes)
2325 BFDLIB=../bfd/libbfd.la
2326 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
2328 esac
2335 cat >> confdefs.h <<EOF
2336 #define TARGET_ALIAS "${target_alias}"
2339 cat >> confdefs.h <<EOF
2340 #define TARGET_CANONICAL "${target}"
2343 cat >> confdefs.h <<EOF
2344 #define TARGET_CPU "${target_cpu}"
2347 cat >> confdefs.h <<EOF
2348 #define TARGET_VENDOR "${target_vendor}"
2351 cat >> confdefs.h <<EOF
2352 #define TARGET_OS "${target_os}"
2356 # Extract the first word of "gcc", so it can be a program name with args.
2357 set dummy gcc; ac_word=$2
2358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2359 echo "configure:2360: checking for $ac_word" >&5
2360 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363 if test -n "$CC"; then
2364 ac_cv_prog_CC="$CC" # Let the user override the test.
2365 else
2366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2367 ac_dummy="$PATH"
2368 for ac_dir in $ac_dummy; do
2369 test -z "$ac_dir" && ac_dir=.
2370 if test -f $ac_dir/$ac_word; then
2371 ac_cv_prog_CC="gcc"
2372 break
2374 done
2375 IFS="$ac_save_ifs"
2378 CC="$ac_cv_prog_CC"
2379 if test -n "$CC"; then
2380 echo "$ac_t""$CC" 1>&6
2381 else
2382 echo "$ac_t""no" 1>&6
2385 if test -z "$CC"; then
2386 # Extract the first word of "cc", so it can be a program name with args.
2387 set dummy cc; ac_word=$2
2388 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2389 echo "configure:2390: checking for $ac_word" >&5
2390 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2391 echo $ac_n "(cached) $ac_c" 1>&6
2392 else
2393 if test -n "$CC"; then
2394 ac_cv_prog_CC="$CC" # Let the user override the test.
2395 else
2396 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2397 ac_prog_rejected=no
2398 ac_dummy="$PATH"
2399 for ac_dir in $ac_dummy; do
2400 test -z "$ac_dir" && ac_dir=.
2401 if test -f $ac_dir/$ac_word; then
2402 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2403 ac_prog_rejected=yes
2404 continue
2406 ac_cv_prog_CC="cc"
2407 break
2409 done
2410 IFS="$ac_save_ifs"
2411 if test $ac_prog_rejected = yes; then
2412 # We found a bogon in the path, so make sure we never use it.
2413 set dummy $ac_cv_prog_CC
2414 shift
2415 if test $# -gt 0; then
2416 # We chose a different compiler from the bogus one.
2417 # However, it has the same basename, so the bogon will be chosen
2418 # first if we set CC to just the basename; use the full file name.
2419 shift
2420 set dummy "$ac_dir/$ac_word" "$@"
2421 shift
2422 ac_cv_prog_CC="$@"
2427 CC="$ac_cv_prog_CC"
2428 if test -n "$CC"; then
2429 echo "$ac_t""$CC" 1>&6
2430 else
2431 echo "$ac_t""no" 1>&6
2434 if test -z "$CC"; then
2435 case "`uname -s`" in
2436 *win32* | *WIN32*)
2437 # Extract the first word of "cl", so it can be a program name with args.
2438 set dummy cl; ac_word=$2
2439 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2440 echo "configure:2441: checking for $ac_word" >&5
2441 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2442 echo $ac_n "(cached) $ac_c" 1>&6
2443 else
2444 if test -n "$CC"; then
2445 ac_cv_prog_CC="$CC" # Let the user override the test.
2446 else
2447 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2448 ac_dummy="$PATH"
2449 for ac_dir in $ac_dummy; do
2450 test -z "$ac_dir" && ac_dir=.
2451 if test -f $ac_dir/$ac_word; then
2452 ac_cv_prog_CC="cl"
2453 break
2455 done
2456 IFS="$ac_save_ifs"
2459 CC="$ac_cv_prog_CC"
2460 if test -n "$CC"; then
2461 echo "$ac_t""$CC" 1>&6
2462 else
2463 echo "$ac_t""no" 1>&6
2466 esac
2468 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2471 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2472 echo "configure:2473: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2474 ac_ext=c
2475 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2476 ac_cpp='$CPP $CPPFLAGS'
2477 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2478 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2479 cross_compiling=$ac_cv_prog_cc_cross
2481 cat > conftest.$ac_ext << EOF
2483 #line 2484 "configure"
2484 #include "confdefs.h"
2486 main(){return(0);}
2488 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2489 ac_cv_prog_cc_works=yes
2490 # If we can't run a trivial program, we are probably using a cross compiler.
2491 if (./conftest; exit) 2>/dev/null; then
2492 ac_cv_prog_cc_cross=no
2493 else
2494 ac_cv_prog_cc_cross=yes
2496 else
2497 echo "configure: failed program was:" >&5
2498 cat conftest.$ac_ext >&5
2499 ac_cv_prog_cc_works=no
2501 rm -fr conftest*
2502 ac_ext=c
2503 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2504 ac_cpp='$CPP $CPPFLAGS'
2505 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2506 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2507 cross_compiling=$ac_cv_prog_cc_cross
2509 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2510 if test $ac_cv_prog_cc_works = no; then
2511 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2513 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2514 echo "configure:2515: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2515 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2516 cross_compiling=$ac_cv_prog_cc_cross
2518 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2519 echo "configure:2520: checking whether we are using GNU C" >&5
2520 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2521 echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523 cat > conftest.c <<EOF
2524 #ifdef __GNUC__
2525 yes;
2526 #endif
2528 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2529 ac_cv_prog_gcc=yes
2530 else
2531 ac_cv_prog_gcc=no
2535 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2537 if test $ac_cv_prog_gcc = yes; then
2538 GCC=yes
2539 else
2540 GCC=
2543 ac_test_CFLAGS="${CFLAGS+set}"
2544 ac_save_CFLAGS="$CFLAGS"
2545 CFLAGS=
2546 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2547 echo "configure:2548: checking whether ${CC-cc} accepts -g" >&5
2548 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2549 echo $ac_n "(cached) $ac_c" 1>&6
2550 else
2551 echo 'void f(){}' > conftest.c
2552 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2553 ac_cv_prog_cc_g=yes
2554 else
2555 ac_cv_prog_cc_g=no
2557 rm -f conftest*
2561 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2562 if test "$ac_test_CFLAGS" = set; then
2563 CFLAGS="$ac_save_CFLAGS"
2564 elif test $ac_cv_prog_cc_g = yes; then
2565 if test "$GCC" = yes; then
2566 CFLAGS="-g -O2"
2567 else
2568 CFLAGS="-g"
2570 else
2571 if test "$GCC" = yes; then
2572 CFLAGS="-O2"
2573 else
2574 CFLAGS=
2579 for ac_prog in 'bison -y' byacc
2581 # Extract the first word of "$ac_prog", so it can be a program name with args.
2582 set dummy $ac_prog; ac_word=$2
2583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2584 echo "configure:2585: checking for $ac_word" >&5
2585 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2586 echo $ac_n "(cached) $ac_c" 1>&6
2587 else
2588 if test -n "$YACC"; then
2589 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2590 else
2591 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2592 ac_dummy="$PATH"
2593 for ac_dir in $ac_dummy; do
2594 test -z "$ac_dir" && ac_dir=.
2595 if test -f $ac_dir/$ac_word; then
2596 ac_cv_prog_YACC="$ac_prog"
2597 break
2599 done
2600 IFS="$ac_save_ifs"
2603 YACC="$ac_cv_prog_YACC"
2604 if test -n "$YACC"; then
2605 echo "$ac_t""$YACC" 1>&6
2606 else
2607 echo "$ac_t""no" 1>&6
2610 test -n "$YACC" && break
2611 done
2612 test -n "$YACC" || YACC="yacc"
2614 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2615 echo "configure:2616: checking how to run the C preprocessor" >&5
2616 # On Suns, sometimes $CPP names a directory.
2617 if test -n "$CPP" && test -d "$CPP"; then
2618 CPP=
2620 if test -z "$CPP"; then
2621 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2622 echo $ac_n "(cached) $ac_c" 1>&6
2623 else
2624 # This must be in double quotes, not single quotes, because CPP may get
2625 # substituted into the Makefile and "${CC-cc}" will confuse make.
2626 CPP="${CC-cc} -E"
2627 # On the NeXT, cc -E runs the code through the compiler's parser,
2628 # not just through cpp.
2629 cat > conftest.$ac_ext <<EOF
2630 #line 2631 "configure"
2631 #include "confdefs.h"
2632 #include <assert.h>
2633 Syntax Error
2635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2636 { (eval echo configure:2637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2638 if test -z "$ac_err"; then
2640 else
2641 echo "$ac_err" >&5
2642 echo "configure: failed program was:" >&5
2643 cat conftest.$ac_ext >&5
2644 rm -rf conftest*
2645 CPP="${CC-cc} -E -traditional-cpp"
2646 cat > conftest.$ac_ext <<EOF
2647 #line 2648 "configure"
2648 #include "confdefs.h"
2649 #include <assert.h>
2650 Syntax Error
2652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2653 { (eval echo configure:2654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2655 if test -z "$ac_err"; then
2657 else
2658 echo "$ac_err" >&5
2659 echo "configure: failed program was:" >&5
2660 cat conftest.$ac_ext >&5
2661 rm -rf conftest*
2662 CPP="${CC-cc} -nologo -E"
2663 cat > conftest.$ac_ext <<EOF
2664 #line 2665 "configure"
2665 #include "confdefs.h"
2666 #include <assert.h>
2667 Syntax Error
2669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2670 { (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2672 if test -z "$ac_err"; then
2674 else
2675 echo "$ac_err" >&5
2676 echo "configure: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 rm -rf conftest*
2679 CPP=/lib/cpp
2681 rm -f conftest*
2683 rm -f conftest*
2685 rm -f conftest*
2686 ac_cv_prog_CPP="$CPP"
2688 CPP="$ac_cv_prog_CPP"
2689 else
2690 ac_cv_prog_CPP="$CPP"
2692 echo "$ac_t""$CPP" 1>&6
2694 missing_dir=`cd $ac_aux_dir && pwd`
2695 for ac_prog in flex lex
2697 # Extract the first word of "$ac_prog", so it can be a program name with args.
2698 set dummy $ac_prog; ac_word=$2
2699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2700 echo "configure:2701: checking for $ac_word" >&5
2701 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2702 echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704 if test -n "$LEX"; then
2705 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2706 else
2707 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2708 ac_dummy="$PATH"
2709 for ac_dir in $ac_dummy; do
2710 test -z "$ac_dir" && ac_dir=.
2711 if test -f $ac_dir/$ac_word; then
2712 ac_cv_prog_LEX="$ac_prog"
2713 break
2715 done
2716 IFS="$ac_save_ifs"
2719 LEX="$ac_cv_prog_LEX"
2720 if test -n "$LEX"; then
2721 echo "$ac_t""$LEX" 1>&6
2722 else
2723 echo "$ac_t""no" 1>&6
2726 test -n "$LEX" && break
2727 done
2728 test -n "$LEX" || LEX=""$missing_dir/missing flex""
2730 # Extract the first word of "flex", so it can be a program name with args.
2731 set dummy flex; ac_word=$2
2732 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2733 echo "configure:2734: checking for $ac_word" >&5
2734 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2735 echo $ac_n "(cached) $ac_c" 1>&6
2736 else
2737 if test -n "$LEX"; then
2738 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2739 else
2740 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2741 ac_dummy="$PATH"
2742 for ac_dir in $ac_dummy; do
2743 test -z "$ac_dir" && ac_dir=.
2744 if test -f $ac_dir/$ac_word; then
2745 ac_cv_prog_LEX="flex"
2746 break
2748 done
2749 IFS="$ac_save_ifs"
2750 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2753 LEX="$ac_cv_prog_LEX"
2754 if test -n "$LEX"; then
2755 echo "$ac_t""$LEX" 1>&6
2756 else
2757 echo "$ac_t""no" 1>&6
2760 if test -z "$LEXLIB"
2761 then
2762 case "$LEX" in
2763 flex*) ac_lib=fl ;;
2764 *) ac_lib=l ;;
2765 esac
2766 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2767 echo "configure:2768: checking for yywrap in -l$ac_lib" >&5
2768 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2769 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2770 echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772 ac_save_LIBS="$LIBS"
2773 LIBS="-l$ac_lib $LIBS"
2774 cat > conftest.$ac_ext <<EOF
2775 #line 2776 "configure"
2776 #include "confdefs.h"
2777 /* Override any gcc2 internal prototype to avoid an error. */
2778 /* We use char because int might match the return type of a gcc2
2779 builtin and then its argument prototype would still apply. */
2780 char yywrap();
2782 int main() {
2783 yywrap()
2784 ; return 0; }
2786 if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2787 rm -rf conftest*
2788 eval "ac_cv_lib_$ac_lib_var=yes"
2789 else
2790 echo "configure: failed program was:" >&5
2791 cat conftest.$ac_ext >&5
2792 rm -rf conftest*
2793 eval "ac_cv_lib_$ac_lib_var=no"
2795 rm -f conftest*
2796 LIBS="$ac_save_LIBS"
2799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2800 echo "$ac_t""yes" 1>&6
2801 LEXLIB="-l$ac_lib"
2802 else
2803 echo "$ac_t""no" 1>&6
2808 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2809 echo "configure:2810: checking lex output file root" >&5
2810 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2811 echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813 # The minimal lex program is just a single line: %%. But some broken lexes
2814 # (Solaris, I think it was) want two %% lines, so accommodate them.
2815 echo '%%
2816 %%' | $LEX
2817 if test -f lex.yy.c; then
2818 ac_cv_prog_lex_root=lex.yy
2819 elif test -f lexyy.c; then
2820 ac_cv_prog_lex_root=lexyy
2821 else
2822 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2826 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2827 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2829 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2830 echo "configure:2831: checking whether yytext is a pointer" >&5
2831 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2832 echo $ac_n "(cached) $ac_c" 1>&6
2833 else
2834 # POSIX says lex can declare yytext either as a pointer or an array; the
2835 # default is implementation-dependent. Figure out which it is, since
2836 # not all implementations provide the %pointer and %array declarations.
2837 ac_cv_prog_lex_yytext_pointer=no
2838 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2839 ac_save_LIBS="$LIBS"
2840 LIBS="$LIBS $LEXLIB"
2841 cat > conftest.$ac_ext <<EOF
2842 #line 2843 "configure"
2843 #include "confdefs.h"
2844 `cat $LEX_OUTPUT_ROOT.c`
2845 int main() {
2847 ; return 0; }
2849 if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2850 rm -rf conftest*
2851 ac_cv_prog_lex_yytext_pointer=yes
2852 else
2853 echo "configure: failed program was:" >&5
2854 cat conftest.$ac_ext >&5
2856 rm -f conftest*
2857 LIBS="$ac_save_LIBS"
2858 rm -f "${LEX_OUTPUT_ROOT}.c"
2862 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2863 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2864 cat >> confdefs.h <<\EOF
2865 #define YYTEXT_POINTER 1
2871 ALL_LINGUAS=
2872 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2873 echo "configure:2874: checking for POSIXized ISC" >&5
2874 if test -d /etc/conf/kconfig.d &&
2875 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2876 then
2877 echo "$ac_t""yes" 1>&6
2878 ISC=yes # If later tests want to check for ISC.
2879 cat >> confdefs.h <<\EOF
2880 #define _POSIX_SOURCE 1
2883 if test "$GCC" = yes; then
2884 CC="$CC -posix"
2885 else
2886 CC="$CC -Xp"
2888 else
2889 echo "$ac_t""no" 1>&6
2890 ISC=
2893 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2894 echo "configure:2895: checking for ANSI C header files" >&5
2895 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2896 echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898 cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 #include <stdlib.h>
2902 #include <stdarg.h>
2903 #include <string.h>
2904 #include <float.h>
2906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2907 { (eval echo configure:2908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2909 if test -z "$ac_err"; then
2910 rm -rf conftest*
2911 ac_cv_header_stdc=yes
2912 else
2913 echo "$ac_err" >&5
2914 echo "configure: failed program was:" >&5
2915 cat conftest.$ac_ext >&5
2916 rm -rf conftest*
2917 ac_cv_header_stdc=no
2919 rm -f conftest*
2921 if test $ac_cv_header_stdc = yes; then
2922 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2923 cat > conftest.$ac_ext <<EOF
2924 #line 2925 "configure"
2925 #include "confdefs.h"
2926 #include <string.h>
2928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2929 egrep "memchr" >/dev/null 2>&1; then
2931 else
2932 rm -rf conftest*
2933 ac_cv_header_stdc=no
2935 rm -f conftest*
2939 if test $ac_cv_header_stdc = yes; then
2940 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2941 cat > conftest.$ac_ext <<EOF
2942 #line 2943 "configure"
2943 #include "confdefs.h"
2944 #include <stdlib.h>
2946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2947 egrep "free" >/dev/null 2>&1; then
2949 else
2950 rm -rf conftest*
2951 ac_cv_header_stdc=no
2953 rm -f conftest*
2957 if test $ac_cv_header_stdc = yes; then
2958 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2959 if test "$cross_compiling" = yes; then
2961 else
2962 cat > conftest.$ac_ext <<EOF
2963 #line 2964 "configure"
2964 #include "confdefs.h"
2965 #include <ctype.h>
2966 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2967 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2968 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2969 int main () { int i; for (i = 0; i < 256; i++)
2970 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2971 exit (0); }
2974 if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2975 then
2977 else
2978 echo "configure: failed program was:" >&5
2979 cat conftest.$ac_ext >&5
2980 rm -fr conftest*
2981 ac_cv_header_stdc=no
2983 rm -fr conftest*
2989 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2990 if test $ac_cv_header_stdc = yes; then
2991 cat >> confdefs.h <<\EOF
2992 #define STDC_HEADERS 1
2997 echo $ac_n "checking for working const""... $ac_c" 1>&6
2998 echo "configure:2999: checking for working const" >&5
2999 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3000 echo $ac_n "(cached) $ac_c" 1>&6
3001 else
3002 cat > conftest.$ac_ext <<EOF
3003 #line 3004 "configure"
3004 #include "confdefs.h"
3006 int main() {
3008 /* Ultrix mips cc rejects this. */
3009 typedef int charset[2]; const charset x;
3010 /* SunOS 4.1.1 cc rejects this. */
3011 char const *const *ccp;
3012 char **p;
3013 /* NEC SVR4.0.2 mips cc rejects this. */
3014 struct point {int x, y;};
3015 static struct point const zero = {0,0};
3016 /* AIX XL C 1.02.0.0 rejects this.
3017 It does not let you subtract one const X* pointer from another in an arm
3018 of an if-expression whose if-part is not a constant expression */
3019 const char *g = "string";
3020 ccp = &g + (g ? g-g : 0);
3021 /* HPUX 7.0 cc rejects these. */
3022 ++ccp;
3023 p = (char**) ccp;
3024 ccp = (char const *const *) p;
3025 { /* SCO 3.2v4 cc rejects this. */
3026 char *t;
3027 char const *s = 0 ? (char *) 0 : (char const *) 0;
3029 *t++ = 0;
3031 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3032 int x[] = {25, 17};
3033 const int *foo = &x[0];
3034 ++foo;
3036 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3037 typedef const int *iptr;
3038 iptr p = 0;
3039 ++p;
3041 { /* AIX XL C 1.02.0.0 rejects this saying
3042 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3043 struct s { int j; const int *ap[3]; };
3044 struct s *b; b->j = 5;
3046 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3047 const int foo = 10;
3050 ; return 0; }
3052 if { (eval echo configure:3053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3053 rm -rf conftest*
3054 ac_cv_c_const=yes
3055 else
3056 echo "configure: failed program was:" >&5
3057 cat conftest.$ac_ext >&5
3058 rm -rf conftest*
3059 ac_cv_c_const=no
3061 rm -f conftest*
3064 echo "$ac_t""$ac_cv_c_const" 1>&6
3065 if test $ac_cv_c_const = no; then
3066 cat >> confdefs.h <<\EOF
3067 #define const
3072 echo $ac_n "checking for inline""... $ac_c" 1>&6
3073 echo "configure:3074: checking for inline" >&5
3074 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3075 echo $ac_n "(cached) $ac_c" 1>&6
3076 else
3077 ac_cv_c_inline=no
3078 for ac_kw in inline __inline__ __inline; do
3079 cat > conftest.$ac_ext <<EOF
3080 #line 3081 "configure"
3081 #include "confdefs.h"
3083 int main() {
3084 } $ac_kw foo() {
3085 ; return 0; }
3087 if { (eval echo configure:3088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3088 rm -rf conftest*
3089 ac_cv_c_inline=$ac_kw; break
3090 else
3091 echo "configure: failed program was:" >&5
3092 cat conftest.$ac_ext >&5
3094 rm -f conftest*
3095 done
3099 echo "$ac_t""$ac_cv_c_inline" 1>&6
3100 case "$ac_cv_c_inline" in
3101 inline | yes) ;;
3102 no) cat >> confdefs.h <<\EOF
3103 #define inline
3106 *) cat >> confdefs.h <<EOF
3107 #define inline $ac_cv_c_inline
3110 esac
3112 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3113 echo "configure:3114: checking for off_t" >&5
3114 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3115 echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <sys/types.h>
3121 #if STDC_HEADERS
3122 #include <stdlib.h>
3123 #include <stddef.h>
3124 #endif
3126 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3127 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3128 rm -rf conftest*
3129 ac_cv_type_off_t=yes
3130 else
3131 rm -rf conftest*
3132 ac_cv_type_off_t=no
3134 rm -f conftest*
3137 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3138 if test $ac_cv_type_off_t = no; then
3139 cat >> confdefs.h <<\EOF
3140 #define off_t long
3145 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3146 echo "configure:3147: checking for size_t" >&5
3147 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3148 echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150 cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153 #include <sys/types.h>
3154 #if STDC_HEADERS
3155 #include <stdlib.h>
3156 #include <stddef.h>
3157 #endif
3159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3160 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3161 rm -rf conftest*
3162 ac_cv_type_size_t=yes
3163 else
3164 rm -rf conftest*
3165 ac_cv_type_size_t=no
3167 rm -f conftest*
3170 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3171 if test $ac_cv_type_size_t = no; then
3172 cat >> confdefs.h <<\EOF
3173 #define size_t unsigned
3178 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3179 # for constant arguments. Useless!
3180 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3181 echo "configure:3182: checking for working alloca.h" >&5
3182 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3183 echo $ac_n "(cached) $ac_c" 1>&6
3184 else
3185 cat > conftest.$ac_ext <<EOF
3186 #line 3187 "configure"
3187 #include "confdefs.h"
3188 #include <alloca.h>
3189 int main() {
3190 char *p = alloca(2 * sizeof(int));
3191 ; return 0; }
3193 if { (eval echo configure:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3194 rm -rf conftest*
3195 ac_cv_header_alloca_h=yes
3196 else
3197 echo "configure: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
3199 rm -rf conftest*
3200 ac_cv_header_alloca_h=no
3202 rm -f conftest*
3205 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3206 if test $ac_cv_header_alloca_h = yes; then
3207 cat >> confdefs.h <<\EOF
3208 #define HAVE_ALLOCA_H 1
3213 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3214 echo "configure:3215: checking for alloca" >&5
3215 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3216 echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218 cat > conftest.$ac_ext <<EOF
3219 #line 3220 "configure"
3220 #include "confdefs.h"
3222 #ifdef __GNUC__
3223 # define alloca __builtin_alloca
3224 #else
3225 # ifdef _MSC_VER
3226 # include <malloc.h>
3227 # define alloca _alloca
3228 # else
3229 # if HAVE_ALLOCA_H
3230 # include <alloca.h>
3231 # else
3232 # ifdef _AIX
3233 #pragma alloca
3234 # else
3235 # ifndef alloca /* predefined by HP cc +Olibcalls */
3236 char *alloca ();
3237 # endif
3238 # endif
3239 # endif
3240 # endif
3241 #endif
3243 int main() {
3244 char *p = (char *) alloca(1);
3245 ; return 0; }
3247 if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3248 rm -rf conftest*
3249 ac_cv_func_alloca_works=yes
3250 else
3251 echo "configure: failed program was:" >&5
3252 cat conftest.$ac_ext >&5
3253 rm -rf conftest*
3254 ac_cv_func_alloca_works=no
3256 rm -f conftest*
3259 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3260 if test $ac_cv_func_alloca_works = yes; then
3261 cat >> confdefs.h <<\EOF
3262 #define HAVE_ALLOCA 1
3267 if test $ac_cv_func_alloca_works = no; then
3268 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3269 # that cause trouble. Some versions do not even contain alloca or
3270 # contain a buggy version. If you still want to use their alloca,
3271 # use ar to extract alloca.o from them instead of compiling alloca.c.
3272 ALLOCA=alloca.${ac_objext}
3273 cat >> confdefs.h <<\EOF
3274 #define C_ALLOCA 1
3278 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3279 echo "configure:3280: checking whether alloca needs Cray hooks" >&5
3280 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3281 echo $ac_n "(cached) $ac_c" 1>&6
3282 else
3283 cat > conftest.$ac_ext <<EOF
3284 #line 3285 "configure"
3285 #include "confdefs.h"
3286 #if defined(CRAY) && ! defined(CRAY2)
3287 webecray
3288 #else
3289 wenotbecray
3290 #endif
3293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3294 egrep "webecray" >/dev/null 2>&1; then
3295 rm -rf conftest*
3296 ac_cv_os_cray=yes
3297 else
3298 rm -rf conftest*
3299 ac_cv_os_cray=no
3301 rm -f conftest*
3305 echo "$ac_t""$ac_cv_os_cray" 1>&6
3306 if test $ac_cv_os_cray = yes; then
3307 for ac_func in _getb67 GETB67 getb67; do
3308 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3309 echo "configure:3310: checking for $ac_func" >&5
3310 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3311 echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313 cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316 /* System header to define __stub macros and hopefully few prototypes,
3317 which can conflict with char $ac_func(); below. */
3318 #include <assert.h>
3319 /* Override any gcc2 internal prototype to avoid an error. */
3320 /* We use char because int might match the return type of a gcc2
3321 builtin and then its argument prototype would still apply. */
3322 char $ac_func();
3324 int main() {
3326 /* The GNU C library defines this for functions which it implements
3327 to always fail with ENOSYS. Some functions are actually named
3328 something starting with __ and the normal name is an alias. */
3329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3330 choke me
3331 #else
3332 $ac_func();
3333 #endif
3335 ; return 0; }
3337 if { (eval echo configure:3338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3338 rm -rf conftest*
3339 eval "ac_cv_func_$ac_func=yes"
3340 else
3341 echo "configure: failed program was:" >&5
3342 cat conftest.$ac_ext >&5
3343 rm -rf conftest*
3344 eval "ac_cv_func_$ac_func=no"
3346 rm -f conftest*
3349 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3350 echo "$ac_t""yes" 1>&6
3351 cat >> confdefs.h <<EOF
3352 #define CRAY_STACKSEG_END $ac_func
3355 break
3356 else
3357 echo "$ac_t""no" 1>&6
3360 done
3363 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3364 echo "configure:3365: checking stack direction for C alloca" >&5
3365 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3366 echo $ac_n "(cached) $ac_c" 1>&6
3367 else
3368 if test "$cross_compiling" = yes; then
3369 ac_cv_c_stack_direction=0
3370 else
3371 cat > conftest.$ac_ext <<EOF
3372 #line 3373 "configure"
3373 #include "confdefs.h"
3374 find_stack_direction ()
3376 static char *addr = 0;
3377 auto char dummy;
3378 if (addr == 0)
3380 addr = &dummy;
3381 return find_stack_direction ();
3383 else
3384 return (&dummy > addr) ? 1 : -1;
3386 main ()
3388 exit (find_stack_direction() < 0);
3391 if { (eval echo configure:3392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3392 then
3393 ac_cv_c_stack_direction=1
3394 else
3395 echo "configure: failed program was:" >&5
3396 cat conftest.$ac_ext >&5
3397 rm -fr conftest*
3398 ac_cv_c_stack_direction=-1
3400 rm -fr conftest*
3405 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3406 cat >> confdefs.h <<EOF
3407 #define STACK_DIRECTION $ac_cv_c_stack_direction
3412 for ac_hdr in unistd.h
3414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3416 echo "configure:3417: checking for $ac_hdr" >&5
3417 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3418 echo $ac_n "(cached) $ac_c" 1>&6
3419 else
3420 cat > conftest.$ac_ext <<EOF
3421 #line 3422 "configure"
3422 #include "confdefs.h"
3423 #include <$ac_hdr>
3425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3426 { (eval echo configure:3427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3428 if test -z "$ac_err"; then
3429 rm -rf conftest*
3430 eval "ac_cv_header_$ac_safe=yes"
3431 else
3432 echo "$ac_err" >&5
3433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
3436 eval "ac_cv_header_$ac_safe=no"
3438 rm -f conftest*
3440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3441 echo "$ac_t""yes" 1>&6
3442 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3443 cat >> confdefs.h <<EOF
3444 #define $ac_tr_hdr 1
3447 else
3448 echo "$ac_t""no" 1>&6
3450 done
3452 for ac_func in getpagesize
3454 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3455 echo "configure:3456: checking for $ac_func" >&5
3456 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3457 echo $ac_n "(cached) $ac_c" 1>&6
3458 else
3459 cat > conftest.$ac_ext <<EOF
3460 #line 3461 "configure"
3461 #include "confdefs.h"
3462 /* System header to define __stub macros and hopefully few prototypes,
3463 which can conflict with char $ac_func(); below. */
3464 #include <assert.h>
3465 /* Override any gcc2 internal prototype to avoid an error. */
3466 /* We use char because int might match the return type of a gcc2
3467 builtin and then its argument prototype would still apply. */
3468 char $ac_func();
3470 int main() {
3472 /* The GNU C library defines this for functions which it implements
3473 to always fail with ENOSYS. Some functions are actually named
3474 something starting with __ and the normal name is an alias. */
3475 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3476 choke me
3477 #else
3478 $ac_func();
3479 #endif
3481 ; return 0; }
3483 if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3484 rm -rf conftest*
3485 eval "ac_cv_func_$ac_func=yes"
3486 else
3487 echo "configure: failed program was:" >&5
3488 cat conftest.$ac_ext >&5
3489 rm -rf conftest*
3490 eval "ac_cv_func_$ac_func=no"
3492 rm -f conftest*
3495 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3496 echo "$ac_t""yes" 1>&6
3497 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3498 cat >> confdefs.h <<EOF
3499 #define $ac_tr_func 1
3502 else
3503 echo "$ac_t""no" 1>&6
3505 done
3507 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3508 echo "configure:3509: checking for working mmap" >&5
3509 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3510 echo $ac_n "(cached) $ac_c" 1>&6
3511 else
3512 if test "$cross_compiling" = yes; then
3513 ac_cv_func_mmap_fixed_mapped=no
3514 else
3515 cat > conftest.$ac_ext <<EOF
3516 #line 3517 "configure"
3517 #include "confdefs.h"
3519 /* Thanks to Mike Haertel and Jim Avera for this test.
3520 Here is a matrix of mmap possibilities:
3521 mmap private not fixed
3522 mmap private fixed at somewhere currently unmapped
3523 mmap private fixed at somewhere already mapped
3524 mmap shared not fixed
3525 mmap shared fixed at somewhere currently unmapped
3526 mmap shared fixed at somewhere already mapped
3527 For private mappings, we should verify that changes cannot be read()
3528 back from the file, nor mmap's back from the file at a different
3529 address. (There have been systems where private was not correctly
3530 implemented like the infamous i386 svr4.0, and systems where the
3531 VM page cache was not coherent with the filesystem buffer cache
3532 like early versions of FreeBSD and possibly contemporary NetBSD.)
3533 For shared mappings, we should conversely verify that changes get
3534 propogated back to all the places they're supposed to be.
3536 Grep wants private fixed already mapped.
3537 The main things grep needs to know about mmap are:
3538 * does it exist and is it safe to write into the mmap'd area
3539 * how to use it (BSD variants) */
3540 #include <sys/types.h>
3541 #include <fcntl.h>
3542 #include <sys/mman.h>
3544 /* This mess was copied from the GNU getpagesize.h. */
3545 #ifndef HAVE_GETPAGESIZE
3546 # ifdef HAVE_UNISTD_H
3547 # include <unistd.h>
3548 # endif
3550 /* Assume that all systems that can run configure have sys/param.h. */
3551 # ifndef HAVE_SYS_PARAM_H
3552 # define HAVE_SYS_PARAM_H 1
3553 # endif
3555 # ifdef _SC_PAGESIZE
3556 # define getpagesize() sysconf(_SC_PAGESIZE)
3557 # else /* no _SC_PAGESIZE */
3558 # ifdef HAVE_SYS_PARAM_H
3559 # include <sys/param.h>
3560 # ifdef EXEC_PAGESIZE
3561 # define getpagesize() EXEC_PAGESIZE
3562 # else /* no EXEC_PAGESIZE */
3563 # ifdef NBPG
3564 # define getpagesize() NBPG * CLSIZE
3565 # ifndef CLSIZE
3566 # define CLSIZE 1
3567 # endif /* no CLSIZE */
3568 # else /* no NBPG */
3569 # ifdef NBPC
3570 # define getpagesize() NBPC
3571 # else /* no NBPC */
3572 # ifdef PAGESIZE
3573 # define getpagesize() PAGESIZE
3574 # endif /* PAGESIZE */
3575 # endif /* no NBPC */
3576 # endif /* no NBPG */
3577 # endif /* no EXEC_PAGESIZE */
3578 # else /* no HAVE_SYS_PARAM_H */
3579 # define getpagesize() 8192 /* punt totally */
3580 # endif /* no HAVE_SYS_PARAM_H */
3581 # endif /* no _SC_PAGESIZE */
3583 #endif /* no HAVE_GETPAGESIZE */
3585 #ifdef __cplusplus
3586 extern "C" { void *malloc(unsigned); }
3587 #else
3588 char *malloc();
3589 #endif
3592 main()
3594 char *data, *data2, *data3;
3595 int i, pagesize;
3596 int fd;
3598 pagesize = getpagesize();
3601 * First, make a file with some known garbage in it.
3603 data = malloc(pagesize);
3604 if (!data)
3605 exit(1);
3606 for (i = 0; i < pagesize; ++i)
3607 *(data + i) = rand();
3608 umask(0);
3609 fd = creat("conftestmmap", 0600);
3610 if (fd < 0)
3611 exit(1);
3612 if (write(fd, data, pagesize) != pagesize)
3613 exit(1);
3614 close(fd);
3617 * Next, try to mmap the file at a fixed address which
3618 * already has something else allocated at it. If we can,
3619 * also make sure that we see the same garbage.
3621 fd = open("conftestmmap", O_RDWR);
3622 if (fd < 0)
3623 exit(1);
3624 data2 = malloc(2 * pagesize);
3625 if (!data2)
3626 exit(1);
3627 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3628 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3629 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3630 exit(1);
3631 for (i = 0; i < pagesize; ++i)
3632 if (*(data + i) != *(data2 + i))
3633 exit(1);
3636 * Finally, make sure that changes to the mapped area
3637 * do not percolate back to the file as seen by read().
3638 * (This is a bug on some variants of i386 svr4.0.)
3640 for (i = 0; i < pagesize; ++i)
3641 *(data2 + i) = *(data2 + i) + 1;
3642 data3 = malloc(pagesize);
3643 if (!data3)
3644 exit(1);
3645 if (read(fd, data3, pagesize) != pagesize)
3646 exit(1);
3647 for (i = 0; i < pagesize; ++i)
3648 if (*(data + i) != *(data3 + i))
3649 exit(1);
3650 close(fd);
3651 unlink("conftestmmap");
3652 exit(0);
3656 if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3657 then
3658 ac_cv_func_mmap_fixed_mapped=yes
3659 else
3660 echo "configure: failed program was:" >&5
3661 cat conftest.$ac_ext >&5
3662 rm -fr conftest*
3663 ac_cv_func_mmap_fixed_mapped=no
3665 rm -fr conftest*
3670 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3671 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3672 cat >> confdefs.h <<\EOF
3673 #define HAVE_MMAP 1
3679 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3680 unistd.h values.h sys/param.h
3682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3683 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3684 echo "configure:3685: checking for $ac_hdr" >&5
3685 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3686 echo $ac_n "(cached) $ac_c" 1>&6
3687 else
3688 cat > conftest.$ac_ext <<EOF
3689 #line 3690 "configure"
3690 #include "confdefs.h"
3691 #include <$ac_hdr>
3693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3694 { (eval echo configure:3695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3696 if test -z "$ac_err"; then
3697 rm -rf conftest*
3698 eval "ac_cv_header_$ac_safe=yes"
3699 else
3700 echo "$ac_err" >&5
3701 echo "configure: failed program was:" >&5
3702 cat conftest.$ac_ext >&5
3703 rm -rf conftest*
3704 eval "ac_cv_header_$ac_safe=no"
3706 rm -f conftest*
3708 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3709 echo "$ac_t""yes" 1>&6
3710 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3711 cat >> confdefs.h <<EOF
3712 #define $ac_tr_hdr 1
3715 else
3716 echo "$ac_t""no" 1>&6
3718 done
3720 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3721 __argz_count __argz_stringify __argz_next
3723 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3724 echo "configure:3725: checking for $ac_func" >&5
3725 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3726 echo $ac_n "(cached) $ac_c" 1>&6
3727 else
3728 cat > conftest.$ac_ext <<EOF
3729 #line 3730 "configure"
3730 #include "confdefs.h"
3731 /* System header to define __stub macros and hopefully few prototypes,
3732 which can conflict with char $ac_func(); below. */
3733 #include <assert.h>
3734 /* Override any gcc2 internal prototype to avoid an error. */
3735 /* We use char because int might match the return type of a gcc2
3736 builtin and then its argument prototype would still apply. */
3737 char $ac_func();
3739 int main() {
3741 /* The GNU C library defines this for functions which it implements
3742 to always fail with ENOSYS. Some functions are actually named
3743 something starting with __ and the normal name is an alias. */
3744 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3745 choke me
3746 #else
3747 $ac_func();
3748 #endif
3750 ; return 0; }
3752 if { (eval echo configure:3753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3753 rm -rf conftest*
3754 eval "ac_cv_func_$ac_func=yes"
3755 else
3756 echo "configure: failed program was:" >&5
3757 cat conftest.$ac_ext >&5
3758 rm -rf conftest*
3759 eval "ac_cv_func_$ac_func=no"
3761 rm -f conftest*
3764 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3765 echo "$ac_t""yes" 1>&6
3766 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3767 cat >> confdefs.h <<EOF
3768 #define $ac_tr_func 1
3771 else
3772 echo "$ac_t""no" 1>&6
3774 done
3777 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3778 for ac_func in stpcpy
3780 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3781 echo "configure:3782: checking for $ac_func" >&5
3782 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3783 echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785 cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 /* System header to define __stub macros and hopefully few prototypes,
3789 which can conflict with char $ac_func(); below. */
3790 #include <assert.h>
3791 /* Override any gcc2 internal prototype to avoid an error. */
3792 /* We use char because int might match the return type of a gcc2
3793 builtin and then its argument prototype would still apply. */
3794 char $ac_func();
3796 int main() {
3798 /* The GNU C library defines this for functions which it implements
3799 to always fail with ENOSYS. Some functions are actually named
3800 something starting with __ and the normal name is an alias. */
3801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3802 choke me
3803 #else
3804 $ac_func();
3805 #endif
3807 ; return 0; }
3809 if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3810 rm -rf conftest*
3811 eval "ac_cv_func_$ac_func=yes"
3812 else
3813 echo "configure: failed program was:" >&5
3814 cat conftest.$ac_ext >&5
3815 rm -rf conftest*
3816 eval "ac_cv_func_$ac_func=no"
3818 rm -f conftest*
3821 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3822 echo "$ac_t""yes" 1>&6
3823 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3824 cat >> confdefs.h <<EOF
3825 #define $ac_tr_func 1
3828 else
3829 echo "$ac_t""no" 1>&6
3831 done
3834 if test "${ac_cv_func_stpcpy}" = "yes"; then
3835 cat >> confdefs.h <<\EOF
3836 #define HAVE_STPCPY 1
3841 if test $ac_cv_header_locale_h = yes; then
3842 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3843 echo "configure:3844: checking for LC_MESSAGES" >&5
3844 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3845 echo $ac_n "(cached) $ac_c" 1>&6
3846 else
3847 cat > conftest.$ac_ext <<EOF
3848 #line 3849 "configure"
3849 #include "confdefs.h"
3850 #include <locale.h>
3851 int main() {
3852 return LC_MESSAGES
3853 ; return 0; }
3855 if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3856 rm -rf conftest*
3857 am_cv_val_LC_MESSAGES=yes
3858 else
3859 echo "configure: failed program was:" >&5
3860 cat conftest.$ac_ext >&5
3861 rm -rf conftest*
3862 am_cv_val_LC_MESSAGES=no
3864 rm -f conftest*
3867 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3868 if test $am_cv_val_LC_MESSAGES = yes; then
3869 cat >> confdefs.h <<\EOF
3870 #define HAVE_LC_MESSAGES 1
3875 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3876 echo "configure:3877: checking whether NLS is requested" >&5
3877 # Check whether --enable-nls or --disable-nls was given.
3878 if test "${enable_nls+set}" = set; then
3879 enableval="$enable_nls"
3880 USE_NLS=$enableval
3881 else
3882 USE_NLS=yes
3885 echo "$ac_t""$USE_NLS" 1>&6
3888 USE_INCLUDED_LIBINTL=no
3890 if test "$USE_NLS" = "yes"; then
3891 cat >> confdefs.h <<\EOF
3892 #define ENABLE_NLS 1
3895 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3896 echo "configure:3897: checking whether included gettext is requested" >&5
3897 # Check whether --with-included-gettext or --without-included-gettext was given.
3898 if test "${with_included_gettext+set}" = set; then
3899 withval="$with_included_gettext"
3900 nls_cv_force_use_gnu_gettext=$withval
3901 else
3902 nls_cv_force_use_gnu_gettext=no
3905 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3907 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3908 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3909 nls_cv_header_intl=
3910 nls_cv_header_libgt=
3911 CATOBJEXT=NONE
3913 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3914 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3915 echo "configure:3916: checking for libintl.h" >&5
3916 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3917 echo $ac_n "(cached) $ac_c" 1>&6
3918 else
3919 cat > conftest.$ac_ext <<EOF
3920 #line 3921 "configure"
3921 #include "confdefs.h"
3922 #include <libintl.h>
3924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3925 { (eval echo configure:3926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3927 if test -z "$ac_err"; then
3928 rm -rf conftest*
3929 eval "ac_cv_header_$ac_safe=yes"
3930 else
3931 echo "$ac_err" >&5
3932 echo "configure: failed program was:" >&5
3933 cat conftest.$ac_ext >&5
3934 rm -rf conftest*
3935 eval "ac_cv_header_$ac_safe=no"
3937 rm -f conftest*
3939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3940 echo "$ac_t""yes" 1>&6
3941 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3942 echo "configure:3943: checking for gettext in libc" >&5
3943 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3944 echo $ac_n "(cached) $ac_c" 1>&6
3945 else
3946 cat > conftest.$ac_ext <<EOF
3947 #line 3948 "configure"
3948 #include "confdefs.h"
3949 #include <libintl.h>
3950 int main() {
3951 return (int) gettext ("")
3952 ; return 0; }
3954 if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3955 rm -rf conftest*
3956 gt_cv_func_gettext_libc=yes
3957 else
3958 echo "configure: failed program was:" >&5
3959 cat conftest.$ac_ext >&5
3960 rm -rf conftest*
3961 gt_cv_func_gettext_libc=no
3963 rm -f conftest*
3966 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3968 if test "$gt_cv_func_gettext_libc" != "yes"; then
3969 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3970 echo "configure:3971: checking for bindtextdomain in -lintl" >&5
3971 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3972 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3973 echo $ac_n "(cached) $ac_c" 1>&6
3974 else
3975 ac_save_LIBS="$LIBS"
3976 LIBS="-lintl $LIBS"
3977 cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980 /* Override any gcc2 internal prototype to avoid an error. */
3981 /* We use char because int might match the return type of a gcc2
3982 builtin and then its argument prototype would still apply. */
3983 char bindtextdomain();
3985 int main() {
3986 bindtextdomain()
3987 ; return 0; }
3989 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3990 rm -rf conftest*
3991 eval "ac_cv_lib_$ac_lib_var=yes"
3992 else
3993 echo "configure: failed program was:" >&5
3994 cat conftest.$ac_ext >&5
3995 rm -rf conftest*
3996 eval "ac_cv_lib_$ac_lib_var=no"
3998 rm -f conftest*
3999 LIBS="$ac_save_LIBS"
4002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4003 echo "$ac_t""yes" 1>&6
4004 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4005 echo "configure:4006: checking for gettext in libintl" >&5
4006 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
4007 echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009 cat > conftest.$ac_ext <<EOF
4010 #line 4011 "configure"
4011 #include "confdefs.h"
4013 int main() {
4014 return (int) gettext ("")
4015 ; return 0; }
4017 if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4018 rm -rf conftest*
4019 gt_cv_func_gettext_libintl=yes
4020 else
4021 echo "configure: failed program was:" >&5
4022 cat conftest.$ac_ext >&5
4023 rm -rf conftest*
4024 gt_cv_func_gettext_libintl=no
4026 rm -f conftest*
4029 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
4030 else
4031 echo "$ac_t""no" 1>&6
4036 if test "$gt_cv_func_gettext_libc" = "yes" \
4037 || test "$gt_cv_func_gettext_libintl" = "yes"; then
4038 cat >> confdefs.h <<\EOF
4039 #define HAVE_GETTEXT 1
4042 # Extract the first word of "msgfmt", so it can be a program name with args.
4043 set dummy msgfmt; ac_word=$2
4044 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4045 echo "configure:4046: checking for $ac_word" >&5
4046 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4047 echo $ac_n "(cached) $ac_c" 1>&6
4048 else
4049 case "$MSGFMT" in
4051 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4054 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4055 for ac_dir in $PATH; do
4056 test -z "$ac_dir" && ac_dir=.
4057 if test -f $ac_dir/$ac_word; then
4058 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4059 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4060 break
4063 done
4064 IFS="$ac_save_ifs"
4065 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
4067 esac
4069 MSGFMT="$ac_cv_path_MSGFMT"
4070 if test -n "$MSGFMT"; then
4071 echo "$ac_t""$MSGFMT" 1>&6
4072 else
4073 echo "$ac_t""no" 1>&6
4075 if test "$MSGFMT" != "no"; then
4076 for ac_func in dcgettext
4078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4079 echo "configure:4080: checking for $ac_func" >&5
4080 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4081 echo $ac_n "(cached) $ac_c" 1>&6
4082 else
4083 cat > conftest.$ac_ext <<EOF
4084 #line 4085 "configure"
4085 #include "confdefs.h"
4086 /* System header to define __stub macros and hopefully few prototypes,
4087 which can conflict with char $ac_func(); below. */
4088 #include <assert.h>
4089 /* Override any gcc2 internal prototype to avoid an error. */
4090 /* We use char because int might match the return type of a gcc2
4091 builtin and then its argument prototype would still apply. */
4092 char $ac_func();
4094 int main() {
4096 /* The GNU C library defines this for functions which it implements
4097 to always fail with ENOSYS. Some functions are actually named
4098 something starting with __ and the normal name is an alias. */
4099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4100 choke me
4101 #else
4102 $ac_func();
4103 #endif
4105 ; return 0; }
4107 if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4108 rm -rf conftest*
4109 eval "ac_cv_func_$ac_func=yes"
4110 else
4111 echo "configure: failed program was:" >&5
4112 cat conftest.$ac_ext >&5
4113 rm -rf conftest*
4114 eval "ac_cv_func_$ac_func=no"
4116 rm -f conftest*
4119 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4120 echo "$ac_t""yes" 1>&6
4121 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4122 cat >> confdefs.h <<EOF
4123 #define $ac_tr_func 1
4126 else
4127 echo "$ac_t""no" 1>&6
4129 done
4131 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4132 set dummy gmsgfmt; ac_word=$2
4133 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4134 echo "configure:4135: checking for $ac_word" >&5
4135 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4136 echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138 case "$GMSGFMT" in
4140 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4142 ?:/*)
4143 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4146 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4147 ac_dummy="$PATH"
4148 for ac_dir in $ac_dummy; do
4149 test -z "$ac_dir" && ac_dir=.
4150 if test -f $ac_dir/$ac_word; then
4151 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4152 break
4154 done
4155 IFS="$ac_save_ifs"
4156 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4158 esac
4160 GMSGFMT="$ac_cv_path_GMSGFMT"
4161 if test -n "$GMSGFMT"; then
4162 echo "$ac_t""$GMSGFMT" 1>&6
4163 else
4164 echo "$ac_t""no" 1>&6
4167 # Extract the first word of "xgettext", so it can be a program name with args.
4168 set dummy xgettext; ac_word=$2
4169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4170 echo "configure:4171: checking for $ac_word" >&5
4171 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4172 echo $ac_n "(cached) $ac_c" 1>&6
4173 else
4174 case "$XGETTEXT" in
4176 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4179 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4180 for ac_dir in $PATH; do
4181 test -z "$ac_dir" && ac_dir=.
4182 if test -f $ac_dir/$ac_word; then
4183 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4184 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4185 break
4188 done
4189 IFS="$ac_save_ifs"
4190 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4192 esac
4194 XGETTEXT="$ac_cv_path_XGETTEXT"
4195 if test -n "$XGETTEXT"; then
4196 echo "$ac_t""$XGETTEXT" 1>&6
4197 else
4198 echo "$ac_t""no" 1>&6
4201 cat > conftest.$ac_ext <<EOF
4202 #line 4203 "configure"
4203 #include "confdefs.h"
4205 int main() {
4206 extern int _nl_msg_cat_cntr;
4207 return _nl_msg_cat_cntr
4208 ; return 0; }
4210 if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4211 rm -rf conftest*
4212 CATOBJEXT=.gmo
4213 DATADIRNAME=share
4214 else
4215 echo "configure: failed program was:" >&5
4216 cat conftest.$ac_ext >&5
4217 rm -rf conftest*
4218 CATOBJEXT=.mo
4219 DATADIRNAME=lib
4221 rm -f conftest*
4222 INSTOBJEXT=.mo
4226 else
4227 echo "$ac_t""no" 1>&6
4232 if test "$CATOBJEXT" = "NONE"; then
4233 nls_cv_use_gnu_gettext=yes
4237 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4238 INTLOBJS="\$(GETTOBJS)"
4239 # Extract the first word of "msgfmt", so it can be a program name with args.
4240 set dummy msgfmt; ac_word=$2
4241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4242 echo "configure:4243: checking for $ac_word" >&5
4243 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4244 echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246 case "$MSGFMT" in
4248 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4251 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4252 for ac_dir in $PATH; do
4253 test -z "$ac_dir" && ac_dir=.
4254 if test -f $ac_dir/$ac_word; then
4255 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4256 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4257 break
4260 done
4261 IFS="$ac_save_ifs"
4262 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4264 esac
4266 MSGFMT="$ac_cv_path_MSGFMT"
4267 if test -n "$MSGFMT"; then
4268 echo "$ac_t""$MSGFMT" 1>&6
4269 else
4270 echo "$ac_t""no" 1>&6
4273 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4274 set dummy gmsgfmt; ac_word=$2
4275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4276 echo "configure:4277: checking for $ac_word" >&5
4277 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4278 echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280 case "$GMSGFMT" in
4282 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4284 ?:/*)
4285 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4288 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4289 ac_dummy="$PATH"
4290 for ac_dir in $ac_dummy; do
4291 test -z "$ac_dir" && ac_dir=.
4292 if test -f $ac_dir/$ac_word; then
4293 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4294 break
4296 done
4297 IFS="$ac_save_ifs"
4298 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4300 esac
4302 GMSGFMT="$ac_cv_path_GMSGFMT"
4303 if test -n "$GMSGFMT"; then
4304 echo "$ac_t""$GMSGFMT" 1>&6
4305 else
4306 echo "$ac_t""no" 1>&6
4309 # Extract the first word of "xgettext", so it can be a program name with args.
4310 set dummy xgettext; ac_word=$2
4311 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4312 echo "configure:4313: checking for $ac_word" >&5
4313 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4314 echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316 case "$XGETTEXT" in
4318 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4321 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4322 for ac_dir in $PATH; do
4323 test -z "$ac_dir" && ac_dir=.
4324 if test -f $ac_dir/$ac_word; then
4325 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4326 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4327 break
4330 done
4331 IFS="$ac_save_ifs"
4332 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4334 esac
4336 XGETTEXT="$ac_cv_path_XGETTEXT"
4337 if test -n "$XGETTEXT"; then
4338 echo "$ac_t""$XGETTEXT" 1>&6
4339 else
4340 echo "$ac_t""no" 1>&6
4344 USE_INCLUDED_LIBINTL=yes
4345 CATOBJEXT=.gmo
4346 INSTOBJEXT=.mo
4347 DATADIRNAME=share
4348 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4349 INTLLIBS=$INTLDEPS
4350 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4351 nls_cv_header_intl=libintl.h
4352 nls_cv_header_libgt=libgettext.h
4355 if test "$XGETTEXT" != ":"; then
4356 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4358 else
4359 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4360 XGETTEXT=":"
4364 # We need to process the po/ directory.
4365 POSUB=po
4366 else
4367 DATADIRNAME=share
4368 nls_cv_header_intl=libintl.h
4369 nls_cv_header_libgt=libgettext.h
4372 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4373 # because some of the sources are only built for this goal.
4374 if test "$PACKAGE" = gettext; then
4375 USE_NLS=yes
4376 USE_INCLUDED_LIBINTL=yes
4379 for lang in $ALL_LINGUAS; do
4380 GMOFILES="$GMOFILES $lang.gmo"
4381 POFILES="$POFILES $lang.po"
4382 done
4397 if test "x$CATOBJEXT" != "x"; then
4398 if test "x$ALL_LINGUAS" = "x"; then
4399 LINGUAS=
4400 else
4401 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4402 echo "configure:4403: checking for catalogs to be installed" >&5
4403 NEW_LINGUAS=
4404 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4405 case "$ALL_LINGUAS" in
4406 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4407 esac
4408 done
4409 LINGUAS=$NEW_LINGUAS
4410 echo "$ac_t""$LINGUAS" 1>&6
4413 if test -n "$LINGUAS"; then
4414 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4418 if test $ac_cv_header_locale_h = yes; then
4419 INCLUDE_LOCALE_H="#include <locale.h>"
4420 else
4421 INCLUDE_LOCALE_H="\
4422 /* The system does not provide the header <locale.h>. Take care yourself. */"
4426 if test -f $srcdir/po2tbl.sed.in; then
4427 if test "$CATOBJEXT" = ".cat"; then
4428 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4429 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4430 echo "configure:4431: checking for linux/version.h" >&5
4431 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4432 echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4434 cat > conftest.$ac_ext <<EOF
4435 #line 4436 "configure"
4436 #include "confdefs.h"
4437 #include <linux/version.h>
4439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4440 { (eval echo configure:4441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4442 if test -z "$ac_err"; then
4443 rm -rf conftest*
4444 eval "ac_cv_header_$ac_safe=yes"
4445 else
4446 echo "$ac_err" >&5
4447 echo "configure: failed program was:" >&5
4448 cat conftest.$ac_ext >&5
4449 rm -rf conftest*
4450 eval "ac_cv_header_$ac_safe=no"
4452 rm -f conftest*
4454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4455 echo "$ac_t""yes" 1>&6
4456 msgformat=linux
4457 else
4458 echo "$ac_t""no" 1>&6
4459 msgformat=xopen
4463 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4465 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4466 $srcdir/po2tbl.sed.in > po2tbl.sed
4469 if test "$PACKAGE" = "gettext"; then
4470 GT_NO="#NO#"
4471 GT_YES=
4472 else
4473 GT_NO=
4474 GT_YES="#YES#"
4479 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4485 if test -d $srcdir/po; then
4486 test -d po || mkdir po
4487 if test "x$srcdir" != "x."; then
4488 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4489 posrcprefix="$srcdir/"
4490 else
4491 posrcprefix="../$srcdir/"
4493 else
4494 posrcprefix="../"
4496 rm -f po/POTFILES
4497 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4498 < $srcdir/po/POTFILES.in > po/POTFILES
4502 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4503 echo "configure:4504: checking whether to enable maintainer-specific portions of Makefiles" >&5
4504 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4505 if test "${enable_maintainer_mode+set}" = set; then
4506 enableval="$enable_maintainer_mode"
4507 USE_MAINTAINER_MODE=$enableval
4508 else
4509 USE_MAINTAINER_MODE=no
4512 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4515 if test $USE_MAINTAINER_MODE = yes; then
4516 MAINTAINER_MODE_TRUE=
4517 MAINTAINER_MODE_FALSE='#'
4518 else
4519 MAINTAINER_MODE_TRUE='#'
4520 MAINTAINER_MODE_FALSE=
4522 MAINT=$MAINTAINER_MODE_TRUE
4525 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4526 echo "configure:4527: checking for Cygwin environment" >&5
4527 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
4528 echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530 cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4534 int main() {
4536 #ifndef __CYGWIN__
4537 #define __CYGWIN__ __CYGWIN32__
4538 #endif
4539 return __CYGWIN__;
4540 ; return 0; }
4542 if { (eval echo configure:4543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4543 rm -rf conftest*
4544 ac_cv_cygwin=yes
4545 else
4546 echo "configure: failed program was:" >&5
4547 cat conftest.$ac_ext >&5
4548 rm -rf conftest*
4549 ac_cv_cygwin=no
4551 rm -f conftest*
4552 rm -f conftest*
4555 echo "$ac_t""$ac_cv_cygwin" 1>&6
4556 CYGWIN=
4557 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4558 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4559 echo "configure:4560: checking for mingw32 environment" >&5
4560 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4561 echo $ac_n "(cached) $ac_c" 1>&6
4562 else
4563 cat > conftest.$ac_ext <<EOF
4564 #line 4565 "configure"
4565 #include "confdefs.h"
4567 int main() {
4568 return __MINGW32__;
4569 ; return 0; }
4571 if { (eval echo configure:4572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4572 rm -rf conftest*
4573 ac_cv_mingw32=yes
4574 else
4575 echo "configure: failed program was:" >&5
4576 cat conftest.$ac_ext >&5
4577 rm -rf conftest*
4578 ac_cv_mingw32=no
4580 rm -f conftest*
4581 rm -f conftest*
4584 echo "$ac_t""$ac_cv_mingw32" 1>&6
4585 MINGW32=
4586 test "$ac_cv_mingw32" = yes && MINGW32=yes
4589 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4590 echo "configure:4591: checking for executable suffix" >&5
4591 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4592 echo $ac_n "(cached) $ac_c" 1>&6
4593 else
4594 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4595 ac_cv_exeext=.exe
4596 else
4597 rm -f conftest*
4598 echo 'int main () { return 0; }' > conftest.$ac_ext
4599 ac_cv_exeext=
4600 if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4601 for file in conftest.*; do
4602 case $file in
4603 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4604 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4605 esac
4606 done
4607 else
4608 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4610 rm -f conftest*
4611 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4615 EXEEXT=""
4616 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4617 echo "$ac_t""${ac_cv_exeext}" 1>&6
4618 ac_exeext=$EXEEXT
4621 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
4623 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4624 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_hdr" >&5
4626 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4627 echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 #include <$ac_hdr>
4634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4635 { (eval echo configure:4636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4637 if test -z "$ac_err"; then
4638 rm -rf conftest*
4639 eval "ac_cv_header_$ac_safe=yes"
4640 else
4641 echo "$ac_err" >&5
4642 echo "configure: failed program was:" >&5
4643 cat conftest.$ac_ext >&5
4644 rm -rf conftest*
4645 eval "ac_cv_header_$ac_safe=no"
4647 rm -f conftest*
4649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4650 echo "$ac_t""yes" 1>&6
4651 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4652 cat >> confdefs.h <<EOF
4653 #define $ac_tr_hdr 1
4656 else
4657 echo "$ac_t""no" 1>&6
4659 done
4662 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
4663 # people who are not cross-compiling but are compiling cross-assemblers.
4664 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
4665 echo "configure:4666: checking whether compiling a cross-assembler" >&5
4666 if test "${host}" = "${target}"; then
4667 cross_gas=no
4668 else
4669 cross_gas=yes
4670 cat >> confdefs.h <<\EOF
4671 #define CROSS_COMPILE 1
4675 echo "$ac_t""$cross_gas" 1>&6
4677 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4678 # for constant arguments. Useless!
4679 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4680 echo "configure:4681: checking for working alloca.h" >&5
4681 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4682 echo $ac_n "(cached) $ac_c" 1>&6
4683 else
4684 cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687 #include <alloca.h>
4688 int main() {
4689 char *p = alloca(2 * sizeof(int));
4690 ; return 0; }
4692 if { (eval echo configure:4693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4693 rm -rf conftest*
4694 ac_cv_header_alloca_h=yes
4695 else
4696 echo "configure: failed program was:" >&5
4697 cat conftest.$ac_ext >&5
4698 rm -rf conftest*
4699 ac_cv_header_alloca_h=no
4701 rm -f conftest*
4704 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4705 if test $ac_cv_header_alloca_h = yes; then
4706 cat >> confdefs.h <<\EOF
4707 #define HAVE_ALLOCA_H 1
4712 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4713 echo "configure:4714: checking for alloca" >&5
4714 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4715 echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717 cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4721 #ifdef __GNUC__
4722 # define alloca __builtin_alloca
4723 #else
4724 # ifdef _MSC_VER
4725 # include <malloc.h>
4726 # define alloca _alloca
4727 # else
4728 # if HAVE_ALLOCA_H
4729 # include <alloca.h>
4730 # else
4731 # ifdef _AIX
4732 #pragma alloca
4733 # else
4734 # ifndef alloca /* predefined by HP cc +Olibcalls */
4735 char *alloca ();
4736 # endif
4737 # endif
4738 # endif
4739 # endif
4740 #endif
4742 int main() {
4743 char *p = (char *) alloca(1);
4744 ; return 0; }
4746 if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4747 rm -rf conftest*
4748 ac_cv_func_alloca_works=yes
4749 else
4750 echo "configure: failed program was:" >&5
4751 cat conftest.$ac_ext >&5
4752 rm -rf conftest*
4753 ac_cv_func_alloca_works=no
4755 rm -f conftest*
4758 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4759 if test $ac_cv_func_alloca_works = yes; then
4760 cat >> confdefs.h <<\EOF
4761 #define HAVE_ALLOCA 1
4766 if test $ac_cv_func_alloca_works = no; then
4767 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4768 # that cause trouble. Some versions do not even contain alloca or
4769 # contain a buggy version. If you still want to use their alloca,
4770 # use ar to extract alloca.o from them instead of compiling alloca.c.
4771 ALLOCA=alloca.${ac_objext}
4772 cat >> confdefs.h <<\EOF
4773 #define C_ALLOCA 1
4777 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4778 echo "configure:4779: checking whether alloca needs Cray hooks" >&5
4779 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4780 echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782 cat > conftest.$ac_ext <<EOF
4783 #line 4784 "configure"
4784 #include "confdefs.h"
4785 #if defined(CRAY) && ! defined(CRAY2)
4786 webecray
4787 #else
4788 wenotbecray
4789 #endif
4792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4793 egrep "webecray" >/dev/null 2>&1; then
4794 rm -rf conftest*
4795 ac_cv_os_cray=yes
4796 else
4797 rm -rf conftest*
4798 ac_cv_os_cray=no
4800 rm -f conftest*
4804 echo "$ac_t""$ac_cv_os_cray" 1>&6
4805 if test $ac_cv_os_cray = yes; then
4806 for ac_func in _getb67 GETB67 getb67; do
4807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4808 echo "configure:4809: checking for $ac_func" >&5
4809 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4810 echo $ac_n "(cached) $ac_c" 1>&6
4811 else
4812 cat > conftest.$ac_ext <<EOF
4813 #line 4814 "configure"
4814 #include "confdefs.h"
4815 /* System header to define __stub macros and hopefully few prototypes,
4816 which can conflict with char $ac_func(); below. */
4817 #include <assert.h>
4818 /* Override any gcc2 internal prototype to avoid an error. */
4819 /* We use char because int might match the return type of a gcc2
4820 builtin and then its argument prototype would still apply. */
4821 char $ac_func();
4823 int main() {
4825 /* The GNU C library defines this for functions which it implements
4826 to always fail with ENOSYS. Some functions are actually named
4827 something starting with __ and the normal name is an alias. */
4828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4829 choke me
4830 #else
4831 $ac_func();
4832 #endif
4834 ; return 0; }
4836 if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4837 rm -rf conftest*
4838 eval "ac_cv_func_$ac_func=yes"
4839 else
4840 echo "configure: failed program was:" >&5
4841 cat conftest.$ac_ext >&5
4842 rm -rf conftest*
4843 eval "ac_cv_func_$ac_func=no"
4845 rm -f conftest*
4848 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4849 echo "$ac_t""yes" 1>&6
4850 cat >> confdefs.h <<EOF
4851 #define CRAY_STACKSEG_END $ac_func
4854 break
4855 else
4856 echo "$ac_t""no" 1>&6
4859 done
4862 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4863 echo "configure:4864: checking stack direction for C alloca" >&5
4864 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4865 echo $ac_n "(cached) $ac_c" 1>&6
4866 else
4867 if test "$cross_compiling" = yes; then
4868 ac_cv_c_stack_direction=0
4869 else
4870 cat > conftest.$ac_ext <<EOF
4871 #line 4872 "configure"
4872 #include "confdefs.h"
4873 find_stack_direction ()
4875 static char *addr = 0;
4876 auto char dummy;
4877 if (addr == 0)
4879 addr = &dummy;
4880 return find_stack_direction ();
4882 else
4883 return (&dummy > addr) ? 1 : -1;
4885 main ()
4887 exit (find_stack_direction() < 0);
4890 if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4891 then
4892 ac_cv_c_stack_direction=1
4893 else
4894 echo "configure: failed program was:" >&5
4895 cat conftest.$ac_ext >&5
4896 rm -fr conftest*
4897 ac_cv_c_stack_direction=-1
4899 rm -fr conftest*
4904 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4905 cat >> confdefs.h <<EOF
4906 #define STACK_DIRECTION $ac_cv_c_stack_direction
4911 echo $ac_n "checking for inline""... $ac_c" 1>&6
4912 echo "configure:4913: checking for inline" >&5
4913 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4914 echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916 ac_cv_c_inline=no
4917 for ac_kw in inline __inline__ __inline; do
4918 cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4922 int main() {
4923 } $ac_kw foo() {
4924 ; return 0; }
4926 if { (eval echo configure:4927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4927 rm -rf conftest*
4928 ac_cv_c_inline=$ac_kw; break
4929 else
4930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4933 rm -f conftest*
4934 done
4938 echo "$ac_t""$ac_cv_c_inline" 1>&6
4939 case "$ac_cv_c_inline" in
4940 inline | yes) ;;
4941 no) cat >> confdefs.h <<\EOF
4942 #define inline
4945 *) cat >> confdefs.h <<EOF
4946 #define inline $ac_cv_c_inline
4949 esac
4952 # VMS doesn't have unlink.
4953 for ac_func in unlink remove
4955 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4956 echo "configure:4957: checking for $ac_func" >&5
4957 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4958 echo $ac_n "(cached) $ac_c" 1>&6
4959 else
4960 cat > conftest.$ac_ext <<EOF
4961 #line 4962 "configure"
4962 #include "confdefs.h"
4963 /* System header to define __stub macros and hopefully few prototypes,
4964 which can conflict with char $ac_func(); below. */
4965 #include <assert.h>
4966 /* Override any gcc2 internal prototype to avoid an error. */
4967 /* We use char because int might match the return type of a gcc2
4968 builtin and then its argument prototype would still apply. */
4969 char $ac_func();
4971 int main() {
4973 /* The GNU C library defines this for functions which it implements
4974 to always fail with ENOSYS. Some functions are actually named
4975 something starting with __ and the normal name is an alias. */
4976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4977 choke me
4978 #else
4979 $ac_func();
4980 #endif
4982 ; return 0; }
4984 if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985 rm -rf conftest*
4986 eval "ac_cv_func_$ac_func=yes"
4987 else
4988 echo "configure: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4990 rm -rf conftest*
4991 eval "ac_cv_func_$ac_func=no"
4993 rm -f conftest*
4996 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4997 echo "$ac_t""yes" 1>&6
4998 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4999 cat >> confdefs.h <<EOF
5000 #define $ac_tr_func 1
5002 break
5003 else
5004 echo "$ac_t""no" 1>&6
5006 done
5009 # Some systems don't have sbrk().
5010 for ac_func in sbrk
5012 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5013 echo "configure:5014: checking for $ac_func" >&5
5014 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5015 echo $ac_n "(cached) $ac_c" 1>&6
5016 else
5017 cat > conftest.$ac_ext <<EOF
5018 #line 5019 "configure"
5019 #include "confdefs.h"
5020 /* System header to define __stub macros and hopefully few prototypes,
5021 which can conflict with char $ac_func(); below. */
5022 #include <assert.h>
5023 /* Override any gcc2 internal prototype to avoid an error. */
5024 /* We use char because int might match the return type of a gcc2
5025 builtin and then its argument prototype would still apply. */
5026 char $ac_func();
5028 int main() {
5030 /* The GNU C library defines this for functions which it implements
5031 to always fail with ENOSYS. Some functions are actually named
5032 something starting with __ and the normal name is an alias. */
5033 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5034 choke me
5035 #else
5036 $ac_func();
5037 #endif
5039 ; return 0; }
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5042 rm -rf conftest*
5043 eval "ac_cv_func_$ac_func=yes"
5044 else
5045 echo "configure: failed program was:" >&5
5046 cat conftest.$ac_ext >&5
5047 rm -rf conftest*
5048 eval "ac_cv_func_$ac_func=no"
5050 rm -f conftest*
5053 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5054 echo "$ac_t""yes" 1>&6
5055 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5056 cat >> confdefs.h <<EOF
5057 #define $ac_tr_func 1
5060 else
5061 echo "$ac_t""no" 1>&6
5063 done
5066 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
5067 # enough, but on some of those systems, the assert macro relies on requoting
5068 # working properly!
5069 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
5070 echo "configure:5071: checking for working assert macro" >&5
5071 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
5072 echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074 cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077 #include <assert.h>
5078 #include <stdio.h>
5079 int main() {
5081 /* check for requoting problems */
5082 static int a, b, c, d;
5083 static char *s;
5084 assert (!strcmp(s, "foo bar baz quux"));
5085 /* check for newline handling */
5086 assert (a == b
5087 || c == d);
5089 ; return 0; }
5091 if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5092 rm -rf conftest*
5093 gas_cv_assert_ok=yes
5094 else
5095 echo "configure: failed program was:" >&5
5096 cat conftest.$ac_ext >&5
5097 rm -rf conftest*
5098 gas_cv_assert_ok=no
5100 rm -f conftest*
5102 echo "$ac_t""$gas_cv_assert_ok" 1>&6
5103 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
5104 #define BROKEN_ASSERT 1
5109 # On some systems, the system header files may not declare malloc, realloc,
5110 # and free. There are places where gas needs these functions to have been
5111 # declared -- such as when taking their addresses.
5112 gas_test_headers="
5113 #ifdef HAVE_MEMORY_H
5114 #include <memory.h>
5115 #endif
5116 #ifdef HAVE_STRING_H
5117 #include <string.h>
5118 #else
5119 #ifdef HAVE_STRINGS_H
5120 #include <strings.h>
5121 #endif
5122 #endif
5123 #ifdef HAVE_STDLIB_H
5124 #include <stdlib.h>
5125 #endif
5126 #ifdef HAVE_UNISTD_H
5127 #include <unistd.h>
5128 #endif
5131 echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
5132 echo "configure:5133: checking whether declaration is required for strstr" >&5
5133 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
5134 echo $ac_n "(cached) $ac_c" 1>&6
5135 else
5136 cat > conftest.$ac_ext <<EOF
5137 #line 5138 "configure"
5138 #include "confdefs.h"
5139 $gas_test_headers
5140 int main() {
5142 typedef char *(*f)();
5143 f x;
5144 x = (f) strstr;
5146 ; return 0; }
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149 rm -rf conftest*
5150 gas_cv_decl_needed_strstr=no
5151 else
5152 echo "configure: failed program was:" >&5
5153 cat conftest.$ac_ext >&5
5154 rm -rf conftest*
5155 gas_cv_decl_needed_strstr=yes
5157 rm -f conftest*
5159 echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
5160 if test $gas_cv_decl_needed_strstr = yes; then
5161 cat >> confdefs.h <<\EOF
5162 #define NEED_DECLARATION_STRSTR 1
5168 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
5169 echo "configure:5170: checking whether declaration is required for malloc" >&5
5170 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
5171 echo $ac_n "(cached) $ac_c" 1>&6
5172 else
5173 cat > conftest.$ac_ext <<EOF
5174 #line 5175 "configure"
5175 #include "confdefs.h"
5176 $gas_test_headers
5177 int main() {
5179 typedef char *(*f)();
5180 f x;
5181 x = (f) malloc;
5183 ; return 0; }
5185 if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5186 rm -rf conftest*
5187 gas_cv_decl_needed_malloc=no
5188 else
5189 echo "configure: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191 rm -rf conftest*
5192 gas_cv_decl_needed_malloc=yes
5194 rm -f conftest*
5196 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
5197 if test $gas_cv_decl_needed_malloc = yes; then
5198 cat >> confdefs.h <<\EOF
5199 #define NEED_DECLARATION_MALLOC 1
5205 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
5206 echo "configure:5207: checking whether declaration is required for free" >&5
5207 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
5208 echo $ac_n "(cached) $ac_c" 1>&6
5209 else
5210 cat > conftest.$ac_ext <<EOF
5211 #line 5212 "configure"
5212 #include "confdefs.h"
5213 $gas_test_headers
5214 int main() {
5216 typedef void (*f)();
5217 f x;
5218 x = (f) free;
5220 ; return 0; }
5222 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5223 rm -rf conftest*
5224 gas_cv_decl_needed_free=no
5225 else
5226 echo "configure: failed program was:" >&5
5227 cat conftest.$ac_ext >&5
5228 rm -rf conftest*
5229 gas_cv_decl_needed_free=yes
5231 rm -f conftest*
5233 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
5234 if test $gas_cv_decl_needed_free = yes; then
5235 cat >> confdefs.h <<\EOF
5236 #define NEED_DECLARATION_FREE 1
5242 echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
5243 echo "configure:5244: checking whether declaration is required for sbrk" >&5
5244 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
5245 echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247 cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 $gas_test_headers
5251 int main() {
5253 typedef char *(*f)();
5254 f x;
5255 x = (f) sbrk;
5257 ; return 0; }
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5260 rm -rf conftest*
5261 gas_cv_decl_needed_sbrk=no
5262 else
5263 echo "configure: failed program was:" >&5
5264 cat conftest.$ac_ext >&5
5265 rm -rf conftest*
5266 gas_cv_decl_needed_sbrk=yes
5268 rm -f conftest*
5270 echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
5271 if test $gas_cv_decl_needed_sbrk = yes; then
5272 cat >> confdefs.h <<\EOF
5273 #define NEED_DECLARATION_SBRK 1
5279 echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
5280 echo "configure:5281: checking whether declaration is required for environ" >&5
5281 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then
5282 echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284 cat > conftest.$ac_ext <<EOF
5285 #line 5286 "configure"
5286 #include "confdefs.h"
5287 $gas_test_headers
5288 int main() {
5290 typedef char **f;
5291 f x;
5292 x = (f) environ;
5294 ; return 0; }
5296 if { (eval echo configure:5297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5297 rm -rf conftest*
5298 gas_cv_decl_needed_environ=no
5299 else
5300 echo "configure: failed program was:" >&5
5301 cat conftest.$ac_ext >&5
5302 rm -rf conftest*
5303 gas_cv_decl_needed_environ=yes
5305 rm -f conftest*
5307 echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6
5308 if test $gas_cv_decl_needed_environ = yes; then
5309 cat >> confdefs.h <<\EOF
5310 #define NEED_DECLARATION_ENVIRON 1
5316 # Does errno.h declare errno, or do we have to add a separate declaration
5317 # for it?
5319 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
5320 echo "configure:5321: checking whether declaration is required for errno" >&5
5321 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
5322 echo $ac_n "(cached) $ac_c" 1>&6
5323 else
5324 cat > conftest.$ac_ext <<EOF
5325 #line 5326 "configure"
5326 #include "confdefs.h"
5328 #ifdef HAVE_ERRNO_H
5329 #include <errno.h>
5330 #endif
5332 int main() {
5334 typedef int f;
5335 f x;
5336 x = (f) errno;
5338 ; return 0; }
5340 if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5341 rm -rf conftest*
5342 gas_cv_decl_needed_errno=no
5343 else
5344 echo "configure: failed program was:" >&5
5345 cat conftest.$ac_ext >&5
5346 rm -rf conftest*
5347 gas_cv_decl_needed_errno=yes
5349 rm -f conftest*
5351 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
5352 if test $gas_cv_decl_needed_errno = yes; then
5353 cat >> confdefs.h <<\EOF
5354 #define NEED_DECLARATION_ERRNO 1
5362 trap '' 1 2 15
5363 cat > confcache <<\EOF
5364 # This file is a shell script that caches the results of configure
5365 # tests run on this system so they can be shared between configure
5366 # scripts and configure runs. It is not useful on other systems.
5367 # If it contains results you don't want to keep, you may remove or edit it.
5369 # By default, configure uses ./config.cache as the cache file,
5370 # creating it if it does not exist already. You can give configure
5371 # the --cache-file=FILE option to use a different cache file; that is
5372 # what configure does when it calls configure scripts in
5373 # subdirectories, so they share the cache.
5374 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5375 # config.status only pays attention to the cache file if you give it the
5376 # --recheck option to rerun configure.
5379 # The following way of writing the cache mishandles newlines in values,
5380 # but we know of no workaround that is simple, portable, and efficient.
5381 # So, don't put newlines in cache variables' values.
5382 # Ultrix sh set writes to stderr and can't be redirected directly,
5383 # and sets the high bit in the cache file unless we assign to the vars.
5384 (set) 2>&1 |
5385 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5386 *ac_space=\ *)
5387 # `set' does not quote correctly, so add quotes (double-quote substitution
5388 # turns \\\\ into \\, and sed turns \\ into \).
5389 sed -n \
5390 -e "s/'/'\\\\''/g" \
5391 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5394 # `set' quotes correctly as required by POSIX, so do not add quotes.
5395 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5397 esac >> confcache
5398 if cmp -s $cache_file confcache; then
5400 else
5401 if test -w $cache_file; then
5402 echo "updating cache $cache_file"
5403 cat confcache > $cache_file
5404 else
5405 echo "not updating unwritable cache $cache_file"
5408 rm -f confcache
5410 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5412 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5413 # Let make expand exec_prefix.
5414 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5416 # Any assignment to VPATH causes Sun make to only execute
5417 # the first set of double-colon rules, so remove it if not needed.
5418 # If there is a colon in the path, we need to keep it.
5419 if test "x$srcdir" = x.; then
5420 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5423 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5425 DEFS=-DHAVE_CONFIG_H
5427 # Without the "./", some shells look in PATH for config.status.
5428 : ${CONFIG_STATUS=./config.status}
5430 echo creating $CONFIG_STATUS
5431 rm -f $CONFIG_STATUS
5432 cat > $CONFIG_STATUS <<EOF
5433 #! /bin/sh
5434 # Generated automatically by configure.
5435 # Run this file to recreate the current configuration.
5436 # This directory was configured as follows,
5437 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5439 # $0 $ac_configure_args
5441 # Compiler output produced by configure, useful for debugging
5442 # configure, is in ./config.log if it exists.
5444 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5445 for ac_option
5447 case "\$ac_option" in
5448 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5449 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5450 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5451 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5452 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5453 exit 0 ;;
5454 -help | --help | --hel | --he | --h)
5455 echo "\$ac_cs_usage"; exit 0 ;;
5456 *) echo "\$ac_cs_usage"; exit 1 ;;
5457 esac
5458 done
5460 ac_given_srcdir=$srcdir
5461 ac_given_INSTALL="$INSTALL"
5463 trap '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
5465 cat >> $CONFIG_STATUS <<EOF
5467 # Protect against being on the right side of a sed subst in config.status.
5468 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5469 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5470 $ac_vpsub
5471 $extrasub
5472 s%@SHELL@%$SHELL%g
5473 s%@CFLAGS@%$CFLAGS%g
5474 s%@CPPFLAGS@%$CPPFLAGS%g
5475 s%@CXXFLAGS@%$CXXFLAGS%g
5476 s%@FFLAGS@%$FFLAGS%g
5477 s%@DEFS@%$DEFS%g
5478 s%@LDFLAGS@%$LDFLAGS%g
5479 s%@LIBS@%$LIBS%g
5480 s%@exec_prefix@%$exec_prefix%g
5481 s%@prefix@%$prefix%g
5482 s%@program_transform_name@%$program_transform_name%g
5483 s%@bindir@%$bindir%g
5484 s%@sbindir@%$sbindir%g
5485 s%@libexecdir@%$libexecdir%g
5486 s%@datadir@%$datadir%g
5487 s%@sysconfdir@%$sysconfdir%g
5488 s%@sharedstatedir@%$sharedstatedir%g
5489 s%@localstatedir@%$localstatedir%g
5490 s%@libdir@%$libdir%g
5491 s%@includedir@%$includedir%g
5492 s%@oldincludedir@%$oldincludedir%g
5493 s%@infodir@%$infodir%g
5494 s%@mandir@%$mandir%g
5495 s%@host@%$host%g
5496 s%@host_alias@%$host_alias%g
5497 s%@host_cpu@%$host_cpu%g
5498 s%@host_vendor@%$host_vendor%g
5499 s%@host_os@%$host_os%g
5500 s%@target@%$target%g
5501 s%@target_alias@%$target_alias%g
5502 s%@target_cpu@%$target_cpu%g
5503 s%@target_vendor@%$target_vendor%g
5504 s%@target_os@%$target_os%g
5505 s%@build@%$build%g
5506 s%@build_alias@%$build_alias%g
5507 s%@build_cpu@%$build_cpu%g
5508 s%@build_vendor@%$build_vendor%g
5509 s%@build_os@%$build_os%g
5510 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5511 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5512 s%@INSTALL_DATA@%$INSTALL_DATA%g
5513 s%@PACKAGE@%$PACKAGE%g
5514 s%@VERSION@%$VERSION%g
5515 s%@ACLOCAL@%$ACLOCAL%g
5516 s%@AUTOCONF@%$AUTOCONF%g
5517 s%@AUTOMAKE@%$AUTOMAKE%g
5518 s%@AUTOHEADER@%$AUTOHEADER%g
5519 s%@MAKEINFO@%$MAKEINFO%g
5520 s%@SET_MAKE@%$SET_MAKE%g
5521 s%@RANLIB@%$RANLIB%g
5522 s%@CC@%$CC%g
5523 s%@LN_S@%$LN_S%g
5524 s%@LIBTOOL@%$LIBTOOL%g
5525 s%@GDBINIT@%$GDBINIT%g
5526 s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
5527 s%@extra_objects@%$extra_objects%g
5528 s%@target_cpu_type@%$target_cpu_type%g
5529 s%@obj_format@%$obj_format%g
5530 s%@te_file@%$te_file%g
5531 s%@install_tooldir@%$install_tooldir%g
5532 s%@atof@%$atof%g
5533 s%@BFDLIB@%$BFDLIB%g
5534 s%@OPCODES_LIB@%$OPCODES_LIB%g
5535 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
5536 s%@YACC@%$YACC%g
5537 s%@LEX@%$LEX%g
5538 s%@LEXLIB@%$LEXLIB%g
5539 s%@CPP@%$CPP%g
5540 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5541 s%@ALLOCA@%$ALLOCA%g
5542 s%@USE_NLS@%$USE_NLS%g
5543 s%@MSGFMT@%$MSGFMT%g
5544 s%@GMSGFMT@%$GMSGFMT%g
5545 s%@XGETTEXT@%$XGETTEXT%g
5546 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5547 s%@CATALOGS@%$CATALOGS%g
5548 s%@CATOBJEXT@%$CATOBJEXT%g
5549 s%@DATADIRNAME@%$DATADIRNAME%g
5550 s%@GMOFILES@%$GMOFILES%g
5551 s%@INSTOBJEXT@%$INSTOBJEXT%g
5552 s%@INTLDEPS@%$INTLDEPS%g
5553 s%@INTLLIBS@%$INTLLIBS%g
5554 s%@INTLOBJS@%$INTLOBJS%g
5555 s%@POFILES@%$POFILES%g
5556 s%@POSUB@%$POSUB%g
5557 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5558 s%@GT_NO@%$GT_NO%g
5559 s%@GT_YES@%$GT_YES%g
5560 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5561 s%@l@%$l%g
5562 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5563 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5564 s%@MAINT@%$MAINT%g
5565 s%@EXEEXT@%$EXEEXT%g
5567 CEOF
5570 cat >> $CONFIG_STATUS <<\EOF
5572 # Split the substitutions into bite-sized pieces for seds with
5573 # small command number limits, like on Digital OSF/1 and HP-UX.
5574 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5575 ac_file=1 # Number of current file.
5576 ac_beg=1 # First line for current file.
5577 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5578 ac_more_lines=:
5579 ac_sed_cmds=""
5580 while $ac_more_lines; do
5581 if test $ac_beg -gt 1; then
5582 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5583 else
5584 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5586 if test ! -s conftest.s$ac_file; then
5587 ac_more_lines=false
5588 rm -f conftest.s$ac_file
5589 else
5590 if test -z "$ac_sed_cmds"; then
5591 ac_sed_cmds="sed -f conftest.s$ac_file"
5592 else
5593 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5595 ac_file=`expr $ac_file + 1`
5596 ac_beg=$ac_end
5597 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5599 done
5600 if test -z "$ac_sed_cmds"; then
5601 ac_sed_cmds=cat
5605 cat >> $CONFIG_STATUS <<EOF
5607 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in"}
5609 cat >> $CONFIG_STATUS <<\EOF
5610 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5611 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5612 case "$ac_file" in
5613 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5614 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5615 *) ac_file_in="${ac_file}.in" ;;
5616 esac
5618 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5620 # Remove last slash and all that follows it. Not all systems have dirname.
5621 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5622 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5623 # The file is in a subdirectory.
5624 test ! -d "$ac_dir" && mkdir "$ac_dir"
5625 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5626 # A "../" for each directory in $ac_dir_suffix.
5627 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5628 else
5629 ac_dir_suffix= ac_dots=
5632 case "$ac_given_srcdir" in
5633 .) srcdir=.
5634 if test -z "$ac_dots"; then top_srcdir=.
5635 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5636 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5637 *) # Relative path.
5638 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5639 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5640 esac
5642 case "$ac_given_INSTALL" in
5643 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5644 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5645 esac
5647 echo creating "$ac_file"
5648 rm -f "$ac_file"
5649 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5650 case "$ac_file" in
5651 *Makefile*) ac_comsub="1i\\
5652 # $configure_input" ;;
5653 *) ac_comsub= ;;
5654 esac
5656 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5657 sed -e "$ac_comsub
5658 s%@configure_input@%$configure_input%g
5659 s%@srcdir@%$srcdir%g
5660 s%@top_srcdir@%$top_srcdir%g
5661 s%@INSTALL@%$INSTALL%g
5662 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5663 fi; done
5664 rm -f conftest.s*
5666 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5667 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5669 # ac_d sets the value in "#define NAME VALUE" lines.
5670 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5671 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5672 ac_dC='\3'
5673 ac_dD='%g'
5674 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5675 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5676 ac_uB='\([ ]\)%\1#\2define\3'
5677 ac_uC=' '
5678 ac_uD='\4%g'
5679 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5680 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5681 ac_eB='$%\1#\2define\3'
5682 ac_eC=' '
5683 ac_eD='%g'
5685 if test "${CONFIG_HEADERS+set}" != set; then
5687 cat >> $CONFIG_STATUS <<EOF
5688 CONFIG_HEADERS="config.h:config.in"
5690 cat >> $CONFIG_STATUS <<\EOF
5692 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5693 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5694 case "$ac_file" in
5695 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5696 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5697 *) ac_file_in="${ac_file}.in" ;;
5698 esac
5700 echo creating $ac_file
5702 rm -f conftest.frag conftest.in conftest.out
5703 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5704 cat $ac_file_inputs > conftest.in
5708 # Transform confdefs.h into a sed script conftest.vals that substitutes
5709 # the proper values into config.h.in to produce config.h. And first:
5710 # Protect against being on the right side of a sed subst in config.status.
5711 # Protect against being in an unquoted here document in config.status.
5712 rm -f conftest.vals
5713 cat > conftest.hdr <<\EOF
5714 s/[\\&%]/\\&/g
5715 s%[\\$`]%\\&%g
5716 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5717 s%ac_d%ac_u%gp
5718 s%ac_u%ac_e%gp
5720 sed -n -f conftest.hdr confdefs.h > conftest.vals
5721 rm -f conftest.hdr
5723 # This sed command replaces #undef with comments. This is necessary, for
5724 # example, in the case of _POSIX_SOURCE, which is predefined and required
5725 # on some systems where configure will not decide to define it.
5726 cat >> conftest.vals <<\EOF
5727 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5730 # Break up conftest.vals because some shells have a limit on
5731 # the size of here documents, and old seds have small limits too.
5733 rm -f conftest.tail
5734 while :
5736 ac_lines=`grep -c . conftest.vals`
5737 # grep -c gives empty output for an empty file on some AIX systems.
5738 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5739 # Write a limited-size here document to conftest.frag.
5740 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5741 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5742 echo 'CEOF
5743 sed -f conftest.frag conftest.in > conftest.out
5744 rm -f conftest.in
5745 mv conftest.out conftest.in
5746 ' >> $CONFIG_STATUS
5747 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5748 rm -f conftest.vals
5749 mv conftest.tail conftest.vals
5750 done
5751 rm -f conftest.vals
5753 cat >> $CONFIG_STATUS <<\EOF
5754 rm -f conftest.frag conftest.h
5755 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5756 cat conftest.in >> conftest.h
5757 rm -f conftest.in
5758 if cmp -s $ac_file conftest.h 2>/dev/null; then
5759 echo "$ac_file is unchanged"
5760 rm -f conftest.h
5761 else
5762 # Remove last slash and all that follows it. Not all systems have dirname.
5763 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5764 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5765 # The file is in a subdirectory.
5766 test ! -d "$ac_dir" && mkdir "$ac_dir"
5768 rm -f $ac_file
5769 mv conftest.h $ac_file
5771 fi; done
5774 cat >> $CONFIG_STATUS <<EOF
5776 target_cpu_type=${target_cpu_type}
5777 cgen_cpu_prefix=${cgen_cpu_prefix}
5778 obj_format=${obj_format}
5779 te_file=${te_file}
5781 cat >> $CONFIG_STATUS <<\EOF
5782 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5783 rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
5784 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
5785 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
5786 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
5787 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
5788 if test "x$cgen_cpu_prefix" != x ; then
5789 echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
5792 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
5793 exit 0
5795 chmod +x $CONFIG_STATUS
5796 rm -fr confdefs* $ac_clean_files
5797 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1