2000-09-07 H.J. Lu <hjl@gnu.org>
[binutils.git] / gas / configure
blob8b94a4814e96c0ef20848d6507d421a266b81c52
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 --with-pic try to use only PIC/non-PIC objects [default=use both]"
26 ac_help="$ac_help
27 --enable-bfd-assembler use BFD back end for writing object files"
28 ac_help="$ac_help
29 targets alternative target configurations besides the primary"
30 ac_help="$ac_help
31 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
32 ac_help="$ac_help
33 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
34 ac_help="$ac_help
35 --disable-nls do not use Native Language Support"
36 ac_help="$ac_help
37 --with-included-gettext use the GNU gettext library included here"
38 ac_help="$ac_help
39 --enable-maintainer-mode enable make rules and dependencies not useful
40 (and sometimes confusing) to the casual installer"
42 # Initialize some variables set by options.
43 # The variables have the same names as the options, with
44 # dashes changed to underlines.
45 build=NONE
46 cache_file=./config.cache
47 exec_prefix=NONE
48 host=NONE
49 no_create=
50 nonopt=NONE
51 no_recursion=
52 prefix=NONE
53 program_prefix=NONE
54 program_suffix=NONE
55 program_transform_name=s,x,x,
56 silent=
57 site=
58 srcdir=
59 target=NONE
60 verbose=
61 x_includes=NONE
62 x_libraries=NONE
63 bindir='${exec_prefix}/bin'
64 sbindir='${exec_prefix}/sbin'
65 libexecdir='${exec_prefix}/libexec'
66 datadir='${prefix}/share'
67 sysconfdir='${prefix}/etc'
68 sharedstatedir='${prefix}/com'
69 localstatedir='${prefix}/var'
70 libdir='${exec_prefix}/lib'
71 includedir='${prefix}/include'
72 oldincludedir='/usr/include'
73 infodir='${prefix}/info'
74 mandir='${prefix}/man'
76 # Initialize some other variables.
77 subdirs=
78 MFLAGS= MAKEFLAGS=
79 SHELL=${CONFIG_SHELL-/bin/sh}
80 # Maximum number of lines to put in a shell here document.
81 ac_max_here_lines=12
83 ac_prev=
84 for ac_option
87 # If the previous option needs an argument, assign it.
88 if test -n "$ac_prev"; then
89 eval "$ac_prev=\$ac_option"
90 ac_prev=
91 continue
94 case "$ac_option" in
95 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
96 *) ac_optarg= ;;
97 esac
99 # Accept the important Cygnus configure options, so we can diagnose typos.
101 case "$ac_option" in
103 -bindir | --bindir | --bindi | --bind | --bin | --bi)
104 ac_prev=bindir ;;
105 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
106 bindir="$ac_optarg" ;;
108 -build | --build | --buil | --bui | --bu)
109 ac_prev=build ;;
110 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
111 build="$ac_optarg" ;;
113 -cache-file | --cache-file | --cache-fil | --cache-fi \
114 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
115 ac_prev=cache_file ;;
116 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
117 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
118 cache_file="$ac_optarg" ;;
120 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
121 ac_prev=datadir ;;
122 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
123 | --da=*)
124 datadir="$ac_optarg" ;;
126 -disable-* | --disable-*)
127 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
128 # Reject names that are not valid shell variable names.
129 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
130 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
132 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
133 eval "enable_${ac_feature}=no" ;;
135 -enable-* | --enable-*)
136 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
137 # Reject names that are not valid shell variable names.
138 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
139 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
141 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142 case "$ac_option" in
143 *=*) ;;
144 *) ac_optarg=yes ;;
145 esac
146 eval "enable_${ac_feature}='$ac_optarg'" ;;
148 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
149 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
150 | --exec | --exe | --ex)
151 ac_prev=exec_prefix ;;
152 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
153 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
154 | --exec=* | --exe=* | --ex=*)
155 exec_prefix="$ac_optarg" ;;
157 -gas | --gas | --ga | --g)
158 # Obsolete; use --with-gas.
159 with_gas=yes ;;
161 -help | --help | --hel | --he)
162 # Omit some internal or obsolete options to make the list less imposing.
163 # This message is too long to be a string in the A/UX 3.1 sh.
164 cat << EOF
165 Usage: configure [options] [host]
166 Options: [defaults in brackets after descriptions]
167 Configuration:
168 --cache-file=FILE cache test results in FILE
169 --help print this message
170 --no-create do not create output files
171 --quiet, --silent do not print \`checking...' messages
172 --version print the version of autoconf that created configure
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 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
343 ac_prev=srcdir ;;
344 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
345 srcdir="$ac_optarg" ;;
347 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
348 | --syscon | --sysco | --sysc | --sys | --sy)
349 ac_prev=sysconfdir ;;
350 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
351 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
352 sysconfdir="$ac_optarg" ;;
354 -target | --target | --targe | --targ | --tar | --ta | --t)
355 ac_prev=target ;;
356 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
357 target="$ac_optarg" ;;
359 -v | -verbose | --verbose | --verbos | --verbo | --verb)
360 verbose=yes ;;
362 -version | --version | --versio | --versi | --vers)
363 echo "configure generated by autoconf version 2.13"
364 exit 0 ;;
366 -with-* | --with-*)
367 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
368 # Reject names that are not valid shell variable names.
369 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
370 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
372 ac_package=`echo $ac_package| sed 's/-/_/g'`
373 case "$ac_option" in
374 *=*) ;;
375 *) ac_optarg=yes ;;
376 esac
377 eval "with_${ac_package}='$ac_optarg'" ;;
379 -without-* | --without-*)
380 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
381 # Reject names that are not valid shell variable names.
382 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
383 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
385 ac_package=`echo $ac_package| sed 's/-/_/g'`
386 eval "with_${ac_package}=no" ;;
388 --x)
389 # Obsolete; use --with-x.
390 with_x=yes ;;
392 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
393 | --x-incl | --x-inc | --x-in | --x-i)
394 ac_prev=x_includes ;;
395 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
396 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
397 x_includes="$ac_optarg" ;;
399 -x-libraries | --x-libraries | --x-librarie | --x-librari \
400 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
401 ac_prev=x_libraries ;;
402 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
403 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
404 x_libraries="$ac_optarg" ;;
406 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
410 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
411 echo "configure: warning: $ac_option: invalid host type" 1>&2
413 if test "x$nonopt" != xNONE; then
414 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
416 nonopt="$ac_option"
419 esac
420 done
422 if test -n "$ac_prev"; then
423 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
426 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
428 # File descriptor usage:
429 # 0 standard input
430 # 1 file creation
431 # 2 errors and warnings
432 # 3 some systems may open it to /dev/tty
433 # 4 used on the Kubota Titan
434 # 6 checking for... messages and results
435 # 5 compiler messages saved in config.log
436 if test "$silent" = yes; then
437 exec 6>/dev/null
438 else
439 exec 6>&1
441 exec 5>./config.log
443 echo "\
444 This file contains any messages produced by compilers while
445 running configure, to aid debugging if configure makes a mistake.
446 " 1>&5
448 # Strip out --no-create and --no-recursion so they do not pile up.
449 # Also quote any args containing shell metacharacters.
450 ac_configure_args=
451 for ac_arg
453 case "$ac_arg" in
454 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
455 | --no-cr | --no-c) ;;
456 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
457 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
458 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
459 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
460 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
461 esac
462 done
464 # NLS nuisances.
465 # Only set these to C if already set. These must not be set unconditionally
466 # because not all systems understand e.g. LANG=C (notably SCO).
467 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
468 # Non-C LC_CTYPE values break the ctype check.
469 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
470 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
471 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
472 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
474 # confdefs.h avoids OS command line length limits that DEFS can exceed.
475 rm -rf conftest* confdefs.h
476 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
477 echo > confdefs.h
479 # A filename unique to this package, relative to the directory that
480 # configure is in, which we can look for to find out if srcdir is correct.
481 ac_unique_file=as.h
483 # Find the source files, if location was not specified.
484 if test -z "$srcdir"; then
485 ac_srcdir_defaulted=yes
486 # Try the directory containing this script, then its parent.
487 ac_prog=$0
488 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
489 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
490 srcdir=$ac_confdir
491 if test ! -r $srcdir/$ac_unique_file; then
492 srcdir=..
494 else
495 ac_srcdir_defaulted=no
497 if test ! -r $srcdir/$ac_unique_file; then
498 if test "$ac_srcdir_defaulted" = yes; then
499 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
500 else
501 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
504 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
506 # Prefer explicitly selected file to automatically selected ones.
507 if test -z "$CONFIG_SITE"; then
508 if test "x$prefix" != xNONE; then
509 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
510 else
511 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
514 for ac_site_file in $CONFIG_SITE; do
515 if test -r "$ac_site_file"; then
516 echo "loading site script $ac_site_file"
517 . "$ac_site_file"
519 done
521 if test -r "$cache_file"; then
522 echo "loading cache $cache_file"
523 . $cache_file
524 else
525 echo "creating cache $cache_file"
526 > $cache_file
529 ac_ext=c
530 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
531 ac_cpp='$CPP $CPPFLAGS'
532 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
533 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
534 cross_compiling=$ac_cv_prog_cc_cross
536 ac_exeext=
537 ac_objext=o
538 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
539 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
540 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
541 ac_n= ac_c='
542 ' ac_t=' '
543 else
544 ac_n=-n ac_c= ac_t=
546 else
547 ac_n= ac_c='\c' ac_t=
550 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
551 echo "configure:552: checking for Cygwin environment" >&5
552 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
553 echo $ac_n "(cached) $ac_c" 1>&6
554 else
555 cat > conftest.$ac_ext <<EOF
556 #line 557 "configure"
557 #include "confdefs.h"
559 int main() {
561 #ifndef __CYGWIN__
562 #define __CYGWIN__ __CYGWIN32__
563 #endif
564 return __CYGWIN__;
565 ; return 0; }
567 if { (eval echo configure:568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
568 rm -rf conftest*
569 ac_cv_cygwin=yes
570 else
571 echo "configure: failed program was:" >&5
572 cat conftest.$ac_ext >&5
573 rm -rf conftest*
574 ac_cv_cygwin=no
576 rm -f conftest*
577 rm -f conftest*
580 echo "$ac_t""$ac_cv_cygwin" 1>&6
581 CYGWIN=
582 test "$ac_cv_cygwin" = yes && CYGWIN=yes
583 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
584 echo "configure:585: checking for mingw32 environment" >&5
585 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
586 echo $ac_n "(cached) $ac_c" 1>&6
587 else
588 cat > conftest.$ac_ext <<EOF
589 #line 590 "configure"
590 #include "confdefs.h"
592 int main() {
593 return __MINGW32__;
594 ; return 0; }
596 if { (eval echo configure:597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
597 rm -rf conftest*
598 ac_cv_mingw32=yes
599 else
600 echo "configure: failed program was:" >&5
601 cat conftest.$ac_ext >&5
602 rm -rf conftest*
603 ac_cv_mingw32=no
605 rm -f conftest*
606 rm -f conftest*
609 echo "$ac_t""$ac_cv_mingw32" 1>&6
610 MINGW32=
611 test "$ac_cv_mingw32" = yes && MINGW32=yes
614 ac_aux_dir=
615 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
616 if test -f $ac_dir/install-sh; then
617 ac_aux_dir=$ac_dir
618 ac_install_sh="$ac_aux_dir/install-sh -c"
619 break
620 elif test -f $ac_dir/install.sh; then
621 ac_aux_dir=$ac_dir
622 ac_install_sh="$ac_aux_dir/install.sh -c"
623 break
625 done
626 if test -z "$ac_aux_dir"; then
627 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
629 ac_config_guess=$ac_aux_dir/config.guess
630 ac_config_sub=$ac_aux_dir/config.sub
631 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
634 # Do some error checking and defaulting for the host and target type.
635 # The inputs are:
636 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
638 # The rules are:
639 # 1. You are not allowed to specify --host, --target, and nonopt at the
640 # same time.
641 # 2. Host defaults to nonopt.
642 # 3. If nonopt is not specified, then host defaults to the current host,
643 # as determined by config.guess.
644 # 4. Target and build default to nonopt.
645 # 5. If nonopt is not specified, then target and build default to host.
647 # The aliases save the names the user supplied, while $host etc.
648 # will get canonicalized.
649 case $host---$target---$nonopt in
650 NONE---*---* | *---NONE---* | *---*---NONE) ;;
651 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
652 esac
655 # Make sure we can run config.sub.
656 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
657 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
660 echo $ac_n "checking host system type""... $ac_c" 1>&6
661 echo "configure:662: checking host system type" >&5
663 host_alias=$host
664 case "$host_alias" in
665 NONE)
666 case $nonopt in
667 NONE)
668 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
669 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
670 fi ;;
671 *) host_alias=$nonopt ;;
672 esac ;;
673 esac
675 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
676 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
677 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
678 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
679 echo "$ac_t""$host" 1>&6
681 echo $ac_n "checking target system type""... $ac_c" 1>&6
682 echo "configure:683: checking target system type" >&5
684 target_alias=$target
685 case "$target_alias" in
686 NONE)
687 case $nonopt in
688 NONE) target_alias=$host_alias ;;
689 *) target_alias=$nonopt ;;
690 esac ;;
691 esac
693 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
694 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
695 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
696 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
697 echo "$ac_t""$target" 1>&6
699 echo $ac_n "checking build system type""... $ac_c" 1>&6
700 echo "configure:701: checking build system type" >&5
702 build_alias=$build
703 case "$build_alias" in
704 NONE)
705 case $nonopt in
706 NONE) build_alias=$host_alias ;;
707 *) build_alias=$nonopt ;;
708 esac ;;
709 esac
711 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
712 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
713 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
714 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
715 echo "$ac_t""$build" 1>&6
717 test "$host_alias" != "$target_alias" &&
718 test "$program_prefix$program_suffix$program_transform_name" = \
719 NONENONEs,x,x, &&
720 program_prefix=${target_alias}-
723 # Find a good install program. We prefer a C program (faster),
724 # so one script is as good as another. But avoid the broken or
725 # incompatible versions:
726 # SysV /etc/install, /usr/sbin/install
727 # SunOS /usr/etc/install
728 # IRIX /sbin/install
729 # AIX /bin/install
730 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
731 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
732 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
733 # ./install, which can be erroneously created by make from ./install.sh.
734 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
735 echo "configure:736: checking for a BSD compatible install" >&5
736 if test -z "$INSTALL"; then
737 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
738 echo $ac_n "(cached) $ac_c" 1>&6
739 else
740 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
741 for ac_dir in $PATH; do
742 # Account for people who put trailing slashes in PATH elements.
743 case "$ac_dir/" in
744 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
746 # OSF1 and SCO ODT 3.0 have their own names for install.
747 # Don't use installbsd from OSF since it installs stuff as root
748 # by default.
749 for ac_prog in ginstall scoinst install; do
750 if test -f $ac_dir/$ac_prog; then
751 if test $ac_prog = install &&
752 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
753 # AIX install. It has an incompatible calling convention.
755 else
756 ac_cv_path_install="$ac_dir/$ac_prog -c"
757 break 2
760 done
762 esac
763 done
764 IFS="$ac_save_IFS"
767 if test "${ac_cv_path_install+set}" = set; then
768 INSTALL="$ac_cv_path_install"
769 else
770 # As a last resort, use the slow shell script. We don't cache a
771 # path for INSTALL within a source directory, because that will
772 # break other packages using the cache if that directory is
773 # removed, or if the path is relative.
774 INSTALL="$ac_install_sh"
777 echo "$ac_t""$INSTALL" 1>&6
779 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
780 # It thinks the first close brace ends the variable substitution.
781 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
783 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
785 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
787 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
788 echo "configure:789: checking whether build environment is sane" >&5
789 # Just in case
790 sleep 1
791 echo timestamp > conftestfile
792 # Do `set' in a subshell so we don't clobber the current shell's
793 # arguments. Must try -L first in case configure is actually a
794 # symlink; some systems play weird games with the mod time of symlinks
795 # (eg FreeBSD returns the mod time of the symlink's containing
796 # directory).
797 if (
798 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
799 if test "$*" = "X"; then
800 # -L didn't work.
801 set X `ls -t $srcdir/configure conftestfile`
803 if test "$*" != "X $srcdir/configure conftestfile" \
804 && test "$*" != "X conftestfile $srcdir/configure"; then
806 # If neither matched, then we have a broken ls. This can happen
807 # if, for instance, CONFIG_SHELL is bash and it inherits a
808 # broken ls alias from the environment. This has actually
809 # happened. Such a system could not be considered "sane".
810 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
811 alias in your environment" 1>&2; exit 1; }
814 test "$2" = conftestfile
816 then
817 # Ok.
819 else
820 { echo "configure: error: newly created file is older than distributed files!
821 Check your system clock" 1>&2; exit 1; }
823 rm -f conftest*
824 echo "$ac_t""yes" 1>&6
825 if test "$program_transform_name" = s,x,x,; then
826 program_transform_name=
827 else
828 # Double any \ or $. echo might interpret backslashes.
829 cat <<\EOF_SED > conftestsed
830 s,\\,\\\\,g; s,\$,$$,g
831 EOF_SED
832 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
833 rm -f conftestsed
835 test "$program_prefix" != NONE &&
836 program_transform_name="s,^,${program_prefix},; $program_transform_name"
837 # Use a double $ so make ignores it.
838 test "$program_suffix" != NONE &&
839 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
841 # sed with no file args requires a program.
842 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
844 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
845 echo "configure:846: checking whether ${MAKE-make} sets \${MAKE}" >&5
846 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
847 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
848 echo $ac_n "(cached) $ac_c" 1>&6
849 else
850 cat > conftestmake <<\EOF
851 all:
852 @echo 'ac_maketemp="${MAKE}"'
854 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
855 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
856 if test -n "$ac_maketemp"; then
857 eval ac_cv_prog_make_${ac_make}_set=yes
858 else
859 eval ac_cv_prog_make_${ac_make}_set=no
861 rm -f conftestmake
863 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
864 echo "$ac_t""yes" 1>&6
865 SET_MAKE=
866 else
867 echo "$ac_t""no" 1>&6
868 SET_MAKE="MAKE=${MAKE-make}"
872 PACKAGE=gas
874 VERSION=2.10.91
876 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
877 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
879 cat >> confdefs.h <<EOF
880 #define PACKAGE "$PACKAGE"
883 cat >> confdefs.h <<EOF
884 #define VERSION "$VERSION"
889 missing_dir=`cd $ac_aux_dir && pwd`
890 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
891 echo "configure:892: checking for working aclocal" >&5
892 # Run test in a subshell; some versions of sh will print an error if
893 # an executable is not found, even if stderr is redirected.
894 # Redirect stdin to placate older versions of autoconf. Sigh.
895 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
896 ACLOCAL=aclocal
897 echo "$ac_t""found" 1>&6
898 else
899 ACLOCAL="$missing_dir/missing aclocal"
900 echo "$ac_t""missing" 1>&6
903 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
904 echo "configure:905: checking for working autoconf" >&5
905 # Run test in a subshell; some versions of sh will print an error if
906 # an executable is not found, even if stderr is redirected.
907 # Redirect stdin to placate older versions of autoconf. Sigh.
908 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
909 AUTOCONF=autoconf
910 echo "$ac_t""found" 1>&6
911 else
912 AUTOCONF="$missing_dir/missing autoconf"
913 echo "$ac_t""missing" 1>&6
916 echo $ac_n "checking for working automake""... $ac_c" 1>&6
917 echo "configure:918: checking for working automake" >&5
918 # Run test in a subshell; some versions of sh will print an error if
919 # an executable is not found, even if stderr is redirected.
920 # Redirect stdin to placate older versions of autoconf. Sigh.
921 if (automake --version) < /dev/null > /dev/null 2>&1; then
922 AUTOMAKE=automake
923 echo "$ac_t""found" 1>&6
924 else
925 AUTOMAKE="$missing_dir/missing automake"
926 echo "$ac_t""missing" 1>&6
929 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
930 echo "configure:931: checking for working autoheader" >&5
931 # Run test in a subshell; some versions of sh will print an error if
932 # an executable is not found, even if stderr is redirected.
933 # Redirect stdin to placate older versions of autoconf. Sigh.
934 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
935 AUTOHEADER=autoheader
936 echo "$ac_t""found" 1>&6
937 else
938 AUTOHEADER="$missing_dir/missing autoheader"
939 echo "$ac_t""missing" 1>&6
942 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
943 echo "configure:944: checking for working makeinfo" >&5
944 # Run test in a subshell; some versions of sh will print an error if
945 # an executable is not found, even if stderr is redirected.
946 # Redirect stdin to placate older versions of autoconf. Sigh.
947 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
948 MAKEINFO=makeinfo
949 echo "$ac_t""found" 1>&6
950 else
951 MAKEINFO="$missing_dir/missing makeinfo"
952 echo "$ac_t""missing" 1>&6
957 # Check whether --enable-shared or --disable-shared was given.
958 if test "${enable_shared+set}" = set; then
959 enableval="$enable_shared"
960 p=${PACKAGE-default}
961 case "$enableval" in
962 yes) enable_shared=yes ;;
963 no) enable_shared=no ;;
965 enable_shared=no
966 # Look at the argument we got. We use all the common list separators.
967 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
968 for pkg in $enableval; do
969 if test "X$pkg" = "X$p"; then
970 enable_shared=yes
972 done
973 IFS="$ac_save_ifs"
975 esac
976 else
977 enable_shared=yes
980 # Check whether --enable-static or --disable-static was given.
981 if test "${enable_static+set}" = set; then
982 enableval="$enable_static"
983 p=${PACKAGE-default}
984 case "$enableval" in
985 yes) enable_static=yes ;;
986 no) enable_static=no ;;
988 enable_static=no
989 # Look at the argument we got. We use all the common list separators.
990 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
991 for pkg in $enableval; do
992 if test "X$pkg" = "X$p"; then
993 enable_static=yes
995 done
996 IFS="$ac_save_ifs"
998 esac
999 else
1000 enable_static=yes
1003 # Check whether --enable-fast-install or --disable-fast-install was given.
1004 if test "${enable_fast_install+set}" = set; then
1005 enableval="$enable_fast_install"
1006 p=${PACKAGE-default}
1007 case "$enableval" in
1008 yes) enable_fast_install=yes ;;
1009 no) enable_fast_install=no ;;
1011 enable_fast_install=no
1012 # Look at the argument we got. We use all the common list separators.
1013 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1014 for pkg in $enableval; do
1015 if test "X$pkg" = "X$p"; then
1016 enable_fast_install=yes
1018 done
1019 IFS="$ac_save_ifs"
1021 esac
1022 else
1023 enable_fast_install=yes
1026 # Extract the first word of "gcc", so it can be a program name with args.
1027 set dummy gcc; ac_word=$2
1028 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1029 echo "configure:1030: checking for $ac_word" >&5
1030 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1031 echo $ac_n "(cached) $ac_c" 1>&6
1032 else
1033 if test -n "$CC"; then
1034 ac_cv_prog_CC="$CC" # Let the user override the test.
1035 else
1036 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1037 ac_dummy="$PATH"
1038 for ac_dir in $ac_dummy; do
1039 test -z "$ac_dir" && ac_dir=.
1040 if test -f $ac_dir/$ac_word; then
1041 ac_cv_prog_CC="gcc"
1042 break
1044 done
1045 IFS="$ac_save_ifs"
1048 CC="$ac_cv_prog_CC"
1049 if test -n "$CC"; then
1050 echo "$ac_t""$CC" 1>&6
1051 else
1052 echo "$ac_t""no" 1>&6
1055 if test -z "$CC"; then
1056 # Extract the first word of "cc", so it can be a program name with args.
1057 set dummy cc; ac_word=$2
1058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1059 echo "configure:1060: checking for $ac_word" >&5
1060 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1061 echo $ac_n "(cached) $ac_c" 1>&6
1062 else
1063 if test -n "$CC"; then
1064 ac_cv_prog_CC="$CC" # Let the user override the test.
1065 else
1066 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1067 ac_prog_rejected=no
1068 ac_dummy="$PATH"
1069 for ac_dir in $ac_dummy; do
1070 test -z "$ac_dir" && ac_dir=.
1071 if test -f $ac_dir/$ac_word; then
1072 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1073 ac_prog_rejected=yes
1074 continue
1076 ac_cv_prog_CC="cc"
1077 break
1079 done
1080 IFS="$ac_save_ifs"
1081 if test $ac_prog_rejected = yes; then
1082 # We found a bogon in the path, so make sure we never use it.
1083 set dummy $ac_cv_prog_CC
1084 shift
1085 if test $# -gt 0; then
1086 # We chose a different compiler from the bogus one.
1087 # However, it has the same basename, so the bogon will be chosen
1088 # first if we set CC to just the basename; use the full file name.
1089 shift
1090 set dummy "$ac_dir/$ac_word" "$@"
1091 shift
1092 ac_cv_prog_CC="$@"
1097 CC="$ac_cv_prog_CC"
1098 if test -n "$CC"; then
1099 echo "$ac_t""$CC" 1>&6
1100 else
1101 echo "$ac_t""no" 1>&6
1104 if test -z "$CC"; then
1105 case "`uname -s`" in
1106 *win32* | *WIN32*)
1107 # Extract the first word of "cl", so it can be a program name with args.
1108 set dummy cl; ac_word=$2
1109 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1110 echo "configure:1111: checking for $ac_word" >&5
1111 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1112 echo $ac_n "(cached) $ac_c" 1>&6
1113 else
1114 if test -n "$CC"; then
1115 ac_cv_prog_CC="$CC" # Let the user override the test.
1116 else
1117 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1118 ac_dummy="$PATH"
1119 for ac_dir in $ac_dummy; do
1120 test -z "$ac_dir" && ac_dir=.
1121 if test -f $ac_dir/$ac_word; then
1122 ac_cv_prog_CC="cl"
1123 break
1125 done
1126 IFS="$ac_save_ifs"
1129 CC="$ac_cv_prog_CC"
1130 if test -n "$CC"; then
1131 echo "$ac_t""$CC" 1>&6
1132 else
1133 echo "$ac_t""no" 1>&6
1136 esac
1138 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1141 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1142 echo "configure:1143: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1144 ac_ext=c
1145 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1146 ac_cpp='$CPP $CPPFLAGS'
1147 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1148 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1149 cross_compiling=$ac_cv_prog_cc_cross
1151 cat > conftest.$ac_ext << EOF
1153 #line 1154 "configure"
1154 #include "confdefs.h"
1156 main(){return(0);}
1158 if { (eval echo configure:1159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1159 ac_cv_prog_cc_works=yes
1160 # If we can't run a trivial program, we are probably using a cross compiler.
1161 if (./conftest; exit) 2>/dev/null; then
1162 ac_cv_prog_cc_cross=no
1163 else
1164 ac_cv_prog_cc_cross=yes
1166 else
1167 echo "configure: failed program was:" >&5
1168 cat conftest.$ac_ext >&5
1169 ac_cv_prog_cc_works=no
1171 rm -fr conftest*
1172 ac_ext=c
1173 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1174 ac_cpp='$CPP $CPPFLAGS'
1175 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1176 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1177 cross_compiling=$ac_cv_prog_cc_cross
1179 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1180 if test $ac_cv_prog_cc_works = no; then
1181 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1183 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1184 echo "configure:1185: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1185 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1186 cross_compiling=$ac_cv_prog_cc_cross
1188 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1189 echo "configure:1190: checking whether we are using GNU C" >&5
1190 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1191 echo $ac_n "(cached) $ac_c" 1>&6
1192 else
1193 cat > conftest.c <<EOF
1194 #ifdef __GNUC__
1195 yes;
1196 #endif
1198 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1199 ac_cv_prog_gcc=yes
1200 else
1201 ac_cv_prog_gcc=no
1205 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1207 if test $ac_cv_prog_gcc = yes; then
1208 GCC=yes
1209 else
1210 GCC=
1213 ac_test_CFLAGS="${CFLAGS+set}"
1214 ac_save_CFLAGS="$CFLAGS"
1215 CFLAGS=
1216 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1217 echo "configure:1218: checking whether ${CC-cc} accepts -g" >&5
1218 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1219 echo $ac_n "(cached) $ac_c" 1>&6
1220 else
1221 echo 'void f(){}' > conftest.c
1222 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1223 ac_cv_prog_cc_g=yes
1224 else
1225 ac_cv_prog_cc_g=no
1227 rm -f conftest*
1231 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1232 if test "$ac_test_CFLAGS" = set; then
1233 CFLAGS="$ac_save_CFLAGS"
1234 elif test $ac_cv_prog_cc_g = yes; then
1235 if test "$GCC" = yes; then
1236 CFLAGS="-g -O2"
1237 else
1238 CFLAGS="-g"
1240 else
1241 if test "$GCC" = yes; then
1242 CFLAGS="-O2"
1243 else
1244 CFLAGS=
1248 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1249 if test "${with_gnu_ld+set}" = set; then
1250 withval="$with_gnu_ld"
1251 test "$withval" = no || with_gnu_ld=yes
1252 else
1253 with_gnu_ld=no
1256 ac_prog=ld
1257 if test "$ac_cv_prog_gcc" = yes; then
1258 # Check if gcc -print-prog-name=ld gives a path.
1259 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1260 echo "configure:1261: checking for ld used by GCC" >&5
1261 case $host in
1262 *-*-mingw*)
1263 # gcc leaves a trailing carriage return which upsets mingw
1264 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1266 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1267 esac
1268 case "$ac_prog" in
1269 # Accept absolute paths.
1270 [\\/]* | [A-Za-z]:[\\/]*)
1271 re_direlt='/[^/][^/]*/\.\./'
1272 # Canonicalize the path of ld
1273 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1274 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1275 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1276 done
1277 test -z "$LD" && LD="$ac_prog"
1280 # If it fails, then pretend we aren't using GCC.
1281 ac_prog=ld
1284 # If it is relative, then search for the first ld in PATH.
1285 with_gnu_ld=unknown
1287 esac
1288 elif test "$with_gnu_ld" = yes; then
1289 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1290 echo "configure:1291: checking for GNU ld" >&5
1291 else
1292 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1293 echo "configure:1294: checking for non-GNU ld" >&5
1295 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1296 echo $ac_n "(cached) $ac_c" 1>&6
1297 else
1298 if test -z "$LD"; then
1299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1300 for ac_dir in $PATH; do
1301 test -z "$ac_dir" && ac_dir=.
1302 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1303 ac_cv_path_LD="$ac_dir/$ac_prog"
1304 # Check to see if the program is GNU ld. I'd rather use --version,
1305 # but apparently some GNU ld's only accept -v.
1306 # Break only if it was the GNU/non-GNU ld that we prefer.
1307 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1308 test "$with_gnu_ld" != no && break
1309 else
1310 test "$with_gnu_ld" != yes && break
1313 done
1314 IFS="$ac_save_ifs"
1315 else
1316 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1320 LD="$ac_cv_path_LD"
1321 if test -n "$LD"; then
1322 echo "$ac_t""$LD" 1>&6
1323 else
1324 echo "$ac_t""no" 1>&6
1326 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1327 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1328 echo "configure:1329: checking if the linker ($LD) is GNU ld" >&5
1329 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1330 echo $ac_n "(cached) $ac_c" 1>&6
1331 else
1332 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1333 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1334 ac_cv_prog_gnu_ld=yes
1335 else
1336 ac_cv_prog_gnu_ld=no
1340 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1341 with_gnu_ld=$ac_cv_prog_gnu_ld
1344 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1345 echo "configure:1346: checking for $LD option to reload object files" >&5
1346 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1347 echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349 lt_cv_ld_reload_flag='-r'
1352 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1353 reload_flag=$lt_cv_ld_reload_flag
1354 test -n "$reload_flag" && reload_flag=" $reload_flag"
1356 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1357 echo "configure:1358: checking for BSD-compatible nm" >&5
1358 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1359 echo $ac_n "(cached) $ac_c" 1>&6
1360 else
1361 if test -n "$NM"; then
1362 # Let the user override the test.
1363 ac_cv_path_NM="$NM"
1364 else
1365 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1366 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1367 test -z "$ac_dir" && ac_dir=.
1368 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1369 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1370 # Check to see if the nm accepts a BSD-compat flag.
1371 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1372 # nm: unknown option "B" ignored
1373 # Tru64's nm complains that /dev/null is an invalid object file
1374 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1375 ac_cv_path_NM="$tmp_nm -B"
1376 break
1377 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1378 ac_cv_path_NM="$tmp_nm -p"
1379 break
1380 else
1381 ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
1382 continue # so that we can try to find one that supports BSD flags
1385 done
1386 IFS="$ac_save_ifs"
1387 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1391 NM="$ac_cv_path_NM"
1392 echo "$ac_t""$NM" 1>&6
1394 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1395 echo "configure:1396: checking whether ln -s works" >&5
1396 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1397 echo $ac_n "(cached) $ac_c" 1>&6
1398 else
1399 rm -f conftestdata
1400 if ln -s X conftestdata 2>/dev/null
1401 then
1402 rm -f conftestdata
1403 ac_cv_prog_LN_S="ln -s"
1404 else
1405 ac_cv_prog_LN_S=ln
1408 LN_S="$ac_cv_prog_LN_S"
1409 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1410 echo "$ac_t""yes" 1>&6
1411 else
1412 echo "$ac_t""no" 1>&6
1415 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1416 echo "configure:1417: checking how to recognise dependant libraries" >&5
1417 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1418 echo $ac_n "(cached) $ac_c" 1>&6
1419 else
1420 lt_cv_file_magic_cmd='${MAGIC}'
1421 lt_cv_file_magic_test_file=
1422 lt_cv_deplibs_check_method='unknown'
1423 # Need to set the preceding variable on all platforms that support
1424 # interlibrary dependencies.
1425 # 'none' -- dependencies not supported.
1426 # `unknown' -- same as none, but documents that we really don't know.
1427 # 'pass_all' -- all dependencies passed with no checks.
1428 # 'test_compile' -- check by making test program.
1429 # 'file_magic [regex]' -- check by looking for files in library path
1430 # which responds to the $file_magic_cmd with a given egrep regex.
1431 # If you have `file' or equivalent on your system and you're not sure
1432 # whether `pass_all' will *always* work, you probably want this one.
1434 case "$host_os" in
1435 aix4*)
1436 lt_cv_deplibs_check_method=pass_all
1439 beos*)
1440 lt_cv_deplibs_check_method=pass_all
1443 bsdi4*)
1444 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1445 lt_cv_file_magic_cmd='/usr/bin/file -L'
1446 lt_cv_file_magic_test_file=/shlib/libc.so
1449 cygwin* | mingw*)
1450 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1451 lt_cv_file_magic_cmd='${OBJDUMP} -f'
1454 freebsd* )
1455 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1456 case "$host_cpu" in
1457 i*86 )
1458 # Not sure whether the presence of OpenBSD here was a mistake.
1459 # Let's accept both of them until this is cleared up.
1460 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1461 lt_cv_file_magic_cmd=/usr/bin/file
1462 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1464 esac
1465 else
1466 lt_cv_deplibs_check_method=pass_all
1470 gnu*)
1471 lt_cv_deplibs_check_method=pass_all
1474 hpux10.20*)
1475 # TODO: Does this work for hpux-11 too?
1476 lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
1477 lt_cv_file_magic_cmd=/usr/bin/file
1478 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1481 irix5* | irix6*)
1482 case "$host_os" in
1483 irix5*)
1484 # this will be overridden with pass_all, but let us keep it just in case
1485 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1488 case "$LD" in
1489 *-32|*"-32 ") libmagic=32-bit;;
1490 *-n32|*"-n32 ") libmagic=N32;;
1491 *-64|*"-64 ") libmagic=64-bit;;
1492 *) libmagic=never-match;;
1493 esac
1494 # this will be overridden with pass_all, but let us keep it just in case
1495 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1497 esac
1498 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1499 lt_cv_deplibs_check_method=pass_all
1502 # This must be Linux ELF.
1503 linux-gnu*)
1504 case "$host_cpu" in
1505 alpha* | i*86 | powerpc* | sparc* | ia64* )
1506 lt_cv_deplibs_check_method=pass_all ;;
1508 # glibc up to 2.1.1 does not perform some relocations on ARM
1509 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1510 esac
1511 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1514 netbsd*)
1515 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
1516 else
1517 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1518 lt_cv_file_magic_cmd='/usr/bin/file -L'
1519 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1523 osf3* | osf4* | osf5*)
1524 # this will be overridden with pass_all, but let us keep it just in case
1525 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1526 lt_cv_file_magic_test_file=/shlib/libc.so
1527 lt_cv_deplibs_check_method=pass_all
1530 sco3.2v5*)
1531 lt_cv_deplibs_check_method=pass_all
1534 solaris*)
1535 lt_cv_deplibs_check_method=pass_all
1536 lt_cv_file_magic_test_file=/lib/libc.so
1539 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1540 case "$host_vendor" in
1541 ncr)
1542 lt_cv_deplibs_check_method=pass_all
1544 motorola)
1545 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
1546 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1548 esac
1550 esac
1554 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1555 file_magic_cmd=$lt_cv_file_magic_cmd
1556 deplibs_check_method=$lt_cv_deplibs_check_method
1558 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1559 echo "configure:1560: checking for object suffix" >&5
1560 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1561 echo $ac_n "(cached) $ac_c" 1>&6
1562 else
1563 rm -f conftest*
1564 echo 'int i = 1;' > conftest.$ac_ext
1565 if { (eval echo configure:1566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1566 for ac_file in conftest.*; do
1567 case $ac_file in
1568 *.c) ;;
1569 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1570 esac
1571 done
1572 else
1573 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1575 rm -f conftest*
1578 echo "$ac_t""$ac_cv_objext" 1>&6
1579 OBJEXT=$ac_cv_objext
1580 ac_objext=$ac_cv_objext
1584 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1585 echo "configure:1586: checking for executable suffix" >&5
1586 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1587 echo $ac_n "(cached) $ac_c" 1>&6
1588 else
1589 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1590 ac_cv_exeext=.exe
1591 else
1592 rm -f conftest*
1593 echo 'int main () { return 0; }' > conftest.$ac_ext
1594 ac_cv_exeext=
1595 if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1596 for file in conftest.*; do
1597 case $file in
1598 *.c | *.o | *.obj) ;;
1599 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1600 esac
1601 done
1602 else
1603 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1605 rm -f conftest*
1606 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1610 EXEEXT=""
1611 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1612 echo "$ac_t""${ac_cv_exeext}" 1>&6
1613 ac_exeext=$EXEEXT
1615 if test $host != $build; then
1616 ac_tool_prefix=${host_alias}-
1617 else
1618 ac_tool_prefix=
1621 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1623 # Only perform the check for file, if the check method requires it
1624 case "$deplibs_check_method" in
1625 file_magic*)
1626 if test "$file_magic_cmd" = '${MAGIC}'; then
1627 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
1628 echo "configure:1629: checking for ${ac_tool_prefix}file" >&5
1629 if eval "test \"`echo '$''{'lt_cv_path_MAGIC'+set}'`\" = set"; then
1630 echo $ac_n "(cached) $ac_c" 1>&6
1631 else
1632 case "$MAGIC" in
1634 lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
1636 ?:/*)
1637 ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
1640 ac_save_MAGIC="$MAGIC"
1641 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1642 ac_dummy="/usr/bin:$PATH"
1643 for ac_dir in $ac_dummy; do
1644 test -z "$ac_dir" && ac_dir=.
1645 if test -f $ac_dir/${ac_tool_prefix}file; then
1646 lt_cv_path_MAGIC="$ac_dir/${ac_tool_prefix}file"
1647 if test -n "$file_magic_test_file"; then
1648 case "$deplibs_check_method" in
1649 "file_magic "*)
1650 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1651 MAGIC="$lt_cv_path_MAGIC"
1652 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1653 egrep "$file_magic_regex" > /dev/null; then
1655 else
1656 cat <<EOF 1>&2
1658 *** Warning: the command libtool uses to detect shared libraries,
1659 *** $file_magic_cmd, produces output that libtool cannot recognize.
1660 *** The result is that libtool may fail to recognize shared libraries
1661 *** as such. This will affect the creation of libtool libraries that
1662 *** depend on shared libraries, but programs linked with such libtool
1663 *** libraries will work regardless of this problem. Nevertheless, you
1664 *** may want to report the problem to your system manager and/or to
1665 *** bug-libtool@gnu.org
1668 fi ;;
1669 esac
1671 break
1673 done
1674 IFS="$ac_save_ifs"
1675 MAGIC="$ac_save_MAGIC"
1677 esac
1680 MAGIC="$lt_cv_path_MAGIC"
1681 if test -n "$MAGIC"; then
1682 echo "$ac_t""$MAGIC" 1>&6
1683 else
1684 echo "$ac_t""no" 1>&6
1687 if test -z "$lt_cv_path_MAGIC"; then
1688 if test -n "$ac_tool_prefix"; then
1689 echo $ac_n "checking for file""... $ac_c" 1>&6
1690 echo "configure:1691: checking for file" >&5
1691 if eval "test \"`echo '$''{'lt_cv_path_MAGIC'+set}'`\" = set"; then
1692 echo $ac_n "(cached) $ac_c" 1>&6
1693 else
1694 case "$MAGIC" in
1696 lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
1698 ?:/*)
1699 ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
1702 ac_save_MAGIC="$MAGIC"
1703 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1704 ac_dummy="/usr/bin:$PATH"
1705 for ac_dir in $ac_dummy; do
1706 test -z "$ac_dir" && ac_dir=.
1707 if test -f $ac_dir/file; then
1708 lt_cv_path_MAGIC="$ac_dir/file"
1709 if test -n "$file_magic_test_file"; then
1710 case "$deplibs_check_method" in
1711 "file_magic "*)
1712 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1713 MAGIC="$lt_cv_path_MAGIC"
1714 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1715 egrep "$file_magic_regex" > /dev/null; then
1717 else
1718 cat <<EOF 1>&2
1720 *** Warning: the command libtool uses to detect shared libraries,
1721 *** $file_magic_cmd, produces output that libtool cannot recognize.
1722 *** The result is that libtool may fail to recognize shared libraries
1723 *** as such. This will affect the creation of libtool libraries that
1724 *** depend on shared libraries, but programs linked with such libtool
1725 *** libraries will work regardless of this problem. Nevertheless, you
1726 *** may want to report the problem to your system manager and/or to
1727 *** bug-libtool@gnu.org
1730 fi ;;
1731 esac
1733 break
1735 done
1736 IFS="$ac_save_ifs"
1737 MAGIC="$ac_save_MAGIC"
1739 esac
1742 MAGIC="$lt_cv_path_MAGIC"
1743 if test -n "$MAGIC"; then
1744 echo "$ac_t""$MAGIC" 1>&6
1745 else
1746 echo "$ac_t""no" 1>&6
1749 else
1750 MAGIC=:
1756 esac
1758 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1759 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1761 echo "configure:1762: checking for $ac_word" >&5
1762 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1764 else
1765 if test -n "$RANLIB"; then
1766 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1767 else
1768 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1769 ac_dummy="$PATH"
1770 for ac_dir in $ac_dummy; do
1771 test -z "$ac_dir" && ac_dir=.
1772 if test -f $ac_dir/$ac_word; then
1773 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1774 break
1776 done
1777 IFS="$ac_save_ifs"
1780 RANLIB="$ac_cv_prog_RANLIB"
1781 if test -n "$RANLIB"; then
1782 echo "$ac_t""$RANLIB" 1>&6
1783 else
1784 echo "$ac_t""no" 1>&6
1788 if test -z "$ac_cv_prog_RANLIB"; then
1789 if test -n "$ac_tool_prefix"; then
1790 # Extract the first word of "ranlib", so it can be a program name with args.
1791 set dummy ranlib; ac_word=$2
1792 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1793 echo "configure:1794: checking for $ac_word" >&5
1794 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1795 echo $ac_n "(cached) $ac_c" 1>&6
1796 else
1797 if test -n "$RANLIB"; then
1798 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1799 else
1800 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1801 ac_dummy="$PATH"
1802 for ac_dir in $ac_dummy; do
1803 test -z "$ac_dir" && ac_dir=.
1804 if test -f $ac_dir/$ac_word; then
1805 ac_cv_prog_RANLIB="ranlib"
1806 break
1808 done
1809 IFS="$ac_save_ifs"
1810 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1813 RANLIB="$ac_cv_prog_RANLIB"
1814 if test -n "$RANLIB"; then
1815 echo "$ac_t""$RANLIB" 1>&6
1816 else
1817 echo "$ac_t""no" 1>&6
1820 else
1821 RANLIB=":"
1825 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1826 set dummy ${ac_tool_prefix}strip; ac_word=$2
1827 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1828 echo "configure:1829: checking for $ac_word" >&5
1829 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1830 echo $ac_n "(cached) $ac_c" 1>&6
1831 else
1832 if test -n "$STRIP"; then
1833 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1834 else
1835 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1836 ac_dummy="$PATH"
1837 for ac_dir in $ac_dummy; do
1838 test -z "$ac_dir" && ac_dir=.
1839 if test -f $ac_dir/$ac_word; then
1840 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1841 break
1843 done
1844 IFS="$ac_save_ifs"
1847 STRIP="$ac_cv_prog_STRIP"
1848 if test -n "$STRIP"; then
1849 echo "$ac_t""$STRIP" 1>&6
1850 else
1851 echo "$ac_t""no" 1>&6
1855 if test -z "$ac_cv_prog_STRIP"; then
1856 if test -n "$ac_tool_prefix"; then
1857 # Extract the first word of "strip", so it can be a program name with args.
1858 set dummy strip; ac_word=$2
1859 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1860 echo "configure:1861: checking for $ac_word" >&5
1861 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863 else
1864 if test -n "$STRIP"; then
1865 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1866 else
1867 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1868 ac_dummy="$PATH"
1869 for ac_dir in $ac_dummy; do
1870 test -z "$ac_dir" && ac_dir=.
1871 if test -f $ac_dir/$ac_word; then
1872 ac_cv_prog_STRIP="strip"
1873 break
1875 done
1876 IFS="$ac_save_ifs"
1877 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1880 STRIP="$ac_cv_prog_STRIP"
1881 if test -n "$STRIP"; then
1882 echo "$ac_t""$STRIP" 1>&6
1883 else
1884 echo "$ac_t""no" 1>&6
1887 else
1888 STRIP=":"
1893 # Check for any special flags to pass to ltconfig.
1894 libtool_flags="--cache-file=$cache_file"
1895 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1896 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1897 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1898 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1899 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1902 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1903 if test "${enable_libtool_lock+set}" = set; then
1904 enableval="$enable_libtool_lock"
1908 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1909 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1911 # Check whether --with-pic or --without-pic was given.
1912 if test "${with_pic+set}" = set; then
1913 withval="$with_pic"
1914 pic_mode="$withval"
1915 else
1916 pic_mode=default
1919 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
1920 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
1922 # Some flags need to be propagated to the compiler or linker for good
1923 # libtool support.
1924 case "$host" in
1925 *-*-irix6*)
1926 # Find out which ABI we are using.
1927 echo '#line 1928 "configure"' > conftest.$ac_ext
1928 if { (eval echo configure:1929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1929 case "`/usr/bin/file conftest.o`" in
1930 *32-bit*)
1931 LD="${LD-ld} -32"
1933 *N32*)
1934 LD="${LD-ld} -n32"
1936 *64-bit*)
1937 LD="${LD-ld} -64"
1939 esac
1941 rm -rf conftest*
1944 *-*-sco3.2v5*)
1945 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1946 SAVE_CFLAGS="$CFLAGS"
1947 CFLAGS="$CFLAGS -belf"
1948 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1949 echo "configure:1950: checking whether the C compiler needs -belf" >&5
1950 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1951 echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1954 ac_ext=c
1955 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1956 ac_cpp='$CPP $CPPFLAGS'
1957 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1958 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1959 cross_compiling=$ac_cv_prog_cc_cross
1961 cat > conftest.$ac_ext <<EOF
1962 #line 1963 "configure"
1963 #include "confdefs.h"
1965 int main() {
1967 ; return 0; }
1969 if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1970 rm -rf conftest*
1971 lt_cv_cc_needs_belf=yes
1972 else
1973 echo "configure: failed program was:" >&5
1974 cat conftest.$ac_ext >&5
1975 rm -rf conftest*
1976 lt_cv_cc_needs_belf=no
1978 rm -f conftest*
1979 ac_ext=c
1980 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1981 ac_cpp='$CPP $CPPFLAGS'
1982 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1983 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1984 cross_compiling=$ac_cv_prog_cc_cross
1988 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1989 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1990 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1991 CFLAGS="$SAVE_CFLAGS"
1996 esac
1999 # Save cache, so that ltconfig can load it
2000 cat > confcache <<\EOF
2001 # This file is a shell script that caches the results of configure
2002 # tests run on this system so they can be shared between configure
2003 # scripts and configure runs. It is not useful on other systems.
2004 # If it contains results you don't want to keep, you may remove or edit it.
2006 # By default, configure uses ./config.cache as the cache file,
2007 # creating it if it does not exist already. You can give configure
2008 # the --cache-file=FILE option to use a different cache file; that is
2009 # what configure does when it calls configure scripts in
2010 # subdirectories, so they share the cache.
2011 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2012 # config.status only pays attention to the cache file if you give it the
2013 # --recheck option to rerun configure.
2016 # The following way of writing the cache mishandles newlines in values,
2017 # but we know of no workaround that is simple, portable, and efficient.
2018 # So, don't put newlines in cache variables' values.
2019 # Ultrix sh set writes to stderr and can't be redirected directly,
2020 # and sets the high bit in the cache file unless we assign to the vars.
2021 (set) 2>&1 |
2022 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2023 *ac_space=\ *)
2024 # `set' does not quote correctly, so add quotes (double-quote substitution
2025 # turns \\\\ into \\, and sed turns \\ into \).
2026 sed -n \
2027 -e "s/'/'\\\\''/g" \
2028 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2031 # `set' quotes correctly as required by POSIX, so do not add quotes.
2032 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2034 esac >> confcache
2035 if cmp -s $cache_file confcache; then
2037 else
2038 if test -w $cache_file; then
2039 echo "updating cache $cache_file"
2040 cat confcache > $cache_file
2041 else
2042 echo "not updating unwritable cache $cache_file"
2045 rm -f confcache
2048 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2049 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2050 MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2051 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2052 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2053 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2054 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2055 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2056 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2057 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2059 # Reload cache, that may have been modified by ltconfig
2060 if test -r "$cache_file"; then
2061 echo "loading cache $cache_file"
2062 . $cache_file
2063 else
2064 echo "creating cache $cache_file"
2065 > $cache_file
2069 # This can be used to rebuild libtool when needed
2070 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2072 # Always use our own libtool.
2073 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2075 # Redirect the config.log output again, so that the ltconfig log is not
2076 # clobbered by the next message.
2077 exec 5>>./config.log
2085 user_bfd_gas=
2086 # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
2087 if test "${enable_bfd_assembler+set}" = set; then
2088 enableval="$enable_bfd_assembler"
2089 case "${enableval}" in
2090 yes) need_bfd=yes user_bfd_gas=yes ;;
2091 no) user_bfd_gas=no ;;
2092 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
2093 esac
2095 # Check whether --enable-targets or --disable-targets was given.
2096 if test "${enable_targets+set}" = set; then
2097 enableval="$enable_targets"
2098 case "${enableval}" in
2099 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
2101 no) enable_targets= ;;
2102 *) enable_targets=$enableval ;;
2103 esac
2105 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
2106 if test "${enable_commonbfdlib+set}" = set; then
2107 enableval="$enable_commonbfdlib"
2108 case "${enableval}" in
2109 yes) commonbfdlib=true ;;
2110 no) commonbfdlib=false ;;
2111 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
2112 esac
2115 using_cgen=no
2117 build_warnings="-W -Wall"
2118 # Check whether --enable-build-warnings or --disable-build-warnings was given.
2119 if test "${enable_build_warnings+set}" = set; then
2120 enableval="$enable_build_warnings"
2121 case "${enableval}" in
2122 yes) ;;
2123 no) build_warnings="-w";;
2124 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2125 build_warnings="${build_warnings} ${t}";;
2126 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2127 build_warnings="${t} ${build_warnings}";;
2128 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
2129 esac
2130 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
2131 echo "Setting warning flags = $build_warnings" 6>&1
2134 WARN_CFLAGS=""
2135 if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
2136 WARN_CFLAGS="${build_warnings}"
2140 # Generate a header file
2145 # If we are on a DOS filesystem, we must use gdb.ini rather than
2146 # .gdbinit.
2147 GDBINIT=".gdbinit"
2148 case "${host}" in
2149 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
2150 GDBINIT="gdb.ini"
2152 esac
2155 te_file=generic
2157 # Makefile target for installing gas in $(tooldir)/bin.
2158 install_tooldir=install-exec-tooldir
2160 canon_targets=""
2161 all_targets=no
2162 if test -n "$enable_targets" ; then
2163 for t in `echo $enable_targets | sed 's/,/ /g'`; do
2164 if test $t = "all"; then
2165 all_targets=yes
2166 continue
2168 result=`$ac_config_sub $t 2>/dev/null`
2169 if test -n "$result" ; then
2170 canon_targets="$canon_targets $result"
2171 # else
2172 # # Permit "all", etc. We don't support it yet though.
2173 # canon_targets="$canon_targets $t"
2175 done
2176 _gas_uniq_list="$canon_targets"
2177 _gas_uniq_newlist=""
2178 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2179 case $_gas_uniq_i in
2180 _gas_uniq_dummy) ;;
2181 *) case " $_gas_uniq_newlist " in
2182 *" $_gas_uniq_i "*) ;;
2183 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2184 esac ;;
2185 esac
2186 done
2187 canon_targets=$_gas_uniq_newlist
2191 emulations=""
2193 for this_target in $target $canon_targets ; do
2195 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
2197 # check for architecture variants
2198 arch=
2199 endian=
2200 case ${cpu} in
2201 alpha*) cpu_type=alpha ;;
2202 armeb) cpu_type=arm endian=big ;;
2203 arm*) cpu_type=arm endian=little ;;
2204 armb*) cpu_type=arm endian=little ;;
2205 armv*l) cpu_type=arm endian=little ;;
2206 armv*b) cpu_type=arm endian=big ;;
2207 strongarm*) cpu_type=arm endian=little ;;
2208 thumb*) cpu_type=arm endian=little ;;
2209 hppa*) cpu_type=hppa ;;
2210 i[456]86) cpu_type=i386 ;;
2211 ia64) cpu_type=ia64 ;;
2212 m6811|m6812) cpu_type=m68hc11 ;;
2213 m680[012346]0) cpu_type=m68k ;;
2214 m68008) cpu_type=m68k ;;
2215 m683??) cpu_type=m68k ;;
2216 m5200) cpu_type=m68k ;;
2217 m8*) cpu_type=m88k ;;
2218 mips*el) cpu_type=mips endian=little ;;
2219 mips*) cpu_type=mips endian=big ;;
2220 pjl*) cpu_type=pj endian=little ;;
2221 pj*) cpu_type=pj endian=big ;;
2222 powerpcle*) cpu_type=ppc endian=little ;;
2223 powerpc*) cpu_type=ppc endian=big ;;
2224 rs6000*) cpu_type=ppc ;;
2225 sparclite*) cpu_type=sparc arch=sparclite ;;
2226 sparclet*) cpu_type=sparc arch=sparclet ;;
2227 sparc64*) cpu_type=sparc arch=v9-64 ;;
2228 sparc86x*) cpu_type=sparc arch=sparc86x ;;
2229 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
2230 v850*) cpu_type=v850 ;;
2231 *) cpu_type=${cpu} ;;
2232 esac
2234 if test ${this_target} = $target ; then
2235 target_cpu_type=${cpu_type}
2236 elif test ${target_cpu_type} != ${cpu_type} ; then
2237 continue
2240 generic_target=${cpu_type}-$vendor-$os
2241 dev=no
2242 bfd_gas=no
2243 em=generic
2245 # assign object format
2246 case ${generic_target} in
2247 a29k-*-coff) fmt=coff ;;
2248 a29k-amd-udi) fmt=coff ;;
2249 a29k-amd-ebmon) fmt=coff ;;
2250 a29k-nyu-sym1) fmt=coff ;;
2251 a29k-*-vxworks*) fmt=coff ;;
2253 alpha*-*-*vms*) fmt=evax ;;
2254 alpha*-*-netware*) fmt=ecoff ;;
2255 alpha*-*-openbsd*) fmt=ecoff ;;
2256 alpha*-*-osf*) fmt=ecoff ;;
2257 alpha*-*-linuxecoff*) fmt=ecoff ;;
2258 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
2259 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
2261 arc-*-elf*) fmt=elf bfd_gas=yes ;;
2263 arm-*-aout) fmt=aout ;;
2264 arm-*-coff | thumb-*-coff) fmt=coff ;;
2265 arm-*-elf | thumb-*-elf) fmt=elf ;;
2266 arm*-*-conix*) fmt=elf ;;
2267 arm-*-linux*aout*) fmt=aout em=linux ;;
2268 arm*-*-linux-gnu*) fmt=elf em=linux ;;
2269 arm-*-netbsd*) fmt=aout em=nbsd ;;
2270 arm-*-oabi | thumb-*-oabi) fmt=elf ;;
2271 arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
2272 arm-*-wince) fmt=coff em=wince-pe ;;
2273 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
2274 arm-*-riscix*) fmt=aout em=riscix ;;
2276 avr-*-*) fmt=elf bfd_gas=yes ;;
2278 cris-*-*) fmt=multi bfd_gas=yes ;;
2280 d10v-*-*) fmt=elf bfd_gas=yes ;;
2281 d30v-*-*) fmt=elf bfd_gas=yes ;;
2284 fr30-*-*) fmt=elf bfd_gas=yes ;;
2286 hppa-*-linux-gnu*) case ${cpu} in
2287 hppa*64*)
2288 fmt=elf em=hppalinux64;;
2289 hppa*)
2290 fmt=elf em=linux;;
2291 esac ;;
2292 hppa-*-*elf*) fmt=elf em=hppa ;;
2293 hppa-*-lites*) fmt=elf em=hppa ;;
2294 hppa-*-osf*) fmt=som em=hppa ;;
2295 hppa-*-rtems*) fmt=elf em=hppa ;;
2296 hppa-*-hpux11*) case ${cpu} in
2297 hppa*64*)
2298 fmt=elf em=hppa64 ;;
2299 hppa*)
2300 fmt=som em=hppa ;;
2301 esac ;;
2302 hppa-*-hpux*) fmt=som em=hppa ;;
2303 hppa-*-mpeix*) fmt=som em=hppa ;;
2304 hppa-*-bsd*) fmt=som em=hppa ;;
2305 hppa-*-hiux*) fmt=som em=hppa ;;
2307 h8300-*-coff) fmt=coff ;;
2309 i370-*-elf* | i370-*-linux*) fmt=elf ;;
2310 i386-ibm-aix*) fmt=coff em=i386aix ;;
2311 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
2312 i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
2313 i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
2314 i386-*-bsd*) fmt=aout em=386bsd ;;
2315 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
2316 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
2317 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
2318 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
2319 i386-*-linux*coff*) fmt=coff em=linux ;;
2320 i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
2321 i386-*-lynxos*) fmt=coff em=lynx ;;
2322 i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf)
2323 fmt=elf bfd_gas=yes ;;
2324 i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12])
2325 fmt=aout em=386bsd ;;
2326 i386-*-freebsd*) fmt=elf bfd_gas=yes ;;
2327 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
2328 fmt=coff ;;
2329 i386-*-sco3.2v5*) fmt=elf
2330 if test ${this_target} = $target; then
2331 cat >> confdefs.h <<\EOF
2332 #define SCO_ELF 1
2337 i386-*-sco3.2*) fmt=coff ;;
2338 i386-*-vsta) fmt=aout ;;
2339 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
2340 fmt=coff em=go32
2341 cat >> confdefs.h <<\EOF
2342 #define STRICTCOFF 1
2346 i386-*-rtemself*) fmt=elf ;;
2347 i386-*-rtems*) fmt=coff ;;
2348 i386-*-gnu*) fmt=elf ;;
2349 i386-*-mach*)
2350 fmt=aout em=mach bfd_gas=yes ;;
2351 i386-*-msdos*) fmt=aout ;;
2352 i386-*-moss*) fmt=elf ;;
2353 i386-*-pe) fmt=coff em=pe bfd_gas=yes ;;
2354 i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
2355 i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;;
2356 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
2357 i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;;
2358 i386-*-vxworks*) fmt=aout ;;
2359 i860-stardent-sysv4* | i860-stardent-elf*)
2360 fmt=elf bfd_gas=yes endian=little
2361 echo "configure: warning: GAS support for ${generic_target} is preliminary and a work in progress" 1>&2 ;;
2362 i960-*-bout) fmt=bout ;;
2363 i960-*-coff) fmt=coff em=ic960 ;;
2364 i960-*-rtems*) fmt=coff em=ic960 ;;
2365 i960-*-nindy*) fmt=bout ;;
2366 i960-*-vxworks4*) fmt=bout ;;
2367 i960-*-vxworks5.0) fmt=bout ;;
2368 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
2369 i960-*-vxworks*) fmt=bout ;;
2370 i960-*-elf*) fmt=elf ;;
2372 ia64-*-elf*) fmt=elf ;;
2373 ia64-*-linux-gnu*) fmt=elf em=linux ;;
2375 m32r-*-*) fmt=elf bfd_gas=yes ;;
2377 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;;
2379 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
2380 fmt=aout em=sun3 ;;
2381 m68k-motorola-sysv*) fmt=coff em=delta ;;
2382 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
2383 m68k-apollo-*) fmt=coff em=apollo ;;
2384 m68k-*-sysv4*) # must be before -sysv*
2385 fmt=elf em=svr4 ;;
2386 m68k-*-elf*) fmt=elf ;;
2387 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
2388 fmt=coff ;;
2389 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
2390 m68k-*-linux*aout*) fmt=aout em=linux ;;
2391 m68k-*-linux-gnu*) fmt=elf em=linux ;;
2392 m68k-*-gnu*) fmt=elf ;;
2393 m68k-*-lynxos*) fmt=coff em=lynx ;;
2394 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
2395 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
2396 m68k-apple-aux*) fmt=coff em=aux ;;
2397 m68k-*-psos*) fmt=elf em=psos;;
2399 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
2400 m88k-*-coff*) fmt=coff ;;
2402 mcore-*-elf) fmt=elf bfd_gas=yes ;;
2403 mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
2405 # don't change em like *-*-bsd does
2406 mips-dec-netbsd*) fmt=elf endian=little ;;
2407 mips-dec-openbsd*) fmt=elf endian=little ;;
2408 mips-dec-bsd*) fmt=aout endian=little ;;
2409 mips-sony-bsd*) fmt=ecoff ;;
2410 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
2411 mips-*-ultrix*) fmt=ecoff endian=little ;;
2412 mips-*-osf*) fmt=ecoff endian=little ;;
2413 mips-*-ecoff*) fmt=ecoff ;;
2414 mips-*-ecoff*) fmt=ecoff ;;
2415 mips-*-pe*) fmt=coff endian=little em=pe ;;
2416 mips-*-irix6*) fmt=elf ;;
2417 mips-*-irix5*) fmt=elf ;;
2418 mips-*-irix*) fmt=ecoff ;;
2419 mips-*-lnews*) fmt=ecoff em=lnews ;;
2420 mips-*-riscos*) fmt=ecoff ;;
2421 mips-*-sysv4*MP*) fmt=elf em=tmips ;;
2422 mips-*-sysv*) fmt=ecoff ;;
2423 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
2424 fmt=elf ;;
2425 mips-*-vxworks*) fmt=elf
2426 cat >> confdefs.h <<\EOF
2427 #define MIPS_STABS_ELF 1
2431 mn10200-*-*) fmt=elf bfd_gas=yes ;;
2432 mn10300-*-*) fmt=elf bfd_gas=yes ;;
2433 pj*) fmt=elf ;;
2434 ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
2435 fmt=coff em=pe ;;
2436 ppc-*-aix*) fmt=coff ;;
2437 ppc-*-beos*) fmt=coff ;;
2438 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
2439 fmt=elf ;;
2440 ppc-*-linux-gnu*) fmt=elf
2441 case "$endian" in
2442 big) ;;
2443 *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
2444 esac
2446 ppc-*-solaris*) fmt=elf
2447 if test ${this_target} = $target; then
2448 cat >> confdefs.h <<\EOF
2449 #define TARGET_SOLARIS_COMMENT 1
2453 if test x${endian} = xbig; then
2454 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
2457 ppc-*-rtems*) fmt=elf ;;
2458 ppc-*-macos* | ppc-*-mpw*)
2459 fmt=coff em=macos ;;
2460 ppc-*-netware*) fmt=elf em=ppcnw ;;
2461 ppc-*-vxworks*) fmt=elf ;;
2463 sh-*-linux*) fmt=elf em=linux ;;
2464 sh-*-elf*) fmt=elf ;;
2465 sh-*-coff*) fmt=coff ;;
2466 sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
2467 sh-*-rtemself*) fmt=elf ;;
2468 sh-*-rtems*) fmt=coff ;;
2470 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
2471 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
2472 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
2474 sparc-*-rtems*) fmt=aout ;;
2475 sparc-*-sunos4*) fmt=aout em=sun3 ;;
2476 sparc-*-aout | sparc*-*-vxworks*)
2477 fmt=aout em=sparcaout ;;
2478 sparc-*-coff) fmt=coff ;;
2479 sparc-*-linux*aout*) fmt=aout em=linux ;;
2480 sparc-*-linux-gnu*) fmt=elf em=linux ;;
2481 sparc-*-lynxos*) fmt=coff em=lynx ;;
2482 sparc-fujitsu-none) fmt=aout ;;
2483 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
2484 fmt=elf ;;
2485 sparc-*-netbsd*) em=nbsd bfd_gas=yes
2486 case ${cpu} in
2487 sparc) case ${os} in
2488 *elf*) fmt=elf ;;
2489 *) fmt=aout ;;
2490 esac ;;
2491 sparc64) fmt=elf ;;
2492 esac
2494 sparc-*-openbsd*) fmt=aout em=nbsd ;;
2496 strongarm-*-coff) fmt=coff ;;
2497 strongarm-*-elf) fmt=elf ;;
2499 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
2500 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
2501 tic54x-*-* | c54x*-*-*)
2502 fmt=coff bfd_gas=yes need_libm=yes;;
2503 tic80-*-*) fmt=coff ;;
2505 v850-*-*) fmt=elf bfd_gas=yes ;;
2506 v850e-*-*) fmt=elf bfd_gas=yes ;;
2507 v850ea-*-*) fmt=elf bfd_gas=yes ;;
2509 vax-*-bsd* | vax-*-ultrix*)
2510 fmt=aout ;;
2511 vax-*-vms) fmt=vms ;;
2514 z8k-*-coff | z8k-*-sim)
2515 fmt=coff ;;
2517 w65-*-*) fmt=coff ;;
2519 *-*-aout | *-*-scout)
2520 fmt=aout ;;
2521 *-*-nindy*)
2522 fmt=bout ;;
2523 *-*-bsd*)
2524 fmt=aout em=sun3 ;;
2525 *-*-generic) fmt=generic ;;
2526 *-*-xray | *-*-hms) fmt=coff ;;
2527 *-*-sim) fmt=coff ;;
2528 *-*-elf | *-*-sysv4* | *-*-solaris*)
2529 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
2530 fmt=elf dev=yes ;;
2531 *-*-vxworks) fmt=aout ;;
2532 *-*-netware) fmt=elf ;;
2533 esac
2535 if test ${this_target} = $target ; then
2536 endian_def=
2537 if test x${endian} = xbig; then
2538 endian_def=1
2539 elif test x${endian} = xlittle; then
2540 endian_def=0
2542 if test x${endian_def} != x; then
2543 cat >> confdefs.h <<EOF
2544 #define TARGET_BYTES_BIG_ENDIAN $endian_def
2550 case ${cpu_type}-${fmt} in
2551 alpha*-*) bfd_gas=yes ;;
2552 arm-*) bfd_gas=yes ;;
2553 # not yet
2554 # i386-aout) bfd_gas=preferred ;;
2555 ia64*-*) bfd_gas=yes ;;
2556 mips-*) bfd_gas=yes ;;
2557 ns32k-*) bfd_gas=yes ;;
2558 ppc-*) bfd_gas=yes ;;
2559 sparc-*) bfd_gas=yes ;;
2560 strongarm-*) bfd_gas=yes ;;
2561 *-elf) bfd_gas=yes ;;
2562 *-ecoff) bfd_gas=yes ;;
2563 *-som) bfd_gas=yes ;;
2564 #enable bfd for coff and aout to allow testing if a bfd target is
2565 #the primary target, but not for coff or aout as the primary target
2566 i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
2567 i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
2568 *) ;;
2569 esac
2571 # Other random stuff.
2573 # Do we need the opcodes library?
2574 case ${cpu_type} in
2575 vax | i386 | tic30)
2579 need_opcodes=yes
2581 case "${enable_shared}" in
2582 yes) shared_opcodes=true ;;
2583 *opcodes*) shared_opcodes=true ;;
2584 *) shared_opcodes=false ;;
2585 esac
2586 if test "${shared_opcodes}" = "true"; then
2587 # A shared libopcodes must be linked against libbfd.
2588 need_bfd=yes
2591 esac
2593 # Any other special object files needed ?
2594 case ${cpu_type} in
2595 fr30 | m32r)
2596 using_cgen=yes
2599 m68k)
2600 case ${extra_objects} in
2601 *m68k-parse.o*) ;;
2602 *) extra_objects="$extra_objects m68k-parse.o" ;;
2603 esac
2606 mips)
2607 echo ${extra_objects} | grep -s "itbl-parse.o"
2608 if test $? -ne 0 ; then
2609 extra_objects="$extra_objects itbl-parse.o"
2612 echo ${extra_objects} | grep -s "itbl-lex.o"
2613 if test $? -ne 0 ; then
2614 extra_objects="$extra_objects itbl-lex.o"
2617 echo ${extra_objects} | grep -s "itbl-ops.o"
2618 if test $? -ne 0 ; then
2619 extra_objects="$extra_objects itbl-ops.o"
2623 sparc)
2624 if test $this_target = $target ; then
2625 cat >> confdefs.h <<EOF
2626 #define DEFAULT_ARCH "${arch}"
2633 esac
2635 if test $using_cgen = yes ; then
2636 case "x${extra_objects}" in
2637 *cgen.o*) ;;
2638 *) extra_objects="$extra_objects cgen.o" ;;
2639 esac
2642 # See if we really can support this configuration with the emulation code.
2644 if test $this_target = $target ; then
2645 primary_bfd_gas=$bfd_gas
2646 obj_format=$fmt
2647 te_file=$em
2649 if test $bfd_gas = no ; then
2650 # Can't support other configurations this way.
2651 break
2653 elif test $bfd_gas = no ; then
2654 # Can't support this configuration.
2655 break
2658 # From target name and format, produce a list of supported emulations.
2660 case ${generic_target}-${fmt} in
2661 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2662 mips-*-linux-gnu*-*) case "$endian" in
2663 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2664 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
2665 esac ;;
2666 mips-*-lnews*-ecoff) ;;
2667 mips-*-*-ecoff) case "$endian" in
2668 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
2669 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
2670 esac ;;
2671 mips-*-*-elf) case "$endian" in
2672 big) emulation="mipsbelf mipslelf mipself" ;;
2673 *) emulation="mipslelf mipsbelf mipself" ;;
2674 esac ;;
2675 mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2676 # i386-pc-pe-coff != i386-pc-coff.
2677 i386-*-pe-coff) ;;
2678 # Uncommenting the next line will turn on support for i386 AOUT
2679 # for the default linux configuration
2680 # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
2682 i386-*-aout) emulation="i386aout" ;;
2683 i386-*-coff) emulation="i386coff" ;;
2684 i386-*-elf) emulation="i386elf" ;;
2686 # Always all formats. Having a.out first makes it the default.
2687 cris-*-*) emulation="crisaout criself" ;;
2688 esac
2690 emulations="$emulations $emulation"
2692 done
2694 # Turn on all targets if possible
2695 if test ${all_targets} = "yes"; then
2696 case ${target_cpu_type} in
2697 i386)
2698 case ${obj_format} in
2699 aout)
2700 emulations="$emulations i386coff i386elf"
2702 coff)
2703 emulations="$emulations i386aout i386elf"
2705 elf)
2706 emulations="$emulations i386aout i386coff"
2708 esac
2710 esac
2713 # Assign floating point type. Most processors with FP support
2714 # IEEE FP. On those that don't support FP at all, usually IEEE
2715 # is emulated.
2716 case ${target_cpu} in
2717 vax | tahoe ) atof=${target_cpu} ;;
2718 *) atof=ieee ;;
2719 esac
2721 case "${obj_format}" in
2722 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
2723 esac
2725 # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
2726 cgen_cpu_prefix=""
2727 if test $using_cgen = yes ; then
2728 case ${target_cpu} in
2729 *) cgen_cpu_prefix=${target_cpu} ;;
2730 esac
2732 cat >> confdefs.h <<\EOF
2733 #define USING_CGEN 1
2739 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
2740 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
2743 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
2744 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
2747 case ${user_bfd_gas}-${primary_bfd_gas} in
2748 yes-yes | no-no)
2749 # We didn't override user's choice.
2751 no-yes)
2752 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
2754 no-preferred)
2755 primary_bfd_gas=no
2757 *-preferred)
2758 primary_bfd_gas=yes
2760 yes-*)
2761 primary_bfd_gas=yes
2764 # User specified nothing.
2766 esac
2768 # Some COFF configurations want these random other flags set.
2769 case ${obj_format} in
2770 coff)
2771 case ${target_cpu_type} in
2772 i386) cat >> confdefs.h <<\EOF
2773 #define I386COFF 1
2776 m68k) cat >> confdefs.h <<\EOF
2777 #define M68KCOFF 1
2780 m88k) cat >> confdefs.h <<\EOF
2781 #define M88KCOFF 1
2784 esac
2786 esac
2788 # Getting this done right is going to be a bitch. Each configuration specified
2789 # with --enable-targets=... should be checked for environment, format, cpu, and
2790 # bfd_gas setting.
2792 # For each configuration, the necessary object file support code must be linked
2793 # in. This might be only one, it might be up to four. The necessary emulation
2794 # code needs to be provided, too.
2796 # And then there's "--enable-targets=all"....
2798 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
2800 formats="${obj_format}"
2801 emfiles=""
2802 EMULATIONS=""
2803 _gas_uniq_list="$emulations"
2804 _gas_uniq_newlist=""
2805 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2806 case $_gas_uniq_i in
2807 _gas_uniq_dummy) ;;
2808 *) case " $_gas_uniq_newlist " in
2809 *" $_gas_uniq_i "*) ;;
2810 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2811 esac ;;
2812 esac
2813 done
2814 emulations=$_gas_uniq_newlist
2816 for em in . $emulations ; do
2817 case $em in
2818 .) continue ;;
2819 mipsbelf | mipslelf)
2820 fmt=elf file=mipself ;;
2821 mipsbecoff | mipslecoff)
2822 fmt=ecoff file=mipsecoff ;;
2823 *coff)
2824 fmt=coff file=$em ;;
2825 *aout)
2826 fmt=aout file=$em ;;
2827 *elf)
2828 fmt=elf file=$em ;;
2829 esac
2830 formats="$formats $fmt"
2831 emfiles="$emfiles e-$file.o"
2832 EMULATIONS="$EMULATIONS &$em,"
2833 done
2834 _gas_uniq_list="$formats"
2835 _gas_uniq_newlist=""
2836 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2837 case $_gas_uniq_i in
2838 _gas_uniq_dummy) ;;
2839 *) case " $_gas_uniq_newlist " in
2840 *" $_gas_uniq_i "*) ;;
2841 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2842 esac ;;
2843 esac
2844 done
2845 formats=$_gas_uniq_newlist
2847 _gas_uniq_list="$emfiles"
2848 _gas_uniq_newlist=""
2849 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2850 case $_gas_uniq_i in
2851 _gas_uniq_dummy) ;;
2852 *) case " $_gas_uniq_newlist " in
2853 *" $_gas_uniq_i "*) ;;
2854 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2855 esac ;;
2856 esac
2857 done
2858 emfiles=$_gas_uniq_newlist
2860 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
2861 for fmt in $formats ; do
2862 case $fmt in
2863 aout) cat >> confdefs.h <<\EOF
2864 #define OBJ_MAYBE_AOUT 1
2867 bout) cat >> confdefs.h <<\EOF
2868 #define OBJ_MAYBE_BOUT 1
2871 coff) cat >> confdefs.h <<\EOF
2872 #define OBJ_MAYBE_COFF 1
2875 ecoff) cat >> confdefs.h <<\EOF
2876 #define OBJ_MAYBE_ECOFF 1
2879 elf) cat >> confdefs.h <<\EOF
2880 #define OBJ_MAYBE_ELF 1
2883 generic) cat >> confdefs.h <<\EOF
2884 #define OBJ_MAYBE_GENERIC 1
2887 hp300) cat >> confdefs.h <<\EOF
2888 #define OBJ_MAYBE_HP300 1
2891 ieee) cat >> confdefs.h <<\EOF
2892 #define OBJ_MAYBE_IEEE 1
2895 som) cat >> confdefs.h <<\EOF
2896 #define OBJ_MAYBE_SOM 1
2899 vms) cat >> confdefs.h <<\EOF
2900 #define OBJ_MAYBE_VMS 1
2903 esac
2904 extra_objects="$extra_objects obj-$fmt.o"
2905 done
2906 obj_format=multi
2908 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
2909 DEFAULT_EMULATION=`set . $emulations ; echo $2`
2910 # e-mips* has more than one emulation per file, e-i386* has just one at the
2911 # moment. If only one emulation is specified, then don't define
2912 # USE_EMULATIONS or include any of the e-files as they will only be bloat.
2913 case "${obj_format}${emfiles}" in
2914 multi* | *mips*)
2915 extra_objects="$extra_objects $emfiles"
2916 cat >> confdefs.h <<\EOF
2917 #define USE_EMULATIONS 1
2920 esac
2923 cat >> confdefs.h <<EOF
2924 #define EMULATIONS $EMULATIONS
2927 cat >> confdefs.h <<EOF
2928 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
2932 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
2933 yes-*-coff) need_bfd=yes ;;
2934 no-*-coff) need_bfd=yes
2935 cat >> confdefs.h <<\EOF
2936 #define MANY_SEGMENTS 1
2939 esac
2941 reject_dev_configs=yes
2943 case ${reject_dev_configs}-${dev} in
2944 yes-yes) # Oops.
2945 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
2947 esac
2955 case "${primary_bfd_gas}" in
2956 yes) cat >> confdefs.h <<\EOF
2957 #define BFD_ASSEMBLER 1
2960 need_bfd=yes ;;
2961 esac
2963 # do we need the opcodes library?
2964 case "${need_opcodes}" in
2965 yes)
2966 OPCODES_LIB=../opcodes/libopcodes.la
2968 esac
2970 case "${need_bfd}" in
2971 yes)
2972 BFDLIB=../bfd/libbfd.la
2973 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
2975 esac
2982 cat >> confdefs.h <<EOF
2983 #define TARGET_ALIAS "${target_alias}"
2986 cat >> confdefs.h <<EOF
2987 #define TARGET_CANONICAL "${target}"
2990 cat >> confdefs.h <<EOF
2991 #define TARGET_CPU "${target_cpu}"
2994 cat >> confdefs.h <<EOF
2995 #define TARGET_VENDOR "${target_vendor}"
2998 cat >> confdefs.h <<EOF
2999 #define TARGET_OS "${target_os}"
3003 # Extract the first word of "gcc", so it can be a program name with args.
3004 set dummy gcc; ac_word=$2
3005 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3006 echo "configure:3007: checking for $ac_word" >&5
3007 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
3008 echo $ac_n "(cached) $ac_c" 1>&6
3009 else
3010 if test -n "$CC"; then
3011 ac_cv_prog_CC="$CC" # Let the user override the test.
3012 else
3013 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3014 ac_dummy="$PATH"
3015 for ac_dir in $ac_dummy; do
3016 test -z "$ac_dir" && ac_dir=.
3017 if test -f $ac_dir/$ac_word; then
3018 ac_cv_prog_CC="gcc"
3019 break
3021 done
3022 IFS="$ac_save_ifs"
3025 CC="$ac_cv_prog_CC"
3026 if test -n "$CC"; then
3027 echo "$ac_t""$CC" 1>&6
3028 else
3029 echo "$ac_t""no" 1>&6
3032 if test -z "$CC"; then
3033 # Extract the first word of "cc", so it can be a program name with args.
3034 set dummy cc; ac_word=$2
3035 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3036 echo "configure:3037: checking for $ac_word" >&5
3037 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
3038 echo $ac_n "(cached) $ac_c" 1>&6
3039 else
3040 if test -n "$CC"; then
3041 ac_cv_prog_CC="$CC" # Let the user override the test.
3042 else
3043 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3044 ac_prog_rejected=no
3045 ac_dummy="$PATH"
3046 for ac_dir in $ac_dummy; do
3047 test -z "$ac_dir" && ac_dir=.
3048 if test -f $ac_dir/$ac_word; then
3049 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3050 ac_prog_rejected=yes
3051 continue
3053 ac_cv_prog_CC="cc"
3054 break
3056 done
3057 IFS="$ac_save_ifs"
3058 if test $ac_prog_rejected = yes; then
3059 # We found a bogon in the path, so make sure we never use it.
3060 set dummy $ac_cv_prog_CC
3061 shift
3062 if test $# -gt 0; then
3063 # We chose a different compiler from the bogus one.
3064 # However, it has the same basename, so the bogon will be chosen
3065 # first if we set CC to just the basename; use the full file name.
3066 shift
3067 set dummy "$ac_dir/$ac_word" "$@"
3068 shift
3069 ac_cv_prog_CC="$@"
3074 CC="$ac_cv_prog_CC"
3075 if test -n "$CC"; then
3076 echo "$ac_t""$CC" 1>&6
3077 else
3078 echo "$ac_t""no" 1>&6
3081 if test -z "$CC"; then
3082 case "`uname -s`" in
3083 *win32* | *WIN32*)
3084 # Extract the first word of "cl", so it can be a program name with args.
3085 set dummy cl; ac_word=$2
3086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3087 echo "configure:3088: checking for $ac_word" >&5
3088 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
3089 echo $ac_n "(cached) $ac_c" 1>&6
3090 else
3091 if test -n "$CC"; then
3092 ac_cv_prog_CC="$CC" # Let the user override the test.
3093 else
3094 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3095 ac_dummy="$PATH"
3096 for ac_dir in $ac_dummy; do
3097 test -z "$ac_dir" && ac_dir=.
3098 if test -f $ac_dir/$ac_word; then
3099 ac_cv_prog_CC="cl"
3100 break
3102 done
3103 IFS="$ac_save_ifs"
3106 CC="$ac_cv_prog_CC"
3107 if test -n "$CC"; then
3108 echo "$ac_t""$CC" 1>&6
3109 else
3110 echo "$ac_t""no" 1>&6
3113 esac
3115 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3118 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3119 echo "configure:3120: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
3121 ac_ext=c
3122 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3123 ac_cpp='$CPP $CPPFLAGS'
3124 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3125 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3126 cross_compiling=$ac_cv_prog_cc_cross
3128 cat > conftest.$ac_ext << EOF
3130 #line 3131 "configure"
3131 #include "confdefs.h"
3133 main(){return(0);}
3135 if { (eval echo configure:3136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3136 ac_cv_prog_cc_works=yes
3137 # If we can't run a trivial program, we are probably using a cross compiler.
3138 if (./conftest; exit) 2>/dev/null; then
3139 ac_cv_prog_cc_cross=no
3140 else
3141 ac_cv_prog_cc_cross=yes
3143 else
3144 echo "configure: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3146 ac_cv_prog_cc_works=no
3148 rm -fr conftest*
3149 ac_ext=c
3150 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3151 ac_cpp='$CPP $CPPFLAGS'
3152 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3153 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3154 cross_compiling=$ac_cv_prog_cc_cross
3156 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3157 if test $ac_cv_prog_cc_works = no; then
3158 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3160 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3161 echo "configure:3162: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
3162 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3163 cross_compiling=$ac_cv_prog_cc_cross
3165 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3166 echo "configure:3167: checking whether we are using GNU C" >&5
3167 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
3168 echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170 cat > conftest.c <<EOF
3171 #ifdef __GNUC__
3172 yes;
3173 #endif
3175 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3176 ac_cv_prog_gcc=yes
3177 else
3178 ac_cv_prog_gcc=no
3182 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3184 if test $ac_cv_prog_gcc = yes; then
3185 GCC=yes
3186 else
3187 GCC=
3190 ac_test_CFLAGS="${CFLAGS+set}"
3191 ac_save_CFLAGS="$CFLAGS"
3192 CFLAGS=
3193 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3194 echo "configure:3195: checking whether ${CC-cc} accepts -g" >&5
3195 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
3196 echo $ac_n "(cached) $ac_c" 1>&6
3197 else
3198 echo 'void f(){}' > conftest.c
3199 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3200 ac_cv_prog_cc_g=yes
3201 else
3202 ac_cv_prog_cc_g=no
3204 rm -f conftest*
3208 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3209 if test "$ac_test_CFLAGS" = set; then
3210 CFLAGS="$ac_save_CFLAGS"
3211 elif test $ac_cv_prog_cc_g = yes; then
3212 if test "$GCC" = yes; then
3213 CFLAGS="-g -O2"
3214 else
3215 CFLAGS="-g"
3217 else
3218 if test "$GCC" = yes; then
3219 CFLAGS="-O2"
3220 else
3221 CFLAGS=
3226 for ac_prog in 'bison -y' byacc
3228 # Extract the first word of "$ac_prog", so it can be a program name with args.
3229 set dummy $ac_prog; ac_word=$2
3230 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3231 echo "configure:3232: checking for $ac_word" >&5
3232 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3233 echo $ac_n "(cached) $ac_c" 1>&6
3234 else
3235 if test -n "$YACC"; then
3236 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3237 else
3238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3239 ac_dummy="$PATH"
3240 for ac_dir in $ac_dummy; do
3241 test -z "$ac_dir" && ac_dir=.
3242 if test -f $ac_dir/$ac_word; then
3243 ac_cv_prog_YACC="$ac_prog"
3244 break
3246 done
3247 IFS="$ac_save_ifs"
3250 YACC="$ac_cv_prog_YACC"
3251 if test -n "$YACC"; then
3252 echo "$ac_t""$YACC" 1>&6
3253 else
3254 echo "$ac_t""no" 1>&6
3257 test -n "$YACC" && break
3258 done
3259 test -n "$YACC" || YACC="yacc"
3261 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3262 echo "configure:3263: checking how to run the C preprocessor" >&5
3263 # On Suns, sometimes $CPP names a directory.
3264 if test -n "$CPP" && test -d "$CPP"; then
3265 CPP=
3267 if test -z "$CPP"; then
3268 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3269 echo $ac_n "(cached) $ac_c" 1>&6
3270 else
3271 # This must be in double quotes, not single quotes, because CPP may get
3272 # substituted into the Makefile and "${CC-cc}" will confuse make.
3273 CPP="${CC-cc} -E"
3274 # On the NeXT, cc -E runs the code through the compiler's parser,
3275 # not just through cpp.
3276 cat > conftest.$ac_ext <<EOF
3277 #line 3278 "configure"
3278 #include "confdefs.h"
3279 #include <assert.h>
3280 Syntax Error
3282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3283 { (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3285 if test -z "$ac_err"; then
3287 else
3288 echo "$ac_err" >&5
3289 echo "configure: failed program was:" >&5
3290 cat conftest.$ac_ext >&5
3291 rm -rf conftest*
3292 CPP="${CC-cc} -E -traditional-cpp"
3293 cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296 #include <assert.h>
3297 Syntax Error
3299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3300 { (eval echo configure:3301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3302 if test -z "$ac_err"; then
3304 else
3305 echo "$ac_err" >&5
3306 echo "configure: failed program was:" >&5
3307 cat conftest.$ac_ext >&5
3308 rm -rf conftest*
3309 CPP="${CC-cc} -nologo -E"
3310 cat > conftest.$ac_ext <<EOF
3311 #line 3312 "configure"
3312 #include "confdefs.h"
3313 #include <assert.h>
3314 Syntax Error
3316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3317 { (eval echo configure:3318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3319 if test -z "$ac_err"; then
3321 else
3322 echo "$ac_err" >&5
3323 echo "configure: failed program was:" >&5
3324 cat conftest.$ac_ext >&5
3325 rm -rf conftest*
3326 CPP=/lib/cpp
3328 rm -f conftest*
3330 rm -f conftest*
3332 rm -f conftest*
3333 ac_cv_prog_CPP="$CPP"
3335 CPP="$ac_cv_prog_CPP"
3336 else
3337 ac_cv_prog_CPP="$CPP"
3339 echo "$ac_t""$CPP" 1>&6
3341 missing_dir=`cd $ac_aux_dir && pwd`
3342 for ac_prog in flex lex
3344 # Extract the first word of "$ac_prog", so it can be a program name with args.
3345 set dummy $ac_prog; ac_word=$2
3346 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3347 echo "configure:3348: checking for $ac_word" >&5
3348 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3349 echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351 if test -n "$LEX"; then
3352 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3353 else
3354 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3355 ac_dummy="$PATH"
3356 for ac_dir in $ac_dummy; do
3357 test -z "$ac_dir" && ac_dir=.
3358 if test -f $ac_dir/$ac_word; then
3359 ac_cv_prog_LEX="$ac_prog"
3360 break
3362 done
3363 IFS="$ac_save_ifs"
3366 LEX="$ac_cv_prog_LEX"
3367 if test -n "$LEX"; then
3368 echo "$ac_t""$LEX" 1>&6
3369 else
3370 echo "$ac_t""no" 1>&6
3373 test -n "$LEX" && break
3374 done
3375 test -n "$LEX" || LEX=""$missing_dir/missing flex""
3377 # Extract the first word of "flex", so it can be a program name with args.
3378 set dummy flex; ac_word=$2
3379 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3380 echo "configure:3381: checking for $ac_word" >&5
3381 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3382 echo $ac_n "(cached) $ac_c" 1>&6
3383 else
3384 if test -n "$LEX"; then
3385 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3386 else
3387 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3388 ac_dummy="$PATH"
3389 for ac_dir in $ac_dummy; do
3390 test -z "$ac_dir" && ac_dir=.
3391 if test -f $ac_dir/$ac_word; then
3392 ac_cv_prog_LEX="flex"
3393 break
3395 done
3396 IFS="$ac_save_ifs"
3397 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
3400 LEX="$ac_cv_prog_LEX"
3401 if test -n "$LEX"; then
3402 echo "$ac_t""$LEX" 1>&6
3403 else
3404 echo "$ac_t""no" 1>&6
3407 if test -z "$LEXLIB"
3408 then
3409 case "$LEX" in
3410 flex*) ac_lib=fl ;;
3411 *) ac_lib=l ;;
3412 esac
3413 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
3414 echo "configure:3415: checking for yywrap in -l$ac_lib" >&5
3415 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
3416 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3417 echo $ac_n "(cached) $ac_c" 1>&6
3418 else
3419 ac_save_LIBS="$LIBS"
3420 LIBS="-l$ac_lib $LIBS"
3421 cat > conftest.$ac_ext <<EOF
3422 #line 3423 "configure"
3423 #include "confdefs.h"
3424 /* Override any gcc2 internal prototype to avoid an error. */
3425 /* We use char because int might match the return type of a gcc2
3426 builtin and then its argument prototype would still apply. */
3427 char yywrap();
3429 int main() {
3430 yywrap()
3431 ; return 0; }
3433 if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3434 rm -rf conftest*
3435 eval "ac_cv_lib_$ac_lib_var=yes"
3436 else
3437 echo "configure: failed program was:" >&5
3438 cat conftest.$ac_ext >&5
3439 rm -rf conftest*
3440 eval "ac_cv_lib_$ac_lib_var=no"
3442 rm -f conftest*
3443 LIBS="$ac_save_LIBS"
3446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3447 echo "$ac_t""yes" 1>&6
3448 LEXLIB="-l$ac_lib"
3449 else
3450 echo "$ac_t""no" 1>&6
3455 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
3456 echo "configure:3457: checking lex output file root" >&5
3457 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
3458 echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460 # The minimal lex program is just a single line: %%. But some broken lexes
3461 # (Solaris, I think it was) want two %% lines, so accommodate them.
3462 echo '%%
3463 %%' | $LEX
3464 if test -f lex.yy.c; then
3465 ac_cv_prog_lex_root=lex.yy
3466 elif test -f lexyy.c; then
3467 ac_cv_prog_lex_root=lexyy
3468 else
3469 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
3473 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
3474 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
3476 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
3477 echo "configure:3478: checking whether yytext is a pointer" >&5
3478 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
3479 echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481 # POSIX says lex can declare yytext either as a pointer or an array; the
3482 # default is implementation-dependent. Figure out which it is, since
3483 # not all implementations provide the %pointer and %array declarations.
3484 ac_cv_prog_lex_yytext_pointer=no
3485 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
3486 ac_save_LIBS="$LIBS"
3487 LIBS="$LIBS $LEXLIB"
3488 cat > conftest.$ac_ext <<EOF
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491 `cat $LEX_OUTPUT_ROOT.c`
3492 int main() {
3494 ; return 0; }
3496 if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3497 rm -rf conftest*
3498 ac_cv_prog_lex_yytext_pointer=yes
3499 else
3500 echo "configure: failed program was:" >&5
3501 cat conftest.$ac_ext >&5
3503 rm -f conftest*
3504 LIBS="$ac_save_LIBS"
3505 rm -f "${LEX_OUTPUT_ROOT}.c"
3509 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
3510 if test $ac_cv_prog_lex_yytext_pointer = yes; then
3511 cat >> confdefs.h <<\EOF
3512 #define YYTEXT_POINTER 1
3518 ALL_LINGUAS=
3519 # Extract the first word of "ranlib", so it can be a program name with args.
3520 set dummy ranlib; ac_word=$2
3521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3522 echo "configure:3523: checking for $ac_word" >&5
3523 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3524 echo $ac_n "(cached) $ac_c" 1>&6
3525 else
3526 if test -n "$RANLIB"; then
3527 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3528 else
3529 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3530 ac_dummy="$PATH"
3531 for ac_dir in $ac_dummy; do
3532 test -z "$ac_dir" && ac_dir=.
3533 if test -f $ac_dir/$ac_word; then
3534 ac_cv_prog_RANLIB="ranlib"
3535 break
3537 done
3538 IFS="$ac_save_ifs"
3539 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3542 RANLIB="$ac_cv_prog_RANLIB"
3543 if test -n "$RANLIB"; then
3544 echo "$ac_t""$RANLIB" 1>&6
3545 else
3546 echo "$ac_t""no" 1>&6
3549 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
3550 echo "configure:3551: checking for POSIXized ISC" >&5
3551 if test -d /etc/conf/kconfig.d &&
3552 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
3553 then
3554 echo "$ac_t""yes" 1>&6
3555 ISC=yes # If later tests want to check for ISC.
3556 cat >> confdefs.h <<\EOF
3557 #define _POSIX_SOURCE 1
3560 if test "$GCC" = yes; then
3561 CC="$CC -posix"
3562 else
3563 CC="$CC -Xp"
3565 else
3566 echo "$ac_t""no" 1>&6
3567 ISC=
3570 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3571 echo "configure:3572: checking for ANSI C header files" >&5
3572 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3573 echo $ac_n "(cached) $ac_c" 1>&6
3574 else
3575 cat > conftest.$ac_ext <<EOF
3576 #line 3577 "configure"
3577 #include "confdefs.h"
3578 #include <stdlib.h>
3579 #include <stdarg.h>
3580 #include <string.h>
3581 #include <float.h>
3583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3584 { (eval echo configure:3585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3586 if test -z "$ac_err"; then
3587 rm -rf conftest*
3588 ac_cv_header_stdc=yes
3589 else
3590 echo "$ac_err" >&5
3591 echo "configure: failed program was:" >&5
3592 cat conftest.$ac_ext >&5
3593 rm -rf conftest*
3594 ac_cv_header_stdc=no
3596 rm -f conftest*
3598 if test $ac_cv_header_stdc = yes; then
3599 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3602 "configure"
3602 #include "confdefs.h"
3603 #include <string.h>
3605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3606 egrep "memchr" >/dev/null 2>&1; then
3608 else
3609 rm -rf conftest*
3610 ac_cv_header_stdc=no
3612 rm -f conftest*
3616 if test $ac_cv_header_stdc = yes; then
3617 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3618 cat > conftest.$ac_ext <<EOF
3619 #line 3620 "configure"
3620 #include "confdefs.h"
3621 #include <stdlib.h>
3623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3624 egrep "free" >/dev/null 2>&1; then
3626 else
3627 rm -rf conftest*
3628 ac_cv_header_stdc=no
3630 rm -f conftest*
3634 if test $ac_cv_header_stdc = yes; then
3635 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3636 if test "$cross_compiling" = yes; then
3638 else
3639 cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 #include <ctype.h>
3643 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3644 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3645 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3646 int main () { int i; for (i = 0; i < 256; i++)
3647 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3648 exit (0); }
3651 if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3652 then
3654 else
3655 echo "configure: failed program was:" >&5
3656 cat conftest.$ac_ext >&5
3657 rm -fr conftest*
3658 ac_cv_header_stdc=no
3660 rm -fr conftest*
3666 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3667 if test $ac_cv_header_stdc = yes; then
3668 cat >> confdefs.h <<\EOF
3669 #define STDC_HEADERS 1
3674 echo $ac_n "checking for working const""... $ac_c" 1>&6
3675 echo "configure:3676: checking for working const" >&5
3676 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3677 echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679 cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3683 int main() {
3685 /* Ultrix mips cc rejects this. */
3686 typedef int charset[2]; const charset x;
3687 /* SunOS 4.1.1 cc rejects this. */
3688 char const *const *ccp;
3689 char **p;
3690 /* NEC SVR4.0.2 mips cc rejects this. */
3691 struct point {int x, y;};
3692 static struct point const zero = {0,0};
3693 /* AIX XL C 1.02.0.0 rejects this.
3694 It does not let you subtract one const X* pointer from another in an arm
3695 of an if-expression whose if-part is not a constant expression */
3696 const char *g = "string";
3697 ccp = &g + (g ? g-g : 0);
3698 /* HPUX 7.0 cc rejects these. */
3699 ++ccp;
3700 p = (char**) ccp;
3701 ccp = (char const *const *) p;
3702 { /* SCO 3.2v4 cc rejects this. */
3703 char *t;
3704 char const *s = 0 ? (char *) 0 : (char const *) 0;
3706 *t++ = 0;
3708 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3709 int x[] = {25, 17};
3710 const int *foo = &x[0];
3711 ++foo;
3713 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3714 typedef const int *iptr;
3715 iptr p = 0;
3716 ++p;
3718 { /* AIX XL C 1.02.0.0 rejects this saying
3719 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3720 struct s { int j; const int *ap[3]; };
3721 struct s *b; b->j = 5;
3723 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3724 const int foo = 10;
3727 ; return 0; }
3729 if { (eval echo configure:3730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3730 rm -rf conftest*
3731 ac_cv_c_const=yes
3732 else
3733 echo "configure: failed program was:" >&5
3734 cat conftest.$ac_ext >&5
3735 rm -rf conftest*
3736 ac_cv_c_const=no
3738 rm -f conftest*
3741 echo "$ac_t""$ac_cv_c_const" 1>&6
3742 if test $ac_cv_c_const = no; then
3743 cat >> confdefs.h <<\EOF
3744 #define const
3749 echo $ac_n "checking for inline""... $ac_c" 1>&6
3750 echo "configure:3751: checking for inline" >&5
3751 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3752 echo $ac_n "(cached) $ac_c" 1>&6
3753 else
3754 ac_cv_c_inline=no
3755 for ac_kw in inline __inline__ __inline; do
3756 cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3760 int main() {
3761 } $ac_kw foo() {
3762 ; return 0; }
3764 if { (eval echo configure:3765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3765 rm -rf conftest*
3766 ac_cv_c_inline=$ac_kw; break
3767 else
3768 echo "configure: failed program was:" >&5
3769 cat conftest.$ac_ext >&5
3771 rm -f conftest*
3772 done
3776 echo "$ac_t""$ac_cv_c_inline" 1>&6
3777 case "$ac_cv_c_inline" in
3778 inline | yes) ;;
3779 no) cat >> confdefs.h <<\EOF
3780 #define inline
3783 *) cat >> confdefs.h <<EOF
3784 #define inline $ac_cv_c_inline
3787 esac
3789 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3790 echo "configure:3791: checking for off_t" >&5
3791 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3792 echo $ac_n "(cached) $ac_c" 1>&6
3793 else
3794 cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797 #include <sys/types.h>
3798 #if STDC_HEADERS
3799 #include <stdlib.h>
3800 #include <stddef.h>
3801 #endif
3803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3804 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3805 rm -rf conftest*
3806 ac_cv_type_off_t=yes
3807 else
3808 rm -rf conftest*
3809 ac_cv_type_off_t=no
3811 rm -f conftest*
3814 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3815 if test $ac_cv_type_off_t = no; then
3816 cat >> confdefs.h <<\EOF
3817 #define off_t long
3822 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3823 echo "configure:3824: checking for size_t" >&5
3824 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3825 echo $ac_n "(cached) $ac_c" 1>&6
3826 else
3827 cat > conftest.$ac_ext <<EOF
3828 #line 3829 "configure"
3829 #include "confdefs.h"
3830 #include <sys/types.h>
3831 #if STDC_HEADERS
3832 #include <stdlib.h>
3833 #include <stddef.h>
3834 #endif
3836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3837 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3838 rm -rf conftest*
3839 ac_cv_type_size_t=yes
3840 else
3841 rm -rf conftest*
3842 ac_cv_type_size_t=no
3844 rm -f conftest*
3847 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3848 if test $ac_cv_type_size_t = no; then
3849 cat >> confdefs.h <<\EOF
3850 #define size_t unsigned
3855 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3856 # for constant arguments. Useless!
3857 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3858 echo "configure:3859: checking for working alloca.h" >&5
3859 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3860 echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862 cat > conftest.$ac_ext <<EOF
3863 #line 3864 "configure"
3864 #include "confdefs.h"
3865 #include <alloca.h>
3866 int main() {
3867 char *p = alloca(2 * sizeof(int));
3868 ; return 0; }
3870 if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3871 rm -rf conftest*
3872 ac_cv_header_alloca_h=yes
3873 else
3874 echo "configure: failed program was:" >&5
3875 cat conftest.$ac_ext >&5
3876 rm -rf conftest*
3877 ac_cv_header_alloca_h=no
3879 rm -f conftest*
3882 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3883 if test $ac_cv_header_alloca_h = yes; then
3884 cat >> confdefs.h <<\EOF
3885 #define HAVE_ALLOCA_H 1
3890 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3891 echo "configure:3892: checking for alloca" >&5
3892 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3893 echo $ac_n "(cached) $ac_c" 1>&6
3894 else
3895 cat > conftest.$ac_ext <<EOF
3896 #line 3897 "configure"
3897 #include "confdefs.h"
3899 #ifdef __GNUC__
3900 # define alloca __builtin_alloca
3901 #else
3902 # ifdef _MSC_VER
3903 # include <malloc.h>
3904 # define alloca _alloca
3905 # else
3906 # if HAVE_ALLOCA_H
3907 # include <alloca.h>
3908 # else
3909 # ifdef _AIX
3910 #pragma alloca
3911 # else
3912 # ifndef alloca /* predefined by HP cc +Olibcalls */
3913 char *alloca ();
3914 # endif
3915 # endif
3916 # endif
3917 # endif
3918 #endif
3920 int main() {
3921 char *p = (char *) alloca(1);
3922 ; return 0; }
3924 if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3925 rm -rf conftest*
3926 ac_cv_func_alloca_works=yes
3927 else
3928 echo "configure: failed program was:" >&5
3929 cat conftest.$ac_ext >&5
3930 rm -rf conftest*
3931 ac_cv_func_alloca_works=no
3933 rm -f conftest*
3936 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3937 if test $ac_cv_func_alloca_works = yes; then
3938 cat >> confdefs.h <<\EOF
3939 #define HAVE_ALLOCA 1
3944 if test $ac_cv_func_alloca_works = no; then
3945 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3946 # that cause trouble. Some versions do not even contain alloca or
3947 # contain a buggy version. If you still want to use their alloca,
3948 # use ar to extract alloca.o from them instead of compiling alloca.c.
3949 ALLOCA=alloca.${ac_objext}
3950 cat >> confdefs.h <<\EOF
3951 #define C_ALLOCA 1
3955 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3956 echo "configure:3957: checking whether alloca needs Cray hooks" >&5
3957 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3958 echo $ac_n "(cached) $ac_c" 1>&6
3959 else
3960 cat > conftest.$ac_ext <<EOF
3961 #line 3962 "configure"
3962 #include "confdefs.h"
3963 #if defined(CRAY) && ! defined(CRAY2)
3964 webecray
3965 #else
3966 wenotbecray
3967 #endif
3970 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3971 egrep "webecray" >/dev/null 2>&1; then
3972 rm -rf conftest*
3973 ac_cv_os_cray=yes
3974 else
3975 rm -rf conftest*
3976 ac_cv_os_cray=no
3978 rm -f conftest*
3982 echo "$ac_t""$ac_cv_os_cray" 1>&6
3983 if test $ac_cv_os_cray = yes; then
3984 for ac_func in _getb67 GETB67 getb67; do
3985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3986 echo "configure:3987: checking for $ac_func" >&5
3987 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3988 echo $ac_n "(cached) $ac_c" 1>&6
3989 else
3990 cat > conftest.$ac_ext <<EOF
3991 #line 3992 "configure"
3992 #include "confdefs.h"
3993 /* System header to define __stub macros and hopefully few prototypes,
3994 which can conflict with char $ac_func(); below. */
3995 #include <assert.h>
3996 /* Override any gcc2 internal prototype to avoid an error. */
3997 /* We use char because int might match the return type of a gcc2
3998 builtin and then its argument prototype would still apply. */
3999 char $ac_func();
4001 int main() {
4003 /* The GNU C library defines this for functions which it implements
4004 to always fail with ENOSYS. Some functions are actually named
4005 something starting with __ and the normal name is an alias. */
4006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4007 choke me
4008 #else
4009 $ac_func();
4010 #endif
4012 ; return 0; }
4014 if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4015 rm -rf conftest*
4016 eval "ac_cv_func_$ac_func=yes"
4017 else
4018 echo "configure: failed program was:" >&5
4019 cat conftest.$ac_ext >&5
4020 rm -rf conftest*
4021 eval "ac_cv_func_$ac_func=no"
4023 rm -f conftest*
4026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4027 echo "$ac_t""yes" 1>&6
4028 cat >> confdefs.h <<EOF
4029 #define CRAY_STACKSEG_END $ac_func
4032 break
4033 else
4034 echo "$ac_t""no" 1>&6
4037 done
4040 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4041 echo "configure:4042: checking stack direction for C alloca" >&5
4042 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4043 echo $ac_n "(cached) $ac_c" 1>&6
4044 else
4045 if test "$cross_compiling" = yes; then
4046 ac_cv_c_stack_direction=0
4047 else
4048 cat > conftest.$ac_ext <<EOF
4049 #line 4050 "configure"
4050 #include "confdefs.h"
4051 find_stack_direction ()
4053 static char *addr = 0;
4054 auto char dummy;
4055 if (addr == 0)
4057 addr = &dummy;
4058 return find_stack_direction ();
4060 else
4061 return (&dummy > addr) ? 1 : -1;
4063 main ()
4065 exit (find_stack_direction() < 0);
4068 if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4069 then
4070 ac_cv_c_stack_direction=1
4071 else
4072 echo "configure: failed program was:" >&5
4073 cat conftest.$ac_ext >&5
4074 rm -fr conftest*
4075 ac_cv_c_stack_direction=-1
4077 rm -fr conftest*
4082 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4083 cat >> confdefs.h <<EOF
4084 #define STACK_DIRECTION $ac_cv_c_stack_direction
4089 for ac_hdr in unistd.h
4091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4093 echo "configure:4094: checking for $ac_hdr" >&5
4094 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4095 echo $ac_n "(cached) $ac_c" 1>&6
4096 else
4097 cat > conftest.$ac_ext <<EOF
4098 #line 4099 "configure"
4099 #include "confdefs.h"
4100 #include <$ac_hdr>
4102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4103 { (eval echo configure:4104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4105 if test -z "$ac_err"; then
4106 rm -rf conftest*
4107 eval "ac_cv_header_$ac_safe=yes"
4108 else
4109 echo "$ac_err" >&5
4110 echo "configure: failed program was:" >&5
4111 cat conftest.$ac_ext >&5
4112 rm -rf conftest*
4113 eval "ac_cv_header_$ac_safe=no"
4115 rm -f conftest*
4117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4118 echo "$ac_t""yes" 1>&6
4119 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4120 cat >> confdefs.h <<EOF
4121 #define $ac_tr_hdr 1
4124 else
4125 echo "$ac_t""no" 1>&6
4127 done
4129 for ac_func in getpagesize
4131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4132 echo "configure:4133: checking for $ac_func" >&5
4133 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4134 echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136 cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 /* System header to define __stub macros and hopefully few prototypes,
4140 which can conflict with char $ac_func(); below. */
4141 #include <assert.h>
4142 /* Override any gcc2 internal prototype to avoid an error. */
4143 /* We use char because int might match the return type of a gcc2
4144 builtin and then its argument prototype would still apply. */
4145 char $ac_func();
4147 int main() {
4149 /* The GNU C library defines this for functions which it implements
4150 to always fail with ENOSYS. Some functions are actually named
4151 something starting with __ and the normal name is an alias. */
4152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4153 choke me
4154 #else
4155 $ac_func();
4156 #endif
4158 ; return 0; }
4160 if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4161 rm -rf conftest*
4162 eval "ac_cv_func_$ac_func=yes"
4163 else
4164 echo "configure: failed program was:" >&5
4165 cat conftest.$ac_ext >&5
4166 rm -rf conftest*
4167 eval "ac_cv_func_$ac_func=no"
4169 rm -f conftest*
4172 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4173 echo "$ac_t""yes" 1>&6
4174 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4175 cat >> confdefs.h <<EOF
4176 #define $ac_tr_func 1
4179 else
4180 echo "$ac_t""no" 1>&6
4182 done
4184 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4185 echo "configure:4186: checking for working mmap" >&5
4186 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4187 echo $ac_n "(cached) $ac_c" 1>&6
4188 else
4189 if test "$cross_compiling" = yes; then
4190 ac_cv_func_mmap_fixed_mapped=no
4191 else
4192 cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4196 /* Thanks to Mike Haertel and Jim Avera for this test.
4197 Here is a matrix of mmap possibilities:
4198 mmap private not fixed
4199 mmap private fixed at somewhere currently unmapped
4200 mmap private fixed at somewhere already mapped
4201 mmap shared not fixed
4202 mmap shared fixed at somewhere currently unmapped
4203 mmap shared fixed at somewhere already mapped
4204 For private mappings, we should verify that changes cannot be read()
4205 back from the file, nor mmap's back from the file at a different
4206 address. (There have been systems where private was not correctly
4207 implemented like the infamous i386 svr4.0, and systems where the
4208 VM page cache was not coherent with the filesystem buffer cache
4209 like early versions of FreeBSD and possibly contemporary NetBSD.)
4210 For shared mappings, we should conversely verify that changes get
4211 propogated back to all the places they're supposed to be.
4213 Grep wants private fixed already mapped.
4214 The main things grep needs to know about mmap are:
4215 * does it exist and is it safe to write into the mmap'd area
4216 * how to use it (BSD variants) */
4217 #include <sys/types.h>
4218 #include <fcntl.h>
4219 #include <sys/mman.h>
4221 /* This mess was copied from the GNU getpagesize.h. */
4222 #ifndef HAVE_GETPAGESIZE
4223 # ifdef HAVE_UNISTD_H
4224 # include <unistd.h>
4225 # endif
4227 /* Assume that all systems that can run configure have sys/param.h. */
4228 # ifndef HAVE_SYS_PARAM_H
4229 # define HAVE_SYS_PARAM_H 1
4230 # endif
4232 # ifdef _SC_PAGESIZE
4233 # define getpagesize() sysconf(_SC_PAGESIZE)
4234 # else /* no _SC_PAGESIZE */
4235 # ifdef HAVE_SYS_PARAM_H
4236 # include <sys/param.h>
4237 # ifdef EXEC_PAGESIZE
4238 # define getpagesize() EXEC_PAGESIZE
4239 # else /* no EXEC_PAGESIZE */
4240 # ifdef NBPG
4241 # define getpagesize() NBPG * CLSIZE
4242 # ifndef CLSIZE
4243 # define CLSIZE 1
4244 # endif /* no CLSIZE */
4245 # else /* no NBPG */
4246 # ifdef NBPC
4247 # define getpagesize() NBPC
4248 # else /* no NBPC */
4249 # ifdef PAGESIZE
4250 # define getpagesize() PAGESIZE
4251 # endif /* PAGESIZE */
4252 # endif /* no NBPC */
4253 # endif /* no NBPG */
4254 # endif /* no EXEC_PAGESIZE */
4255 # else /* no HAVE_SYS_PARAM_H */
4256 # define getpagesize() 8192 /* punt totally */
4257 # endif /* no HAVE_SYS_PARAM_H */
4258 # endif /* no _SC_PAGESIZE */
4260 #endif /* no HAVE_GETPAGESIZE */
4262 #ifdef __cplusplus
4263 extern "C" { void *malloc(unsigned); }
4264 #else
4265 char *malloc();
4266 #endif
4269 main()
4271 char *data, *data2, *data3;
4272 int i, pagesize;
4273 int fd;
4275 pagesize = getpagesize();
4278 * First, make a file with some known garbage in it.
4280 data = malloc(pagesize);
4281 if (!data)
4282 exit(1);
4283 for (i = 0; i < pagesize; ++i)
4284 *(data + i) = rand();
4285 umask(0);
4286 fd = creat("conftestmmap", 0600);
4287 if (fd < 0)
4288 exit(1);
4289 if (write(fd, data, pagesize) != pagesize)
4290 exit(1);
4291 close(fd);
4294 * Next, try to mmap the file at a fixed address which
4295 * already has something else allocated at it. If we can,
4296 * also make sure that we see the same garbage.
4298 fd = open("conftestmmap", O_RDWR);
4299 if (fd < 0)
4300 exit(1);
4301 data2 = malloc(2 * pagesize);
4302 if (!data2)
4303 exit(1);
4304 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4305 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4306 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4307 exit(1);
4308 for (i = 0; i < pagesize; ++i)
4309 if (*(data + i) != *(data2 + i))
4310 exit(1);
4313 * Finally, make sure that changes to the mapped area
4314 * do not percolate back to the file as seen by read().
4315 * (This is a bug on some variants of i386 svr4.0.)
4317 for (i = 0; i < pagesize; ++i)
4318 *(data2 + i) = *(data2 + i) + 1;
4319 data3 = malloc(pagesize);
4320 if (!data3)
4321 exit(1);
4322 if (read(fd, data3, pagesize) != pagesize)
4323 exit(1);
4324 for (i = 0; i < pagesize; ++i)
4325 if (*(data + i) != *(data3 + i))
4326 exit(1);
4327 close(fd);
4328 unlink("conftestmmap");
4329 exit(0);
4333 if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4334 then
4335 ac_cv_func_mmap_fixed_mapped=yes
4336 else
4337 echo "configure: failed program was:" >&5
4338 cat conftest.$ac_ext >&5
4339 rm -fr conftest*
4340 ac_cv_func_mmap_fixed_mapped=no
4342 rm -fr conftest*
4347 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4348 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4349 cat >> confdefs.h <<\EOF
4350 #define HAVE_MMAP 1
4356 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
4357 unistd.h values.h sys/param.h
4359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4361 echo "configure:4362: checking for $ac_hdr" >&5
4362 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4363 echo $ac_n "(cached) $ac_c" 1>&6
4364 else
4365 cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4368 #include <$ac_hdr>
4370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4371 { (eval echo configure:4372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4373 if test -z "$ac_err"; then
4374 rm -rf conftest*
4375 eval "ac_cv_header_$ac_safe=yes"
4376 else
4377 echo "$ac_err" >&5
4378 echo "configure: failed program was:" >&5
4379 cat conftest.$ac_ext >&5
4380 rm -rf conftest*
4381 eval "ac_cv_header_$ac_safe=no"
4383 rm -f conftest*
4385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4386 echo "$ac_t""yes" 1>&6
4387 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4388 cat >> confdefs.h <<EOF
4389 #define $ac_tr_hdr 1
4392 else
4393 echo "$ac_t""no" 1>&6
4395 done
4397 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
4398 __argz_count __argz_stringify __argz_next
4400 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4401 echo "configure:4402: checking for $ac_func" >&5
4402 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4403 echo $ac_n "(cached) $ac_c" 1>&6
4404 else
4405 cat > conftest.$ac_ext <<EOF
4406 #line 4407 "configure"
4407 #include "confdefs.h"
4408 /* System header to define __stub macros and hopefully few prototypes,
4409 which can conflict with char $ac_func(); below. */
4410 #include <assert.h>
4411 /* Override any gcc2 internal prototype to avoid an error. */
4412 /* We use char because int might match the return type of a gcc2
4413 builtin and then its argument prototype would still apply. */
4414 char $ac_func();
4416 int main() {
4418 /* The GNU C library defines this for functions which it implements
4419 to always fail with ENOSYS. Some functions are actually named
4420 something starting with __ and the normal name is an alias. */
4421 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4422 choke me
4423 #else
4424 $ac_func();
4425 #endif
4427 ; return 0; }
4429 if { (eval echo configure:4430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4430 rm -rf conftest*
4431 eval "ac_cv_func_$ac_func=yes"
4432 else
4433 echo "configure: failed program was:" >&5
4434 cat conftest.$ac_ext >&5
4435 rm -rf conftest*
4436 eval "ac_cv_func_$ac_func=no"
4438 rm -f conftest*
4441 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4442 echo "$ac_t""yes" 1>&6
4443 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4444 cat >> confdefs.h <<EOF
4445 #define $ac_tr_func 1
4448 else
4449 echo "$ac_t""no" 1>&6
4451 done
4454 if test "${ac_cv_func_stpcpy+set}" != "set"; then
4455 for ac_func in stpcpy
4457 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4458 echo "configure:4459: checking for $ac_func" >&5
4459 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4460 echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462 cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465 /* System header to define __stub macros and hopefully few prototypes,
4466 which can conflict with char $ac_func(); below. */
4467 #include <assert.h>
4468 /* Override any gcc2 internal prototype to avoid an error. */
4469 /* We use char because int might match the return type of a gcc2
4470 builtin and then its argument prototype would still apply. */
4471 char $ac_func();
4473 int main() {
4475 /* The GNU C library defines this for functions which it implements
4476 to always fail with ENOSYS. Some functions are actually named
4477 something starting with __ and the normal name is an alias. */
4478 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4479 choke me
4480 #else
4481 $ac_func();
4482 #endif
4484 ; return 0; }
4486 if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4487 rm -rf conftest*
4488 eval "ac_cv_func_$ac_func=yes"
4489 else
4490 echo "configure: failed program was:" >&5
4491 cat conftest.$ac_ext >&5
4492 rm -rf conftest*
4493 eval "ac_cv_func_$ac_func=no"
4495 rm -f conftest*
4498 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4499 echo "$ac_t""yes" 1>&6
4500 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4501 cat >> confdefs.h <<EOF
4502 #define $ac_tr_func 1
4505 else
4506 echo "$ac_t""no" 1>&6
4508 done
4511 if test "${ac_cv_func_stpcpy}" = "yes"; then
4512 cat >> confdefs.h <<\EOF
4513 #define HAVE_STPCPY 1
4518 if test $ac_cv_header_locale_h = yes; then
4519 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4520 echo "configure:4521: checking for LC_MESSAGES" >&5
4521 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4522 echo $ac_n "(cached) $ac_c" 1>&6
4523 else
4524 cat > conftest.$ac_ext <<EOF
4525 #line 4526 "configure"
4526 #include "confdefs.h"
4527 #include <locale.h>
4528 int main() {
4529 return LC_MESSAGES
4530 ; return 0; }
4532 if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4533 rm -rf conftest*
4534 am_cv_val_LC_MESSAGES=yes
4535 else
4536 echo "configure: failed program was:" >&5
4537 cat conftest.$ac_ext >&5
4538 rm -rf conftest*
4539 am_cv_val_LC_MESSAGES=no
4541 rm -f conftest*
4544 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4545 if test $am_cv_val_LC_MESSAGES = yes; then
4546 cat >> confdefs.h <<\EOF
4547 #define HAVE_LC_MESSAGES 1
4552 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
4553 echo "configure:4554: checking whether NLS is requested" >&5
4554 # Check whether --enable-nls or --disable-nls was given.
4555 if test "${enable_nls+set}" = set; then
4556 enableval="$enable_nls"
4557 USE_NLS=$enableval
4558 else
4559 USE_NLS=yes
4562 echo "$ac_t""$USE_NLS" 1>&6
4565 USE_INCLUDED_LIBINTL=no
4567 if test "$USE_NLS" = "yes"; then
4568 cat >> confdefs.h <<\EOF
4569 #define ENABLE_NLS 1
4572 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
4573 echo "configure:4574: checking whether included gettext is requested" >&5
4574 # Check whether --with-included-gettext or --without-included-gettext was given.
4575 if test "${with_included_gettext+set}" = set; then
4576 withval="$with_included_gettext"
4577 nls_cv_force_use_gnu_gettext=$withval
4578 else
4579 nls_cv_force_use_gnu_gettext=no
4582 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
4584 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4585 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4586 nls_cv_header_intl=
4587 nls_cv_header_libgt=
4588 CATOBJEXT=NONE
4590 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
4591 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
4592 echo "configure:4593: checking for libintl.h" >&5
4593 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4594 echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596 cat > conftest.$ac_ext <<EOF
4597 #line 4598 "configure"
4598 #include "confdefs.h"
4599 #include <libintl.h>
4601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4602 { (eval echo configure:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4604 if test -z "$ac_err"; then
4605 rm -rf conftest*
4606 eval "ac_cv_header_$ac_safe=yes"
4607 else
4608 echo "$ac_err" >&5
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612 eval "ac_cv_header_$ac_safe=no"
4614 rm -f conftest*
4616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4617 echo "$ac_t""yes" 1>&6
4618 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
4619 echo "configure:4620: checking for gettext in libc" >&5
4620 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
4621 echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623 cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4626 #include <libintl.h>
4627 int main() {
4628 return (int) gettext ("")
4629 ; return 0; }
4631 if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4632 rm -rf conftest*
4633 gt_cv_func_gettext_libc=yes
4634 else
4635 echo "configure: failed program was:" >&5
4636 cat conftest.$ac_ext >&5
4637 rm -rf conftest*
4638 gt_cv_func_gettext_libc=no
4640 rm -f conftest*
4643 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
4645 if test "$gt_cv_func_gettext_libc" != "yes"; then
4646 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
4647 echo "configure:4648: checking for bindtextdomain in -lintl" >&5
4648 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
4649 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4650 echo $ac_n "(cached) $ac_c" 1>&6
4651 else
4652 ac_save_LIBS="$LIBS"
4653 LIBS="-lintl $LIBS"
4654 cat > conftest.$ac_ext <<EOF
4655 #line 4656 "configure"
4656 #include "confdefs.h"
4657 /* Override any gcc2 internal prototype to avoid an error. */
4658 /* We use char because int might match the return type of a gcc2
4659 builtin and then its argument prototype would still apply. */
4660 char bindtextdomain();
4662 int main() {
4663 bindtextdomain()
4664 ; return 0; }
4666 if { (eval echo configure:4667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4667 rm -rf conftest*
4668 eval "ac_cv_lib_$ac_lib_var=yes"
4669 else
4670 echo "configure: failed program was:" >&5
4671 cat conftest.$ac_ext >&5
4672 rm -rf conftest*
4673 eval "ac_cv_lib_$ac_lib_var=no"
4675 rm -f conftest*
4676 LIBS="$ac_save_LIBS"
4679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4680 echo "$ac_t""yes" 1>&6
4681 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
4682 echo "configure:4683: checking for gettext in libintl" >&5
4683 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
4684 echo $ac_n "(cached) $ac_c" 1>&6
4685 else
4686 cat > conftest.$ac_ext <<EOF
4687 #line 4688 "configure"
4688 #include "confdefs.h"
4690 int main() {
4691 return (int) gettext ("")
4692 ; return 0; }
4694 if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4695 rm -rf conftest*
4696 gt_cv_func_gettext_libintl=yes
4697 else
4698 echo "configure: failed program was:" >&5
4699 cat conftest.$ac_ext >&5
4700 rm -rf conftest*
4701 gt_cv_func_gettext_libintl=no
4703 rm -f conftest*
4706 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
4707 else
4708 echo "$ac_t""no" 1>&6
4713 if test "$gt_cv_func_gettext_libc" = "yes" \
4714 || test "$gt_cv_func_gettext_libintl" = "yes"; then
4715 cat >> confdefs.h <<\EOF
4716 #define HAVE_GETTEXT 1
4719 # Extract the first word of "msgfmt", so it can be a program name with args.
4720 set dummy msgfmt; ac_word=$2
4721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4722 echo "configure:4723: checking for $ac_word" >&5
4723 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4724 echo $ac_n "(cached) $ac_c" 1>&6
4725 else
4726 case "$MSGFMT" in
4728 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4731 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4732 for ac_dir in $PATH; do
4733 test -z "$ac_dir" && ac_dir=.
4734 if test -f $ac_dir/$ac_word; then
4735 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4736 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4737 break
4740 done
4741 IFS="$ac_save_ifs"
4742 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
4744 esac
4746 MSGFMT="$ac_cv_path_MSGFMT"
4747 if test -n "$MSGFMT"; then
4748 echo "$ac_t""$MSGFMT" 1>&6
4749 else
4750 echo "$ac_t""no" 1>&6
4752 if test "$MSGFMT" != "no"; then
4753 for ac_func in dcgettext
4755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4756 echo "configure:4757: checking for $ac_func" >&5
4757 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4758 echo $ac_n "(cached) $ac_c" 1>&6
4759 else
4760 cat > conftest.$ac_ext <<EOF
4761 #line 4762 "configure"
4762 #include "confdefs.h"
4763 /* System header to define __stub macros and hopefully few prototypes,
4764 which can conflict with char $ac_func(); below. */
4765 #include <assert.h>
4766 /* Override any gcc2 internal prototype to avoid an error. */
4767 /* We use char because int might match the return type of a gcc2
4768 builtin and then its argument prototype would still apply. */
4769 char $ac_func();
4771 int main() {
4773 /* The GNU C library defines this for functions which it implements
4774 to always fail with ENOSYS. Some functions are actually named
4775 something starting with __ and the normal name is an alias. */
4776 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4777 choke me
4778 #else
4779 $ac_func();
4780 #endif
4782 ; return 0; }
4784 if { (eval echo configure:4785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4785 rm -rf conftest*
4786 eval "ac_cv_func_$ac_func=yes"
4787 else
4788 echo "configure: failed program was:" >&5
4789 cat conftest.$ac_ext >&5
4790 rm -rf conftest*
4791 eval "ac_cv_func_$ac_func=no"
4793 rm -f conftest*
4796 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4797 echo "$ac_t""yes" 1>&6
4798 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4799 cat >> confdefs.h <<EOF
4800 #define $ac_tr_func 1
4803 else
4804 echo "$ac_t""no" 1>&6
4806 done
4808 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4809 set dummy gmsgfmt; ac_word=$2
4810 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4811 echo "configure:4812: checking for $ac_word" >&5
4812 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4813 echo $ac_n "(cached) $ac_c" 1>&6
4814 else
4815 case "$GMSGFMT" in
4817 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4819 ?:/*)
4820 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4823 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4824 ac_dummy="$PATH"
4825 for ac_dir in $ac_dummy; do
4826 test -z "$ac_dir" && ac_dir=.
4827 if test -f $ac_dir/$ac_word; then
4828 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4829 break
4831 done
4832 IFS="$ac_save_ifs"
4833 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4835 esac
4837 GMSGFMT="$ac_cv_path_GMSGFMT"
4838 if test -n "$GMSGFMT"; then
4839 echo "$ac_t""$GMSGFMT" 1>&6
4840 else
4841 echo "$ac_t""no" 1>&6
4844 # Extract the first word of "xgettext", so it can be a program name with args.
4845 set dummy xgettext; ac_word=$2
4846 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4847 echo "configure:4848: checking for $ac_word" >&5
4848 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4849 echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851 case "$XGETTEXT" in
4853 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4856 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4857 for ac_dir in $PATH; do
4858 test -z "$ac_dir" && ac_dir=.
4859 if test -f $ac_dir/$ac_word; then
4860 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4861 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4862 break
4865 done
4866 IFS="$ac_save_ifs"
4867 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4869 esac
4871 XGETTEXT="$ac_cv_path_XGETTEXT"
4872 if test -n "$XGETTEXT"; then
4873 echo "$ac_t""$XGETTEXT" 1>&6
4874 else
4875 echo "$ac_t""no" 1>&6
4878 cat > conftest.$ac_ext <<EOF
4879 #line 4880 "configure"
4880 #include "confdefs.h"
4882 int main() {
4883 extern int _nl_msg_cat_cntr;
4884 return _nl_msg_cat_cntr
4885 ; return 0; }
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888 rm -rf conftest*
4889 CATOBJEXT=.gmo
4890 DATADIRNAME=share
4891 else
4892 echo "configure: failed program was:" >&5
4893 cat conftest.$ac_ext >&5
4894 rm -rf conftest*
4895 CATOBJEXT=.mo
4896 DATADIRNAME=lib
4898 rm -f conftest*
4899 INSTOBJEXT=.mo
4903 else
4904 echo "$ac_t""no" 1>&6
4909 if test "$CATOBJEXT" = "NONE"; then
4910 nls_cv_use_gnu_gettext=yes
4914 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4915 INTLOBJS="\$(GETTOBJS)"
4916 # Extract the first word of "msgfmt", so it can be a program name with args.
4917 set dummy msgfmt; ac_word=$2
4918 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4919 echo "configure:4920: checking for $ac_word" >&5
4920 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4921 echo $ac_n "(cached) $ac_c" 1>&6
4922 else
4923 case "$MSGFMT" in
4925 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4928 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4929 for ac_dir in $PATH; do
4930 test -z "$ac_dir" && ac_dir=.
4931 if test -f $ac_dir/$ac_word; then
4932 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4933 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4934 break
4937 done
4938 IFS="$ac_save_ifs"
4939 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4941 esac
4943 MSGFMT="$ac_cv_path_MSGFMT"
4944 if test -n "$MSGFMT"; then
4945 echo "$ac_t""$MSGFMT" 1>&6
4946 else
4947 echo "$ac_t""no" 1>&6
4950 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4951 set dummy gmsgfmt; ac_word=$2
4952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4953 echo "configure:4954: checking for $ac_word" >&5
4954 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4955 echo $ac_n "(cached) $ac_c" 1>&6
4956 else
4957 case "$GMSGFMT" in
4959 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4961 ?:/*)
4962 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4965 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4966 ac_dummy="$PATH"
4967 for ac_dir in $ac_dummy; do
4968 test -z "$ac_dir" && ac_dir=.
4969 if test -f $ac_dir/$ac_word; then
4970 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4971 break
4973 done
4974 IFS="$ac_save_ifs"
4975 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4977 esac
4979 GMSGFMT="$ac_cv_path_GMSGFMT"
4980 if test -n "$GMSGFMT"; then
4981 echo "$ac_t""$GMSGFMT" 1>&6
4982 else
4983 echo "$ac_t""no" 1>&6
4986 # Extract the first word of "xgettext", so it can be a program name with args.
4987 set dummy xgettext; ac_word=$2
4988 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4989 echo "configure:4990: checking for $ac_word" >&5
4990 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4991 echo $ac_n "(cached) $ac_c" 1>&6
4992 else
4993 case "$XGETTEXT" in
4995 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4998 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4999 for ac_dir in $PATH; do
5000 test -z "$ac_dir" && ac_dir=.
5001 if test -f $ac_dir/$ac_word; then
5002 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
5003 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
5004 break
5007 done
5008 IFS="$ac_save_ifs"
5009 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
5011 esac
5013 XGETTEXT="$ac_cv_path_XGETTEXT"
5014 if test -n "$XGETTEXT"; then
5015 echo "$ac_t""$XGETTEXT" 1>&6
5016 else
5017 echo "$ac_t""no" 1>&6
5021 USE_INCLUDED_LIBINTL=yes
5022 CATOBJEXT=.gmo
5023 INSTOBJEXT=.mo
5024 DATADIRNAME=share
5025 INTLDEPS='$(top_builddir)/../intl/libintl.a'
5026 INTLLIBS=$INTLDEPS
5027 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
5028 nls_cv_header_intl=libintl.h
5029 nls_cv_header_libgt=libgettext.h
5032 if test "$XGETTEXT" != ":"; then
5033 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
5035 else
5036 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
5037 XGETTEXT=":"
5041 # We need to process the po/ directory.
5042 POSUB=po
5043 else
5044 DATADIRNAME=share
5045 nls_cv_header_intl=libintl.h
5046 nls_cv_header_libgt=libgettext.h
5049 # If this is used in GNU gettext we have to set USE_NLS to `yes'
5050 # because some of the sources are only built for this goal.
5051 if test "$PACKAGE" = gettext; then
5052 USE_NLS=yes
5053 USE_INCLUDED_LIBINTL=yes
5056 for lang in $ALL_LINGUAS; do
5057 GMOFILES="$GMOFILES $lang.gmo"
5058 POFILES="$POFILES $lang.po"
5059 done
5074 if test "x$CATOBJEXT" != "x"; then
5075 if test "x$ALL_LINGUAS" = "x"; then
5076 LINGUAS=
5077 else
5078 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5079 echo "configure:5080: checking for catalogs to be installed" >&5
5080 NEW_LINGUAS=
5081 for lang in ${LINGUAS=$ALL_LINGUAS}; do
5082 case "$ALL_LINGUAS" in
5083 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
5084 esac
5085 done
5086 LINGUAS=$NEW_LINGUAS
5087 echo "$ac_t""$LINGUAS" 1>&6
5090 if test -n "$LINGUAS"; then
5091 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5095 if test $ac_cv_header_locale_h = yes; then
5096 INCLUDE_LOCALE_H="#include <locale.h>"
5097 else
5098 INCLUDE_LOCALE_H="\
5099 /* The system does not provide the header <locale.h>. Take care yourself. */"
5103 if test -f $srcdir/po2tbl.sed.in; then
5104 if test "$CATOBJEXT" = ".cat"; then
5105 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
5106 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5107 echo "configure:5108: checking for linux/version.h" >&5
5108 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5109 echo $ac_n "(cached) $ac_c" 1>&6
5110 else
5111 cat > conftest.$ac_ext <<EOF
5112 #line 5113 "configure"
5113 #include "confdefs.h"
5114 #include <linux/version.h>
5116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5117 { (eval echo configure:5118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5119 if test -z "$ac_err"; then
5120 rm -rf conftest*
5121 eval "ac_cv_header_$ac_safe=yes"
5122 else
5123 echo "$ac_err" >&5
5124 echo "configure: failed program was:" >&5
5125 cat conftest.$ac_ext >&5
5126 rm -rf conftest*
5127 eval "ac_cv_header_$ac_safe=no"
5129 rm -f conftest*
5131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5132 echo "$ac_t""yes" 1>&6
5133 msgformat=linux
5134 else
5135 echo "$ac_t""no" 1>&6
5136 msgformat=xopen
5140 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
5142 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
5143 $srcdir/po2tbl.sed.in > po2tbl.sed
5146 if test "$PACKAGE" = "gettext"; then
5147 GT_NO="#NO#"
5148 GT_YES=
5149 else
5150 GT_NO=
5151 GT_YES="#YES#"
5156 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
5162 if test -d $srcdir/po; then
5163 test -d po || mkdir po
5164 if test "x$srcdir" != "x."; then
5165 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
5166 posrcprefix="$srcdir/"
5167 else
5168 posrcprefix="../$srcdir/"
5170 else
5171 posrcprefix="../"
5173 rm -f po/POTFILES
5174 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
5175 < $srcdir/po/POTFILES.in > po/POTFILES
5179 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
5180 echo "configure:5181: checking whether to enable maintainer-specific portions of Makefiles" >&5
5181 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
5182 if test "${enable_maintainer_mode+set}" = set; then
5183 enableval="$enable_maintainer_mode"
5184 USE_MAINTAINER_MODE=$enableval
5185 else
5186 USE_MAINTAINER_MODE=no
5189 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
5192 if test $USE_MAINTAINER_MODE = yes; then
5193 MAINTAINER_MODE_TRUE=
5194 MAINTAINER_MODE_FALSE='#'
5195 else
5196 MAINTAINER_MODE_TRUE='#'
5197 MAINTAINER_MODE_FALSE=
5199 MAINT=$MAINTAINER_MODE_TRUE
5204 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
5205 echo "configure:5206: checking for executable suffix" >&5
5206 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
5207 echo $ac_n "(cached) $ac_c" 1>&6
5208 else
5209 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
5210 ac_cv_exeext=.exe
5211 else
5212 rm -f conftest*
5213 echo 'int main () { return 0; }' > conftest.$ac_ext
5214 ac_cv_exeext=
5215 if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5216 for file in conftest.*; do
5217 case $file in
5218 *.c | *.o | *.obj) ;;
5219 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
5220 esac
5221 done
5222 else
5223 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
5225 rm -f conftest*
5226 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
5230 EXEEXT=""
5231 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
5232 echo "$ac_t""${ac_cv_exeext}" 1>&6
5233 ac_exeext=$EXEEXT
5236 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
5238 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5239 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5240 echo "configure:5241: checking for $ac_hdr" >&5
5241 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5242 echo $ac_n "(cached) $ac_c" 1>&6
5243 else
5244 cat > conftest.$ac_ext <<EOF
5245 #line 5246 "configure"
5246 #include "confdefs.h"
5247 #include <$ac_hdr>
5249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5250 { (eval echo configure:5251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5252 if test -z "$ac_err"; then
5253 rm -rf conftest*
5254 eval "ac_cv_header_$ac_safe=yes"
5255 else
5256 echo "$ac_err" >&5
5257 echo "configure: failed program was:" >&5
5258 cat conftest.$ac_ext >&5
5259 rm -rf conftest*
5260 eval "ac_cv_header_$ac_safe=no"
5262 rm -f conftest*
5264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5265 echo "$ac_t""yes" 1>&6
5266 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5267 cat >> confdefs.h <<EOF
5268 #define $ac_tr_hdr 1
5271 else
5272 echo "$ac_t""no" 1>&6
5274 done
5277 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
5278 # people who are not cross-compiling but are compiling cross-assemblers.
5279 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
5280 echo "configure:5281: checking whether compiling a cross-assembler" >&5
5281 if test "${host}" = "${target}"; then
5282 cross_gas=no
5283 else
5284 cross_gas=yes
5285 cat >> confdefs.h <<\EOF
5286 #define CROSS_COMPILE 1
5290 echo "$ac_t""$cross_gas" 1>&6
5292 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5293 # for constant arguments. Useless!
5294 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5295 echo "configure:5296: checking for working alloca.h" >&5
5296 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5297 echo $ac_n "(cached) $ac_c" 1>&6
5298 else
5299 cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302 #include <alloca.h>
5303 int main() {
5304 char *p = alloca(2 * sizeof(int));
5305 ; return 0; }
5307 if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5308 rm -rf conftest*
5309 ac_cv_header_alloca_h=yes
5310 else
5311 echo "configure: failed program was:" >&5
5312 cat conftest.$ac_ext >&5
5313 rm -rf conftest*
5314 ac_cv_header_alloca_h=no
5316 rm -f conftest*
5319 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5320 if test $ac_cv_header_alloca_h = yes; then
5321 cat >> confdefs.h <<\EOF
5322 #define HAVE_ALLOCA_H 1
5327 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5328 echo "configure:5329: checking for alloca" >&5
5329 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5330 echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332 cat > conftest.$ac_ext <<EOF
5333 #line 5334 "configure"
5334 #include "confdefs.h"
5336 #ifdef __GNUC__
5337 # define alloca __builtin_alloca
5338 #else
5339 # ifdef _MSC_VER
5340 # include <malloc.h>
5341 # define alloca _alloca
5342 # else
5343 # if HAVE_ALLOCA_H
5344 # include <alloca.h>
5345 # else
5346 # ifdef _AIX
5347 #pragma alloca
5348 # else
5349 # ifndef alloca /* predefined by HP cc +Olibcalls */
5350 char *alloca ();
5351 # endif
5352 # endif
5353 # endif
5354 # endif
5355 #endif
5357 int main() {
5358 char *p = (char *) alloca(1);
5359 ; return 0; }
5361 if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5362 rm -rf conftest*
5363 ac_cv_func_alloca_works=yes
5364 else
5365 echo "configure: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5367 rm -rf conftest*
5368 ac_cv_func_alloca_works=no
5370 rm -f conftest*
5373 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5374 if test $ac_cv_func_alloca_works = yes; then
5375 cat >> confdefs.h <<\EOF
5376 #define HAVE_ALLOCA 1
5381 if test $ac_cv_func_alloca_works = no; then
5382 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5383 # that cause trouble. Some versions do not even contain alloca or
5384 # contain a buggy version. If you still want to use their alloca,
5385 # use ar to extract alloca.o from them instead of compiling alloca.c.
5386 ALLOCA=alloca.${ac_objext}
5387 cat >> confdefs.h <<\EOF
5388 #define C_ALLOCA 1
5392 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5393 echo "configure:5394: checking whether alloca needs Cray hooks" >&5
5394 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5395 echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397 cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5400 #if defined(CRAY) && ! defined(CRAY2)
5401 webecray
5402 #else
5403 wenotbecray
5404 #endif
5407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5408 egrep "webecray" >/dev/null 2>&1; then
5409 rm -rf conftest*
5410 ac_cv_os_cray=yes
5411 else
5412 rm -rf conftest*
5413 ac_cv_os_cray=no
5415 rm -f conftest*
5419 echo "$ac_t""$ac_cv_os_cray" 1>&6
5420 if test $ac_cv_os_cray = yes; then
5421 for ac_func in _getb67 GETB67 getb67; do
5422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5423 echo "configure:5424: checking for $ac_func" >&5
5424 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5425 echo $ac_n "(cached) $ac_c" 1>&6
5426 else
5427 cat > conftest.$ac_ext <<EOF
5428 #line 5429 "configure"
5429 #include "confdefs.h"
5430 /* System header to define __stub macros and hopefully few prototypes,
5431 which can conflict with char $ac_func(); below. */
5432 #include <assert.h>
5433 /* Override any gcc2 internal prototype to avoid an error. */
5434 /* We use char because int might match the return type of a gcc2
5435 builtin and then its argument prototype would still apply. */
5436 char $ac_func();
5438 int main() {
5440 /* The GNU C library defines this for functions which it implements
5441 to always fail with ENOSYS. Some functions are actually named
5442 something starting with __ and the normal name is an alias. */
5443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5444 choke me
5445 #else
5446 $ac_func();
5447 #endif
5449 ; return 0; }
5451 if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5452 rm -rf conftest*
5453 eval "ac_cv_func_$ac_func=yes"
5454 else
5455 echo "configure: failed program was:" >&5
5456 cat conftest.$ac_ext >&5
5457 rm -rf conftest*
5458 eval "ac_cv_func_$ac_func=no"
5460 rm -f conftest*
5463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5464 echo "$ac_t""yes" 1>&6
5465 cat >> confdefs.h <<EOF
5466 #define CRAY_STACKSEG_END $ac_func
5469 break
5470 else
5471 echo "$ac_t""no" 1>&6
5474 done
5477 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5478 echo "configure:5479: checking stack direction for C alloca" >&5
5479 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5480 echo $ac_n "(cached) $ac_c" 1>&6
5481 else
5482 if test "$cross_compiling" = yes; then
5483 ac_cv_c_stack_direction=0
5484 else
5485 cat > conftest.$ac_ext <<EOF
5486 #line 5487 "configure"
5487 #include "confdefs.h"
5488 find_stack_direction ()
5490 static char *addr = 0;
5491 auto char dummy;
5492 if (addr == 0)
5494 addr = &dummy;
5495 return find_stack_direction ();
5497 else
5498 return (&dummy > addr) ? 1 : -1;
5500 main ()
5502 exit (find_stack_direction() < 0);
5505 if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5506 then
5507 ac_cv_c_stack_direction=1
5508 else
5509 echo "configure: failed program was:" >&5
5510 cat conftest.$ac_ext >&5
5511 rm -fr conftest*
5512 ac_cv_c_stack_direction=-1
5514 rm -fr conftest*
5519 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5520 cat >> confdefs.h <<EOF
5521 #define STACK_DIRECTION $ac_cv_c_stack_direction
5526 echo $ac_n "checking for inline""... $ac_c" 1>&6
5527 echo "configure:5528: checking for inline" >&5
5528 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5529 echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531 ac_cv_c_inline=no
5532 for ac_kw in inline __inline__ __inline; do
5533 cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5537 int main() {
5538 } $ac_kw foo() {
5539 ; return 0; }
5541 if { (eval echo configure:5542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5542 rm -rf conftest*
5543 ac_cv_c_inline=$ac_kw; break
5544 else
5545 echo "configure: failed program was:" >&5
5546 cat conftest.$ac_ext >&5
5548 rm -f conftest*
5549 done
5553 echo "$ac_t""$ac_cv_c_inline" 1>&6
5554 case "$ac_cv_c_inline" in
5555 inline | yes) ;;
5556 no) cat >> confdefs.h <<\EOF
5557 #define inline
5560 *) cat >> confdefs.h <<EOF
5561 #define inline $ac_cv_c_inline
5564 esac
5567 # VMS doesn't have unlink.
5568 for ac_func in unlink remove
5570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5571 echo "configure:5572: checking for $ac_func" >&5
5572 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5573 echo $ac_n "(cached) $ac_c" 1>&6
5574 else
5575 cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578 /* System header to define __stub macros and hopefully few prototypes,
5579 which can conflict with char $ac_func(); below. */
5580 #include <assert.h>
5581 /* Override any gcc2 internal prototype to avoid an error. */
5582 /* We use char because int might match the return type of a gcc2
5583 builtin and then its argument prototype would still apply. */
5584 char $ac_func();
5586 int main() {
5588 /* The GNU C library defines this for functions which it implements
5589 to always fail with ENOSYS. Some functions are actually named
5590 something starting with __ and the normal name is an alias. */
5591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5592 choke me
5593 #else
5594 $ac_func();
5595 #endif
5597 ; return 0; }
5599 if { (eval echo configure:5600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5600 rm -rf conftest*
5601 eval "ac_cv_func_$ac_func=yes"
5602 else
5603 echo "configure: failed program was:" >&5
5604 cat conftest.$ac_ext >&5
5605 rm -rf conftest*
5606 eval "ac_cv_func_$ac_func=no"
5608 rm -f conftest*
5611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5612 echo "$ac_t""yes" 1>&6
5613 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5614 cat >> confdefs.h <<EOF
5615 #define $ac_tr_func 1
5617 break
5618 else
5619 echo "$ac_t""no" 1>&6
5621 done
5624 # Some systems don't have sbrk().
5625 for ac_func in sbrk
5627 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5628 echo "configure:5629: checking for $ac_func" >&5
5629 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5630 echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632 cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635 /* System header to define __stub macros and hopefully few prototypes,
5636 which can conflict with char $ac_func(); below. */
5637 #include <assert.h>
5638 /* Override any gcc2 internal prototype to avoid an error. */
5639 /* We use char because int might match the return type of a gcc2
5640 builtin and then its argument prototype would still apply. */
5641 char $ac_func();
5643 int main() {
5645 /* The GNU C library defines this for functions which it implements
5646 to always fail with ENOSYS. Some functions are actually named
5647 something starting with __ and the normal name is an alias. */
5648 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5649 choke me
5650 #else
5651 $ac_func();
5652 #endif
5654 ; return 0; }
5656 if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5657 rm -rf conftest*
5658 eval "ac_cv_func_$ac_func=yes"
5659 else
5660 echo "configure: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5662 rm -rf conftest*
5663 eval "ac_cv_func_$ac_func=no"
5665 rm -f conftest*
5668 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5669 echo "$ac_t""yes" 1>&6
5670 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5671 cat >> confdefs.h <<EOF
5672 #define $ac_tr_func 1
5675 else
5676 echo "$ac_t""no" 1>&6
5678 done
5681 # do we need the math library?
5682 case "${need_libm}" in
5683 yes)
5684 LIBM=
5685 case "$host" in
5686 *-*-beos* | *-*-cygwin*)
5687 # These system don't have libm
5689 *-ncr-sysv4.3*)
5690 echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6
5691 echo "configure:5692: checking for _mwvalidcheckl in -lmw" >&5
5692 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'`
5693 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5694 echo $ac_n "(cached) $ac_c" 1>&6
5695 else
5696 ac_save_LIBS="$LIBS"
5697 LIBS="-lmw $LIBS"
5698 cat > conftest.$ac_ext <<EOF
5699 #line 5700 "configure"
5700 #include "confdefs.h"
5701 /* Override any gcc2 internal prototype to avoid an error. */
5702 /* We use char because int might match the return type of a gcc2
5703 builtin and then its argument prototype would still apply. */
5704 char _mwvalidcheckl();
5706 int main() {
5707 _mwvalidcheckl()
5708 ; return 0; }
5710 if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5711 rm -rf conftest*
5712 eval "ac_cv_lib_$ac_lib_var=yes"
5713 else
5714 echo "configure: failed program was:" >&5
5715 cat conftest.$ac_ext >&5
5716 rm -rf conftest*
5717 eval "ac_cv_lib_$ac_lib_var=no"
5719 rm -f conftest*
5720 LIBS="$ac_save_LIBS"
5723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5724 echo "$ac_t""yes" 1>&6
5725 LIBM="-lmw"
5726 else
5727 echo "$ac_t""no" 1>&6
5730 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
5731 echo "configure:5732: checking for main in -lm" >&5
5732 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5733 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5734 echo $ac_n "(cached) $ac_c" 1>&6
5735 else
5736 ac_save_LIBS="$LIBS"
5737 LIBS="-lm $LIBS"
5738 cat > conftest.$ac_ext <<EOF
5739 #line 5740 "configure"
5740 #include "confdefs.h"
5742 int main() {
5743 main()
5744 ; return 0; }
5746 if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5747 rm -rf conftest*
5748 eval "ac_cv_lib_$ac_lib_var=yes"
5749 else
5750 echo "configure: failed program was:" >&5
5751 cat conftest.$ac_ext >&5
5752 rm -rf conftest*
5753 eval "ac_cv_lib_$ac_lib_var=no"
5755 rm -f conftest*
5756 LIBS="$ac_save_LIBS"
5759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5760 echo "$ac_t""yes" 1>&6
5761 LIBM="$LIBM -lm"
5762 else
5763 echo "$ac_t""no" 1>&6
5768 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
5769 echo "configure:5770: checking for main in -lm" >&5
5770 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5772 echo $ac_n "(cached) $ac_c" 1>&6
5773 else
5774 ac_save_LIBS="$LIBS"
5775 LIBS="-lm $LIBS"
5776 cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5780 int main() {
5781 main()
5782 ; return 0; }
5784 if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5785 rm -rf conftest*
5786 eval "ac_cv_lib_$ac_lib_var=yes"
5787 else
5788 echo "configure: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
5790 rm -rf conftest*
5791 eval "ac_cv_lib_$ac_lib_var=no"
5793 rm -f conftest*
5794 LIBS="$ac_save_LIBS"
5797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5798 echo "$ac_t""yes" 1>&6
5799 LIBM="-lm"
5800 else
5801 echo "$ac_t""no" 1>&6
5805 esac
5809 esac
5811 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
5812 # enough, but on some of those systems, the assert macro relies on requoting
5813 # working properly!
5814 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
5815 echo "configure:5816: checking for working assert macro" >&5
5816 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
5817 echo $ac_n "(cached) $ac_c" 1>&6
5818 else
5819 cat > conftest.$ac_ext <<EOF
5820 #line 5821 "configure"
5821 #include "confdefs.h"
5822 #include <assert.h>
5823 #include <stdio.h>
5824 int main() {
5826 /* check for requoting problems */
5827 static int a, b, c, d;
5828 static char *s;
5829 assert (!strcmp(s, "foo bar baz quux"));
5830 /* check for newline handling */
5831 assert (a == b
5832 || c == d);
5834 ; return 0; }
5836 if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5837 rm -rf conftest*
5838 gas_cv_assert_ok=yes
5839 else
5840 echo "configure: failed program was:" >&5
5841 cat conftest.$ac_ext >&5
5842 rm -rf conftest*
5843 gas_cv_assert_ok=no
5845 rm -f conftest*
5847 echo "$ac_t""$gas_cv_assert_ok" 1>&6
5848 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
5849 #define BROKEN_ASSERT 1
5854 # On some systems, the system header files may not declare malloc, realloc,
5855 # and free. There are places where gas needs these functions to have been
5856 # declared -- such as when taking their addresses.
5857 gas_test_headers="
5858 #ifdef HAVE_MEMORY_H
5859 #include <memory.h>
5860 #endif
5861 #ifdef HAVE_STRING_H
5862 #include <string.h>
5863 #else
5864 #ifdef HAVE_STRINGS_H
5865 #include <strings.h>
5866 #endif
5867 #endif
5868 #ifdef HAVE_STDLIB_H
5869 #include <stdlib.h>
5870 #endif
5871 #ifdef HAVE_UNISTD_H
5872 #include <unistd.h>
5873 #endif
5876 echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
5877 echo "configure:5878: checking whether declaration is required for strstr" >&5
5878 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
5879 echo $ac_n "(cached) $ac_c" 1>&6
5880 else
5881 cat > conftest.$ac_ext <<EOF
5882 #line 5883 "configure"
5883 #include "confdefs.h"
5884 $gas_test_headers
5885 int main() {
5887 typedef char *(*f)();
5888 f x;
5889 x = (f) strstr;
5891 ; return 0; }
5893 if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5894 rm -rf conftest*
5895 gas_cv_decl_needed_strstr=no
5896 else
5897 echo "configure: failed program was:" >&5
5898 cat conftest.$ac_ext >&5
5899 rm -rf conftest*
5900 gas_cv_decl_needed_strstr=yes
5902 rm -f conftest*
5904 echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
5905 if test $gas_cv_decl_needed_strstr = yes; then
5906 cat >> confdefs.h <<\EOF
5907 #define NEED_DECLARATION_STRSTR 1
5913 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
5914 echo "configure:5915: checking whether declaration is required for malloc" >&5
5915 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
5916 echo $ac_n "(cached) $ac_c" 1>&6
5917 else
5918 cat > conftest.$ac_ext <<EOF
5919 #line 5920 "configure"
5920 #include "confdefs.h"
5921 $gas_test_headers
5922 int main() {
5924 typedef char *(*f)();
5925 f x;
5926 x = (f) malloc;
5928 ; return 0; }
5930 if { (eval echo configure:5931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5931 rm -rf conftest*
5932 gas_cv_decl_needed_malloc=no
5933 else
5934 echo "configure: failed program was:" >&5
5935 cat conftest.$ac_ext >&5
5936 rm -rf conftest*
5937 gas_cv_decl_needed_malloc=yes
5939 rm -f conftest*
5941 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
5942 if test $gas_cv_decl_needed_malloc = yes; then
5943 cat >> confdefs.h <<\EOF
5944 #define NEED_DECLARATION_MALLOC 1
5950 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
5951 echo "configure:5952: checking whether declaration is required for free" >&5
5952 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
5953 echo $ac_n "(cached) $ac_c" 1>&6
5954 else
5955 cat > conftest.$ac_ext <<EOF
5956 #line 5957 "configure"
5957 #include "confdefs.h"
5958 $gas_test_headers
5959 int main() {
5961 typedef void (*f)();
5962 f x;
5963 x = (f) free;
5965 ; return 0; }
5967 if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5968 rm -rf conftest*
5969 gas_cv_decl_needed_free=no
5970 else
5971 echo "configure: failed program was:" >&5
5972 cat conftest.$ac_ext >&5
5973 rm -rf conftest*
5974 gas_cv_decl_needed_free=yes
5976 rm -f conftest*
5978 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
5979 if test $gas_cv_decl_needed_free = yes; then
5980 cat >> confdefs.h <<\EOF
5981 #define NEED_DECLARATION_FREE 1
5987 echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
5988 echo "configure:5989: checking whether declaration is required for sbrk" >&5
5989 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
5990 echo $ac_n "(cached) $ac_c" 1>&6
5991 else
5992 cat > conftest.$ac_ext <<EOF
5993 #line 5994 "configure"
5994 #include "confdefs.h"
5995 $gas_test_headers
5996 int main() {
5998 typedef char *(*f)();
5999 f x;
6000 x = (f) sbrk;
6002 ; return 0; }
6004 if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6005 rm -rf conftest*
6006 gas_cv_decl_needed_sbrk=no
6007 else
6008 echo "configure: failed program was:" >&5
6009 cat conftest.$ac_ext >&5
6010 rm -rf conftest*
6011 gas_cv_decl_needed_sbrk=yes
6013 rm -f conftest*
6015 echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
6016 if test $gas_cv_decl_needed_sbrk = yes; then
6017 cat >> confdefs.h <<\EOF
6018 #define NEED_DECLARATION_SBRK 1
6024 echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
6025 echo "configure:6026: checking whether declaration is required for environ" >&5
6026 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then
6027 echo $ac_n "(cached) $ac_c" 1>&6
6028 else
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032 $gas_test_headers
6033 int main() {
6035 typedef char **f;
6036 f x;
6037 x = (f) environ;
6039 ; return 0; }
6041 if { (eval echo configure:6042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6042 rm -rf conftest*
6043 gas_cv_decl_needed_environ=no
6044 else
6045 echo "configure: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047 rm -rf conftest*
6048 gas_cv_decl_needed_environ=yes
6050 rm -f conftest*
6052 echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6
6053 if test $gas_cv_decl_needed_environ = yes; then
6054 cat >> confdefs.h <<\EOF
6055 #define NEED_DECLARATION_ENVIRON 1
6061 # Does errno.h declare errno, or do we have to add a separate declaration
6062 # for it?
6064 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
6065 echo "configure:6066: checking whether declaration is required for errno" >&5
6066 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
6067 echo $ac_n "(cached) $ac_c" 1>&6
6068 else
6069 cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6073 #ifdef HAVE_ERRNO_H
6074 #include <errno.h>
6075 #endif
6077 int main() {
6079 typedef int f;
6080 f x;
6081 x = (f) errno;
6083 ; return 0; }
6085 if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6086 rm -rf conftest*
6087 gas_cv_decl_needed_errno=no
6088 else
6089 echo "configure: failed program was:" >&5
6090 cat conftest.$ac_ext >&5
6091 rm -rf conftest*
6092 gas_cv_decl_needed_errno=yes
6094 rm -f conftest*
6096 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
6097 if test $gas_cv_decl_needed_errno = yes; then
6098 cat >> confdefs.h <<\EOF
6099 #define NEED_DECLARATION_ERRNO 1
6107 trap '' 1 2 15
6108 cat > confcache <<\EOF
6109 # This file is a shell script that caches the results of configure
6110 # tests run on this system so they can be shared between configure
6111 # scripts and configure runs. It is not useful on other systems.
6112 # If it contains results you don't want to keep, you may remove or edit it.
6114 # By default, configure uses ./config.cache as the cache file,
6115 # creating it if it does not exist already. You can give configure
6116 # the --cache-file=FILE option to use a different cache file; that is
6117 # what configure does when it calls configure scripts in
6118 # subdirectories, so they share the cache.
6119 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6120 # config.status only pays attention to the cache file if you give it the
6121 # --recheck option to rerun configure.
6124 # The following way of writing the cache mishandles newlines in values,
6125 # but we know of no workaround that is simple, portable, and efficient.
6126 # So, don't put newlines in cache variables' values.
6127 # Ultrix sh set writes to stderr and can't be redirected directly,
6128 # and sets the high bit in the cache file unless we assign to the vars.
6129 (set) 2>&1 |
6130 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6131 *ac_space=\ *)
6132 # `set' does not quote correctly, so add quotes (double-quote substitution
6133 # turns \\\\ into \\, and sed turns \\ into \).
6134 sed -n \
6135 -e "s/'/'\\\\''/g" \
6136 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6139 # `set' quotes correctly as required by POSIX, so do not add quotes.
6140 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6142 esac >> confcache
6143 if cmp -s $cache_file confcache; then
6145 else
6146 if test -w $cache_file; then
6147 echo "updating cache $cache_file"
6148 cat confcache > $cache_file
6149 else
6150 echo "not updating unwritable cache $cache_file"
6153 rm -f confcache
6155 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6157 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6158 # Let make expand exec_prefix.
6159 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6161 # Any assignment to VPATH causes Sun make to only execute
6162 # the first set of double-colon rules, so remove it if not needed.
6163 # If there is a colon in the path, we need to keep it.
6164 if test "x$srcdir" = x.; then
6165 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6168 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6170 DEFS=-DHAVE_CONFIG_H
6172 # Without the "./", some shells look in PATH for config.status.
6173 : ${CONFIG_STATUS=./config.status}
6175 echo creating $CONFIG_STATUS
6176 rm -f $CONFIG_STATUS
6177 cat > $CONFIG_STATUS <<EOF
6178 #! /bin/sh
6179 # Generated automatically by configure.
6180 # Run this file to recreate the current configuration.
6181 # This directory was configured as follows,
6182 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6184 # $0 $ac_configure_args
6186 # Compiler output produced by configure, useful for debugging
6187 # configure, is in ./config.log if it exists.
6189 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6190 for ac_option
6192 case "\$ac_option" in
6193 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6194 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6195 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6196 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6197 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6198 exit 0 ;;
6199 -help | --help | --hel | --he | --h)
6200 echo "\$ac_cs_usage"; exit 0 ;;
6201 *) echo "\$ac_cs_usage"; exit 1 ;;
6202 esac
6203 done
6205 ac_given_srcdir=$srcdir
6206 ac_given_INSTALL="$INSTALL"
6208 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
6210 cat >> $CONFIG_STATUS <<EOF
6212 # Protect against being on the right side of a sed subst in config.status.
6213 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6214 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6215 $ac_vpsub
6216 $extrasub
6217 s%@SHELL@%$SHELL%g
6218 s%@CFLAGS@%$CFLAGS%g
6219 s%@CPPFLAGS@%$CPPFLAGS%g
6220 s%@CXXFLAGS@%$CXXFLAGS%g
6221 s%@FFLAGS@%$FFLAGS%g
6222 s%@DEFS@%$DEFS%g
6223 s%@LDFLAGS@%$LDFLAGS%g
6224 s%@LIBS@%$LIBS%g
6225 s%@exec_prefix@%$exec_prefix%g
6226 s%@prefix@%$prefix%g
6227 s%@program_transform_name@%$program_transform_name%g
6228 s%@bindir@%$bindir%g
6229 s%@sbindir@%$sbindir%g
6230 s%@libexecdir@%$libexecdir%g
6231 s%@datadir@%$datadir%g
6232 s%@sysconfdir@%$sysconfdir%g
6233 s%@sharedstatedir@%$sharedstatedir%g
6234 s%@localstatedir@%$localstatedir%g
6235 s%@libdir@%$libdir%g
6236 s%@includedir@%$includedir%g
6237 s%@oldincludedir@%$oldincludedir%g
6238 s%@infodir@%$infodir%g
6239 s%@mandir@%$mandir%g
6240 s%@host@%$host%g
6241 s%@host_alias@%$host_alias%g
6242 s%@host_cpu@%$host_cpu%g
6243 s%@host_vendor@%$host_vendor%g
6244 s%@host_os@%$host_os%g
6245 s%@target@%$target%g
6246 s%@target_alias@%$target_alias%g
6247 s%@target_cpu@%$target_cpu%g
6248 s%@target_vendor@%$target_vendor%g
6249 s%@target_os@%$target_os%g
6250 s%@build@%$build%g
6251 s%@build_alias@%$build_alias%g
6252 s%@build_cpu@%$build_cpu%g
6253 s%@build_vendor@%$build_vendor%g
6254 s%@build_os@%$build_os%g
6255 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6256 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6257 s%@INSTALL_DATA@%$INSTALL_DATA%g
6258 s%@PACKAGE@%$PACKAGE%g
6259 s%@VERSION@%$VERSION%g
6260 s%@ACLOCAL@%$ACLOCAL%g
6261 s%@AUTOCONF@%$AUTOCONF%g
6262 s%@AUTOMAKE@%$AUTOMAKE%g
6263 s%@AUTOHEADER@%$AUTOHEADER%g
6264 s%@MAKEINFO@%$MAKEINFO%g
6265 s%@SET_MAKE@%$SET_MAKE%g
6266 s%@CC@%$CC%g
6267 s%@LN_S@%$LN_S%g
6268 s%@OBJEXT@%$OBJEXT%g
6269 s%@EXEEXT@%$EXEEXT%g
6270 s%@RANLIB@%$RANLIB%g
6271 s%@STRIP@%$STRIP%g
6272 s%@LIBTOOL@%$LIBTOOL%g
6273 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
6274 s%@GDBINIT@%$GDBINIT%g
6275 s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
6276 s%@extra_objects@%$extra_objects%g
6277 s%@target_cpu_type@%$target_cpu_type%g
6278 s%@obj_format@%$obj_format%g
6279 s%@te_file@%$te_file%g
6280 s%@install_tooldir@%$install_tooldir%g
6281 s%@atof@%$atof%g
6282 s%@BFDLIB@%$BFDLIB%g
6283 s%@OPCODES_LIB@%$OPCODES_LIB%g
6284 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
6285 s%@YACC@%$YACC%g
6286 s%@LEX@%$LEX%g
6287 s%@LEXLIB@%$LEXLIB%g
6288 s%@CPP@%$CPP%g
6289 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
6290 s%@ALLOCA@%$ALLOCA%g
6291 s%@USE_NLS@%$USE_NLS%g
6292 s%@MSGFMT@%$MSGFMT%g
6293 s%@GMSGFMT@%$GMSGFMT%g
6294 s%@XGETTEXT@%$XGETTEXT%g
6295 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6296 s%@CATALOGS@%$CATALOGS%g
6297 s%@CATOBJEXT@%$CATOBJEXT%g
6298 s%@DATADIRNAME@%$DATADIRNAME%g
6299 s%@GMOFILES@%$GMOFILES%g
6300 s%@INSTOBJEXT@%$INSTOBJEXT%g
6301 s%@INTLDEPS@%$INTLDEPS%g
6302 s%@INTLLIBS@%$INTLLIBS%g
6303 s%@INTLOBJS@%$INTLOBJS%g
6304 s%@POFILES@%$POFILES%g
6305 s%@POSUB@%$POSUB%g
6306 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6307 s%@GT_NO@%$GT_NO%g
6308 s%@GT_YES@%$GT_YES%g
6309 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6310 s%@l@%$l%g
6311 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6312 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6313 s%@MAINT@%$MAINT%g
6314 s%@LIBM@%$LIBM%g
6316 CEOF
6319 cat >> $CONFIG_STATUS <<\EOF
6321 # Split the substitutions into bite-sized pieces for seds with
6322 # small command number limits, like on Digital OSF/1 and HP-UX.
6323 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6324 ac_file=1 # Number of current file.
6325 ac_beg=1 # First line for current file.
6326 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6327 ac_more_lines=:
6328 ac_sed_cmds=""
6329 while $ac_more_lines; do
6330 if test $ac_beg -gt 1; then
6331 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6332 else
6333 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6335 if test ! -s conftest.s$ac_file; then
6336 ac_more_lines=false
6337 rm -f conftest.s$ac_file
6338 else
6339 if test -z "$ac_sed_cmds"; then
6340 ac_sed_cmds="sed -f conftest.s$ac_file"
6341 else
6342 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6344 ac_file=`expr $ac_file + 1`
6345 ac_beg=$ac_end
6346 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6348 done
6349 if test -z "$ac_sed_cmds"; then
6350 ac_sed_cmds=cat
6354 cat >> $CONFIG_STATUS <<EOF
6356 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in"}
6358 cat >> $CONFIG_STATUS <<\EOF
6359 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6360 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6361 case "$ac_file" in
6362 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6363 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6364 *) ac_file_in="${ac_file}.in" ;;
6365 esac
6367 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6369 # Remove last slash and all that follows it. Not all systems have dirname.
6370 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6371 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6372 # The file is in a subdirectory.
6373 test ! -d "$ac_dir" && mkdir "$ac_dir"
6374 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6375 # A "../" for each directory in $ac_dir_suffix.
6376 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6377 else
6378 ac_dir_suffix= ac_dots=
6381 case "$ac_given_srcdir" in
6382 .) srcdir=.
6383 if test -z "$ac_dots"; then top_srcdir=.
6384 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6385 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6386 *) # Relative path.
6387 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6388 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6389 esac
6391 case "$ac_given_INSTALL" in
6392 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6393 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6394 esac
6396 echo creating "$ac_file"
6397 rm -f "$ac_file"
6398 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6399 case "$ac_file" in
6400 *Makefile*) ac_comsub="1i\\
6401 # $configure_input" ;;
6402 *) ac_comsub= ;;
6403 esac
6405 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6406 sed -e "$ac_comsub
6407 s%@configure_input@%$configure_input%g
6408 s%@srcdir@%$srcdir%g
6409 s%@top_srcdir@%$top_srcdir%g
6410 s%@INSTALL@%$INSTALL%g
6411 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6412 fi; done
6413 rm -f conftest.s*
6415 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6416 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6418 # ac_d sets the value in "#define NAME VALUE" lines.
6419 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6420 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6421 ac_dC='\3'
6422 ac_dD='%g'
6423 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6424 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6425 ac_uB='\([ ]\)%\1#\2define\3'
6426 ac_uC=' '
6427 ac_uD='\4%g'
6428 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6429 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6430 ac_eB='$%\1#\2define\3'
6431 ac_eC=' '
6432 ac_eD='%g'
6434 if test "${CONFIG_HEADERS+set}" != set; then
6436 cat >> $CONFIG_STATUS <<EOF
6437 CONFIG_HEADERS="config.h:config.in"
6439 cat >> $CONFIG_STATUS <<\EOF
6441 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6442 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6443 case "$ac_file" in
6444 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6445 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6446 *) ac_file_in="${ac_file}.in" ;;
6447 esac
6449 echo creating $ac_file
6451 rm -f conftest.frag conftest.in conftest.out
6452 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6453 cat $ac_file_inputs > conftest.in
6457 # Transform confdefs.h into a sed script conftest.vals that substitutes
6458 # the proper values into config.h.in to produce config.h. And first:
6459 # Protect against being on the right side of a sed subst in config.status.
6460 # Protect against being in an unquoted here document in config.status.
6461 rm -f conftest.vals
6462 cat > conftest.hdr <<\EOF
6463 s/[\\&%]/\\&/g
6464 s%[\\$`]%\\&%g
6465 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6466 s%ac_d%ac_u%gp
6467 s%ac_u%ac_e%gp
6469 sed -n -f conftest.hdr confdefs.h > conftest.vals
6470 rm -f conftest.hdr
6472 # This sed command replaces #undef with comments. This is necessary, for
6473 # example, in the case of _POSIX_SOURCE, which is predefined and required
6474 # on some systems where configure will not decide to define it.
6475 cat >> conftest.vals <<\EOF
6476 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6479 # Break up conftest.vals because some shells have a limit on
6480 # the size of here documents, and old seds have small limits too.
6482 rm -f conftest.tail
6483 while :
6485 ac_lines=`grep -c . conftest.vals`
6486 # grep -c gives empty output for an empty file on some AIX systems.
6487 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6488 # Write a limited-size here document to conftest.frag.
6489 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6490 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6491 echo 'CEOF
6492 sed -f conftest.frag conftest.in > conftest.out
6493 rm -f conftest.in
6494 mv conftest.out conftest.in
6495 ' >> $CONFIG_STATUS
6496 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6497 rm -f conftest.vals
6498 mv conftest.tail conftest.vals
6499 done
6500 rm -f conftest.vals
6502 cat >> $CONFIG_STATUS <<\EOF
6503 rm -f conftest.frag conftest.h
6504 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6505 cat conftest.in >> conftest.h
6506 rm -f conftest.in
6507 if cmp -s $ac_file conftest.h 2>/dev/null; then
6508 echo "$ac_file is unchanged"
6509 rm -f conftest.h
6510 else
6511 # Remove last slash and all that follows it. Not all systems have dirname.
6512 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6513 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6514 # The file is in a subdirectory.
6515 test ! -d "$ac_dir" && mkdir "$ac_dir"
6517 rm -f $ac_file
6518 mv conftest.h $ac_file
6520 fi; done
6523 cat >> $CONFIG_STATUS <<EOF
6525 target_cpu_type=${target_cpu_type}
6526 cgen_cpu_prefix=${cgen_cpu_prefix}
6527 obj_format=${obj_format}
6528 te_file=${te_file}
6530 cat >> $CONFIG_STATUS <<\EOF
6531 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6532 rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
6533 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
6534 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
6535 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
6536 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
6537 if test "x$cgen_cpu_prefix" != x ; then
6538 echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
6541 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
6542 exit 0
6544 chmod +x $CONFIG_STATUS
6545 rm -fr confdefs* $ac_clean_files
6546 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1