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