file gprof.info was initially added on branch binutils-2_10-branch.
[binutils.git] / gas / configure
blob0187718c1e99e0d87c0f344a9e9cba06f8105f0a
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 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
32 ac_help="$ac_help
33 --disable-nls do not use Native Language Support"
34 ac_help="$ac_help
35 --with-included-gettext use the GNU gettext library included here"
36 ac_help="$ac_help
37 --enable-maintainer-mode enable make rules and dependencies not useful
38 (and sometimes confusing) to the casual installer"
40 # Initialize some variables set by options.
41 # The variables have the same names as the options, with
42 # dashes changed to underlines.
43 build=NONE
44 cache_file=./config.cache
45 exec_prefix=NONE
46 host=NONE
47 no_create=
48 nonopt=NONE
49 no_recursion=
50 prefix=NONE
51 program_prefix=NONE
52 program_suffix=NONE
53 program_transform_name=s,x,x,
54 silent=
55 site=
56 sitefile=
57 srcdir=
58 target=NONE
59 verbose=
60 x_includes=NONE
61 x_libraries=NONE
62 bindir='${exec_prefix}/bin'
63 sbindir='${exec_prefix}/sbin'
64 libexecdir='${exec_prefix}/libexec'
65 datadir='${prefix}/share'
66 sysconfdir='${prefix}/etc'
67 sharedstatedir='${prefix}/com'
68 localstatedir='${prefix}/var'
69 libdir='${exec_prefix}/lib'
70 includedir='${prefix}/include'
71 oldincludedir='/usr/include'
72 infodir='${prefix}/info'
73 mandir='${prefix}/man'
75 # Initialize some other variables.
76 subdirs=
77 MFLAGS= MAKEFLAGS=
78 SHELL=${CONFIG_SHELL-/bin/sh}
79 # Maximum number of lines to put in a shell here document.
80 ac_max_here_lines=12
82 ac_prev=
83 for ac_option
86 # If the previous option needs an argument, assign it.
87 if test -n "$ac_prev"; then
88 eval "$ac_prev=\$ac_option"
89 ac_prev=
90 continue
93 case "$ac_option" in
94 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
95 *) ac_optarg= ;;
96 esac
98 # Accept the important Cygnus configure options, so we can diagnose typos.
100 case "$ac_option" in
102 -bindir | --bindir | --bindi | --bind | --bin | --bi)
103 ac_prev=bindir ;;
104 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
105 bindir="$ac_optarg" ;;
107 -build | --build | --buil | --bui | --bu)
108 ac_prev=build ;;
109 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
110 build="$ac_optarg" ;;
112 -cache-file | --cache-file | --cache-fil | --cache-fi \
113 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
114 ac_prev=cache_file ;;
115 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
116 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
117 cache_file="$ac_optarg" ;;
119 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
120 ac_prev=datadir ;;
121 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
122 | --da=*)
123 datadir="$ac_optarg" ;;
125 -disable-* | --disable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
127 # Reject names that are not valid shell variable names.
128 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 eval "enable_${ac_feature}=no" ;;
134 -enable-* | --enable-*)
135 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
136 # Reject names that are not valid shell variable names.
137 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
138 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
141 case "$ac_option" in
142 *=*) ;;
143 *) ac_optarg=yes ;;
144 esac
145 eval "enable_${ac_feature}='$ac_optarg'" ;;
147 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
148 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
149 | --exec | --exe | --ex)
150 ac_prev=exec_prefix ;;
151 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
152 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
153 | --exec=* | --exe=* | --ex=*)
154 exec_prefix="$ac_optarg" ;;
156 -gas | --gas | --ga | --g)
157 # Obsolete; use --with-gas.
158 with_gas=yes ;;
160 -help | --help | --hel | --he)
161 # Omit some internal or obsolete options to make the list less imposing.
162 # This message is too long to be a string in the A/UX 3.1 sh.
163 cat << EOF
164 Usage: configure [options] [host]
165 Options: [defaults in brackets after descriptions]
166 Configuration:
167 --cache-file=FILE cache test results in FILE
168 --help print this message
169 --no-create do not create output files
170 --quiet, --silent do not print \`checking...' messages
171 --site-file=FILE use FILE as the site file
172 --version print the version of autoconf that created configure
173 Directory and file names:
174 --prefix=PREFIX install architecture-independent files in PREFIX
175 [$ac_default_prefix]
176 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
177 [same as prefix]
178 --bindir=DIR user executables in DIR [EPREFIX/bin]
179 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
180 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
181 --datadir=DIR read-only architecture-independent data in DIR
182 [PREFIX/share]
183 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
184 --sharedstatedir=DIR modifiable architecture-independent data in DIR
185 [PREFIX/com]
186 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
187 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
188 --includedir=DIR C header files in DIR [PREFIX/include]
189 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
190 --infodir=DIR info documentation in DIR [PREFIX/info]
191 --mandir=DIR man documentation in DIR [PREFIX/man]
192 --srcdir=DIR find the sources in DIR [configure dir or ..]
193 --program-prefix=PREFIX prepend PREFIX to installed program names
194 --program-suffix=SUFFIX append SUFFIX to installed program names
195 --program-transform-name=PROGRAM
196 run sed PROGRAM on installed program names
198 cat << EOF
199 Host type:
200 --build=BUILD configure for building on BUILD [BUILD=HOST]
201 --host=HOST configure for HOST [guessed]
202 --target=TARGET configure for TARGET [TARGET=HOST]
203 Features and packages:
204 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
205 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
206 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
207 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
208 --x-includes=DIR X include files are in DIR
209 --x-libraries=DIR X library files are in DIR
211 if test -n "$ac_help"; then
212 echo "--enable and --with options recognized:$ac_help"
214 exit 0 ;;
216 -host | --host | --hos | --ho)
217 ac_prev=host ;;
218 -host=* | --host=* | --hos=* | --ho=*)
219 host="$ac_optarg" ;;
221 -includedir | --includedir | --includedi | --included | --include \
222 | --includ | --inclu | --incl | --inc)
223 ac_prev=includedir ;;
224 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
225 | --includ=* | --inclu=* | --incl=* | --inc=*)
226 includedir="$ac_optarg" ;;
228 -infodir | --infodir | --infodi | --infod | --info | --inf)
229 ac_prev=infodir ;;
230 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
231 infodir="$ac_optarg" ;;
233 -libdir | --libdir | --libdi | --libd)
234 ac_prev=libdir ;;
235 -libdir=* | --libdir=* | --libdi=* | --libd=*)
236 libdir="$ac_optarg" ;;
238 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
239 | --libexe | --libex | --libe)
240 ac_prev=libexecdir ;;
241 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
242 | --libexe=* | --libex=* | --libe=*)
243 libexecdir="$ac_optarg" ;;
245 -localstatedir | --localstatedir | --localstatedi | --localstated \
246 | --localstate | --localstat | --localsta | --localst \
247 | --locals | --local | --loca | --loc | --lo)
248 ac_prev=localstatedir ;;
249 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
250 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
251 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
252 localstatedir="$ac_optarg" ;;
254 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
255 ac_prev=mandir ;;
256 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
257 mandir="$ac_optarg" ;;
259 -nfp | --nfp | --nf)
260 # Obsolete; use --without-fp.
261 with_fp=no ;;
263 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
264 | --no-cr | --no-c)
265 no_create=yes ;;
267 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
268 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
269 no_recursion=yes ;;
271 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
272 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
273 | --oldin | --oldi | --old | --ol | --o)
274 ac_prev=oldincludedir ;;
275 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
276 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
277 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
278 oldincludedir="$ac_optarg" ;;
280 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
281 ac_prev=prefix ;;
282 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
283 prefix="$ac_optarg" ;;
285 -program-prefix | --program-prefix | --program-prefi | --program-pref \
286 | --program-pre | --program-pr | --program-p)
287 ac_prev=program_prefix ;;
288 -program-prefix=* | --program-prefix=* | --program-prefi=* \
289 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
290 program_prefix="$ac_optarg" ;;
292 -program-suffix | --program-suffix | --program-suffi | --program-suff \
293 | --program-suf | --program-su | --program-s)
294 ac_prev=program_suffix ;;
295 -program-suffix=* | --program-suffix=* | --program-suffi=* \
296 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
297 program_suffix="$ac_optarg" ;;
299 -program-transform-name | --program-transform-name \
300 | --program-transform-nam | --program-transform-na \
301 | --program-transform-n | --program-transform- \
302 | --program-transform | --program-transfor \
303 | --program-transfo | --program-transf \
304 | --program-trans | --program-tran \
305 | --progr-tra | --program-tr | --program-t)
306 ac_prev=program_transform_name ;;
307 -program-transform-name=* | --program-transform-name=* \
308 | --program-transform-nam=* | --program-transform-na=* \
309 | --program-transform-n=* | --program-transform-=* \
310 | --program-transform=* | --program-transfor=* \
311 | --program-transfo=* | --program-transf=* \
312 | --program-trans=* | --program-tran=* \
313 | --progr-tra=* | --program-tr=* | --program-t=*)
314 program_transform_name="$ac_optarg" ;;
316 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
317 | -silent | --silent | --silen | --sile | --sil)
318 silent=yes ;;
320 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
321 ac_prev=sbindir ;;
322 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
323 | --sbi=* | --sb=*)
324 sbindir="$ac_optarg" ;;
326 -sharedstatedir | --sharedstatedir | --sharedstatedi \
327 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
328 | --sharedst | --shareds | --shared | --share | --shar \
329 | --sha | --sh)
330 ac_prev=sharedstatedir ;;
331 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
332 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
333 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
334 | --sha=* | --sh=*)
335 sharedstatedir="$ac_optarg" ;;
337 -site | --site | --sit)
338 ac_prev=site ;;
339 -site=* | --site=* | --sit=*)
340 site="$ac_optarg" ;;
342 -site-file | --site-file | --site-fil | --site-fi | --site-f)
343 ac_prev=sitefile ;;
344 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
345 sitefile="$ac_optarg" ;;
347 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
348 ac_prev=srcdir ;;
349 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
350 srcdir="$ac_optarg" ;;
352 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
353 | --syscon | --sysco | --sysc | --sys | --sy)
354 ac_prev=sysconfdir ;;
355 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
356 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
357 sysconfdir="$ac_optarg" ;;
359 -target | --target | --targe | --targ | --tar | --ta | --t)
360 ac_prev=target ;;
361 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
362 target="$ac_optarg" ;;
364 -v | -verbose | --verbose | --verbos | --verbo | --verb)
365 verbose=yes ;;
367 -version | --version | --versio | --versi | --vers)
368 echo "configure generated by autoconf version 2.13"
369 exit 0 ;;
371 -with-* | --with-*)
372 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
373 # Reject names that are not valid shell variable names.
374 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
375 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
377 ac_package=`echo $ac_package| sed 's/-/_/g'`
378 case "$ac_option" in
379 *=*) ;;
380 *) ac_optarg=yes ;;
381 esac
382 eval "with_${ac_package}='$ac_optarg'" ;;
384 -without-* | --without-*)
385 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
386 # Reject names that are not valid shell variable names.
387 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
388 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
390 ac_package=`echo $ac_package| sed 's/-/_/g'`
391 eval "with_${ac_package}=no" ;;
393 --x)
394 # Obsolete; use --with-x.
395 with_x=yes ;;
397 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
398 | --x-incl | --x-inc | --x-in | --x-i)
399 ac_prev=x_includes ;;
400 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
401 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
402 x_includes="$ac_optarg" ;;
404 -x-libraries | --x-libraries | --x-librarie | --x-librari \
405 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
406 ac_prev=x_libraries ;;
407 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
408 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
409 x_libraries="$ac_optarg" ;;
411 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
415 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
416 echo "configure: warning: $ac_option: invalid host type" 1>&2
418 if test "x$nonopt" != xNONE; then
419 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
421 nonopt="$ac_option"
424 esac
425 done
427 if test -n "$ac_prev"; then
428 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
431 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
433 # File descriptor usage:
434 # 0 standard input
435 # 1 file creation
436 # 2 errors and warnings
437 # 3 some systems may open it to /dev/tty
438 # 4 used on the Kubota Titan
439 # 6 checking for... messages and results
440 # 5 compiler messages saved in config.log
441 if test "$silent" = yes; then
442 exec 6>/dev/null
443 else
444 exec 6>&1
446 exec 5>./config.log
448 echo "\
449 This file contains any messages produced by compilers while
450 running configure, to aid debugging if configure makes a mistake.
451 " 1>&5
453 # Strip out --no-create and --no-recursion so they do not pile up.
454 # Also quote any args containing shell metacharacters.
455 ac_configure_args=
456 for ac_arg
458 case "$ac_arg" in
459 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
460 | --no-cr | --no-c) ;;
461 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
462 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
463 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
464 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
465 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
466 esac
467 done
469 # NLS nuisances.
470 # Only set these to C if already set. These must not be set unconditionally
471 # because not all systems understand e.g. LANG=C (notably SCO).
472 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
473 # Non-C LC_CTYPE values break the ctype check.
474 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
475 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
476 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
477 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
479 # confdefs.h avoids OS command line length limits that DEFS can exceed.
480 rm -rf conftest* confdefs.h
481 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
482 echo > confdefs.h
484 # A filename unique to this package, relative to the directory that
485 # configure is in, which we can look for to find out if srcdir is correct.
486 ac_unique_file=as.h
488 # Find the source files, if location was not specified.
489 if test -z "$srcdir"; then
490 ac_srcdir_defaulted=yes
491 # Try the directory containing this script, then its parent.
492 ac_prog=$0
493 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
494 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
495 srcdir=$ac_confdir
496 if test ! -r $srcdir/$ac_unique_file; then
497 srcdir=..
499 else
500 ac_srcdir_defaulted=no
502 if test ! -r $srcdir/$ac_unique_file; then
503 if test "$ac_srcdir_defaulted" = yes; then
504 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
505 else
506 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
509 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
511 # Prefer explicitly selected file to automatically selected ones.
512 if test -z "$sitefile"; then
513 if test -z "$CONFIG_SITE"; then
514 if test "x$prefix" != xNONE; then
515 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
516 else
517 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
520 else
521 CONFIG_SITE="$sitefile"
523 for ac_site_file in $CONFIG_SITE; do
524 if test -r "$ac_site_file"; then
525 echo "loading site script $ac_site_file"
526 . "$ac_site_file"
528 done
530 if test -r "$cache_file"; then
531 echo "loading cache $cache_file"
532 . $cache_file
533 else
534 echo "creating cache $cache_file"
535 > $cache_file
538 ac_ext=c
539 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
540 ac_cpp='$CPP $CPPFLAGS'
541 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
542 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
543 cross_compiling=$ac_cv_prog_cc_cross
545 ac_exeext=
546 ac_objext=o
547 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
548 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
549 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
550 ac_n= ac_c='
551 ' ac_t=' '
552 else
553 ac_n=-n ac_c= ac_t=
555 else
556 ac_n= ac_c='\c' ac_t=
561 ac_aux_dir=
562 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
563 if test -f $ac_dir/install-sh; then
564 ac_aux_dir=$ac_dir
565 ac_install_sh="$ac_aux_dir/install-sh -c"
566 break
567 elif test -f $ac_dir/install.sh; then
568 ac_aux_dir=$ac_dir
569 ac_install_sh="$ac_aux_dir/install.sh -c"
570 break
572 done
573 if test -z "$ac_aux_dir"; then
574 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
576 ac_config_guess=$ac_aux_dir/config.guess
577 ac_config_sub=$ac_aux_dir/config.sub
578 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
581 # Do some error checking and defaulting for the host and target type.
582 # The inputs are:
583 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
585 # The rules are:
586 # 1. You are not allowed to specify --host, --target, and nonopt at the
587 # same time.
588 # 2. Host defaults to nonopt.
589 # 3. If nonopt is not specified, then host defaults to the current host,
590 # as determined by config.guess.
591 # 4. Target and build default to nonopt.
592 # 5. If nonopt is not specified, then target and build default to host.
594 # The aliases save the names the user supplied, while $host etc.
595 # will get canonicalized.
596 case $host---$target---$nonopt in
597 NONE---*---* | *---NONE---* | *---*---NONE) ;;
598 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
599 esac
602 # Make sure we can run config.sub.
603 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
604 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
607 echo $ac_n "checking host system type""... $ac_c" 1>&6
608 echo "configure:609: checking host system type" >&5
610 host_alias=$host
611 case "$host_alias" in
612 NONE)
613 case $nonopt in
614 NONE)
615 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
616 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
617 fi ;;
618 *) host_alias=$nonopt ;;
619 esac ;;
620 esac
622 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
623 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
624 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
625 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
626 echo "$ac_t""$host" 1>&6
628 echo $ac_n "checking target system type""... $ac_c" 1>&6
629 echo "configure:630: checking target system type" >&5
631 target_alias=$target
632 case "$target_alias" in
633 NONE)
634 case $nonopt in
635 NONE) target_alias=$host_alias ;;
636 *) target_alias=$nonopt ;;
637 esac ;;
638 esac
640 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
641 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
642 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
643 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
644 echo "$ac_t""$target" 1>&6
646 echo $ac_n "checking build system type""... $ac_c" 1>&6
647 echo "configure:648: checking build system type" >&5
649 build_alias=$build
650 case "$build_alias" in
651 NONE)
652 case $nonopt in
653 NONE) build_alias=$host_alias ;;
654 *) build_alias=$nonopt ;;
655 esac ;;
656 esac
658 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
659 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
660 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
661 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
662 echo "$ac_t""$build" 1>&6
664 test "$host_alias" != "$target_alias" &&
665 test "$program_prefix$program_suffix$program_transform_name" = \
666 NONENONEs,x,x, &&
667 program_prefix=${target_alias}-
670 # Find a good install program. We prefer a C program (faster),
671 # so one script is as good as another. But avoid the broken or
672 # incompatible versions:
673 # SysV /etc/install, /usr/sbin/install
674 # SunOS /usr/etc/install
675 # IRIX /sbin/install
676 # AIX /bin/install
677 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
678 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
679 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
680 # ./install, which can be erroneously created by make from ./install.sh.
681 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
682 echo "configure:683: checking for a BSD compatible install" >&5
683 if test -z "$INSTALL"; then
684 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
685 echo $ac_n "(cached) $ac_c" 1>&6
686 else
687 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
688 for ac_dir in $PATH; do
689 # Account for people who put trailing slashes in PATH elements.
690 case "$ac_dir/" in
691 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
693 # OSF1 and SCO ODT 3.0 have their own names for install.
694 # Don't use installbsd from OSF since it installs stuff as root
695 # by default.
696 for ac_prog in ginstall scoinst install; do
697 if test -f $ac_dir/$ac_prog; then
698 if test $ac_prog = install &&
699 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
700 # AIX install. It has an incompatible calling convention.
702 else
703 ac_cv_path_install="$ac_dir/$ac_prog -c"
704 break 2
707 done
709 esac
710 done
711 IFS="$ac_save_IFS"
714 if test "${ac_cv_path_install+set}" = set; then
715 INSTALL="$ac_cv_path_install"
716 else
717 # As a last resort, use the slow shell script. We don't cache a
718 # path for INSTALL within a source directory, because that will
719 # break other packages using the cache if that directory is
720 # removed, or if the path is relative.
721 INSTALL="$ac_install_sh"
724 echo "$ac_t""$INSTALL" 1>&6
726 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
727 # It thinks the first close brace ends the variable substitution.
728 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
730 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
732 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
734 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
735 echo "configure:736: checking whether build environment is sane" >&5
736 # Just in case
737 sleep 1
738 echo timestamp > conftestfile
739 # Do `set' in a subshell so we don't clobber the current shell's
740 # arguments. Must try -L first in case configure is actually a
741 # symlink; some systems play weird games with the mod time of symlinks
742 # (eg FreeBSD returns the mod time of the symlink's containing
743 # directory).
744 if (
745 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
746 if test "$*" = "X"; then
747 # -L didn't work.
748 set X `ls -t $srcdir/configure conftestfile`
750 if test "$*" != "X $srcdir/configure conftestfile" \
751 && test "$*" != "X conftestfile $srcdir/configure"; then
753 # If neither matched, then we have a broken ls. This can happen
754 # if, for instance, CONFIG_SHELL is bash and it inherits a
755 # broken ls alias from the environment. This has actually
756 # happened. Such a system could not be considered "sane".
757 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
758 alias in your environment" 1>&2; exit 1; }
761 test "$2" = conftestfile
763 then
764 # Ok.
766 else
767 { echo "configure: error: newly created file is older than distributed files!
768 Check your system clock" 1>&2; exit 1; }
770 rm -f conftest*
771 echo "$ac_t""yes" 1>&6
772 if test "$program_transform_name" = s,x,x,; then
773 program_transform_name=
774 else
775 # Double any \ or $. echo might interpret backslashes.
776 cat <<\EOF_SED > conftestsed
777 s,\\,\\\\,g; s,\$,$$,g
778 EOF_SED
779 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
780 rm -f conftestsed
782 test "$program_prefix" != NONE &&
783 program_transform_name="s,^,${program_prefix},; $program_transform_name"
784 # Use a double $ so make ignores it.
785 test "$program_suffix" != NONE &&
786 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
788 # sed with no file args requires a program.
789 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
791 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
792 echo "configure:793: checking whether ${MAKE-make} sets \${MAKE}" >&5
793 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
794 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
795 echo $ac_n "(cached) $ac_c" 1>&6
796 else
797 cat > conftestmake <<\EOF
798 all:
799 @echo 'ac_maketemp="${MAKE}"'
801 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
802 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
803 if test -n "$ac_maketemp"; then
804 eval ac_cv_prog_make_${ac_make}_set=yes
805 else
806 eval ac_cv_prog_make_${ac_make}_set=no
808 rm -f conftestmake
810 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
811 echo "$ac_t""yes" 1>&6
812 SET_MAKE=
813 else
814 echo "$ac_t""no" 1>&6
815 SET_MAKE="MAKE=${MAKE-make}"
819 PACKAGE=gas
821 VERSION=2.9.5
823 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
824 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
826 cat >> confdefs.h <<EOF
827 #define PACKAGE "$PACKAGE"
830 cat >> confdefs.h <<EOF
831 #define VERSION "$VERSION"
836 missing_dir=`cd $ac_aux_dir && pwd`
837 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
838 echo "configure:839: checking for working aclocal" >&5
839 # Run test in a subshell; some versions of sh will print an error if
840 # an executable is not found, even if stderr is redirected.
841 # Redirect stdin to placate older versions of autoconf. Sigh.
842 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
843 ACLOCAL=aclocal
844 echo "$ac_t""found" 1>&6
845 else
846 ACLOCAL="$missing_dir/missing aclocal"
847 echo "$ac_t""missing" 1>&6
850 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
851 echo "configure:852: checking for working autoconf" >&5
852 # Run test in a subshell; some versions of sh will print an error if
853 # an executable is not found, even if stderr is redirected.
854 # Redirect stdin to placate older versions of autoconf. Sigh.
855 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
856 AUTOCONF=autoconf
857 echo "$ac_t""found" 1>&6
858 else
859 AUTOCONF="$missing_dir/missing autoconf"
860 echo "$ac_t""missing" 1>&6
863 echo $ac_n "checking for working automake""... $ac_c" 1>&6
864 echo "configure:865: checking for working automake" >&5
865 # Run test in a subshell; some versions of sh will print an error if
866 # an executable is not found, even if stderr is redirected.
867 # Redirect stdin to placate older versions of autoconf. Sigh.
868 if (automake --version) < /dev/null > /dev/null 2>&1; then
869 AUTOMAKE=automake
870 echo "$ac_t""found" 1>&6
871 else
872 AUTOMAKE="$missing_dir/missing automake"
873 echo "$ac_t""missing" 1>&6
876 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
877 echo "configure:878: checking for working autoheader" >&5
878 # Run test in a subshell; some versions of sh will print an error if
879 # an executable is not found, even if stderr is redirected.
880 # Redirect stdin to placate older versions of autoconf. Sigh.
881 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
882 AUTOHEADER=autoheader
883 echo "$ac_t""found" 1>&6
884 else
885 AUTOHEADER="$missing_dir/missing autoheader"
886 echo "$ac_t""missing" 1>&6
889 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
890 echo "configure:891: checking for working makeinfo" >&5
891 # Run test in a subshell; some versions of sh will print an error if
892 # an executable is not found, even if stderr is redirected.
893 # Redirect stdin to placate older versions of autoconf. Sigh.
894 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
895 MAKEINFO=makeinfo
896 echo "$ac_t""found" 1>&6
897 else
898 MAKEINFO="$missing_dir/missing makeinfo"
899 echo "$ac_t""missing" 1>&6
904 # Check whether --enable-shared or --disable-shared was given.
905 if test "${enable_shared+set}" = set; then
906 enableval="$enable_shared"
907 p=${PACKAGE-default}
908 case "$enableval" in
909 yes) enable_shared=yes ;;
910 no) enable_shared=no ;;
912 enable_shared=no
913 # Look at the argument we got. We use all the common list separators.
914 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
915 for pkg in $enableval; do
916 if test "X$pkg" = "X$p"; then
917 enable_shared=yes
919 done
920 IFS="$ac_save_ifs"
922 esac
923 else
924 enable_shared=yes
927 # Check whether --enable-static or --disable-static was given.
928 if test "${enable_static+set}" = set; then
929 enableval="$enable_static"
930 p=${PACKAGE-default}
931 case "$enableval" in
932 yes) enable_static=yes ;;
933 no) enable_static=no ;;
935 enable_static=no
936 # Look at the argument we got. We use all the common list separators.
937 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
938 for pkg in $enableval; do
939 if test "X$pkg" = "X$p"; then
940 enable_static=yes
942 done
943 IFS="$ac_save_ifs"
945 esac
946 else
947 enable_static=yes
950 # Check whether --enable-fast-install or --disable-fast-install was given.
951 if test "${enable_fast_install+set}" = set; then
952 enableval="$enable_fast_install"
953 p=${PACKAGE-default}
954 case "$enableval" in
955 yes) enable_fast_install=yes ;;
956 no) enable_fast_install=no ;;
958 enable_fast_install=no
959 # Look at the argument we got. We use all the common list separators.
960 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
961 for pkg in $enableval; do
962 if test "X$pkg" = "X$p"; then
963 enable_fast_install=yes
965 done
966 IFS="$ac_save_ifs"
968 esac
969 else
970 enable_fast_install=yes
973 # Extract the first word of "ranlib", so it can be a program name with args.
974 set dummy ranlib; ac_word=$2
975 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
976 echo "configure:977: checking for $ac_word" >&5
977 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
978 echo $ac_n "(cached) $ac_c" 1>&6
979 else
980 if test -n "$RANLIB"; then
981 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
982 else
983 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
984 ac_dummy="$PATH"
985 for ac_dir in $ac_dummy; do
986 test -z "$ac_dir" && ac_dir=.
987 if test -f $ac_dir/$ac_word; then
988 ac_cv_prog_RANLIB="ranlib"
989 break
991 done
992 IFS="$ac_save_ifs"
993 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
996 RANLIB="$ac_cv_prog_RANLIB"
997 if test -n "$RANLIB"; then
998 echo "$ac_t""$RANLIB" 1>&6
999 else
1000 echo "$ac_t""no" 1>&6
1003 # Extract the first word of "gcc", so it can be a program name with args.
1004 set dummy gcc; ac_word=$2
1005 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1006 echo "configure:1007: checking for $ac_word" >&5
1007 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1008 echo $ac_n "(cached) $ac_c" 1>&6
1009 else
1010 if test -n "$CC"; then
1011 ac_cv_prog_CC="$CC" # Let the user override the test.
1012 else
1013 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1014 ac_dummy="$PATH"
1015 for ac_dir in $ac_dummy; do
1016 test -z "$ac_dir" && ac_dir=.
1017 if test -f $ac_dir/$ac_word; then
1018 ac_cv_prog_CC="gcc"
1019 break
1021 done
1022 IFS="$ac_save_ifs"
1025 CC="$ac_cv_prog_CC"
1026 if test -n "$CC"; then
1027 echo "$ac_t""$CC" 1>&6
1028 else
1029 echo "$ac_t""no" 1>&6
1032 if test -z "$CC"; then
1033 # Extract the first word of "cc", so it can be a program name with args.
1034 set dummy cc; ac_word=$2
1035 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1036 echo "configure:1037: checking for $ac_word" >&5
1037 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1038 echo $ac_n "(cached) $ac_c" 1>&6
1039 else
1040 if test -n "$CC"; then
1041 ac_cv_prog_CC="$CC" # Let the user override the test.
1042 else
1043 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1044 ac_prog_rejected=no
1045 ac_dummy="$PATH"
1046 for ac_dir in $ac_dummy; do
1047 test -z "$ac_dir" && ac_dir=.
1048 if test -f $ac_dir/$ac_word; then
1049 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1050 ac_prog_rejected=yes
1051 continue
1053 ac_cv_prog_CC="cc"
1054 break
1056 done
1057 IFS="$ac_save_ifs"
1058 if test $ac_prog_rejected = yes; then
1059 # We found a bogon in the path, so make sure we never use it.
1060 set dummy $ac_cv_prog_CC
1061 shift
1062 if test $# -gt 0; then
1063 # We chose a different compiler from the bogus one.
1064 # However, it has the same basename, so the bogon will be chosen
1065 # first if we set CC to just the basename; use the full file name.
1066 shift
1067 set dummy "$ac_dir/$ac_word" "$@"
1068 shift
1069 ac_cv_prog_CC="$@"
1074 CC="$ac_cv_prog_CC"
1075 if test -n "$CC"; then
1076 echo "$ac_t""$CC" 1>&6
1077 else
1078 echo "$ac_t""no" 1>&6
1081 if test -z "$CC"; then
1082 case "`uname -s`" in
1083 *win32* | *WIN32*)
1084 # Extract the first word of "cl", so it can be a program name with args.
1085 set dummy cl; ac_word=$2
1086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1087 echo "configure:1088: checking for $ac_word" >&5
1088 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1089 echo $ac_n "(cached) $ac_c" 1>&6
1090 else
1091 if test -n "$CC"; then
1092 ac_cv_prog_CC="$CC" # Let the user override the test.
1093 else
1094 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1095 ac_dummy="$PATH"
1096 for ac_dir in $ac_dummy; do
1097 test -z "$ac_dir" && ac_dir=.
1098 if test -f $ac_dir/$ac_word; then
1099 ac_cv_prog_CC="cl"
1100 break
1102 done
1103 IFS="$ac_save_ifs"
1106 CC="$ac_cv_prog_CC"
1107 if test -n "$CC"; then
1108 echo "$ac_t""$CC" 1>&6
1109 else
1110 echo "$ac_t""no" 1>&6
1113 esac
1115 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1118 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1119 echo "configure:1120: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1121 ac_ext=c
1122 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1123 ac_cpp='$CPP $CPPFLAGS'
1124 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1125 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1126 cross_compiling=$ac_cv_prog_cc_cross
1128 cat > conftest.$ac_ext << EOF
1130 #line 1131 "configure"
1131 #include "confdefs.h"
1133 main(){return(0);}
1135 if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1136 ac_cv_prog_cc_works=yes
1137 # If we can't run a trivial program, we are probably using a cross compiler.
1138 if (./conftest; exit) 2>/dev/null; then
1139 ac_cv_prog_cc_cross=no
1140 else
1141 ac_cv_prog_cc_cross=yes
1143 else
1144 echo "configure: failed program was:" >&5
1145 cat conftest.$ac_ext >&5
1146 ac_cv_prog_cc_works=no
1148 rm -fr conftest*
1149 ac_ext=c
1150 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1151 ac_cpp='$CPP $CPPFLAGS'
1152 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1153 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1154 cross_compiling=$ac_cv_prog_cc_cross
1156 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1157 if test $ac_cv_prog_cc_works = no; then
1158 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1160 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1161 echo "configure:1162: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1162 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1163 cross_compiling=$ac_cv_prog_cc_cross
1165 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1166 echo "configure:1167: checking whether we are using GNU C" >&5
1167 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1169 else
1170 cat > conftest.c <<EOF
1171 #ifdef __GNUC__
1172 yes;
1173 #endif
1175 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1176 ac_cv_prog_gcc=yes
1177 else
1178 ac_cv_prog_gcc=no
1182 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1184 if test $ac_cv_prog_gcc = yes; then
1185 GCC=yes
1186 else
1187 GCC=
1190 ac_test_CFLAGS="${CFLAGS+set}"
1191 ac_save_CFLAGS="$CFLAGS"
1192 CFLAGS=
1193 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether ${CC-cc} accepts -g" >&5
1195 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1196 echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198 echo 'void f(){}' > conftest.c
1199 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1200 ac_cv_prog_cc_g=yes
1201 else
1202 ac_cv_prog_cc_g=no
1204 rm -f conftest*
1208 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1209 if test "$ac_test_CFLAGS" = set; then
1210 CFLAGS="$ac_save_CFLAGS"
1211 elif test $ac_cv_prog_cc_g = yes; then
1212 if test "$GCC" = yes; then
1213 CFLAGS="-g -O2"
1214 else
1215 CFLAGS="-g"
1217 else
1218 if test "$GCC" = yes; then
1219 CFLAGS="-O2"
1220 else
1221 CFLAGS=
1225 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1226 if test "${with_gnu_ld+set}" = set; then
1227 withval="$with_gnu_ld"
1228 test "$withval" = no || with_gnu_ld=yes
1229 else
1230 with_gnu_ld=no
1233 ac_prog=ld
1234 if test "$ac_cv_prog_gcc" = yes; then
1235 # Check if gcc -print-prog-name=ld gives a path.
1236 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1237 echo "configure:1238: checking for ld used by GCC" >&5
1238 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1239 case "$ac_prog" in
1240 # Accept absolute paths.
1241 [\\/]* | [A-Za-z]:[\\/]*)
1242 re_direlt='/[^/][^/]*/\.\./'
1243 # Canonicalize the path of ld
1244 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1245 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1246 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1247 done
1248 test -z "$LD" && LD="$ac_prog"
1251 # If it fails, then pretend we aren't using GCC.
1252 ac_prog=ld
1255 # If it is relative, then search for the first ld in PATH.
1256 with_gnu_ld=unknown
1258 esac
1259 elif test "$with_gnu_ld" = yes; then
1260 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1261 echo "configure:1262: checking for GNU ld" >&5
1262 else
1263 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1264 echo "configure:1265: checking for non-GNU ld" >&5
1266 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268 else
1269 if test -z "$LD"; then
1270 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1271 for ac_dir in $PATH; do
1272 test -z "$ac_dir" && ac_dir=.
1273 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1274 ac_cv_path_LD="$ac_dir/$ac_prog"
1275 # Check to see if the program is GNU ld. I'd rather use --version,
1276 # but apparently some GNU ld's only accept -v.
1277 # Break only if it was the GNU/non-GNU ld that we prefer.
1278 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1279 test "$with_gnu_ld" != no && break
1280 else
1281 test "$with_gnu_ld" != yes && break
1284 done
1285 IFS="$ac_save_ifs"
1286 else
1287 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1291 LD="$ac_cv_path_LD"
1292 if test -n "$LD"; then
1293 echo "$ac_t""$LD" 1>&6
1294 else
1295 echo "$ac_t""no" 1>&6
1297 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1298 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1299 echo "configure:1300: checking if the linker ($LD) is GNU ld" >&5
1300 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1301 echo $ac_n "(cached) $ac_c" 1>&6
1302 else
1303 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1304 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1305 ac_cv_prog_gnu_ld=yes
1306 else
1307 ac_cv_prog_gnu_ld=no
1311 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1314 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1315 echo "configure:1316: checking for BSD-compatible nm" >&5
1316 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1317 echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319 if test -n "$NM"; then
1320 # Let the user override the test.
1321 ac_cv_path_NM="$NM"
1322 else
1323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1324 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1325 test -z "$ac_dir" && ac_dir=.
1326 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1327 # Check to see if the nm accepts a BSD-compat flag.
1328 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1329 # nm: unknown option "B" ignored
1330 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1331 ac_cv_path_NM="$ac_dir/nm -B"
1332 break
1333 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1334 ac_cv_path_NM="$ac_dir/nm -p"
1335 break
1336 else
1337 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1338 continue # so that we can try to find one that supports BSD flags
1341 done
1342 IFS="$ac_save_ifs"
1343 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1347 NM="$ac_cv_path_NM"
1348 echo "$ac_t""$NM" 1>&6
1350 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1351 echo "configure:1352: checking whether ln -s works" >&5
1352 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1353 echo $ac_n "(cached) $ac_c" 1>&6
1354 else
1355 rm -f conftestdata
1356 if ln -s X conftestdata 2>/dev/null
1357 then
1358 rm -f conftestdata
1359 ac_cv_prog_LN_S="ln -s"
1360 else
1361 ac_cv_prog_LN_S=ln
1364 LN_S="$ac_cv_prog_LN_S"
1365 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1366 echo "$ac_t""yes" 1>&6
1367 else
1368 echo "$ac_t""no" 1>&6
1372 case "$target" in
1373 NONE) lt_target="$host" ;;
1374 *) lt_target="$target" ;;
1375 esac
1377 # Check for any special flags to pass to ltconfig.
1378 libtool_flags="--cache-file=$cache_file"
1379 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1380 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1381 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1382 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1383 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1386 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1387 if test "${enable_libtool_lock+set}" = set; then
1388 enableval="$enable_libtool_lock"
1392 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1393 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1395 # Some flags need to be propagated to the compiler or linker for good
1396 # libtool support.
1397 case "$lt_target" in
1398 *-*-irix6*)
1399 # Find out which ABI we are using.
1400 echo '#line 1401 "configure"' > conftest.$ac_ext
1401 if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1402 case "`/usr/bin/file conftest.o`" in
1403 *32-bit*)
1404 LD="${LD-ld} -32"
1406 *N32*)
1407 LD="${LD-ld} -n32"
1409 *64-bit*)
1410 LD="${LD-ld} -64"
1412 esac
1414 rm -rf conftest*
1417 *-*-sco3.2v5*)
1418 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1419 SAVE_CFLAGS="$CFLAGS"
1420 CFLAGS="$CFLAGS -belf"
1421 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1422 echo "configure:1423: checking whether the C compiler needs -belf" >&5
1423 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1424 echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426 cat > conftest.$ac_ext <<EOF
1427 #line 1428 "configure"
1428 #include "confdefs.h"
1430 int main() {
1432 ; return 0; }
1434 if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1435 rm -rf conftest*
1436 lt_cv_cc_needs_belf=yes
1437 else
1438 echo "configure: failed program was:" >&5
1439 cat conftest.$ac_ext >&5
1440 rm -rf conftest*
1441 lt_cv_cc_needs_belf=no
1443 rm -f conftest*
1446 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1447 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1448 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1449 CFLAGS="$SAVE_CFLAGS"
1454 esac
1457 # Save cache, so that ltconfig can load it
1458 cat > confcache <<\EOF
1459 # This file is a shell script that caches the results of configure
1460 # tests run on this system so they can be shared between configure
1461 # scripts and configure runs. It is not useful on other systems.
1462 # If it contains results you don't want to keep, you may remove or edit it.
1464 # By default, configure uses ./config.cache as the cache file,
1465 # creating it if it does not exist already. You can give configure
1466 # the --cache-file=FILE option to use a different cache file; that is
1467 # what configure does when it calls configure scripts in
1468 # subdirectories, so they share the cache.
1469 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1470 # config.status only pays attention to the cache file if you give it the
1471 # --recheck option to rerun configure.
1474 # The following way of writing the cache mishandles newlines in values,
1475 # but we know of no workaround that is simple, portable, and efficient.
1476 # So, don't put newlines in cache variables' values.
1477 # Ultrix sh set writes to stderr and can't be redirected directly,
1478 # and sets the high bit in the cache file unless we assign to the vars.
1479 (set) 2>&1 |
1480 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1481 *ac_space=\ *)
1482 # `set' does not quote correctly, so add quotes (double-quote substitution
1483 # turns \\\\ into \\, and sed turns \\ into \).
1484 sed -n \
1485 -e "s/'/'\\\\''/g" \
1486 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1489 # `set' quotes correctly as required by POSIX, so do not add quotes.
1490 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1492 esac >> confcache
1493 if cmp -s $cache_file confcache; then
1495 else
1496 if test -w $cache_file; then
1497 echo "updating cache $cache_file"
1498 cat confcache > $cache_file
1499 else
1500 echo "not updating unwritable cache $cache_file"
1503 rm -f confcache
1506 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1507 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1508 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1509 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1510 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1511 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1512 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1513 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1515 # Reload cache, that may have been modified by ltconfig
1516 if test -r "$cache_file"; then
1517 echo "loading cache $cache_file"
1518 . $cache_file
1519 else
1520 echo "creating cache $cache_file"
1521 > $cache_file
1525 # This can be used to rebuild libtool when needed
1526 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1528 # Always use our own libtool.
1529 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1531 # Redirect the config.log output again, so that the ltconfig log is not
1532 # clobbered by the next message.
1533 exec 5>>./config.log
1536 user_bfd_gas=
1537 # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
1538 if test "${enable_bfd_assembler+set}" = set; then
1539 enableval="$enable_bfd_assembler"
1540 case "${enableval}" in
1541 yes) need_bfd=yes user_bfd_gas=yes ;;
1542 no) user_bfd_gas=no ;;
1543 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
1544 esac
1546 # Check whether --enable-targets or --disable-targets was given.
1547 if test "${enable_targets+set}" = set; then
1548 enableval="$enable_targets"
1549 case "${enableval}" in
1550 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1552 no) enable_targets= ;;
1553 *) enable_targets=$enableval ;;
1554 esac
1556 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1557 if test "${enable_commonbfdlib+set}" = set; then
1558 enableval="$enable_commonbfdlib"
1559 case "${enableval}" in
1560 yes) commonbfdlib=true ;;
1561 no) commonbfdlib=false ;;
1562 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1563 esac
1566 using_cgen=no
1568 build_warnings="-W -Wall"
1569 # Check whether --enable-build-warnings or --disable-build-warnings was given.
1570 if test "${enable_build_warnings+set}" = set; then
1571 enableval="$enable_build_warnings"
1572 case "${enableval}" in
1573 yes) ;;
1574 no) build_warnings="-w";;
1575 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
1576 build_warnings="${build_warnings} ${t}";;
1577 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
1578 build_warnings="${t} ${build_warnings}";;
1579 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
1580 esac
1581 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
1582 echo "Setting warning flags = $build_warnings" 6>&1
1585 WARN_CFLAGS=""
1586 if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
1587 WARN_CFLAGS="${build_warnings}"
1591 # Generate a header file
1596 # If we are on a DOS filesystem, we must use gdb.ini rather than
1597 # .gdbinit.
1598 GDBINIT=".gdbinit"
1599 case "${host}" in
1600 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
1601 GDBINIT="gdb.ini"
1603 esac
1606 te_file=generic
1608 # Makefile target for installing gas in $(tooldir)/bin.
1609 install_tooldir=install-exec-tooldir
1611 canon_targets=""
1612 all_targets=no
1613 if test -n "$enable_targets" ; then
1614 for t in `echo $enable_targets | sed 's/,/ /g'`; do
1615 if test $t = "all"; then
1616 all_targets=yes
1617 continue
1619 result=`$ac_config_sub $t 2>/dev/null`
1620 if test -n "$result" ; then
1621 canon_targets="$canon_targets $result"
1622 # else
1623 # # Permit "all", etc. We don't support it yet though.
1624 # canon_targets="$canon_targets $t"
1626 done
1627 _gas_uniq_list="$canon_targets"
1628 _gas_uniq_newlist=""
1629 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1630 case $_gas_uniq_i in
1631 _gas_uniq_dummy) ;;
1632 *) case " $_gas_uniq_newlist " in
1633 *" $_gas_uniq_i "*) ;;
1634 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1635 esac ;;
1636 esac
1637 done
1638 canon_targets=$_gas_uniq_newlist
1642 emulations=""
1644 for this_target in $target $canon_targets ; do
1646 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
1648 # check for architecture variants
1649 arch=
1650 endian=
1651 case ${cpu} in
1652 alpha*) cpu_type=alpha ;;
1653 armeb) cpu_type=arm endian=big ;;
1654 arm*) cpu_type=arm endian=little ;;
1655 armb*) cpu_type=arm endian=little ;;
1656 armv*l) cpu_type=arm endian=little ;;
1657 armv*b) cpu_type=arm endian=big ;;
1658 strongarm*) cpu_type=arm endian=little ;;
1659 thumb*) cpu_type=arm endian=little ;;
1660 hppa*) cpu_type=hppa ;;
1661 i[456]86) cpu_type=i386 ;;
1662 ia64) cpu_type=ia64 ;;
1663 m680[012346]0) cpu_type=m68k ;;
1664 m68008) cpu_type=m68k ;;
1665 m683??) cpu_type=m68k ;;
1666 m5200) cpu_type=m68k ;;
1667 m8*) cpu_type=m88k ;;
1668 mips*el) cpu_type=mips endian=little ;;
1669 mips*) cpu_type=mips endian=big ;;
1670 pjl*) cpu_type=pj endian=little ;;
1671 pj*) cpu_type=pj endian=big ;;
1672 powerpcle*) cpu_type=ppc endian=little ;;
1673 powerpc*) cpu_type=ppc endian=big ;;
1674 rs6000*) cpu_type=ppc ;;
1675 sparclite*) cpu_type=sparc arch=sparclite ;;
1676 sparclet*) cpu_type=sparc arch=sparclet ;;
1677 sparc64*) cpu_type=sparc arch=v9-64 ;;
1678 sparc86x*) cpu_type=sparc arch=sparc86x ;;
1679 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
1680 v850*) cpu_type=v850 ;;
1681 *) cpu_type=${cpu} ;;
1682 esac
1684 if test ${this_target} = $target ; then
1685 target_cpu_type=${cpu_type}
1686 elif test ${target_cpu_type} != ${cpu_type} ; then
1687 continue
1690 generic_target=${cpu_type}-$vendor-$os
1691 dev=no
1692 bfd_gas=no
1693 em=generic
1695 # assign object format
1696 case ${generic_target} in
1697 a29k-*-coff) fmt=coff ;;
1698 a29k-amd-udi) fmt=coff ;;
1699 a29k-amd-ebmon) fmt=coff ;;
1700 a29k-nyu-sym1) fmt=coff ;;
1701 a29k-*-vxworks*) fmt=coff ;;
1703 alpha*-*-*vms*) fmt=evax ;;
1704 alpha*-*-netware*) fmt=ecoff ;;
1705 alpha*-*-openbsd*) fmt=ecoff ;;
1706 alpha*-*-osf*) fmt=ecoff ;;
1707 alpha*-*-linuxecoff*) fmt=ecoff ;;
1708 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
1709 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
1711 arc-*-elf*) fmt=elf bfd_gas=yes ;;
1713 arm-*-aout) fmt=aout ;;
1714 arm-*-coff | thumb-*-coff) fmt=coff ;;
1715 arm-*-elf | thumb-*-elf) fmt=elf ;;
1716 arm*-*-conix*) fmt=elf ;;
1717 arm-*-linux*aout*) fmt=aout em=linux ;;
1718 arm*-*-linux-gnu*) fmt=elf em=linux ;;
1719 arm-*-netbsd*) fmt=aout em=nbsd ;;
1720 arm-*-oabi | thumb-*-oabi) fmt=elf ;;
1721 arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
1722 arm-*-wince) fmt=coff em=wince-pe ;;
1723 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
1724 arm-*-riscix*) fmt=aout em=riscix ;;
1726 avr-*-*) fmt=elf bfd_gas=yes ;;
1728 d10v-*-*) fmt=elf bfd_gas=yes ;;
1729 d30v-*-*) fmt=elf bfd_gas=yes ;;
1732 fr30-*-*) fmt=elf bfd_gas=yes ;;
1734 hppa-*-linux-gnu*) fmt=elf em=linux ;;
1735 hppa-*-*elf*) fmt=elf em=hppa ;;
1736 hppa-*-lites*) fmt=elf em=hppa ;;
1737 hppa-*-osf*) fmt=som em=hppa ;;
1738 hppa-*-rtems*) fmt=elf em=hppa ;;
1739 hppa-*-hpux11*) em=hppa
1740 case ${cpu} in
1741 hppa*64*)
1742 fmt=elf;;
1743 hppa*)
1744 fmt=som;;
1745 esac
1747 hppa-*-hpux*) fmt=som em=hppa ;;
1748 hppa-*-mpeix*) fmt=som em=hppa ;;
1749 hppa-*-bsd*) fmt=som em=hppa ;;
1750 hppa-*-hiux*) fmt=som em=hppa ;;
1752 h8300-*-coff) fmt=coff ;;
1754 i370-*-elf* | i370-*-linux*) fmt=elf ;;
1755 i386-ibm-aix*) fmt=coff em=i386aix ;;
1756 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
1757 i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
1758 i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
1759 i386-*-bsd*) fmt=aout em=386bsd ;;
1760 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
1761 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
1762 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
1763 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
1764 i386-*-linux*coff*) fmt=coff em=linux ;;
1765 i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
1766 i386-*-lynxos*) fmt=coff em=lynx ;;
1767 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
1768 fmt=elf bfd_gas=yes ;;
1769 i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12])
1770 fmt=aout em=386bsd ;;
1771 i386-*-freebsd*) fmt=elf bfd_gas=yes ;;
1772 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
1773 fmt=coff ;;
1774 i386-*-sco3.2v5*) fmt=elf
1775 if test ${this_target} = $target; then
1776 cat >> confdefs.h <<\EOF
1777 #define SCO_ELF 1
1782 i386-*-sco3.2*) fmt=coff ;;
1783 i386-*-vsta) fmt=aout ;;
1784 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
1785 fmt=coff em=go32;;
1786 i386-*-rtemself*) fmt=elf ;;
1787 i386-*-rtems*) fmt=coff ;;
1788 i386-*-gnu*) fmt=elf ;;
1789 i386-*-mach*)
1790 fmt=aout em=mach bfd_gas=yes ;;
1791 i386-*-msdos*) fmt=aout ;;
1792 i386-*-moss*) fmt=elf ;;
1793 i386-*-pe) fmt=coff em=pe bfd_gas=yes ;;
1794 i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
1795 i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;;
1796 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
1797 i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;;
1798 i386-*-vxworks*) fmt=aout ;;
1799 i960-*-bout) fmt=bout ;;
1800 i960-*-coff) fmt=coff em=ic960 ;;
1801 i960-*-rtems*) fmt=coff em=ic960 ;;
1802 i960-*-nindy*) fmt=bout ;;
1803 i960-*-vxworks4*) fmt=bout ;;
1804 i960-*-vxworks5.0) fmt=bout ;;
1805 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
1806 i960-*-vxworks*) fmt=bout ;;
1807 i960-*-elf*) fmt=elf ;;
1809 ia64-*-elf*) fmt=elf ;;
1810 ia64-*-linux-gnu*) fmt=elf em=linux ;;
1812 m32r-*-*) fmt=elf bfd_gas=yes ;;
1814 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
1815 fmt=aout em=sun3 ;;
1816 m68k-motorola-sysv*) fmt=coff em=delta ;;
1817 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
1818 m68k-apollo-*) fmt=coff em=apollo ;;
1819 m68k-*-sysv4*) # must be before -sysv*
1820 fmt=elf em=svr4 ;;
1821 m68k-*-elf*) fmt=elf ;;
1822 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
1823 fmt=coff ;;
1824 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
1825 m68k-*-linux*aout*) fmt=aout em=linux ;;
1826 m68k-*-linux-gnu*) fmt=elf em=linux ;;
1827 m68k-*-gnu*) fmt=elf ;;
1828 m68k-*-lynxos*) fmt=coff em=lynx ;;
1829 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1830 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1831 m68k-apple-aux*) fmt=coff em=aux ;;
1832 m68k-*-psos*) fmt=elf em=psos;;
1834 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
1835 m88k-*-coff*) fmt=coff ;;
1837 mcore-*-elf) fmt=elf bfd_gas=yes ;;
1838 mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
1840 # don't change em like *-*-bsd does
1841 mips-dec-netbsd*) fmt=elf endian=little ;;
1842 mips-dec-openbsd*) fmt=elf endian=little ;;
1843 mips-dec-bsd*) fmt=aout endian=little ;;
1844 mips-sony-bsd*) fmt=ecoff ;;
1845 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
1846 mips-*-ultrix*) fmt=ecoff endian=little ;;
1847 mips-*-osf*) fmt=ecoff endian=little ;;
1848 mips-*-ecoff*) fmt=ecoff ;;
1849 mips-*-ecoff*) fmt=ecoff ;;
1850 mips-*-pe*) fmt=coff endian=little em=pe ;;
1851 mips-*-irix6*) fmt=elf ;;
1852 mips-*-irix5*) fmt=elf ;;
1853 mips-*-irix*) fmt=ecoff ;;
1854 mips-*-lnews*) fmt=ecoff em=lnews ;;
1855 mips-*-riscos*) fmt=ecoff ;;
1856 mips-*-sysv*) fmt=ecoff ;;
1857 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
1858 fmt=elf ;;
1859 mips-*-vxworks*) fmt=elf
1860 cat >> confdefs.h <<\EOF
1861 #define MIPS_STABS_ELF 1
1865 mn10200-*-*) fmt=elf bfd_gas=yes ;;
1866 mn10300-*-*) fmt=elf bfd_gas=yes ;;
1867 pj*) fmt=elf ;;
1868 ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
1869 fmt=coff em=pe ;;
1870 ppc-*-aix*) fmt=coff ;;
1871 ppc-*-beos*) fmt=coff ;;
1872 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
1873 fmt=elf ;;
1874 ppc-*-linux-gnu*) fmt=elf
1875 case "$endian" in
1876 big) ;;
1877 *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
1878 esac
1880 ppc-*-solaris*) fmt=elf
1881 if test ${this_target} = $target; then
1882 cat >> confdefs.h <<\EOF
1883 #define TARGET_SOLARIS_COMMENT 1
1887 if test x${endian} = xbig; then
1888 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
1891 ppc-*-rtems*) fmt=elf ;;
1892 ppc-*-macos* | ppc-*-mpw*)
1893 fmt=coff em=macos ;;
1894 ppc-*-netware*) fmt=elf em=ppcnw ;;
1895 ppc-*-vxworks*) fmt=elf ;;
1897 sh-*-elf*) fmt=elf ;;
1898 sh-*-coff*) fmt=coff ;;
1899 sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
1900 sh-*-rtemself*) fmt=elf ;;
1901 sh-*-rtems*) fmt=coff ;;
1903 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
1904 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
1905 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
1907 sparc-*-rtems*) fmt=aout ;;
1908 sparc-*-sunos4*) fmt=aout em=sun3 ;;
1909 sparc-*-aout | sparc*-*-vxworks*)
1910 fmt=aout em=sparcaout ;;
1911 sparc-*-coff) fmt=coff ;;
1912 sparc-*-linux*aout*) fmt=aout em=linux ;;
1913 sparc-*-linux-gnu*) fmt=elf em=linux ;;
1914 sparc-*-lynxos*) fmt=coff em=lynx ;;
1915 sparc-fujitsu-none) fmt=aout ;;
1916 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
1917 fmt=elf ;;
1918 sparc-*-netbsd*) em=nbsd bfd_gas=yes
1919 case ${cpu} in
1920 sparc) case ${os} in
1921 *elf*) fmt=elf ;;
1922 *) fmt=aout ;;
1923 esac ;;
1924 sparc64) fmt=elf ;;
1925 esac
1927 sparc-*-openbsd*) fmt=aout em=nbsd ;;
1929 strongarm-*-coff) fmt=coff ;;
1930 strongarm-*-elf) fmt=elf ;;
1932 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
1933 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
1934 tic80-*-*) fmt=coff ;;
1936 v850-*-*) fmt=elf bfd_gas=yes ;;
1937 v850e-*-*) fmt=elf bfd_gas=yes ;;
1938 v850ea-*-*) fmt=elf bfd_gas=yes ;;
1940 vax-*-bsd* | vax-*-ultrix*)
1941 fmt=aout ;;
1942 vax-*-vms) fmt=vms ;;
1945 z8k-*-coff | z8k-*-sim)
1946 fmt=coff ;;
1948 w65-*-*) fmt=coff ;;
1950 *-*-aout | *-*-scout)
1951 fmt=aout ;;
1952 *-*-nindy*)
1953 fmt=bout ;;
1954 *-*-bsd*)
1955 fmt=aout em=sun3 ;;
1956 *-*-generic) fmt=generic ;;
1957 *-*-xray | *-*-hms) fmt=coff ;;
1958 *-*-sim) fmt=coff ;;
1959 *-*-elf | *-*-sysv4* | *-*-solaris*)
1960 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
1961 fmt=elf dev=yes ;;
1962 *-*-vxworks) fmt=aout ;;
1963 *-*-netware) fmt=elf ;;
1964 esac
1966 if test ${this_target} = $target ; then
1967 endian_def=
1968 if test x${endian} = xbig; then
1969 endian_def=1
1970 elif test x${endian} = xlittle; then
1971 endian_def=0
1973 if test x${endian_def} != x; then
1974 cat >> confdefs.h <<EOF
1975 #define TARGET_BYTES_BIG_ENDIAN $endian_def
1981 case ${cpu_type}-${fmt} in
1982 alpha*-*) bfd_gas=yes ;;
1983 arm-*) bfd_gas=yes ;;
1984 # not yet
1985 # i386-aout) bfd_gas=preferred ;;
1986 ia64*-*) bfd_gas=yes ;;
1987 mips-*) bfd_gas=yes ;;
1988 ns32k-*) bfd_gas=yes ;;
1989 ppc-*) bfd_gas=yes ;;
1990 sparc-*) bfd_gas=yes ;;
1991 strongarm-*) bfd_gas=yes ;;
1992 *-elf) bfd_gas=yes ;;
1993 *-ecoff) bfd_gas=yes ;;
1994 *-som) bfd_gas=yes ;;
1995 #enable bfd for coff and aout to allow testing if a bfd target is
1996 #the primary target, but not for coff or aout as the primary target
1997 i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
1998 i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
1999 *) ;;
2000 esac
2002 # Other random stuff.
2004 # Do we need the opcodes library?
2005 case ${cpu_type} in
2006 vax | i386 | tic30)
2010 need_opcodes=yes
2012 case "${enable_shared}" in
2013 yes) shared_opcodes=true ;;
2014 *opcodes*) shared_opcodes=true ;;
2015 *) shared_opcodes=false ;;
2016 esac
2017 if test "${shared_opcodes}" = "true"; then
2018 # A shared libopcodes must be linked against libbfd.
2019 need_bfd=yes
2022 esac
2024 # Any other special object files needed ?
2025 case ${cpu_type} in
2026 fr30 | m32r)
2027 using_cgen=yes
2030 m68k)
2031 case ${extra_objects} in
2032 *m68k-parse.o*) ;;
2033 *) extra_objects="$extra_objects m68k-parse.o" ;;
2034 esac
2037 mips)
2038 echo ${extra_objects} | grep -s "itbl-parse.o"
2039 if test $? -ne 0 ; then
2040 extra_objects="$extra_objects itbl-parse.o"
2043 echo ${extra_objects} | grep -s "itbl-lex.o"
2044 if test $? -ne 0 ; then
2045 extra_objects="$extra_objects itbl-lex.o"
2048 echo ${extra_objects} | grep -s "itbl-ops.o"
2049 if test $? -ne 0 ; then
2050 extra_objects="$extra_objects itbl-ops.o"
2054 sparc)
2055 if test $this_target = $target ; then
2056 cat >> confdefs.h <<EOF
2057 #define DEFAULT_ARCH "${arch}"
2064 esac
2066 if test $using_cgen = yes ; then
2067 case "x${extra_objects}" in
2068 *cgen.o*) ;;
2069 *) extra_objects="$extra_objects cgen.o" ;;
2070 esac
2073 # See if we really can support this configuration with the emulation code.
2075 if test $this_target = $target ; then
2076 primary_bfd_gas=$bfd_gas
2077 obj_format=$fmt
2078 te_file=$em
2080 if test $bfd_gas = no ; then
2081 # Can't support other configurations this way.
2082 break
2084 elif test $bfd_gas = no ; then
2085 # Can't support this configuration.
2086 break
2089 # From target name and format, produce a list of supported emulations.
2091 case ${generic_target}-${fmt} in
2092 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2093 mips-*-linux-gnu*-*) case "$endian" in
2094 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2095 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
2096 esac ;;
2097 mips-*-lnews*-ecoff) ;;
2098 mips-*-*-ecoff) case "$endian" in
2099 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
2100 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
2101 esac ;;
2102 mips-*-*-elf) case "$endian" in
2103 big) emulation="mipsbelf mipslelf mipself" ;;
2104 *) emulation="mipslelf mipsbelf mipself" ;;
2105 esac ;;
2106 # Uncommenting the next line will turn on support for i386 AOUT
2107 # for the default linux configuration
2108 # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
2110 i386-*-aout) emulation="i386aout" ;;
2111 i386-*-coff) emulation="i386coff" ;;
2112 i386-*-elf) emulation="i386elf" ;;
2113 esac
2115 emulations="$emulations $emulation"
2117 done
2119 # Turn on all targets if possible
2120 if test ${all_targets} = "yes"; then
2121 case ${target_cpu_type} in
2122 i386)
2123 case ${obj_format} in
2124 aout)
2125 emulations="$emulations i386coff i386elf"
2127 coff)
2128 emulations="$emulations i386aout i386elf"
2130 elf)
2131 emulations="$emulations i386aout i386coff"
2133 esac
2135 esac
2138 # Assign floating point type. Most processors with FP support
2139 # IEEE FP. On those that don't support FP at all, usually IEEE
2140 # is emulated.
2141 case ${target_cpu} in
2142 vax | tahoe ) atof=${target_cpu} ;;
2143 *) atof=ieee ;;
2144 esac
2146 case "${obj_format}" in
2147 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
2148 esac
2150 # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
2151 cgen_cpu_prefix=""
2152 if test $using_cgen = yes ; then
2153 case ${target_cpu} in
2154 *) cgen_cpu_prefix=${target_cpu} ;;
2155 esac
2157 cat >> confdefs.h <<\EOF
2158 #define USING_CGEN 1
2164 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
2165 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
2168 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
2169 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
2172 case ${user_bfd_gas}-${primary_bfd_gas} in
2173 yes-yes | no-no)
2174 # We didn't override user's choice.
2176 no-yes)
2177 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
2179 no-preferred)
2180 primary_bfd_gas=no
2182 *-preferred)
2183 primary_bfd_gas=yes
2185 yes-*)
2186 primary_bfd_gas=yes
2189 # User specified nothing.
2191 esac
2193 # Some COFF configurations want these random other flags set.
2194 case ${obj_format} in
2195 coff)
2196 case ${target_cpu_type} in
2197 i386) cat >> confdefs.h <<\EOF
2198 #define I386COFF 1
2201 m68k) cat >> confdefs.h <<\EOF
2202 #define M68KCOFF 1
2205 m88k) cat >> confdefs.h <<\EOF
2206 #define M88KCOFF 1
2209 esac
2211 esac
2213 # Getting this done right is going to be a bitch. Each configuration specified
2214 # with --enable-targets=... should be checked for environment, format, cpu, and
2215 # bfd_gas setting.
2217 # For each configuration, the necessary object file support code must be linked
2218 # in. This might be only one, it might be up to four. The necessary emulation
2219 # code needs to be provided, too.
2221 # And then there's "--enable-targets=all"....
2223 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
2225 formats="${obj_format}"
2226 emfiles=""
2227 EMULATIONS=""
2228 _gas_uniq_list="$emulations"
2229 _gas_uniq_newlist=""
2230 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2231 case $_gas_uniq_i in
2232 _gas_uniq_dummy) ;;
2233 *) case " $_gas_uniq_newlist " in
2234 *" $_gas_uniq_i "*) ;;
2235 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2236 esac ;;
2237 esac
2238 done
2239 emulations=$_gas_uniq_newlist
2241 for em in . $emulations ; do
2242 case $em in
2243 .) continue ;;
2244 mipsbelf | mipslelf)
2245 fmt=elf file=mipself ;;
2246 mipsbecoff | mipslecoff)
2247 fmt=ecoff file=mipsecoff ;;
2248 *coff)
2249 fmt=coff file=$em ;;
2250 *aout)
2251 fmt=aout file=$em ;;
2252 *elf)
2253 fmt=elf file=$em ;;
2254 esac
2255 formats="$formats $fmt"
2256 emfiles="$emfiles e-$file.o"
2257 EMULATIONS="$EMULATIONS &$em,"
2258 done
2259 _gas_uniq_list="$formats"
2260 _gas_uniq_newlist=""
2261 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2262 case $_gas_uniq_i in
2263 _gas_uniq_dummy) ;;
2264 *) case " $_gas_uniq_newlist " in
2265 *" $_gas_uniq_i "*) ;;
2266 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2267 esac ;;
2268 esac
2269 done
2270 formats=$_gas_uniq_newlist
2272 _gas_uniq_list="$emfiles"
2273 _gas_uniq_newlist=""
2274 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2275 case $_gas_uniq_i in
2276 _gas_uniq_dummy) ;;
2277 *) case " $_gas_uniq_newlist " in
2278 *" $_gas_uniq_i "*) ;;
2279 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2280 esac ;;
2281 esac
2282 done
2283 emfiles=$_gas_uniq_newlist
2285 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
2286 for fmt in $formats ; do
2287 case $fmt in
2288 aout) cat >> confdefs.h <<\EOF
2289 #define OBJ_MAYBE_AOUT 1
2292 bout) cat >> confdefs.h <<\EOF
2293 #define OBJ_MAYBE_BOUT 1
2296 coff) cat >> confdefs.h <<\EOF
2297 #define OBJ_MAYBE_COFF 1
2300 ecoff) cat >> confdefs.h <<\EOF
2301 #define OBJ_MAYBE_ECOFF 1
2304 elf) cat >> confdefs.h <<\EOF
2305 #define OBJ_MAYBE_ELF 1
2308 generic) cat >> confdefs.h <<\EOF
2309 #define OBJ_MAYBE_GENERIC 1
2312 hp300) cat >> confdefs.h <<\EOF
2313 #define OBJ_MAYBE_HP300 1
2316 ieee) cat >> confdefs.h <<\EOF
2317 #define OBJ_MAYBE_IEEE 1
2320 som) cat >> confdefs.h <<\EOF
2321 #define OBJ_MAYBE_SOM 1
2324 vms) cat >> confdefs.h <<\EOF
2325 #define OBJ_MAYBE_VMS 1
2328 esac
2329 extra_objects="$extra_objects obj-$fmt.o"
2330 done
2331 obj_format=multi
2333 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
2334 DEFAULT_EMULATION=`set . $emulations ; echo $2`
2335 # e-mips* has more than one emulation per file, e-i386* has just one at the
2336 # moment. If only one emulation is specified, then don't define
2337 # USE_EMULATIONS or include any of the e-files as they will only be bloat.
2338 case "${obj_format}${emfiles}" in
2339 multi* | *mips*)
2340 extra_objects="$extra_objects $emfiles"
2341 cat >> confdefs.h <<\EOF
2342 #define USE_EMULATIONS 1
2345 esac
2348 cat >> confdefs.h <<EOF
2349 #define EMULATIONS $EMULATIONS
2352 cat >> confdefs.h <<EOF
2353 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
2357 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
2358 yes-*-coff) need_bfd=yes ;;
2359 no-*-coff) need_bfd=yes
2360 cat >> confdefs.h <<\EOF
2361 #define MANY_SEGMENTS 1
2364 esac
2366 reject_dev_configs=yes
2368 case ${reject_dev_configs}-${dev} in
2369 yes-yes) # Oops.
2370 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
2372 esac
2380 case "${primary_bfd_gas}" in
2381 yes) cat >> confdefs.h <<\EOF
2382 #define BFD_ASSEMBLER 1
2385 need_bfd=yes ;;
2386 esac
2388 # do we need the opcodes library?
2389 case "${need_opcodes}" in
2390 yes)
2391 OPCODES_LIB=../opcodes/libopcodes.la
2393 esac
2395 case "${need_bfd}" in
2396 yes)
2397 BFDLIB=../bfd/libbfd.la
2398 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
2400 esac
2407 cat >> confdefs.h <<EOF
2408 #define TARGET_ALIAS "${target_alias}"
2411 cat >> confdefs.h <<EOF
2412 #define TARGET_CANONICAL "${target}"
2415 cat >> confdefs.h <<EOF
2416 #define TARGET_CPU "${target_cpu}"
2419 cat >> confdefs.h <<EOF
2420 #define TARGET_VENDOR "${target_vendor}"
2423 cat >> confdefs.h <<EOF
2424 #define TARGET_OS "${target_os}"
2428 # Extract the first word of "gcc", so it can be a program name with args.
2429 set dummy gcc; ac_word=$2
2430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2431 echo "configure:2432: checking for $ac_word" >&5
2432 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2433 echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435 if test -n "$CC"; then
2436 ac_cv_prog_CC="$CC" # Let the user override the test.
2437 else
2438 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2439 ac_dummy="$PATH"
2440 for ac_dir in $ac_dummy; do
2441 test -z "$ac_dir" && ac_dir=.
2442 if test -f $ac_dir/$ac_word; then
2443 ac_cv_prog_CC="gcc"
2444 break
2446 done
2447 IFS="$ac_save_ifs"
2450 CC="$ac_cv_prog_CC"
2451 if test -n "$CC"; then
2452 echo "$ac_t""$CC" 1>&6
2453 else
2454 echo "$ac_t""no" 1>&6
2457 if test -z "$CC"; then
2458 # Extract the first word of "cc", so it can be a program name with args.
2459 set dummy cc; ac_word=$2
2460 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2461 echo "configure:2462: checking for $ac_word" >&5
2462 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2463 echo $ac_n "(cached) $ac_c" 1>&6
2464 else
2465 if test -n "$CC"; then
2466 ac_cv_prog_CC="$CC" # Let the user override the test.
2467 else
2468 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2469 ac_prog_rejected=no
2470 ac_dummy="$PATH"
2471 for ac_dir in $ac_dummy; do
2472 test -z "$ac_dir" && ac_dir=.
2473 if test -f $ac_dir/$ac_word; then
2474 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2475 ac_prog_rejected=yes
2476 continue
2478 ac_cv_prog_CC="cc"
2479 break
2481 done
2482 IFS="$ac_save_ifs"
2483 if test $ac_prog_rejected = yes; then
2484 # We found a bogon in the path, so make sure we never use it.
2485 set dummy $ac_cv_prog_CC
2486 shift
2487 if test $# -gt 0; then
2488 # We chose a different compiler from the bogus one.
2489 # However, it has the same basename, so the bogon will be chosen
2490 # first if we set CC to just the basename; use the full file name.
2491 shift
2492 set dummy "$ac_dir/$ac_word" "$@"
2493 shift
2494 ac_cv_prog_CC="$@"
2499 CC="$ac_cv_prog_CC"
2500 if test -n "$CC"; then
2501 echo "$ac_t""$CC" 1>&6
2502 else
2503 echo "$ac_t""no" 1>&6
2506 if test -z "$CC"; then
2507 case "`uname -s`" in
2508 *win32* | *WIN32*)
2509 # Extract the first word of "cl", so it can be a program name with args.
2510 set dummy cl; ac_word=$2
2511 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2512 echo "configure:2513: checking for $ac_word" >&5
2513 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2514 echo $ac_n "(cached) $ac_c" 1>&6
2515 else
2516 if test -n "$CC"; then
2517 ac_cv_prog_CC="$CC" # Let the user override the test.
2518 else
2519 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2520 ac_dummy="$PATH"
2521 for ac_dir in $ac_dummy; do
2522 test -z "$ac_dir" && ac_dir=.
2523 if test -f $ac_dir/$ac_word; then
2524 ac_cv_prog_CC="cl"
2525 break
2527 done
2528 IFS="$ac_save_ifs"
2531 CC="$ac_cv_prog_CC"
2532 if test -n "$CC"; then
2533 echo "$ac_t""$CC" 1>&6
2534 else
2535 echo "$ac_t""no" 1>&6
2538 esac
2540 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2543 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2544 echo "configure:2545: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2546 ac_ext=c
2547 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2548 ac_cpp='$CPP $CPPFLAGS'
2549 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2550 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2551 cross_compiling=$ac_cv_prog_cc_cross
2553 cat > conftest.$ac_ext << EOF
2555 #line 2556 "configure"
2556 #include "confdefs.h"
2558 main(){return(0);}
2560 if { (eval echo configure:2561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2561 ac_cv_prog_cc_works=yes
2562 # If we can't run a trivial program, we are probably using a cross compiler.
2563 if (./conftest; exit) 2>/dev/null; then
2564 ac_cv_prog_cc_cross=no
2565 else
2566 ac_cv_prog_cc_cross=yes
2568 else
2569 echo "configure: failed program was:" >&5
2570 cat conftest.$ac_ext >&5
2571 ac_cv_prog_cc_works=no
2573 rm -fr conftest*
2574 ac_ext=c
2575 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2576 ac_cpp='$CPP $CPPFLAGS'
2577 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2578 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2579 cross_compiling=$ac_cv_prog_cc_cross
2581 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2582 if test $ac_cv_prog_cc_works = no; then
2583 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2585 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2586 echo "configure:2587: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2587 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2588 cross_compiling=$ac_cv_prog_cc_cross
2590 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2591 echo "configure:2592: checking whether we are using GNU C" >&5
2592 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2593 echo $ac_n "(cached) $ac_c" 1>&6
2594 else
2595 cat > conftest.c <<EOF
2596 #ifdef __GNUC__
2597 yes;
2598 #endif
2600 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2601 ac_cv_prog_gcc=yes
2602 else
2603 ac_cv_prog_gcc=no
2607 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2609 if test $ac_cv_prog_gcc = yes; then
2610 GCC=yes
2611 else
2612 GCC=
2615 ac_test_CFLAGS="${CFLAGS+set}"
2616 ac_save_CFLAGS="$CFLAGS"
2617 CFLAGS=
2618 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2619 echo "configure:2620: checking whether ${CC-cc} accepts -g" >&5
2620 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2621 echo $ac_n "(cached) $ac_c" 1>&6
2622 else
2623 echo 'void f(){}' > conftest.c
2624 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2625 ac_cv_prog_cc_g=yes
2626 else
2627 ac_cv_prog_cc_g=no
2629 rm -f conftest*
2633 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2634 if test "$ac_test_CFLAGS" = set; then
2635 CFLAGS="$ac_save_CFLAGS"
2636 elif test $ac_cv_prog_cc_g = yes; then
2637 if test "$GCC" = yes; then
2638 CFLAGS="-g -O2"
2639 else
2640 CFLAGS="-g"
2642 else
2643 if test "$GCC" = yes; then
2644 CFLAGS="-O2"
2645 else
2646 CFLAGS=
2651 for ac_prog in 'bison -y' byacc
2653 # Extract the first word of "$ac_prog", so it can be a program name with args.
2654 set dummy $ac_prog; ac_word=$2
2655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2656 echo "configure:2657: checking for $ac_word" >&5
2657 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2658 echo $ac_n "(cached) $ac_c" 1>&6
2659 else
2660 if test -n "$YACC"; then
2661 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2662 else
2663 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2664 ac_dummy="$PATH"
2665 for ac_dir in $ac_dummy; do
2666 test -z "$ac_dir" && ac_dir=.
2667 if test -f $ac_dir/$ac_word; then
2668 ac_cv_prog_YACC="$ac_prog"
2669 break
2671 done
2672 IFS="$ac_save_ifs"
2675 YACC="$ac_cv_prog_YACC"
2676 if test -n "$YACC"; then
2677 echo "$ac_t""$YACC" 1>&6
2678 else
2679 echo "$ac_t""no" 1>&6
2682 test -n "$YACC" && break
2683 done
2684 test -n "$YACC" || YACC="yacc"
2686 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2687 echo "configure:2688: checking how to run the C preprocessor" >&5
2688 # On Suns, sometimes $CPP names a directory.
2689 if test -n "$CPP" && test -d "$CPP"; then
2690 CPP=
2692 if test -z "$CPP"; then
2693 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2694 echo $ac_n "(cached) $ac_c" 1>&6
2695 else
2696 # This must be in double quotes, not single quotes, because CPP may get
2697 # substituted into the Makefile and "${CC-cc}" will confuse make.
2698 CPP="${CC-cc} -E"
2699 # On the NeXT, cc -E runs the code through the compiler's parser,
2700 # not just through cpp.
2701 cat > conftest.$ac_ext <<EOF
2702 #line 2703 "configure"
2703 #include "confdefs.h"
2704 #include <assert.h>
2705 Syntax Error
2707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2708 { (eval echo configure:2709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2710 if test -z "$ac_err"; then
2712 else
2713 echo "$ac_err" >&5
2714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
2716 rm -rf conftest*
2717 CPP="${CC-cc} -E -traditional-cpp"
2718 cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721 #include <assert.h>
2722 Syntax Error
2724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2725 { (eval echo configure:2726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2727 if test -z "$ac_err"; then
2729 else
2730 echo "$ac_err" >&5
2731 echo "configure: failed program was:" >&5
2732 cat conftest.$ac_ext >&5
2733 rm -rf conftest*
2734 CPP="${CC-cc} -nologo -E"
2735 cat > conftest.$ac_ext <<EOF
2736 #line 2737 "configure"
2737 #include "confdefs.h"
2738 #include <assert.h>
2739 Syntax Error
2741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2742 { (eval echo configure:2743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2744 if test -z "$ac_err"; then
2746 else
2747 echo "$ac_err" >&5
2748 echo "configure: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
2750 rm -rf conftest*
2751 CPP=/lib/cpp
2753 rm -f conftest*
2755 rm -f conftest*
2757 rm -f conftest*
2758 ac_cv_prog_CPP="$CPP"
2760 CPP="$ac_cv_prog_CPP"
2761 else
2762 ac_cv_prog_CPP="$CPP"
2764 echo "$ac_t""$CPP" 1>&6
2766 missing_dir=`cd $ac_aux_dir && pwd`
2767 for ac_prog in flex lex
2769 # Extract the first word of "$ac_prog", so it can be a program name with args.
2770 set dummy $ac_prog; ac_word=$2
2771 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2772 echo "configure:2773: checking for $ac_word" >&5
2773 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2774 echo $ac_n "(cached) $ac_c" 1>&6
2775 else
2776 if test -n "$LEX"; then
2777 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2778 else
2779 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2780 ac_dummy="$PATH"
2781 for ac_dir in $ac_dummy; do
2782 test -z "$ac_dir" && ac_dir=.
2783 if test -f $ac_dir/$ac_word; then
2784 ac_cv_prog_LEX="$ac_prog"
2785 break
2787 done
2788 IFS="$ac_save_ifs"
2791 LEX="$ac_cv_prog_LEX"
2792 if test -n "$LEX"; then
2793 echo "$ac_t""$LEX" 1>&6
2794 else
2795 echo "$ac_t""no" 1>&6
2798 test -n "$LEX" && break
2799 done
2800 test -n "$LEX" || LEX=""$missing_dir/missing flex""
2802 # Extract the first word of "flex", so it can be a program name with args.
2803 set dummy flex; ac_word=$2
2804 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2805 echo "configure:2806: checking for $ac_word" >&5
2806 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2807 echo $ac_n "(cached) $ac_c" 1>&6
2808 else
2809 if test -n "$LEX"; then
2810 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2811 else
2812 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2813 ac_dummy="$PATH"
2814 for ac_dir in $ac_dummy; do
2815 test -z "$ac_dir" && ac_dir=.
2816 if test -f $ac_dir/$ac_word; then
2817 ac_cv_prog_LEX="flex"
2818 break
2820 done
2821 IFS="$ac_save_ifs"
2822 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2825 LEX="$ac_cv_prog_LEX"
2826 if test -n "$LEX"; then
2827 echo "$ac_t""$LEX" 1>&6
2828 else
2829 echo "$ac_t""no" 1>&6
2832 if test -z "$LEXLIB"
2833 then
2834 case "$LEX" in
2835 flex*) ac_lib=fl ;;
2836 *) ac_lib=l ;;
2837 esac
2838 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2839 echo "configure:2840: checking for yywrap in -l$ac_lib" >&5
2840 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2841 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
2843 else
2844 ac_save_LIBS="$LIBS"
2845 LIBS="-l$ac_lib $LIBS"
2846 cat > conftest.$ac_ext <<EOF
2847 #line 2848 "configure"
2848 #include "confdefs.h"
2849 /* Override any gcc2 internal prototype to avoid an error. */
2850 /* We use char because int might match the return type of a gcc2
2851 builtin and then its argument prototype would still apply. */
2852 char yywrap();
2854 int main() {
2855 yywrap()
2856 ; return 0; }
2858 if { (eval echo configure:2859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2859 rm -rf conftest*
2860 eval "ac_cv_lib_$ac_lib_var=yes"
2861 else
2862 echo "configure: failed program was:" >&5
2863 cat conftest.$ac_ext >&5
2864 rm -rf conftest*
2865 eval "ac_cv_lib_$ac_lib_var=no"
2867 rm -f conftest*
2868 LIBS="$ac_save_LIBS"
2871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2872 echo "$ac_t""yes" 1>&6
2873 LEXLIB="-l$ac_lib"
2874 else
2875 echo "$ac_t""no" 1>&6
2880 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2881 echo "configure:2882: checking lex output file root" >&5
2882 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2883 echo $ac_n "(cached) $ac_c" 1>&6
2884 else
2885 # The minimal lex program is just a single line: %%. But some broken lexes
2886 # (Solaris, I think it was) want two %% lines, so accommodate them.
2887 echo '%%
2888 %%' | $LEX
2889 if test -f lex.yy.c; then
2890 ac_cv_prog_lex_root=lex.yy
2891 elif test -f lexyy.c; then
2892 ac_cv_prog_lex_root=lexyy
2893 else
2894 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2898 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2899 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2901 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2902 echo "configure:2903: checking whether yytext is a pointer" >&5
2903 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2904 echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906 # POSIX says lex can declare yytext either as a pointer or an array; the
2907 # default is implementation-dependent. Figure out which it is, since
2908 # not all implementations provide the %pointer and %array declarations.
2909 ac_cv_prog_lex_yytext_pointer=no
2910 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2911 ac_save_LIBS="$LIBS"
2912 LIBS="$LIBS $LEXLIB"
2913 cat > conftest.$ac_ext <<EOF
2914 #line 2915 "configure"
2915 #include "confdefs.h"
2916 `cat $LEX_OUTPUT_ROOT.c`
2917 int main() {
2919 ; return 0; }
2921 if { (eval echo configure:2922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2922 rm -rf conftest*
2923 ac_cv_prog_lex_yytext_pointer=yes
2924 else
2925 echo "configure: failed program was:" >&5
2926 cat conftest.$ac_ext >&5
2928 rm -f conftest*
2929 LIBS="$ac_save_LIBS"
2930 rm -f "${LEX_OUTPUT_ROOT}.c"
2934 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2935 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2936 cat >> confdefs.h <<\EOF
2937 #define YYTEXT_POINTER 1
2943 ALL_LINGUAS=
2944 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2945 echo "configure:2946: checking for POSIXized ISC" >&5
2946 if test -d /etc/conf/kconfig.d &&
2947 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2948 then
2949 echo "$ac_t""yes" 1>&6
2950 ISC=yes # If later tests want to check for ISC.
2951 cat >> confdefs.h <<\EOF
2952 #define _POSIX_SOURCE 1
2955 if test "$GCC" = yes; then
2956 CC="$CC -posix"
2957 else
2958 CC="$CC -Xp"
2960 else
2961 echo "$ac_t""no" 1>&6
2962 ISC=
2965 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2966 echo "configure:2967: checking for ANSI C header files" >&5
2967 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2968 echo $ac_n "(cached) $ac_c" 1>&6
2969 else
2970 cat > conftest.$ac_ext <<EOF
2971 #line 2972 "configure"
2972 #include "confdefs.h"
2973 #include <stdlib.h>
2974 #include <stdarg.h>
2975 #include <string.h>
2976 #include <float.h>
2978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2979 { (eval echo configure:2980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2981 if test -z "$ac_err"; then
2982 rm -rf conftest*
2983 ac_cv_header_stdc=yes
2984 else
2985 echo "$ac_err" >&5
2986 echo "configure: failed program was:" >&5
2987 cat conftest.$ac_ext >&5
2988 rm -rf conftest*
2989 ac_cv_header_stdc=no
2991 rm -f conftest*
2993 if test $ac_cv_header_stdc = yes; then
2994 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2995 cat > conftest.$ac_ext <<EOF
2996 #line 2997 "configure"
2997 #include "confdefs.h"
2998 #include <string.h>
3000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3001 egrep "memchr" >/dev/null 2>&1; then
3003 else
3004 rm -rf conftest*
3005 ac_cv_header_stdc=no
3007 rm -f conftest*
3011 if test $ac_cv_header_stdc = yes; then
3012 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3013 cat > conftest.$ac_ext <<EOF
3014 #line 3015 "configure"
3015 #include "confdefs.h"
3016 #include <stdlib.h>
3018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3019 egrep "free" >/dev/null 2>&1; then
3021 else
3022 rm -rf conftest*
3023 ac_cv_header_stdc=no
3025 rm -f conftest*
3029 if test $ac_cv_header_stdc = yes; then
3030 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3031 if test "$cross_compiling" = yes; then
3033 else
3034 cat > conftest.$ac_ext <<EOF
3035 #line 3036 "configure"
3036 #include "confdefs.h"
3037 #include <ctype.h>
3038 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3039 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3040 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3041 int main () { int i; for (i = 0; i < 256; i++)
3042 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3043 exit (0); }
3046 if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3047 then
3049 else
3050 echo "configure: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3052 rm -fr conftest*
3053 ac_cv_header_stdc=no
3055 rm -fr conftest*
3061 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3062 if test $ac_cv_header_stdc = yes; then
3063 cat >> confdefs.h <<\EOF
3064 #define STDC_HEADERS 1
3069 echo $ac_n "checking for working const""... $ac_c" 1>&6
3070 echo "configure:3071: checking for working const" >&5
3071 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3072 echo $ac_n "(cached) $ac_c" 1>&6
3073 else
3074 cat > conftest.$ac_ext <<EOF
3075 #line 3076 "configure"
3076 #include "confdefs.h"
3078 int main() {
3080 /* Ultrix mips cc rejects this. */
3081 typedef int charset[2]; const charset x;
3082 /* SunOS 4.1.1 cc rejects this. */
3083 char const *const *ccp;
3084 char **p;
3085 /* NEC SVR4.0.2 mips cc rejects this. */
3086 struct point {int x, y;};
3087 static struct point const zero = {0,0};
3088 /* AIX XL C 1.02.0.0 rejects this.
3089 It does not let you subtract one const X* pointer from another in an arm
3090 of an if-expression whose if-part is not a constant expression */
3091 const char *g = "string";
3092 ccp = &g + (g ? g-g : 0);
3093 /* HPUX 7.0 cc rejects these. */
3094 ++ccp;
3095 p = (char**) ccp;
3096 ccp = (char const *const *) p;
3097 { /* SCO 3.2v4 cc rejects this. */
3098 char *t;
3099 char const *s = 0 ? (char *) 0 : (char const *) 0;
3101 *t++ = 0;
3103 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3104 int x[] = {25, 17};
3105 const int *foo = &x[0];
3106 ++foo;
3108 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3109 typedef const int *iptr;
3110 iptr p = 0;
3111 ++p;
3113 { /* AIX XL C 1.02.0.0 rejects this saying
3114 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3115 struct s { int j; const int *ap[3]; };
3116 struct s *b; b->j = 5;
3118 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3119 const int foo = 10;
3122 ; return 0; }
3124 if { (eval echo configure:3125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3125 rm -rf conftest*
3126 ac_cv_c_const=yes
3127 else
3128 echo "configure: failed program was:" >&5
3129 cat conftest.$ac_ext >&5
3130 rm -rf conftest*
3131 ac_cv_c_const=no
3133 rm -f conftest*
3136 echo "$ac_t""$ac_cv_c_const" 1>&6
3137 if test $ac_cv_c_const = no; then
3138 cat >> confdefs.h <<\EOF
3139 #define const
3144 echo $ac_n "checking for inline""... $ac_c" 1>&6
3145 echo "configure:3146: checking for inline" >&5
3146 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3147 echo $ac_n "(cached) $ac_c" 1>&6
3148 else
3149 ac_cv_c_inline=no
3150 for ac_kw in inline __inline__ __inline; do
3151 cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3155 int main() {
3156 } $ac_kw foo() {
3157 ; return 0; }
3159 if { (eval echo configure:3160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3160 rm -rf conftest*
3161 ac_cv_c_inline=$ac_kw; break
3162 else
3163 echo "configure: failed program was:" >&5
3164 cat conftest.$ac_ext >&5
3166 rm -f conftest*
3167 done
3171 echo "$ac_t""$ac_cv_c_inline" 1>&6
3172 case "$ac_cv_c_inline" in
3173 inline | yes) ;;
3174 no) cat >> confdefs.h <<\EOF
3175 #define inline
3178 *) cat >> confdefs.h <<EOF
3179 #define inline $ac_cv_c_inline
3182 esac
3184 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3185 echo "configure:3186: checking for off_t" >&5
3186 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3187 echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189 cat > conftest.$ac_ext <<EOF
3190 #line 3191 "configure"
3191 #include "confdefs.h"
3192 #include <sys/types.h>
3193 #if STDC_HEADERS
3194 #include <stdlib.h>
3195 #include <stddef.h>
3196 #endif
3198 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3199 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3200 rm -rf conftest*
3201 ac_cv_type_off_t=yes
3202 else
3203 rm -rf conftest*
3204 ac_cv_type_off_t=no
3206 rm -f conftest*
3209 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3210 if test $ac_cv_type_off_t = no; then
3211 cat >> confdefs.h <<\EOF
3212 #define off_t long
3217 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3218 echo "configure:3219: checking for size_t" >&5
3219 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3220 echo $ac_n "(cached) $ac_c" 1>&6
3221 else
3222 cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 #include <sys/types.h>
3226 #if STDC_HEADERS
3227 #include <stdlib.h>
3228 #include <stddef.h>
3229 #endif
3231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3232 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3233 rm -rf conftest*
3234 ac_cv_type_size_t=yes
3235 else
3236 rm -rf conftest*
3237 ac_cv_type_size_t=no
3239 rm -f conftest*
3242 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3243 if test $ac_cv_type_size_t = no; then
3244 cat >> confdefs.h <<\EOF
3245 #define size_t unsigned
3250 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3251 # for constant arguments. Useless!
3252 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3253 echo "configure:3254: checking for working alloca.h" >&5
3254 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3255 echo $ac_n "(cached) $ac_c" 1>&6
3256 else
3257 cat > conftest.$ac_ext <<EOF
3258 #line 3259 "configure"
3259 #include "confdefs.h"
3260 #include <alloca.h>
3261 int main() {
3262 char *p = alloca(2 * sizeof(int));
3263 ; return 0; }
3265 if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3266 rm -rf conftest*
3267 ac_cv_header_alloca_h=yes
3268 else
3269 echo "configure: failed program was:" >&5
3270 cat conftest.$ac_ext >&5
3271 rm -rf conftest*
3272 ac_cv_header_alloca_h=no
3274 rm -f conftest*
3277 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3278 if test $ac_cv_header_alloca_h = yes; then
3279 cat >> confdefs.h <<\EOF
3280 #define HAVE_ALLOCA_H 1
3285 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3286 echo "configure:3287: checking for alloca" >&5
3287 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3288 echo $ac_n "(cached) $ac_c" 1>&6
3289 else
3290 cat > conftest.$ac_ext <<EOF
3291 #line 3292 "configure"
3292 #include "confdefs.h"
3294 #ifdef __GNUC__
3295 # define alloca __builtin_alloca
3296 #else
3297 # ifdef _MSC_VER
3298 # include <malloc.h>
3299 # define alloca _alloca
3300 # else
3301 # if HAVE_ALLOCA_H
3302 # include <alloca.h>
3303 # else
3304 # ifdef _AIX
3305 #pragma alloca
3306 # else
3307 # ifndef alloca /* predefined by HP cc +Olibcalls */
3308 char *alloca ();
3309 # endif
3310 # endif
3311 # endif
3312 # endif
3313 #endif
3315 int main() {
3316 char *p = (char *) alloca(1);
3317 ; return 0; }
3319 if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3320 rm -rf conftest*
3321 ac_cv_func_alloca_works=yes
3322 else
3323 echo "configure: failed program was:" >&5
3324 cat conftest.$ac_ext >&5
3325 rm -rf conftest*
3326 ac_cv_func_alloca_works=no
3328 rm -f conftest*
3331 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3332 if test $ac_cv_func_alloca_works = yes; then
3333 cat >> confdefs.h <<\EOF
3334 #define HAVE_ALLOCA 1
3339 if test $ac_cv_func_alloca_works = no; then
3340 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3341 # that cause trouble. Some versions do not even contain alloca or
3342 # contain a buggy version. If you still want to use their alloca,
3343 # use ar to extract alloca.o from them instead of compiling alloca.c.
3344 ALLOCA=alloca.${ac_objext}
3345 cat >> confdefs.h <<\EOF
3346 #define C_ALLOCA 1
3350 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3351 echo "configure:3352: checking whether alloca needs Cray hooks" >&5
3352 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3353 echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355 cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 #include "confdefs.h"
3358 #if defined(CRAY) && ! defined(CRAY2)
3359 webecray
3360 #else
3361 wenotbecray
3362 #endif
3365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3366 egrep "webecray" >/dev/null 2>&1; then
3367 rm -rf conftest*
3368 ac_cv_os_cray=yes
3369 else
3370 rm -rf conftest*
3371 ac_cv_os_cray=no
3373 rm -f conftest*
3377 echo "$ac_t""$ac_cv_os_cray" 1>&6
3378 if test $ac_cv_os_cray = yes; then
3379 for ac_func in _getb67 GETB67 getb67; do
3380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3381 echo "configure:3382: checking for $ac_func" >&5
3382 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3383 echo $ac_n "(cached) $ac_c" 1>&6
3384 else
3385 cat > conftest.$ac_ext <<EOF
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388 /* System header to define __stub macros and hopefully few prototypes,
3389 which can conflict with char $ac_func(); below. */
3390 #include <assert.h>
3391 /* Override any gcc2 internal prototype to avoid an error. */
3392 /* We use char because int might match the return type of a gcc2
3393 builtin and then its argument prototype would still apply. */
3394 char $ac_func();
3396 int main() {
3398 /* The GNU C library defines this for functions which it implements
3399 to always fail with ENOSYS. Some functions are actually named
3400 something starting with __ and the normal name is an alias. */
3401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3402 choke me
3403 #else
3404 $ac_func();
3405 #endif
3407 ; return 0; }
3409 if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3410 rm -rf conftest*
3411 eval "ac_cv_func_$ac_func=yes"
3412 else
3413 echo "configure: failed program was:" >&5
3414 cat conftest.$ac_ext >&5
3415 rm -rf conftest*
3416 eval "ac_cv_func_$ac_func=no"
3418 rm -f conftest*
3421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3422 echo "$ac_t""yes" 1>&6
3423 cat >> confdefs.h <<EOF
3424 #define CRAY_STACKSEG_END $ac_func
3427 break
3428 else
3429 echo "$ac_t""no" 1>&6
3432 done
3435 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3436 echo "configure:3437: checking stack direction for C alloca" >&5
3437 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3438 echo $ac_n "(cached) $ac_c" 1>&6
3439 else
3440 if test "$cross_compiling" = yes; then
3441 ac_cv_c_stack_direction=0
3442 else
3443 cat > conftest.$ac_ext <<EOF
3444 #line 3445 "configure"
3445 #include "confdefs.h"
3446 find_stack_direction ()
3448 static char *addr = 0;
3449 auto char dummy;
3450 if (addr == 0)
3452 addr = &dummy;
3453 return find_stack_direction ();
3455 else
3456 return (&dummy > addr) ? 1 : -1;
3458 main ()
3460 exit (find_stack_direction() < 0);
3463 if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3464 then
3465 ac_cv_c_stack_direction=1
3466 else
3467 echo "configure: failed program was:" >&5
3468 cat conftest.$ac_ext >&5
3469 rm -fr conftest*
3470 ac_cv_c_stack_direction=-1
3472 rm -fr conftest*
3477 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3478 cat >> confdefs.h <<EOF
3479 #define STACK_DIRECTION $ac_cv_c_stack_direction
3484 for ac_hdr in unistd.h
3486 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3487 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3488 echo "configure:3489: checking for $ac_hdr" >&5
3489 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3490 echo $ac_n "(cached) $ac_c" 1>&6
3491 else
3492 cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495 #include <$ac_hdr>
3497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3498 { (eval echo configure:3499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3500 if test -z "$ac_err"; then
3501 rm -rf conftest*
3502 eval "ac_cv_header_$ac_safe=yes"
3503 else
3504 echo "$ac_err" >&5
3505 echo "configure: failed program was:" >&5
3506 cat conftest.$ac_ext >&5
3507 rm -rf conftest*
3508 eval "ac_cv_header_$ac_safe=no"
3510 rm -f conftest*
3512 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3513 echo "$ac_t""yes" 1>&6
3514 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3515 cat >> confdefs.h <<EOF
3516 #define $ac_tr_hdr 1
3519 else
3520 echo "$ac_t""no" 1>&6
3522 done
3524 for ac_func in getpagesize
3526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3527 echo "configure:3528: checking for $ac_func" >&5
3528 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3529 echo $ac_n "(cached) $ac_c" 1>&6
3530 else
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 /* System header to define __stub macros and hopefully few prototypes,
3535 which can conflict with char $ac_func(); below. */
3536 #include <assert.h>
3537 /* Override any gcc2 internal prototype to avoid an error. */
3538 /* We use char because int might match the return type of a gcc2
3539 builtin and then its argument prototype would still apply. */
3540 char $ac_func();
3542 int main() {
3544 /* The GNU C library defines this for functions which it implements
3545 to always fail with ENOSYS. Some functions are actually named
3546 something starting with __ and the normal name is an alias. */
3547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3548 choke me
3549 #else
3550 $ac_func();
3551 #endif
3553 ; return 0; }
3555 if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3556 rm -rf conftest*
3557 eval "ac_cv_func_$ac_func=yes"
3558 else
3559 echo "configure: failed program was:" >&5
3560 cat conftest.$ac_ext >&5
3561 rm -rf conftest*
3562 eval "ac_cv_func_$ac_func=no"
3564 rm -f conftest*
3567 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3568 echo "$ac_t""yes" 1>&6
3569 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3570 cat >> confdefs.h <<EOF
3571 #define $ac_tr_func 1
3574 else
3575 echo "$ac_t""no" 1>&6
3577 done
3579 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3580 echo "configure:3581: checking for working mmap" >&5
3581 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3582 echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584 if test "$cross_compiling" = yes; then
3585 ac_cv_func_mmap_fixed_mapped=no
3586 else
3587 cat > conftest.$ac_ext <<EOF
3588 #line 3589 "configure"
3589 #include "confdefs.h"
3591 /* Thanks to Mike Haertel and Jim Avera for this test.
3592 Here is a matrix of mmap possibilities:
3593 mmap private not fixed
3594 mmap private fixed at somewhere currently unmapped
3595 mmap private fixed at somewhere already mapped
3596 mmap shared not fixed
3597 mmap shared fixed at somewhere currently unmapped
3598 mmap shared fixed at somewhere already mapped
3599 For private mappings, we should verify that changes cannot be read()
3600 back from the file, nor mmap's back from the file at a different
3601 address. (There have been systems where private was not correctly
3602 implemented like the infamous i386 svr4.0, and systems where the
3603 VM page cache was not coherent with the filesystem buffer cache
3604 like early versions of FreeBSD and possibly contemporary NetBSD.)
3605 For shared mappings, we should conversely verify that changes get
3606 propogated back to all the places they're supposed to be.
3608 Grep wants private fixed already mapped.
3609 The main things grep needs to know about mmap are:
3610 * does it exist and is it safe to write into the mmap'd area
3611 * how to use it (BSD variants) */
3612 #include <sys/types.h>
3613 #include <fcntl.h>
3614 #include <sys/mman.h>
3616 /* This mess was copied from the GNU getpagesize.h. */
3617 #ifndef HAVE_GETPAGESIZE
3618 # ifdef HAVE_UNISTD_H
3619 # include <unistd.h>
3620 # endif
3622 /* Assume that all systems that can run configure have sys/param.h. */
3623 # ifndef HAVE_SYS_PARAM_H
3624 # define HAVE_SYS_PARAM_H 1
3625 # endif
3627 # ifdef _SC_PAGESIZE
3628 # define getpagesize() sysconf(_SC_PAGESIZE)
3629 # else /* no _SC_PAGESIZE */
3630 # ifdef HAVE_SYS_PARAM_H
3631 # include <sys/param.h>
3632 # ifdef EXEC_PAGESIZE
3633 # define getpagesize() EXEC_PAGESIZE
3634 # else /* no EXEC_PAGESIZE */
3635 # ifdef NBPG
3636 # define getpagesize() NBPG * CLSIZE
3637 # ifndef CLSIZE
3638 # define CLSIZE 1
3639 # endif /* no CLSIZE */
3640 # else /* no NBPG */
3641 # ifdef NBPC
3642 # define getpagesize() NBPC
3643 # else /* no NBPC */
3644 # ifdef PAGESIZE
3645 # define getpagesize() PAGESIZE
3646 # endif /* PAGESIZE */
3647 # endif /* no NBPC */
3648 # endif /* no NBPG */
3649 # endif /* no EXEC_PAGESIZE */
3650 # else /* no HAVE_SYS_PARAM_H */
3651 # define getpagesize() 8192 /* punt totally */
3652 # endif /* no HAVE_SYS_PARAM_H */
3653 # endif /* no _SC_PAGESIZE */
3655 #endif /* no HAVE_GETPAGESIZE */
3657 #ifdef __cplusplus
3658 extern "C" { void *malloc(unsigned); }
3659 #else
3660 char *malloc();
3661 #endif
3664 main()
3666 char *data, *data2, *data3;
3667 int i, pagesize;
3668 int fd;
3670 pagesize = getpagesize();
3673 * First, make a file with some known garbage in it.
3675 data = malloc(pagesize);
3676 if (!data)
3677 exit(1);
3678 for (i = 0; i < pagesize; ++i)
3679 *(data + i) = rand();
3680 umask(0);
3681 fd = creat("conftestmmap", 0600);
3682 if (fd < 0)
3683 exit(1);
3684 if (write(fd, data, pagesize) != pagesize)
3685 exit(1);
3686 close(fd);
3689 * Next, try to mmap the file at a fixed address which
3690 * already has something else allocated at it. If we can,
3691 * also make sure that we see the same garbage.
3693 fd = open("conftestmmap", O_RDWR);
3694 if (fd < 0)
3695 exit(1);
3696 data2 = malloc(2 * pagesize);
3697 if (!data2)
3698 exit(1);
3699 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3700 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3701 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3702 exit(1);
3703 for (i = 0; i < pagesize; ++i)
3704 if (*(data + i) != *(data2 + i))
3705 exit(1);
3708 * Finally, make sure that changes to the mapped area
3709 * do not percolate back to the file as seen by read().
3710 * (This is a bug on some variants of i386 svr4.0.)
3712 for (i = 0; i < pagesize; ++i)
3713 *(data2 + i) = *(data2 + i) + 1;
3714 data3 = malloc(pagesize);
3715 if (!data3)
3716 exit(1);
3717 if (read(fd, data3, pagesize) != pagesize)
3718 exit(1);
3719 for (i = 0; i < pagesize; ++i)
3720 if (*(data + i) != *(data3 + i))
3721 exit(1);
3722 close(fd);
3723 unlink("conftestmmap");
3724 exit(0);
3728 if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3729 then
3730 ac_cv_func_mmap_fixed_mapped=yes
3731 else
3732 echo "configure: failed program was:" >&5
3733 cat conftest.$ac_ext >&5
3734 rm -fr conftest*
3735 ac_cv_func_mmap_fixed_mapped=no
3737 rm -fr conftest*
3742 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3743 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3744 cat >> confdefs.h <<\EOF
3745 #define HAVE_MMAP 1
3751 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3752 unistd.h values.h sys/param.h
3754 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3755 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3756 echo "configure:3757: checking for $ac_hdr" >&5
3757 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3758 echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760 cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763 #include <$ac_hdr>
3765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3766 { (eval echo configure:3767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3768 if test -z "$ac_err"; then
3769 rm -rf conftest*
3770 eval "ac_cv_header_$ac_safe=yes"
3771 else
3772 echo "$ac_err" >&5
3773 echo "configure: failed program was:" >&5
3774 cat conftest.$ac_ext >&5
3775 rm -rf conftest*
3776 eval "ac_cv_header_$ac_safe=no"
3778 rm -f conftest*
3780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3781 echo "$ac_t""yes" 1>&6
3782 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3783 cat >> confdefs.h <<EOF
3784 #define $ac_tr_hdr 1
3787 else
3788 echo "$ac_t""no" 1>&6
3790 done
3792 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3793 __argz_count __argz_stringify __argz_next
3795 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3796 echo "configure:3797: checking for $ac_func" >&5
3797 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3798 echo $ac_n "(cached) $ac_c" 1>&6
3799 else
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3803 /* System header to define __stub macros and hopefully few prototypes,
3804 which can conflict with char $ac_func(); below. */
3805 #include <assert.h>
3806 /* Override any gcc2 internal prototype to avoid an error. */
3807 /* We use char because int might match the return type of a gcc2
3808 builtin and then its argument prototype would still apply. */
3809 char $ac_func();
3811 int main() {
3813 /* The GNU C library defines this for functions which it implements
3814 to always fail with ENOSYS. Some functions are actually named
3815 something starting with __ and the normal name is an alias. */
3816 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3817 choke me
3818 #else
3819 $ac_func();
3820 #endif
3822 ; return 0; }
3824 if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3825 rm -rf conftest*
3826 eval "ac_cv_func_$ac_func=yes"
3827 else
3828 echo "configure: failed program was:" >&5
3829 cat conftest.$ac_ext >&5
3830 rm -rf conftest*
3831 eval "ac_cv_func_$ac_func=no"
3833 rm -f conftest*
3836 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3837 echo "$ac_t""yes" 1>&6
3838 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3839 cat >> confdefs.h <<EOF
3840 #define $ac_tr_func 1
3843 else
3844 echo "$ac_t""no" 1>&6
3846 done
3849 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3850 for ac_func in stpcpy
3852 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3853 echo "configure:3854: checking for $ac_func" >&5
3854 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3855 echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857 cat > conftest.$ac_ext <<EOF
3858 #line 3859 "configure"
3859 #include "confdefs.h"
3860 /* System header to define __stub macros and hopefully few prototypes,
3861 which can conflict with char $ac_func(); below. */
3862 #include <assert.h>
3863 /* Override any gcc2 internal prototype to avoid an error. */
3864 /* We use char because int might match the return type of a gcc2
3865 builtin and then its argument prototype would still apply. */
3866 char $ac_func();
3868 int main() {
3870 /* The GNU C library defines this for functions which it implements
3871 to always fail with ENOSYS. Some functions are actually named
3872 something starting with __ and the normal name is an alias. */
3873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3874 choke me
3875 #else
3876 $ac_func();
3877 #endif
3879 ; return 0; }
3881 if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3882 rm -rf conftest*
3883 eval "ac_cv_func_$ac_func=yes"
3884 else
3885 echo "configure: failed program was:" >&5
3886 cat conftest.$ac_ext >&5
3887 rm -rf conftest*
3888 eval "ac_cv_func_$ac_func=no"
3890 rm -f conftest*
3893 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3894 echo "$ac_t""yes" 1>&6
3895 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3896 cat >> confdefs.h <<EOF
3897 #define $ac_tr_func 1
3900 else
3901 echo "$ac_t""no" 1>&6
3903 done
3906 if test "${ac_cv_func_stpcpy}" = "yes"; then
3907 cat >> confdefs.h <<\EOF
3908 #define HAVE_STPCPY 1
3913 if test $ac_cv_header_locale_h = yes; then
3914 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3915 echo "configure:3916: checking for LC_MESSAGES" >&5
3916 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+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 <locale.h>
3923 int main() {
3924 return LC_MESSAGES
3925 ; return 0; }
3927 if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3928 rm -rf conftest*
3929 am_cv_val_LC_MESSAGES=yes
3930 else
3931 echo "configure: failed program was:" >&5
3932 cat conftest.$ac_ext >&5
3933 rm -rf conftest*
3934 am_cv_val_LC_MESSAGES=no
3936 rm -f conftest*
3939 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3940 if test $am_cv_val_LC_MESSAGES = yes; then
3941 cat >> confdefs.h <<\EOF
3942 #define HAVE_LC_MESSAGES 1
3947 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3948 echo "configure:3949: checking whether NLS is requested" >&5
3949 # Check whether --enable-nls or --disable-nls was given.
3950 if test "${enable_nls+set}" = set; then
3951 enableval="$enable_nls"
3952 USE_NLS=$enableval
3953 else
3954 USE_NLS=yes
3957 echo "$ac_t""$USE_NLS" 1>&6
3960 USE_INCLUDED_LIBINTL=no
3962 if test "$USE_NLS" = "yes"; then
3963 cat >> confdefs.h <<\EOF
3964 #define ENABLE_NLS 1
3967 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3968 echo "configure:3969: checking whether included gettext is requested" >&5
3969 # Check whether --with-included-gettext or --without-included-gettext was given.
3970 if test "${with_included_gettext+set}" = set; then
3971 withval="$with_included_gettext"
3972 nls_cv_force_use_gnu_gettext=$withval
3973 else
3974 nls_cv_force_use_gnu_gettext=no
3977 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3979 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3980 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3981 nls_cv_header_intl=
3982 nls_cv_header_libgt=
3983 CATOBJEXT=NONE
3985 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3986 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3987 echo "configure:3988: checking for libintl.h" >&5
3988 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3989 echo $ac_n "(cached) $ac_c" 1>&6
3990 else
3991 cat > conftest.$ac_ext <<EOF
3992 #line 3993 "configure"
3993 #include "confdefs.h"
3994 #include <libintl.h>
3996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3997 { (eval echo configure:3998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3999 if test -z "$ac_err"; then
4000 rm -rf conftest*
4001 eval "ac_cv_header_$ac_safe=yes"
4002 else
4003 echo "$ac_err" >&5
4004 echo "configure: failed program was:" >&5
4005 cat conftest.$ac_ext >&5
4006 rm -rf conftest*
4007 eval "ac_cv_header_$ac_safe=no"
4009 rm -f conftest*
4011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4012 echo "$ac_t""yes" 1>&6
4013 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4014 echo "configure:4015: checking for gettext in libc" >&5
4015 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
4016 echo $ac_n "(cached) $ac_c" 1>&6
4017 else
4018 cat > conftest.$ac_ext <<EOF
4019 #line 4020 "configure"
4020 #include "confdefs.h"
4021 #include <libintl.h>
4022 int main() {
4023 return (int) gettext ("")
4024 ; return 0; }
4026 if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4027 rm -rf conftest*
4028 gt_cv_func_gettext_libc=yes
4029 else
4030 echo "configure: failed program was:" >&5
4031 cat conftest.$ac_ext >&5
4032 rm -rf conftest*
4033 gt_cv_func_gettext_libc=no
4035 rm -f conftest*
4038 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
4040 if test "$gt_cv_func_gettext_libc" != "yes"; then
4041 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
4042 echo "configure:4043: checking for bindtextdomain in -lintl" >&5
4043 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
4044 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4045 echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047 ac_save_LIBS="$LIBS"
4048 LIBS="-lintl $LIBS"
4049 cat > conftest.$ac_ext <<EOF
4050 #line 4051 "configure"
4051 #include "confdefs.h"
4052 /* Override any gcc2 internal prototype to avoid an error. */
4053 /* We use char because int might match the return type of a gcc2
4054 builtin and then its argument prototype would still apply. */
4055 char bindtextdomain();
4057 int main() {
4058 bindtextdomain()
4059 ; return 0; }
4061 if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4062 rm -rf conftest*
4063 eval "ac_cv_lib_$ac_lib_var=yes"
4064 else
4065 echo "configure: failed program was:" >&5
4066 cat conftest.$ac_ext >&5
4067 rm -rf conftest*
4068 eval "ac_cv_lib_$ac_lib_var=no"
4070 rm -f conftest*
4071 LIBS="$ac_save_LIBS"
4074 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4075 echo "$ac_t""yes" 1>&6
4076 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4077 echo "configure:4078: checking for gettext in libintl" >&5
4078 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
4079 echo $ac_n "(cached) $ac_c" 1>&6
4080 else
4081 cat > conftest.$ac_ext <<EOF
4082 #line 4083 "configure"
4083 #include "confdefs.h"
4085 int main() {
4086 return (int) gettext ("")
4087 ; return 0; }
4089 if { (eval echo configure:4090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4090 rm -rf conftest*
4091 gt_cv_func_gettext_libintl=yes
4092 else
4093 echo "configure: failed program was:" >&5
4094 cat conftest.$ac_ext >&5
4095 rm -rf conftest*
4096 gt_cv_func_gettext_libintl=no
4098 rm -f conftest*
4101 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
4102 else
4103 echo "$ac_t""no" 1>&6
4108 if test "$gt_cv_func_gettext_libc" = "yes" \
4109 || test "$gt_cv_func_gettext_libintl" = "yes"; then
4110 cat >> confdefs.h <<\EOF
4111 #define HAVE_GETTEXT 1
4114 # Extract the first word of "msgfmt", so it can be a program name with args.
4115 set dummy msgfmt; ac_word=$2
4116 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4117 echo "configure:4118: checking for $ac_word" >&5
4118 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4119 echo $ac_n "(cached) $ac_c" 1>&6
4120 else
4121 case "$MSGFMT" in
4123 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4126 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4127 for ac_dir in $PATH; do
4128 test -z "$ac_dir" && ac_dir=.
4129 if test -f $ac_dir/$ac_word; then
4130 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4131 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4132 break
4135 done
4136 IFS="$ac_save_ifs"
4137 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
4139 esac
4141 MSGFMT="$ac_cv_path_MSGFMT"
4142 if test -n "$MSGFMT"; then
4143 echo "$ac_t""$MSGFMT" 1>&6
4144 else
4145 echo "$ac_t""no" 1>&6
4147 if test "$MSGFMT" != "no"; then
4148 for ac_func in dcgettext
4150 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4151 echo "configure:4152: checking for $ac_func" >&5
4152 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4153 echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155 cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 /* System header to define __stub macros and hopefully few prototypes,
4159 which can conflict with char $ac_func(); below. */
4160 #include <assert.h>
4161 /* Override any gcc2 internal prototype to avoid an error. */
4162 /* We use char because int might match the return type of a gcc2
4163 builtin and then its argument prototype would still apply. */
4164 char $ac_func();
4166 int main() {
4168 /* The GNU C library defines this for functions which it implements
4169 to always fail with ENOSYS. Some functions are actually named
4170 something starting with __ and the normal name is an alias. */
4171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4172 choke me
4173 #else
4174 $ac_func();
4175 #endif
4177 ; return 0; }
4179 if { (eval echo configure:4180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4180 rm -rf conftest*
4181 eval "ac_cv_func_$ac_func=yes"
4182 else
4183 echo "configure: failed program was:" >&5
4184 cat conftest.$ac_ext >&5
4185 rm -rf conftest*
4186 eval "ac_cv_func_$ac_func=no"
4188 rm -f conftest*
4191 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4192 echo "$ac_t""yes" 1>&6
4193 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4194 cat >> confdefs.h <<EOF
4195 #define $ac_tr_func 1
4198 else
4199 echo "$ac_t""no" 1>&6
4201 done
4203 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4204 set dummy gmsgfmt; ac_word=$2
4205 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4206 echo "configure:4207: checking for $ac_word" >&5
4207 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4208 echo $ac_n "(cached) $ac_c" 1>&6
4209 else
4210 case "$GMSGFMT" in
4212 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4214 ?:/*)
4215 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4218 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4219 ac_dummy="$PATH"
4220 for ac_dir in $ac_dummy; do
4221 test -z "$ac_dir" && ac_dir=.
4222 if test -f $ac_dir/$ac_word; then
4223 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4224 break
4226 done
4227 IFS="$ac_save_ifs"
4228 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4230 esac
4232 GMSGFMT="$ac_cv_path_GMSGFMT"
4233 if test -n "$GMSGFMT"; then
4234 echo "$ac_t""$GMSGFMT" 1>&6
4235 else
4236 echo "$ac_t""no" 1>&6
4239 # Extract the first word of "xgettext", so it can be a program name with args.
4240 set dummy xgettext; 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_XGETTEXT'+set}'`\" = set"; then
4244 echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246 case "$XGETTEXT" in
4248 ac_cv_path_XGETTEXT="$XGETTEXT" # 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 '(HELP)'`"; then
4256 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4257 break
4260 done
4261 IFS="$ac_save_ifs"
4262 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4264 esac
4266 XGETTEXT="$ac_cv_path_XGETTEXT"
4267 if test -n "$XGETTEXT"; then
4268 echo "$ac_t""$XGETTEXT" 1>&6
4269 else
4270 echo "$ac_t""no" 1>&6
4273 cat > conftest.$ac_ext <<EOF
4274 #line 4275 "configure"
4275 #include "confdefs.h"
4277 int main() {
4278 extern int _nl_msg_cat_cntr;
4279 return _nl_msg_cat_cntr
4280 ; return 0; }
4282 if { (eval echo configure:4283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4283 rm -rf conftest*
4284 CATOBJEXT=.gmo
4285 DATADIRNAME=share
4286 else
4287 echo "configure: failed program was:" >&5
4288 cat conftest.$ac_ext >&5
4289 rm -rf conftest*
4290 CATOBJEXT=.mo
4291 DATADIRNAME=lib
4293 rm -f conftest*
4294 INSTOBJEXT=.mo
4298 else
4299 echo "$ac_t""no" 1>&6
4304 if test "$CATOBJEXT" = "NONE"; then
4305 nls_cv_use_gnu_gettext=yes
4309 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4310 INTLOBJS="\$(GETTOBJS)"
4311 # Extract the first word of "msgfmt", so it can be a program name with args.
4312 set dummy msgfmt; ac_word=$2
4313 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4314 echo "configure:4315: checking for $ac_word" >&5
4315 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4316 echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318 case "$MSGFMT" in
4320 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4324 for ac_dir in $PATH; do
4325 test -z "$ac_dir" && ac_dir=.
4326 if test -f $ac_dir/$ac_word; then
4327 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4328 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4329 break
4332 done
4333 IFS="$ac_save_ifs"
4334 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4336 esac
4338 MSGFMT="$ac_cv_path_MSGFMT"
4339 if test -n "$MSGFMT"; then
4340 echo "$ac_t""$MSGFMT" 1>&6
4341 else
4342 echo "$ac_t""no" 1>&6
4345 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4346 set dummy gmsgfmt; ac_word=$2
4347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4348 echo "configure:4349: checking for $ac_word" >&5
4349 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4350 echo $ac_n "(cached) $ac_c" 1>&6
4351 else
4352 case "$GMSGFMT" in
4354 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4356 ?:/*)
4357 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4360 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4361 ac_dummy="$PATH"
4362 for ac_dir in $ac_dummy; do
4363 test -z "$ac_dir" && ac_dir=.
4364 if test -f $ac_dir/$ac_word; then
4365 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4366 break
4368 done
4369 IFS="$ac_save_ifs"
4370 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4372 esac
4374 GMSGFMT="$ac_cv_path_GMSGFMT"
4375 if test -n "$GMSGFMT"; then
4376 echo "$ac_t""$GMSGFMT" 1>&6
4377 else
4378 echo "$ac_t""no" 1>&6
4381 # Extract the first word of "xgettext", so it can be a program name with args.
4382 set dummy xgettext; ac_word=$2
4383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4384 echo "configure:4385: checking for $ac_word" >&5
4385 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4386 echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388 case "$XGETTEXT" in
4390 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4393 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4394 for ac_dir in $PATH; do
4395 test -z "$ac_dir" && ac_dir=.
4396 if test -f $ac_dir/$ac_word; then
4397 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4398 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4399 break
4402 done
4403 IFS="$ac_save_ifs"
4404 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4406 esac
4408 XGETTEXT="$ac_cv_path_XGETTEXT"
4409 if test -n "$XGETTEXT"; then
4410 echo "$ac_t""$XGETTEXT" 1>&6
4411 else
4412 echo "$ac_t""no" 1>&6
4416 USE_INCLUDED_LIBINTL=yes
4417 CATOBJEXT=.gmo
4418 INSTOBJEXT=.mo
4419 DATADIRNAME=share
4420 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4421 INTLLIBS=$INTLDEPS
4422 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4423 nls_cv_header_intl=libintl.h
4424 nls_cv_header_libgt=libgettext.h
4427 if test "$XGETTEXT" != ":"; then
4428 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4430 else
4431 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4432 XGETTEXT=":"
4436 # We need to process the po/ directory.
4437 POSUB=po
4438 else
4439 DATADIRNAME=share
4440 nls_cv_header_intl=libintl.h
4441 nls_cv_header_libgt=libgettext.h
4444 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4445 # because some of the sources are only built for this goal.
4446 if test "$PACKAGE" = gettext; then
4447 USE_NLS=yes
4448 USE_INCLUDED_LIBINTL=yes
4451 for lang in $ALL_LINGUAS; do
4452 GMOFILES="$GMOFILES $lang.gmo"
4453 POFILES="$POFILES $lang.po"
4454 done
4469 if test "x$CATOBJEXT" != "x"; then
4470 if test "x$ALL_LINGUAS" = "x"; then
4471 LINGUAS=
4472 else
4473 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4474 echo "configure:4475: checking for catalogs to be installed" >&5
4475 NEW_LINGUAS=
4476 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4477 case "$ALL_LINGUAS" in
4478 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4479 esac
4480 done
4481 LINGUAS=$NEW_LINGUAS
4482 echo "$ac_t""$LINGUAS" 1>&6
4485 if test -n "$LINGUAS"; then
4486 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4490 if test $ac_cv_header_locale_h = yes; then
4491 INCLUDE_LOCALE_H="#include <locale.h>"
4492 else
4493 INCLUDE_LOCALE_H="\
4494 /* The system does not provide the header <locale.h>. Take care yourself. */"
4498 if test -f $srcdir/po2tbl.sed.in; then
4499 if test "$CATOBJEXT" = ".cat"; then
4500 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4501 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4502 echo "configure:4503: checking for linux/version.h" >&5
4503 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4504 echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 #include <linux/version.h>
4511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4512 { (eval echo configure:4513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4514 if test -z "$ac_err"; then
4515 rm -rf conftest*
4516 eval "ac_cv_header_$ac_safe=yes"
4517 else
4518 echo "$ac_err" >&5
4519 echo "configure: failed program was:" >&5
4520 cat conftest.$ac_ext >&5
4521 rm -rf conftest*
4522 eval "ac_cv_header_$ac_safe=no"
4524 rm -f conftest*
4526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4527 echo "$ac_t""yes" 1>&6
4528 msgformat=linux
4529 else
4530 echo "$ac_t""no" 1>&6
4531 msgformat=xopen
4535 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4537 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4538 $srcdir/po2tbl.sed.in > po2tbl.sed
4541 if test "$PACKAGE" = "gettext"; then
4542 GT_NO="#NO#"
4543 GT_YES=
4544 else
4545 GT_NO=
4546 GT_YES="#YES#"
4551 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4557 if test -d $srcdir/po; then
4558 test -d po || mkdir po
4559 if test "x$srcdir" != "x."; then
4560 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4561 posrcprefix="$srcdir/"
4562 else
4563 posrcprefix="../$srcdir/"
4565 else
4566 posrcprefix="../"
4568 rm -f po/POTFILES
4569 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4570 < $srcdir/po/POTFILES.in > po/POTFILES
4574 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4575 echo "configure:4576: checking whether to enable maintainer-specific portions of Makefiles" >&5
4576 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4577 if test "${enable_maintainer_mode+set}" = set; then
4578 enableval="$enable_maintainer_mode"
4579 USE_MAINTAINER_MODE=$enableval
4580 else
4581 USE_MAINTAINER_MODE=no
4584 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4587 if test $USE_MAINTAINER_MODE = yes; then
4588 MAINTAINER_MODE_TRUE=
4589 MAINTAINER_MODE_FALSE='#'
4590 else
4591 MAINTAINER_MODE_TRUE='#'
4592 MAINTAINER_MODE_FALSE=
4594 MAINT=$MAINTAINER_MODE_TRUE
4597 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4598 echo "configure:4599: checking for Cygwin environment" >&5
4599 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
4600 echo $ac_n "(cached) $ac_c" 1>&6
4601 else
4602 cat > conftest.$ac_ext <<EOF
4603 #line 4604 "configure"
4604 #include "confdefs.h"
4606 int main() {
4608 #ifndef __CYGWIN__
4609 #define __CYGWIN__ __CYGWIN32__
4610 #endif
4611 return __CYGWIN__;
4612 ; return 0; }
4614 if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4615 rm -rf conftest*
4616 ac_cv_cygwin=yes
4617 else
4618 echo "configure: failed program was:" >&5
4619 cat conftest.$ac_ext >&5
4620 rm -rf conftest*
4621 ac_cv_cygwin=no
4623 rm -f conftest*
4624 rm -f conftest*
4627 echo "$ac_t""$ac_cv_cygwin" 1>&6
4628 CYGWIN=
4629 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4630 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4631 echo "configure:4632: checking for mingw32 environment" >&5
4632 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4633 echo $ac_n "(cached) $ac_c" 1>&6
4634 else
4635 cat > conftest.$ac_ext <<EOF
4636 #line 4637 "configure"
4637 #include "confdefs.h"
4639 int main() {
4640 return __MINGW32__;
4641 ; return 0; }
4643 if { (eval echo configure:4644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4644 rm -rf conftest*
4645 ac_cv_mingw32=yes
4646 else
4647 echo "configure: failed program was:" >&5
4648 cat conftest.$ac_ext >&5
4649 rm -rf conftest*
4650 ac_cv_mingw32=no
4652 rm -f conftest*
4653 rm -f conftest*
4656 echo "$ac_t""$ac_cv_mingw32" 1>&6
4657 MINGW32=
4658 test "$ac_cv_mingw32" = yes && MINGW32=yes
4661 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4662 echo "configure:4663: checking for executable suffix" >&5
4663 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4664 echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4667 ac_cv_exeext=.exe
4668 else
4669 rm -f conftest*
4670 echo 'int main () { return 0; }' > conftest.$ac_ext
4671 ac_cv_exeext=
4672 if { (eval echo configure:4673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4673 for file in conftest.*; do
4674 case $file in
4675 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4676 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4677 esac
4678 done
4679 else
4680 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4682 rm -f conftest*
4683 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4687 EXEEXT=""
4688 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4689 echo "$ac_t""${ac_cv_exeext}" 1>&6
4690 ac_exeext=$EXEEXT
4693 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
4695 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4696 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4697 echo "configure:4698: checking for $ac_hdr" >&5
4698 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4699 echo $ac_n "(cached) $ac_c" 1>&6
4700 else
4701 cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704 #include <$ac_hdr>
4706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4707 { (eval echo configure:4708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4709 if test -z "$ac_err"; then
4710 rm -rf conftest*
4711 eval "ac_cv_header_$ac_safe=yes"
4712 else
4713 echo "$ac_err" >&5
4714 echo "configure: failed program was:" >&5
4715 cat conftest.$ac_ext >&5
4716 rm -rf conftest*
4717 eval "ac_cv_header_$ac_safe=no"
4719 rm -f conftest*
4721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4722 echo "$ac_t""yes" 1>&6
4723 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4724 cat >> confdefs.h <<EOF
4725 #define $ac_tr_hdr 1
4728 else
4729 echo "$ac_t""no" 1>&6
4731 done
4734 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
4735 # people who are not cross-compiling but are compiling cross-assemblers.
4736 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
4737 echo "configure:4738: checking whether compiling a cross-assembler" >&5
4738 if test "${host}" = "${target}"; then
4739 cross_gas=no
4740 else
4741 cross_gas=yes
4742 cat >> confdefs.h <<\EOF
4743 #define CROSS_COMPILE 1
4747 echo "$ac_t""$cross_gas" 1>&6
4749 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4750 # for constant arguments. Useless!
4751 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4752 echo "configure:4753: checking for working alloca.h" >&5
4753 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4754 echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756 cat > conftest.$ac_ext <<EOF
4757 #line 4758 "configure"
4758 #include "confdefs.h"
4759 #include <alloca.h>
4760 int main() {
4761 char *p = alloca(2 * sizeof(int));
4762 ; return 0; }
4764 if { (eval echo configure:4765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4765 rm -rf conftest*
4766 ac_cv_header_alloca_h=yes
4767 else
4768 echo "configure: failed program was:" >&5
4769 cat conftest.$ac_ext >&5
4770 rm -rf conftest*
4771 ac_cv_header_alloca_h=no
4773 rm -f conftest*
4776 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4777 if test $ac_cv_header_alloca_h = yes; then
4778 cat >> confdefs.h <<\EOF
4779 #define HAVE_ALLOCA_H 1
4784 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4785 echo "configure:4786: checking for alloca" >&5
4786 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4787 echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789 cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4793 #ifdef __GNUC__
4794 # define alloca __builtin_alloca
4795 #else
4796 # ifdef _MSC_VER
4797 # include <malloc.h>
4798 # define alloca _alloca
4799 # else
4800 # if HAVE_ALLOCA_H
4801 # include <alloca.h>
4802 # else
4803 # ifdef _AIX
4804 #pragma alloca
4805 # else
4806 # ifndef alloca /* predefined by HP cc +Olibcalls */
4807 char *alloca ();
4808 # endif
4809 # endif
4810 # endif
4811 # endif
4812 #endif
4814 int main() {
4815 char *p = (char *) alloca(1);
4816 ; return 0; }
4818 if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4819 rm -rf conftest*
4820 ac_cv_func_alloca_works=yes
4821 else
4822 echo "configure: failed program was:" >&5
4823 cat conftest.$ac_ext >&5
4824 rm -rf conftest*
4825 ac_cv_func_alloca_works=no
4827 rm -f conftest*
4830 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4831 if test $ac_cv_func_alloca_works = yes; then
4832 cat >> confdefs.h <<\EOF
4833 #define HAVE_ALLOCA 1
4838 if test $ac_cv_func_alloca_works = no; then
4839 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4840 # that cause trouble. Some versions do not even contain alloca or
4841 # contain a buggy version. If you still want to use their alloca,
4842 # use ar to extract alloca.o from them instead of compiling alloca.c.
4843 ALLOCA=alloca.${ac_objext}
4844 cat >> confdefs.h <<\EOF
4845 #define C_ALLOCA 1
4849 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4850 echo "configure:4851: checking whether alloca needs Cray hooks" >&5
4851 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4852 echo $ac_n "(cached) $ac_c" 1>&6
4853 else
4854 cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857 #if defined(CRAY) && ! defined(CRAY2)
4858 webecray
4859 #else
4860 wenotbecray
4861 #endif
4864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4865 egrep "webecray" >/dev/null 2>&1; then
4866 rm -rf conftest*
4867 ac_cv_os_cray=yes
4868 else
4869 rm -rf conftest*
4870 ac_cv_os_cray=no
4872 rm -f conftest*
4876 echo "$ac_t""$ac_cv_os_cray" 1>&6
4877 if test $ac_cv_os_cray = yes; then
4878 for ac_func in _getb67 GETB67 getb67; do
4879 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4880 echo "configure:4881: checking for $ac_func" >&5
4881 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4882 echo $ac_n "(cached) $ac_c" 1>&6
4883 else
4884 cat > conftest.$ac_ext <<EOF
4885 #line 4886 "configure"
4886 #include "confdefs.h"
4887 /* System header to define __stub macros and hopefully few prototypes,
4888 which can conflict with char $ac_func(); below. */
4889 #include <assert.h>
4890 /* Override any gcc2 internal prototype to avoid an error. */
4891 /* We use char because int might match the return type of a gcc2
4892 builtin and then its argument prototype would still apply. */
4893 char $ac_func();
4895 int main() {
4897 /* The GNU C library defines this for functions which it implements
4898 to always fail with ENOSYS. Some functions are actually named
4899 something starting with __ and the normal name is an alias. */
4900 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4901 choke me
4902 #else
4903 $ac_func();
4904 #endif
4906 ; return 0; }
4908 if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4909 rm -rf conftest*
4910 eval "ac_cv_func_$ac_func=yes"
4911 else
4912 echo "configure: failed program was:" >&5
4913 cat conftest.$ac_ext >&5
4914 rm -rf conftest*
4915 eval "ac_cv_func_$ac_func=no"
4917 rm -f conftest*
4920 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4921 echo "$ac_t""yes" 1>&6
4922 cat >> confdefs.h <<EOF
4923 #define CRAY_STACKSEG_END $ac_func
4926 break
4927 else
4928 echo "$ac_t""no" 1>&6
4931 done
4934 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4935 echo "configure:4936: checking stack direction for C alloca" >&5
4936 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4937 echo $ac_n "(cached) $ac_c" 1>&6
4938 else
4939 if test "$cross_compiling" = yes; then
4940 ac_cv_c_stack_direction=0
4941 else
4942 cat > conftest.$ac_ext <<EOF
4943 #line 4944 "configure"
4944 #include "confdefs.h"
4945 find_stack_direction ()
4947 static char *addr = 0;
4948 auto char dummy;
4949 if (addr == 0)
4951 addr = &dummy;
4952 return find_stack_direction ();
4954 else
4955 return (&dummy > addr) ? 1 : -1;
4957 main ()
4959 exit (find_stack_direction() < 0);
4962 if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4963 then
4964 ac_cv_c_stack_direction=1
4965 else
4966 echo "configure: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4968 rm -fr conftest*
4969 ac_cv_c_stack_direction=-1
4971 rm -fr conftest*
4976 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4977 cat >> confdefs.h <<EOF
4978 #define STACK_DIRECTION $ac_cv_c_stack_direction
4983 echo $ac_n "checking for inline""... $ac_c" 1>&6
4984 echo "configure:4985: checking for inline" >&5
4985 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4986 echo $ac_n "(cached) $ac_c" 1>&6
4987 else
4988 ac_cv_c_inline=no
4989 for ac_kw in inline __inline__ __inline; do
4990 cat > conftest.$ac_ext <<EOF
4991 #line 4992 "configure"
4992 #include "confdefs.h"
4994 int main() {
4995 } $ac_kw foo() {
4996 ; return 0; }
4998 if { (eval echo configure:4999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4999 rm -rf conftest*
5000 ac_cv_c_inline=$ac_kw; break
5001 else
5002 echo "configure: failed program was:" >&5
5003 cat conftest.$ac_ext >&5
5005 rm -f conftest*
5006 done
5010 echo "$ac_t""$ac_cv_c_inline" 1>&6
5011 case "$ac_cv_c_inline" in
5012 inline | yes) ;;
5013 no) cat >> confdefs.h <<\EOF
5014 #define inline
5017 *) cat >> confdefs.h <<EOF
5018 #define inline $ac_cv_c_inline
5021 esac
5024 # VMS doesn't have unlink.
5025 for ac_func in unlink remove
5027 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5028 echo "configure:5029: checking for $ac_func" >&5
5029 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5030 echo $ac_n "(cached) $ac_c" 1>&6
5031 else
5032 cat > conftest.$ac_ext <<EOF
5033 #line 5034 "configure"
5034 #include "confdefs.h"
5035 /* System header to define __stub macros and hopefully few prototypes,
5036 which can conflict with char $ac_func(); below. */
5037 #include <assert.h>
5038 /* Override any gcc2 internal prototype to avoid an error. */
5039 /* We use char because int might match the return type of a gcc2
5040 builtin and then its argument prototype would still apply. */
5041 char $ac_func();
5043 int main() {
5045 /* The GNU C library defines this for functions which it implements
5046 to always fail with ENOSYS. Some functions are actually named
5047 something starting with __ and the normal name is an alias. */
5048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5049 choke me
5050 #else
5051 $ac_func();
5052 #endif
5054 ; return 0; }
5056 if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5057 rm -rf conftest*
5058 eval "ac_cv_func_$ac_func=yes"
5059 else
5060 echo "configure: failed program was:" >&5
5061 cat conftest.$ac_ext >&5
5062 rm -rf conftest*
5063 eval "ac_cv_func_$ac_func=no"
5065 rm -f conftest*
5068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5069 echo "$ac_t""yes" 1>&6
5070 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5071 cat >> confdefs.h <<EOF
5072 #define $ac_tr_func 1
5074 break
5075 else
5076 echo "$ac_t""no" 1>&6
5078 done
5081 # Some systems don't have sbrk().
5082 for ac_func in sbrk
5084 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5085 echo "configure:5086: checking for $ac_func" >&5
5086 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5087 echo $ac_n "(cached) $ac_c" 1>&6
5088 else
5089 cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092 /* System header to define __stub macros and hopefully few prototypes,
5093 which can conflict with char $ac_func(); below. */
5094 #include <assert.h>
5095 /* Override any gcc2 internal prototype to avoid an error. */
5096 /* We use char because int might match the return type of a gcc2
5097 builtin and then its argument prototype would still apply. */
5098 char $ac_func();
5100 int main() {
5102 /* The GNU C library defines this for functions which it implements
5103 to always fail with ENOSYS. Some functions are actually named
5104 something starting with __ and the normal name is an alias. */
5105 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5106 choke me
5107 #else
5108 $ac_func();
5109 #endif
5111 ; return 0; }
5113 if { (eval echo configure:5114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5114 rm -rf conftest*
5115 eval "ac_cv_func_$ac_func=yes"
5116 else
5117 echo "configure: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 rm -rf conftest*
5120 eval "ac_cv_func_$ac_func=no"
5122 rm -f conftest*
5125 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5126 echo "$ac_t""yes" 1>&6
5127 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5128 cat >> confdefs.h <<EOF
5129 #define $ac_tr_func 1
5132 else
5133 echo "$ac_t""no" 1>&6
5135 done
5138 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
5139 # enough, but on some of those systems, the assert macro relies on requoting
5140 # working properly!
5141 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
5142 echo "configure:5143: checking for working assert macro" >&5
5143 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
5144 echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146 cat > conftest.$ac_ext <<EOF
5147 #line 5148 "configure"
5148 #include "confdefs.h"
5149 #include <assert.h>
5150 #include <stdio.h>
5151 int main() {
5153 /* check for requoting problems */
5154 static int a, b, c, d;
5155 static char *s;
5156 assert (!strcmp(s, "foo bar baz quux"));
5157 /* check for newline handling */
5158 assert (a == b
5159 || c == d);
5161 ; return 0; }
5163 if { (eval echo configure:5164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5164 rm -rf conftest*
5165 gas_cv_assert_ok=yes
5166 else
5167 echo "configure: failed program was:" >&5
5168 cat conftest.$ac_ext >&5
5169 rm -rf conftest*
5170 gas_cv_assert_ok=no
5172 rm -f conftest*
5174 echo "$ac_t""$gas_cv_assert_ok" 1>&6
5175 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
5176 #define BROKEN_ASSERT 1
5181 # On some systems, the system header files may not declare malloc, realloc,
5182 # and free. There are places where gas needs these functions to have been
5183 # declared -- such as when taking their addresses.
5184 gas_test_headers="
5185 #ifdef HAVE_MEMORY_H
5186 #include <memory.h>
5187 #endif
5188 #ifdef HAVE_STRING_H
5189 #include <string.h>
5190 #else
5191 #ifdef HAVE_STRINGS_H
5192 #include <strings.h>
5193 #endif
5194 #endif
5195 #ifdef HAVE_STDLIB_H
5196 #include <stdlib.h>
5197 #endif
5198 #ifdef HAVE_UNISTD_H
5199 #include <unistd.h>
5200 #endif
5203 echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
5204 echo "configure:5205: checking whether declaration is required for strstr" >&5
5205 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
5206 echo $ac_n "(cached) $ac_c" 1>&6
5207 else
5208 cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211 $gas_test_headers
5212 int main() {
5214 typedef char *(*f)();
5215 f x;
5216 x = (f) strstr;
5218 ; return 0; }
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221 rm -rf conftest*
5222 gas_cv_decl_needed_strstr=no
5223 else
5224 echo "configure: failed program was:" >&5
5225 cat conftest.$ac_ext >&5
5226 rm -rf conftest*
5227 gas_cv_decl_needed_strstr=yes
5229 rm -f conftest*
5231 echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
5232 if test $gas_cv_decl_needed_strstr = yes; then
5233 cat >> confdefs.h <<\EOF
5234 #define NEED_DECLARATION_STRSTR 1
5240 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
5241 echo "configure:5242: checking whether declaration is required for malloc" >&5
5242 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
5243 echo $ac_n "(cached) $ac_c" 1>&6
5244 else
5245 cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248 $gas_test_headers
5249 int main() {
5251 typedef char *(*f)();
5252 f x;
5253 x = (f) malloc;
5255 ; return 0; }
5257 if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5258 rm -rf conftest*
5259 gas_cv_decl_needed_malloc=no
5260 else
5261 echo "configure: failed program was:" >&5
5262 cat conftest.$ac_ext >&5
5263 rm -rf conftest*
5264 gas_cv_decl_needed_malloc=yes
5266 rm -f conftest*
5268 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
5269 if test $gas_cv_decl_needed_malloc = yes; then
5270 cat >> confdefs.h <<\EOF
5271 #define NEED_DECLARATION_MALLOC 1
5277 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
5278 echo "configure:5279: checking whether declaration is required for free" >&5
5279 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
5280 echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282 cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285 $gas_test_headers
5286 int main() {
5288 typedef void (*f)();
5289 f x;
5290 x = (f) free;
5292 ; return 0; }
5294 if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5295 rm -rf conftest*
5296 gas_cv_decl_needed_free=no
5297 else
5298 echo "configure: failed program was:" >&5
5299 cat conftest.$ac_ext >&5
5300 rm -rf conftest*
5301 gas_cv_decl_needed_free=yes
5303 rm -f conftest*
5305 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
5306 if test $gas_cv_decl_needed_free = yes; then
5307 cat >> confdefs.h <<\EOF
5308 #define NEED_DECLARATION_FREE 1
5314 echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
5315 echo "configure:5316: checking whether declaration is required for sbrk" >&5
5316 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
5317 echo $ac_n "(cached) $ac_c" 1>&6
5318 else
5319 cat > conftest.$ac_ext <<EOF
5320 #line 5321 "configure"
5321 #include "confdefs.h"
5322 $gas_test_headers
5323 int main() {
5325 typedef char *(*f)();
5326 f x;
5327 x = (f) sbrk;
5329 ; return 0; }
5331 if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5332 rm -rf conftest*
5333 gas_cv_decl_needed_sbrk=no
5334 else
5335 echo "configure: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 rm -rf conftest*
5338 gas_cv_decl_needed_sbrk=yes
5340 rm -f conftest*
5342 echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
5343 if test $gas_cv_decl_needed_sbrk = yes; then
5344 cat >> confdefs.h <<\EOF
5345 #define NEED_DECLARATION_SBRK 1
5351 echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
5352 echo "configure:5353: checking whether declaration is required for environ" >&5
5353 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then
5354 echo $ac_n "(cached) $ac_c" 1>&6
5355 else
5356 cat > conftest.$ac_ext <<EOF
5357 #line 5358 "configure"
5358 #include "confdefs.h"
5359 $gas_test_headers
5360 int main() {
5362 typedef char **f;
5363 f x;
5364 x = (f) environ;
5366 ; return 0; }
5368 if { (eval echo configure:5369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5369 rm -rf conftest*
5370 gas_cv_decl_needed_environ=no
5371 else
5372 echo "configure: failed program was:" >&5
5373 cat conftest.$ac_ext >&5
5374 rm -rf conftest*
5375 gas_cv_decl_needed_environ=yes
5377 rm -f conftest*
5379 echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6
5380 if test $gas_cv_decl_needed_environ = yes; then
5381 cat >> confdefs.h <<\EOF
5382 #define NEED_DECLARATION_ENVIRON 1
5388 # Does errno.h declare errno, or do we have to add a separate declaration
5389 # for it?
5391 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
5392 echo "configure:5393: checking whether declaration is required for errno" >&5
5393 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
5394 echo $ac_n "(cached) $ac_c" 1>&6
5395 else
5396 cat > conftest.$ac_ext <<EOF
5397 #line 5398 "configure"
5398 #include "confdefs.h"
5400 #ifdef HAVE_ERRNO_H
5401 #include <errno.h>
5402 #endif
5404 int main() {
5406 typedef int f;
5407 f x;
5408 x = (f) errno;
5410 ; return 0; }
5412 if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5413 rm -rf conftest*
5414 gas_cv_decl_needed_errno=no
5415 else
5416 echo "configure: failed program was:" >&5
5417 cat conftest.$ac_ext >&5
5418 rm -rf conftest*
5419 gas_cv_decl_needed_errno=yes
5421 rm -f conftest*
5423 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
5424 if test $gas_cv_decl_needed_errno = yes; then
5425 cat >> confdefs.h <<\EOF
5426 #define NEED_DECLARATION_ERRNO 1
5434 trap '' 1 2 15
5435 cat > confcache <<\EOF
5436 # This file is a shell script that caches the results of configure
5437 # tests run on this system so they can be shared between configure
5438 # scripts and configure runs. It is not useful on other systems.
5439 # If it contains results you don't want to keep, you may remove or edit it.
5441 # By default, configure uses ./config.cache as the cache file,
5442 # creating it if it does not exist already. You can give configure
5443 # the --cache-file=FILE option to use a different cache file; that is
5444 # what configure does when it calls configure scripts in
5445 # subdirectories, so they share the cache.
5446 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5447 # config.status only pays attention to the cache file if you give it the
5448 # --recheck option to rerun configure.
5451 # The following way of writing the cache mishandles newlines in values,
5452 # but we know of no workaround that is simple, portable, and efficient.
5453 # So, don't put newlines in cache variables' values.
5454 # Ultrix sh set writes to stderr and can't be redirected directly,
5455 # and sets the high bit in the cache file unless we assign to the vars.
5456 (set) 2>&1 |
5457 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5458 *ac_space=\ *)
5459 # `set' does not quote correctly, so add quotes (double-quote substitution
5460 # turns \\\\ into \\, and sed turns \\ into \).
5461 sed -n \
5462 -e "s/'/'\\\\''/g" \
5463 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5466 # `set' quotes correctly as required by POSIX, so do not add quotes.
5467 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5469 esac >> confcache
5470 if cmp -s $cache_file confcache; then
5472 else
5473 if test -w $cache_file; then
5474 echo "updating cache $cache_file"
5475 cat confcache > $cache_file
5476 else
5477 echo "not updating unwritable cache $cache_file"
5480 rm -f confcache
5482 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5484 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5485 # Let make expand exec_prefix.
5486 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5488 # Any assignment to VPATH causes Sun make to only execute
5489 # the first set of double-colon rules, so remove it if not needed.
5490 # If there is a colon in the path, we need to keep it.
5491 if test "x$srcdir" = x.; then
5492 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5495 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5497 DEFS=-DHAVE_CONFIG_H
5499 # Without the "./", some shells look in PATH for config.status.
5500 : ${CONFIG_STATUS=./config.status}
5502 echo creating $CONFIG_STATUS
5503 rm -f $CONFIG_STATUS
5504 cat > $CONFIG_STATUS <<EOF
5505 #! /bin/sh
5506 # Generated automatically by configure.
5507 # Run this file to recreate the current configuration.
5508 # This directory was configured as follows,
5509 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5511 # $0 $ac_configure_args
5513 # Compiler output produced by configure, useful for debugging
5514 # configure, is in ./config.log if it exists.
5516 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5517 for ac_option
5519 case "\$ac_option" in
5520 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5521 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5522 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5523 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5524 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5525 exit 0 ;;
5526 -help | --help | --hel | --he | --h)
5527 echo "\$ac_cs_usage"; exit 0 ;;
5528 *) echo "\$ac_cs_usage"; exit 1 ;;
5529 esac
5530 done
5532 ac_given_srcdir=$srcdir
5533 ac_given_INSTALL="$INSTALL"
5535 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
5537 cat >> $CONFIG_STATUS <<EOF
5539 # Protect against being on the right side of a sed subst in config.status.
5540 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5541 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5542 $ac_vpsub
5543 $extrasub
5544 s%@SHELL@%$SHELL%g
5545 s%@CFLAGS@%$CFLAGS%g
5546 s%@CPPFLAGS@%$CPPFLAGS%g
5547 s%@CXXFLAGS@%$CXXFLAGS%g
5548 s%@FFLAGS@%$FFLAGS%g
5549 s%@DEFS@%$DEFS%g
5550 s%@LDFLAGS@%$LDFLAGS%g
5551 s%@LIBS@%$LIBS%g
5552 s%@exec_prefix@%$exec_prefix%g
5553 s%@prefix@%$prefix%g
5554 s%@program_transform_name@%$program_transform_name%g
5555 s%@bindir@%$bindir%g
5556 s%@sbindir@%$sbindir%g
5557 s%@libexecdir@%$libexecdir%g
5558 s%@datadir@%$datadir%g
5559 s%@sysconfdir@%$sysconfdir%g
5560 s%@sharedstatedir@%$sharedstatedir%g
5561 s%@localstatedir@%$localstatedir%g
5562 s%@libdir@%$libdir%g
5563 s%@includedir@%$includedir%g
5564 s%@oldincludedir@%$oldincludedir%g
5565 s%@infodir@%$infodir%g
5566 s%@mandir@%$mandir%g
5567 s%@host@%$host%g
5568 s%@host_alias@%$host_alias%g
5569 s%@host_cpu@%$host_cpu%g
5570 s%@host_vendor@%$host_vendor%g
5571 s%@host_os@%$host_os%g
5572 s%@target@%$target%g
5573 s%@target_alias@%$target_alias%g
5574 s%@target_cpu@%$target_cpu%g
5575 s%@target_vendor@%$target_vendor%g
5576 s%@target_os@%$target_os%g
5577 s%@build@%$build%g
5578 s%@build_alias@%$build_alias%g
5579 s%@build_cpu@%$build_cpu%g
5580 s%@build_vendor@%$build_vendor%g
5581 s%@build_os@%$build_os%g
5582 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5583 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5584 s%@INSTALL_DATA@%$INSTALL_DATA%g
5585 s%@PACKAGE@%$PACKAGE%g
5586 s%@VERSION@%$VERSION%g
5587 s%@ACLOCAL@%$ACLOCAL%g
5588 s%@AUTOCONF@%$AUTOCONF%g
5589 s%@AUTOMAKE@%$AUTOMAKE%g
5590 s%@AUTOHEADER@%$AUTOHEADER%g
5591 s%@MAKEINFO@%$MAKEINFO%g
5592 s%@SET_MAKE@%$SET_MAKE%g
5593 s%@RANLIB@%$RANLIB%g
5594 s%@CC@%$CC%g
5595 s%@LN_S@%$LN_S%g
5596 s%@LIBTOOL@%$LIBTOOL%g
5597 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
5598 s%@GDBINIT@%$GDBINIT%g
5599 s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
5600 s%@extra_objects@%$extra_objects%g
5601 s%@target_cpu_type@%$target_cpu_type%g
5602 s%@obj_format@%$obj_format%g
5603 s%@te_file@%$te_file%g
5604 s%@install_tooldir@%$install_tooldir%g
5605 s%@atof@%$atof%g
5606 s%@BFDLIB@%$BFDLIB%g
5607 s%@OPCODES_LIB@%$OPCODES_LIB%g
5608 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
5609 s%@YACC@%$YACC%g
5610 s%@LEX@%$LEX%g
5611 s%@LEXLIB@%$LEXLIB%g
5612 s%@CPP@%$CPP%g
5613 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5614 s%@ALLOCA@%$ALLOCA%g
5615 s%@USE_NLS@%$USE_NLS%g
5616 s%@MSGFMT@%$MSGFMT%g
5617 s%@GMSGFMT@%$GMSGFMT%g
5618 s%@XGETTEXT@%$XGETTEXT%g
5619 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5620 s%@CATALOGS@%$CATALOGS%g
5621 s%@CATOBJEXT@%$CATOBJEXT%g
5622 s%@DATADIRNAME@%$DATADIRNAME%g
5623 s%@GMOFILES@%$GMOFILES%g
5624 s%@INSTOBJEXT@%$INSTOBJEXT%g
5625 s%@INTLDEPS@%$INTLDEPS%g
5626 s%@INTLLIBS@%$INTLLIBS%g
5627 s%@INTLOBJS@%$INTLOBJS%g
5628 s%@POFILES@%$POFILES%g
5629 s%@POSUB@%$POSUB%g
5630 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5631 s%@GT_NO@%$GT_NO%g
5632 s%@GT_YES@%$GT_YES%g
5633 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5634 s%@l@%$l%g
5635 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5636 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5637 s%@MAINT@%$MAINT%g
5638 s%@EXEEXT@%$EXEEXT%g
5640 CEOF
5643 cat >> $CONFIG_STATUS <<\EOF
5645 # Split the substitutions into bite-sized pieces for seds with
5646 # small command number limits, like on Digital OSF/1 and HP-UX.
5647 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5648 ac_file=1 # Number of current file.
5649 ac_beg=1 # First line for current file.
5650 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5651 ac_more_lines=:
5652 ac_sed_cmds=""
5653 while $ac_more_lines; do
5654 if test $ac_beg -gt 1; then
5655 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5656 else
5657 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5659 if test ! -s conftest.s$ac_file; then
5660 ac_more_lines=false
5661 rm -f conftest.s$ac_file
5662 else
5663 if test -z "$ac_sed_cmds"; then
5664 ac_sed_cmds="sed -f conftest.s$ac_file"
5665 else
5666 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5668 ac_file=`expr $ac_file + 1`
5669 ac_beg=$ac_end
5670 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5672 done
5673 if test -z "$ac_sed_cmds"; then
5674 ac_sed_cmds=cat
5678 cat >> $CONFIG_STATUS <<EOF
5680 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in"}
5682 cat >> $CONFIG_STATUS <<\EOF
5683 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5684 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5685 case "$ac_file" in
5686 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5687 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5688 *) ac_file_in="${ac_file}.in" ;;
5689 esac
5691 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5693 # Remove last slash and all that follows it. Not all systems have dirname.
5694 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5695 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5696 # The file is in a subdirectory.
5697 test ! -d "$ac_dir" && mkdir "$ac_dir"
5698 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5699 # A "../" for each directory in $ac_dir_suffix.
5700 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5701 else
5702 ac_dir_suffix= ac_dots=
5705 case "$ac_given_srcdir" in
5706 .) srcdir=.
5707 if test -z "$ac_dots"; then top_srcdir=.
5708 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5709 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5710 *) # Relative path.
5711 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5712 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5713 esac
5715 case "$ac_given_INSTALL" in
5716 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5717 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5718 esac
5720 echo creating "$ac_file"
5721 rm -f "$ac_file"
5722 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5723 case "$ac_file" in
5724 *Makefile*) ac_comsub="1i\\
5725 # $configure_input" ;;
5726 *) ac_comsub= ;;
5727 esac
5729 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5730 sed -e "$ac_comsub
5731 s%@configure_input@%$configure_input%g
5732 s%@srcdir@%$srcdir%g
5733 s%@top_srcdir@%$top_srcdir%g
5734 s%@INSTALL@%$INSTALL%g
5735 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5736 fi; done
5737 rm -f conftest.s*
5739 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5740 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5742 # ac_d sets the value in "#define NAME VALUE" lines.
5743 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5744 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5745 ac_dC='\3'
5746 ac_dD='%g'
5747 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5748 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5749 ac_uB='\([ ]\)%\1#\2define\3'
5750 ac_uC=' '
5751 ac_uD='\4%g'
5752 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5753 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5754 ac_eB='$%\1#\2define\3'
5755 ac_eC=' '
5756 ac_eD='%g'
5758 if test "${CONFIG_HEADERS+set}" != set; then
5760 cat >> $CONFIG_STATUS <<EOF
5761 CONFIG_HEADERS="config.h:config.in"
5763 cat >> $CONFIG_STATUS <<\EOF
5765 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5766 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5767 case "$ac_file" in
5768 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5769 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5770 *) ac_file_in="${ac_file}.in" ;;
5771 esac
5773 echo creating $ac_file
5775 rm -f conftest.frag conftest.in conftest.out
5776 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5777 cat $ac_file_inputs > conftest.in
5781 # Transform confdefs.h into a sed script conftest.vals that substitutes
5782 # the proper values into config.h.in to produce config.h. And first:
5783 # Protect against being on the right side of a sed subst in config.status.
5784 # Protect against being in an unquoted here document in config.status.
5785 rm -f conftest.vals
5786 cat > conftest.hdr <<\EOF
5787 s/[\\&%]/\\&/g
5788 s%[\\$`]%\\&%g
5789 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5790 s%ac_d%ac_u%gp
5791 s%ac_u%ac_e%gp
5793 sed -n -f conftest.hdr confdefs.h > conftest.vals
5794 rm -f conftest.hdr
5796 # This sed command replaces #undef with comments. This is necessary, for
5797 # example, in the case of _POSIX_SOURCE, which is predefined and required
5798 # on some systems where configure will not decide to define it.
5799 cat >> conftest.vals <<\EOF
5800 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5803 # Break up conftest.vals because some shells have a limit on
5804 # the size of here documents, and old seds have small limits too.
5806 rm -f conftest.tail
5807 while :
5809 ac_lines=`grep -c . conftest.vals`
5810 # grep -c gives empty output for an empty file on some AIX systems.
5811 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5812 # Write a limited-size here document to conftest.frag.
5813 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5814 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5815 echo 'CEOF
5816 sed -f conftest.frag conftest.in > conftest.out
5817 rm -f conftest.in
5818 mv conftest.out conftest.in
5819 ' >> $CONFIG_STATUS
5820 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5821 rm -f conftest.vals
5822 mv conftest.tail conftest.vals
5823 done
5824 rm -f conftest.vals
5826 cat >> $CONFIG_STATUS <<\EOF
5827 rm -f conftest.frag conftest.h
5828 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5829 cat conftest.in >> conftest.h
5830 rm -f conftest.in
5831 if cmp -s $ac_file conftest.h 2>/dev/null; then
5832 echo "$ac_file is unchanged"
5833 rm -f conftest.h
5834 else
5835 # Remove last slash and all that follows it. Not all systems have dirname.
5836 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5837 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5838 # The file is in a subdirectory.
5839 test ! -d "$ac_dir" && mkdir "$ac_dir"
5841 rm -f $ac_file
5842 mv conftest.h $ac_file
5844 fi; done
5847 cat >> $CONFIG_STATUS <<EOF
5849 target_cpu_type=${target_cpu_type}
5850 cgen_cpu_prefix=${cgen_cpu_prefix}
5851 obj_format=${obj_format}
5852 te_file=${te_file}
5854 cat >> $CONFIG_STATUS <<\EOF
5855 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5856 rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
5857 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
5858 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
5859 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
5860 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
5861 if test "x$cgen_cpu_prefix" != x ; then
5862 echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
5865 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
5866 exit 0
5868 chmod +x $CONFIG_STATUS
5869 rm -fr confdefs* $ac_clean_files
5870 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1