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