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