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