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