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