Initial revision
[binutils.git] / gas / configure
blobb8eefe4a591a1a031c9105247968415e2d05b3d1
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 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
20 ac_help="$ac_help
21 --enable-bfd-assembler use BFD back end for writing object files"
22 ac_help="$ac_help
23 targets alternative target configurations besides the primary"
24 ac_help="$ac_help
25 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
26 ac_help="$ac_help
27 --disable-nls do not use Native Language Support"
28 ac_help="$ac_help
29 --with-included-gettext use the GNU gettext library included here"
30 ac_help="$ac_help
31 --enable-maintainer-mode enable make rules and dependencies not useful
32 (and sometimes confusing) to the casual installer"
34 # Initialize some variables set by options.
35 # The variables have the same names as the options, with
36 # dashes changed to underlines.
37 build=NONE
38 cache_file=./config.cache
39 exec_prefix=NONE
40 host=NONE
41 no_create=
42 nonopt=NONE
43 no_recursion=
44 prefix=NONE
45 program_prefix=NONE
46 program_suffix=NONE
47 program_transform_name=s,x,x,
48 silent=
49 site=
50 srcdir=
51 target=NONE
52 verbose=
53 x_includes=NONE
54 x_libraries=NONE
55 bindir='${exec_prefix}/bin'
56 sbindir='${exec_prefix}/sbin'
57 libexecdir='${exec_prefix}/libexec'
58 datadir='${prefix}/share'
59 sysconfdir='${prefix}/etc'
60 sharedstatedir='${prefix}/com'
61 localstatedir='${prefix}/var'
62 libdir='${exec_prefix}/lib'
63 includedir='${prefix}/include'
64 oldincludedir='/usr/include'
65 infodir='${prefix}/info'
66 mandir='${prefix}/man'
68 # Initialize some other variables.
69 subdirs=
70 MFLAGS= MAKEFLAGS=
71 SHELL=${CONFIG_SHELL-/bin/sh}
72 # Maximum number of lines to put in a shell here document.
73 ac_max_here_lines=12
75 ac_prev=
76 for ac_option
79 # If the previous option needs an argument, assign it.
80 if test -n "$ac_prev"; then
81 eval "$ac_prev=\$ac_option"
82 ac_prev=
83 continue
86 case "$ac_option" in
87 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
88 *) ac_optarg= ;;
89 esac
91 # Accept the important Cygnus configure options, so we can diagnose typos.
93 case "$ac_option" in
95 -bindir | --bindir | --bindi | --bind | --bin | --bi)
96 ac_prev=bindir ;;
97 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
98 bindir="$ac_optarg" ;;
100 -build | --build | --buil | --bui | --bu)
101 ac_prev=build ;;
102 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
103 build="$ac_optarg" ;;
105 -cache-file | --cache-file | --cache-fil | --cache-fi \
106 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
107 ac_prev=cache_file ;;
108 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
109 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
110 cache_file="$ac_optarg" ;;
112 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
113 ac_prev=datadir ;;
114 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
115 | --da=*)
116 datadir="$ac_optarg" ;;
118 -disable-* | --disable-*)
119 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
120 # Reject names that are not valid shell variable names.
121 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
122 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
124 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125 eval "enable_${ac_feature}=no" ;;
127 -enable-* | --enable-*)
128 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
129 # Reject names that are not valid shell variable names.
130 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
131 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134 case "$ac_option" in
135 *=*) ;;
136 *) ac_optarg=yes ;;
137 esac
138 eval "enable_${ac_feature}='$ac_optarg'" ;;
140 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
141 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
142 | --exec | --exe | --ex)
143 ac_prev=exec_prefix ;;
144 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
145 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
146 | --exec=* | --exe=* | --ex=*)
147 exec_prefix="$ac_optarg" ;;
149 -gas | --gas | --ga | --g)
150 # Obsolete; use --with-gas.
151 with_gas=yes ;;
153 -help | --help | --hel | --he)
154 # Omit some internal or obsolete options to make the list less imposing.
155 # This message is too long to be a string in the A/UX 3.1 sh.
156 cat << EOF
157 Usage: configure [options] [host]
158 Options: [defaults in brackets after descriptions]
159 Configuration:
160 --cache-file=FILE cache test results in FILE
161 --help print this message
162 --no-create do not create output files
163 --quiet, --silent do not print \`checking...' messages
164 --version print the version of autoconf that created configure
165 Directory and file names:
166 --prefix=PREFIX install architecture-independent files in PREFIX
167 [$ac_default_prefix]
168 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
169 [same as prefix]
170 --bindir=DIR user executables in DIR [EPREFIX/bin]
171 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
172 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
173 --datadir=DIR read-only architecture-independent data in DIR
174 [PREFIX/share]
175 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
176 --sharedstatedir=DIR modifiable architecture-independent data in DIR
177 [PREFIX/com]
178 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
179 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
180 --includedir=DIR C header files in DIR [PREFIX/include]
181 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
182 --infodir=DIR info documentation in DIR [PREFIX/info]
183 --mandir=DIR man documentation in DIR [PREFIX/man]
184 --srcdir=DIR find the sources in DIR [configure dir or ..]
185 --program-prefix=PREFIX prepend PREFIX to installed program names
186 --program-suffix=SUFFIX append SUFFIX to installed program names
187 --program-transform-name=PROGRAM
188 run sed PROGRAM on installed program names
190 cat << EOF
191 Host type:
192 --build=BUILD configure for building on BUILD [BUILD=HOST]
193 --host=HOST configure for HOST [guessed]
194 --target=TARGET configure for TARGET [TARGET=HOST]
195 Features and packages:
196 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
197 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
198 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
199 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
200 --x-includes=DIR X include files are in DIR
201 --x-libraries=DIR X library files are in DIR
203 if test -n "$ac_help"; then
204 echo "--enable and --with options recognized:$ac_help"
206 exit 0 ;;
208 -host | --host | --hos | --ho)
209 ac_prev=host ;;
210 -host=* | --host=* | --hos=* | --ho=*)
211 host="$ac_optarg" ;;
213 -includedir | --includedir | --includedi | --included | --include \
214 | --includ | --inclu | --incl | --inc)
215 ac_prev=includedir ;;
216 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
217 | --includ=* | --inclu=* | --incl=* | --inc=*)
218 includedir="$ac_optarg" ;;
220 -infodir | --infodir | --infodi | --infod | --info | --inf)
221 ac_prev=infodir ;;
222 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
223 infodir="$ac_optarg" ;;
225 -libdir | --libdir | --libdi | --libd)
226 ac_prev=libdir ;;
227 -libdir=* | --libdir=* | --libdi=* | --libd=*)
228 libdir="$ac_optarg" ;;
230 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
231 | --libexe | --libex | --libe)
232 ac_prev=libexecdir ;;
233 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
234 | --libexe=* | --libex=* | --libe=*)
235 libexecdir="$ac_optarg" ;;
237 -localstatedir | --localstatedir | --localstatedi | --localstated \
238 | --localstate | --localstat | --localsta | --localst \
239 | --locals | --local | --loca | --loc | --lo)
240 ac_prev=localstatedir ;;
241 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
242 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
243 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
244 localstatedir="$ac_optarg" ;;
246 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
247 ac_prev=mandir ;;
248 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
249 mandir="$ac_optarg" ;;
251 -nfp | --nfp | --nf)
252 # Obsolete; use --without-fp.
253 with_fp=no ;;
255 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
256 | --no-cr | --no-c)
257 no_create=yes ;;
259 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
260 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
261 no_recursion=yes ;;
263 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
264 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
265 | --oldin | --oldi | --old | --ol | --o)
266 ac_prev=oldincludedir ;;
267 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
268 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
269 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
270 oldincludedir="$ac_optarg" ;;
272 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
273 ac_prev=prefix ;;
274 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
275 prefix="$ac_optarg" ;;
277 -program-prefix | --program-prefix | --program-prefi | --program-pref \
278 | --program-pre | --program-pr | --program-p)
279 ac_prev=program_prefix ;;
280 -program-prefix=* | --program-prefix=* | --program-prefi=* \
281 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
282 program_prefix="$ac_optarg" ;;
284 -program-suffix | --program-suffix | --program-suffi | --program-suff \
285 | --program-suf | --program-su | --program-s)
286 ac_prev=program_suffix ;;
287 -program-suffix=* | --program-suffix=* | --program-suffi=* \
288 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
289 program_suffix="$ac_optarg" ;;
291 -program-transform-name | --program-transform-name \
292 | --program-transform-nam | --program-transform-na \
293 | --program-transform-n | --program-transform- \
294 | --program-transform | --program-transfor \
295 | --program-transfo | --program-transf \
296 | --program-trans | --program-tran \
297 | --progr-tra | --program-tr | --program-t)
298 ac_prev=program_transform_name ;;
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 program_transform_name="$ac_optarg" ;;
308 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
309 | -silent | --silent | --silen | --sile | --sil)
310 silent=yes ;;
312 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
313 ac_prev=sbindir ;;
314 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
315 | --sbi=* | --sb=*)
316 sbindir="$ac_optarg" ;;
318 -sharedstatedir | --sharedstatedir | --sharedstatedi \
319 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
320 | --sharedst | --shareds | --shared | --share | --shar \
321 | --sha | --sh)
322 ac_prev=sharedstatedir ;;
323 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
324 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
325 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
326 | --sha=* | --sh=*)
327 sharedstatedir="$ac_optarg" ;;
329 -site | --site | --sit)
330 ac_prev=site ;;
331 -site=* | --site=* | --sit=*)
332 site="$ac_optarg" ;;
334 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
335 ac_prev=srcdir ;;
336 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
337 srcdir="$ac_optarg" ;;
339 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
340 | --syscon | --sysco | --sysc | --sys | --sy)
341 ac_prev=sysconfdir ;;
342 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
343 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
344 sysconfdir="$ac_optarg" ;;
346 -target | --target | --targe | --targ | --tar | --ta | --t)
347 ac_prev=target ;;
348 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
349 target="$ac_optarg" ;;
351 -v | -verbose | --verbose | --verbos | --verbo | --verb)
352 verbose=yes ;;
354 -version | --version | --versio | --versi | --vers)
355 echo "configure generated by autoconf version 2.13"
356 exit 0 ;;
358 -with-* | --with-*)
359 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
360 # Reject names that are not valid shell variable names.
361 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
362 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364 ac_package=`echo $ac_package| sed 's/-/_/g'`
365 case "$ac_option" in
366 *=*) ;;
367 *) ac_optarg=yes ;;
368 esac
369 eval "with_${ac_package}='$ac_optarg'" ;;
371 -without-* | --without-*)
372 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
373 # Reject names that are not valid shell variable names.
374 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
375 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
377 ac_package=`echo $ac_package| sed 's/-/_/g'`
378 eval "with_${ac_package}=no" ;;
380 --x)
381 # Obsolete; use --with-x.
382 with_x=yes ;;
384 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
385 | --x-incl | --x-inc | --x-in | --x-i)
386 ac_prev=x_includes ;;
387 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
388 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
389 x_includes="$ac_optarg" ;;
391 -x-libraries | --x-libraries | --x-librarie | --x-librari \
392 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
393 ac_prev=x_libraries ;;
394 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
395 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
396 x_libraries="$ac_optarg" ;;
398 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
402 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
403 echo "configure: warning: $ac_option: invalid host type" 1>&2
405 if test "x$nonopt" != xNONE; then
406 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
408 nonopt="$ac_option"
411 esac
412 done
414 if test -n "$ac_prev"; then
415 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
418 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
420 # File descriptor usage:
421 # 0 standard input
422 # 1 file creation
423 # 2 errors and warnings
424 # 3 some systems may open it to /dev/tty
425 # 4 used on the Kubota Titan
426 # 6 checking for... messages and results
427 # 5 compiler messages saved in config.log
428 if test "$silent" = yes; then
429 exec 6>/dev/null
430 else
431 exec 6>&1
433 exec 5>./config.log
435 echo "\
436 This file contains any messages produced by compilers while
437 running configure, to aid debugging if configure makes a mistake.
438 " 1>&5
440 # Strip out --no-create and --no-recursion so they do not pile up.
441 # Also quote any args containing shell metacharacters.
442 ac_configure_args=
443 for ac_arg
445 case "$ac_arg" in
446 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
447 | --no-cr | --no-c) ;;
448 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
449 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
450 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
451 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
452 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
453 esac
454 done
456 # NLS nuisances.
457 # Only set these to C if already set. These must not be set unconditionally
458 # because not all systems understand e.g. LANG=C (notably SCO).
459 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
460 # Non-C LC_CTYPE values break the ctype check.
461 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
462 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
463 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
464 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
466 # confdefs.h avoids OS command line length limits that DEFS can exceed.
467 rm -rf conftest* confdefs.h
468 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
469 echo > confdefs.h
471 # A filename unique to this package, relative to the directory that
472 # configure is in, which we can look for to find out if srcdir is correct.
473 ac_unique_file=as.h
475 # Find the source files, if location was not specified.
476 if test -z "$srcdir"; then
477 ac_srcdir_defaulted=yes
478 # Try the directory containing this script, then its parent.
479 ac_prog=$0
480 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
481 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
482 srcdir=$ac_confdir
483 if test ! -r $srcdir/$ac_unique_file; then
484 srcdir=..
486 else
487 ac_srcdir_defaulted=no
489 if test ! -r $srcdir/$ac_unique_file; then
490 if test "$ac_srcdir_defaulted" = yes; then
491 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
492 else
493 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
496 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
498 # Prefer explicitly selected file to automatically selected ones.
499 if test -z "$CONFIG_SITE"; then
500 if test "x$prefix" != xNONE; then
501 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
502 else
503 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
506 for ac_site_file in $CONFIG_SITE; do
507 if test -r "$ac_site_file"; then
508 echo "loading site script $ac_site_file"
509 . "$ac_site_file"
511 done
513 if test -r "$cache_file"; then
514 echo "loading cache $cache_file"
515 . $cache_file
516 else
517 echo "creating cache $cache_file"
518 > $cache_file
521 ac_ext=c
522 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
523 ac_cpp='$CPP $CPPFLAGS'
524 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
525 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
526 cross_compiling=$ac_cv_prog_cc_cross
528 ac_exeext=
529 ac_objext=o
530 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
531 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
532 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
533 ac_n= ac_c='
534 ' ac_t=' '
535 else
536 ac_n=-n ac_c= ac_t=
538 else
539 ac_n= ac_c='\c' ac_t=
544 ac_aux_dir=
545 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
546 if test -f $ac_dir/install-sh; then
547 ac_aux_dir=$ac_dir
548 ac_install_sh="$ac_aux_dir/install-sh -c"
549 break
550 elif test -f $ac_dir/install.sh; then
551 ac_aux_dir=$ac_dir
552 ac_install_sh="$ac_aux_dir/install.sh -c"
553 break
555 done
556 if test -z "$ac_aux_dir"; then
557 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
559 ac_config_guess=$ac_aux_dir/config.guess
560 ac_config_sub=$ac_aux_dir/config.sub
561 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
564 # Do some error checking and defaulting for the host and target type.
565 # The inputs are:
566 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
568 # The rules are:
569 # 1. You are not allowed to specify --host, --target, and nonopt at the
570 # same time.
571 # 2. Host defaults to nonopt.
572 # 3. If nonopt is not specified, then host defaults to the current host,
573 # as determined by config.guess.
574 # 4. Target and build default to nonopt.
575 # 5. If nonopt is not specified, then target and build default to host.
577 # The aliases save the names the user supplied, while $host etc.
578 # will get canonicalized.
579 case $host---$target---$nonopt in
580 NONE---*---* | *---NONE---* | *---*---NONE) ;;
581 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
582 esac
585 # Make sure we can run config.sub.
586 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
587 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
590 echo $ac_n "checking host system type""... $ac_c" 1>&6
591 echo "configure:592: checking host system type" >&5
593 host_alias=$host
594 case "$host_alias" in
595 NONE)
596 case $nonopt in
597 NONE)
598 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
599 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
600 fi ;;
601 *) host_alias=$nonopt ;;
602 esac ;;
603 esac
605 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
606 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
607 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
608 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
609 echo "$ac_t""$host" 1>&6
611 echo $ac_n "checking target system type""... $ac_c" 1>&6
612 echo "configure:613: checking target system type" >&5
614 target_alias=$target
615 case "$target_alias" in
616 NONE)
617 case $nonopt in
618 NONE) target_alias=$host_alias ;;
619 *) target_alias=$nonopt ;;
620 esac ;;
621 esac
623 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
624 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
625 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
626 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
627 echo "$ac_t""$target" 1>&6
629 echo $ac_n "checking build system type""... $ac_c" 1>&6
630 echo "configure:631: checking build system type" >&5
632 build_alias=$build
633 case "$build_alias" in
634 NONE)
635 case $nonopt in
636 NONE) build_alias=$host_alias ;;
637 *) build_alias=$nonopt ;;
638 esac ;;
639 esac
641 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
642 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
643 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
644 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
645 echo "$ac_t""$build" 1>&6
647 test "$host_alias" != "$target_alias" &&
648 test "$program_prefix$program_suffix$program_transform_name" = \
649 NONENONEs,x,x, &&
650 program_prefix=${target_alias}-
653 # Find a good install program. We prefer a C program (faster),
654 # so one script is as good as another. But avoid the broken or
655 # incompatible versions:
656 # SysV /etc/install, /usr/sbin/install
657 # SunOS /usr/etc/install
658 # IRIX /sbin/install
659 # AIX /bin/install
660 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
661 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
662 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
663 # ./install, which can be erroneously created by make from ./install.sh.
664 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
665 echo "configure:666: checking for a BSD compatible install" >&5
666 if test -z "$INSTALL"; then
667 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
668 echo $ac_n "(cached) $ac_c" 1>&6
669 else
670 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
671 for ac_dir in $PATH; do
672 # Account for people who put trailing slashes in PATH elements.
673 case "$ac_dir/" in
674 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
676 # OSF1 and SCO ODT 3.0 have their own names for install.
677 # Don't use installbsd from OSF since it installs stuff as root
678 # by default.
679 for ac_prog in ginstall scoinst install; do
680 if test -f $ac_dir/$ac_prog; then
681 if test $ac_prog = install &&
682 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
683 # AIX install. It has an incompatible calling convention.
685 else
686 ac_cv_path_install="$ac_dir/$ac_prog -c"
687 break 2
690 done
692 esac
693 done
694 IFS="$ac_save_IFS"
697 if test "${ac_cv_path_install+set}" = set; then
698 INSTALL="$ac_cv_path_install"
699 else
700 # As a last resort, use the slow shell script. We don't cache a
701 # path for INSTALL within a source directory, because that will
702 # break other packages using the cache if that directory is
703 # removed, or if the path is relative.
704 INSTALL="$ac_install_sh"
707 echo "$ac_t""$INSTALL" 1>&6
709 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
710 # It thinks the first close brace ends the variable substitution.
711 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
713 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
715 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
717 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
718 echo "configure:719: checking whether build environment is sane" >&5
719 # Just in case
720 sleep 1
721 echo timestamp > conftestfile
722 # Do `set' in a subshell so we don't clobber the current shell's
723 # arguments. Must try -L first in case configure is actually a
724 # symlink; some systems play weird games with the mod time of symlinks
725 # (eg FreeBSD returns the mod time of the symlink's containing
726 # directory).
727 if (
728 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
729 if test "$*" = "X"; then
730 # -L didn't work.
731 set X `ls -t $srcdir/configure conftestfile`
733 if test "$*" != "X $srcdir/configure conftestfile" \
734 && test "$*" != "X conftestfile $srcdir/configure"; then
736 # If neither matched, then we have a broken ls. This can happen
737 # if, for instance, CONFIG_SHELL is bash and it inherits a
738 # broken ls alias from the environment. This has actually
739 # happened. Such a system could not be considered "sane".
740 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
741 alias in your environment" 1>&2; exit 1; }
744 test "$2" = conftestfile
746 then
747 # Ok.
749 else
750 { echo "configure: error: newly created file is older than distributed files!
751 Check your system clock" 1>&2; exit 1; }
753 rm -f conftest*
754 echo "$ac_t""yes" 1>&6
755 if test "$program_transform_name" = s,x,x,; then
756 program_transform_name=
757 else
758 # Double any \ or $. echo might interpret backslashes.
759 cat <<\EOF_SED > conftestsed
760 s,\\,\\\\,g; s,\$,$$,g
761 EOF_SED
762 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
763 rm -f conftestsed
765 test "$program_prefix" != NONE &&
766 program_transform_name="s,^,${program_prefix},; $program_transform_name"
767 # Use a double $ so make ignores it.
768 test "$program_suffix" != NONE &&
769 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
771 # sed with no file args requires a program.
772 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
774 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
775 echo "configure:776: checking whether ${MAKE-make} sets \${MAKE}" >&5
776 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
777 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
778 echo $ac_n "(cached) $ac_c" 1>&6
779 else
780 cat > conftestmake <<\EOF
781 all:
782 @echo 'ac_maketemp="${MAKE}"'
784 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
785 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
786 if test -n "$ac_maketemp"; then
787 eval ac_cv_prog_make_${ac_make}_set=yes
788 else
789 eval ac_cv_prog_make_${ac_make}_set=no
791 rm -f conftestmake
793 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
794 echo "$ac_t""yes" 1>&6
795 SET_MAKE=
796 else
797 echo "$ac_t""no" 1>&6
798 SET_MAKE="MAKE=${MAKE-make}"
802 PACKAGE=gas
804 VERSION=2.9.4
806 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
807 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
809 cat >> confdefs.h <<EOF
810 #define PACKAGE "$PACKAGE"
813 cat >> confdefs.h <<EOF
814 #define VERSION "$VERSION"
819 missing_dir=`cd $ac_aux_dir && pwd`
820 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
821 echo "configure:822: checking for working aclocal" >&5
822 # Run test in a subshell; some versions of sh will print an error if
823 # an executable is not found, even if stderr is redirected.
824 # Redirect stdin to placate older versions of autoconf. Sigh.
825 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
826 ACLOCAL=aclocal
827 echo "$ac_t""found" 1>&6
828 else
829 ACLOCAL="$missing_dir/missing aclocal"
830 echo "$ac_t""missing" 1>&6
833 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
834 echo "configure:835: checking for working autoconf" >&5
835 # Run test in a subshell; some versions of sh will print an error if
836 # an executable is not found, even if stderr is redirected.
837 # Redirect stdin to placate older versions of autoconf. Sigh.
838 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
839 AUTOCONF=autoconf
840 echo "$ac_t""found" 1>&6
841 else
842 AUTOCONF="$missing_dir/missing autoconf"
843 echo "$ac_t""missing" 1>&6
846 echo $ac_n "checking for working automake""... $ac_c" 1>&6
847 echo "configure:848: checking for working automake" >&5
848 # Run test in a subshell; some versions of sh will print an error if
849 # an executable is not found, even if stderr is redirected.
850 # Redirect stdin to placate older versions of autoconf. Sigh.
851 if (automake --version) < /dev/null > /dev/null 2>&1; then
852 AUTOMAKE=automake
853 echo "$ac_t""found" 1>&6
854 else
855 AUTOMAKE="$missing_dir/missing automake"
856 echo "$ac_t""missing" 1>&6
859 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
860 echo "configure:861: checking for working autoheader" >&5
861 # Run test in a subshell; some versions of sh will print an error if
862 # an executable is not found, even if stderr is redirected.
863 # Redirect stdin to placate older versions of autoconf. Sigh.
864 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
865 AUTOHEADER=autoheader
866 echo "$ac_t""found" 1>&6
867 else
868 AUTOHEADER="$missing_dir/missing autoheader"
869 echo "$ac_t""missing" 1>&6
872 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
873 echo "configure:874: checking for working makeinfo" >&5
874 # Run test in a subshell; some versions of sh will print an error if
875 # an executable is not found, even if stderr is redirected.
876 # Redirect stdin to placate older versions of autoconf. Sigh.
877 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
878 MAKEINFO=makeinfo
879 echo "$ac_t""found" 1>&6
880 else
881 MAKEINFO="$missing_dir/missing makeinfo"
882 echo "$ac_t""missing" 1>&6
887 # Check whether --enable-shared or --disable-shared was given.
888 if test "${enable_shared+set}" = set; then
889 enableval="$enable_shared"
890 p=${PACKAGE-default}
891 case "$enableval" in
892 yes) enable_shared=yes ;;
893 no) enable_shared=no ;;
895 enable_shared=no
896 # Look at the argument we got. We use all the common list separators.
897 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
898 for pkg in $enableval; do
899 if test "X$pkg" = "X$p"; then
900 enable_shared=yes
902 done
903 IFS="$ac_save_ifs"
905 esac
906 else
907 enable_shared=yes
910 # Check whether --enable-static or --disable-static was given.
911 if test "${enable_static+set}" = set; then
912 enableval="$enable_static"
913 p=${PACKAGE-default}
914 case "$enableval" in
915 yes) enable_static=yes ;;
916 no) enable_static=no ;;
918 enable_static=no
919 # Look at the argument we got. We use all the common list separators.
920 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
921 for pkg in $enableval; do
922 if test "X$pkg" = "X$p"; then
923 enable_static=yes
925 done
926 IFS="$ac_save_ifs"
928 esac
929 else
930 enable_static=yes
933 # Extract the first word of "ranlib", so it can be a program name with args.
934 set dummy ranlib; ac_word=$2
935 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
936 echo "configure:937: checking for $ac_word" >&5
937 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
938 echo $ac_n "(cached) $ac_c" 1>&6
939 else
940 if test -n "$RANLIB"; then
941 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
942 else
943 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
944 ac_dummy="$PATH"
945 for ac_dir in $ac_dummy; do
946 test -z "$ac_dir" && ac_dir=.
947 if test -f $ac_dir/$ac_word; then
948 ac_cv_prog_RANLIB="ranlib"
949 break
951 done
952 IFS="$ac_save_ifs"
953 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
956 RANLIB="$ac_cv_prog_RANLIB"
957 if test -n "$RANLIB"; then
958 echo "$ac_t""$RANLIB" 1>&6
959 else
960 echo "$ac_t""no" 1>&6
963 # Extract the first word of "gcc", so it can be a program name with args.
964 set dummy gcc; ac_word=$2
965 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
966 echo "configure:967: checking for $ac_word" >&5
967 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
968 echo $ac_n "(cached) $ac_c" 1>&6
969 else
970 if test -n "$CC"; then
971 ac_cv_prog_CC="$CC" # Let the user override the test.
972 else
973 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
974 ac_dummy="$PATH"
975 for ac_dir in $ac_dummy; do
976 test -z "$ac_dir" && ac_dir=.
977 if test -f $ac_dir/$ac_word; then
978 ac_cv_prog_CC="gcc"
979 break
981 done
982 IFS="$ac_save_ifs"
985 CC="$ac_cv_prog_CC"
986 if test -n "$CC"; then
987 echo "$ac_t""$CC" 1>&6
988 else
989 echo "$ac_t""no" 1>&6
992 if test -z "$CC"; then
993 # Extract the first word of "cc", so it can be a program name with args.
994 set dummy cc; ac_word=$2
995 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
996 echo "configure:997: checking for $ac_word" >&5
997 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
998 echo $ac_n "(cached) $ac_c" 1>&6
999 else
1000 if test -n "$CC"; then
1001 ac_cv_prog_CC="$CC" # Let the user override the test.
1002 else
1003 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1004 ac_prog_rejected=no
1005 ac_dummy="$PATH"
1006 for ac_dir in $ac_dummy; do
1007 test -z "$ac_dir" && ac_dir=.
1008 if test -f $ac_dir/$ac_word; then
1009 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1010 ac_prog_rejected=yes
1011 continue
1013 ac_cv_prog_CC="cc"
1014 break
1016 done
1017 IFS="$ac_save_ifs"
1018 if test $ac_prog_rejected = yes; then
1019 # We found a bogon in the path, so make sure we never use it.
1020 set dummy $ac_cv_prog_CC
1021 shift
1022 if test $# -gt 0; then
1023 # We chose a different compiler from the bogus one.
1024 # However, it has the same basename, so the bogon will be chosen
1025 # first if we set CC to just the basename; use the full file name.
1026 shift
1027 set dummy "$ac_dir/$ac_word" "$@"
1028 shift
1029 ac_cv_prog_CC="$@"
1034 CC="$ac_cv_prog_CC"
1035 if test -n "$CC"; then
1036 echo "$ac_t""$CC" 1>&6
1037 else
1038 echo "$ac_t""no" 1>&6
1041 if test -z "$CC"; then
1042 case "`uname -s`" in
1043 *win32* | *WIN32*)
1044 # Extract the first word of "cl", so it can be a program name with args.
1045 set dummy cl; ac_word=$2
1046 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1047 echo "configure:1048: checking for $ac_word" >&5
1048 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1049 echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051 if test -n "$CC"; then
1052 ac_cv_prog_CC="$CC" # Let the user override the test.
1053 else
1054 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1055 ac_dummy="$PATH"
1056 for ac_dir in $ac_dummy; do
1057 test -z "$ac_dir" && ac_dir=.
1058 if test -f $ac_dir/$ac_word; then
1059 ac_cv_prog_CC="cl"
1060 break
1062 done
1063 IFS="$ac_save_ifs"
1066 CC="$ac_cv_prog_CC"
1067 if test -n "$CC"; then
1068 echo "$ac_t""$CC" 1>&6
1069 else
1070 echo "$ac_t""no" 1>&6
1073 esac
1075 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1078 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1079 echo "configure:1080: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1081 ac_ext=c
1082 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1083 ac_cpp='$CPP $CPPFLAGS'
1084 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1085 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1086 cross_compiling=$ac_cv_prog_cc_cross
1088 cat > conftest.$ac_ext << EOF
1090 #line 1091 "configure"
1091 #include "confdefs.h"
1093 main(){return(0);}
1095 if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1096 ac_cv_prog_cc_works=yes
1097 # If we can't run a trivial program, we are probably using a cross compiler.
1098 if (./conftest; exit) 2>/dev/null; then
1099 ac_cv_prog_cc_cross=no
1100 else
1101 ac_cv_prog_cc_cross=yes
1103 else
1104 echo "configure: failed program was:" >&5
1105 cat conftest.$ac_ext >&5
1106 ac_cv_prog_cc_works=no
1108 rm -fr conftest*
1109 ac_ext=c
1110 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1111 ac_cpp='$CPP $CPPFLAGS'
1112 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1113 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1114 cross_compiling=$ac_cv_prog_cc_cross
1116 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1117 if test $ac_cv_prog_cc_works = no; then
1118 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1120 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1121 echo "configure:1122: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1122 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1123 cross_compiling=$ac_cv_prog_cc_cross
1125 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1126 echo "configure:1127: checking whether we are using GNU C" >&5
1127 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1128 echo $ac_n "(cached) $ac_c" 1>&6
1129 else
1130 cat > conftest.c <<EOF
1131 #ifdef __GNUC__
1132 yes;
1133 #endif
1135 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1136 ac_cv_prog_gcc=yes
1137 else
1138 ac_cv_prog_gcc=no
1142 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1144 if test $ac_cv_prog_gcc = yes; then
1145 GCC=yes
1146 else
1147 GCC=
1150 ac_test_CFLAGS="${CFLAGS+set}"
1151 ac_save_CFLAGS="$CFLAGS"
1152 CFLAGS=
1153 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1154 echo "configure:1155: checking whether ${CC-cc} accepts -g" >&5
1155 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
1157 else
1158 echo 'void f(){}' > conftest.c
1159 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1160 ac_cv_prog_cc_g=yes
1161 else
1162 ac_cv_prog_cc_g=no
1164 rm -f conftest*
1168 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1169 if test "$ac_test_CFLAGS" = set; then
1170 CFLAGS="$ac_save_CFLAGS"
1171 elif test $ac_cv_prog_cc_g = yes; then
1172 if test "$GCC" = yes; then
1173 CFLAGS="-g -O2"
1174 else
1175 CFLAGS="-g"
1177 else
1178 if test "$GCC" = yes; then
1179 CFLAGS="-O2"
1180 else
1181 CFLAGS=
1185 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1186 if test "${with_gnu_ld+set}" = set; then
1187 withval="$with_gnu_ld"
1188 test "$withval" = no || with_gnu_ld=yes
1189 else
1190 with_gnu_ld=no
1194 ac_prog=ld
1195 if test "$ac_cv_prog_gcc" = yes; then
1196 # Check if gcc -print-prog-name=ld gives a path.
1197 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1198 echo "configure:1199: checking for ld used by GCC" >&5
1199 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1200 case "$ac_prog" in
1201 # Accept absolute paths.
1202 /* | [A-Za-z]:\\*)
1203 test -z "$LD" && LD="$ac_prog"
1206 # If it fails, then pretend we aren't using GCC.
1207 ac_prog=ld
1210 # If it is relative, then search for the first ld in PATH.
1211 with_gnu_ld=unknown
1213 esac
1214 elif test "$with_gnu_ld" = yes; then
1215 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1216 echo "configure:1217: checking for GNU ld" >&5
1217 else
1218 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1219 echo "configure:1220: checking for non-GNU ld" >&5
1221 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1222 echo $ac_n "(cached) $ac_c" 1>&6
1223 else
1224 if test -z "$LD"; then
1225 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1226 for ac_dir in $PATH; do
1227 test -z "$ac_dir" && ac_dir=.
1228 if test -f "$ac_dir/$ac_prog"; then
1229 ac_cv_path_LD="$ac_dir/$ac_prog"
1230 # Check to see if the program is GNU ld. I'd rather use --version,
1231 # but apparently some GNU ld's only accept -v.
1232 # Break only if it was the GNU/non-GNU ld that we prefer.
1233 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1234 test "$with_gnu_ld" != no && break
1235 else
1236 test "$with_gnu_ld" != yes && break
1239 done
1240 IFS="$ac_save_ifs"
1241 else
1242 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1246 LD="$ac_cv_path_LD"
1247 if test -n "$LD"; then
1248 echo "$ac_t""$LD" 1>&6
1249 else
1250 echo "$ac_t""no" 1>&6
1252 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1254 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1255 echo "configure:1256: checking if the linker ($LD) is GNU ld" >&5
1256 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1257 echo $ac_n "(cached) $ac_c" 1>&6
1258 else
1259 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1260 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1261 ac_cv_prog_gnu_ld=yes
1262 else
1263 ac_cv_prog_gnu_ld=no
1267 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1270 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1271 echo "configure:1272: checking for BSD-compatible nm" >&5
1272 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1273 echo $ac_n "(cached) $ac_c" 1>&6
1274 else
1275 if test -n "$NM"; then
1276 # Let the user override the test.
1277 ac_cv_path_NM="$NM"
1278 else
1279 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1280 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
1281 test -z "$ac_dir" && ac_dir=.
1282 if test -f $ac_dir/nm; then
1283 # Check to see if the nm accepts a BSD-compat flag.
1284 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1285 # nm: unknown option "B" ignored
1286 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1287 ac_cv_path_NM="$ac_dir/nm -B"
1288 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1289 ac_cv_path_NM="$ac_dir/nm -p"
1290 else
1291 ac_cv_path_NM="$ac_dir/nm"
1293 break
1295 done
1296 IFS="$ac_save_ifs"
1297 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1301 NM="$ac_cv_path_NM"
1302 echo "$ac_t""$NM" 1>&6
1305 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1306 echo "configure:1307: checking whether ln -s works" >&5
1307 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1308 echo $ac_n "(cached) $ac_c" 1>&6
1309 else
1310 rm -f conftestdata
1311 if ln -s X conftestdata 2>/dev/null
1312 then
1313 rm -f conftestdata
1314 ac_cv_prog_LN_S="ln -s"
1315 else
1316 ac_cv_prog_LN_S=ln
1319 LN_S="$ac_cv_prog_LN_S"
1320 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1321 echo "$ac_t""yes" 1>&6
1322 else
1323 echo "$ac_t""no" 1>&6
1326 if test $host != $build; then
1327 ac_tool_prefix=${host_alias}-
1328 else
1329 ac_tool_prefix=
1332 # Always use our own libtool.
1333 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1335 # Check for any special flags to pass to ltconfig.
1336 libtool_flags=
1337 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1338 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1339 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1340 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1341 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1343 # Some flags need to be propagated to the compiler or linker for good
1344 # libtool support.
1345 case "$host" in
1346 *-*-irix6*)
1347 # Find out which ABI we are using.
1348 echo '#line 1349 "configure"' > conftest.$ac_ext
1349 if { (eval echo configure:1350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1350 case "`/usr/bin/file conftest.o`" in
1351 *32-bit*)
1352 LD="${LD-ld} -32"
1354 *N32*)
1355 LD="${LD-ld} -n32"
1357 *64-bit*)
1358 LD="${LD-ld} -64"
1360 esac
1362 rm -rf conftest*
1365 *-*-sco3.2v5*)
1366 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1367 CFLAGS="$CFLAGS -belf"
1370 *-*-cygwin*)
1371 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1372 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1374 echo "configure:1375: checking for $ac_word" >&5
1375 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1376 echo $ac_n "(cached) $ac_c" 1>&6
1377 else
1378 if test -n "$DLLTOOL"; then
1379 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1380 else
1381 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1382 ac_dummy="$PATH"
1383 for ac_dir in $ac_dummy; do
1384 test -z "$ac_dir" && ac_dir=.
1385 if test -f $ac_dir/$ac_word; then
1386 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
1387 break
1389 done
1390 IFS="$ac_save_ifs"
1393 DLLTOOL="$ac_cv_prog_DLLTOOL"
1394 if test -n "$DLLTOOL"; then
1395 echo "$ac_t""$DLLTOOL" 1>&6
1396 else
1397 echo "$ac_t""no" 1>&6
1401 if test -z "$ac_cv_prog_DLLTOOL"; then
1402 if test -n "$ac_tool_prefix"; then
1403 # Extract the first word of "dlltool", so it can be a program name with args.
1404 set dummy dlltool; ac_word=$2
1405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1406 echo "configure:1407: checking for $ac_word" >&5
1407 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1408 echo $ac_n "(cached) $ac_c" 1>&6
1409 else
1410 if test -n "$DLLTOOL"; then
1411 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1412 else
1413 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1414 ac_dummy="$PATH"
1415 for ac_dir in $ac_dummy; do
1416 test -z "$ac_dir" && ac_dir=.
1417 if test -f $ac_dir/$ac_word; then
1418 ac_cv_prog_DLLTOOL="dlltool"
1419 break
1421 done
1422 IFS="$ac_save_ifs"
1423 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1426 DLLTOOL="$ac_cv_prog_DLLTOOL"
1427 if test -n "$DLLTOOL"; then
1428 echo "$ac_t""$DLLTOOL" 1>&6
1429 else
1430 echo "$ac_t""no" 1>&6
1433 else
1434 DLLTOOL="false"
1438 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1439 set dummy ${ac_tool_prefix}as; ac_word=$2
1440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1441 echo "configure:1442: checking for $ac_word" >&5
1442 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1443 echo $ac_n "(cached) $ac_c" 1>&6
1444 else
1445 if test -n "$AS"; then
1446 ac_cv_prog_AS="$AS" # Let the user override the test.
1447 else
1448 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1449 ac_dummy="$PATH"
1450 for ac_dir in $ac_dummy; do
1451 test -z "$ac_dir" && ac_dir=.
1452 if test -f $ac_dir/$ac_word; then
1453 ac_cv_prog_AS="${ac_tool_prefix}as"
1454 break
1456 done
1457 IFS="$ac_save_ifs"
1460 AS="$ac_cv_prog_AS"
1461 if test -n "$AS"; then
1462 echo "$ac_t""$AS" 1>&6
1463 else
1464 echo "$ac_t""no" 1>&6
1468 if test -z "$ac_cv_prog_AS"; then
1469 if test -n "$ac_tool_prefix"; then
1470 # Extract the first word of "as", so it can be a program name with args.
1471 set dummy as; ac_word=$2
1472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1473 echo "configure:1474: checking for $ac_word" >&5
1474 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1475 echo $ac_n "(cached) $ac_c" 1>&6
1476 else
1477 if test -n "$AS"; then
1478 ac_cv_prog_AS="$AS" # Let the user override the test.
1479 else
1480 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1481 ac_dummy="$PATH"
1482 for ac_dir in $ac_dummy; do
1483 test -z "$ac_dir" && ac_dir=.
1484 if test -f $ac_dir/$ac_word; then
1485 ac_cv_prog_AS="as"
1486 break
1488 done
1489 IFS="$ac_save_ifs"
1490 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1493 AS="$ac_cv_prog_AS"
1494 if test -n "$AS"; then
1495 echo "$ac_t""$AS" 1>&6
1496 else
1497 echo "$ac_t""no" 1>&6
1500 else
1501 AS="false"
1508 esac
1510 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1511 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1512 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1513 DLLTOOL="$DLLTOOL" AS="$AS" \
1514 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1515 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1516 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1518 # Redirect the config.log output again, so that the ltconfig log is not
1519 # clobbered by the next message.
1520 exec 5>>./config.log
1523 user_bfd_gas=
1524 # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
1525 if test "${enable_bfd_assembler+set}" = set; then
1526 enableval="$enable_bfd_assembler"
1527 case "${enableval}" in
1528 yes) need_bfd=yes user_bfd_gas=yes ;;
1529 no) user_bfd_gas=no ;;
1530 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
1531 esac
1533 # Check whether --enable-targets or --disable-targets was given.
1534 if test "${enable_targets+set}" = set; then
1535 enableval="$enable_targets"
1536 case "${enableval}" in
1537 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1539 no) enable_targets= ;;
1540 *) enable_targets=$enableval ;;
1541 esac
1543 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1544 if test "${enable_commonbfdlib+set}" = set; then
1545 enableval="$enable_commonbfdlib"
1546 case "${enableval}" in
1547 yes) commonbfdlib=true ;;
1548 no) commonbfdlib=false ;;
1549 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1550 esac
1553 using_cgen=no
1555 # Generate a header file
1560 te_file=generic
1562 # Makefile target for installing gas in $(tooldir)/bin.
1563 install_tooldir=install-exec-tooldir
1565 canon_targets=""
1566 if test -n "$enable_targets" ; then
1567 for t in `echo $enable_targets | sed 's/,/ /g'`; do
1568 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null`
1569 if test -n "$result" ; then
1570 canon_targets="$canon_targets $result"
1571 # else
1572 # # Permit "all", etc. We don't support it yet though.
1573 # canon_targets="$canon_targets $t"
1575 done
1576 _gas_uniq_list="$canon_targets"
1577 _gas_uniq_newlist=""
1578 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1579 case $_gas_uniq_i in
1580 _gas_uniq_dummy) ;;
1581 *) case " $_gas_uniq_newlist " in
1582 *" $_gas_uniq_i "*) ;;
1583 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1584 esac ;;
1585 esac
1586 done
1587 canon_targets=$_gas_uniq_newlist
1591 emulations=""
1593 for this_target in $target $canon_targets ; do
1595 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
1597 # check for architecture variants
1598 arch=
1599 endian=
1600 case ${cpu} in
1601 alpha*) cpu_type=alpha ;;
1602 armeb) cpu_type=arm endian=big ;;
1603 arm*) cpu_type=arm endian=little ;;
1604 armb*) cpu_type=arm endian=little ;;
1605 armv*l) cpu_type=arm endian=little ;;
1606 armv*b) cpu_type=arm endian=big ;;
1607 strongarm*) cpu_type=arm endian=little ;;
1608 thumb*) cpu_type=arm endian=little ;;
1609 hppa*) cpu_type=hppa ;;
1610 i[456]86) cpu_type=i386 ;;
1611 m680[012346]0) cpu_type=m68k ;;
1612 m68008) cpu_type=m68k ;;
1613 m683??) cpu_type=m68k ;;
1614 m5200) cpu_type=m68k ;;
1615 m8*) cpu_type=m88k ;;
1616 mips*el) cpu_type=mips endian=little ;;
1617 mips*) cpu_type=mips endian=big ;;
1618 powerpcle*) cpu_type=ppc endian=little ;;
1619 powerpc*) cpu_type=ppc endian=big ;;
1620 rs6000*) cpu_type=ppc ;;
1621 sparclite*) cpu_type=sparc arch=sparclite ;;
1622 sparclet*) cpu_type=sparc arch=sparclet ;;
1623 sparc64*) cpu_type=sparc arch=v9-64 ;;
1624 sparc86x*) cpu_type=sparc arch=sparc86x ;;
1625 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
1626 v850*) cpu_type=v850 ;;
1627 *) cpu_type=${cpu} ;;
1628 esac
1630 if test ${this_target} = $target ; then
1631 target_cpu_type=${cpu_type}
1632 elif test ${target_cpu_type} != ${cpu_type} ; then
1633 continue
1636 generic_target=${cpu_type}-$vendor-$os
1637 dev=no
1638 bfd_gas=no
1639 em=generic
1641 # assign object format
1642 case ${generic_target} in
1643 a29k-*-coff) fmt=coff ;;
1644 a29k-amd-udi) fmt=coff ;;
1645 a29k-amd-ebmon) fmt=coff ;;
1646 a29k-nyu-sym1) fmt=coff ;;
1647 a29k-*-vxworks*) fmt=coff ;;
1649 alpha*-*-*vms*) fmt=evax ;;
1650 alpha*-*-netware*) fmt=ecoff ;;
1651 alpha*-*-openbsd*) fmt=ecoff ;;
1652 alpha*-*-osf*) fmt=ecoff ;;
1653 alpha*-*-linuxecoff*) fmt=ecoff ;;
1654 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
1655 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
1657 arc-*-elf*) fmt=elf bfd_gas=yes ;;
1659 arm-*-aout) fmt=aout ;;
1660 arm-*-coff | thumb-*-coff) fmt=coff ;;
1661 arm-*-elf | thumb-*-elf) fmt=elf ;;
1662 arm-*-linux*aout*) fmt=aout em=linux ;;
1663 arm-*-linux* | armv*-*-linux-gnu) fmt=elf em=linux ;;
1664 arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1665 arm-*-oabi | thumb-*-oabi) fmt=elf ;;
1666 arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
1667 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
1668 arm-*-riscix*) fmt=aout em=riscix ;;
1670 d10v-*-*) fmt=elf bfd_gas=yes ;;
1671 d30v-*-*) fmt=elf bfd_gas=yes ;;
1674 fr30-*-*) fmt=elf bfd_gas=yes ;;
1676 hppa-*-*elf*) fmt=elf em=hppa ;;
1677 hppa-*-lites*) fmt=elf em=hppa ;;
1678 hppa-*-osf*) fmt=som em=hppa ;;
1679 hppa-*-rtems*) fmt=elf em=hppa ;;
1680 hppa-*-hpux*) fmt=som em=hppa ;;
1681 hppa-*-mpeix*) fmt=som em=hppa ;;
1682 hppa-*-bsd*) fmt=som em=hppa ;;
1683 hppa-*-hiux*) fmt=som em=hppa ;;
1685 h8300-*-coff) fmt=coff ;;
1687 i386-ibm-aix*) fmt=coff em=i386aix ;;
1688 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
1689 i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
1690 i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
1691 i386-*-bsd*) fmt=aout em=386bsd ;;
1692 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
1693 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
1694 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
1695 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
1696 i386-*-linux*coff*) fmt=coff em=linux ;;
1697 i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
1698 i386-*-lynxos*) fmt=coff em=lynx ;;
1699 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
1700 fmt=elf bfd_gas=yes ;;
1701 i386-*-freebsdelf*) fmt=elf bfd_gas=yes ;;
1702 i386-*-freebsd*) fmt=aout em=386bsd ;;
1703 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
1704 fmt=coff ;;
1705 i386-*-sco3.2v5*) fmt=elf
1706 if test ${this_target} = $target; then
1707 cat >> confdefs.h <<\EOF
1708 #define SCO_ELF 1
1713 i386-*-sco3.2*) fmt=coff ;;
1714 i386-*-vsta) fmt=aout ;;
1715 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
1716 fmt=coff em=go32;;
1717 i386-*-rtems*) fmt=coff ;;
1718 i386-*-gnu*) fmt=elf ;;
1719 i386-*-mach*)
1720 fmt=aout em=mach bfd_gas=yes ;;
1721 i386-*-msdos*) fmt=aout ;;
1722 i386-*-moss*) fmt=elf ;;
1723 i386-*-pe) fmt=coff em=pe ;;
1724 i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
1725 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
1726 i386-*-*nt*) fmt=coff em=pe ;;
1727 i960-*-bout) fmt=bout ;;
1728 i960-*-coff) fmt=coff em=ic960 ;;
1729 i960-*-rtems*) fmt=coff em=ic960 ;;
1730 i960-*-nindy*) fmt=bout ;;
1731 i960-*-vxworks4*) fmt=bout ;;
1732 i960-*-vxworks5.0) fmt=bout ;;
1733 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
1734 i960-*-vxworks*) fmt=bout ;;
1736 m32r-*-*) fmt=elf bfd_gas=yes ;;
1738 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
1739 fmt=aout em=sun3 ;;
1740 m68k-motorola-sysv*) fmt=coff em=delta ;;
1741 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
1742 m68k-apollo-*) fmt=coff em=apollo ;;
1743 m68k-*-sysv4*) # must be before -sysv*
1744 fmt=elf em=svr4 ;;
1745 m68k-*-elf*) fmt=elf ;;
1746 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
1747 fmt=coff ;;
1748 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
1749 m68k-*-linux*aout*) fmt=aout em=linux ;;
1750 m68k-*-linux-gnu*) fmt=elf em=linux ;;
1751 m68k-*-gnu*) fmt=elf ;;
1752 m68k-*-lynxos*) fmt=coff em=lynx ;;
1753 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1754 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1755 m68k-apple-aux*) fmt=coff em=aux ;;
1756 m68k-*-psos*) fmt=elf em=psos;;
1758 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
1759 m88k-*-coff*) fmt=coff ;;
1761 mcore-*-elf) fmt=elf bfd_gas=yes ;;
1762 mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
1764 # don't change em like *-*-bsd does
1765 mips-dec-netbsd*) fmt=elf endian=little ;;
1766 mips-dec-openbsd*) fmt=elf endian=little ;;
1767 mips-dec-bsd*) fmt=aout endian=little ;;
1768 mips-sony-bsd*) fmt=ecoff ;;
1769 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
1770 mips-*-ultrix*) fmt=ecoff endian=little ;;
1771 mips-*-osf*) fmt=ecoff endian=little ;;
1772 mips-*-ecoff*) fmt=ecoff ;;
1773 mips-*-ecoff*) fmt=ecoff ;;
1774 mips-*-irix6*) fmt=elf ;;
1775 mips-*-irix5*) fmt=elf ;;
1776 mips-*-irix*) fmt=ecoff ;;
1777 mips-*-lnews*) fmt=ecoff em=lnews ;;
1778 mips-*-riscos*) fmt=ecoff ;;
1779 mips-*-sysv*) fmt=ecoff ;;
1780 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
1781 fmt=elf ;;
1782 mips-*-vxworks*) fmt=elf
1783 cat >> confdefs.h <<\EOF
1784 #define MIPS_STABS_ELF 1
1788 mn10200-*-*) fmt=elf bfd_gas=yes ;;
1789 mn10300-*-*) fmt=elf bfd_gas=yes ;;
1790 ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
1791 fmt=coff em=pe ;;
1792 ppc-*-aix*) fmt=coff ;;
1793 ppc-*-beos*) fmt=coff ;;
1794 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
1795 fmt=elf ;;
1796 ppc-*-linux-gnu*) fmt=elf
1797 case "$endian" in
1798 big) ;;
1799 *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
1800 esac
1802 ppc-*-solaris*) fmt=elf
1803 if test ${this_target} = $target; then
1804 cat >> confdefs.h <<\EOF
1805 #define TARGET_SOLARIS_COMMENT 1
1809 if test x${endian} = xbig; then
1810 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
1813 ppc-*-rtems*) fmt=elf ;;
1814 ppc-*-macos* | ppc-*-mpw*)
1815 fmt=coff em=macos ;;
1816 ppc-*-netware*) fmt=elf em=ppcnw ;;
1818 sh-*-elf*) fmt=elf ;;
1819 sh-*-coff*) fmt=coff ;;
1820 sh-*-rtems*) fmt=coff ;;
1822 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
1823 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
1824 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
1826 sparc-*-rtems*) fmt=aout ;;
1827 sparc-*-sunos4*) fmt=aout em=sun3 ;;
1828 sparc-*-aout | sparc*-*-vxworks*)
1829 fmt=aout em=sparcaout ;;
1830 sparc-*-coff) fmt=coff ;;
1831 sparc-*-linux*aout*) fmt=aout em=linux ;;
1832 sparc-*-linux-gnu*) fmt=elf em=linux ;;
1833 sparc-*-lynxos*) fmt=coff em=lynx ;;
1834 sparc-fujitsu-none) fmt=aout ;;
1835 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
1836 fmt=elf ;;
1837 sparc-*-netbsd*) fmt=aout em=nbsd ;;
1838 sparc-*-openbsd*) fmt=aout em=nbsd ;;
1840 strongarm-*-coff) fmt=coff ;;
1841 strongarm-*-elf) fmt=elf ;;
1843 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
1844 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
1845 tic80-*-*) fmt=coff ;;
1847 v850-*-*) fmt=elf bfd_gas=yes ;;
1848 v850e-*-*) fmt=elf bfd_gas=yes ;;
1849 v850ea-*-*) fmt=elf bfd_gas=yes ;;
1851 vax-*-bsd* | vax-*-ultrix*)
1852 fmt=aout ;;
1853 vax-*-vms) fmt=vms ;;
1856 z8k-*-coff | z8k-*-sim)
1857 fmt=coff ;;
1859 w65-*-*) fmt=coff ;;
1861 *-*-aout | *-*-scout)
1862 fmt=aout ;;
1863 *-*-nindy*)
1864 fmt=bout ;;
1865 *-*-bsd*)
1866 fmt=aout em=sun3 ;;
1867 *-*-generic) fmt=generic ;;
1868 *-*-xray | *-*-hms) fmt=coff ;;
1869 *-*-sim) fmt=coff ;;
1870 *-*-elf | *-*-sysv4* | *-*-solaris*)
1871 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
1872 fmt=elf dev=yes ;;
1873 *-*-vxworks) fmt=aout ;;
1874 *-*-netware) fmt=elf ;;
1875 esac
1877 if test ${this_target} = $target ; then
1878 endian_def=
1879 if test x${endian} = xbig; then
1880 endian_def=1
1881 elif test x${endian} = xlittle; then
1882 endian_def=0
1884 if test x${endian_def} != x; then
1885 cat >> confdefs.h <<EOF
1886 #define TARGET_BYTES_BIG_ENDIAN $endian_def
1892 case ${cpu_type}-${fmt} in
1893 alpha*-*) bfd_gas=yes ;;
1894 arm-*) bfd_gas=yes ;;
1895 # not yet
1896 # i386-aout) bfd_gas=preferred ;;
1897 mips-*) bfd_gas=yes ;;
1898 ns32k-*) bfd_gas=yes ;;
1899 ppc-*) bfd_gas=yes ;;
1900 sparc-*) bfd_gas=yes ;;
1901 strongarm-*) bfd_gas=yes ;;
1902 *-elf) bfd_gas=yes ;;
1903 *-ecoff) bfd_gas=yes ;;
1904 *-som) bfd_gas=yes ;;
1905 *) ;;
1906 esac
1908 # Other random stuff.
1910 # Do we need the opcodes library?
1911 case ${cpu_type} in
1912 vax | i386 | tic30)
1916 need_opcodes=yes
1918 case "${enable_shared}" in
1919 yes) shared_opcodes=true ;;
1920 *opcodes*) shared_opcodes=true ;;
1921 *) shared_opcodes=false ;;
1922 esac
1923 if test "${shared_opcodes}" = "true"; then
1924 # A shared libopcodes must be linked against libbfd.
1925 need_bfd=yes
1928 esac
1930 # Any other special object files needed ?
1931 case ${cpu_type} in
1932 fr30 | m32r)
1933 using_cgen=yes
1936 m68k)
1937 case ${extra_objects} in
1938 *m68k-parse.o*) ;;
1939 *) extra_objects="$extra_objects m68k-parse.o" ;;
1940 esac
1943 mips)
1944 echo ${extra_objects} | grep -s "itbl-parse.o"
1945 if test $? -ne 0 ; then
1946 extra_objects="$extra_objects itbl-parse.o"
1949 echo ${extra_objects} | grep -s "itbl-lex.o"
1950 if test $? -ne 0 ; then
1951 extra_objects="$extra_objects itbl-lex.o"
1954 echo ${extra_objects} | grep -s "itbl-ops.o"
1955 if test $? -ne 0 ; then
1956 extra_objects="$extra_objects itbl-ops.o"
1960 sparc)
1961 if test $this_target = $target ; then
1962 cat >> confdefs.h <<EOF
1963 #define DEFAULT_ARCH "${arch}"
1970 esac
1972 if test $using_cgen = yes ; then
1973 case "x${extra_objects}" in
1974 *cgen.o*) ;;
1975 *) extra_objects="$extra_objects cgen.o" ;;
1976 esac
1979 # See if we really can support this configuration with the emulation code.
1981 if test $this_target = $target ; then
1982 primary_bfd_gas=$bfd_gas
1983 obj_format=$fmt
1984 te_file=$em
1986 if test $bfd_gas = no ; then
1987 # Can't support other configurations this way.
1988 break
1990 elif test $bfd_gas = no ; then
1991 # Can't support this configuration.
1992 break
1995 # From target name and format, produce a list of supported emulations.
1997 case ${generic_target}-${fmt} in
1998 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
1999 mips-*-linux-gnu*-*) case "$endian" in
2000 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
2001 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
2002 esac ;;
2003 mips-*-lnews*-ecoff) ;;
2004 mips-*-*-ecoff) case "$endian" in
2005 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
2006 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
2007 esac ;;
2008 mips-*-*-elf) case "$endian" in
2009 big) emulation="mipsbelf mipslelf mipself" ;;
2010 *) emulation="mipslelf mipsbelf mipself" ;;
2011 # Uncommenting the next line will turn on support for i386 COFF
2012 # in any i386 ELF configuration. This probably doesn't work
2013 # correctly.
2014 # i386-*-*-elf) emulation="i386coff i386elf" ;;
2015 esac ;;
2016 esac
2018 emulations="$emulations $emulation"
2020 done
2022 # Assign floating point type. Most processors with FP support
2023 # IEEE FP. On those that don't support FP at all, usually IEEE
2024 # is emulated.
2025 case ${target_cpu} in
2026 vax | tahoe ) atof=${target_cpu} ;;
2027 *) atof=ieee ;;
2028 esac
2030 case "${obj_format}" in
2031 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
2032 esac
2034 # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
2035 cgen_cpu_prefix=""
2036 if test $using_cgen = yes ; then
2037 case ${target_cpu} in
2038 *) cgen_cpu_prefix=${target_cpu} ;;
2039 esac
2041 cat >> confdefs.h <<\EOF
2042 #define USING_CGEN 1
2048 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
2049 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
2052 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
2053 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
2056 case ${user_bfd_gas}-${primary_bfd_gas} in
2057 yes-yes | no-no)
2058 # We didn't override user's choice.
2060 no-yes)
2061 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
2063 no-preferred)
2064 primary_bfd_gas=no
2066 *-preferred)
2067 primary_bfd_gas=yes
2069 yes-*)
2070 primary_bfd_gas=yes
2073 # User specified nothing.
2075 esac
2077 # Some COFF configurations want these random other flags set.
2078 case ${obj_format} in
2079 coff)
2080 case ${target_cpu_type} in
2081 i386) cat >> confdefs.h <<\EOF
2082 #define I386COFF 1
2085 m68k) cat >> confdefs.h <<\EOF
2086 #define M68KCOFF 1
2089 m88k) cat >> confdefs.h <<\EOF
2090 #define M88KCOFF 1
2093 esac
2095 esac
2097 # Getting this done right is going to be a bitch. Each configuration specified
2098 # with --enable-targets=... should be checked for environment, format, cpu, and
2099 # bfd_gas setting.
2101 # For each configuration, the necessary object file support code must be linked
2102 # in. This might be only one, it might be up to four. The necessary emulation
2103 # code needs to be provided, too.
2105 # And then there's "--enable-targets=all"....
2107 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
2109 formats="${obj_format}"
2110 emfiles=""
2111 EMULATIONS=""
2112 _gas_uniq_list="$emulations"
2113 _gas_uniq_newlist=""
2114 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2115 case $_gas_uniq_i in
2116 _gas_uniq_dummy) ;;
2117 *) case " $_gas_uniq_newlist " in
2118 *" $_gas_uniq_i "*) ;;
2119 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2120 esac ;;
2121 esac
2122 done
2123 emulations=$_gas_uniq_newlist
2125 for em in . $emulations ; do
2126 case $em in
2127 .) continue ;;
2128 mipsbelf | mipslelf)
2129 fmt=elf file=mipself ;;
2130 mipsbecoff | mipslecoff)
2131 fmt=ecoff file=mipsecoff ;;
2132 i386coff)
2133 fmt=coff file=i386coff ;;
2134 i386elf)
2135 fmt=elf file=i386elf ;;
2136 esac
2137 formats="$formats $fmt"
2138 emfiles="$emfiles e-$file.o"
2139 EMULATIONS="$EMULATIONS &$em,"
2140 done
2141 _gas_uniq_list="$formats"
2142 _gas_uniq_newlist=""
2143 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2144 case $_gas_uniq_i in
2145 _gas_uniq_dummy) ;;
2146 *) case " $_gas_uniq_newlist " in
2147 *" $_gas_uniq_i "*) ;;
2148 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2149 esac ;;
2150 esac
2151 done
2152 formats=$_gas_uniq_newlist
2154 _gas_uniq_list="$emfiles"
2155 _gas_uniq_newlist=""
2156 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2157 case $_gas_uniq_i in
2158 _gas_uniq_dummy) ;;
2159 *) case " $_gas_uniq_newlist " in
2160 *" $_gas_uniq_i "*) ;;
2161 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2162 esac ;;
2163 esac
2164 done
2165 emfiles=$_gas_uniq_newlist
2167 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
2168 for fmt in $formats ; do
2169 case $fmt in
2170 aout) cat >> confdefs.h <<\EOF
2171 #define OBJ_MAYBE_AOUT 1
2174 bout) cat >> confdefs.h <<\EOF
2175 #define OBJ_MAYBE_BOUT 1
2178 coff) cat >> confdefs.h <<\EOF
2179 #define OBJ_MAYBE_COFF 1
2182 ecoff) cat >> confdefs.h <<\EOF
2183 #define OBJ_MAYBE_ECOFF 1
2186 elf) cat >> confdefs.h <<\EOF
2187 #define OBJ_MAYBE_ELF 1
2190 generic) cat >> confdefs.h <<\EOF
2191 #define OBJ_MAYBE_GENERIC 1
2194 hp300) cat >> confdefs.h <<\EOF
2195 #define OBJ_MAYBE_HP300 1
2198 ieee) cat >> confdefs.h <<\EOF
2199 #define OBJ_MAYBE_IEEE 1
2202 som) cat >> confdefs.h <<\EOF
2203 #define OBJ_MAYBE_SOM 1
2206 vms) cat >> confdefs.h <<\EOF
2207 #define OBJ_MAYBE_VMS 1
2210 esac
2211 extra_objects="$extra_objects obj-$fmt.o"
2212 done
2213 obj_format=multi
2215 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
2216 te_file=multi
2217 extra_objects="$extra_objects $emfiles"
2218 DEFAULT_EMULATION=`set . $emulations ; echo $2`
2219 cat >> confdefs.h <<\EOF
2220 #define USE_EMULATIONS 1
2225 cat >> confdefs.h <<EOF
2226 #define EMULATIONS $EMULATIONS
2229 cat >> confdefs.h <<EOF
2230 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
2234 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
2235 yes-*-coff) need_bfd=yes ;;
2236 no-*-coff) need_bfd=yes
2237 cat >> confdefs.h <<\EOF
2238 #define MANY_SEGMENTS 1
2241 esac
2243 reject_dev_configs=yes
2245 case ${reject_dev_configs}-${dev} in
2246 yes-yes) # Oops.
2247 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
2249 esac
2257 case "${primary_bfd_gas}" in
2258 yes) cat >> confdefs.h <<\EOF
2259 #define BFD_ASSEMBLER 1
2262 need_bfd=yes ;;
2263 esac
2265 # do we need the opcodes library?
2266 case "${need_opcodes}" in
2267 yes)
2268 OPCODES_LIB=../opcodes/libopcodes.la
2270 esac
2272 case "${need_bfd}" in
2273 yes)
2274 BFDLIB=../bfd/libbfd.la
2275 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
2277 esac
2284 cat >> confdefs.h <<EOF
2285 #define TARGET_ALIAS "${target_alias}"
2288 cat >> confdefs.h <<EOF
2289 #define TARGET_CANONICAL "${target}"
2292 cat >> confdefs.h <<EOF
2293 #define TARGET_CPU "${target_cpu}"
2296 cat >> confdefs.h <<EOF
2297 #define TARGET_VENDOR "${target_vendor}"
2300 cat >> confdefs.h <<EOF
2301 #define TARGET_OS "${target_os}"
2305 # Extract the first word of "gcc", so it can be a program name with args.
2306 set dummy gcc; ac_word=$2
2307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2308 echo "configure:2323: checking for $ac_word" >&5
2309 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2310 echo $ac_n "(cached) $ac_c" 1>&6
2311 else
2312 if test -n "$CC"; then
2313 ac_cv_prog_CC="$CC" # Let the user override the test.
2314 else
2315 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2316 ac_dummy="$PATH"
2317 for ac_dir in $ac_dummy; do
2318 test -z "$ac_dir" && ac_dir=.
2319 if test -f $ac_dir/$ac_word; then
2320 ac_cv_prog_CC="gcc"
2321 break
2323 done
2324 IFS="$ac_save_ifs"
2327 CC="$ac_cv_prog_CC"
2328 if test -n "$CC"; then
2329 echo "$ac_t""$CC" 1>&6
2330 else
2331 echo "$ac_t""no" 1>&6
2334 if test -z "$CC"; then
2335 # Extract the first word of "cc", so it can be a program name with args.
2336 set dummy cc; ac_word=$2
2337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2338 echo "configure:2353: checking for $ac_word" >&5
2339 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2340 echo $ac_n "(cached) $ac_c" 1>&6
2341 else
2342 if test -n "$CC"; then
2343 ac_cv_prog_CC="$CC" # Let the user override the test.
2344 else
2345 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2346 ac_prog_rejected=no
2347 ac_dummy="$PATH"
2348 for ac_dir in $ac_dummy; do
2349 test -z "$ac_dir" && ac_dir=.
2350 if test -f $ac_dir/$ac_word; then
2351 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2352 ac_prog_rejected=yes
2353 continue
2355 ac_cv_prog_CC="cc"
2356 break
2358 done
2359 IFS="$ac_save_ifs"
2360 if test $ac_prog_rejected = yes; then
2361 # We found a bogon in the path, so make sure we never use it.
2362 set dummy $ac_cv_prog_CC
2363 shift
2364 if test $# -gt 0; then
2365 # We chose a different compiler from the bogus one.
2366 # However, it has the same basename, so the bogon will be chosen
2367 # first if we set CC to just the basename; use the full file name.
2368 shift
2369 set dummy "$ac_dir/$ac_word" "$@"
2370 shift
2371 ac_cv_prog_CC="$@"
2376 CC="$ac_cv_prog_CC"
2377 if test -n "$CC"; then
2378 echo "$ac_t""$CC" 1>&6
2379 else
2380 echo "$ac_t""no" 1>&6
2383 if test -z "$CC"; then
2384 case "`uname -s`" in
2385 *win32* | *WIN32*)
2386 # Extract the first word of "cl", so it can be a program name with args.
2387 set dummy cl; ac_word=$2
2388 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2389 echo "configure:2404: checking for $ac_word" >&5
2390 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2391 echo $ac_n "(cached) $ac_c" 1>&6
2392 else
2393 if test -n "$CC"; then
2394 ac_cv_prog_CC="$CC" # Let the user override the test.
2395 else
2396 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2397 ac_dummy="$PATH"
2398 for ac_dir in $ac_dummy; do
2399 test -z "$ac_dir" && ac_dir=.
2400 if test -f $ac_dir/$ac_word; then
2401 ac_cv_prog_CC="cl"
2402 break
2404 done
2405 IFS="$ac_save_ifs"
2408 CC="$ac_cv_prog_CC"
2409 if test -n "$CC"; then
2410 echo "$ac_t""$CC" 1>&6
2411 else
2412 echo "$ac_t""no" 1>&6
2415 esac
2417 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2420 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2421 echo "configure:2436: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2423 ac_ext=c
2424 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2425 ac_cpp='$CPP $CPPFLAGS'
2426 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2427 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2428 cross_compiling=$ac_cv_prog_cc_cross
2430 cat > conftest.$ac_ext << EOF
2432 #line 2447 "configure"
2433 #include "confdefs.h"
2435 main(){return(0);}
2437 if { (eval echo configure:2452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2438 ac_cv_prog_cc_works=yes
2439 # If we can't run a trivial program, we are probably using a cross compiler.
2440 if (./conftest; exit) 2>/dev/null; then
2441 ac_cv_prog_cc_cross=no
2442 else
2443 ac_cv_prog_cc_cross=yes
2445 else
2446 echo "configure: failed program was:" >&5
2447 cat conftest.$ac_ext >&5
2448 ac_cv_prog_cc_works=no
2450 rm -fr conftest*
2451 ac_ext=c
2452 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2453 ac_cpp='$CPP $CPPFLAGS'
2454 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2455 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2456 cross_compiling=$ac_cv_prog_cc_cross
2458 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2459 if test $ac_cv_prog_cc_works = no; then
2460 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2462 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2463 echo "configure:2478: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2464 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2465 cross_compiling=$ac_cv_prog_cc_cross
2467 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2468 echo "configure:2483: checking whether we are using GNU C" >&5
2469 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2470 echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472 cat > conftest.c <<EOF
2473 #ifdef __GNUC__
2474 yes;
2475 #endif
2477 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2478 ac_cv_prog_gcc=yes
2479 else
2480 ac_cv_prog_gcc=no
2484 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2486 if test $ac_cv_prog_gcc = yes; then
2487 GCC=yes
2488 else
2489 GCC=
2492 ac_test_CFLAGS="${CFLAGS+set}"
2493 ac_save_CFLAGS="$CFLAGS"
2494 CFLAGS=
2495 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2496 echo "configure:2511: checking whether ${CC-cc} accepts -g" >&5
2497 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2498 echo $ac_n "(cached) $ac_c" 1>&6
2499 else
2500 echo 'void f(){}' > conftest.c
2501 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2502 ac_cv_prog_cc_g=yes
2503 else
2504 ac_cv_prog_cc_g=no
2506 rm -f conftest*
2510 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2511 if test "$ac_test_CFLAGS" = set; then
2512 CFLAGS="$ac_save_CFLAGS"
2513 elif test $ac_cv_prog_cc_g = yes; then
2514 if test "$GCC" = yes; then
2515 CFLAGS="-g -O2"
2516 else
2517 CFLAGS="-g"
2519 else
2520 if test "$GCC" = yes; then
2521 CFLAGS="-O2"
2522 else
2523 CFLAGS=
2528 for ac_prog in 'bison -y' byacc
2530 # Extract the first word of "$ac_prog", so it can be a program name with args.
2531 set dummy $ac_prog; ac_word=$2
2532 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2533 echo "configure:2548: checking for $ac_word" >&5
2534 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536 else
2537 if test -n "$YACC"; then
2538 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2539 else
2540 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2541 ac_dummy="$PATH"
2542 for ac_dir in $ac_dummy; do
2543 test -z "$ac_dir" && ac_dir=.
2544 if test -f $ac_dir/$ac_word; then
2545 ac_cv_prog_YACC="$ac_prog"
2546 break
2548 done
2549 IFS="$ac_save_ifs"
2552 YACC="$ac_cv_prog_YACC"
2553 if test -n "$YACC"; then
2554 echo "$ac_t""$YACC" 1>&6
2555 else
2556 echo "$ac_t""no" 1>&6
2559 test -n "$YACC" && break
2560 done
2561 test -n "$YACC" || YACC="yacc"
2563 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2564 echo "configure:2579: checking how to run the C preprocessor" >&5
2565 # On Suns, sometimes $CPP names a directory.
2566 if test -n "$CPP" && test -d "$CPP"; then
2567 CPP=
2569 if test -z "$CPP"; then
2570 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572 else
2573 # This must be in double quotes, not single quotes, because CPP may get
2574 # substituted into the Makefile and "${CC-cc}" will confuse make.
2575 CPP="${CC-cc} -E"
2576 # On the NeXT, cc -E runs the code through the compiler's parser,
2577 # not just through cpp.
2578 cat > conftest.$ac_ext <<EOF
2579 #line 2594 "configure"
2580 #include "confdefs.h"
2581 #include <assert.h>
2582 Syntax Error
2584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2585 { (eval echo configure:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2587 if test -z "$ac_err"; then
2589 else
2590 echo "$ac_err" >&5
2591 echo "configure: failed program was:" >&5
2592 cat conftest.$ac_ext >&5
2593 rm -rf conftest*
2594 CPP="${CC-cc} -E -traditional-cpp"
2595 cat > conftest.$ac_ext <<EOF
2596 #line 2611 "configure"
2597 #include "confdefs.h"
2598 #include <assert.h>
2599 Syntax Error
2601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2602 { (eval echo configure:2617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2604 if test -z "$ac_err"; then
2606 else
2607 echo "$ac_err" >&5
2608 echo "configure: failed program was:" >&5
2609 cat conftest.$ac_ext >&5
2610 rm -rf conftest*
2611 CPP="${CC-cc} -nologo -E"
2612 cat > conftest.$ac_ext <<EOF
2613 #line 2628 "configure"
2614 #include "confdefs.h"
2615 #include <assert.h>
2616 Syntax Error
2618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2619 { (eval echo configure:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2621 if test -z "$ac_err"; then
2623 else
2624 echo "$ac_err" >&5
2625 echo "configure: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 rm -rf conftest*
2628 CPP=/lib/cpp
2630 rm -f conftest*
2632 rm -f conftest*
2634 rm -f conftest*
2635 ac_cv_prog_CPP="$CPP"
2637 CPP="$ac_cv_prog_CPP"
2638 else
2639 ac_cv_prog_CPP="$CPP"
2641 echo "$ac_t""$CPP" 1>&6
2643 missing_dir=`cd $ac_aux_dir && pwd`
2644 for ac_prog in flex lex
2646 # Extract the first word of "$ac_prog", so it can be a program name with args.
2647 set dummy $ac_prog; ac_word=$2
2648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2649 echo "configure:2664: checking for $ac_word" >&5
2650 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2651 echo $ac_n "(cached) $ac_c" 1>&6
2652 else
2653 if test -n "$LEX"; then
2654 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2655 else
2656 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2657 ac_dummy="$PATH"
2658 for ac_dir in $ac_dummy; do
2659 test -z "$ac_dir" && ac_dir=.
2660 if test -f $ac_dir/$ac_word; then
2661 ac_cv_prog_LEX="$ac_prog"
2662 break
2664 done
2665 IFS="$ac_save_ifs"
2668 LEX="$ac_cv_prog_LEX"
2669 if test -n "$LEX"; then
2670 echo "$ac_t""$LEX" 1>&6
2671 else
2672 echo "$ac_t""no" 1>&6
2675 test -n "$LEX" && break
2676 done
2677 test -n "$LEX" || LEX=""$missing_dir/missing flex""
2679 # Extract the first word of "flex", so it can be a program name with args.
2680 set dummy flex; ac_word=$2
2681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2682 echo "configure:2697: checking for $ac_word" >&5
2683 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2684 echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686 if test -n "$LEX"; then
2687 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2688 else
2689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2690 ac_dummy="$PATH"
2691 for ac_dir in $ac_dummy; do
2692 test -z "$ac_dir" && ac_dir=.
2693 if test -f $ac_dir/$ac_word; then
2694 ac_cv_prog_LEX="flex"
2695 break
2697 done
2698 IFS="$ac_save_ifs"
2699 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2702 LEX="$ac_cv_prog_LEX"
2703 if test -n "$LEX"; then
2704 echo "$ac_t""$LEX" 1>&6
2705 else
2706 echo "$ac_t""no" 1>&6
2709 if test -z "$LEXLIB"
2710 then
2711 case "$LEX" in
2712 flex*) ac_lib=fl ;;
2713 *) ac_lib=l ;;
2714 esac
2715 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2716 echo "configure:2731: checking for yywrap in -l$ac_lib" >&5
2717 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2718 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2719 echo $ac_n "(cached) $ac_c" 1>&6
2720 else
2721 ac_save_LIBS="$LIBS"
2722 LIBS="-l$ac_lib $LIBS"
2723 cat > conftest.$ac_ext <<EOF
2724 #line 2739 "configure"
2725 #include "confdefs.h"
2726 /* Override any gcc2 internal prototype to avoid an error. */
2727 /* We use char because int might match the return type of a gcc2
2728 builtin and then its argument prototype would still apply. */
2729 char yywrap();
2731 int main() {
2732 yywrap()
2733 ; return 0; }
2735 if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2736 rm -rf conftest*
2737 eval "ac_cv_lib_$ac_lib_var=yes"
2738 else
2739 echo "configure: failed program was:" >&5
2740 cat conftest.$ac_ext >&5
2741 rm -rf conftest*
2742 eval "ac_cv_lib_$ac_lib_var=no"
2744 rm -f conftest*
2745 LIBS="$ac_save_LIBS"
2748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2749 echo "$ac_t""yes" 1>&6
2750 LEXLIB="-l$ac_lib"
2751 else
2752 echo "$ac_t""no" 1>&6
2757 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2758 echo "configure:2773: checking lex output file root" >&5
2759 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2760 echo $ac_n "(cached) $ac_c" 1>&6
2761 else
2762 # The minimal lex program is just a single line: %%. But some broken lexes
2763 # (Solaris, I think it was) want two %% lines, so accommodate them.
2764 echo '%%
2765 %%' | $LEX
2766 if test -f lex.yy.c; then
2767 ac_cv_prog_lex_root=lex.yy
2768 elif test -f lexyy.c; then
2769 ac_cv_prog_lex_root=lexyy
2770 else
2771 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2775 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2776 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2778 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2779 echo "configure:2794: checking whether yytext is a pointer" >&5
2780 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2781 echo $ac_n "(cached) $ac_c" 1>&6
2782 else
2783 # POSIX says lex can declare yytext either as a pointer or an array; the
2784 # default is implementation-dependent. Figure out which it is, since
2785 # not all implementations provide the %pointer and %array declarations.
2786 ac_cv_prog_lex_yytext_pointer=no
2787 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2788 ac_save_LIBS="$LIBS"
2789 LIBS="$LIBS $LEXLIB"
2790 cat > conftest.$ac_ext <<EOF
2791 #line 2806 "configure"
2792 #include "confdefs.h"
2793 `cat $LEX_OUTPUT_ROOT.c`
2794 int main() {
2796 ; return 0; }
2798 if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2799 rm -rf conftest*
2800 ac_cv_prog_lex_yytext_pointer=yes
2801 else
2802 echo "configure: failed program was:" >&5
2803 cat conftest.$ac_ext >&5
2805 rm -f conftest*
2806 LIBS="$ac_save_LIBS"
2807 rm -f "${LEX_OUTPUT_ROOT}.c"
2811 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2812 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2813 cat >> confdefs.h <<\EOF
2814 #define YYTEXT_POINTER 1
2820 ALL_LINGUAS=
2821 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2822 echo "configure:2837: checking for POSIXized ISC" >&5
2823 if test -d /etc/conf/kconfig.d &&
2824 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2825 then
2826 echo "$ac_t""yes" 1>&6
2827 ISC=yes # If later tests want to check for ISC.
2828 cat >> confdefs.h <<\EOF
2829 #define _POSIX_SOURCE 1
2832 if test "$GCC" = yes; then
2833 CC="$CC -posix"
2834 else
2835 CC="$CC -Xp"
2837 else
2838 echo "$ac_t""no" 1>&6
2839 ISC=
2842 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2843 echo "configure:2858: checking for ANSI C header files" >&5
2844 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2845 echo $ac_n "(cached) $ac_c" 1>&6
2846 else
2847 cat > conftest.$ac_ext <<EOF
2848 #line 2863 "configure"
2849 #include "confdefs.h"
2850 #include <stdlib.h>
2851 #include <stdarg.h>
2852 #include <string.h>
2853 #include <float.h>
2855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2856 { (eval echo configure:2871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2858 if test -z "$ac_err"; then
2859 rm -rf conftest*
2860 ac_cv_header_stdc=yes
2861 else
2862 echo "$ac_err" >&5
2863 echo "configure: failed program was:" >&5
2864 cat conftest.$ac_ext >&5
2865 rm -rf conftest*
2866 ac_cv_header_stdc=no
2868 rm -f conftest*
2870 if test $ac_cv_header_stdc = yes; then
2871 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2872 cat > conftest.$ac_ext <<EOF
2873 #line 2888 "configure"
2874 #include "confdefs.h"
2875 #include <string.h>
2877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2878 egrep "memchr" >/dev/null 2>&1; then
2880 else
2881 rm -rf conftest*
2882 ac_cv_header_stdc=no
2884 rm -f conftest*
2888 if test $ac_cv_header_stdc = yes; then
2889 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2890 cat > conftest.$ac_ext <<EOF
2891 #line 2906 "configure"
2892 #include "confdefs.h"
2893 #include <stdlib.h>
2895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2896 egrep "free" >/dev/null 2>&1; then
2898 else
2899 rm -rf conftest*
2900 ac_cv_header_stdc=no
2902 rm -f conftest*
2906 if test $ac_cv_header_stdc = yes; then
2907 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2908 if test "$cross_compiling" = yes; then
2910 else
2911 cat > conftest.$ac_ext <<EOF
2912 #line 2927 "configure"
2913 #include "confdefs.h"
2914 #include <ctype.h>
2915 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2916 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2917 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2918 int main () { int i; for (i = 0; i < 256; i++)
2919 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2920 exit (0); }
2923 if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2924 then
2926 else
2927 echo "configure: failed program was:" >&5
2928 cat conftest.$ac_ext >&5
2929 rm -fr conftest*
2930 ac_cv_header_stdc=no
2932 rm -fr conftest*
2938 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2939 if test $ac_cv_header_stdc = yes; then
2940 cat >> confdefs.h <<\EOF
2941 #define STDC_HEADERS 1
2946 echo $ac_n "checking for working const""... $ac_c" 1>&6
2947 echo "configure:2962: checking for working const" >&5
2948 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2949 echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951 cat > conftest.$ac_ext <<EOF
2952 #line 2967 "configure"
2953 #include "confdefs.h"
2955 int main() {
2957 /* Ultrix mips cc rejects this. */
2958 typedef int charset[2]; const charset x;
2959 /* SunOS 4.1.1 cc rejects this. */
2960 char const *const *ccp;
2961 char **p;
2962 /* NEC SVR4.0.2 mips cc rejects this. */
2963 struct point {int x, y;};
2964 static struct point const zero = {0,0};
2965 /* AIX XL C 1.02.0.0 rejects this.
2966 It does not let you subtract one const X* pointer from another in an arm
2967 of an if-expression whose if-part is not a constant expression */
2968 const char *g = "string";
2969 ccp = &g + (g ? g-g : 0);
2970 /* HPUX 7.0 cc rejects these. */
2971 ++ccp;
2972 p = (char**) ccp;
2973 ccp = (char const *const *) p;
2974 { /* SCO 3.2v4 cc rejects this. */
2975 char *t;
2976 char const *s = 0 ? (char *) 0 : (char const *) 0;
2978 *t++ = 0;
2980 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2981 int x[] = {25, 17};
2982 const int *foo = &x[0];
2983 ++foo;
2985 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2986 typedef const int *iptr;
2987 iptr p = 0;
2988 ++p;
2990 { /* AIX XL C 1.02.0.0 rejects this saying
2991 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2992 struct s { int j; const int *ap[3]; };
2993 struct s *b; b->j = 5;
2995 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2996 const int foo = 10;
2999 ; return 0; }
3001 if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3002 rm -rf conftest*
3003 ac_cv_c_const=yes
3004 else
3005 echo "configure: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 rm -rf conftest*
3008 ac_cv_c_const=no
3010 rm -f conftest*
3013 echo "$ac_t""$ac_cv_c_const" 1>&6
3014 if test $ac_cv_c_const = no; then
3015 cat >> confdefs.h <<\EOF
3016 #define const
3021 echo $ac_n "checking for inline""... $ac_c" 1>&6
3022 echo "configure:3037: checking for inline" >&5
3023 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3024 echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026 ac_cv_c_inline=no
3027 for ac_kw in inline __inline__ __inline; do
3028 cat > conftest.$ac_ext <<EOF
3029 #line 3044 "configure"
3030 #include "confdefs.h"
3032 int main() {
3033 } $ac_kw foo() {
3034 ; return 0; }
3036 if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3037 rm -rf conftest*
3038 ac_cv_c_inline=$ac_kw; break
3039 else
3040 echo "configure: failed program was:" >&5
3041 cat conftest.$ac_ext >&5
3043 rm -f conftest*
3044 done
3048 echo "$ac_t""$ac_cv_c_inline" 1>&6
3049 case "$ac_cv_c_inline" in
3050 inline | yes) ;;
3051 no) cat >> confdefs.h <<\EOF
3052 #define inline
3055 *) cat >> confdefs.h <<EOF
3056 #define inline $ac_cv_c_inline
3059 esac
3061 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3062 echo "configure:3077: checking for off_t" >&5
3063 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3064 echo $ac_n "(cached) $ac_c" 1>&6
3065 else
3066 cat > conftest.$ac_ext <<EOF
3067 #line 3082 "configure"
3068 #include "confdefs.h"
3069 #include <sys/types.h>
3070 #if STDC_HEADERS
3071 #include <stdlib.h>
3072 #include <stddef.h>
3073 #endif
3075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3076 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3077 rm -rf conftest*
3078 ac_cv_type_off_t=yes
3079 else
3080 rm -rf conftest*
3081 ac_cv_type_off_t=no
3083 rm -f conftest*
3086 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3087 if test $ac_cv_type_off_t = no; then
3088 cat >> confdefs.h <<\EOF
3089 #define off_t long
3094 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3095 echo "configure:3110: checking for size_t" >&5
3096 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3097 echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099 cat > conftest.$ac_ext <<EOF
3100 #line 3115 "configure"
3101 #include "confdefs.h"
3102 #include <sys/types.h>
3103 #if STDC_HEADERS
3104 #include <stdlib.h>
3105 #include <stddef.h>
3106 #endif
3108 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3109 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3110 rm -rf conftest*
3111 ac_cv_type_size_t=yes
3112 else
3113 rm -rf conftest*
3114 ac_cv_type_size_t=no
3116 rm -f conftest*
3119 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3120 if test $ac_cv_type_size_t = no; then
3121 cat >> confdefs.h <<\EOF
3122 #define size_t unsigned
3127 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3128 # for constant arguments. Useless!
3129 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3130 echo "configure:3145: checking for working alloca.h" >&5
3131 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3132 echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3150 "configure"
3136 #include "confdefs.h"
3137 #include <alloca.h>
3138 int main() {
3139 char *p = alloca(2 * sizeof(int));
3140 ; return 0; }
3142 if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3143 rm -rf conftest*
3144 ac_cv_header_alloca_h=yes
3145 else
3146 echo "configure: failed program was:" >&5
3147 cat conftest.$ac_ext >&5
3148 rm -rf conftest*
3149 ac_cv_header_alloca_h=no
3151 rm -f conftest*
3154 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3155 if test $ac_cv_header_alloca_h = yes; then
3156 cat >> confdefs.h <<\EOF
3157 #define HAVE_ALLOCA_H 1
3162 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3163 echo "configure:3178: checking for alloca" >&5
3164 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3165 echo $ac_n "(cached) $ac_c" 1>&6
3166 else
3167 cat > conftest.$ac_ext <<EOF
3168 #line 3183 "configure"
3169 #include "confdefs.h"
3171 #ifdef __GNUC__
3172 # define alloca __builtin_alloca
3173 #else
3174 # ifdef _MSC_VER
3175 # include <malloc.h>
3176 # define alloca _alloca
3177 # else
3178 # if HAVE_ALLOCA_H
3179 # include <alloca.h>
3180 # else
3181 # ifdef _AIX
3182 #pragma alloca
3183 # else
3184 # ifndef alloca /* predefined by HP cc +Olibcalls */
3185 char *alloca ();
3186 # endif
3187 # endif
3188 # endif
3189 # endif
3190 #endif
3192 int main() {
3193 char *p = (char *) alloca(1);
3194 ; return 0; }
3196 if { (eval echo configure:3211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3197 rm -rf conftest*
3198 ac_cv_func_alloca_works=yes
3199 else
3200 echo "configure: failed program was:" >&5
3201 cat conftest.$ac_ext >&5
3202 rm -rf conftest*
3203 ac_cv_func_alloca_works=no
3205 rm -f conftest*
3208 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3209 if test $ac_cv_func_alloca_works = yes; then
3210 cat >> confdefs.h <<\EOF
3211 #define HAVE_ALLOCA 1
3216 if test $ac_cv_func_alloca_works = no; then
3217 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3218 # that cause trouble. Some versions do not even contain alloca or
3219 # contain a buggy version. If you still want to use their alloca,
3220 # use ar to extract alloca.o from them instead of compiling alloca.c.
3221 ALLOCA=alloca.${ac_objext}
3222 cat >> confdefs.h <<\EOF
3223 #define C_ALLOCA 1
3227 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3228 echo "configure:3243: checking whether alloca needs Cray hooks" >&5
3229 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3230 echo $ac_n "(cached) $ac_c" 1>&6
3231 else
3232 cat > conftest.$ac_ext <<EOF
3233 #line 3248 "configure"
3234 #include "confdefs.h"
3235 #if defined(CRAY) && ! defined(CRAY2)
3236 webecray
3237 #else
3238 wenotbecray
3239 #endif
3242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3243 egrep "webecray" >/dev/null 2>&1; then
3244 rm -rf conftest*
3245 ac_cv_os_cray=yes
3246 else
3247 rm -rf conftest*
3248 ac_cv_os_cray=no
3250 rm -f conftest*
3254 echo "$ac_t""$ac_cv_os_cray" 1>&6
3255 if test $ac_cv_os_cray = yes; then
3256 for ac_func in _getb67 GETB67 getb67; do
3257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3258 echo "configure:3273: checking for $ac_func" >&5
3259 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3260 echo $ac_n "(cached) $ac_c" 1>&6
3261 else
3262 cat > conftest.$ac_ext <<EOF
3263 #line 3278 "configure"
3264 #include "confdefs.h"
3265 /* System header to define __stub macros and hopefully few prototypes,
3266 which can conflict with char $ac_func(); below. */
3267 #include <assert.h>
3268 /* Override any gcc2 internal prototype to avoid an error. */
3269 /* We use char because int might match the return type of a gcc2
3270 builtin and then its argument prototype would still apply. */
3271 char $ac_func();
3273 int main() {
3275 /* The GNU C library defines this for functions which it implements
3276 to always fail with ENOSYS. Some functions are actually named
3277 something starting with __ and the normal name is an alias. */
3278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3279 choke me
3280 #else
3281 $ac_func();
3282 #endif
3284 ; return 0; }
3286 if { (eval echo configure:3301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3287 rm -rf conftest*
3288 eval "ac_cv_func_$ac_func=yes"
3289 else
3290 echo "configure: failed program was:" >&5
3291 cat conftest.$ac_ext >&5
3292 rm -rf conftest*
3293 eval "ac_cv_func_$ac_func=no"
3295 rm -f conftest*
3298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3299 echo "$ac_t""yes" 1>&6
3300 cat >> confdefs.h <<EOF
3301 #define CRAY_STACKSEG_END $ac_func
3304 break
3305 else
3306 echo "$ac_t""no" 1>&6
3309 done
3312 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3313 echo "configure:3328: checking stack direction for C alloca" >&5
3314 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3315 echo $ac_n "(cached) $ac_c" 1>&6
3316 else
3317 if test "$cross_compiling" = yes; then
3318 ac_cv_c_stack_direction=0
3319 else
3320 cat > conftest.$ac_ext <<EOF
3321 #line 3336 "configure"
3322 #include "confdefs.h"
3323 find_stack_direction ()
3325 static char *addr = 0;
3326 auto char dummy;
3327 if (addr == 0)
3329 addr = &dummy;
3330 return find_stack_direction ();
3332 else
3333 return (&dummy > addr) ? 1 : -1;
3335 main ()
3337 exit (find_stack_direction() < 0);
3340 if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3341 then
3342 ac_cv_c_stack_direction=1
3343 else
3344 echo "configure: failed program was:" >&5
3345 cat conftest.$ac_ext >&5
3346 rm -fr conftest*
3347 ac_cv_c_stack_direction=-1
3349 rm -fr conftest*
3354 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3355 cat >> confdefs.h <<EOF
3356 #define STACK_DIRECTION $ac_cv_c_stack_direction
3361 for ac_hdr in unistd.h
3363 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3364 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3365 echo "configure:3380: checking for $ac_hdr" >&5
3366 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3367 echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369 cat > conftest.$ac_ext <<EOF
3370 #line 3385 "configure"
3371 #include "confdefs.h"
3372 #include <$ac_hdr>
3374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3375 { (eval echo configure:3390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3377 if test -z "$ac_err"; then
3378 rm -rf conftest*
3379 eval "ac_cv_header_$ac_safe=yes"
3380 else
3381 echo "$ac_err" >&5
3382 echo "configure: failed program was:" >&5
3383 cat conftest.$ac_ext >&5
3384 rm -rf conftest*
3385 eval "ac_cv_header_$ac_safe=no"
3387 rm -f conftest*
3389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3390 echo "$ac_t""yes" 1>&6
3391 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3392 cat >> confdefs.h <<EOF
3393 #define $ac_tr_hdr 1
3396 else
3397 echo "$ac_t""no" 1>&6
3399 done
3401 for ac_func in getpagesize
3403 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3404 echo "configure:3419: checking for $ac_func" >&5
3405 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3406 echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408 cat > conftest.$ac_ext <<EOF
3409 #line 3424 "configure"
3410 #include "confdefs.h"
3411 /* System header to define __stub macros and hopefully few prototypes,
3412 which can conflict with char $ac_func(); below. */
3413 #include <assert.h>
3414 /* Override any gcc2 internal prototype to avoid an error. */
3415 /* We use char because int might match the return type of a gcc2
3416 builtin and then its argument prototype would still apply. */
3417 char $ac_func();
3419 int main() {
3421 /* The GNU C library defines this for functions which it implements
3422 to always fail with ENOSYS. Some functions are actually named
3423 something starting with __ and the normal name is an alias. */
3424 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3425 choke me
3426 #else
3427 $ac_func();
3428 #endif
3430 ; return 0; }
3432 if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3433 rm -rf conftest*
3434 eval "ac_cv_func_$ac_func=yes"
3435 else
3436 echo "configure: failed program was:" >&5
3437 cat conftest.$ac_ext >&5
3438 rm -rf conftest*
3439 eval "ac_cv_func_$ac_func=no"
3441 rm -f conftest*
3444 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3445 echo "$ac_t""yes" 1>&6
3446 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3447 cat >> confdefs.h <<EOF
3448 #define $ac_tr_func 1
3451 else
3452 echo "$ac_t""no" 1>&6
3454 done
3456 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3457 echo "configure:3472: checking for working mmap" >&5
3458 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3459 echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461 if test "$cross_compiling" = yes; then
3462 ac_cv_func_mmap_fixed_mapped=no
3463 else
3464 cat > conftest.$ac_ext <<EOF
3465 #line 3480 "configure"
3466 #include "confdefs.h"
3468 /* Thanks to Mike Haertel and Jim Avera for this test.
3469 Here is a matrix of mmap possibilities:
3470 mmap private not fixed
3471 mmap private fixed at somewhere currently unmapped
3472 mmap private fixed at somewhere already mapped
3473 mmap shared not fixed
3474 mmap shared fixed at somewhere currently unmapped
3475 mmap shared fixed at somewhere already mapped
3476 For private mappings, we should verify that changes cannot be read()
3477 back from the file, nor mmap's back from the file at a different
3478 address. (There have been systems where private was not correctly
3479 implemented like the infamous i386 svr4.0, and systems where the
3480 VM page cache was not coherent with the filesystem buffer cache
3481 like early versions of FreeBSD and possibly contemporary NetBSD.)
3482 For shared mappings, we should conversely verify that changes get
3483 propogated back to all the places they're supposed to be.
3485 Grep wants private fixed already mapped.
3486 The main things grep needs to know about mmap are:
3487 * does it exist and is it safe to write into the mmap'd area
3488 * how to use it (BSD variants) */
3489 #include <sys/types.h>
3490 #include <fcntl.h>
3491 #include <sys/mman.h>
3493 /* This mess was copied from the GNU getpagesize.h. */
3494 #ifndef HAVE_GETPAGESIZE
3495 # ifdef HAVE_UNISTD_H
3496 # include <unistd.h>
3497 # endif
3499 /* Assume that all systems that can run configure have sys/param.h. */
3500 # ifndef HAVE_SYS_PARAM_H
3501 # define HAVE_SYS_PARAM_H 1
3502 # endif
3504 # ifdef _SC_PAGESIZE
3505 # define getpagesize() sysconf(_SC_PAGESIZE)
3506 # else /* no _SC_PAGESIZE */
3507 # ifdef HAVE_SYS_PARAM_H
3508 # include <sys/param.h>
3509 # ifdef EXEC_PAGESIZE
3510 # define getpagesize() EXEC_PAGESIZE
3511 # else /* no EXEC_PAGESIZE */
3512 # ifdef NBPG
3513 # define getpagesize() NBPG * CLSIZE
3514 # ifndef CLSIZE
3515 # define CLSIZE 1
3516 # endif /* no CLSIZE */
3517 # else /* no NBPG */
3518 # ifdef NBPC
3519 # define getpagesize() NBPC
3520 # else /* no NBPC */
3521 # ifdef PAGESIZE
3522 # define getpagesize() PAGESIZE
3523 # endif /* PAGESIZE */
3524 # endif /* no NBPC */
3525 # endif /* no NBPG */
3526 # endif /* no EXEC_PAGESIZE */
3527 # else /* no HAVE_SYS_PARAM_H */
3528 # define getpagesize() 8192 /* punt totally */
3529 # endif /* no HAVE_SYS_PARAM_H */
3530 # endif /* no _SC_PAGESIZE */
3532 #endif /* no HAVE_GETPAGESIZE */
3534 #ifdef __cplusplus
3535 extern "C" { void *malloc(unsigned); }
3536 #else
3537 char *malloc();
3538 #endif
3541 main()
3543 char *data, *data2, *data3;
3544 int i, pagesize;
3545 int fd;
3547 pagesize = getpagesize();
3550 * First, make a file with some known garbage in it.
3552 data = malloc(pagesize);
3553 if (!data)
3554 exit(1);
3555 for (i = 0; i < pagesize; ++i)
3556 *(data + i) = rand();
3557 umask(0);
3558 fd = creat("conftestmmap", 0600);
3559 if (fd < 0)
3560 exit(1);
3561 if (write(fd, data, pagesize) != pagesize)
3562 exit(1);
3563 close(fd);
3566 * Next, try to mmap the file at a fixed address which
3567 * already has something else allocated at it. If we can,
3568 * also make sure that we see the same garbage.
3570 fd = open("conftestmmap", O_RDWR);
3571 if (fd < 0)
3572 exit(1);
3573 data2 = malloc(2 * pagesize);
3574 if (!data2)
3575 exit(1);
3576 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3577 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3578 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3579 exit(1);
3580 for (i = 0; i < pagesize; ++i)
3581 if (*(data + i) != *(data2 + i))
3582 exit(1);
3585 * Finally, make sure that changes to the mapped area
3586 * do not percolate back to the file as seen by read().
3587 * (This is a bug on some variants of i386 svr4.0.)
3589 for (i = 0; i < pagesize; ++i)
3590 *(data2 + i) = *(data2 + i) + 1;
3591 data3 = malloc(pagesize);
3592 if (!data3)
3593 exit(1);
3594 if (read(fd, data3, pagesize) != pagesize)
3595 exit(1);
3596 for (i = 0; i < pagesize; ++i)
3597 if (*(data + i) != *(data3 + i))
3598 exit(1);
3599 close(fd);
3600 unlink("conftestmmap");
3601 exit(0);
3605 if { (eval echo configure:3620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3606 then
3607 ac_cv_func_mmap_fixed_mapped=yes
3608 else
3609 echo "configure: failed program was:" >&5
3610 cat conftest.$ac_ext >&5
3611 rm -fr conftest*
3612 ac_cv_func_mmap_fixed_mapped=no
3614 rm -fr conftest*
3619 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3620 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3621 cat >> confdefs.h <<\EOF
3622 #define HAVE_MMAP 1
3628 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3629 unistd.h values.h sys/param.h
3631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3633 echo "configure:3648: checking for $ac_hdr" >&5
3634 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3635 echo $ac_n "(cached) $ac_c" 1>&6
3636 else
3637 cat > conftest.$ac_ext <<EOF
3638 #line 3653 "configure"
3639 #include "confdefs.h"
3640 #include <$ac_hdr>
3642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3643 { (eval echo configure:3658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3645 if test -z "$ac_err"; then
3646 rm -rf conftest*
3647 eval "ac_cv_header_$ac_safe=yes"
3648 else
3649 echo "$ac_err" >&5
3650 echo "configure: failed program was:" >&5
3651 cat conftest.$ac_ext >&5
3652 rm -rf conftest*
3653 eval "ac_cv_header_$ac_safe=no"
3655 rm -f conftest*
3657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3658 echo "$ac_t""yes" 1>&6
3659 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3660 cat >> confdefs.h <<EOF
3661 #define $ac_tr_hdr 1
3664 else
3665 echo "$ac_t""no" 1>&6
3667 done
3669 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3670 __argz_count __argz_stringify __argz_next
3672 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3673 echo "configure:3688: checking for $ac_func" >&5
3674 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3675 echo $ac_n "(cached) $ac_c" 1>&6
3676 else
3677 cat > conftest.$ac_ext <<EOF
3678 #line 3693 "configure"
3679 #include "confdefs.h"
3680 /* System header to define __stub macros and hopefully few prototypes,
3681 which can conflict with char $ac_func(); below. */
3682 #include <assert.h>
3683 /* Override any gcc2 internal prototype to avoid an error. */
3684 /* We use char because int might match the return type of a gcc2
3685 builtin and then its argument prototype would still apply. */
3686 char $ac_func();
3688 int main() {
3690 /* The GNU C library defines this for functions which it implements
3691 to always fail with ENOSYS. Some functions are actually named
3692 something starting with __ and the normal name is an alias. */
3693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3694 choke me
3695 #else
3696 $ac_func();
3697 #endif
3699 ; return 0; }
3701 if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3702 rm -rf conftest*
3703 eval "ac_cv_func_$ac_func=yes"
3704 else
3705 echo "configure: failed program was:" >&5
3706 cat conftest.$ac_ext >&5
3707 rm -rf conftest*
3708 eval "ac_cv_func_$ac_func=no"
3710 rm -f conftest*
3713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3714 echo "$ac_t""yes" 1>&6
3715 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3716 cat >> confdefs.h <<EOF
3717 #define $ac_tr_func 1
3720 else
3721 echo "$ac_t""no" 1>&6
3723 done
3726 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3727 for ac_func in stpcpy
3729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3730 echo "configure:3745: checking for $ac_func" >&5
3731 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3732 echo $ac_n "(cached) $ac_c" 1>&6
3733 else
3734 cat > conftest.$ac_ext <<EOF
3735 #line 3750 "configure"
3736 #include "confdefs.h"
3737 /* System header to define __stub macros and hopefully few prototypes,
3738 which can conflict with char $ac_func(); below. */
3739 #include <assert.h>
3740 /* Override any gcc2 internal prototype to avoid an error. */
3741 /* We use char because int might match the return type of a gcc2
3742 builtin and then its argument prototype would still apply. */
3743 char $ac_func();
3745 int main() {
3747 /* The GNU C library defines this for functions which it implements
3748 to always fail with ENOSYS. Some functions are actually named
3749 something starting with __ and the normal name is an alias. */
3750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3751 choke me
3752 #else
3753 $ac_func();
3754 #endif
3756 ; return 0; }
3758 if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3759 rm -rf conftest*
3760 eval "ac_cv_func_$ac_func=yes"
3761 else
3762 echo "configure: failed program was:" >&5
3763 cat conftest.$ac_ext >&5
3764 rm -rf conftest*
3765 eval "ac_cv_func_$ac_func=no"
3767 rm -f conftest*
3770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3771 echo "$ac_t""yes" 1>&6
3772 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3773 cat >> confdefs.h <<EOF
3774 #define $ac_tr_func 1
3777 else
3778 echo "$ac_t""no" 1>&6
3780 done
3783 if test "${ac_cv_func_stpcpy}" = "yes"; then
3784 cat >> confdefs.h <<\EOF
3785 #define HAVE_STPCPY 1
3790 if test $ac_cv_header_locale_h = yes; then
3791 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3792 echo "configure:3807: checking for LC_MESSAGES" >&5
3793 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3794 echo $ac_n "(cached) $ac_c" 1>&6
3795 else
3796 cat > conftest.$ac_ext <<EOF
3797 #line 3812 "configure"
3798 #include "confdefs.h"
3799 #include <locale.h>
3800 int main() {
3801 return LC_MESSAGES
3802 ; return 0; }
3804 if { (eval echo configure:3819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3805 rm -rf conftest*
3806 am_cv_val_LC_MESSAGES=yes
3807 else
3808 echo "configure: failed program was:" >&5
3809 cat conftest.$ac_ext >&5
3810 rm -rf conftest*
3811 am_cv_val_LC_MESSAGES=no
3813 rm -f conftest*
3816 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3817 if test $am_cv_val_LC_MESSAGES = yes; then
3818 cat >> confdefs.h <<\EOF
3819 #define HAVE_LC_MESSAGES 1
3824 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3825 echo "configure:3840: checking whether NLS is requested" >&5
3826 # Check whether --enable-nls or --disable-nls was given.
3827 if test "${enable_nls+set}" = set; then
3828 enableval="$enable_nls"
3829 USE_NLS=$enableval
3830 else
3831 USE_NLS=yes
3834 echo "$ac_t""$USE_NLS" 1>&6
3837 USE_INCLUDED_LIBINTL=no
3839 if test "$USE_NLS" = "yes"; then
3840 cat >> confdefs.h <<\EOF
3841 #define ENABLE_NLS 1
3844 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3845 echo "configure:3860: checking whether included gettext is requested" >&5
3846 # Check whether --with-included-gettext or --without-included-gettext was given.
3847 if test "${with_included_gettext+set}" = set; then
3848 withval="$with_included_gettext"
3849 nls_cv_force_use_gnu_gettext=$withval
3850 else
3851 nls_cv_force_use_gnu_gettext=no
3854 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3856 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3857 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3858 nls_cv_header_intl=
3859 nls_cv_header_libgt=
3860 CATOBJEXT=NONE
3862 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3863 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3864 echo "configure:3879: checking for libintl.h" >&5
3865 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3866 echo $ac_n "(cached) $ac_c" 1>&6
3867 else
3868 cat > conftest.$ac_ext <<EOF
3869 #line 3884 "configure"
3870 #include "confdefs.h"
3871 #include <libintl.h>
3873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3874 { (eval echo configure:3889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3876 if test -z "$ac_err"; then
3877 rm -rf conftest*
3878 eval "ac_cv_header_$ac_safe=yes"
3879 else
3880 echo "$ac_err" >&5
3881 echo "configure: failed program was:" >&5
3882 cat conftest.$ac_ext >&5
3883 rm -rf conftest*
3884 eval "ac_cv_header_$ac_safe=no"
3886 rm -f conftest*
3888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3889 echo "$ac_t""yes" 1>&6
3890 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3891 echo "configure:3906: checking for gettext in libc" >&5
3892 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3893 echo $ac_n "(cached) $ac_c" 1>&6
3894 else
3895 cat > conftest.$ac_ext <<EOF
3896 #line 3911 "configure"
3897 #include "confdefs.h"
3898 #include <libintl.h>
3899 int main() {
3900 return (int) gettext ("")
3901 ; return 0; }
3903 if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3904 rm -rf conftest*
3905 gt_cv_func_gettext_libc=yes
3906 else
3907 echo "configure: failed program was:" >&5
3908 cat conftest.$ac_ext >&5
3909 rm -rf conftest*
3910 gt_cv_func_gettext_libc=no
3912 rm -f conftest*
3915 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3917 if test "$gt_cv_func_gettext_libc" != "yes"; then
3918 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3919 echo "configure:3934: checking for bindtextdomain in -lintl" >&5
3920 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3921 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3922 echo $ac_n "(cached) $ac_c" 1>&6
3923 else
3924 ac_save_LIBS="$LIBS"
3925 LIBS="-lintl $LIBS"
3926 cat > conftest.$ac_ext <<EOF
3927 #line 3942 "configure"
3928 #include "confdefs.h"
3929 /* Override any gcc2 internal prototype to avoid an error. */
3930 /* We use char because int might match the return type of a gcc2
3931 builtin and then its argument prototype would still apply. */
3932 char bindtextdomain();
3934 int main() {
3935 bindtextdomain()
3936 ; return 0; }
3938 if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3939 rm -rf conftest*
3940 eval "ac_cv_lib_$ac_lib_var=yes"
3941 else
3942 echo "configure: failed program was:" >&5
3943 cat conftest.$ac_ext >&5
3944 rm -rf conftest*
3945 eval "ac_cv_lib_$ac_lib_var=no"
3947 rm -f conftest*
3948 LIBS="$ac_save_LIBS"
3951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3952 echo "$ac_t""yes" 1>&6
3953 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3954 echo "configure:3969: checking for gettext in libintl" >&5
3955 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3956 echo $ac_n "(cached) $ac_c" 1>&6
3957 else
3958 cat > conftest.$ac_ext <<EOF
3959 #line 3974 "configure"
3960 #include "confdefs.h"
3962 int main() {
3963 return (int) gettext ("")
3964 ; return 0; }
3966 if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3967 rm -rf conftest*
3968 gt_cv_func_gettext_libintl=yes
3969 else
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
3972 rm -rf conftest*
3973 gt_cv_func_gettext_libintl=no
3975 rm -f conftest*
3978 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3979 else
3980 echo "$ac_t""no" 1>&6
3985 if test "$gt_cv_func_gettext_libc" = "yes" \
3986 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3987 cat >> confdefs.h <<\EOF
3988 #define HAVE_GETTEXT 1
3991 # Extract the first word of "msgfmt", so it can be a program name with args.
3992 set dummy msgfmt; ac_word=$2
3993 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3994 echo "configure:4009: checking for $ac_word" >&5
3995 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3996 echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998 case "$MSGFMT" in
4000 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4003 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4004 for ac_dir in $PATH; do
4005 test -z "$ac_dir" && ac_dir=.
4006 if test -f $ac_dir/$ac_word; then
4007 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4008 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4009 break
4012 done
4013 IFS="$ac_save_ifs"
4014 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
4016 esac
4018 MSGFMT="$ac_cv_path_MSGFMT"
4019 if test -n "$MSGFMT"; then
4020 echo "$ac_t""$MSGFMT" 1>&6
4021 else
4022 echo "$ac_t""no" 1>&6
4024 if test "$MSGFMT" != "no"; then
4025 for ac_func in dcgettext
4027 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4028 echo "configure:4043: checking for $ac_func" >&5
4029 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4030 echo $ac_n "(cached) $ac_c" 1>&6
4031 else
4032 cat > conftest.$ac_ext <<EOF
4033 #line 4048 "configure"
4034 #include "confdefs.h"
4035 /* System header to define __stub macros and hopefully few prototypes,
4036 which can conflict with char $ac_func(); below. */
4037 #include <assert.h>
4038 /* Override any gcc2 internal prototype to avoid an error. */
4039 /* We use char because int might match the return type of a gcc2
4040 builtin and then its argument prototype would still apply. */
4041 char $ac_func();
4043 int main() {
4045 /* The GNU C library defines this for functions which it implements
4046 to always fail with ENOSYS. Some functions are actually named
4047 something starting with __ and the normal name is an alias. */
4048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4049 choke me
4050 #else
4051 $ac_func();
4052 #endif
4054 ; return 0; }
4056 if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4057 rm -rf conftest*
4058 eval "ac_cv_func_$ac_func=yes"
4059 else
4060 echo "configure: failed program was:" >&5
4061 cat conftest.$ac_ext >&5
4062 rm -rf conftest*
4063 eval "ac_cv_func_$ac_func=no"
4065 rm -f conftest*
4068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4069 echo "$ac_t""yes" 1>&6
4070 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4071 cat >> confdefs.h <<EOF
4072 #define $ac_tr_func 1
4075 else
4076 echo "$ac_t""no" 1>&6
4078 done
4080 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4081 set dummy gmsgfmt; ac_word=$2
4082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4083 echo "configure:4098: checking for $ac_word" >&5
4084 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4085 echo $ac_n "(cached) $ac_c" 1>&6
4086 else
4087 case "$GMSGFMT" in
4089 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4091 ?:/*)
4092 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4095 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4096 ac_dummy="$PATH"
4097 for ac_dir in $ac_dummy; do
4098 test -z "$ac_dir" && ac_dir=.
4099 if test -f $ac_dir/$ac_word; then
4100 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4101 break
4103 done
4104 IFS="$ac_save_ifs"
4105 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4107 esac
4109 GMSGFMT="$ac_cv_path_GMSGFMT"
4110 if test -n "$GMSGFMT"; then
4111 echo "$ac_t""$GMSGFMT" 1>&6
4112 else
4113 echo "$ac_t""no" 1>&6
4116 # Extract the first word of "xgettext", so it can be a program name with args.
4117 set dummy xgettext; ac_word=$2
4118 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4119 echo "configure:4134: checking for $ac_word" >&5
4120 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4121 echo $ac_n "(cached) $ac_c" 1>&6
4122 else
4123 case "$XGETTEXT" in
4125 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4128 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4129 for ac_dir in $PATH; do
4130 test -z "$ac_dir" && ac_dir=.
4131 if test -f $ac_dir/$ac_word; then
4132 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4133 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4134 break
4137 done
4138 IFS="$ac_save_ifs"
4139 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4141 esac
4143 XGETTEXT="$ac_cv_path_XGETTEXT"
4144 if test -n "$XGETTEXT"; then
4145 echo "$ac_t""$XGETTEXT" 1>&6
4146 else
4147 echo "$ac_t""no" 1>&6
4150 cat > conftest.$ac_ext <<EOF
4151 #line 4166 "configure"
4152 #include "confdefs.h"
4154 int main() {
4155 extern int _nl_msg_cat_cntr;
4156 return _nl_msg_cat_cntr
4157 ; return 0; }
4159 if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4160 rm -rf conftest*
4161 CATOBJEXT=.gmo
4162 DATADIRNAME=share
4163 else
4164 echo "configure: failed program was:" >&5
4165 cat conftest.$ac_ext >&5
4166 rm -rf conftest*
4167 CATOBJEXT=.mo
4168 DATADIRNAME=lib
4170 rm -f conftest*
4171 INSTOBJEXT=.mo
4175 else
4176 echo "$ac_t""no" 1>&6
4181 if test "$CATOBJEXT" = "NONE"; then
4182 nls_cv_use_gnu_gettext=yes
4186 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4187 INTLOBJS="\$(GETTOBJS)"
4188 # Extract the first word of "msgfmt", so it can be a program name with args.
4189 set dummy msgfmt; ac_word=$2
4190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4191 echo "configure:4206: checking for $ac_word" >&5
4192 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4193 echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195 case "$MSGFMT" in
4197 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4200 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4201 for ac_dir in $PATH; do
4202 test -z "$ac_dir" && ac_dir=.
4203 if test -f $ac_dir/$ac_word; then
4204 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4205 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4206 break
4209 done
4210 IFS="$ac_save_ifs"
4211 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4213 esac
4215 MSGFMT="$ac_cv_path_MSGFMT"
4216 if test -n "$MSGFMT"; then
4217 echo "$ac_t""$MSGFMT" 1>&6
4218 else
4219 echo "$ac_t""no" 1>&6
4222 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4223 set dummy gmsgfmt; ac_word=$2
4224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4225 echo "configure:4240: checking for $ac_word" >&5
4226 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4227 echo $ac_n "(cached) $ac_c" 1>&6
4228 else
4229 case "$GMSGFMT" in
4231 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4233 ?:/*)
4234 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4237 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4238 ac_dummy="$PATH"
4239 for ac_dir in $ac_dummy; do
4240 test -z "$ac_dir" && ac_dir=.
4241 if test -f $ac_dir/$ac_word; then
4242 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4243 break
4245 done
4246 IFS="$ac_save_ifs"
4247 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4249 esac
4251 GMSGFMT="$ac_cv_path_GMSGFMT"
4252 if test -n "$GMSGFMT"; then
4253 echo "$ac_t""$GMSGFMT" 1>&6
4254 else
4255 echo "$ac_t""no" 1>&6
4258 # Extract the first word of "xgettext", so it can be a program name with args.
4259 set dummy xgettext; ac_word=$2
4260 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4261 echo "configure:4276: checking for $ac_word" >&5
4262 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4263 echo $ac_n "(cached) $ac_c" 1>&6
4264 else
4265 case "$XGETTEXT" in
4267 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4270 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4271 for ac_dir in $PATH; do
4272 test -z "$ac_dir" && ac_dir=.
4273 if test -f $ac_dir/$ac_word; then
4274 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4275 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4276 break
4279 done
4280 IFS="$ac_save_ifs"
4281 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4283 esac
4285 XGETTEXT="$ac_cv_path_XGETTEXT"
4286 if test -n "$XGETTEXT"; then
4287 echo "$ac_t""$XGETTEXT" 1>&6
4288 else
4289 echo "$ac_t""no" 1>&6
4293 USE_INCLUDED_LIBINTL=yes
4294 CATOBJEXT=.gmo
4295 INSTOBJEXT=.mo
4296 DATADIRNAME=share
4297 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4298 INTLLIBS=$INTLDEPS
4299 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4300 nls_cv_header_intl=libintl.h
4301 nls_cv_header_libgt=libgettext.h
4304 if test "$XGETTEXT" != ":"; then
4305 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4307 else
4308 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4309 XGETTEXT=":"
4313 # We need to process the po/ directory.
4314 POSUB=po
4315 else
4316 DATADIRNAME=share
4317 nls_cv_header_intl=libintl.h
4318 nls_cv_header_libgt=libgettext.h
4321 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4322 # because some of the sources are only built for this goal.
4323 if test "$PACKAGE" = gettext; then
4324 USE_NLS=yes
4325 USE_INCLUDED_LIBINTL=yes
4328 for lang in $ALL_LINGUAS; do
4329 GMOFILES="$GMOFILES $lang.gmo"
4330 POFILES="$POFILES $lang.po"
4331 done
4346 if test "x$CATOBJEXT" != "x"; then
4347 if test "x$ALL_LINGUAS" = "x"; then
4348 LINGUAS=
4349 else
4350 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4351 echo "configure:4366: checking for catalogs to be installed" >&5
4352 NEW_LINGUAS=
4353 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4354 case "$ALL_LINGUAS" in
4355 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4356 esac
4357 done
4358 LINGUAS=$NEW_LINGUAS
4359 echo "$ac_t""$LINGUAS" 1>&6
4362 if test -n "$LINGUAS"; then
4363 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4367 if test $ac_cv_header_locale_h = yes; then
4368 INCLUDE_LOCALE_H="#include <locale.h>"
4369 else
4370 INCLUDE_LOCALE_H="\
4371 /* The system does not provide the header <locale.h>. Take care yourself. */"
4375 if test -f $srcdir/po2tbl.sed.in; then
4376 if test "$CATOBJEXT" = ".cat"; then
4377 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4378 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4379 echo "configure:4394: checking for linux/version.h" >&5
4380 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4381 echo $ac_n "(cached) $ac_c" 1>&6
4382 else
4383 cat > conftest.$ac_ext <<EOF
4384 #line 4399 "configure"
4385 #include "confdefs.h"
4386 #include <linux/version.h>
4388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4389 { (eval echo configure:4404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4391 if test -z "$ac_err"; then
4392 rm -rf conftest*
4393 eval "ac_cv_header_$ac_safe=yes"
4394 else
4395 echo "$ac_err" >&5
4396 echo "configure: failed program was:" >&5
4397 cat conftest.$ac_ext >&5
4398 rm -rf conftest*
4399 eval "ac_cv_header_$ac_safe=no"
4401 rm -f conftest*
4403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4404 echo "$ac_t""yes" 1>&6
4405 msgformat=linux
4406 else
4407 echo "$ac_t""no" 1>&6
4408 msgformat=xopen
4412 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4414 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4415 $srcdir/po2tbl.sed.in > po2tbl.sed
4418 if test "$PACKAGE" = "gettext"; then
4419 GT_NO="#NO#"
4420 GT_YES=
4421 else
4422 GT_NO=
4423 GT_YES="#YES#"
4428 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4434 if test -d $srcdir/po; then
4435 test -d po || mkdir po
4436 if test "x$srcdir" != "x."; then
4437 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4438 posrcprefix="$srcdir/"
4439 else
4440 posrcprefix="../$srcdir/"
4442 else
4443 posrcprefix="../"
4445 rm -f po/POTFILES
4446 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4447 < $srcdir/po/POTFILES.in > po/POTFILES
4451 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4452 echo "configure:4467: checking whether to enable maintainer-specific portions of Makefiles" >&5
4453 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4454 if test "${enable_maintainer_mode+set}" = set; then
4455 enableval="$enable_maintainer_mode"
4456 USE_MAINTAINER_MODE=$enableval
4457 else
4458 USE_MAINTAINER_MODE=no
4461 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4464 if test $USE_MAINTAINER_MODE = yes; then
4465 MAINTAINER_MODE_TRUE=
4466 MAINTAINER_MODE_FALSE='#'
4467 else
4468 MAINTAINER_MODE_TRUE='#'
4469 MAINTAINER_MODE_FALSE=
4471 MAINT=$MAINTAINER_MODE_TRUE
4474 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4475 echo "configure:4490: checking for Cygwin environment" >&5
4476 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
4477 echo $ac_n "(cached) $ac_c" 1>&6
4478 else
4479 cat > conftest.$ac_ext <<EOF
4480 #line 4495 "configure"
4481 #include "confdefs.h"
4483 int main() {
4485 #ifndef __CYGWIN__
4486 #define __CYGWIN__ __CYGWIN32__
4487 #endif
4488 return __CYGWIN__;
4489 ; return 0; }
4491 if { (eval echo configure:4506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4492 rm -rf conftest*
4493 ac_cv_cygwin=yes
4494 else
4495 echo "configure: failed program was:" >&5
4496 cat conftest.$ac_ext >&5
4497 rm -rf conftest*
4498 ac_cv_cygwin=no
4500 rm -f conftest*
4501 rm -f conftest*
4504 echo "$ac_t""$ac_cv_cygwin" 1>&6
4505 CYGWIN=
4506 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4507 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4508 echo "configure:4523: checking for mingw32 environment" >&5
4509 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4510 echo $ac_n "(cached) $ac_c" 1>&6
4511 else
4512 cat > conftest.$ac_ext <<EOF
4513 #line 4528 "configure"
4514 #include "confdefs.h"
4516 int main() {
4517 return __MINGW32__;
4518 ; return 0; }
4520 if { (eval echo configure:4535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4521 rm -rf conftest*
4522 ac_cv_mingw32=yes
4523 else
4524 echo "configure: failed program was:" >&5
4525 cat conftest.$ac_ext >&5
4526 rm -rf conftest*
4527 ac_cv_mingw32=no
4529 rm -f conftest*
4530 rm -f conftest*
4533 echo "$ac_t""$ac_cv_mingw32" 1>&6
4534 MINGW32=
4535 test "$ac_cv_mingw32" = yes && MINGW32=yes
4538 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4539 echo "configure:4554: checking for executable suffix" >&5
4540 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4541 echo $ac_n "(cached) $ac_c" 1>&6
4542 else
4543 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4544 ac_cv_exeext=.exe
4545 else
4546 rm -f conftest*
4547 echo 'int main () { return 0; }' > conftest.$ac_ext
4548 ac_cv_exeext=
4549 if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4550 for file in conftest.*; do
4551 case $file in
4552 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4553 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4554 esac
4555 done
4556 else
4557 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4559 rm -f conftest*
4560 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4564 EXEEXT=""
4565 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4566 echo "$ac_t""${ac_cv_exeext}" 1>&6
4567 ac_exeext=$EXEEXT
4570 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
4572 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4573 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4574 echo "configure:4589: checking for $ac_hdr" >&5
4575 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4576 echo $ac_n "(cached) $ac_c" 1>&6
4577 else
4578 cat > conftest.$ac_ext <<EOF
4579 #line 4594 "configure"
4580 #include "confdefs.h"
4581 #include <$ac_hdr>
4583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4584 { (eval echo configure:4599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4586 if test -z "$ac_err"; then
4587 rm -rf conftest*
4588 eval "ac_cv_header_$ac_safe=yes"
4589 else
4590 echo "$ac_err" >&5
4591 echo "configure: failed program was:" >&5
4592 cat conftest.$ac_ext >&5
4593 rm -rf conftest*
4594 eval "ac_cv_header_$ac_safe=no"
4596 rm -f conftest*
4598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4599 echo "$ac_t""yes" 1>&6
4600 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4601 cat >> confdefs.h <<EOF
4602 #define $ac_tr_hdr 1
4605 else
4606 echo "$ac_t""no" 1>&6
4608 done
4611 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
4612 # people who are not cross-compiling but are compiling cross-assemblers.
4613 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
4614 echo "configure:4629: checking whether compiling a cross-assembler" >&5
4615 if test "${host}" = "${target}"; then
4616 cross_gas=no
4617 else
4618 cross_gas=yes
4619 cat >> confdefs.h <<\EOF
4620 #define CROSS_COMPILE 1
4624 echo "$ac_t""$cross_gas" 1>&6
4626 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4627 # for constant arguments. Useless!
4628 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4629 echo "configure:4644: checking for working alloca.h" >&5
4630 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4631 echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4649 "configure"
4635 #include "confdefs.h"
4636 #include <alloca.h>
4637 int main() {
4638 char *p = alloca(2 * sizeof(int));
4639 ; return 0; }
4641 if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4642 rm -rf conftest*
4643 ac_cv_header_alloca_h=yes
4644 else
4645 echo "configure: failed program was:" >&5
4646 cat conftest.$ac_ext >&5
4647 rm -rf conftest*
4648 ac_cv_header_alloca_h=no
4650 rm -f conftest*
4653 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4654 if test $ac_cv_header_alloca_h = yes; then
4655 cat >> confdefs.h <<\EOF
4656 #define HAVE_ALLOCA_H 1
4661 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4662 echo "configure:4677: checking for alloca" >&5
4663 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4664 echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666 cat > conftest.$ac_ext <<EOF
4667 #line 4682 "configure"
4668 #include "confdefs.h"
4670 #ifdef __GNUC__
4671 # define alloca __builtin_alloca
4672 #else
4673 # ifdef _MSC_VER
4674 # include <malloc.h>
4675 # define alloca _alloca
4676 # else
4677 # if HAVE_ALLOCA_H
4678 # include <alloca.h>
4679 # else
4680 # ifdef _AIX
4681 #pragma alloca
4682 # else
4683 # ifndef alloca /* predefined by HP cc +Olibcalls */
4684 char *alloca ();
4685 # endif
4686 # endif
4687 # endif
4688 # endif
4689 #endif
4691 int main() {
4692 char *p = (char *) alloca(1);
4693 ; return 0; }
4695 if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4696 rm -rf conftest*
4697 ac_cv_func_alloca_works=yes
4698 else
4699 echo "configure: failed program was:" >&5
4700 cat conftest.$ac_ext >&5
4701 rm -rf conftest*
4702 ac_cv_func_alloca_works=no
4704 rm -f conftest*
4707 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4708 if test $ac_cv_func_alloca_works = yes; then
4709 cat >> confdefs.h <<\EOF
4710 #define HAVE_ALLOCA 1
4715 if test $ac_cv_func_alloca_works = no; then
4716 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4717 # that cause trouble. Some versions do not even contain alloca or
4718 # contain a buggy version. If you still want to use their alloca,
4719 # use ar to extract alloca.o from them instead of compiling alloca.c.
4720 ALLOCA=alloca.${ac_objext}
4721 cat >> confdefs.h <<\EOF
4722 #define C_ALLOCA 1
4726 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4727 echo "configure:4742: checking whether alloca needs Cray hooks" >&5
4728 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4729 echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731 cat > conftest.$ac_ext <<EOF
4732 #line 4747 "configure"
4733 #include "confdefs.h"
4734 #if defined(CRAY) && ! defined(CRAY2)
4735 webecray
4736 #else
4737 wenotbecray
4738 #endif
4741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4742 egrep "webecray" >/dev/null 2>&1; then
4743 rm -rf conftest*
4744 ac_cv_os_cray=yes
4745 else
4746 rm -rf conftest*
4747 ac_cv_os_cray=no
4749 rm -f conftest*
4753 echo "$ac_t""$ac_cv_os_cray" 1>&6
4754 if test $ac_cv_os_cray = yes; then
4755 for ac_func in _getb67 GETB67 getb67; do
4756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4757 echo "configure:4772: checking for $ac_func" >&5
4758 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4759 echo $ac_n "(cached) $ac_c" 1>&6
4760 else
4761 cat > conftest.$ac_ext <<EOF
4762 #line 4777 "configure"
4763 #include "confdefs.h"
4764 /* System header to define __stub macros and hopefully few prototypes,
4765 which can conflict with char $ac_func(); below. */
4766 #include <assert.h>
4767 /* Override any gcc2 internal prototype to avoid an error. */
4768 /* We use char because int might match the return type of a gcc2
4769 builtin and then its argument prototype would still apply. */
4770 char $ac_func();
4772 int main() {
4774 /* The GNU C library defines this for functions which it implements
4775 to always fail with ENOSYS. Some functions are actually named
4776 something starting with __ and the normal name is an alias. */
4777 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4778 choke me
4779 #else
4780 $ac_func();
4781 #endif
4783 ; return 0; }
4785 if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786 rm -rf conftest*
4787 eval "ac_cv_func_$ac_func=yes"
4788 else
4789 echo "configure: failed program was:" >&5
4790 cat conftest.$ac_ext >&5
4791 rm -rf conftest*
4792 eval "ac_cv_func_$ac_func=no"
4794 rm -f conftest*
4797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4798 echo "$ac_t""yes" 1>&6
4799 cat >> confdefs.h <<EOF
4800 #define CRAY_STACKSEG_END $ac_func
4803 break
4804 else
4805 echo "$ac_t""no" 1>&6
4808 done
4811 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4812 echo "configure:4827: checking stack direction for C alloca" >&5
4813 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4814 echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816 if test "$cross_compiling" = yes; then
4817 ac_cv_c_stack_direction=0
4818 else
4819 cat > conftest.$ac_ext <<EOF
4820 #line 4835 "configure"
4821 #include "confdefs.h"
4822 find_stack_direction ()
4824 static char *addr = 0;
4825 auto char dummy;
4826 if (addr == 0)
4828 addr = &dummy;
4829 return find_stack_direction ();
4831 else
4832 return (&dummy > addr) ? 1 : -1;
4834 main ()
4836 exit (find_stack_direction() < 0);
4839 if { (eval echo configure:4854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4840 then
4841 ac_cv_c_stack_direction=1
4842 else
4843 echo "configure: failed program was:" >&5
4844 cat conftest.$ac_ext >&5
4845 rm -fr conftest*
4846 ac_cv_c_stack_direction=-1
4848 rm -fr conftest*
4853 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4854 cat >> confdefs.h <<EOF
4855 #define STACK_DIRECTION $ac_cv_c_stack_direction
4860 echo $ac_n "checking for inline""... $ac_c" 1>&6
4861 echo "configure:4876: checking for inline" >&5
4862 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4863 echo $ac_n "(cached) $ac_c" 1>&6
4864 else
4865 ac_cv_c_inline=no
4866 for ac_kw in inline __inline__ __inline; do
4867 cat > conftest.$ac_ext <<EOF
4868 #line 4883 "configure"
4869 #include "confdefs.h"
4871 int main() {
4872 } $ac_kw foo() {
4873 ; return 0; }
4875 if { (eval echo configure:4890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4876 rm -rf conftest*
4877 ac_cv_c_inline=$ac_kw; break
4878 else
4879 echo "configure: failed program was:" >&5
4880 cat conftest.$ac_ext >&5
4882 rm -f conftest*
4883 done
4887 echo "$ac_t""$ac_cv_c_inline" 1>&6
4888 case "$ac_cv_c_inline" in
4889 inline | yes) ;;
4890 no) cat >> confdefs.h <<\EOF
4891 #define inline
4894 *) cat >> confdefs.h <<EOF
4895 #define inline $ac_cv_c_inline
4898 esac
4901 # VMS doesn't have unlink.
4902 for ac_func in unlink remove
4904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4905 echo "configure:4920: checking for $ac_func" >&5
4906 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4907 echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909 cat > conftest.$ac_ext <<EOF
4910 #line 4925 "configure"
4911 #include "confdefs.h"
4912 /* System header to define __stub macros and hopefully few prototypes,
4913 which can conflict with char $ac_func(); below. */
4914 #include <assert.h>
4915 /* Override any gcc2 internal prototype to avoid an error. */
4916 /* We use char because int might match the return type of a gcc2
4917 builtin and then its argument prototype would still apply. */
4918 char $ac_func();
4920 int main() {
4922 /* The GNU C library defines this for functions which it implements
4923 to always fail with ENOSYS. Some functions are actually named
4924 something starting with __ and the normal name is an alias. */
4925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4926 choke me
4927 #else
4928 $ac_func();
4929 #endif
4931 ; return 0; }
4933 if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4934 rm -rf conftest*
4935 eval "ac_cv_func_$ac_func=yes"
4936 else
4937 echo "configure: failed program was:" >&5
4938 cat conftest.$ac_ext >&5
4939 rm -rf conftest*
4940 eval "ac_cv_func_$ac_func=no"
4942 rm -f conftest*
4945 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4946 echo "$ac_t""yes" 1>&6
4947 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4948 cat >> confdefs.h <<EOF
4949 #define $ac_tr_func 1
4951 break
4952 else
4953 echo "$ac_t""no" 1>&6
4955 done
4958 # Some systems don't have sbrk().
4959 for ac_func in sbrk
4961 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4962 echo "configure:4977: checking for $ac_func" >&5
4963 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4964 echo $ac_n "(cached) $ac_c" 1>&6
4965 else
4966 cat > conftest.$ac_ext <<EOF
4967 #line 4982 "configure"
4968 #include "confdefs.h"
4969 /* System header to define __stub macros and hopefully few prototypes,
4970 which can conflict with char $ac_func(); below. */
4971 #include <assert.h>
4972 /* Override any gcc2 internal prototype to avoid an error. */
4973 /* We use char because int might match the return type of a gcc2
4974 builtin and then its argument prototype would still apply. */
4975 char $ac_func();
4977 int main() {
4979 /* The GNU C library defines this for functions which it implements
4980 to always fail with ENOSYS. Some functions are actually named
4981 something starting with __ and the normal name is an alias. */
4982 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4983 choke me
4984 #else
4985 $ac_func();
4986 #endif
4988 ; return 0; }
4990 if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4991 rm -rf conftest*
4992 eval "ac_cv_func_$ac_func=yes"
4993 else
4994 echo "configure: failed program was:" >&5
4995 cat conftest.$ac_ext >&5
4996 rm -rf conftest*
4997 eval "ac_cv_func_$ac_func=no"
4999 rm -f conftest*
5002 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5003 echo "$ac_t""yes" 1>&6
5004 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5005 cat >> confdefs.h <<EOF
5006 #define $ac_tr_func 1
5009 else
5010 echo "$ac_t""no" 1>&6
5012 done
5015 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
5016 # enough, but on some of those systems, the assert macro relies on requoting
5017 # working properly!
5018 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
5019 echo "configure:5034: checking for working assert macro" >&5
5020 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
5021 echo $ac_n "(cached) $ac_c" 1>&6
5022 else
5023 cat > conftest.$ac_ext <<EOF
5024 #line 5039 "configure"
5025 #include "confdefs.h"
5026 #include <assert.h>
5027 #include <stdio.h>
5028 int main() {
5030 /* check for requoting problems */
5031 static int a, b, c, d;
5032 static char *s;
5033 assert (!strcmp(s, "foo bar baz quux"));
5034 /* check for newline handling */
5035 assert (a == b
5036 || c == d);
5038 ; return 0; }
5040 if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5041 rm -rf conftest*
5042 gas_cv_assert_ok=yes
5043 else
5044 echo "configure: failed program was:" >&5
5045 cat conftest.$ac_ext >&5
5046 rm -rf conftest*
5047 gas_cv_assert_ok=no
5049 rm -f conftest*
5051 echo "$ac_t""$gas_cv_assert_ok" 1>&6
5052 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
5053 #define BROKEN_ASSERT 1
5058 # On some systems, the system header files may not declare malloc, realloc,
5059 # and free. There are places where gas needs these functions to have been
5060 # declared -- such as when taking their addresses.
5061 gas_test_headers="
5062 #ifdef HAVE_MEMORY_H
5063 #include <memory.h>
5064 #endif
5065 #ifdef HAVE_STRING_H
5066 #include <string.h>
5067 #else
5068 #ifdef HAVE_STRINGS_H
5069 #include <strings.h>
5070 #endif
5071 #endif
5072 #ifdef HAVE_STDLIB_H
5073 #include <stdlib.h>
5074 #endif
5075 #ifdef HAVE_UNISTD_H
5076 #include <unistd.h>
5077 #endif
5080 echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
5081 echo "configure:5096: checking whether declaration is required for strstr" >&5
5082 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
5083 echo $ac_n "(cached) $ac_c" 1>&6
5084 else
5085 cat > conftest.$ac_ext <<EOF
5086 #line 5101 "configure"
5087 #include "confdefs.h"
5088 $gas_test_headers
5089 int main() {
5091 typedef char *(*f)();
5092 f x;
5093 x = (f) strstr;
5095 ; return 0; }
5097 if { (eval echo configure:5112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5098 rm -rf conftest*
5099 gas_cv_decl_needed_strstr=no
5100 else
5101 echo "configure: failed program was:" >&5
5102 cat conftest.$ac_ext >&5
5103 rm -rf conftest*
5104 gas_cv_decl_needed_strstr=yes
5106 rm -f conftest*
5108 echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
5109 if test $gas_cv_decl_needed_strstr = yes; then
5110 cat >> confdefs.h <<\EOF
5111 #define NEED_DECLARATION_STRSTR 1
5117 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
5118 echo "configure:5133: checking whether declaration is required for malloc" >&5
5119 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
5120 echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122 cat > conftest.$ac_ext <<EOF
5123 #line 5138 "configure"
5124 #include "confdefs.h"
5125 $gas_test_headers
5126 int main() {
5128 typedef char *(*f)();
5129 f x;
5130 x = (f) malloc;
5132 ; return 0; }
5134 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5135 rm -rf conftest*
5136 gas_cv_decl_needed_malloc=no
5137 else
5138 echo "configure: failed program was:" >&5
5139 cat conftest.$ac_ext >&5
5140 rm -rf conftest*
5141 gas_cv_decl_needed_malloc=yes
5143 rm -f conftest*
5145 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
5146 if test $gas_cv_decl_needed_malloc = yes; then
5147 cat >> confdefs.h <<\EOF
5148 #define NEED_DECLARATION_MALLOC 1
5154 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
5155 echo "configure:5170: checking whether declaration is required for free" >&5
5156 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
5157 echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159 cat > conftest.$ac_ext <<EOF
5160 #line 5175 "configure"
5161 #include "confdefs.h"
5162 $gas_test_headers
5163 int main() {
5165 typedef void (*f)();
5166 f x;
5167 x = (f) free;
5169 ; return 0; }
5171 if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5172 rm -rf conftest*
5173 gas_cv_decl_needed_free=no
5174 else
5175 echo "configure: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
5177 rm -rf conftest*
5178 gas_cv_decl_needed_free=yes
5180 rm -f conftest*
5182 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
5183 if test $gas_cv_decl_needed_free = yes; then
5184 cat >> confdefs.h <<\EOF
5185 #define NEED_DECLARATION_FREE 1
5191 echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
5192 echo "configure:5207: checking whether declaration is required for sbrk" >&5
5193 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
5194 echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196 cat > conftest.$ac_ext <<EOF
5197 #line 5212 "configure"
5198 #include "confdefs.h"
5199 $gas_test_headers
5200 int main() {
5202 typedef char *(*f)();
5203 f x;
5204 x = (f) sbrk;
5206 ; return 0; }
5208 if { (eval echo configure:5223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5209 rm -rf conftest*
5210 gas_cv_decl_needed_sbrk=no
5211 else
5212 echo "configure: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
5214 rm -rf conftest*
5215 gas_cv_decl_needed_sbrk=yes
5217 rm -f conftest*
5219 echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
5220 if test $gas_cv_decl_needed_sbrk = yes; then
5221 cat >> confdefs.h <<\EOF
5222 #define NEED_DECLARATION_SBRK 1
5228 echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
5229 echo "configure:5244: checking whether declaration is required for environ" >&5
5230 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then
5231 echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5249 "configure"
5235 #include "confdefs.h"
5236 $gas_test_headers
5237 int main() {
5239 typedef char **f;
5240 f x;
5241 x = (f) environ;
5243 ; return 0; }
5245 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246 rm -rf conftest*
5247 gas_cv_decl_needed_environ=no
5248 else
5249 echo "configure: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5251 rm -rf conftest*
5252 gas_cv_decl_needed_environ=yes
5254 rm -f conftest*
5256 echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6
5257 if test $gas_cv_decl_needed_environ = yes; then
5258 cat >> confdefs.h <<\EOF
5259 #define NEED_DECLARATION_ENVIRON 1
5265 # Does errno.h declare errno, or do we have to add a separate declaration
5266 # for it?
5268 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
5269 echo "configure:5284: checking whether declaration is required for errno" >&5
5270 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
5271 echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273 cat > conftest.$ac_ext <<EOF
5274 #line 5289 "configure"
5275 #include "confdefs.h"
5277 #ifdef HAVE_ERRNO_H
5278 #include <errno.h>
5279 #endif
5281 int main() {
5283 typedef int f;
5284 f x;
5285 x = (f) errno;
5287 ; return 0; }
5289 if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5290 rm -rf conftest*
5291 gas_cv_decl_needed_errno=no
5292 else
5293 echo "configure: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
5295 rm -rf conftest*
5296 gas_cv_decl_needed_errno=yes
5298 rm -f conftest*
5300 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
5301 if test $gas_cv_decl_needed_errno = yes; then
5302 cat >> confdefs.h <<\EOF
5303 #define NEED_DECLARATION_ERRNO 1
5311 trap '' 1 2 15
5312 cat > confcache <<\EOF
5313 # This file is a shell script that caches the results of configure
5314 # tests run on this system so they can be shared between configure
5315 # scripts and configure runs. It is not useful on other systems.
5316 # If it contains results you don't want to keep, you may remove or edit it.
5318 # By default, configure uses ./config.cache as the cache file,
5319 # creating it if it does not exist already. You can give configure
5320 # the --cache-file=FILE option to use a different cache file; that is
5321 # what configure does when it calls configure scripts in
5322 # subdirectories, so they share the cache.
5323 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5324 # config.status only pays attention to the cache file if you give it the
5325 # --recheck option to rerun configure.
5328 # The following way of writing the cache mishandles newlines in values,
5329 # but we know of no workaround that is simple, portable, and efficient.
5330 # So, don't put newlines in cache variables' values.
5331 # Ultrix sh set writes to stderr and can't be redirected directly,
5332 # and sets the high bit in the cache file unless we assign to the vars.
5333 (set) 2>&1 |
5334 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5335 *ac_space=\ *)
5336 # `set' does not quote correctly, so add quotes (double-quote substitution
5337 # turns \\\\ into \\, and sed turns \\ into \).
5338 sed -n \
5339 -e "s/'/'\\\\''/g" \
5340 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5343 # `set' quotes correctly as required by POSIX, so do not add quotes.
5344 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5346 esac >> confcache
5347 if cmp -s $cache_file confcache; then
5349 else
5350 if test -w $cache_file; then
5351 echo "updating cache $cache_file"
5352 cat confcache > $cache_file
5353 else
5354 echo "not updating unwritable cache $cache_file"
5357 rm -f confcache
5359 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5361 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5362 # Let make expand exec_prefix.
5363 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5365 # Any assignment to VPATH causes Sun make to only execute
5366 # the first set of double-colon rules, so remove it if not needed.
5367 # If there is a colon in the path, we need to keep it.
5368 if test "x$srcdir" = x.; then
5369 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5372 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5374 DEFS=-DHAVE_CONFIG_H
5376 # Without the "./", some shells look in PATH for config.status.
5377 : ${CONFIG_STATUS=./config.status}
5379 echo creating $CONFIG_STATUS
5380 rm -f $CONFIG_STATUS
5381 cat > $CONFIG_STATUS <<EOF
5382 #! /bin/sh
5383 # Generated automatically by configure.
5384 # Run this file to recreate the current configuration.
5385 # This directory was configured as follows,
5386 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5388 # $0 $ac_configure_args
5390 # Compiler output produced by configure, useful for debugging
5391 # configure, is in ./config.log if it exists.
5393 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5394 for ac_option
5396 case "\$ac_option" in
5397 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5398 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5399 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5400 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5401 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5402 exit 0 ;;
5403 -help | --help | --hel | --he | --h)
5404 echo "\$ac_cs_usage"; exit 0 ;;
5405 *) echo "\$ac_cs_usage"; exit 1 ;;
5406 esac
5407 done
5409 ac_given_srcdir=$srcdir
5410 ac_given_INSTALL="$INSTALL"
5412 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
5414 cat >> $CONFIG_STATUS <<EOF
5416 # Protect against being on the right side of a sed subst in config.status.
5417 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5418 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5419 $ac_vpsub
5420 $extrasub
5421 s%@SHELL@%$SHELL%g
5422 s%@CFLAGS@%$CFLAGS%g
5423 s%@CPPFLAGS@%$CPPFLAGS%g
5424 s%@CXXFLAGS@%$CXXFLAGS%g
5425 s%@FFLAGS@%$FFLAGS%g
5426 s%@DEFS@%$DEFS%g
5427 s%@LDFLAGS@%$LDFLAGS%g
5428 s%@LIBS@%$LIBS%g
5429 s%@exec_prefix@%$exec_prefix%g
5430 s%@prefix@%$prefix%g
5431 s%@program_transform_name@%$program_transform_name%g
5432 s%@bindir@%$bindir%g
5433 s%@sbindir@%$sbindir%g
5434 s%@libexecdir@%$libexecdir%g
5435 s%@datadir@%$datadir%g
5436 s%@sysconfdir@%$sysconfdir%g
5437 s%@sharedstatedir@%$sharedstatedir%g
5438 s%@localstatedir@%$localstatedir%g
5439 s%@libdir@%$libdir%g
5440 s%@includedir@%$includedir%g
5441 s%@oldincludedir@%$oldincludedir%g
5442 s%@infodir@%$infodir%g
5443 s%@mandir@%$mandir%g
5444 s%@host@%$host%g
5445 s%@host_alias@%$host_alias%g
5446 s%@host_cpu@%$host_cpu%g
5447 s%@host_vendor@%$host_vendor%g
5448 s%@host_os@%$host_os%g
5449 s%@target@%$target%g
5450 s%@target_alias@%$target_alias%g
5451 s%@target_cpu@%$target_cpu%g
5452 s%@target_vendor@%$target_vendor%g
5453 s%@target_os@%$target_os%g
5454 s%@build@%$build%g
5455 s%@build_alias@%$build_alias%g
5456 s%@build_cpu@%$build_cpu%g
5457 s%@build_vendor@%$build_vendor%g
5458 s%@build_os@%$build_os%g
5459 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5460 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5461 s%@INSTALL_DATA@%$INSTALL_DATA%g
5462 s%@PACKAGE@%$PACKAGE%g
5463 s%@VERSION@%$VERSION%g
5464 s%@ACLOCAL@%$ACLOCAL%g
5465 s%@AUTOCONF@%$AUTOCONF%g
5466 s%@AUTOMAKE@%$AUTOMAKE%g
5467 s%@AUTOHEADER@%$AUTOHEADER%g
5468 s%@MAKEINFO@%$MAKEINFO%g
5469 s%@SET_MAKE@%$SET_MAKE%g
5470 s%@RANLIB@%$RANLIB%g
5471 s%@CC@%$CC%g
5472 s%@LD@%$LD%g
5473 s%@NM@%$NM%g
5474 s%@LN_S@%$LN_S%g
5475 s%@LIBTOOL@%$LIBTOOL%g
5476 s%@DLLTOOL@%$DLLTOOL%g
5477 s%@AS@%$AS%g
5478 s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g
5479 s%@extra_objects@%$extra_objects%g
5480 s%@target_cpu_type@%$target_cpu_type%g
5481 s%@obj_format@%$obj_format%g
5482 s%@te_file@%$te_file%g
5483 s%@install_tooldir@%$install_tooldir%g
5484 s%@atof@%$atof%g
5485 s%@BFDLIB@%$BFDLIB%g
5486 s%@OPCODES_LIB@%$OPCODES_LIB%g
5487 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
5488 s%@YACC@%$YACC%g
5489 s%@LEX@%$LEX%g
5490 s%@LEXLIB@%$LEXLIB%g
5491 s%@CPP@%$CPP%g
5492 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5493 s%@ALLOCA@%$ALLOCA%g
5494 s%@USE_NLS@%$USE_NLS%g
5495 s%@MSGFMT@%$MSGFMT%g
5496 s%@GMSGFMT@%$GMSGFMT%g
5497 s%@XGETTEXT@%$XGETTEXT%g
5498 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5499 s%@CATALOGS@%$CATALOGS%g
5500 s%@CATOBJEXT@%$CATOBJEXT%g
5501 s%@DATADIRNAME@%$DATADIRNAME%g
5502 s%@GMOFILES@%$GMOFILES%g
5503 s%@INSTOBJEXT@%$INSTOBJEXT%g
5504 s%@INTLDEPS@%$INTLDEPS%g
5505 s%@INTLLIBS@%$INTLLIBS%g
5506 s%@INTLOBJS@%$INTLOBJS%g
5507 s%@POFILES@%$POFILES%g
5508 s%@POSUB@%$POSUB%g
5509 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5510 s%@GT_NO@%$GT_NO%g
5511 s%@GT_YES@%$GT_YES%g
5512 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5513 s%@l@%$l%g
5514 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5515 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5516 s%@MAINT@%$MAINT%g
5517 s%@EXEEXT@%$EXEEXT%g
5519 CEOF
5522 cat >> $CONFIG_STATUS <<\EOF
5524 # Split the substitutions into bite-sized pieces for seds with
5525 # small command number limits, like on Digital OSF/1 and HP-UX.
5526 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5527 ac_file=1 # Number of current file.
5528 ac_beg=1 # First line for current file.
5529 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5530 ac_more_lines=:
5531 ac_sed_cmds=""
5532 while $ac_more_lines; do
5533 if test $ac_beg -gt 1; then
5534 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5535 else
5536 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5538 if test ! -s conftest.s$ac_file; then
5539 ac_more_lines=false
5540 rm -f conftest.s$ac_file
5541 else
5542 if test -z "$ac_sed_cmds"; then
5543 ac_sed_cmds="sed -f conftest.s$ac_file"
5544 else
5545 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5547 ac_file=`expr $ac_file + 1`
5548 ac_beg=$ac_end
5549 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5551 done
5552 if test -z "$ac_sed_cmds"; then
5553 ac_sed_cmds=cat
5557 cat >> $CONFIG_STATUS <<EOF
5559 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in"}
5561 cat >> $CONFIG_STATUS <<\EOF
5562 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5563 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5564 case "$ac_file" in
5565 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5566 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5567 *) ac_file_in="${ac_file}.in" ;;
5568 esac
5570 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5572 # Remove last slash and all that follows it. Not all systems have dirname.
5573 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5574 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5575 # The file is in a subdirectory.
5576 test ! -d "$ac_dir" && mkdir "$ac_dir"
5577 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5578 # A "../" for each directory in $ac_dir_suffix.
5579 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5580 else
5581 ac_dir_suffix= ac_dots=
5584 case "$ac_given_srcdir" in
5585 .) srcdir=.
5586 if test -z "$ac_dots"; then top_srcdir=.
5587 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5588 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5589 *) # Relative path.
5590 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5591 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5592 esac
5594 case "$ac_given_INSTALL" in
5595 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5596 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5597 esac
5599 echo creating "$ac_file"
5600 rm -f "$ac_file"
5601 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5602 case "$ac_file" in
5603 *Makefile*) ac_comsub="1i\\
5604 # $configure_input" ;;
5605 *) ac_comsub= ;;
5606 esac
5608 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5609 sed -e "$ac_comsub
5610 s%@configure_input@%$configure_input%g
5611 s%@srcdir@%$srcdir%g
5612 s%@top_srcdir@%$top_srcdir%g
5613 s%@INSTALL@%$INSTALL%g
5614 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5615 fi; done
5616 rm -f conftest.s*
5618 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5619 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5621 # ac_d sets the value in "#define NAME VALUE" lines.
5622 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5623 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5624 ac_dC='\3'
5625 ac_dD='%g'
5626 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5627 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5628 ac_uB='\([ ]\)%\1#\2define\3'
5629 ac_uC=' '
5630 ac_uD='\4%g'
5631 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5632 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5633 ac_eB='$%\1#\2define\3'
5634 ac_eC=' '
5635 ac_eD='%g'
5637 if test "${CONFIG_HEADERS+set}" != set; then
5639 cat >> $CONFIG_STATUS <<EOF
5640 CONFIG_HEADERS="config.h:config.in"
5642 cat >> $CONFIG_STATUS <<\EOF
5644 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5645 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5646 case "$ac_file" in
5647 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5648 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5649 *) ac_file_in="${ac_file}.in" ;;
5650 esac
5652 echo creating $ac_file
5654 rm -f conftest.frag conftest.in conftest.out
5655 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5656 cat $ac_file_inputs > conftest.in
5660 # Transform confdefs.h into a sed script conftest.vals that substitutes
5661 # the proper values into config.h.in to produce config.h. And first:
5662 # Protect against being on the right side of a sed subst in config.status.
5663 # Protect against being in an unquoted here document in config.status.
5664 rm -f conftest.vals
5665 cat > conftest.hdr <<\EOF
5666 s/[\\&%]/\\&/g
5667 s%[\\$`]%\\&%g
5668 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5669 s%ac_d%ac_u%gp
5670 s%ac_u%ac_e%gp
5672 sed -n -f conftest.hdr confdefs.h > conftest.vals
5673 rm -f conftest.hdr
5675 # This sed command replaces #undef with comments. This is necessary, for
5676 # example, in the case of _POSIX_SOURCE, which is predefined and required
5677 # on some systems where configure will not decide to define it.
5678 cat >> conftest.vals <<\EOF
5679 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5682 # Break up conftest.vals because some shells have a limit on
5683 # the size of here documents, and old seds have small limits too.
5685 rm -f conftest.tail
5686 while :
5688 ac_lines=`grep -c . conftest.vals`
5689 # grep -c gives empty output for an empty file on some AIX systems.
5690 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5691 # Write a limited-size here document to conftest.frag.
5692 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5693 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5694 echo 'CEOF
5695 sed -f conftest.frag conftest.in > conftest.out
5696 rm -f conftest.in
5697 mv conftest.out conftest.in
5698 ' >> $CONFIG_STATUS
5699 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5700 rm -f conftest.vals
5701 mv conftest.tail conftest.vals
5702 done
5703 rm -f conftest.vals
5705 cat >> $CONFIG_STATUS <<\EOF
5706 rm -f conftest.frag conftest.h
5707 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5708 cat conftest.in >> conftest.h
5709 rm -f conftest.in
5710 if cmp -s $ac_file conftest.h 2>/dev/null; then
5711 echo "$ac_file is unchanged"
5712 rm -f conftest.h
5713 else
5714 # Remove last slash and all that follows it. Not all systems have dirname.
5715 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5716 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5717 # The file is in a subdirectory.
5718 test ! -d "$ac_dir" && mkdir "$ac_dir"
5720 rm -f $ac_file
5721 mv conftest.h $ac_file
5723 fi; done
5726 cat >> $CONFIG_STATUS <<EOF
5728 target_cpu_type=${target_cpu_type}
5729 cgen_cpu_prefix=${cgen_cpu_prefix}
5730 obj_format=${obj_format}
5731 te_file=${te_file}
5733 cat >> $CONFIG_STATUS <<\EOF
5734 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5735 rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
5736 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
5737 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
5738 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
5739 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
5740 if test "x$cgen_cpu_prefix" != x ; then
5741 echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
5744 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
5745 exit 0
5747 chmod +x $CONFIG_STATUS
5748 rm -fr confdefs* $ac_clean_files
5749 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1