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