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