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