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