* inflow.c (O_NOCTTY): Define to zero if not already defined.
[deliverable/binutils-gdb.git] / gas / configure
CommitLineData
252b5132 1#! /bin/sh
252b5132 2# Guess values for system-dependent variables and create Makefiles.
ab509236 3# Generated by GNU Autoconf 2.59.
252b5132 4#
ab509236 5# Copyright (C) 2003 Free Software Foundation, Inc.
252b5132
RH
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
13b2be9c
DJ
8## --------------------- ##
9## M4sh Initialization. ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14 emulate sh
15 NULLCMD=:
16 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17 # is contrary to our usage. Disable this feature.
18 alias -g '${1+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20 set -o posix
21fi
ab509236 22DUALCASE=1; export DUALCASE # for MKS sh
13b2be9c
DJ
23
24# Support unset when possible.
ab509236 25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
13b2be9c
DJ
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
ab509236 44 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
13b2be9c
DJ
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
ab509236 221 test -d ./-p && rmdir ./-p
13b2be9c
DJ
222 as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
ab509236 228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13b2be9c
DJ
229
230# Sed expression to map a string onto a valid variable name.
ab509236 231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13b2be9c
DJ
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252b5132 248
13b2be9c
DJ
249exec 6>&1
250
251#
252# Initializations.
253#
252b5132 254ac_default_prefix=/usr/local
13b2be9c
DJ
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="as.h"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
ab509236 312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL WARN_CFLAGS GDBINIT cgen_cpu_prefix extra_objects target_cpu_type obj_format te_file install_tooldir atof BFDLIB OPCODES_LIB BFDVER_H ALL_OBJ_DEPS YACC LEX LEXLIB LEX_OUTPUT_ROOT CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBM LIBOBJS LTLIBOBJS'
13b2be9c 313ac_subst_files=''
252b5132
RH
314
315# Initialize some variables set by options.
13b2be9c
DJ
316ac_init_help=
317ac_init_version=false
252b5132
RH
318# The variables have the same names as the options, with
319# dashes changed to underlines.
13b2be9c 320cache_file=/dev/null
252b5132 321exec_prefix=NONE
252b5132 322no_create=
252b5132
RH
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
252b5132
RH
331verbose=
332x_includes=NONE
333x_libraries=NONE
13b2be9c
DJ
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
252b5132
RH
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
252b5132
RH
353ac_prev=
354for ac_option
355do
252b5132
RH
356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
361 fi
362
13b2be9c 363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
252b5132
RH
364
365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
13b2be9c 367 case $ac_option in
252b5132
RH
368
369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
13b2be9c 372 bindir=$ac_optarg ;;
252b5132
RH
373
374 -build | --build | --buil | --bui | --bu)
13b2be9c 375 ac_prev=build_alias ;;
252b5132 376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
13b2be9c 377 build_alias=$ac_optarg ;;
252b5132
RH
378
379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
13b2be9c
DJ
384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
252b5132
RH
388
389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
13b2be9c 393 datadir=$ac_optarg ;;
252b5132
RH
394
395 -disable-* | --disable-*)
13b2be9c 396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
252b5132 397 # Reject names that are not valid shell variable names.
13b2be9c
DJ
398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
252b5132
RH
403
404 -enable-* | --enable-*)
13b2be9c 405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252b5132 406 # Reject names that are not valid shell variable names.
13b2be9c
DJ
407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
252b5132
RH
413 *) ac_optarg=yes ;;
414 esac
13b2be9c 415 eval "enable_$ac_feature='$ac_optarg'" ;;
252b5132
RH
416
417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
13b2be9c 424 exec_prefix=$ac_optarg ;;
252b5132
RH
425
426 -gas | --gas | --ga | --g)
427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
429
13b2be9c
DJ
430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
252b5132
RH
436
437 -host | --host | --hos | --ho)
13b2be9c 438 ac_prev=host_alias ;;
252b5132 439 -host=* | --host=* | --hos=* | --ho=*)
13b2be9c 440 host_alias=$ac_optarg ;;
252b5132
RH
441
442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
13b2be9c 447 includedir=$ac_optarg ;;
252b5132
RH
448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
13b2be9c 452 infodir=$ac_optarg ;;
252b5132
RH
453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
13b2be9c 457 libdir=$ac_optarg ;;
252b5132
RH
458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
13b2be9c 464 libexecdir=$ac_optarg ;;
252b5132
RH
465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
13b2be9c 473 localstatedir=$ac_optarg ;;
252b5132
RH
474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
13b2be9c 478 mandir=$ac_optarg ;;
252b5132
RH
479
480 -nfp | --nfp | --nf)
481 # Obsolete; use --without-fp.
482 with_fp=no ;;
483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
13b2be9c 485 | --no-cr | --no-c | -n)
252b5132
RH
486 no_create=yes ;;
487
488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
491
492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
13b2be9c 499 oldincludedir=$ac_optarg ;;
252b5132
RH
500
501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
13b2be9c 504 prefix=$ac_optarg ;;
252b5132
RH
505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
13b2be9c 511 program_prefix=$ac_optarg ;;
252b5132
RH
512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
13b2be9c 518 program_suffix=$ac_optarg ;;
252b5132
RH
519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
13b2be9c 535 program_transform_name=$ac_optarg ;;
252b5132
RH
536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
13b2be9c 545 sbindir=$ac_optarg ;;
252b5132
RH
546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
13b2be9c 556 sharedstatedir=$ac_optarg ;;
252b5132
RH
557
558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
13b2be9c 561 site=$ac_optarg ;;
76bff705 562
252b5132
RH
563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
13b2be9c 566 srcdir=$ac_optarg ;;
252b5132
RH
567
568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
13b2be9c 573 sysconfdir=$ac_optarg ;;
252b5132
RH
574
575 -target | --target | --targe | --targ | --tar | --ta | --t)
13b2be9c 576 ac_prev=target_alias ;;
252b5132 577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
13b2be9c 578 target_alias=$ac_optarg ;;
252b5132
RH
579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
13b2be9c
DJ
583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
252b5132
RH
585
586 -with-* | --with-*)
13b2be9c 587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
252b5132 588 # Reject names that are not valid shell variable names.
13b2be9c
DJ
589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
252b5132 592 ac_package=`echo $ac_package| sed 's/-/_/g'`
13b2be9c
DJ
593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
252b5132
RH
595 *) ac_optarg=yes ;;
596 esac
13b2be9c 597 eval "with_$ac_package='$ac_optarg'" ;;
252b5132
RH
598
599 -without-* | --without-*)
13b2be9c 600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
252b5132 601 # Reject names that are not valid shell variable names.
13b2be9c
DJ
602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
252b5132
RH
607
608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
13b2be9c 617 x_includes=$ac_optarg ;;
252b5132
RH
618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
13b2be9c 624 x_libraries=$ac_optarg ;;
252b5132 625
13b2be9c
DJ
626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
252b5132
RH
629 ;;
630
13b2be9c
DJ
631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
252b5132 641 *)
13b2be9c
DJ
642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
252b5132
RH
647 ;;
648
649 esac
650done
651
652if test -n "$ac_prev"; then
13b2be9c
DJ
653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
c8615825 656fi
c8615825 657
13b2be9c
DJ
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
666 esac
667done
252b5132 668
13b2be9c
DJ
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
ab509236 671 localstatedir libdir includedir oldincludedir infodir mandir
252b5132 672do
13b2be9c
DJ
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
252b5132
RH
678 esac
679done
680
13b2be9c
DJ
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
9b2b7d69 698
13b2be9c
DJ
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
252b5132 703
252b5132
RH
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707 ac_srcdir_defaulted=yes
708 # Try the directory containing this script, then its parent.
13b2be9c
DJ
709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
252b5132
RH
721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
723 srcdir=..
724 fi
725else
726 ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729 if test "$ac_srcdir_defaulted" = yes; then
13b2be9c
DJ
730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
252b5132 732 else
13b2be9c
DJ
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
252b5132
RH
735 fi
736fi
13b2be9c
DJ
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
d6d788bd 773
13b2be9c
DJ
774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
781\`configure' configures this package to adapt to many kinds of systems.
9b2b7d69 782
13b2be9c 783Usage: $0 [OPTION]... [VAR=VALUE]...
9b2b7d69 784
13b2be9c
DJ
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
9b2b7d69 787
13b2be9c 788Defaults for the options are specified in brackets.
9b2b7d69 789
13b2be9c
DJ
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803 cat <<_ACEOF
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
ab509236 806 [$ac_default_prefix]
13b2be9c 807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
ab509236 808 [PREFIX]
9b2b7d69 809
13b2be9c
DJ
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
9b2b7d69 814
13b2be9c 815For better control, use the options below.
9b2b7d69 816
13b2be9c
DJ
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830_ACEOF
9b2b7d69 831
13b2be9c 832 cat <<\_ACEOF
9b2b7d69 833
13b2be9c
DJ
834Program names:
835 --program-prefix=PREFIX prepend PREFIX to installed program names
836 --program-suffix=SUFFIX append SUFFIX to installed program names
837 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
9b2b7d69 838
13b2be9c
DJ
839System types:
840 --build=BUILD configure for building on BUILD [guessed]
841 --host=HOST cross-compile to build programs to run on HOST [BUILD]
842 --target=TARGET configure for building compilers for TARGET [HOST]
843_ACEOF
9b2b7d69 844fi
9b2b7d69 845
13b2be9c 846if test -n "$ac_init_help"; then
9b2b7d69 847
13b2be9c 848 cat <<\_ACEOF
9b2b7d69 849
13b2be9c
DJ
850Optional Features:
851 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
852 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
ab509236
L
853 --disable-dependency-tracking speeds up one-time build
854 --enable-dependency-tracking do not reject slow dependency extractors
13b2be9c
DJ
855 --enable-shared=PKGS build shared libraries default=yes
856 --enable-static=PKGS build static libraries default=yes
857 --enable-fast-install=PKGS optimize for fast installation default=yes
858 --disable-libtool-lock avoid locking (might break parallel builds)
859 --enable-bfd-assembler use BFD back end for writing object files
860 targets alternative target configurations besides the primary
861 --enable-commonbfdlib build shared BFD/opcodes/libiberty library
862 --enable-build-warnings Enable build-time compiler warnings if gcc is used
863 --disable-nls do not use Native Language Support
ab509236
L
864 --enable-maintainer-mode enable make rules and dependencies not useful
865 (and sometimes confusing) to the casual installer
9b2b7d69 866
13b2be9c
DJ
867Optional Packages:
868 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
869 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
870 --with-gnu-ld assume the C compiler uses GNU ld default=no
871 --with-pic try to use only PIC/non-PIC objects default=use both
872 --with-included-gettext use the GNU gettext library included here
9b2b7d69 873
13b2be9c
DJ
874Some influential environment variables:
875 CC C compiler command
876 CFLAGS C compiler flags
877 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
878 nonstandard directory <lib dir>
879 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
880 headers in a nonstandard directory <include dir>
881 CPP C preprocessor
882
883Use these variables to override the choices made by `configure' or to help
884it to find libraries and programs with nonstandard names/locations.
885
886_ACEOF
9b2b7d69 887fi
9b2b7d69 888
13b2be9c
DJ
889if test "$ac_init_help" = "recursive"; then
890 # If there are subdirs, report their specific --help.
891 ac_popdir=`pwd`
892 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
893 test -d $ac_dir || continue
894 ac_builddir=.
895
896if test "$ac_dir" != .; then
897 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
898 # A "../" for each directory in $ac_dir_suffix.
899 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
900else
901 ac_dir_suffix= ac_top_builddir=
902fi
9b2b7d69 903
13b2be9c
DJ
904case $srcdir in
905 .) # No --srcdir option. We are building in place.
906 ac_srcdir=.
907 if test -z "$ac_top_builddir"; then
908 ac_top_srcdir=.
909 else
910 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
c8615825 911 fi ;;
13b2be9c
DJ
912 [\\/]* | ?:[\\/]* ) # Absolute path.
913 ac_srcdir=$srcdir$ac_dir_suffix;
914 ac_top_srcdir=$srcdir ;;
915 *) # Relative path.
916 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
917 ac_top_srcdir=$ac_top_builddir$srcdir ;;
c8615825 918esac
ab509236
L
919
920# Do not use `cd foo && pwd` to compute absolute paths, because
921# the directories may not exist.
922case `pwd` in
923.) ac_abs_builddir="$ac_dir";;
924*)
925 case "$ac_dir" in
926 .) ac_abs_builddir=`pwd`;;
927 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
928 *) ac_abs_builddir=`pwd`/"$ac_dir";;
929 esac;;
930esac
931case $ac_abs_builddir in
932.) ac_abs_top_builddir=${ac_top_builddir}.;;
933*)
934 case ${ac_top_builddir}. in
935 .) ac_abs_top_builddir=$ac_abs_builddir;;
936 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
937 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
938 esac;;
939esac
940case $ac_abs_builddir in
941.) ac_abs_srcdir=$ac_srcdir;;
942*)
943 case $ac_srcdir in
944 .) ac_abs_srcdir=$ac_abs_builddir;;
945 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
946 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
947 esac;;
948esac
949case $ac_abs_builddir in
950.) ac_abs_top_srcdir=$ac_top_srcdir;;
951*)
952 case $ac_top_srcdir in
953 .) ac_abs_top_srcdir=$ac_abs_builddir;;
954 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
955 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
956 esac;;
957esac
13b2be9c
DJ
958
959 cd $ac_dir
960 # Check for guested configure; otherwise get Cygnus style configure.
961 if test -f $ac_srcdir/configure.gnu; then
962 echo
963 $SHELL $ac_srcdir/configure.gnu --help=recursive
964 elif test -f $ac_srcdir/configure; then
965 echo
966 $SHELL $ac_srcdir/configure --help=recursive
967 elif test -f $ac_srcdir/configure.ac ||
ab509236 968 test -f $ac_srcdir/configure.in; then
13b2be9c
DJ
969 echo
970 $ac_configure --help
971 else
972 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
973 fi
13dfd2d0 974 cd $ac_popdir
13b2be9c
DJ
975 done
976fi
6840198f 977
13b2be9c
DJ
978test -n "$ac_init_help" && exit 0
979if $ac_init_version; then
980 cat <<\_ACEOF
c8615825 981
ab509236 982Copyright (C) 2003 Free Software Foundation, Inc.
13b2be9c
DJ
983This configure script is free software; the Free Software Foundation
984gives unlimited permission to copy, distribute and modify it.
985_ACEOF
986 exit 0
987fi
988exec 5>config.log
989cat >&5 <<_ACEOF
990This file contains any messages produced by compilers while
991running configure, to aid debugging if configure makes a mistake.
c8615825 992
13b2be9c 993It was created by $as_me, which was
ab509236 994generated by GNU Autoconf 2.59. Invocation command line was
c8615825 995
13b2be9c 996 $ $0 $@
c8615825 997
13b2be9c
DJ
998_ACEOF
999{
1000cat <<_ASUNAME
1001## --------- ##
1002## Platform. ##
1003## --------- ##
1004
1005hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1006uname -m = `(uname -m) 2>/dev/null || echo unknown`
1007uname -r = `(uname -r) 2>/dev/null || echo unknown`
1008uname -s = `(uname -s) 2>/dev/null || echo unknown`
1009uname -v = `(uname -v) 2>/dev/null || echo unknown`
1010
1011/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1012/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1013
1014/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1015/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1016/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1017hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1018/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1019/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1020/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1021
1022_ASUNAME
1023
1024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1025for as_dir in $PATH
1026do
1027 IFS=$as_save_IFS
1028 test -z "$as_dir" && as_dir=.
1029 echo "PATH: $as_dir"
1030done
9b2b7d69 1031
13b2be9c 1032} >&5
6840198f 1033
13b2be9c 1034cat >&5 <<_ACEOF
c8615825 1035
9b2b7d69 1036
13b2be9c
DJ
1037## ----------- ##
1038## Core tests. ##
1039## ----------- ##
87ccc1b0 1040
13b2be9c 1041_ACEOF
9b2b7d69 1042
13b2be9c
DJ
1043
1044# Keep a trace of the command line.
1045# Strip out --no-create and --no-recursion so they do not pile up.
1046# Strip out --silent because we don't want to record it for future runs.
1047# Also quote any args containing shell meta-characters.
1048# Make two passes to allow for proper duplicate-argument suppression.
1049ac_configure_args=
1050ac_configure_args0=
1051ac_configure_args1=
1052ac_sep=
1053ac_must_keep_next=false
1054for ac_pass in 1 2
1055do
1056 for ac_arg
1057 do
1058 case $ac_arg in
1059 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1060 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1061 | -silent | --silent | --silen | --sile | --sil)
1062 continue ;;
1063 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1064 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1065 esac
1066 case $ac_pass in
1067 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1068 2)
1069 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1070 if test $ac_must_keep_next = true; then
ab509236 1071 ac_must_keep_next=false # Got value, back to normal.
13b2be9c 1072 else
ab509236
L
1073 case $ac_arg in
1074 *=* | --config-cache | -C | -disable-* | --disable-* \
1075 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1076 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1077 | -with-* | --with-* | -without-* | --without-* | --x)
1078 case "$ac_configure_args0 " in
1079 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1080 esac
1081 ;;
1082 -* ) ac_must_keep_next=true ;;
1083 esac
13b2be9c
DJ
1084 fi
1085 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1086 # Get rid of the leading space.
1087 ac_sep=" "
c8615825
AM
1088 ;;
1089 esac
1090 done
13b2be9c
DJ
1091done
1092$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1093$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1094
1095# When interrupted or exit'd, cleanup temporary files, and complete
1096# config.log. We remove comments because anyway the quotes in there
1097# would cause problems or look ugly.
1098# WARNING: Be sure not to use single quotes in there, as some shells,
1099# such as our DU 5.0 friend, will then `close' the trap.
1100trap 'exit_status=$?
1101 # Save into config.log some information that might help in debugging.
1102 {
1103 echo
1104
1105 cat <<\_ASBOX
1106## ---------------- ##
1107## Cache variables. ##
1108## ---------------- ##
1109_ASBOX
1110 echo
1111 # The following way of writing the cache mishandles newlines in values,
1112{
1113 (set) 2>&1 |
1114 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1115 *ac_space=\ *)
1116 sed -n \
ab509236
L
1117 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1118 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
13b2be9c
DJ
1119 ;;
1120 *)
1121 sed -n \
ab509236 1122 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13b2be9c
DJ
1123 ;;
1124 esac;
1125}
1126 echo
1127
1128 cat <<\_ASBOX
1129## ----------------- ##
1130## Output variables. ##
1131## ----------------- ##
1132_ASBOX
1133 echo
1134 for ac_var in $ac_subst_vars
1135 do
1136 eval ac_val=$`echo $ac_var`
1137 echo "$ac_var='"'"'$ac_val'"'"'"
1138 done | sort
1139 echo
1140
1141 if test -n "$ac_subst_files"; then
1142 cat <<\_ASBOX
1143## ------------- ##
1144## Output files. ##
1145## ------------- ##
1146_ASBOX
1147 echo
1148 for ac_var in $ac_subst_files
1149 do
1150 eval ac_val=$`echo $ac_var`
ab509236 1151 echo "$ac_var='"'"'$ac_val'"'"'"
13b2be9c
DJ
1152 done | sort
1153 echo
1154 fi
1155
1156 if test -s confdefs.h; then
1157 cat <<\_ASBOX
1158## ----------- ##
1159## confdefs.h. ##
1160## ----------- ##
1161_ASBOX
1162 echo
1163 sed "/^$/d" confdefs.h | sort
1164 echo
1165 fi
1166 test "$ac_signal" != 0 &&
1167 echo "$as_me: caught signal $ac_signal"
1168 echo "$as_me: exit $exit_status"
1169 } >&5
ab509236 1170 rm -f core *.core &&
13b2be9c
DJ
1171 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1172 exit $exit_status
1173 ' 0
1174for ac_signal in 1 2 13 15; do
1175 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1176done
1177ac_signal=0
1178
1179# confdefs.h avoids OS command line length limits that DEFS can exceed.
1180rm -rf conftest* confdefs.h
1181# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1182echo >confdefs.h
1183
1184# Predefined preprocessor variables.
1185
1186cat >>confdefs.h <<_ACEOF
1187#define PACKAGE_NAME "$PACKAGE_NAME"
1188_ACEOF
1189
1190
1191cat >>confdefs.h <<_ACEOF
1192#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1193_ACEOF
1194
1195
1196cat >>confdefs.h <<_ACEOF
1197#define PACKAGE_VERSION "$PACKAGE_VERSION"
1198_ACEOF
1199
1200
1201cat >>confdefs.h <<_ACEOF
1202#define PACKAGE_STRING "$PACKAGE_STRING"
1203_ACEOF
1204
1205
1206cat >>confdefs.h <<_ACEOF
1207#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1208_ACEOF
1209
1210
1211# Let the site file select an alternate cache file if it wants to.
1212# Prefer explicitly selected file to automatically selected ones.
1213if test -z "$CONFIG_SITE"; then
1214 if test "x$prefix" != xNONE; then
1215 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1216 else
1217 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1218 fi
1219fi
1220for ac_site_file in $CONFIG_SITE; do
1221 if test -r "$ac_site_file"; then
1222 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1223echo "$as_me: loading site script $ac_site_file" >&6;}
1224 sed 's/^/| /' "$ac_site_file" >&5
1225 . "$ac_site_file"
1226 fi
1227done
1228
1229if test -r "$cache_file"; then
1230 # Some versions of bash will fail to source /dev/null (special
1231 # files actually), so we avoid doing that.
1232 if test -f "$cache_file"; then
1233 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1234echo "$as_me: loading cache $cache_file" >&6;}
1235 case $cache_file in
1236 [\\/]* | ?:[\\/]* ) . $cache_file;;
1237 *) . ./$cache_file;;
1238 esac
1239 fi
1240else
1241 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1242echo "$as_me: creating cache $cache_file" >&6;}
1243 >$cache_file
1244fi
1245
1246# Check that the precious variables saved in the cache have kept the same
1247# value.
1248ac_cache_corrupted=false
1249for ac_var in `(set) 2>&1 |
ab509236 1250 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
13b2be9c
DJ
1251 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1252 eval ac_new_set=\$ac_env_${ac_var}_set
1253 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1254 eval ac_new_val="\$ac_env_${ac_var}_value"
1255 case $ac_old_set,$ac_new_set in
1256 set,)
1257 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1258echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1259 ac_cache_corrupted=: ;;
1260 ,set)
1261 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1262echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1263 ac_cache_corrupted=: ;;
1264 ,);;
1265 *)
1266 if test "x$ac_old_val" != "x$ac_new_val"; then
ab509236 1267 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
13b2be9c 1268echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
ab509236 1269 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
13b2be9c 1270echo "$as_me: former value: $ac_old_val" >&2;}
ab509236 1271 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
13b2be9c 1272echo "$as_me: current value: $ac_new_val" >&2;}
ab509236 1273 ac_cache_corrupted=:
13b2be9c
DJ
1274 fi;;
1275 esac
1276 # Pass precious variables to config.status.
1277 if test "$ac_new_set" = set; then
1278 case $ac_new_val in
1279 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1280 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1281 *) ac_arg=$ac_var=$ac_new_val ;;
1282 esac
1283 case " $ac_configure_args " in
1284 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1285 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1286 esac
1287 fi
1288done
1289if $ac_cache_corrupted; then
1290 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1291echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1292 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1293echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1294 { (exit 1); exit 1; }; }
1295fi
1296
1297ac_ext=c
1298ac_cpp='$CPP $CPPFLAGS'
1299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1301ac_compiler_gnu=$ac_cv_c_compiler_gnu
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322ac_aux_dir=
1323for ac_dir in .. $srcdir/..; do
1324 if test -f $ac_dir/install-sh; then
1325 ac_aux_dir=$ac_dir
1326 ac_install_sh="$ac_aux_dir/install-sh -c"
1327 break
1328 elif test -f $ac_dir/install.sh; then
1329 ac_aux_dir=$ac_dir
1330 ac_install_sh="$ac_aux_dir/install.sh -c"
1331 break
1332 elif test -f $ac_dir/shtool; then
1333 ac_aux_dir=$ac_dir
1334 ac_install_sh="$ac_aux_dir/shtool install -c"
1335 break
1336 fi
1337done
1338if test -z "$ac_aux_dir"; then
1339 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
1340echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
1341 { (exit 1); exit 1; }; }
1342fi
1343ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1344ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1345ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1346
1347# Make sure we can run config.sub.
1348$ac_config_sub sun4 >/dev/null 2>&1 ||
1349 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1350echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1351 { (exit 1); exit 1; }; }
1352
1353echo "$as_me:$LINENO: checking build system type" >&5
1354echo $ECHO_N "checking build system type... $ECHO_C" >&6
1355if test "${ac_cv_build+set}" = set; then
1356 echo $ECHO_N "(cached) $ECHO_C" >&6
1357else
1358 ac_cv_build_alias=$build_alias
1359test -z "$ac_cv_build_alias" &&
1360 ac_cv_build_alias=`$ac_config_guess`
1361test -z "$ac_cv_build_alias" &&
1362 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1363echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1364 { (exit 1); exit 1; }; }
1365ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1366 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1367echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1368 { (exit 1); exit 1; }; }
1369
1370fi
1371echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1372echo "${ECHO_T}$ac_cv_build" >&6
1373build=$ac_cv_build
1374build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1375build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1376build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1377
1378
1379echo "$as_me:$LINENO: checking host system type" >&5
1380echo $ECHO_N "checking host system type... $ECHO_C" >&6
1381if test "${ac_cv_host+set}" = set; then
1382 echo $ECHO_N "(cached) $ECHO_C" >&6
1383else
1384 ac_cv_host_alias=$host_alias
1385test -z "$ac_cv_host_alias" &&
1386 ac_cv_host_alias=$ac_cv_build_alias
1387ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1388 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1389echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1390 { (exit 1); exit 1; }; }
1391
1392fi
1393echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1394echo "${ECHO_T}$ac_cv_host" >&6
1395host=$ac_cv_host
1396host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400
1401echo "$as_me:$LINENO: checking target system type" >&5
1402echo $ECHO_N "checking target system type... $ECHO_C" >&6
1403if test "${ac_cv_target+set}" = set; then
1404 echo $ECHO_N "(cached) $ECHO_C" >&6
1405else
1406 ac_cv_target_alias=$target_alias
1407test "x$ac_cv_target_alias" = "x" &&
1408 ac_cv_target_alias=$ac_cv_host_alias
1409ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1410 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1411echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1412 { (exit 1); exit 1; }; }
1413
1414fi
1415echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1416echo "${ECHO_T}$ac_cv_target" >&6
1417target=$ac_cv_target
1418target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422
1423# The aliases save the names the user supplied, while $host etc.
1424# will get canonicalized.
1425test -n "$target_alias" &&
1426 test "$program_prefix$program_suffix$program_transform_name" = \
1427 NONENONEs,x,x, &&
1428 program_prefix=${target_alias}-
1429ac_ext=c
1430ac_cpp='$CPP $CPPFLAGS'
1431ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1432ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1433ac_compiler_gnu=$ac_cv_c_compiler_gnu
1434if test -n "$ac_tool_prefix"; then
1435 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1436set dummy ${ac_tool_prefix}gcc; ac_word=$2
1437echo "$as_me:$LINENO: checking for $ac_word" >&5
1438echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1439if test "${ac_cv_prog_CC+set}" = set; then
1440 echo $ECHO_N "(cached) $ECHO_C" >&6
1441else
1442 if test -n "$CC"; then
1443 ac_cv_prog_CC="$CC" # Let the user override the test.
1444else
1445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1446for as_dir in $PATH
1447do
1448 IFS=$as_save_IFS
1449 test -z "$as_dir" && as_dir=.
1450 for ac_exec_ext in '' $ac_executable_extensions; do
1451 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1452 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1453 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1454 break 2
1455 fi
1456done
1457done
1458
1459fi
1460fi
1461CC=$ac_cv_prog_CC
1462if test -n "$CC"; then
1463 echo "$as_me:$LINENO: result: $CC" >&5
1464echo "${ECHO_T}$CC" >&6
1465else
1466 echo "$as_me:$LINENO: result: no" >&5
1467echo "${ECHO_T}no" >&6
1468fi
1469
1470fi
1471if test -z "$ac_cv_prog_CC"; then
1472 ac_ct_CC=$CC
1473 # Extract the first word of "gcc", so it can be a program name with args.
1474set dummy gcc; ac_word=$2
1475echo "$as_me:$LINENO: checking for $ac_word" >&5
1476echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1477if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1478 echo $ECHO_N "(cached) $ECHO_C" >&6
1479else
1480 if test -n "$ac_ct_CC"; then
1481 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1482else
1483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1484for as_dir in $PATH
1485do
1486 IFS=$as_save_IFS
1487 test -z "$as_dir" && as_dir=.
1488 for ac_exec_ext in '' $ac_executable_extensions; do
1489 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1490 ac_cv_prog_ac_ct_CC="gcc"
1491 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1492 break 2
1493 fi
1494done
1495done
1496
1497fi
1498fi
1499ac_ct_CC=$ac_cv_prog_ac_ct_CC
1500if test -n "$ac_ct_CC"; then
1501 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1502echo "${ECHO_T}$ac_ct_CC" >&6
1503else
1504 echo "$as_me:$LINENO: result: no" >&5
1505echo "${ECHO_T}no" >&6
1506fi
1507
1508 CC=$ac_ct_CC
1509else
1510 CC="$ac_cv_prog_CC"
1511fi
1512
1513if test -z "$CC"; then
1514 if test -n "$ac_tool_prefix"; then
1515 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1516set dummy ${ac_tool_prefix}cc; ac_word=$2
1517echo "$as_me:$LINENO: checking for $ac_word" >&5
1518echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1519if test "${ac_cv_prog_CC+set}" = set; then
1520 echo $ECHO_N "(cached) $ECHO_C" >&6
1521else
1522 if test -n "$CC"; then
1523 ac_cv_prog_CC="$CC" # Let the user override the test.
1524else
1525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1526for as_dir in $PATH
1527do
1528 IFS=$as_save_IFS
1529 test -z "$as_dir" && as_dir=.
1530 for ac_exec_ext in '' $ac_executable_extensions; do
1531 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1532 ac_cv_prog_CC="${ac_tool_prefix}cc"
1533 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1534 break 2
1535 fi
1536done
1537done
1538
1539fi
1540fi
1541CC=$ac_cv_prog_CC
1542if test -n "$CC"; then
1543 echo "$as_me:$LINENO: result: $CC" >&5
1544echo "${ECHO_T}$CC" >&6
1545else
1546 echo "$as_me:$LINENO: result: no" >&5
1547echo "${ECHO_T}no" >&6
1548fi
1549
1550fi
1551if test -z "$ac_cv_prog_CC"; then
1552 ac_ct_CC=$CC
1553 # Extract the first word of "cc", so it can be a program name with args.
1554set dummy cc; ac_word=$2
1555echo "$as_me:$LINENO: checking for $ac_word" >&5
1556echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1557if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1558 echo $ECHO_N "(cached) $ECHO_C" >&6
1559else
1560 if test -n "$ac_ct_CC"; then
1561 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1562else
1563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1564for as_dir in $PATH
1565do
1566 IFS=$as_save_IFS
1567 test -z "$as_dir" && as_dir=.
1568 for ac_exec_ext in '' $ac_executable_extensions; do
1569 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1570 ac_cv_prog_ac_ct_CC="cc"
1571 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1572 break 2
1573 fi
1574done
1575done
1576
1577fi
1578fi
1579ac_ct_CC=$ac_cv_prog_ac_ct_CC
1580if test -n "$ac_ct_CC"; then
1581 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1582echo "${ECHO_T}$ac_ct_CC" >&6
1583else
1584 echo "$as_me:$LINENO: result: no" >&5
1585echo "${ECHO_T}no" >&6
1586fi
1587
1588 CC=$ac_ct_CC
1589else
1590 CC="$ac_cv_prog_CC"
1591fi
1592
1593fi
1594if test -z "$CC"; then
1595 # Extract the first word of "cc", so it can be a program name with args.
1596set dummy cc; ac_word=$2
1597echo "$as_me:$LINENO: checking for $ac_word" >&5
1598echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1599if test "${ac_cv_prog_CC+set}" = set; then
1600 echo $ECHO_N "(cached) $ECHO_C" >&6
1601else
1602 if test -n "$CC"; then
1603 ac_cv_prog_CC="$CC" # Let the user override the test.
1604else
1605 ac_prog_rejected=no
1606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1607for as_dir in $PATH
1608do
1609 IFS=$as_save_IFS
1610 test -z "$as_dir" && as_dir=.
1611 for ac_exec_ext in '' $ac_executable_extensions; do
1612 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1613 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1614 ac_prog_rejected=yes
1615 continue
1616 fi
1617 ac_cv_prog_CC="cc"
1618 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1619 break 2
1620 fi
1621done
1622done
1623
1624if test $ac_prog_rejected = yes; then
1625 # We found a bogon in the path, so make sure we never use it.
1626 set dummy $ac_cv_prog_CC
1627 shift
1628 if test $# != 0; then
1629 # We chose a different compiler from the bogus one.
1630 # However, it has the same basename, so the bogon will be chosen
1631 # first if we set CC to just the basename; use the full file name.
1632 shift
1633 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1634 fi
1635fi
1636fi
1637fi
1638CC=$ac_cv_prog_CC
1639if test -n "$CC"; then
1640 echo "$as_me:$LINENO: result: $CC" >&5
1641echo "${ECHO_T}$CC" >&6
1642else
1643 echo "$as_me:$LINENO: result: no" >&5
1644echo "${ECHO_T}no" >&6
1645fi
1646
1647fi
1648if test -z "$CC"; then
1649 if test -n "$ac_tool_prefix"; then
1650 for ac_prog in cl
1651 do
1652 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1653set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1654echo "$as_me:$LINENO: checking for $ac_word" >&5
1655echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1656if test "${ac_cv_prog_CC+set}" = set; then
1657 echo $ECHO_N "(cached) $ECHO_C" >&6
1658else
1659 if test -n "$CC"; then
1660 ac_cv_prog_CC="$CC" # Let the user override the test.
1661else
1662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1663for as_dir in $PATH
1664do
1665 IFS=$as_save_IFS
1666 test -z "$as_dir" && as_dir=.
1667 for ac_exec_ext in '' $ac_executable_extensions; do
1668 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1669 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1670 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1671 break 2
1672 fi
1673done
1674done
1675
1676fi
1677fi
1678CC=$ac_cv_prog_CC
1679if test -n "$CC"; then
1680 echo "$as_me:$LINENO: result: $CC" >&5
1681echo "${ECHO_T}$CC" >&6
1682else
1683 echo "$as_me:$LINENO: result: no" >&5
1684echo "${ECHO_T}no" >&6
1685fi
1686
1687 test -n "$CC" && break
1688 done
1689fi
1690if test -z "$CC"; then
1691 ac_ct_CC=$CC
1692 for ac_prog in cl
1693do
1694 # Extract the first word of "$ac_prog", so it can be a program name with args.
1695set dummy $ac_prog; ac_word=$2
1696echo "$as_me:$LINENO: checking for $ac_word" >&5
1697echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1698if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1699 echo $ECHO_N "(cached) $ECHO_C" >&6
1700else
1701 if test -n "$ac_ct_CC"; then
1702 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1703else
1704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1705for as_dir in $PATH
1706do
1707 IFS=$as_save_IFS
1708 test -z "$as_dir" && as_dir=.
1709 for ac_exec_ext in '' $ac_executable_extensions; do
1710 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1711 ac_cv_prog_ac_ct_CC="$ac_prog"
1712 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1713 break 2
1714 fi
1715done
1716done
1717
1718fi
1719fi
1720ac_ct_CC=$ac_cv_prog_ac_ct_CC
1721if test -n "$ac_ct_CC"; then
1722 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1723echo "${ECHO_T}$ac_ct_CC" >&6
1724else
1725 echo "$as_me:$LINENO: result: no" >&5
1726echo "${ECHO_T}no" >&6
1727fi
1728
1729 test -n "$ac_ct_CC" && break
1730done
1731
1732 CC=$ac_ct_CC
1733fi
1734
1735fi
1736
1737
1738test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1739See \`config.log' for more details." >&5
1740echo "$as_me: error: no acceptable C compiler found in \$PATH
1741See \`config.log' for more details." >&2;}
1742 { (exit 1); exit 1; }; }
1743
1744# Provide some information about the compiler.
1745echo "$as_me:$LINENO:" \
1746 "checking for C compiler version" >&5
1747ac_compiler=`set X $ac_compile; echo $2`
1748{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1749 (eval $ac_compiler --version </dev/null >&5) 2>&5
1750 ac_status=$?
1751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1752 (exit $ac_status); }
1753{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1754 (eval $ac_compiler -v </dev/null >&5) 2>&5
1755 ac_status=$?
1756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1757 (exit $ac_status); }
1758{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1759 (eval $ac_compiler -V </dev/null >&5) 2>&5
1760 ac_status=$?
1761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1762 (exit $ac_status); }
1763
1764cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
1765/* confdefs.h. */
1766_ACEOF
1767cat confdefs.h >>conftest.$ac_ext
1768cat >>conftest.$ac_ext <<_ACEOF
1769/* end confdefs.h. */
1770
1771int
1772main ()
1773{
1774
1775 ;
1776 return 0;
1777}
1778_ACEOF
1779ac_clean_files_save=$ac_clean_files
1780ac_clean_files="$ac_clean_files a.out a.exe b.out"
1781# Try to create an executable without -o first, disregard a.out.
1782# It will help us diagnose broken compilers, and finding out an intuition
1783# of exeext.
ab509236
L
1784echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1785echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
13b2be9c
DJ
1786ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1787if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1788 (eval $ac_link_default) 2>&5
1789 ac_status=$?
1790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1791 (exit $ac_status); }; then
1792 # Find the output, starting from the most likely. This scheme is
1793# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1794# resort.
1795
1796# Be careful to initialize this variable, since it used to be cached.
1797# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1798ac_cv_exeext=
1799# b.out is created by i960 compilers.
1800for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1801do
1802 test -f "$ac_file" || continue
1803 case $ac_file in
1804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
ab509236 1805 ;;
13b2be9c 1806 conftest.$ac_ext )
ab509236
L
1807 # This is the source file.
1808 ;;
13b2be9c 1809 [ab].out )
ab509236
L
1810 # We found the default executable, but exeext='' is most
1811 # certainly right.
1812 break;;
13b2be9c 1813 *.* )
ab509236
L
1814 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1815 # FIXME: I believe we export ac_cv_exeext for Libtool,
1816 # but it would be cool to find out if it's true. Does anybody
1817 # maintain Libtool? --akim.
1818 export ac_cv_exeext
1819 break;;
13b2be9c 1820 * )
ab509236 1821 break;;
13b2be9c
DJ
1822 esac
1823done
1824else
1825 echo "$as_me: failed program was:" >&5
1826sed 's/^/| /' conftest.$ac_ext >&5
1827
1828{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1829See \`config.log' for more details." >&5
1830echo "$as_me: error: C compiler cannot create executables
1831See \`config.log' for more details." >&2;}
1832 { (exit 77); exit 77; }; }
1833fi
1834
1835ac_exeext=$ac_cv_exeext
1836echo "$as_me:$LINENO: result: $ac_file" >&5
1837echo "${ECHO_T}$ac_file" >&6
1838
1839# Check the compiler produces executables we can run. If not, either
1840# the compiler is broken, or we cross compile.
1841echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1842echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1843# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1844# If not cross compiling, check that we can run a simple program.
1845if test "$cross_compiling" != yes; then
1846 if { ac_try='./$ac_file'
1847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1848 (eval $ac_try) 2>&5
1849 ac_status=$?
1850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1851 (exit $ac_status); }; }; then
1852 cross_compiling=no
1853 else
1854 if test "$cross_compiling" = maybe; then
1855 cross_compiling=yes
1856 else
1857 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1858If you meant to cross compile, use \`--host'.
1859See \`config.log' for more details." >&5
1860echo "$as_me: error: cannot run C compiled programs.
1861If you meant to cross compile, use \`--host'.
1862See \`config.log' for more details." >&2;}
1863 { (exit 1); exit 1; }; }
1864 fi
1865 fi
1866fi
1867echo "$as_me:$LINENO: result: yes" >&5
1868echo "${ECHO_T}yes" >&6
1869
1870rm -f a.out a.exe conftest$ac_cv_exeext b.out
1871ac_clean_files=$ac_clean_files_save
1872# Check the compiler produces executables we can run. If not, either
1873# the compiler is broken, or we cross compile.
1874echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1875echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1876echo "$as_me:$LINENO: result: $cross_compiling" >&5
1877echo "${ECHO_T}$cross_compiling" >&6
1878
1879echo "$as_me:$LINENO: checking for suffix of executables" >&5
1880echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1882 (eval $ac_link) 2>&5
1883 ac_status=$?
1884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1885 (exit $ac_status); }; then
1886 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1887# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1888# work properly (i.e., refer to `conftest.exe'), while it won't with
1889# `rm'.
1890for ac_file in conftest.exe conftest conftest.*; do
1891 test -f "$ac_file" || continue
1892 case $ac_file in
1893 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1894 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
ab509236
L
1895 export ac_cv_exeext
1896 break;;
13b2be9c
DJ
1897 * ) break;;
1898 esac
1899done
1900else
1901 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1902See \`config.log' for more details." >&5
1903echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1904See \`config.log' for more details." >&2;}
1905 { (exit 1); exit 1; }; }
1906fi
1907
1908rm -f conftest$ac_cv_exeext
1909echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1910echo "${ECHO_T}$ac_cv_exeext" >&6
1911
1912rm -f conftest.$ac_ext
1913EXEEXT=$ac_cv_exeext
1914ac_exeext=$EXEEXT
1915echo "$as_me:$LINENO: checking for suffix of object files" >&5
1916echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1917if test "${ac_cv_objext+set}" = set; then
1918 echo $ECHO_N "(cached) $ECHO_C" >&6
1919else
1920 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
1921/* confdefs.h. */
1922_ACEOF
1923cat confdefs.h >>conftest.$ac_ext
1924cat >>conftest.$ac_ext <<_ACEOF
1925/* end confdefs.h. */
1926
1927int
1928main ()
1929{
1930
1931 ;
1932 return 0;
1933}
1934_ACEOF
1935rm -f conftest.o conftest.obj
1936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1937 (eval $ac_compile) 2>&5
1938 ac_status=$?
1939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1940 (exit $ac_status); }; then
1941 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1942 case $ac_file in
1943 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1944 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1945 break;;
1946 esac
1947done
1948else
1949 echo "$as_me: failed program was:" >&5
1950sed 's/^/| /' conftest.$ac_ext >&5
1951
1952{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1953See \`config.log' for more details." >&5
1954echo "$as_me: error: cannot compute suffix of object files: cannot compile
1955See \`config.log' for more details." >&2;}
1956 { (exit 1); exit 1; }; }
1957fi
1958
1959rm -f conftest.$ac_cv_objext conftest.$ac_ext
1960fi
1961echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1962echo "${ECHO_T}$ac_cv_objext" >&6
1963OBJEXT=$ac_cv_objext
1964ac_objext=$OBJEXT
1965echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1966echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1967if test "${ac_cv_c_compiler_gnu+set}" = set; then
1968 echo $ECHO_N "(cached) $ECHO_C" >&6
1969else
1970 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
1971/* confdefs.h. */
1972_ACEOF
1973cat confdefs.h >>conftest.$ac_ext
1974cat >>conftest.$ac_ext <<_ACEOF
1975/* end confdefs.h. */
1976
1977int
1978main ()
1979{
1980#ifndef __GNUC__
1981 choke me
1982#endif
1983
1984 ;
1985 return 0;
1986}
1987_ACEOF
1988rm -f conftest.$ac_objext
1989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 1990 (eval $ac_compile) 2>conftest.er1
13b2be9c 1991 ac_status=$?
ab509236
L
1992 grep -v '^ *+' conftest.er1 >conftest.err
1993 rm -f conftest.er1
1994 cat conftest.err >&5
13b2be9c
DJ
1995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1996 (exit $ac_status); } &&
ab509236
L
1997 { ac_try='test -z "$ac_c_werror_flag"
1998 || test ! -s conftest.err'
1999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2000 (eval $ac_try) 2>&5
2001 ac_status=$?
2002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2003 (exit $ac_status); }; } &&
2004 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
2005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2006 (eval $ac_try) 2>&5
2007 ac_status=$?
2008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2009 (exit $ac_status); }; }; then
2010 ac_compiler_gnu=yes
2011else
2012 echo "$as_me: failed program was:" >&5
2013sed 's/^/| /' conftest.$ac_ext >&5
2014
2015ac_compiler_gnu=no
2016fi
ab509236 2017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
2018ac_cv_c_compiler_gnu=$ac_compiler_gnu
2019
2020fi
2021echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2022echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2023GCC=`test $ac_compiler_gnu = yes && echo yes`
2024ac_test_CFLAGS=${CFLAGS+set}
2025ac_save_CFLAGS=$CFLAGS
2026CFLAGS="-g"
2027echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2028echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2029if test "${ac_cv_prog_cc_g+set}" = set; then
2030 echo $ECHO_N "(cached) $ECHO_C" >&6
2031else
2032 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
2033/* confdefs.h. */
2034_ACEOF
2035cat confdefs.h >>conftest.$ac_ext
2036cat >>conftest.$ac_ext <<_ACEOF
2037/* end confdefs.h. */
2038
2039int
2040main ()
2041{
2042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047rm -f conftest.$ac_objext
2048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 2049 (eval $ac_compile) 2>conftest.er1
13b2be9c 2050 ac_status=$?
ab509236
L
2051 grep -v '^ *+' conftest.er1 >conftest.err
2052 rm -f conftest.er1
2053 cat conftest.err >&5
13b2be9c
DJ
2054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2055 (exit $ac_status); } &&
ab509236
L
2056 { ac_try='test -z "$ac_c_werror_flag"
2057 || test ! -s conftest.err'
2058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2059 (eval $ac_try) 2>&5
2060 ac_status=$?
2061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2062 (exit $ac_status); }; } &&
2063 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
2064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2065 (eval $ac_try) 2>&5
2066 ac_status=$?
2067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2068 (exit $ac_status); }; }; then
2069 ac_cv_prog_cc_g=yes
2070else
2071 echo "$as_me: failed program was:" >&5
2072sed 's/^/| /' conftest.$ac_ext >&5
2073
2074ac_cv_prog_cc_g=no
2075fi
ab509236 2076rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
2077fi
2078echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2079echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2080if test "$ac_test_CFLAGS" = set; then
2081 CFLAGS=$ac_save_CFLAGS
2082elif test $ac_cv_prog_cc_g = yes; then
2083 if test "$GCC" = yes; then
2084 CFLAGS="-g -O2"
2085 else
2086 CFLAGS="-g"
2087 fi
2088else
2089 if test "$GCC" = yes; then
2090 CFLAGS="-O2"
2091 else
2092 CFLAGS=
2093 fi
2094fi
2095echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2096echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2097if test "${ac_cv_prog_cc_stdc+set}" = set; then
2098 echo $ECHO_N "(cached) $ECHO_C" >&6
2099else
2100 ac_cv_prog_cc_stdc=no
2101ac_save_CC=$CC
2102cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
2103/* confdefs.h. */
2104_ACEOF
2105cat confdefs.h >>conftest.$ac_ext
2106cat >>conftest.$ac_ext <<_ACEOF
2107/* end confdefs.h. */
2108#include <stdarg.h>
2109#include <stdio.h>
2110#include <sys/types.h>
2111#include <sys/stat.h>
2112/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2113struct buf { int x; };
2114FILE * (*rcsopen) (struct buf *, struct stat *, int);
2115static char *e (p, i)
2116 char **p;
2117 int i;
2118{
2119 return p[i];
2120}
2121static char *f (char * (*g) (char **, int), char **p, ...)
2122{
2123 char *s;
2124 va_list v;
2125 va_start (v,p);
2126 s = g (p, va_arg (v,int));
2127 va_end (v);
2128 return s;
2129}
ab509236
L
2130
2131/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2132 function prototypes and stuff, but not '\xHH' hex character constants.
2133 These don't provoke an error unfortunately, instead are silently treated
2134 as 'x'. The following induces an error, until -std1 is added to get
2135 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2136 array size at least. It's necessary to write '\x00'==0 to get something
2137 that's true only with -std1. */
2138int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2139
13b2be9c
DJ
2140int test (int i, double x);
2141struct s1 {int (*f) (int a);};
2142struct s2 {int (*f) (double a);};
2143int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2144int argc;
2145char **argv;
2146int
2147main ()
2148{
2149return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154# Don't try gcc -ansi; that turns off useful extensions and
2155# breaks some systems' header files.
2156# AIX -qlanglvl=ansi
2157# Ultrix and OSF/1 -std1
2158# HP-UX 10.20 and later -Ae
2159# HP-UX older versions -Aa -D_HPUX_SOURCE
2160# SVR4 -Xc -D__EXTENSIONS__
2161for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2162do
2163 CC="$ac_save_CC $ac_arg"
2164 rm -f conftest.$ac_objext
2165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 2166 (eval $ac_compile) 2>conftest.er1
13b2be9c 2167 ac_status=$?
ab509236
L
2168 grep -v '^ *+' conftest.er1 >conftest.err
2169 rm -f conftest.er1
2170 cat conftest.err >&5
13b2be9c
DJ
2171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2172 (exit $ac_status); } &&
ab509236
L
2173 { ac_try='test -z "$ac_c_werror_flag"
2174 || test ! -s conftest.err'
2175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2176 (eval $ac_try) 2>&5
2177 ac_status=$?
2178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2179 (exit $ac_status); }; } &&
2180 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
2181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2182 (eval $ac_try) 2>&5
2183 ac_status=$?
2184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2185 (exit $ac_status); }; }; then
2186 ac_cv_prog_cc_stdc=$ac_arg
2187break
2188else
2189 echo "$as_me: failed program was:" >&5
2190sed 's/^/| /' conftest.$ac_ext >&5
2191
2192fi
ab509236 2193rm -f conftest.err conftest.$ac_objext
13b2be9c
DJ
2194done
2195rm -f conftest.$ac_ext conftest.$ac_objext
2196CC=$ac_save_CC
2197
2198fi
2199
2200case "x$ac_cv_prog_cc_stdc" in
2201 x|xno)
2202 echo "$as_me:$LINENO: result: none needed" >&5
2203echo "${ECHO_T}none needed" >&6 ;;
2204 *)
2205 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2206echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2207 CC="$CC $ac_cv_prog_cc_stdc" ;;
2208esac
2209
2210# Some people use a C++ compiler to compile C. Since we use `exit',
2211# in C++ we need to declare it. In case someone uses the same compiler
2212# for both compiling C and C++ we need to have the C++ compiler decide
2213# the declaration of exit, since it's the most demanding environment.
2214cat >conftest.$ac_ext <<_ACEOF
2215#ifndef __cplusplus
2216 choke me
2217#endif
2218_ACEOF
2219rm -f conftest.$ac_objext
2220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 2221 (eval $ac_compile) 2>conftest.er1
13b2be9c 2222 ac_status=$?
ab509236
L
2223 grep -v '^ *+' conftest.er1 >conftest.err
2224 rm -f conftest.er1
2225 cat conftest.err >&5
13b2be9c
DJ
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); } &&
ab509236
L
2228 { ac_try='test -z "$ac_c_werror_flag"
2229 || test ! -s conftest.err'
2230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2231 (eval $ac_try) 2>&5
2232 ac_status=$?
2233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2234 (exit $ac_status); }; } &&
2235 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
2236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2237 (eval $ac_try) 2>&5
2238 ac_status=$?
2239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2240 (exit $ac_status); }; }; then
2241 for ac_declaration in \
ab509236 2242 '' \
13b2be9c
DJ
2243 'extern "C" void std::exit (int) throw (); using std::exit;' \
2244 'extern "C" void std::exit (int); using std::exit;' \
2245 'extern "C" void exit (int) throw ();' \
2246 'extern "C" void exit (int);' \
2247 'void exit (int);'
2248do
2249 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
2250/* confdefs.h. */
2251_ACEOF
2252cat confdefs.h >>conftest.$ac_ext
2253cat >>conftest.$ac_ext <<_ACEOF
2254/* end confdefs.h. */
13dfd2d0 2255$ac_declaration
ab509236 2256#include <stdlib.h>
13b2be9c
DJ
2257int
2258main ()
2259{
2260exit (42);
2261 ;
2262 return 0;
2263}
2264_ACEOF
2265rm -f conftest.$ac_objext
2266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 2267 (eval $ac_compile) 2>conftest.er1
13b2be9c 2268 ac_status=$?
ab509236
L
2269 grep -v '^ *+' conftest.er1 >conftest.err
2270 rm -f conftest.er1
2271 cat conftest.err >&5
13b2be9c
DJ
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); } &&
ab509236
L
2274 { ac_try='test -z "$ac_c_werror_flag"
2275 || test ! -s conftest.err'
2276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2277 (eval $ac_try) 2>&5
2278 ac_status=$?
2279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2280 (exit $ac_status); }; } &&
2281 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
2282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2283 (eval $ac_try) 2>&5
2284 ac_status=$?
2285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2286 (exit $ac_status); }; }; then
2287 :
2288else
2289 echo "$as_me: failed program was:" >&5
2290sed 's/^/| /' conftest.$ac_ext >&5
2291
2292continue
2293fi
ab509236 2294rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c 2295 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
2296/* confdefs.h. */
2297_ACEOF
2298cat confdefs.h >>conftest.$ac_ext
2299cat >>conftest.$ac_ext <<_ACEOF
2300/* end confdefs.h. */
2301$ac_declaration
2302int
2303main ()
2304{
2305exit (42);
2306 ;
2307 return 0;
2308}
2309_ACEOF
2310rm -f conftest.$ac_objext
2311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 2312 (eval $ac_compile) 2>conftest.er1
13b2be9c 2313 ac_status=$?
ab509236
L
2314 grep -v '^ *+' conftest.er1 >conftest.err
2315 rm -f conftest.er1
2316 cat conftest.err >&5
13b2be9c
DJ
2317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2318 (exit $ac_status); } &&
ab509236
L
2319 { ac_try='test -z "$ac_c_werror_flag"
2320 || test ! -s conftest.err'
2321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2322 (eval $ac_try) 2>&5
2323 ac_status=$?
2324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2325 (exit $ac_status); }; } &&
2326 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
2327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2328 (eval $ac_try) 2>&5
2329 ac_status=$?
2330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2331 (exit $ac_status); }; }; then
2332 break
2333else
2334 echo "$as_me: failed program was:" >&5
2335sed 's/^/| /' conftest.$ac_ext >&5
2336
2337fi
ab509236 2338rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
2339done
2340rm -f conftest*
2341if test -n "$ac_declaration"; then
2342 echo '#ifdef __cplusplus' >>confdefs.h
2343 echo $ac_declaration >>confdefs.h
2344 echo '#endif' >>confdefs.h
2345fi
2346
2347else
2348 echo "$as_me: failed program was:" >&5
2349sed 's/^/| /' conftest.$ac_ext >&5
2350
2351fi
ab509236 2352rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
2353ac_ext=c
2354ac_cpp='$CPP $CPPFLAGS'
2355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2357ac_compiler_gnu=$ac_cv_c_compiler_gnu
2358
2359
ab509236
L
2360echo "$as_me:$LINENO: checking for library containing strerror" >&5
2361echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
2362if test "${ac_cv_search_strerror+set}" = set; then
13b2be9c
DJ
2363 echo $ECHO_N "(cached) $ECHO_C" >&6
2364else
ab509236
L
2365 ac_func_search_save_LIBS=$LIBS
2366ac_cv_search_strerror=no
13b2be9c 2367cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
2368/* confdefs.h. */
2369_ACEOF
2370cat confdefs.h >>conftest.$ac_ext
2371cat >>conftest.$ac_ext <<_ACEOF
2372/* end confdefs.h. */
2373
2374/* Override any gcc2 internal prototype to avoid an error. */
2375#ifdef __cplusplus
2376extern "C"
2377#endif
2378/* We use char because int might match the return type of a gcc2
2379 builtin and then its argument prototype would still apply. */
2380char strerror ();
2381int
2382main ()
2383{
2384strerror ();
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389rm -f conftest.$ac_objext conftest$ac_exeext
2390if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 2391 (eval $ac_link) 2>conftest.er1
13b2be9c 2392 ac_status=$?
ab509236
L
2393 grep -v '^ *+' conftest.er1 >conftest.err
2394 rm -f conftest.er1
2395 cat conftest.err >&5
13b2be9c
DJ
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); } &&
ab509236
L
2398 { ac_try='test -z "$ac_c_werror_flag"
2399 || test ! -s conftest.err'
2400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2401 (eval $ac_try) 2>&5
2402 ac_status=$?
2403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404 (exit $ac_status); }; } &&
2405 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
2406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2407 (eval $ac_try) 2>&5
2408 ac_status=$?
2409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2410 (exit $ac_status); }; }; then
ab509236 2411 ac_cv_search_strerror="none required"
13b2be9c
DJ
2412else
2413 echo "$as_me: failed program was:" >&5
2414sed 's/^/| /' conftest.$ac_ext >&5
2415
13b2be9c 2416fi
ab509236
L
2417rm -f conftest.err conftest.$ac_objext \
2418 conftest$ac_exeext conftest.$ac_ext
2419if test "$ac_cv_search_strerror" = no; then
2420 for ac_lib in cposix; do
2421 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
2422 cat >conftest.$ac_ext <<_ACEOF
2423/* confdefs.h. */
2424_ACEOF
2425cat confdefs.h >>conftest.$ac_ext
2426cat >>conftest.$ac_ext <<_ACEOF
2427/* end confdefs.h. */
2428
2429/* Override any gcc2 internal prototype to avoid an error. */
2430#ifdef __cplusplus
2431extern "C"
2432#endif
2433/* We use char because int might match the return type of a gcc2
2434 builtin and then its argument prototype would still apply. */
2435char strerror ();
2436int
2437main ()
2438{
2439strerror ();
2440 ;
2441 return 0;
2442}
2443_ACEOF
2444rm -f conftest.$ac_objext conftest$ac_exeext
2445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2446 (eval $ac_link) 2>conftest.er1
2447 ac_status=$?
2448 grep -v '^ *+' conftest.er1 >conftest.err
2449 rm -f conftest.er1
2450 cat conftest.err >&5
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); } &&
2453 { ac_try='test -z "$ac_c_werror_flag"
2454 || test ! -s conftest.err'
2455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2456 (eval $ac_try) 2>&5
2457 ac_status=$?
2458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2459 (exit $ac_status); }; } &&
2460 { ac_try='test -s conftest$ac_exeext'
2461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2462 (eval $ac_try) 2>&5
2463 ac_status=$?
2464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2465 (exit $ac_status); }; }; then
2466 ac_cv_search_strerror="-l$ac_lib"
2467break
2468else
2469 echo "$as_me: failed program was:" >&5
2470sed 's/^/| /' conftest.$ac_ext >&5
2471
13b2be9c 2472fi
ab509236
L
2473rm -f conftest.err conftest.$ac_objext \
2474 conftest$ac_exeext conftest.$ac_ext
2475 done
13b2be9c 2476fi
ab509236
L
2477LIBS=$ac_func_search_save_LIBS
2478fi
2479echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2480echo "${ECHO_T}$ac_cv_search_strerror" >&6
2481if test "$ac_cv_search_strerror" != no; then
2482 test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
13b2be9c 2483
ab509236 2484fi
13b2be9c
DJ
2485
2486
2487BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
ab509236 2488am__api_version="1.8"
13b2be9c
DJ
2489# Find a good install program. We prefer a C program (faster),
2490# so one script is as good as another. But avoid the broken or
2491# incompatible versions:
2492# SysV /etc/install, /usr/sbin/install
2493# SunOS /usr/etc/install
2494# IRIX /sbin/install
2495# AIX /bin/install
2496# AmigaOS /C/install, which installs bootblocks on floppy discs
2497# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2498# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2499# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
ab509236 2500# OS/2's system install, which has a completely different semantic
13b2be9c
DJ
2501# ./install, which can be erroneously created by make from ./install.sh.
2502echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2503echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2504if test -z "$INSTALL"; then
2505if test "${ac_cv_path_install+set}" = set; then
2506 echo $ECHO_N "(cached) $ECHO_C" >&6
2507else
2508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2509for as_dir in $PATH
2510do
2511 IFS=$as_save_IFS
2512 test -z "$as_dir" && as_dir=.
2513 # Account for people who put trailing slashes in PATH elements.
2514case $as_dir/ in
2515 ./ | .// | /cC/* | \
2516 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
ab509236 2517 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
13b2be9c
DJ
2518 /usr/ucb/* ) ;;
2519 *)
2520 # OSF1 and SCO ODT 3.0 have their own names for install.
2521 # Don't use installbsd from OSF since it installs stuff as root
2522 # by default.
2523 for ac_prog in ginstall scoinst install; do
2524 for ac_exec_ext in '' $ac_executable_extensions; do
ab509236
L
2525 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2526 if test $ac_prog = install &&
2527 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2528 # AIX install. It has an incompatible calling convention.
2529 :
2530 elif test $ac_prog = install &&
2531 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2532 # program-specific install script used by HP pwplus--don't use.
2533 :
2534 else
2535 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2536 break 3
2537 fi
2538 fi
13b2be9c
DJ
2539 done
2540 done
2541 ;;
2542esac
2543done
2544
252b5132
RH
2545
2546fi
2547 if test "${ac_cv_path_install+set}" = set; then
13b2be9c 2548 INSTALL=$ac_cv_path_install
252b5132
RH
2549 else
2550 # As a last resort, use the slow shell script. We don't cache a
2551 # path for INSTALL within a source directory, because that will
2552 # break other packages using the cache if that directory is
2553 # removed, or if the path is relative.
13b2be9c 2554 INSTALL=$ac_install_sh
252b5132
RH
2555 fi
2556fi
13b2be9c
DJ
2557echo "$as_me:$LINENO: result: $INSTALL" >&5
2558echo "${ECHO_T}$INSTALL" >&6
252b5132
RH
2559
2560# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2561# It thinks the first close brace ends the variable substitution.
2562test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2563
13b2be9c 2564test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
252b5132
RH
2565
2566test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2567
13b2be9c
DJ
2568echo "$as_me:$LINENO: checking whether build environment is sane" >&5
2569echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
252b5132
RH
2570# Just in case
2571sleep 1
13b2be9c 2572echo timestamp > conftest.file
252b5132
RH
2573# Do `set' in a subshell so we don't clobber the current shell's
2574# arguments. Must try -L first in case configure is actually a
2575# symlink; some systems play weird games with the mod time of symlinks
2576# (eg FreeBSD returns the mod time of the symlink's containing
2577# directory).
2578if (
13b2be9c 2579 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
252b5132
RH
2580 if test "$*" = "X"; then
2581 # -L didn't work.
13b2be9c 2582 set X `ls -t $srcdir/configure conftest.file`
252b5132 2583 fi
13b2be9c
DJ
2584 rm -f conftest.file
2585 if test "$*" != "X $srcdir/configure conftest.file" \
2586 && test "$*" != "X conftest.file $srcdir/configure"; then
252b5132
RH
2587
2588 # If neither matched, then we have a broken ls. This can happen
2589 # if, for instance, CONFIG_SHELL is bash and it inherits a
2590 # broken ls alias from the environment. This has actually
2591 # happened. Such a system could not be considered "sane".
13b2be9c
DJ
2592 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
2593alias in your environment" >&5
2594echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
2595alias in your environment" >&2;}
2596 { (exit 1); exit 1; }; }
252b5132
RH
2597 fi
2598
13b2be9c
DJ
2599 test "$2" = conftest.file
2600 )
2601then
2602 # Ok.
2603 :
2604else
2605 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2606Check your system clock" >&5
2607echo "$as_me: error: newly created file is older than distributed files!
2608Check your system clock" >&2;}
2609 { (exit 1); exit 1; }; }
2610fi
2611echo "$as_me:$LINENO: result: yes" >&5
2612echo "${ECHO_T}yes" >&6
2613test "$program_prefix" != NONE &&
2614 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2615# Use a double $ so make ignores it.
2616test "$program_suffix" != NONE &&
2617 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2618# Double any \ or $. echo might interpret backslashes.
2619# By default was `s,x,x', remove it if useless.
2620cat <<\_ACEOF >conftest.sed
2621s/[\\$]/&&/g;s/;s,x,x,$//
2622_ACEOF
2623program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2624rm conftest.sed
2625
13b2be9c
DJ
2626# expand $ac_aux_dir to an absolute path
2627am_aux_dir=`cd $ac_aux_dir && pwd`
2628
2629test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2630# Use eval to expand $SHELL
2631if eval "$MISSING --run true"; then
2632 am_missing_run="$MISSING --run "
2633else
2634 am_missing_run=
2635 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
2636echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2637fi
2638
4b363073 2639if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
ab509236
L
2640 # Keeping the `.' argument allows $(mkdir_p) to be used without
2641 # argument. Indeed, we sometimes output rules like
2642 # $(mkdir_p) $(somedir)
2643 # where $(somedir) is conditionally defined.
2644 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
2645 # expensive solution, as it forces Make to start a sub-shell.)
2646 mkdir_p='mkdir -p -- .'
2647else
2648 # On NextStep and OpenStep, the `mkdir' command does not
2649 # recognize any option. It will interpret all options as
2650 # directories to create, and then abort because `.' already
2651 # exists.
4b363073 2652 for d in ./-p ./--version;
ab509236
L
2653 do
2654 test -d $d && rmdir $d
2655 done
2656 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
2657 if test -f "$ac_aux_dir/mkinstalldirs"; then
2658 mkdir_p='$(mkinstalldirs)'
2659 else
2660 mkdir_p='$(install_sh) -d'
2661 fi
2662fi
2663
13b2be9c
DJ
2664for ac_prog in gawk mawk nawk awk
2665do
2666 # Extract the first word of "$ac_prog", so it can be a program name with args.
2667set dummy $ac_prog; ac_word=$2
2668echo "$as_me:$LINENO: checking for $ac_word" >&5
2669echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2670if test "${ac_cv_prog_AWK+set}" = set; then
2671 echo $ECHO_N "(cached) $ECHO_C" >&6
2672else
2673 if test -n "$AWK"; then
2674 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2675else
2676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2677for as_dir in $PATH
2678do
2679 IFS=$as_save_IFS
2680 test -z "$as_dir" && as_dir=.
2681 for ac_exec_ext in '' $ac_executable_extensions; do
2682 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2683 ac_cv_prog_AWK="$ac_prog"
2684 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2685 break 2
2686 fi
2687done
2688done
2689
2690fi
2691fi
2692AWK=$ac_cv_prog_AWK
2693if test -n "$AWK"; then
2694 echo "$as_me:$LINENO: result: $AWK" >&5
2695echo "${ECHO_T}$AWK" >&6
2696else
2697 echo "$as_me:$LINENO: result: no" >&5
2698echo "${ECHO_T}no" >&6
2699fi
2700
2701 test -n "$AWK" && break
2702done
2703
2704echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2705echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
ab509236 2706set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
13b2be9c
DJ
2707if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2708 echo $ECHO_N "(cached) $ECHO_C" >&6
2709else
2710 cat >conftest.make <<\_ACEOF
2711all:
2712 @echo 'ac_maketemp="$(MAKE)"'
2713_ACEOF
2714# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2715eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2716if test -n "$ac_maketemp"; then
2717 eval ac_cv_prog_make_${ac_make}_set=yes
2718else
2719 eval ac_cv_prog_make_${ac_make}_set=no
2720fi
2721rm -f conftest.make
2722fi
2723if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2724 echo "$as_me:$LINENO: result: yes" >&5
2725echo "${ECHO_T}yes" >&6
2726 SET_MAKE=
2727else
2728 echo "$as_me:$LINENO: result: no" >&5
2729echo "${ECHO_T}no" >&6
2730 SET_MAKE="MAKE=${MAKE-make}"
2731fi
2732
2733rm -rf .tst 2>/dev/null
2734mkdir .tst 2>/dev/null
2735if test -d .tst; then
2736 am__leading_dot=.
2737else
2738 am__leading_dot=_
2739fi
2740rmdir .tst 2>/dev/null
2741
2742DEPDIR="${am__leading_dot}deps"
2743
2744 ac_config_commands="$ac_config_commands depfiles"
2745
2746
2747am_make=${MAKE-make}
2748cat > confinc << 'END'
2749am__doit:
2750 @echo done
2751.PHONY: am__doit
2752END
2753# If we don't find an include directive, just comment out the code.
2754echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
2755echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
2756am__include="#"
2757am__quote=
2758_am_result=none
2759# First try GNU make style include.
2760echo "include confinc" > confmf
2761# We grep out `Entering directory' and `Leaving directory'
2762# messages which can occur if `w' ends up in MAKEFLAGS.
2763# In particular we don't look at `^make:' because GNU make might
2764# be invoked under some other name (usually "gmake"), in which
2765# case it prints its new name instead of `make'.
2766if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2767 am__include=include
2768 am__quote=
2769 _am_result=GNU
2770fi
2771# Now try BSD make style include.
2772if test "$am__include" = "#"; then
2773 echo '.include "confinc"' > confmf
2774 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2775 am__include=.include
2776 am__quote="\""
2777 _am_result=BSD
2778 fi
2779fi
2780
2781
2782echo "$as_me:$LINENO: result: $_am_result" >&5
2783echo "${ECHO_T}$_am_result" >&6
2784rm -f confinc confmf
2785
2786# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
2787if test "${enable_dependency_tracking+set}" = set; then
2788 enableval="$enable_dependency_tracking"
2789
2790fi;
2791if test "x$enable_dependency_tracking" != xno; then
2792 am_depcomp="$ac_aux_dir/depcomp"
2793 AMDEPBACKSLASH='\'
2794fi
2795
2796
2797if test "x$enable_dependency_tracking" != xno; then
2798 AMDEP_TRUE=
2799 AMDEP_FALSE='#'
2800else
2801 AMDEP_TRUE='#'
2802 AMDEP_FALSE=
2803fi
2804
2805
2806
ab509236 2807# test to see if srcdir already configured
13b2be9c
DJ
2808if test "`cd $srcdir && pwd`" != "`pwd`" &&
2809 test -f $srcdir/config.status; then
2810 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2811echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2812 { (exit 1); exit 1; }; }
2813fi
2814
2815# test whether we have cygpath
2816if test -z "$CYGPATH_W"; then
2817 if (cygpath --version) >/dev/null 2>/dev/null; then
2818 CYGPATH_W='cygpath -w'
2819 else
2820 CYGPATH_W=echo
2821 fi
2822fi
2823
2824
2825# Define the identity of the package.
2826 PACKAGE=gas
2827 VERSION=${BFD_VERSION}
2828
2829
2830cat >>confdefs.h <<_ACEOF
2831#define PACKAGE "$PACKAGE"
2832_ACEOF
2833
2834
2835cat >>confdefs.h <<_ACEOF
2836#define VERSION "$VERSION"
2837_ACEOF
2838
2839# Some tools Automake needs.
2840
2841ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2842
2843
2844AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2845
2846
2847AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2848
2849
2850AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2851
2852
2853MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2854
2855
2856AMTAR=${AMTAR-"${am_missing_run}tar"}
2857
2858install_sh=${install_sh-"$am_aux_dir/install-sh"}
2859
2860# Installed binaries are usually stripped using `strip' when the user
2861# run `make install-strip'. However `strip' might not be the right
2862# tool to use in cross-compilation environments, therefore Automake
2863# will honor the `STRIP' environment variable to overrule this program.
2864if test "$cross_compiling" != no; then
2865 if test -n "$ac_tool_prefix"; then
2866 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2867set dummy ${ac_tool_prefix}strip; ac_word=$2
2868echo "$as_me:$LINENO: checking for $ac_word" >&5
2869echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2870if test "${ac_cv_prog_STRIP+set}" = set; then
2871 echo $ECHO_N "(cached) $ECHO_C" >&6
2872else
2873 if test -n "$STRIP"; then
2874 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
252b5132 2875else
13b2be9c
DJ
2876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2877for as_dir in $PATH
2878do
2879 IFS=$as_save_IFS
2880 test -z "$as_dir" && as_dir=.
2881 for ac_exec_ext in '' $ac_executable_extensions; do
2882 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2883 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2884 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2885 break 2
2886 fi
2887done
2888done
2889
252b5132 2890fi
13b2be9c
DJ
2891fi
2892STRIP=$ac_cv_prog_STRIP
2893if test -n "$STRIP"; then
2894 echo "$as_me:$LINENO: result: $STRIP" >&5
2895echo "${ECHO_T}$STRIP" >&6
c8615825 2896else
13b2be9c
DJ
2897 echo "$as_me:$LINENO: result: no" >&5
2898echo "${ECHO_T}no" >&6
c8615825 2899fi
c8615825 2900
13b2be9c
DJ
2901fi
2902if test -z "$ac_cv_prog_STRIP"; then
2903 ac_ct_STRIP=$STRIP
2904 # Extract the first word of "strip", so it can be a program name with args.
2905set dummy strip; ac_word=$2
2906echo "$as_me:$LINENO: checking for $ac_word" >&5
2907echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2908if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2909 echo $ECHO_N "(cached) $ECHO_C" >&6
c8615825 2910else
13b2be9c
DJ
2911 if test -n "$ac_ct_STRIP"; then
2912 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
252b5132 2913else
13b2be9c
DJ
2914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2915for as_dir in $PATH
2916do
2917 IFS=$as_save_IFS
2918 test -z "$as_dir" && as_dir=.
2919 for ac_exec_ext in '' $ac_executable_extensions; do
2920 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2921 ac_cv_prog_ac_ct_STRIP="strip"
2922 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2923 break 2
2924 fi
2925done
2926done
2927
2928 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
252b5132 2929fi
252b5132 2930fi
13b2be9c
DJ
2931ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2932if test -n "$ac_ct_STRIP"; then
2933 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2934echo "${ECHO_T}$ac_ct_STRIP" >&6
252b5132 2935else
13b2be9c
DJ
2936 echo "$as_me:$LINENO: result: no" >&5
2937echo "${ECHO_T}no" >&6
252b5132
RH
2938fi
2939
13b2be9c
DJ
2940 STRIP=$ac_ct_STRIP
2941else
2942 STRIP="$ac_cv_prog_STRIP"
2943fi
d6d788bd 2944
252b5132 2945fi
13b2be9c 2946INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
252b5132 2947
13b2be9c
DJ
2948# We need awk for the "check" target. The system "awk" is bad on
2949# some platforms.
252b5132 2950
d6d788bd 2951
13b2be9c 2952depcc="$CC" am_compiler_list=
d6d788bd 2953
13b2be9c
DJ
2954echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
2955echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
2956if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
2957 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 2958else
13b2be9c
DJ
2959 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2960 # We make a subdir and do the tests there. Otherwise we can end up
2961 # making bogus files that we don't know about and never remove. For
2962 # instance it was reported that on HP-UX the gcc test will end up
2963 # making a dummy file named `D' -- because `-MD' means `put the output
2964 # in D'.
2965 mkdir conftest.dir
2966 # Copy depcomp to subdir because otherwise we won't find it if we're
2967 # using a relative directory.
2968 cp "$am_depcomp" conftest.dir
2969 cd conftest.dir
2970 # We will build objects and dependencies in a subdirectory because
2971 # it helps to detect inapplicable dependency modes. For instance
2972 # both Tru64's cc and ICC support -MD to output dependencies as a
2973 # side effect of compilation, but ICC will put the dependencies in
2974 # the current directory while Tru64 will put them in the object
2975 # directory.
2976 mkdir sub
252b5132 2977
13b2be9c
DJ
2978 am_cv_CC_dependencies_compiler_type=none
2979 if test "$am_compiler_list" = ""; then
2980 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
2981 fi
2982 for depmode in $am_compiler_list; do
2983 # Setup a source with many dependencies, because some compilers
2984 # like to wrap large dependency lists on column 80 (with \), and
2985 # we should not choose a depcomp mode which is confused by this.
2986 #
2987 # We need to recreate these files for each test, as the compiler may
2988 # overwrite some of them when testing with obscure command lines.
2989 # This happens at least with the AIX C compiler.
2990 : > sub/conftest.c
2991 for i in 1 2 3 4 5 6; do
2992 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4b363073
NC
2993 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2994 # Solaris 8's {/usr,}/bin/sh.
2995 touch sub/conftst$i.h
13b2be9c
DJ
2996 done
2997 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2998
2999 case $depmode in
3000 nosideeffect)
3001 # after this tag, mechanisms are not by side-effect, so they'll
3002 # only be used when explicitly requested
3003 if test "x$enable_dependency_tracking" = xyes; then
3004 continue
3005 else
3006 break
3007 fi
3008 ;;
3009 none) break ;;
3010 esac
3011 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3012 # mode. It turns out that the SunPro C++ compiler does not properly
3013 # handle `-M -o', and we need to detect this.
3014 if depmode=$depmode \
3015 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3016 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3017 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
3018 >/dev/null 2>conftest.err &&
3019 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3020 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
3021 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3022 # icc doesn't choke on unknown options, it will just issue warnings
4b363073
NC
3023 # or remarks (even with -Werror). So we grep stderr for any message
3024 # that says an option was ignored or not supported.
3025 # When given -MP, icc 7.0 and 7.1 complain thusly:
3026 # icc: Command line warning: ignoring option '-M'; no argument required
3027 # The diagnosis changed in icc 8.0:
3028 # icc: Command line remark: option '-MP' not supported
3029 if (grep 'ignoring option' conftest.err ||
3030 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13b2be9c
DJ
3031 am_cv_CC_dependencies_compiler_type=$depmode
3032 break
3033 fi
3034 fi
3035 done
252b5132 3036
13b2be9c
DJ
3037 cd ..
3038 rm -rf conftest.dir
252b5132 3039else
13b2be9c 3040 am_cv_CC_dependencies_compiler_type=none
252b5132
RH
3041fi
3042
252b5132 3043fi
13b2be9c
DJ
3044echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3045echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
3046CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
252b5132 3047
13b2be9c
DJ
3048
3049
3050if
3051 test "x$enable_dependency_tracking" != xno \
3052 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3053 am__fastdepCC_TRUE=
3054 am__fastdepCC_FALSE='#'
252b5132 3055else
13b2be9c
DJ
3056 am__fastdepCC_TRUE='#'
3057 am__fastdepCC_FALSE=
252b5132
RH
3058fi
3059
d6d788bd
L
3060
3061
13b2be9c 3062
252b5132
RH
3063# Check whether --enable-shared or --disable-shared was given.
3064if test "${enable_shared+set}" = set; then
3065 enableval="$enable_shared"
3066 p=${PACKAGE-default}
f9c19112 3067case $enableval in
252b5132
RH
3068yes) enable_shared=yes ;;
3069no) enable_shared=no ;;
3070*)
3071 enable_shared=no
3072 # Look at the argument we got. We use all the common list separators.
3073 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3074 for pkg in $enableval; do
3075 if test "X$pkg" = "X$p"; then
3076 enable_shared=yes
3077 fi
3078 done
3079 IFS="$ac_save_ifs"
3080 ;;
3081esac
3082else
3083 enable_shared=yes
13b2be9c 3084fi;
252b5132
RH
3085# Check whether --enable-static or --disable-static was given.
3086if test "${enable_static+set}" = set; then
3087 enableval="$enable_static"
3088 p=${PACKAGE-default}
f9c19112 3089case $enableval in
252b5132
RH
3090yes) enable_static=yes ;;
3091no) enable_static=no ;;
3092*)
3093 enable_static=no
3094 # Look at the argument we got. We use all the common list separators.
3095 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3096 for pkg in $enableval; do
3097 if test "X$pkg" = "X$p"; then
3098 enable_static=yes
3099 fi
3100 done
3101 IFS="$ac_save_ifs"
3102 ;;
3103esac
3104else
3105 enable_static=yes
13b2be9c 3106fi;
bedf545c
ILT
3107# Check whether --enable-fast-install or --disable-fast-install was given.
3108if test "${enable_fast_install+set}" = set; then
3109 enableval="$enable_fast_install"
3110 p=${PACKAGE-default}
f9c19112 3111case $enableval in
bedf545c
ILT
3112yes) enable_fast_install=yes ;;
3113no) enable_fast_install=no ;;
3114*)
3115 enable_fast_install=no
3116 # Look at the argument we got. We use all the common list separators.
3117 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3118 for pkg in $enableval; do
3119 if test "X$pkg" = "X$p"; then
3120 enable_fast_install=yes
3121 fi
3122 done
3123 IFS="$ac_save_ifs"
3124 ;;
3125esac
3126else
3127 enable_fast_install=yes
13b2be9c 3128fi;
87ccc1b0 3129
6840198f
NC
3130# Check whether --with-gnu-ld or --without-gnu-ld was given.
3131if test "${with_gnu_ld+set}" = set; then
3132 withval="$with_gnu_ld"
3133 test "$withval" = no || with_gnu_ld=yes
27b7e12d 3134else
6840198f 3135 with_gnu_ld=no
13b2be9c 3136fi;
6840198f
NC
3137ac_prog=ld
3138if test "$GCC" = yes; then
3139 # Check if gcc -print-prog-name=ld gives a path.
13b2be9c
DJ
3140 echo "$as_me:$LINENO: checking for ld used by GCC" >&5
3141echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
6840198f
NC
3142 case $host in
3143 *-*-mingw*)
3144 # gcc leaves a trailing carriage return which upsets mingw
3145 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3146 *)
3147 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3148 esac
3149 case $ac_prog in
3150 # Accept absolute paths.
3151 [\\/]* | [A-Za-z]:[\\/]*)
3152 re_direlt='/[^/][^/]*/\.\./'
3153 # Canonicalize the path of ld
3154 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3155 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3156 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3157 done
3158 test -z "$LD" && LD="$ac_prog"
3159 ;;
3160 "")
3161 # If it fails, then pretend we aren't using GCC.
3162 ac_prog=ld
3163 ;;
3164 *)
3165 # If it is relative, then search for the first ld in PATH.
3166 with_gnu_ld=unknown
3167 ;;
3168 esac
3169elif test "$with_gnu_ld" = yes; then
13b2be9c
DJ
3170 echo "$as_me:$LINENO: checking for GNU ld" >&5
3171echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
27b7e12d 3172else
13b2be9c
DJ
3173 echo "$as_me:$LINENO: checking for non-GNU ld" >&5
3174echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
27b7e12d 3175fi
13b2be9c
DJ
3176if test "${lt_cv_path_LD+set}" = set; then
3177 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
3178else
3179 if test -z "$LD"; then
a74801ba 3180 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
3181 for ac_dir in $PATH; do
3182 test -z "$ac_dir" && ac_dir=.
a74801ba 3183 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
f9c19112 3184 lt_cv_path_LD="$ac_dir/$ac_prog"
252b5132
RH
3185 # Check to see if the program is GNU ld. I'd rather use --version,
3186 # but apparently some GNU ld's only accept -v.
3187 # Break only if it was the GNU/non-GNU ld that we prefer.
f9c19112 3188 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
252b5132
RH
3189 test "$with_gnu_ld" != no && break
3190 else
bedf545c 3191 test "$with_gnu_ld" != yes && break
252b5132
RH
3192 fi
3193 fi
3194 done
3195 IFS="$ac_save_ifs"
3196else
f9c19112 3197 lt_cv_path_LD="$LD" # Let the user override the test with a path.
252b5132
RH
3198fi
3199fi
3200
f9c19112 3201LD="$lt_cv_path_LD"
252b5132 3202if test -n "$LD"; then
13b2be9c
DJ
3203 echo "$as_me:$LINENO: result: $LD" >&5
3204echo "${ECHO_T}$LD" >&6
252b5132 3205else
13b2be9c
DJ
3206 echo "$as_me:$LINENO: result: no" >&5
3207echo "${ECHO_T}no" >&6
252b5132 3208fi
13b2be9c
DJ
3209test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
3210echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
3211 { (exit 1); exit 1; }; }
3212echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
3213echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
3214if test "${lt_cv_prog_gnu_ld+set}" = set; then
3215 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
3216else
3217 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3218if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
f9c19112 3219 lt_cv_prog_gnu_ld=yes
252b5132 3220else
f9c19112 3221 lt_cv_prog_gnu_ld=no
252b5132
RH
3222fi
3223fi
13b2be9c
DJ
3224echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
3225echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
f9c19112 3226with_gnu_ld=$lt_cv_prog_gnu_ld
ac48eca1 3227
d6d788bd 3228
13b2be9c
DJ
3229echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
3230echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
3231if test "${lt_cv_ld_reload_flag+set}" = set; then
3232 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1
AO
3233else
3234 lt_cv_ld_reload_flag='-r'
3235fi
13b2be9c
DJ
3236echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
3237echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
ac48eca1
AO
3238reload_flag=$lt_cv_ld_reload_flag
3239test -n "$reload_flag" && reload_flag=" $reload_flag"
252b5132 3240
13b2be9c
DJ
3241echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
3242echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
3243if test "${lt_cv_path_NM+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
3245else
3246 if test -n "$NM"; then
3247 # Let the user override the test.
f9c19112 3248 lt_cv_path_NM="$NM"
252b5132 3249else
a74801ba 3250 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
bedf545c 3251 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
252b5132 3252 test -z "$ac_dir" && ac_dir=.
ac48eca1
AO
3253 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3254 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
252b5132
RH
3255 # Check to see if the nm accepts a BSD-compat flag.
3256 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3257 # nm: unknown option "B" ignored
58cccadb
AO
3258 # Tru64's nm complains that /dev/null is an invalid object file
3259 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
f9c19112 3260 lt_cv_path_NM="$tmp_nm -B"
bedf545c 3261 break
ac48eca1 3262 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
f9c19112 3263 lt_cv_path_NM="$tmp_nm -p"
bedf545c 3264 break
252b5132 3265 else
f9c19112 3266 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
bedf545c 3267 continue # so that we can try to find one that supports BSD flags
252b5132 3268 fi
252b5132
RH
3269 fi
3270 done
3271 IFS="$ac_save_ifs"
f9c19112 3272 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
252b5132
RH
3273fi
3274fi
3275
f9c19112 3276NM="$lt_cv_path_NM"
13b2be9c
DJ
3277echo "$as_me:$LINENO: result: $NM" >&5
3278echo "${ECHO_T}$NM" >&6
252b5132 3279
13b2be9c
DJ
3280echo "$as_me:$LINENO: checking whether ln -s works" >&5
3281echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3282LN_S=$as_ln_s
3283if test "$LN_S" = "ln -s"; then
3284 echo "$as_me:$LINENO: result: yes" >&5
3285echo "${ECHO_T}yes" >&6
252b5132 3286else
13b2be9c
DJ
3287 echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3288echo "${ECHO_T}no, using $LN_S" >&6
252b5132
RH
3289fi
3290
13b2be9c
DJ
3291echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
3292echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
3293if test "${lt_cv_deplibs_check_method+set}" = set; then
3294 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1 3295else
d64552c5 3296 lt_cv_file_magic_cmd='$MAGIC_CMD'
ac48eca1
AO
3297lt_cv_file_magic_test_file=
3298lt_cv_deplibs_check_method='unknown'
3299# Need to set the preceding variable on all platforms that support
3300# interlibrary dependencies.
3301# 'none' -- dependencies not supported.
3302# `unknown' -- same as none, but documents that we really don't know.
3303# 'pass_all' -- all dependencies passed with no checks.
3304# 'test_compile' -- check by making test program.
3305# 'file_magic [regex]' -- check by looking for files in library path
3306# which responds to the $file_magic_cmd with a given egrep regex.
3307# If you have `file' or equivalent on your system and you're not sure
3308# whether `pass_all' will *always* work, you probably want this one.
3309
f9c19112
HPN
3310case $host_os in
3311aix*)
ac48eca1
AO
3312 lt_cv_deplibs_check_method=pass_all
3313 ;;
3314
3315beos*)
3316 lt_cv_deplibs_check_method=pass_all
3317 ;;
3318
3319bsdi4*)
f9c19112
HPN
3320 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3321 lt_cv_file_magic_cmd='/usr/bin/file -L'
ac48eca1
AO
3322 lt_cv_file_magic_test_file=/shlib/libc.so
3323 ;;
3324
d64552c5 3325cygwin* | mingw* |pw32*)
ac48eca1 3326 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
d64552c5 3327 lt_cv_file_magic_cmd='$OBJDUMP -f'
ac48eca1
AO
3328 ;;
3329
f9c19112
HPN
3330darwin* | rhapsody*)
3331 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
6840198f
NC
3332 lt_cv_file_magic_cmd='/usr/bin/file -L'
3333 case "$host_os" in
3334 rhapsody* | darwin1.012)
3335 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
3336 ;;
3337 *) # Darwin 1.3 on
3338 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3339 ;;
3340 esac
f9c19112
HPN
3341 ;;
3342
4b363073 3343freebsd* )
ac48eca1 3344 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
f9c19112 3345 case $host_cpu in
ac48eca1 3346 i*86 )
58cccadb
AO
3347 # Not sure whether the presence of OpenBSD here was a mistake.
3348 # Let's accept both of them until this is cleared up.
f9c19112
HPN
3349 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3350 lt_cv_file_magic_cmd=/usr/bin/file
ac48eca1
AO
3351 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3352 ;;
3353 esac
3354 else
3355 lt_cv_deplibs_check_method=pass_all
3356 fi
3357 ;;
3358
3359gnu*)
3360 lt_cv_deplibs_check_method=pass_all
3361 ;;
3362
f9c19112 3363hpux10.20*|hpux11*)
4867be41
DJ
3364 case $host_cpu in
3365 hppa*)
3366 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3367 lt_cv_file_magic_cmd=/usr/bin/file
3368 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3369 ;;
3370 ia64*)
3371 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
3372 lt_cv_file_magic_cmd=/usr/bin/file
3373 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3374 ;;
3375 esac
ac48eca1
AO
3376 ;;
3377
3378irix5* | irix6*)
f9c19112 3379 case $host_os in
ac48eca1
AO
3380 irix5*)
3381 # this will be overridden with pass_all, but let us keep it just in case
3382 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3383 ;;
3384 *)
f9c19112 3385 case $LD in
ac48eca1
AO
3386 *-32|*"-32 ") libmagic=32-bit;;
3387 *-n32|*"-n32 ") libmagic=N32;;
3388 *-64|*"-64 ") libmagic=64-bit;;
3389 *) libmagic=never-match;;
3390 esac
3391 # this will be overridden with pass_all, but let us keep it just in case
f9c19112
HPN
3392 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3393 ;;
ac48eca1
AO
3394 esac
3395 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3396 lt_cv_deplibs_check_method=pass_all
3397 ;;
3398
3399# This must be Linux ELF.
58cccadb 3400linux-gnu*)
f9c19112 3401 case $host_cpu in
dbeba5e5 3402 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
ac48eca1
AO
3403 lt_cv_deplibs_check_method=pass_all ;;
3404 *)
3405 # glibc up to 2.1.1 does not perform some relocations on ARM
f9c19112
HPN
3406 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3407 esac
ac48eca1
AO
3408 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3409 ;;
3410
4b363073 3411netbsd*)
f9c19112 3412 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6840198f 3413 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
ac48eca1 3414 else
6840198f 3415 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
ac48eca1 3416 fi
f9c19112
HPN
3417 ;;
3418
3419newsos6)
3420 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3421 lt_cv_file_magic_cmd=/usr/bin/file
3422 lt_cv_file_magic_test_file=/usr/lib/libnls.so
ac48eca1
AO
3423 ;;
3424
3425osf3* | osf4* | osf5*)
3426 # this will be overridden with pass_all, but let us keep it just in case
3427 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3428 lt_cv_file_magic_test_file=/shlib/libc.so
3429 lt_cv_deplibs_check_method=pass_all
3430 ;;
3431
3432sco3.2v5*)
3433 lt_cv_deplibs_check_method=pass_all
3434 ;;
3435
3436solaris*)
3437 lt_cv_deplibs_check_method=pass_all
3438 lt_cv_file_magic_test_file=/lib/libc.so
3439 ;;
3440
6be7c12c
AO
3441sysv5uw[78]* | sysv4*uw2*)
3442 lt_cv_deplibs_check_method=pass_all
3443 ;;
3444
ac48eca1 3445sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
f9c19112 3446 case $host_vendor in
ac48eca1
AO
3447 ncr)
3448 lt_cv_deplibs_check_method=pass_all
3449 ;;
3450 motorola)
f9c19112
HPN
3451 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
3452 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
ac48eca1
AO
3453 ;;
3454 esac
3455 ;;
3456esac
3457
3458fi
13b2be9c
DJ
3459echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
3460echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
ac48eca1
AO
3461file_magic_cmd=$lt_cv_file_magic_cmd
3462deplibs_check_method=$lt_cv_deplibs_check_method
3463
c8615825 3464
c8615825 3465
c8615825 3466
ac48eca1
AO
3467# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
3468
3469# Only perform the check for file, if the check method requires it
f9c19112 3470case $deplibs_check_method in
ac48eca1 3471file_magic*)
d64552c5 3472 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
13b2be9c
DJ
3473 echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
3474echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
3475if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
3476 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1 3477else
f9c19112 3478 case $MAGIC_CMD in
ac48eca1 3479 /*)
d64552c5 3480 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ac48eca1
AO
3481 ;;
3482 ?:/*)
d64552c5 3483 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
ac48eca1
AO
3484 ;;
3485 *)
d64552c5 3486 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
3487 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3488 ac_dummy="/usr/bin:$PATH"
3489 for ac_dir in $ac_dummy; do
3490 test -z "$ac_dir" && ac_dir=.
3491 if test -f $ac_dir/${ac_tool_prefix}file; then
d64552c5 3492 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
ac48eca1 3493 if test -n "$file_magic_test_file"; then
f9c19112 3494 case $deplibs_check_method in
ac48eca1
AO
3495 "file_magic "*)
3496 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 3497 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
3498 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3499 egrep "$file_magic_regex" > /dev/null; then
3500 :
3501 else
3502 cat <<EOF 1>&2
3503
3504*** Warning: the command libtool uses to detect shared libraries,
3505*** $file_magic_cmd, produces output that libtool cannot recognize.
3506*** The result is that libtool may fail to recognize shared libraries
3507*** as such. This will affect the creation of libtool libraries that
3508*** depend on shared libraries, but programs linked with such libtool
3509*** libraries will work regardless of this problem. Nevertheless, you
3510*** may want to report the problem to your system manager and/or to
3511*** bug-libtool@gnu.org
3512
3513EOF
3514 fi ;;
3515 esac
3516 fi
3517 break
3518 fi
3519 done
3520 IFS="$ac_save_ifs"
d64552c5 3521 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
3522 ;;
3523esac
3524fi
3525
d64552c5
AO
3526MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3527if test -n "$MAGIC_CMD"; then
13b2be9c
DJ
3528 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
3529echo "${ECHO_T}$MAGIC_CMD" >&6
ac48eca1 3530else
13b2be9c
DJ
3531 echo "$as_me:$LINENO: result: no" >&5
3532echo "${ECHO_T}no" >&6
ac48eca1
AO
3533fi
3534
d64552c5 3535if test -z "$lt_cv_path_MAGIC_CMD"; then
ac48eca1 3536 if test -n "$ac_tool_prefix"; then
13b2be9c
DJ
3537 echo "$as_me:$LINENO: checking for file" >&5
3538echo $ECHO_N "checking for file... $ECHO_C" >&6
3539if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
3540 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1 3541else
f9c19112 3542 case $MAGIC_CMD in
ac48eca1 3543 /*)
d64552c5 3544 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ac48eca1
AO
3545 ;;
3546 ?:/*)
d64552c5 3547 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
ac48eca1
AO
3548 ;;
3549 *)
d64552c5 3550 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
3551 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3552 ac_dummy="/usr/bin:$PATH"
3553 for ac_dir in $ac_dummy; do
3554 test -z "$ac_dir" && ac_dir=.
3555 if test -f $ac_dir/file; then
d64552c5 3556 lt_cv_path_MAGIC_CMD="$ac_dir/file"
ac48eca1 3557 if test -n "$file_magic_test_file"; then
f9c19112 3558 case $deplibs_check_method in
ac48eca1
AO
3559 "file_magic "*)
3560 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 3561 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
3562 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3563 egrep "$file_magic_regex" > /dev/null; then
3564 :
3565 else
3566 cat <<EOF 1>&2
3567
3568*** Warning: the command libtool uses to detect shared libraries,
3569*** $file_magic_cmd, produces output that libtool cannot recognize.
3570*** The result is that libtool may fail to recognize shared libraries
3571*** as such. This will affect the creation of libtool libraries that
3572*** depend on shared libraries, but programs linked with such libtool
3573*** libraries will work regardless of this problem. Nevertheless, you
3574*** may want to report the problem to your system manager and/or to
3575*** bug-libtool@gnu.org
3576
3577EOF
3578 fi ;;
3579 esac
3580 fi
3581 break
3582 fi
3583 done
3584 IFS="$ac_save_ifs"
d64552c5 3585 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
3586 ;;
3587esac
3588fi
3589
d64552c5
AO
3590MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3591if test -n "$MAGIC_CMD"; then
13b2be9c
DJ
3592 echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
3593echo "${ECHO_T}$MAGIC_CMD" >&6
ac48eca1 3594else
13b2be9c
DJ
3595 echo "$as_me:$LINENO: result: no" >&5
3596echo "${ECHO_T}no" >&6
ac48eca1
AO
3597fi
3598
3599 else
d64552c5 3600 MAGIC_CMD=:
ac48eca1
AO
3601 fi
3602fi
3603
3604 fi
3605 ;;
3606esac
3607
13b2be9c
DJ
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
ac48eca1 3610set dummy ${ac_tool_prefix}ranlib; ac_word=$2
13b2be9c
DJ
3611echo "$as_me:$LINENO: checking for $ac_word" >&5
3612echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3613if test "${ac_cv_prog_RANLIB+set}" = set; then
3614 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1
AO
3615else
3616 if test -n "$RANLIB"; then
3617 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3618else
13b2be9c
DJ
3619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
3624 for ac_exec_ext in '' $ac_executable_extensions; do
3625 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3626 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3627 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3628 break 2
3629 fi
3630done
3631done
3632
ac48eca1
AO
3633fi
3634fi
13b2be9c 3635RANLIB=$ac_cv_prog_RANLIB
ac48eca1 3636if test -n "$RANLIB"; then
13b2be9c
DJ
3637 echo "$as_me:$LINENO: result: $RANLIB" >&5
3638echo "${ECHO_T}$RANLIB" >&6
ac48eca1 3639else
13b2be9c
DJ
3640 echo "$as_me:$LINENO: result: no" >&5
3641echo "${ECHO_T}no" >&6
ac48eca1
AO
3642fi
3643
13b2be9c 3644fi
ac48eca1 3645if test -z "$ac_cv_prog_RANLIB"; then
13b2be9c 3646 ac_ct_RANLIB=$RANLIB
ac48eca1
AO
3647 # Extract the first word of "ranlib", so it can be a program name with args.
3648set dummy ranlib; ac_word=$2
13b2be9c
DJ
3649echo "$as_me:$LINENO: checking for $ac_word" >&5
3650echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3651if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3652 echo $ECHO_N "(cached) $ECHO_C" >&6
d6d788bd 3653else
13b2be9c
DJ
3654 if test -n "$ac_ct_RANLIB"; then
3655 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
d6d788bd 3656else
13b2be9c
DJ
3657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_exec_ext in '' $ac_executable_extensions; do
3663 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3664 ac_cv_prog_ac_ct_RANLIB="ranlib"
3665 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3666 break 2
3667 fi
3668done
3669done
3670
3671 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ac48eca1
AO
3672fi
3673fi
13b2be9c
DJ
3674ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3675if test -n "$ac_ct_RANLIB"; then
3676 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3677echo "${ECHO_T}$ac_ct_RANLIB" >&6
ac48eca1 3678else
13b2be9c
DJ
3679 echo "$as_me:$LINENO: result: no" >&5
3680echo "${ECHO_T}no" >&6
ac48eca1
AO
3681fi
3682
13b2be9c 3683 RANLIB=$ac_ct_RANLIB
ac48eca1 3684else
13b2be9c 3685 RANLIB="$ac_cv_prog_RANLIB"
ac48eca1
AO
3686fi
3687
13b2be9c
DJ
3688if test -n "$ac_tool_prefix"; then
3689 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
ac48eca1 3690set dummy ${ac_tool_prefix}strip; ac_word=$2
13b2be9c
DJ
3691echo "$as_me:$LINENO: checking for $ac_word" >&5
3692echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3693if test "${ac_cv_prog_STRIP+set}" = set; then
3694 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1
AO
3695else
3696 if test -n "$STRIP"; then
3697 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3698else
13b2be9c
DJ
3699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3700for as_dir in $PATH
3701do
3702 IFS=$as_save_IFS
3703 test -z "$as_dir" && as_dir=.
3704 for ac_exec_ext in '' $ac_executable_extensions; do
3705 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3706 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3707 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3708 break 2
3709 fi
3710done
3711done
3712
ac48eca1
AO
3713fi
3714fi
13b2be9c 3715STRIP=$ac_cv_prog_STRIP
ac48eca1 3716if test -n "$STRIP"; then
13b2be9c
DJ
3717 echo "$as_me:$LINENO: result: $STRIP" >&5
3718echo "${ECHO_T}$STRIP" >&6
ac48eca1 3719else
13b2be9c
DJ
3720 echo "$as_me:$LINENO: result: no" >&5
3721echo "${ECHO_T}no" >&6
ac48eca1
AO
3722fi
3723
13b2be9c 3724fi
ac48eca1 3725if test -z "$ac_cv_prog_STRIP"; then
13b2be9c 3726 ac_ct_STRIP=$STRIP
ac48eca1
AO
3727 # Extract the first word of "strip", so it can be a program name with args.
3728set dummy strip; ac_word=$2
13b2be9c
DJ
3729echo "$as_me:$LINENO: checking for $ac_word" >&5
3730echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3731if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
3732 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1 3733else
13b2be9c
DJ
3734 if test -n "$ac_ct_STRIP"; then
3735 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
ac48eca1 3736else
13b2be9c
DJ
3737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
3742 for ac_exec_ext in '' $ac_executable_extensions; do
3743 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3744 ac_cv_prog_ac_ct_STRIP="strip"
3745 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3746 break 2
3747 fi
3748done
3749done
3750
3751 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
d6d788bd
L
3752fi
3753fi
13b2be9c
DJ
3754ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3755if test -n "$ac_ct_STRIP"; then
3756 echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
3757echo "${ECHO_T}$ac_ct_STRIP" >&6
d6d788bd 3758else
13b2be9c
DJ
3759 echo "$as_me:$LINENO: result: no" >&5
3760echo "${ECHO_T}no" >&6
d6d788bd
L
3761fi
3762
13b2be9c 3763 STRIP=$ac_ct_STRIP
d6d788bd 3764else
13b2be9c 3765 STRIP="$ac_cv_prog_STRIP"
d6d788bd
L
3766fi
3767
252b5132 3768
252b5132 3769# Check for any special flags to pass to ltconfig.
bedf545c 3770libtool_flags="--cache-file=$cache_file"
252b5132
RH
3771test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3772test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
bedf545c 3773test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
f9c19112
HPN
3774test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
3775test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
252b5132 3776
d6d788bd 3777
a74801ba
ILT
3778# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
3779if test "${enable_libtool_lock+set}" = set; then
3780 enableval="$enable_libtool_lock"
a74801ba 3781
13b2be9c 3782fi;
a74801ba
ILT
3783test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
3784test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
3785
13b2be9c 3786
ac48eca1
AO
3787# Check whether --with-pic or --without-pic was given.
3788if test "${with_pic+set}" = set; then
3789 withval="$with_pic"
3790 pic_mode="$withval"
3791else
3792 pic_mode=default
13b2be9c 3793fi;
ac48eca1
AO
3794test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
3795test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
3796
252b5132
RH
3797# Some flags need to be propagated to the compiler or linker for good
3798# libtool support.
f9c19112 3799case $host in
252b5132
RH
3800*-*-irix6*)
3801 # Find out which ABI we are using.
4b363073 3802 echo '#line 3802 "configure"' > conftest.$ac_ext
13b2be9c
DJ
3803 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3804 (eval $ac_compile) 2>&5
3805 ac_status=$?
3806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3807 (exit $ac_status); }; then
e0001a05
NC
3808 if test "$lt_cv_prog_gnu_ld" = yes; then
3809 case `/usr/bin/file conftest.$ac_objext` in
3810 *32-bit*)
3811 LD="${LD-ld} -melf32bsmip"
3812 ;;
3813 *N32*)
3814 LD="${LD-ld} -melf32bmipn32"
3815 ;;
3816 *64-bit*)
3817 LD="${LD-ld} -melf64bmip"
3818 ;;
3819 esac
3820 else
f9c19112 3821 case `/usr/bin/file conftest.$ac_objext` in
252b5132
RH
3822 *32-bit*)
3823 LD="${LD-ld} -32"
3824 ;;
3825 *N32*)
3826 LD="${LD-ld} -n32"
3827 ;;
3828 *64-bit*)
3829 LD="${LD-ld} -64"
3830 ;;
3831 esac
e0001a05 3832 fi
252b5132
RH
3833 fi
3834 rm -rf conftest*
3835 ;;
3836
4867be41
DJ
3837ia64-*-hpux*)
3838 # Find out which ABI we are using.
3839 echo 'int i;' > conftest.$ac_ext
13b2be9c
DJ
3840 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3841 (eval $ac_compile) 2>&5
3842 ac_status=$?
3843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3844 (exit $ac_status); }; then
4867be41
DJ
3845 case "`/usr/bin/file conftest.o`" in
3846 *ELF-32*)
3847 HPUX_IA64_MODE="32"
3848 ;;
3849 *ELF-64*)
3850 HPUX_IA64_MODE="64"
3851 ;;
3852 esac
3853 fi
3854 rm -rf conftest*
3855 ;;
3856
252b5132
RH
3857*-*-sco3.2v5*)
3858 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
bedf545c 3859 SAVE_CFLAGS="$CFLAGS"
252b5132 3860 CFLAGS="$CFLAGS -belf"
13b2be9c
DJ
3861 echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
3862echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
3863if test "${lt_cv_cc_needs_belf+set}" = set; then
3864 echo $ECHO_N "(cached) $ECHO_C" >&6
bedf545c 3865else
13b2be9c
DJ
3866
3867
ac48eca1 3868 ac_ext=c
ac48eca1 3869ac_cpp='$CPP $CPPFLAGS'
13b2be9c
DJ
3870ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3871ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3872ac_compiler_gnu=$ac_cv_c_compiler_gnu
3873
3874 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
3875/* confdefs.h. */
3876_ACEOF
3877cat confdefs.h >>conftest.$ac_ext
3878cat >>conftest.$ac_ext <<_ACEOF
3879/* end confdefs.h. */
bedf545c 3880
13b2be9c
DJ
3881int
3882main ()
3883{
6840198f 3884
13b2be9c
DJ
3885 ;
3886 return 0;
3887}
3888_ACEOF
3889rm -f conftest.$ac_objext conftest$ac_exeext
3890if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 3891 (eval $ac_link) 2>conftest.er1
13b2be9c 3892 ac_status=$?
ab509236
L
3893 grep -v '^ *+' conftest.er1 >conftest.err
3894 rm -f conftest.er1
3895 cat conftest.err >&5
13b2be9c
DJ
3896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3897 (exit $ac_status); } &&
ab509236
L
3898 { ac_try='test -z "$ac_c_werror_flag"
3899 || test ! -s conftest.err'
3900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3901 (eval $ac_try) 2>&5
3902 ac_status=$?
3903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3904 (exit $ac_status); }; } &&
3905 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
3906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3907 (eval $ac_try) 2>&5
3908 ac_status=$?
3909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3910 (exit $ac_status); }; }; then
bedf545c
ILT
3911 lt_cv_cc_needs_belf=yes
3912else
13b2be9c
DJ
3913 echo "$as_me: failed program was:" >&5
3914sed 's/^/| /' conftest.$ac_ext >&5
3915
3916lt_cv_cc_needs_belf=no
bedf545c 3917fi
ab509236
L
3918rm -f conftest.err conftest.$ac_objext \
3919 conftest$ac_exeext conftest.$ac_ext
ac48eca1 3920 ac_ext=c
ac48eca1 3921ac_cpp='$CPP $CPPFLAGS'
13b2be9c
DJ
3922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3924ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac48eca1 3925
bedf545c 3926fi
13b2be9c
DJ
3927echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
3928echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
bedf545c
ILT
3929 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3930 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3931 CFLAGS="$SAVE_CFLAGS"
3932 fi
252b5132
RH
3933 ;;
3934
d6d788bd 3935
252b5132
RH
3936esac
3937
d6d788bd 3938
bedf545c 3939# Save cache, so that ltconfig can load it
13b2be9c 3940cat >confcache <<\_ACEOF
bedf545c
ILT
3941# This file is a shell script that caches the results of configure
3942# tests run on this system so they can be shared between configure
13b2be9c
DJ
3943# scripts and configure runs, see configure's option --config-cache.
3944# It is not useful on other systems. If it contains results you don't
3945# want to keep, you may remove or edit it.
bedf545c 3946#
13b2be9c
DJ
3947# config.status only pays attention to the cache file if you give it
3948# the --recheck option to rerun configure.
bedf545c 3949#
13b2be9c
DJ
3950# `ac_cv_env_foo' variables (set or unset) will be overridden when
3951# loading this file, other *unset* `ac_cv_foo' will be assigned the
3952# following values.
3953
3954_ACEOF
3955
bedf545c 3956# The following way of writing the cache mishandles newlines in values,
9b2b7d69
MM
3957# but we know of no workaround that is simple, portable, and efficient.
3958# So, don't put newlines in cache variables' values.
3959# Ultrix sh set writes to stderr and can't be redirected directly,
3960# and sets the high bit in the cache file unless we assign to the vars.
13b2be9c
DJ
3961{
3962 (set) 2>&1 |
3963 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3964 *ac_space=\ *)
3965 # `set' does not quote correctly, so add quotes (double-quote
3966 # substitution turns \\\\ into \\, and sed turns \\ into \).
3967 sed -n \
ab509236
L
3968 "s/'/'\\\\''/g;
3969 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13b2be9c
DJ
3970 ;;
3971 *)
3972 # `set' quotes correctly as required by POSIX, so do not add quotes.
3973 sed -n \
ab509236 3974 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13b2be9c
DJ
3975 ;;
3976 esac;
3977} |
3978 sed '
3979 t clear
3980 : clear
3981 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
3982 t end
3983 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
3984 : end' >>confcache
3985if diff $cache_file confcache >/dev/null 2>&1; then :; else
bedf545c 3986 if test -w $cache_file; then
13b2be9c
DJ
3987 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
3988 cat confcache >$cache_file
bedf545c
ILT
3989 else
3990 echo "not updating unwritable cache $cache_file"
3991 fi
3992fi
3993rm -f confcache
3994
252b5132 3995# Actually configure libtool. ac_aux_dir is where install-sh is found.
ac48eca1 3996AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
d64552c5 3997MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
ac48eca1
AO
3998LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
3999AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4000objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4001deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
252b5132 4002${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
ac48eca1 4003$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
13b2be9c
DJ
4004|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
4005echo "$as_me: error: libtool configure failed" >&2;}
4006 { (exit 1); exit 1; }; }
252b5132 4007
bedf545c
ILT
4008# Reload cache, that may have been modified by ltconfig
4009if test -r "$cache_file"; then
13b2be9c
DJ
4010 # Some versions of bash will fail to source /dev/null (special
4011 # files actually), so we avoid doing that.
4012 if test -f "$cache_file"; then
4013 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
4014echo "$as_me: loading cache $cache_file" >&6;}
4015 case $cache_file in
4016 [\\/]* | ?:[\\/]* ) . $cache_file;;
4017 *) . ./$cache_file;;
4018 esac
4019 fi
bedf545c 4020else
13b2be9c
DJ
4021 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
4022echo "$as_me: creating cache $cache_file" >&6;}
4023 >$cache_file
bedf545c
ILT
4024fi
4025
d6d788bd 4026
bedf545c 4027# This can be used to rebuild libtool when needed
ac48eca1 4028LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
bedf545c
ILT
4029
4030# Always use our own libtool.
4031LIBTOOL='$(SHELL) $(top_builddir)/libtool'
4032
252b5132
RH
4033# Redirect the config.log output again, so that the ltconfig log is not
4034# clobbered by the next message.
4035exec 5>>./config.log
4036
d6d788bd 4037
13b2be9c
DJ
4038
4039
4040
4041
d6d788bd 4042
252b5132
RH
4043user_bfd_gas=
4044# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
4045if test "${enable_bfd_assembler+set}" = set; then
4046 enableval="$enable_bfd_assembler"
4047 case "${enableval}" in
4048 yes) need_bfd=yes user_bfd_gas=yes ;;
4049 no) user_bfd_gas=no ;;
13b2be9c
DJ
4050 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} given for bfd-assembler option" >&5
4051echo "$as_me: error: bad value ${enableval} given for bfd-assembler option" >&2;}
4052 { (exit 1); exit 1; }; } ;;
252b5132 4053esac
13b2be9c 4054fi; # Check whether --enable-targets or --disable-targets was given.
252b5132
RH
4055if test "${enable_targets+set}" = set; then
4056 enableval="$enable_targets"
4057 case "${enableval}" in
13b2be9c
DJ
4058 yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
4059echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
4060 { (exit 1); exit 1; }; }
252b5132
RH
4061 ;;
4062 no) enable_targets= ;;
4063 *) enable_targets=$enableval ;;
4064esac
13b2be9c 4065fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
252b5132
RH
4066if test "${enable_commonbfdlib+set}" = set; then
4067 enableval="$enable_commonbfdlib"
4068 case "${enableval}" in
4069 yes) commonbfdlib=true ;;
4070 no) commonbfdlib=false ;;
13b2be9c
DJ
4071 *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for BFD commonbfdlib option" >&5
4072echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
4073 { (exit 1); exit 1; }; } ;;
252b5132 4074esac
13b2be9c 4075fi;
252b5132
RH
4076using_cgen=no
4077
0218d1e4 4078build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
a2d91340
AC
4079# Check whether --enable-build-warnings or --disable-build-warnings was given.
4080if test "${enable_build_warnings+set}" = set; then
4081 enableval="$enable_build_warnings"
4082 case "${enableval}" in
4083 yes) ;;
4084 no) build_warnings="-w";;
4085 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
4086 build_warnings="${build_warnings} ${t}";;
4087 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
4088 build_warnings="${t} ${build_warnings}";;
4089 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
4090esac
4091if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
4092 echo "Setting warning flags = $build_warnings" 6>&1
4093fi
13b2be9c 4094fi; WARN_CFLAGS=""
a2d91340
AC
4095if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
4096 WARN_CFLAGS="${build_warnings}"
4097fi
4098
d6d788bd 4099
252b5132 4100# Generate a header file
13b2be9c 4101 ac_config_headers="$ac_config_headers config.h:config.in"
d6d788bd 4102
252b5132 4103
76a27922
ILT
4104# If we are on a DOS filesystem, we must use gdb.ini rather than
4105# .gdbinit.
76a27922 4106case "${host}" in
591d4689 4107 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-windows*)
76a27922 4108 GDBINIT="gdb.ini"
13b2be9c
DJ
4109 ac_config_files="$ac_config_files gdb.ini:gdbinit.in"
4110
4111 ;;
4112 *)
4113 GDBINIT=".gdbinit"
4114 ac_config_files="$ac_config_files .gdbinit:gdbinit.in"
4115
76a27922
ILT
4116 ;;
4117esac
4118
d6d788bd 4119
252b5132
RH
4120te_file=generic
4121
4122# Makefile target for installing gas in $(tooldir)/bin.
4123install_tooldir=install-exec-tooldir
4124
4125canon_targets=""
15886821 4126all_targets=no
252b5132
RH
4127if test -n "$enable_targets" ; then
4128 for t in `echo $enable_targets | sed 's/,/ /g'`; do
15886821
L
4129 if test $t = "all"; then
4130 all_targets=yes
4131 continue
4132 fi
6d83c84b 4133 result=`$ac_config_sub $t 2>/dev/null`
252b5132
RH
4134 if test -n "$result" ; then
4135 canon_targets="$canon_targets $result"
4136# else
4137# # Permit "all", etc. We don't support it yet though.
4138# canon_targets="$canon_targets $t"
4139 fi
4140 done
4141 _gas_uniq_list="$canon_targets"
4142_gas_uniq_newlist=""
4143for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
4144 case $_gas_uniq_i in
4145 _gas_uniq_dummy) ;;
4146 *) case " $_gas_uniq_newlist " in
4147 *" $_gas_uniq_i "*) ;;
4148 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
4149 esac ;;
4150 esac
4151done
4152canon_targets=$_gas_uniq_newlist
4153
4154fi
4155
4156emulations=""
4157
4158for this_target in $target $canon_targets ; do
4159
4160 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
4161
4162 # check for architecture variants
4163 arch=
4164 endian=
4165 case ${cpu} in
2ce28d43 4166 am33_2.0) cpu_type=mn10300 endian=little ;;
252b5132 4167 alpha*) cpu_type=alpha ;;
152c65b9 4168 arm*be|xscale*be|strongarm*be | \
54847c76
DJ
4169 arm*b|xscale*b|strongarm*b) cpu_type=arm endian=big ;;
4170 arm*|xscale*|strongarm*) cpu_type=arm endian=little ;;
2fe04c57 4171 c4x*) cpu_type=tic4x ;;
252b5132 4172 hppa*) cpu_type=hppa ;;
80c7c40a 4173 i[3-7]86) cpu_type=i386 arch=i386;;
a735d1cd 4174 x86_64) cpu_type=i386 arch=x86_64;;
800eeca4 4175 ia64) cpu_type=ia64 ;;
13b2be9c
DJ
4176 ip2k) cpu_type=ip2k endian=big ;;
4177 iq2000) cpu_type=iq2000 endian=big ;;
6f6ef0fa 4178 m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
252b5132
RH
4179 m680[012346]0) cpu_type=m68k ;;
4180 m68008) cpu_type=m68k ;;
4181 m683??) cpu_type=m68k ;;
4182 m5200) cpu_type=m68k ;;
4183 m8*) cpu_type=m88k ;;
4184 mips*el) cpu_type=mips endian=little ;;
4185 mips*) cpu_type=mips endian=big ;;
3b16e843 4186 or32*) cpu_type=or32 endian=big ;;
041dd5a9
ILT
4187 pjl*) cpu_type=pj endian=little ;;
4188 pj*) cpu_type=pj endian=big ;;
0baf16f2 4189 powerpc*le*) cpu_type=ppc endian=little ;;
252b5132
RH
4190 powerpc*) cpu_type=ppc endian=big ;;
4191 rs6000*) cpu_type=ppc ;;
a85d7ed0
NC
4192 s390x*) cpu_type=s390 arch=s390x ;;
4193 s390*) cpu_type=s390 arch=s390 ;;
5b0e55b6
JT
4194 sh5*) cpu_type=sh64 endian=big ;;
4195 sh5le*) cpu_type=sh64 endian=little ;;
4196 sh64*) cpu_type=sh64 endian=big ;;
4197 sh64le*) cpu_type=sh64 endian=little ;;
8d05742f 4198 sh*le) cpu_type=sh endian=little ;;
05982cac 4199 sh*) cpu_type=sh endian=big ;;
252b5132
RH
4200 sparclite*) cpu_type=sparc arch=sparclite ;;
4201 sparclet*) cpu_type=sparc arch=sparclet ;;
4202 sparc64*) cpu_type=sparc arch=v9-64 ;;
4203 sparc86x*) cpu_type=sparc arch=sparc86x ;;
4204 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
4205 v850*) cpu_type=v850 ;;
1fe1f39c 4206 crx*) cpu_type=crx endian=little ;;
e0001a05 4207 xtensa*) cpu_type=xtensa arch=xtensa ;;
6edf0760
NC
4208 m32r) cpu_type=m32r target_cpu=m32r endian=big ;;
4209 m32rle) cpu_type=m32r target_cpu=m32r endian=little ;;
252b5132
RH
4210 *) cpu_type=${cpu} ;;
4211 esac
4212
4213 if test ${this_target} = $target ; then
4214 target_cpu_type=${cpu_type}
4215 elif test ${target_cpu_type} != ${cpu_type} ; then
4216 continue
4217 fi
4218
4219 generic_target=${cpu_type}-$vendor-$os
4220 dev=no
4221 bfd_gas=no
4222 em=generic
4223
4224 # assign object format
4225 case ${generic_target} in
79500683
AM
4226 a29k-*-coff) fmt=coff ;;
4227 a29k-amd-udi) fmt=coff ;;
4228 a29k-amd-ebmon) fmt=coff ;;
4229 a29k-nyu-sym1) fmt=coff ;;
4230 a29k-*-rtems*) fmt=coff ;;
4231 a29k-*-vxworks*) fmt=coff ;;
4232
4233 alpha*-*-*vms*) fmt=evax ;;
79500683
AM
4234 alpha*-*-osf*) fmt=ecoff ;;
4235 alpha*-*-linuxecoff*) fmt=ecoff ;;
4236 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
4237 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
4238 alpha*-*-openbsd*) fmt=elf em=obsd ;;
4239
2ce28d43
AO
4240 # cpu_type for am33_2.0 is set to mn10300
4241 mn10300-*-linux*) fmt=elf bfd_gas=yes em=linux ;;
4242
79500683
AM
4243 arc-*-elf*) fmt=elf ;;
4244
4245 arm-*-aout) fmt=aout ;;
4246 arm-*-coff | thumb-*-coff) fmt=coff ;;
28d297de 4247 arm-*-rtems* | thumb-*-rtems*) fmt=elf ;;
79500683 4248 arm-*-elf | thumb-*-elf) fmt=elf ;;
42b5d0ea 4249 arm-*-kaos*) fmt=elf ;;
0decc840 4250 arm*-*-conix*) fmt=elf ;;
79500683
AM
4251 arm-*-linux*aout*) fmt=aout em=linux ;;
4252 arm*-*-linux-gnu*) fmt=elf em=linux ;;
4253 arm*-*-uclinux*) fmt=elf em=linux ;;
8bdcf8ca 4254 arm-*-netbsdelf*) fmt=elf em=nbsd ;;
79500683
AM
4255 arm-*-*n*bsd*) fmt=aout em=nbsd ;;
4256 arm-**-nto*) fmt=elf ;;
4257 arm-*-oabi | thumb-*-oabi) fmt=elf ;;
4258 arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
08e3ab90 4259 arm-wince-pe | arm-*-wince) fmt=coff em=wince-pe ;;
79500683
AM
4260 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
4261 arm-*-riscix*) fmt=aout em=riscix ;;
79500683
AM
4262
4263 avr-*-*) fmt=elf ;;
4264
399f703e 4265 cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
79500683
AM
4266 cris-*-*) fmt=multi bfd_gas=yes ;;
4267
1fe1f39c
NC
4268 crx-*-elf*) fmt=elf ;;
4269
79500683
AM
4270 d10v-*-*) fmt=elf ;;
4271 d30v-*-*) fmt=elf ;;
4272 dlx-*-*) fmt=elf ;;
4273
4274 fr30-*-*) fmt=elf ;;
996991aa 4275 frv-*-*linux*) fmt=elf em=linux;;
79500683
AM
4276 frv-*-*) fmt=elf ;;
4277
4278 hppa-*-linux*) case ${cpu} in
4279 hppa*64*) fmt=elf em=hppalinux64;;
4280 hppa*) fmt=elf em=linux;;
4281 esac ;;
4282 hppa-*-*elf*) fmt=elf em=hppa ;;
4283 hppa-*-lites*) fmt=elf em=hppa ;;
4284 hppa-*-netbsd*) fmt=elf em=nbsd ;;
4285 hppa-*-openbsd*) fmt=elf em=hppa ;;
4286 hppa-*-osf*) fmt=som em=hppa ;;
4287 hppa-*-rtems*) fmt=elf em=hppa ;;
4288 hppa-*-hpux11*) case ${cpu} in
4289 hppa*64*) fmt=elf em=hppa64 ;;
4290 hppa*) fmt=som em=hppa ;;
4291 esac ;;
4292 hppa-*-hpux*) fmt=som em=hppa ;;
4293 hppa-*-mpeix*) fmt=som em=hppa ;;
4294 hppa-*-bsd*) fmt=som em=hppa ;;
4295 hppa-*-hiux*) fmt=som em=hppa ;;
4296
4297 h8300-*-rtems*) fmt=coff ;;
4298 h8300-*-coff) fmt=coff ;;
4299 h8300-*-elf) fmt=elf ;;
4300 h8500-*-rtems*) fmt=coff ;;
4301 h8500-*-coff) fmt=coff ;;
4302
4303 i370-*-elf* | i370-*-linux*) fmt=elf ;;
4304 i386-ibm-aix*) fmt=coff em=i386aix ;;
4305 i386-sequent-bsd*) fmt=aout em=dynix ;;
4306 i386-*-beospe*) fmt=coff em=pe ;;
4307 i386-*-beos*) fmt=elf ;;
4308 i386-*-coff) fmt=coff ;;
4309 i386-*-elf) fmt=elf ;;
42b5d0ea 4310 i386-*-kaos*) fmt=elf ;;
79500683
AM
4311 i386-*-bsd*) fmt=aout em=386bsd ;;
4312 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
4313 i386-*-netbsdpe*) fmt=coff em=pe ;;
4615568e
NC
4314 i386-*-netbsd*-gnu* | \
4315 i386-*-knetbsd*-gnu | \
79500683
AM
4316 i386-*-netbsdelf*) fmt=elf em=nbsd ;;
4317 i386-*-*n*bsd*) case ${cpu} in
4318 x86_64) fmt=elf em=nbsd ;;
4319 *) fmt=aout em=nbsd ;;
4320 esac ;;
4321 i386-*-linux*aout*) fmt=aout em=linux ;;
4322 i386-*-linux*oldld) fmt=aout em=linux ;;
4323 i386-*-linux*coff*) fmt=coff em=linux ;;
4324 i386-*-linux-gnu*) fmt=elf em=linux ;;
4325 x86_64-*-linux-gnu*) fmt=elf em=linux ;;
b2d65c0b 4326 i386-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;;
79500683
AM
4327 i386-*-sysv[45]*) fmt=elf ;;
4328 i386-*-solaris*) fmt=elf ;;
4329 i386-*-freebsdaout*) fmt=aout em=386bsd ;;
4330 i386-*-freebsd[12].*) fmt=aout em=386bsd ;;
4331 i386-*-freebsd[12]) fmt=aout em=386bsd ;;
13dfd2d0
NC
4332 i386-*-freebsd* | i386-*-kfreebsd*-gnu)
4333 fmt=elf em=freebsd ;;
79500683
AM
4334 i386-*-sysv*) fmt=coff ;;
4335 i386-*-sco3.2v5*coff) fmt=coff ;;
4336 i386-*-isc*) fmt=coff ;;
4337 i386-*-sco3.2v5*) fmt=elf
4338 if test ${this_target} = $target; then
13b2be9c
DJ
4339
4340cat >>confdefs.h <<\_ACEOF
252b5132 4341#define SCO_ELF 1
13b2be9c 4342_ACEOF
252b5132 4343
79500683
AM
4344 fi ;;
4345 i386-*-sco3.2*) fmt=coff ;;
4346 i386-*-vsta) fmt=aout ;;
4347 i386-*-msdosdjgpp* \
4348 | i386-*-go32* \
4349 | i386-go32-rtems*) fmt=coff em=go32
13b2be9c
DJ
4350
4351cat >>confdefs.h <<\_ACEOF
56385375 4352#define STRICTCOFF 1
13b2be9c 4353_ACEOF
79500683
AM
4354 ;;
4355 i386-*-rtemself*) fmt=elf ;;
4356 i386-*-rtemscoff*) fmt=coff ;;
4357 i386-*-rtems*) fmt=elf ;;
4358 i386-*-gnu*) fmt=elf ;;
4359 i386-*-mach*) fmt=aout em=mach ;;
4360 i386-*-msdos*) fmt=aout ;;
4361 i386-*-moss*) fmt=elf ;;
4362 i386-*-pe) fmt=coff em=pe ;;
4363 i386-*-cygwin*) fmt=coff em=pe ;;
4364 i386-*-interix*) fmt=coff em=interix ;;
4365 i386-*-mingw32*) fmt=coff em=pe ;;
4366 i386-*-nto-qnx*) fmt=elf ;;
4367 i386-*-*nt*) fmt=coff em=pe ;;
79500683
AM
4368 i386-*-chaos) fmt=elf ;;
4369
4370 i860-*-*) fmt=elf endian=little
13b2be9c
DJ
4371 { echo "$as_me:$LINENO: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&5
4372echo "$as_me: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&2;} ;;
79500683
AM
4373 i960-*-bout) fmt=bout ;;
4374 i960-*-coff) fmt=coff em=ic960 ;;
4375 i960-*-rtems*) fmt=coff em=ic960 ;;
4376 i960-*-nindy*) fmt=bout ;;
4377 i960-*-vxworks5.0) fmt=bout ;;
4378 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
4379 i960-*-vxworks*) fmt=bout ;;
4380 i960-*-elf*) fmt=elf ;;
4381
4382 ia64-*-elf*) fmt=elf ;;
4383 ia64-*-aix*) fmt=elf em=ia64aix ;;
4384 ia64-*-linux-gnu*) fmt=elf em=linux ;;
4385 ia64-*-hpux*) fmt=elf em=hpux ;;
4386 ia64-*-netbsd*) fmt=elf em=nbsd ;;
4387
4388 ip2k-*-*) fmt=elf ;;
4389
da896d3f 4390 iq2000-*-elf) fmt=elf bfd_gas=yes ;;
1c53c80d 4391
6edf0760
NC
4392 m32r-*-elf*) fmt=elf ;;
4393 m32r-*-linux*) fmt=elf em=linux;;
79500683
AM
4394
4395 m68hc11-*-* | m6811-*-*) fmt=elf ;;
4396 m68hc12-*-* | m6812-*-*) fmt=elf ;;
4397
4398 m68k-*-vxworks*) fmt=aout em=sun3 ;;
4399 m68k-ericsson-ose) fmt=aout em=sun3 ;;
4400 m68k-*-sunos*) fmt=aout em=sun3 ;;
4401 m68k-motorola-sysv*) fmt=coff em=delta ;;
4402 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
4403 m68k-apollo-*) fmt=coff em=apollo ;;
4404 m68k-*-elf*) fmt=elf ;;
4405 m68k-*-sysv4*) fmt=elf em=svr4 ;;
4406 m68k-*-sysv*) fmt=coff ;;
4407 m68k-*-coff | m68k-*-rtemscoff*) fmt=coff ;;
4408 m68k-*-rtems*) fmt=elf ;;
4409 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
4410 m68k-*-linux*aout*) fmt=aout em=linux ;;
4411 m68k-*-linux-gnu*) fmt=elf em=linux ;;
b50c15dc 4412 m68k-*-uclinux*) fmt=elf ;;
79500683
AM
4413 m68k-*-gnu*) fmt=elf ;;
4414 m68k-*-lynxos*) fmt=coff em=lynx ;;
4415 m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
4416 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
4417 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
4418 m68k-apple-aux*) fmt=coff em=aux ;;
4419 m68k-*-psos*) fmt=elf em=psos;;
4420
4421 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
4422 m88k-*-coff*) fmt=coff ;;
4423
4424 mcore-*-elf) fmt=elf ;;
4425 mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
252b5132
RH
4426
4427 # don't change em like *-*-bsd does
79500683 4428 mips-dec-openbsd*) fmt=elf endian=little ;;
79500683
AM
4429 mips-sony-bsd*) fmt=ecoff ;;
4430 mips-*-bsd*)
13b2be9c
DJ
4431 { { echo "$as_me:$LINENO: error: Unknown vendor for mips-bsd configuration." >&5
4432echo "$as_me: error: Unknown vendor for mips-bsd configuration." >&2;}
4433 { (exit 1); exit 1; }; } ;;
79500683
AM
4434 mips-*-ultrix*) fmt=ecoff endian=little ;;
4435 mips-*-osf*) fmt=ecoff endian=little ;;
4436 mips-*-ecoff*) fmt=ecoff ;;
4437 mips-*-pe*) fmt=coff endian=little em=pe ;;
1de5b6a1
AO
4438 mips-*-irix6*) fmt=elf em=irix ;;
4439 mips-*-irix5*) fmt=elf em=irix ;;
4440 mips-*-irix*) fmt=ecoff em=irix ;;
79500683
AM
4441 mips-*-lnews*) fmt=ecoff em=lnews ;;
4442 mips-*-riscos*) fmt=ecoff ;;
4443 mips*-*-linux*) fmt=elf em=tmips ;;
4444 mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;;
4445 mips-*-sysv*) fmt=ecoff ;;
4446 mips-*-elf* | mips-*-rtems*) fmt=elf ;;
dbeba5e5
CD
4447 mips-*-netbsd*) fmt=elf ;;
4448 mips-*-openbsd*) fmt=elf ;;
79500683
AM
4449
4450 mmix-*-*) fmt=elf ;;
4451 mn10200-*-*) fmt=elf ;;
4452 mn10300-*-*) fmt=elf ;;
2469cfa2 4453 msp430-*-*) fmt=elf ;;
79500683 4454 openrisc-*-*) fmt=elf ;;
4b363073 4455 or32-*-rtems*) fmt=elf ;;
79500683
AM
4456 or32-*-coff) fmt=coff ;;
4457 or32-*-elf) fmt=elf ;;
4458 pj*) fmt=elf ;;
4459
4460 ppc-*-pe | ppc-*-cygwin*) fmt=coff em=pe ;;
4461 ppc-*-winnt*) fmt=coff em=pe ;;
f8fc3443
NC
4462 ppc-*-aix5.[01]) fmt=coff em=aix5 ;;
4463 ppc-*-aix5.*) fmt=coff em=aix5
4464
4465cat >>confdefs.h <<\_ACEOF
4466#define AIX_WEAK_SUPPORT 1
4467_ACEOF
4468
4469 ;;
79500683
AM
4470 ppc-*-aix*) fmt=coff ;;
4471 ppc-*-beos*) fmt=coff ;;
4472 ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
4473 ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
fda712ee 4474 ppc-*-linux-gnu*) fmt=elf em=linux
79500683
AM
4475 case "$endian" in
4476 big) ;;
13b2be9c
DJ
4477 *) { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5
4478echo "$as_me: error: GNU/Linux must be configured big endian" >&2;}
4479 { (exit 1); exit 1; }; } ;;
79500683
AM
4480 esac ;;
4481 ppc-*-solaris*) fmt=elf
4482 if test ${this_target} = $target; then
13b2be9c
DJ
4483
4484cat >>confdefs.h <<\_ACEOF
252b5132 4485#define TARGET_SOLARIS_COMMENT 1
13b2be9c 4486_ACEOF
252b5132 4487
79500683
AM
4488 fi
4489 if test x${endian} = xbig; then
13b2be9c
DJ
4490 { { echo "$as_me:$LINENO: error: Solaris must be configured little endian" >&5
4491echo "$as_me: error: Solaris must be configured little endian" >&2;}
4492 { (exit 1); exit 1; }; }
79500683
AM
4493 fi ;;
4494 ppc-*-rtems*) fmt=elf ;;
6c71dbc4 4495 ppc-*-macos*) fmt=coff em=macos ;;
b2d65c0b 4496 ppc-*-nto*) fmt=elf ;;
42b5d0ea 4497 ppc-*-kaos*) fmt=elf ;;
b2d65c0b 4498 ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;;
79500683
AM
4499
4500 s390x-*-linux-gnu*) fmt=elf em=linux ;;
4501 s390-*-linux-gnu*) fmt=elf em=linux ;;
4502
4503 sh*-*-linux*) fmt=elf em=linux
4504 case ${cpu} in
4505 sh*eb) endian=big ;;
4506 *) endian=little ;;
4507 esac ;;
4508 sh5*-*-netbsd*) fmt=elf em=nbsd ;;
4509 sh64*-*-netbsd*) fmt=elf em=nbsd ;;
4510 sh*-*-netbsdelf*) fmt=elf em=nbsd ;;
1a320fbb 4511 sh*-*-symbianelf*) fmt=elf endian=little
85fbca6a
NC
4512
4513cat >>confdefs.h <<\_ACEOF
4514#define TARGET_SYMBIAN 1
4515_ACEOF
4516
4517 ;;
79500683
AM
4518 sh-*-elf*) fmt=elf ;;
4519 sh-*-coff*) fmt=coff ;;
ed71e111
NC
4520 sh-*-nto*) fmt=elf ;;
4521 sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
9183ed4b
AM
4522 sh-*-rtemscoff*) fmt=coff ;;
4523 sh-*-rtems*) fmt=elf ;;
42b5d0ea
NC
4524 sh-*-kaos*) fmt=elf ;;
4525 shle*-*-kaos*) fmt=elf ;;
79500683
AM
4526 sh64-*-elf*) fmt=elf ;;
4527
4528 ns32k-pc532-mach*) fmt=aout em=pc532mach ;;
4529 ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
4530 ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
4531 ns32k-*-*n*bsd*) fmt=aout em=nbsd532 ;;
4532
4533 sparc-*-rtemsaout*) fmt=aout ;;
4534 sparc-*-rtemself*) fmt=elf ;;
4535 sparc-*-rtems*) fmt=elf ;;
4536 sparc-*-sunos4*) fmt=aout em=sun3 ;;
4537 sparc-*-aout | sparc*-*-vxworks*) fmt=aout em=sparcaout ;;
4538 sparc-*-coff) fmt=coff ;;
4539 sparc-*-linux*aout*) fmt=aout em=linux ;;
4540 sparc-*-linux-gnu*) fmt=elf em=linux ;;
4541 sparc-*-lynxos*) fmt=coff em=lynx ;;
4542 sparc-fujitsu-none) fmt=aout ;;
4543 sparc-*-elf) fmt=elf ;;
4544 sparc-*-sysv4*) fmt=elf ;;
4545 sparc-*-solaris*) fmt=elf ;;
4546 sparc-*-netbsdelf*) fmt=elf em=nbsd ;;
4547 sparc-*-*n*bsd*) case ${cpu} in
4548 sparc64) fmt=elf em=nbsd ;;
4549 *) fmt=aout em=nbsd ;;
4550 esac ;;
4551 strongarm-*-coff) fmt=coff ;;
4552 strongarm-*-elf) fmt=elf ;;
42b5d0ea 4553 strongarm-*-kaos*) fmt=elf ;;
79500683
AM
4554 xscale-*-coff) fmt=coff ;;
4555 xscale-*-elf) fmt=elf ;;
4556
4557 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
4558 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
026df7c5 4559 tic4x-*-* | c4x-*-*) fmt=coff bfd_gas=yes ;;
79500683
AM
4560 tic54x-*-* | c54x*-*-*) fmt=coff bfd_gas=yes need_libm=yes;;
4561 tic80-*-*) fmt=coff ;;
4562
4563 v850-*-*) fmt=elf ;;
4564 v850e-*-*) fmt=elf ;;
4565 v850ea-*-*) fmt=elf ;;
4566
4567 vax-*-netbsdelf*) fmt=elf em=nbsd ;;
4568 vax-*-netbsd*) fmt=aout em=nbsd ;;
4569 vax-*-bsd* | vax-*-ultrix*) fmt=aout ;;
f8fc3443 4570 vax-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
79500683
AM
4571 vax-*-vms) fmt=vms ;;
4572
4573 w65-*-*) fmt=coff ;;
4574
4575 xstormy16-*-*) fmt=elf ;;
4576
e0001a05
NC
4577 xtensa-*-*) fmt=elf ;;
4578
79500683
AM
4579 z8k-*-coff | z8k-*-sim) fmt=coff ;;
4580
4581 *-*-aout | *-*-scout) fmt=aout ;;
13dfd2d0 4582 *-*-freebsd* | *-*-kfreebsd*-gnu) fmt=elf em=freebsd ;;
79500683
AM
4583 *-*-nindy*) fmt=bout ;;
4584 *-*-bsd*) fmt=aout em=sun3 ;;
4585 *-*-generic) fmt=generic ;;
4586 *-*-xray | *-*-hms) fmt=coff ;;
4587 *-*-sim) fmt=coff ;;
4588 *-*-elf | *-*-sysv4* | *-*-solaris*) fmt=elf dev=yes ;;
0379c688
NC
4589 *-*-aros*) fmt=elf em=linux bfd_gas=yes ;;
4590 *-*-vxworks | *-*-windiss) fmt=elf ;;
32137342 4591 *-*-netware) fmt=elf em=netware ;;
252b5132
RH
4592 esac
4593
4594 if test ${this_target} = $target ; then
4595 endian_def=
4596 if test x${endian} = xbig; then
4597 endian_def=1
4598 elif test x${endian} = xlittle; then
4599 endian_def=0
4600 fi
4601 if test x${endian_def} != x; then
13b2be9c
DJ
4602
4603cat >>confdefs.h <<_ACEOF
252b5132 4604#define TARGET_BYTES_BIG_ENDIAN $endian_def
13b2be9c 4605_ACEOF
252b5132
RH
4606
4607 fi
4608 fi
4609
4610 case ${cpu_type}-${fmt} in
79500683
AM
4611 alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
4612 | pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
4613 | *-elf | *-ecoff | *-som)
4614 bfd_gas=yes ;;
252b5132
RH
4615 esac
4616
4617# Other random stuff.
4618
316f5878
RS
4619 case ${cpu_type} in
4620 mips)
4621 # Set mips_cpu to the name of the default CPU.
4622 case ${target_cpu} in
4623 mips | mipsbe | mipseb | mipsle | mipsel | mips64 | mips64el)
4624 mips_cpu=from-abi
4625 ;;
4626 mipsisa32 | mipsisa32el)
4627 mips_cpu=mips32
4628 ;;
af7ee8bf
CD
4629 mipsisa32r2 | mipsisa32r2el)
4630 mips_cpu=mips32r2
4631 ;;
316f5878
RS
4632 mipsisa64 | mipsisa64el)
4633 mips_cpu=mips64
4634 ;;
5f74bc13
CD
4635 mipsisa64r2 | mipsisa64r2el)
4636 mips_cpu=mips64r2
4637 ;;
316f5878
RS
4638 mipstx39 | mipstx39el)
4639 mips_cpu=r3900
4640 ;;
8f6847cb
RS
4641 mips64vr | mips64vrel)
4642 mips_cpu=vr4100
4643 ;;
5f74bc13 4644 mipsisa32r2* | mipsisa64r2*)
af7ee8bf
CD
4645 mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'`
4646 ;;
316f5878
RS
4647 mips64* | mipsisa64* | mipsisa32*)
4648 mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..//' -e 's/el$//'`
4649 ;;
4650 *)
13b2be9c
DJ
4651 { { echo "$as_me:$LINENO: error: $target_cpu isn't a supported MIPS CPU name" >&5
4652echo "$as_me: error: $target_cpu isn't a supported MIPS CPU name" >&2;}
4653 { (exit 1); exit 1; }; }
316f5878
RS
4654 ;;
4655 esac
4656 # See whether it's appropriate to set E_MIPS_ABI_O32 for o32
4657 # binaries. It's a GNU extension that some OSes don't understand.
4658 # The value only matters on ELF targets.
4659 case ${target} in
4660 *-*-irix*)
4661 use_e_mips_abi_o32=0
4662 ;;
4663 *)
4664 use_e_mips_abi_o32=1
4665 ;;
4666 esac
4667 # Decide whether to generate 32-bit or 64-bit code by default.
4668 # Used to resolve -march=from-abi when an embedded ABI is selected.
4669 case ${target} in
4670 mips64*-*-* | mipsisa64*-*-*)
4671 mips_default_64bit=1
4672 ;;
4673 *)
4674 mips_default_64bit=0
4675 ;;
4676 esac
cac012d6
AO
4677 # Decide which ABI to target by default.
4678 case ${target} in
4679 mips64*-linux* | mips-sgi-irix6*)
4680 mips_default_abi=N32_ABI
4681 ;;
4682 mips*-linux*)
4683 mips_default_abi=O32_ABI
4684 ;;
4685 *)
4686 mips_default_abi=NO_ABI
4687 ;;
4688 esac
13b2be9c
DJ
4689
4690cat >>confdefs.h <<_ACEOF
316f5878 4691#define MIPS_CPU_STRING_DEFAULT "$mips_cpu"
13b2be9c 4692_ACEOF
316f5878 4693
13b2be9c
DJ
4694
4695cat >>confdefs.h <<_ACEOF
316f5878 4696#define USE_E_MIPS_ABI_O32 $use_e_mips_abi_o32
13b2be9c 4697_ACEOF
316f5878 4698
13b2be9c
DJ
4699
4700cat >>confdefs.h <<_ACEOF
316f5878 4701#define MIPS_DEFAULT_64BIT $mips_default_64bit
13b2be9c 4702_ACEOF
cac012d6 4703
13b2be9c
DJ
4704
4705cat >>confdefs.h <<_ACEOF
cac012d6 4706#define MIPS_DEFAULT_ABI $mips_default_abi
13b2be9c 4707_ACEOF
316f5878
RS
4708
4709 ;;
4710 esac
4711
252b5132
RH
4712 # Do we need the opcodes library?
4713 case ${cpu_type} in
4714 vax | i386 | tic30)
4715 ;;
4716
4717 *)
4718 need_opcodes=yes
4719
4720 case "${enable_shared}" in
4721 yes) shared_opcodes=true ;;
4722 *opcodes*) shared_opcodes=true ;;
4723 *) shared_opcodes=false ;;
4724 esac
4725 if test "${shared_opcodes}" = "true"; then
4726 # A shared libopcodes must be linked against libbfd.
4727 need_bfd=yes
4728 fi
4729 ;;
4730 esac
4731
4732 # Any other special object files needed ?
4733 case ${cpu_type} in
1c53c80d 4734 fr30 | ip2k | iq2000 | m32r | openrisc)
252b5132
RH
4735 using_cgen=yes
4736 ;;
4737
0ebb9a87
DB
4738 frv)
4739 using_cgen=yes
4740 ;;
252b5132
RH
4741 m68k)
4742 case ${extra_objects} in
4743 *m68k-parse.o*) ;;
4744 *) extra_objects="$extra_objects m68k-parse.o" ;;
4745 esac
4746 ;;
4747
4748 mips)
13b2be9c 4749 echo ${extra_objects} | grep -s "itbl-parse.o"
252b5132
RH
4750 if test $? -ne 0 ; then
4751 extra_objects="$extra_objects itbl-parse.o"
4752 fi
4753
13b2be9c 4754 echo ${extra_objects} | grep -s "itbl-lex.o"
252b5132
RH
4755 if test $? -ne 0 ; then
4756 extra_objects="$extra_objects itbl-lex.o"
4757 fi
4758
13b2be9c 4759 echo ${extra_objects} | grep -s "itbl-ops.o"
252b5132
RH
4760 if test $? -ne 0 ; then
4761 extra_objects="$extra_objects itbl-ops.o"
4762 fi
4763 ;;
4764
c1e4eef7 4765 i386 | s390 | sparc)
252b5132 4766 if test $this_target = $target ; then
13b2be9c
DJ
4767
4768cat >>confdefs.h <<_ACEOF
252b5132 4769#define DEFAULT_ARCH "${arch}"
13b2be9c 4770_ACEOF
252b5132
RH
4771
4772 fi
4773 ;;
93fbbb04
GK
4774
4775 xstormy16)
4776 using_cgen=yes
4777 ;;
4778
e0001a05
NC
4779 xtensa)
4780 echo ${extra_objects} | grep -s "xtensa-relax.o"
4781 if test $? -ne 0 ; then
4782 extra_objects="$extra_objects xtensa-relax.o"
4783 fi
4784 ;;
4785
252b5132
RH
4786 *)
4787 ;;
4788 esac
4789
4790 if test $using_cgen = yes ; then
4791 case "x${extra_objects}" in
4792 *cgen.o*) ;;
4793 *) extra_objects="$extra_objects cgen.o" ;;
4794 esac
4795 fi
4796
4797# See if we really can support this configuration with the emulation code.
4798
4799 if test $this_target = $target ; then
4800 primary_bfd_gas=$bfd_gas
4801 obj_format=$fmt
4802 te_file=$em
4803
4804 if test $bfd_gas = no ; then
4805 # Can't support other configurations this way.
4806 break
4807 fi
4808 elif test $bfd_gas = no ; then
4809 # Can't support this configuration.
4810 break
4811 fi
4812
4813# From target name and format, produce a list of supported emulations.
4814
4815 case ${generic_target}-${fmt} in
4816 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
056a1d49 4817 mips*-*-linux*-*) case "$endian" in
df3bcd6f
L
4818 big) emulation="mipsbelf mipslelf mipself" ;;
4819 *) emulation="mipslelf mipsbelf mipself" ;;
252b5132
RH
4820 esac ;;
4821 mips-*-lnews*-ecoff) ;;
4822 mips-*-*-ecoff) case "$endian" in
4823 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
4824 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
4825 esac ;;
4826 mips-*-*-elf) case "$endian" in
4827 big) emulation="mipsbelf mipslelf mipself" ;;
4828 *) emulation="mipslelf mipsbelf mipself" ;;
252b5132 4829 esac ;;
906fac54 4830 mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
119caedd
L
4831 # i386-pc-pe-coff != i386-pc-coff.
4832 i386-*-pe-coff) ;;
4c63da97
AM
4833 # Uncommenting the next line will turn on support for i386 AOUT
4834 # for the default linux configuration
4835 # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
4836 #
4837 i386-*-aout) emulation="i386aout" ;;
4ca72d38 4838 i386-*-coff) emulation="i386coff" ;;
4c63da97 4839 i386-*-elf) emulation="i386elf" ;;
3bcbcc3d 4840
f9c19112
HPN
4841 # Always all formats. The first stated emulation becomes the default.
4842 cris-*-*aout*) emulation="crisaout criself" ;;
4843 cris-*-*) emulation="criself crisaout" ;;
252b5132
RH
4844 esac
4845
4846 emulations="$emulations $emulation"
4847
4848done
4849
15886821
L
4850# Turn on all targets if possible
4851if test ${all_targets} = "yes"; then
4852 case ${target_cpu_type} in
4853 i386)
4854 case ${obj_format} in
4855 aout)
4856 emulations="$emulations i386coff i386elf"
4857 ;;
4858 coff)
4859 emulations="$emulations i386aout i386elf"
4860 ;;
4861 elf)
4862 emulations="$emulations i386aout i386coff"
4863 ;;
4864 esac
4865 ;;
4866 esac
4867fi
4868
252b5132
RH
4869# Assign floating point type. Most processors with FP support
4870# IEEE FP. On those that don't support FP at all, usually IEEE
4871# is emulated.
4872case ${target_cpu} in
4873 vax | tahoe ) atof=${target_cpu} ;;
e135f41b 4874 pdp11) atof=vax ;;
252b5132
RH
4875 *) atof=ieee ;;
4876esac
4877
4878case "${obj_format}" in
13b2be9c
DJ
4879 "") { { echo "$as_me:$LINENO: error: GAS does not know what format to use for target ${target}" >&5
4880echo "$as_me: error: GAS does not know what format to use for target ${target}" >&2;}
4881 { (exit 1); exit 1; }; } ;;
252b5132
RH
4882esac
4883
4884# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
4885cgen_cpu_prefix=""
4886if test $using_cgen = yes ; then
4887 case ${target_cpu} in
4888 *) cgen_cpu_prefix=${target_cpu} ;;
4889 esac
13b2be9c
DJ
4890
4891
4892cat >>confdefs.h <<\_ACEOF
252b5132 4893#define USING_CGEN 1
13b2be9c 4894_ACEOF
252b5132
RH
4895
4896fi
4897
d6d788bd 4898
252b5132 4899if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
13b2be9c
DJ
4900 { { echo "$as_me:$LINENO: error: GAS does not support target CPU ${target_cpu_type}" >&5
4901echo "$as_me: error: GAS does not support target CPU ${target_cpu_type}" >&2;}
4902 { (exit 1); exit 1; }; }
252b5132
RH
4903fi
4904
4905if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
13b2be9c
DJ
4906 { { echo "$as_me:$LINENO: error: GAS does not have support for object file format ${obj_format}" >&5
4907echo "$as_me: error: GAS does not have support for object file format ${obj_format}" >&2;}
4908 { (exit 1); exit 1; }; }
252b5132
RH
4909fi
4910
4911case ${user_bfd_gas}-${primary_bfd_gas} in
4912 yes-yes | no-no)
4913 # We didn't override user's choice.
4914 ;;
4915 no-yes)
13b2be9c
DJ
4916 { echo "$as_me:$LINENO: WARNING: Use of BFD is required for ${target}; overriding config options." >&5
4917echo "$as_me: WARNING: Use of BFD is required for ${target}; overriding config options." >&2;}
252b5132
RH
4918 ;;
4919 no-preferred)
4920 primary_bfd_gas=no
4921 ;;
4922 *-preferred)
4923 primary_bfd_gas=yes
4924 ;;
4925 yes-*)
4926 primary_bfd_gas=yes
4927 ;;
4928 -*)
4929 # User specified nothing.
4930 ;;
4931esac
4932
4933# Some COFF configurations want these random other flags set.
4934case ${obj_format} in
4935 coff)
4936 case ${target_cpu_type} in
13b2be9c
DJ
4937 i386)
4938cat >>confdefs.h <<\_ACEOF
252b5132 4939#define I386COFF 1
13b2be9c 4940_ACEOF
252b5132 4941 ;;
13b2be9c
DJ
4942 m68k)
4943cat >>confdefs.h <<\_ACEOF
252b5132 4944#define M68KCOFF 1
13b2be9c 4945_ACEOF
252b5132 4946 ;;
13b2be9c
DJ
4947 m88k)
4948cat >>confdefs.h <<\_ACEOF
252b5132 4949#define M88KCOFF 1
13b2be9c 4950_ACEOF
252b5132
RH
4951 ;;
4952 esac
4953 ;;
4954esac
4955
4956# Getting this done right is going to be a bitch. Each configuration specified
4957# with --enable-targets=... should be checked for environment, format, cpu, and
4958# bfd_gas setting.
4959#
4960# For each configuration, the necessary object file support code must be linked
4961# in. This might be only one, it might be up to four. The necessary emulation
4962# code needs to be provided, too.
4963#
4964# And then there's "--enable-targets=all"....
4965#
4966# For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
4967
4968formats="${obj_format}"
4969emfiles=""
4970EMULATIONS=""
4971_gas_uniq_list="$emulations"
4972_gas_uniq_newlist=""
4973for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
4974 case $_gas_uniq_i in
4975 _gas_uniq_dummy) ;;
4976 *) case " $_gas_uniq_newlist " in
4977 *" $_gas_uniq_i "*) ;;
4978 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
4979 esac ;;
4980 esac
4981done
4982emulations=$_gas_uniq_newlist
4983
4984for em in . $emulations ; do
4985 case $em in
4986 .) continue ;;
97238fbd 4987 mipsbelf | mipslelf | mipself)
252b5132 4988 fmt=elf file=mipself ;;
97238fbd 4989 mipsbecoff | mipslecoff | mipsecoff)
252b5132 4990 fmt=ecoff file=mipsecoff ;;
0aa5d426
HPN
4991 *coff)
4992 fmt=coff file=$em ;;
4993 *aout)
4994 fmt=aout file=$em ;;
4995 *elf)
4996 fmt=elf file=$em ;;
252b5132
RH
4997 esac
4998 formats="$formats $fmt"
4999 emfiles="$emfiles e-$file.o"
5000 EMULATIONS="$EMULATIONS &$em,"
5001done
5002_gas_uniq_list="$formats"
5003_gas_uniq_newlist=""
5004for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
5005 case $_gas_uniq_i in
5006 _gas_uniq_dummy) ;;
5007 *) case " $_gas_uniq_newlist " in
5008 *" $_gas_uniq_i "*) ;;
5009 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
5010 esac ;;
5011 esac
5012done
5013formats=$_gas_uniq_newlist
5014
5015_gas_uniq_list="$emfiles"
5016_gas_uniq_newlist=""
5017for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
5018 case $_gas_uniq_i in
5019 _gas_uniq_dummy) ;;
5020 *) case " $_gas_uniq_newlist " in
5021 *" $_gas_uniq_i "*) ;;
5022 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
5023 esac ;;
5024 esac
5025done
5026emfiles=$_gas_uniq_newlist
5027
5028if test `set . $formats ; shift ; echo $#` -gt 1 ; then
5029 for fmt in $formats ; do
5030 case $fmt in
13b2be9c
DJ
5031 aout)
5032cat >>confdefs.h <<\_ACEOF
252b5132 5033#define OBJ_MAYBE_AOUT 1
13b2be9c 5034_ACEOF
252b5132 5035 ;;
13b2be9c
DJ
5036 bout)
5037cat >>confdefs.h <<\_ACEOF
252b5132 5038#define OBJ_MAYBE_BOUT 1
13b2be9c 5039_ACEOF
252b5132 5040 ;;
13b2be9c
DJ
5041 coff)
5042cat >>confdefs.h <<\_ACEOF
252b5132 5043#define OBJ_MAYBE_COFF 1
13b2be9c 5044_ACEOF
252b5132 5045 ;;
13b2be9c
DJ
5046 ecoff)
5047cat >>confdefs.h <<\_ACEOF
252b5132 5048#define OBJ_MAYBE_ECOFF 1
13b2be9c 5049_ACEOF
252b5132 5050 ;;
13b2be9c
DJ
5051 elf)
5052cat >>confdefs.h <<\_ACEOF
252b5132 5053#define OBJ_MAYBE_ELF 1
13b2be9c 5054_ACEOF
252b5132 5055 ;;
13b2be9c
DJ
5056 generic)
5057cat >>confdefs.h <<\_ACEOF
252b5132 5058#define OBJ_MAYBE_GENERIC 1
13b2be9c 5059_ACEOF
252b5132 5060 ;;
13b2be9c
DJ
5061 hp300)
5062cat >>confdefs.h <<\_ACEOF
252b5132 5063#define OBJ_MAYBE_HP300 1
13b2be9c 5064_ACEOF
252b5132 5065 ;;
13b2be9c
DJ
5066 ieee)
5067cat >>confdefs.h <<\_ACEOF
252b5132 5068#define OBJ_MAYBE_IEEE 1
13b2be9c 5069_ACEOF
252b5132 5070 ;;
13b2be9c
DJ
5071 som)
5072cat >>confdefs.h <<\_ACEOF
252b5132 5073#define OBJ_MAYBE_SOM 1
13b2be9c 5074_ACEOF
252b5132 5075 ;;
13b2be9c
DJ
5076 vms)
5077cat >>confdefs.h <<\_ACEOF
252b5132 5078#define OBJ_MAYBE_VMS 1
13b2be9c 5079_ACEOF
252b5132
RH
5080 ;;
5081 esac
5082 extra_objects="$extra_objects obj-$fmt.o"
5083 done
5084 obj_format=multi
5085fi
5086if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
252b5132 5087 DEFAULT_EMULATION=`set . $emulations ; echo $2`
4ca72d38
AM
5088 # e-mips* has more than one emulation per file, e-i386* has just one at the
5089 # moment. If only one emulation is specified, then don't define
5090 # USE_EMULATIONS or include any of the e-files as they will only be bloat.
5091 case "${obj_format}${emfiles}" in
5092 multi* | *mips*)
4ca72d38 5093 extra_objects="$extra_objects $emfiles"
13b2be9c
DJ
5094
5095cat >>confdefs.h <<\_ACEOF
252b5132 5096#define USE_EMULATIONS 1
13b2be9c 5097_ACEOF
4ca72d38
AM
5098 ;;
5099 esac
252b5132
RH
5100fi
5101
13b2be9c
DJ
5102
5103cat >>confdefs.h <<_ACEOF
252b5132 5104#define EMULATIONS $EMULATIONS
13b2be9c
DJ
5105_ACEOF
5106
252b5132 5107
13b2be9c 5108cat >>confdefs.h <<_ACEOF
252b5132 5109#define DEFAULT_EMULATION "$DEFAULT_EMULATION"
13b2be9c 5110_ACEOF
252b5132 5111
d6d788bd 5112
252b5132
RH
5113case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
5114 yes-*-coff) need_bfd=yes ;;
5115 no-*-coff) need_bfd=yes
13b2be9c
DJ
5116
5117cat >>confdefs.h <<\_ACEOF
252b5132 5118#define MANY_SEGMENTS 1
13b2be9c 5119_ACEOF
252b5132
RH
5120 ;;
5121esac
5122
5123reject_dev_configs=yes
5124
5125case ${reject_dev_configs}-${dev} in
5126 yes-yes) # Oops.
13b2be9c
DJ
5127 { { echo "$as_me:$LINENO: error: GAS does not support the ${generic_target} configuration." >&5
5128echo "$as_me: error: GAS does not support the ${generic_target} configuration." >&2;}
5129 { (exit 1); exit 1; }; }
252b5132
RH
5130 ;;
5131esac
5132
d6d788bd
L
5133
5134
5135
5136
5137
5138
252b5132 5139case "${primary_bfd_gas}" in
13b2be9c
DJ
5140 yes)
5141cat >>confdefs.h <<\_ACEOF
252b5132 5142#define BFD_ASSEMBLER 1
13b2be9c 5143_ACEOF
252b5132
RH
5144
5145 need_bfd=yes ;;
5146esac
5147
5148# do we need the opcodes library?
5149case "${need_opcodes}" in
5150yes)
5151 OPCODES_LIB=../opcodes/libopcodes.la
5152 ;;
5153esac
5154
5155case "${need_bfd}" in
5156yes)
5157 BFDLIB=../bfd/libbfd.la
4001ad8c 5158 BFDVER_H=../bfd/bfdver.h
29589b0c 5159 ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
252b5132
RH
5160 ;;
5161esac
5162
d6d788bd
L
5163
5164
5165
5166
5167
4001ad8c 5168
13b2be9c
DJ
5169
5170cat >>confdefs.h <<_ACEOF
252b5132 5171#define TARGET_ALIAS "${target_alias}"
13b2be9c 5172_ACEOF
9b2b7d69 5173
13b2be9c
DJ
5174
5175cat >>confdefs.h <<_ACEOF
252b5132 5176#define TARGET_CANONICAL "${target}"
13b2be9c 5177_ACEOF
9b2b7d69 5178
13b2be9c
DJ
5179
5180cat >>confdefs.h <<_ACEOF
252b5132 5181#define TARGET_CPU "${target_cpu}"
13b2be9c 5182_ACEOF
9b2b7d69 5183
13b2be9c
DJ
5184
5185cat >>confdefs.h <<_ACEOF
252b5132 5186#define TARGET_VENDOR "${target_vendor}"
13b2be9c 5187_ACEOF
9b2b7d69 5188
13b2be9c
DJ
5189
5190cat >>confdefs.h <<_ACEOF
252b5132 5191#define TARGET_OS "${target_os}"
13b2be9c
DJ
5192_ACEOF
5193
5194
5195ac_ext=c
5196ac_cpp='$CPP $CPPFLAGS'
5197ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5198ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5199ac_compiler_gnu=$ac_cv_c_compiler_gnu
5200if test -n "$ac_tool_prefix"; then
5201 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5202set dummy ${ac_tool_prefix}gcc; ac_word=$2
5203echo "$as_me:$LINENO: checking for $ac_word" >&5
5204echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5205if test "${ac_cv_prog_CC+set}" = set; then
5206 echo $ECHO_N "(cached) $ECHO_C" >&6
5207else
5208 if test -n "$CC"; then
5209 ac_cv_prog_CC="$CC" # Let the user override the test.
5210else
5211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214 IFS=$as_save_IFS
5215 test -z "$as_dir" && as_dir=.
5216 for ac_exec_ext in '' $ac_executable_extensions; do
5217 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5219 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5220 break 2
5221 fi
5222done
5223done
252b5132 5224
13b2be9c
DJ
5225fi
5226fi
5227CC=$ac_cv_prog_CC
5228if test -n "$CC"; then
5229 echo "$as_me:$LINENO: result: $CC" >&5
5230echo "${ECHO_T}$CC" >&6
5231else
5232 echo "$as_me:$LINENO: result: no" >&5
5233echo "${ECHO_T}no" >&6
5234fi
252b5132 5235
13b2be9c
DJ
5236fi
5237if test -z "$ac_cv_prog_CC"; then
5238 ac_ct_CC=$CC
5239 # Extract the first word of "gcc", so it can be a program name with args.
252b5132 5240set dummy gcc; ac_word=$2
13b2be9c
DJ
5241echo "$as_me:$LINENO: checking for $ac_word" >&5
5242echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5243if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
5244 echo $ECHO_N "(cached) $ECHO_C" >&6
5245else
5246 if test -n "$ac_ct_CC"; then
5247 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5248else
5249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5250for as_dir in $PATH
5251do
5252 IFS=$as_save_IFS
5253 test -z "$as_dir" && as_dir=.
5254 for ac_exec_ext in '' $ac_executable_extensions; do
5255 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5256 ac_cv_prog_ac_ct_CC="gcc"
5257 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5258 break 2
5259 fi
5260done
5261done
5262
5263fi
5264fi
5265ac_ct_CC=$ac_cv_prog_ac_ct_CC
5266if test -n "$ac_ct_CC"; then
5267 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
5268echo "${ECHO_T}$ac_ct_CC" >&6
5269else
5270 echo "$as_me:$LINENO: result: no" >&5
5271echo "${ECHO_T}no" >&6
5272fi
5273
5274 CC=$ac_ct_CC
5275else
5276 CC="$ac_cv_prog_CC"
5277fi
5278
5279if test -z "$CC"; then
5280 if test -n "$ac_tool_prefix"; then
5281 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5282set dummy ${ac_tool_prefix}cc; ac_word=$2
5283echo "$as_me:$LINENO: checking for $ac_word" >&5
5284echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5285if test "${ac_cv_prog_CC+set}" = set; then
5286 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
5287else
5288 if test -n "$CC"; then
5289 ac_cv_prog_CC="$CC" # Let the user override the test.
5290else
13b2be9c
DJ
5291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5292for as_dir in $PATH
5293do
5294 IFS=$as_save_IFS
5295 test -z "$as_dir" && as_dir=.
5296 for ac_exec_ext in '' $ac_executable_extensions; do
5297 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5298 ac_cv_prog_CC="${ac_tool_prefix}cc"
5299 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5300 break 2
5301 fi
5302done
5303done
5304
252b5132
RH
5305fi
5306fi
13b2be9c 5307CC=$ac_cv_prog_CC
252b5132 5308if test -n "$CC"; then
13b2be9c
DJ
5309 echo "$as_me:$LINENO: result: $CC" >&5
5310echo "${ECHO_T}$CC" >&6
5311else
5312 echo "$as_me:$LINENO: result: no" >&5
5313echo "${ECHO_T}no" >&6
5314fi
5315
5316fi
5317if test -z "$ac_cv_prog_CC"; then
5318 ac_ct_CC=$CC
5319 # Extract the first word of "cc", so it can be a program name with args.
5320set dummy cc; ac_word=$2
5321echo "$as_me:$LINENO: checking for $ac_word" >&5
5322echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5323if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
5324 echo $ECHO_N "(cached) $ECHO_C" >&6
9b2b7d69 5325else
13b2be9c
DJ
5326 if test -n "$ac_ct_CC"; then
5327 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5328else
5329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330for as_dir in $PATH
5331do
5332 IFS=$as_save_IFS
5333 test -z "$as_dir" && as_dir=.
5334 for ac_exec_ext in '' $ac_executable_extensions; do
5335 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336 ac_cv_prog_ac_ct_CC="cc"
5337 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5338 break 2
5339 fi
5340done
5341done
5342
5343fi
5344fi
5345ac_ct_CC=$ac_cv_prog_ac_ct_CC
5346if test -n "$ac_ct_CC"; then
5347 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
5348echo "${ECHO_T}$ac_ct_CC" >&6
5349else
5350 echo "$as_me:$LINENO: result: no" >&5
5351echo "${ECHO_T}no" >&6
5352fi
5353
5354 CC=$ac_ct_CC
5355else
5356 CC="$ac_cv_prog_CC"
6840198f
NC
5357fi
5358
13b2be9c 5359fi
252b5132
RH
5360if test -z "$CC"; then
5361 # Extract the first word of "cc", so it can be a program name with args.
5362set dummy cc; ac_word=$2
13b2be9c
DJ
5363echo "$as_me:$LINENO: checking for $ac_word" >&5
5364echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5365if test "${ac_cv_prog_CC+set}" = set; then
5366 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
5367else
5368 if test -n "$CC"; then
5369 ac_cv_prog_CC="$CC" # Let the user override the test.
5370else
252b5132 5371 ac_prog_rejected=no
13b2be9c
DJ
5372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5373for as_dir in $PATH
5374do
5375 IFS=$as_save_IFS
5376 test -z "$as_dir" && as_dir=.
5377 for ac_exec_ext in '' $ac_executable_extensions; do
5378 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5379 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5380 ac_prog_rejected=yes
5381 continue
5382 fi
5383 ac_cv_prog_CC="cc"
5384 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5385 break 2
5386 fi
5387done
5388done
5389
252b5132
RH
5390if test $ac_prog_rejected = yes; then
5391 # We found a bogon in the path, so make sure we never use it.
5392 set dummy $ac_cv_prog_CC
5393 shift
13b2be9c 5394 if test $# != 0; then
252b5132
RH
5395 # We chose a different compiler from the bogus one.
5396 # However, it has the same basename, so the bogon will be chosen
5397 # first if we set CC to just the basename; use the full file name.
5398 shift
13b2be9c 5399 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
252b5132
RH
5400 fi
5401fi
5402fi
5403fi
13b2be9c 5404CC=$ac_cv_prog_CC
252b5132 5405if test -n "$CC"; then
13b2be9c
DJ
5406 echo "$as_me:$LINENO: result: $CC" >&5
5407echo "${ECHO_T}$CC" >&6
252b5132 5408else
13b2be9c
DJ
5409 echo "$as_me:$LINENO: result: no" >&5
5410echo "${ECHO_T}no" >&6
252b5132
RH
5411fi
5412
13b2be9c
DJ
5413fi
5414if test -z "$CC"; then
5415 if test -n "$ac_tool_prefix"; then
5416 for ac_prog in cl
5417 do
5418 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5419set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5420echo "$as_me:$LINENO: checking for $ac_word" >&5
5421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5422if test "${ac_cv_prog_CC+set}" = set; then
5423 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
5424else
5425 if test -n "$CC"; then
5426 ac_cv_prog_CC="$CC" # Let the user override the test.
5427else
13b2be9c
DJ
5428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5429for as_dir in $PATH
5430do
5431 IFS=$as_save_IFS
5432 test -z "$as_dir" && as_dir=.
5433 for ac_exec_ext in '' $ac_executable_extensions; do
5434 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5435 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5437 break 2
5438 fi
5439done
5440done
5441
252b5132
RH
5442fi
5443fi
13b2be9c 5444CC=$ac_cv_prog_CC
252b5132 5445if test -n "$CC"; then
13b2be9c
DJ
5446 echo "$as_me:$LINENO: result: $CC" >&5
5447echo "${ECHO_T}$CC" >&6
c8615825 5448else
13b2be9c
DJ
5449 echo "$as_me:$LINENO: result: no" >&5
5450echo "${ECHO_T}no" >&6
c8615825 5451fi
6840198f 5452
13b2be9c
DJ
5453 test -n "$CC" && break
5454 done
5455fi
5456if test -z "$CC"; then
5457 ac_ct_CC=$CC
5458 for ac_prog in cl
5459do
5460 # Extract the first word of "$ac_prog", so it can be a program name with args.
5461set dummy $ac_prog; ac_word=$2
5462echo "$as_me:$LINENO: checking for $ac_word" >&5
5463echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5464if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
5465 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 5466else
13b2be9c
DJ
5467 if test -n "$ac_ct_CC"; then
5468 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
c8615825 5469else
13b2be9c
DJ
5470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5471for as_dir in $PATH
5472do
5473 IFS=$as_save_IFS
5474 test -z "$as_dir" && as_dir=.
5475 for ac_exec_ext in '' $ac_executable_extensions; do
5476 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5477 ac_cv_prog_ac_ct_CC="$ac_prog"
5478 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5479 break 2
5480 fi
5481done
5482done
5483
c8615825
AM
5484fi
5485fi
13b2be9c
DJ
5486ac_ct_CC=$ac_cv_prog_ac_ct_CC
5487if test -n "$ac_ct_CC"; then
5488 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
5489echo "${ECHO_T}$ac_ct_CC" >&6
c8615825 5490else
13b2be9c
DJ
5491 echo "$as_me:$LINENO: result: no" >&5
5492echo "${ECHO_T}no" >&6
c8615825 5493fi
252b5132 5494
13b2be9c
DJ
5495 test -n "$ac_ct_CC" && break
5496done
5497
5498 CC=$ac_ct_CC
5499fi
5500
5501fi
5502
5503
5504test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
5505See \`config.log' for more details." >&5
5506echo "$as_me: error: no acceptable C compiler found in \$PATH
5507See \`config.log' for more details." >&2;}
5508 { (exit 1); exit 1; }; }
5509
5510# Provide some information about the compiler.
5511echo "$as_me:$LINENO:" \
5512 "checking for C compiler version" >&5
5513ac_compiler=`set X $ac_compile; echo $2`
5514{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
5515 (eval $ac_compiler --version </dev/null >&5) 2>&5
5516 ac_status=$?
5517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518 (exit $ac_status); }
5519{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
5520 (eval $ac_compiler -v </dev/null >&5) 2>&5
5521 ac_status=$?
5522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5523 (exit $ac_status); }
5524{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
5525 (eval $ac_compiler -V </dev/null >&5) 2>&5
5526 ac_status=$?
5527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5528 (exit $ac_status); }
5529
5530echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
5531echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
5532if test "${ac_cv_c_compiler_gnu+set}" = set; then
5533 echo $ECHO_N "(cached) $ECHO_C" >&6
5534else
5535 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
5536/* confdefs.h. */
5537_ACEOF
5538cat confdefs.h >>conftest.$ac_ext
5539cat >>conftest.$ac_ext <<_ACEOF
5540/* end confdefs.h. */
5541
5542int
5543main ()
5544{
5545#ifndef __GNUC__
5546 choke me
5547#endif
5548
5549 ;
5550 return 0;
5551}
5552_ACEOF
5553rm -f conftest.$ac_objext
5554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 5555 (eval $ac_compile) 2>conftest.er1
13b2be9c 5556 ac_status=$?
ab509236
L
5557 grep -v '^ *+' conftest.er1 >conftest.err
5558 rm -f conftest.er1
5559 cat conftest.err >&5
13b2be9c
DJ
5560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561 (exit $ac_status); } &&
ab509236
L
5562 { ac_try='test -z "$ac_c_werror_flag"
5563 || test ! -s conftest.err'
5564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5565 (eval $ac_try) 2>&5
5566 ac_status=$?
5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568 (exit $ac_status); }; } &&
5569 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
5570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5571 (eval $ac_try) 2>&5
5572 ac_status=$?
5573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574 (exit $ac_status); }; }; then
5575 ac_compiler_gnu=yes
5576else
5577 echo "$as_me: failed program was:" >&5
5578sed 's/^/| /' conftest.$ac_ext >&5
5579
5580ac_compiler_gnu=no
5581fi
ab509236 5582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
5583ac_cv_c_compiler_gnu=$ac_compiler_gnu
5584
5585fi
5586echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
5587echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
5588GCC=`test $ac_compiler_gnu = yes && echo yes`
5589ac_test_CFLAGS=${CFLAGS+set}
5590ac_save_CFLAGS=$CFLAGS
5591CFLAGS="-g"
5592echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
5593echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
5594if test "${ac_cv_prog_cc_g+set}" = set; then
5595 echo $ECHO_N "(cached) $ECHO_C" >&6
5596else
5597 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
5598/* confdefs.h. */
5599_ACEOF
5600cat confdefs.h >>conftest.$ac_ext
5601cat >>conftest.$ac_ext <<_ACEOF
5602/* end confdefs.h. */
5603
5604int
5605main ()
5606{
5607
5608 ;
5609 return 0;
5610}
5611_ACEOF
5612rm -f conftest.$ac_objext
5613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 5614 (eval $ac_compile) 2>conftest.er1
13b2be9c 5615 ac_status=$?
ab509236
L
5616 grep -v '^ *+' conftest.er1 >conftest.err
5617 rm -f conftest.er1
5618 cat conftest.err >&5
13b2be9c
DJ
5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5620 (exit $ac_status); } &&
ab509236
L
5621 { ac_try='test -z "$ac_c_werror_flag"
5622 || test ! -s conftest.err'
5623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5624 (eval $ac_try) 2>&5
5625 ac_status=$?
5626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); }; } &&
5628 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
5629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5630 (eval $ac_try) 2>&5
5631 ac_status=$?
5632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5633 (exit $ac_status); }; }; then
252b5132
RH
5634 ac_cv_prog_cc_g=yes
5635else
13b2be9c
DJ
5636 echo "$as_me: failed program was:" >&5
5637sed 's/^/| /' conftest.$ac_ext >&5
c8615825 5638
13b2be9c 5639ac_cv_prog_cc_g=no
252b5132 5640fi
ab509236 5641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
5642fi
5643echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
5644echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
252b5132 5645if test "$ac_test_CFLAGS" = set; then
13b2be9c 5646 CFLAGS=$ac_save_CFLAGS
252b5132
RH
5647elif test $ac_cv_prog_cc_g = yes; then
5648 if test "$GCC" = yes; then
5649 CFLAGS="-g -O2"
5650 else
5651 CFLAGS="-g"
5652 fi
5653else
9b2b7d69
MM
5654 if test "$GCC" = yes; then
5655 CFLAGS="-O2"
5656 else
5657 CFLAGS=
5658 fi
5659fi
13b2be9c
DJ
5660echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
5661echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
5662if test "${ac_cv_prog_cc_stdc+set}" = set; then
5663 echo $ECHO_N "(cached) $ECHO_C" >&6
5664else
5665 ac_cv_prog_cc_stdc=no
5666ac_save_CC=$CC
5667cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
5668/* confdefs.h. */
5669_ACEOF
5670cat confdefs.h >>conftest.$ac_ext
5671cat >>conftest.$ac_ext <<_ACEOF
5672/* end confdefs.h. */
5673#include <stdarg.h>
5674#include <stdio.h>
5675#include <sys/types.h>
5676#include <sys/stat.h>
5677/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5678struct buf { int x; };
5679FILE * (*rcsopen) (struct buf *, struct stat *, int);
5680static char *e (p, i)
5681 char **p;
5682 int i;
5683{
5684 return p[i];
5685}
5686static char *f (char * (*g) (char **, int), char **p, ...)
5687{
5688 char *s;
5689 va_list v;
5690 va_start (v,p);
5691 s = g (p, va_arg (v,int));
5692 va_end (v);
5693 return s;
5694}
ab509236
L
5695
5696/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5697 function prototypes and stuff, but not '\xHH' hex character constants.
5698 These don't provoke an error unfortunately, instead are silently treated
5699 as 'x'. The following induces an error, until -std1 is added to get
5700 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5701 array size at least. It's necessary to write '\x00'==0 to get something
5702 that's true only with -std1. */
5703int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5704
13b2be9c
DJ
5705int test (int i, double x);
5706struct s1 {int (*f) (int a);};
5707struct s2 {int (*f) (double a);};
5708int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5709int argc;
5710char **argv;
5711int
5712main ()
5713{
5714return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5715 ;
5716 return 0;
5717}
5718_ACEOF
5719# Don't try gcc -ansi; that turns off useful extensions and
5720# breaks some systems' header files.
5721# AIX -qlanglvl=ansi
5722# Ultrix and OSF/1 -std1
5723# HP-UX 10.20 and later -Ae
5724# HP-UX older versions -Aa -D_HPUX_SOURCE
5725# SVR4 -Xc -D__EXTENSIONS__
5726for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5727do
5728 CC="$ac_save_CC $ac_arg"
5729 rm -f conftest.$ac_objext
5730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 5731 (eval $ac_compile) 2>conftest.er1
13b2be9c 5732 ac_status=$?
ab509236
L
5733 grep -v '^ *+' conftest.er1 >conftest.err
5734 rm -f conftest.er1
5735 cat conftest.err >&5
13b2be9c
DJ
5736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737 (exit $ac_status); } &&
ab509236
L
5738 { ac_try='test -z "$ac_c_werror_flag"
5739 || test ! -s conftest.err'
5740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5741 (eval $ac_try) 2>&5
5742 ac_status=$?
5743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744 (exit $ac_status); }; } &&
5745 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
5746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5747 (eval $ac_try) 2>&5
5748 ac_status=$?
5749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750 (exit $ac_status); }; }; then
5751 ac_cv_prog_cc_stdc=$ac_arg
5752break
5753else
5754 echo "$as_me: failed program was:" >&5
5755sed 's/^/| /' conftest.$ac_ext >&5
5756
5757fi
ab509236 5758rm -f conftest.err conftest.$ac_objext
13b2be9c
DJ
5759done
5760rm -f conftest.$ac_ext conftest.$ac_objext
5761CC=$ac_save_CC
5762
5763fi
5764
5765case "x$ac_cv_prog_cc_stdc" in
5766 x|xno)
5767 echo "$as_me:$LINENO: result: none needed" >&5
5768echo "${ECHO_T}none needed" >&6 ;;
5769 *)
5770 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
5771echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
5772 CC="$CC $ac_cv_prog_cc_stdc" ;;
5773esac
5774
5775# Some people use a C++ compiler to compile C. Since we use `exit',
5776# in C++ we need to declare it. In case someone uses the same compiler
5777# for both compiling C and C++ we need to have the C++ compiler decide
5778# the declaration of exit, since it's the most demanding environment.
5779cat >conftest.$ac_ext <<_ACEOF
5780#ifndef __cplusplus
5781 choke me
5782#endif
5783_ACEOF
5784rm -f conftest.$ac_objext
5785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 5786 (eval $ac_compile) 2>conftest.er1
13b2be9c 5787 ac_status=$?
ab509236
L
5788 grep -v '^ *+' conftest.er1 >conftest.err
5789 rm -f conftest.er1
5790 cat conftest.err >&5
13b2be9c
DJ
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); } &&
ab509236
L
5793 { ac_try='test -z "$ac_c_werror_flag"
5794 || test ! -s conftest.err'
5795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5796 (eval $ac_try) 2>&5
5797 ac_status=$?
5798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5799 (exit $ac_status); }; } &&
5800 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
5801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5802 (eval $ac_try) 2>&5
5803 ac_status=$?
5804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5805 (exit $ac_status); }; }; then
5806 for ac_declaration in \
ab509236 5807 '' \
13b2be9c
DJ
5808 'extern "C" void std::exit (int) throw (); using std::exit;' \
5809 'extern "C" void std::exit (int); using std::exit;' \
5810 'extern "C" void exit (int) throw ();' \
5811 'extern "C" void exit (int);' \
5812 'void exit (int);'
5813do
5814 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
5815/* confdefs.h. */
5816_ACEOF
5817cat confdefs.h >>conftest.$ac_ext
5818cat >>conftest.$ac_ext <<_ACEOF
5819/* end confdefs.h. */
13dfd2d0 5820$ac_declaration
ab509236 5821#include <stdlib.h>
13b2be9c
DJ
5822int
5823main ()
5824{
5825exit (42);
5826 ;
5827 return 0;
5828}
5829_ACEOF
5830rm -f conftest.$ac_objext
5831if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 5832 (eval $ac_compile) 2>conftest.er1
13b2be9c 5833 ac_status=$?
ab509236
L
5834 grep -v '^ *+' conftest.er1 >conftest.err
5835 rm -f conftest.er1
5836 cat conftest.err >&5
13b2be9c
DJ
5837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5838 (exit $ac_status); } &&
ab509236
L
5839 { ac_try='test -z "$ac_c_werror_flag"
5840 || test ! -s conftest.err'
5841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5842 (eval $ac_try) 2>&5
5843 ac_status=$?
5844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5845 (exit $ac_status); }; } &&
5846 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
5847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5848 (eval $ac_try) 2>&5
5849 ac_status=$?
5850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5851 (exit $ac_status); }; }; then
5852 :
5853else
5854 echo "$as_me: failed program was:" >&5
5855sed 's/^/| /' conftest.$ac_ext >&5
5856
5857continue
5858fi
ab509236 5859rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c 5860 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
5861/* confdefs.h. */
5862_ACEOF
5863cat confdefs.h >>conftest.$ac_ext
5864cat >>conftest.$ac_ext <<_ACEOF
5865/* end confdefs.h. */
5866$ac_declaration
5867int
5868main ()
5869{
5870exit (42);
5871 ;
5872 return 0;
5873}
5874_ACEOF
5875rm -f conftest.$ac_objext
5876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 5877 (eval $ac_compile) 2>conftest.er1
13b2be9c 5878 ac_status=$?
ab509236
L
5879 grep -v '^ *+' conftest.er1 >conftest.err
5880 rm -f conftest.er1
5881 cat conftest.err >&5
13b2be9c
DJ
5882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5883 (exit $ac_status); } &&
ab509236
L
5884 { ac_try='test -z "$ac_c_werror_flag"
5885 || test ! -s conftest.err'
5886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5887 (eval $ac_try) 2>&5
5888 ac_status=$?
5889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5890 (exit $ac_status); }; } &&
5891 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
5892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5893 (eval $ac_try) 2>&5
5894 ac_status=$?
5895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896 (exit $ac_status); }; }; then
5897 break
5898else
5899 echo "$as_me: failed program was:" >&5
5900sed 's/^/| /' conftest.$ac_ext >&5
5901
5902fi
ab509236 5903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
5904done
5905rm -f conftest*
5906if test -n "$ac_declaration"; then
5907 echo '#ifdef __cplusplus' >>confdefs.h
5908 echo $ac_declaration >>confdefs.h
5909 echo '#endif' >>confdefs.h
5910fi
5911
5912else
5913 echo "$as_me: failed program was:" >&5
5914sed 's/^/| /' conftest.$ac_ext >&5
5915
5916fi
ab509236 5917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
5918ac_ext=c
5919ac_cpp='$CPP $CPPFLAGS'
5920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5922ac_compiler_gnu=$ac_cv_c_compiler_gnu
c8615825
AM
5923
5924
5925for ac_prog in 'bison -y' byacc
9b2b7d69 5926do
13b2be9c 5927 # Extract the first word of "$ac_prog", so it can be a program name with args.
c8615825 5928set dummy $ac_prog; ac_word=$2
13b2be9c
DJ
5929echo "$as_me:$LINENO: checking for $ac_word" >&5
5930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5931if test "${ac_cv_prog_YACC+set}" = set; then
5932 echo $ECHO_N "(cached) $ECHO_C" >&6
c8615825
AM
5933else
5934 if test -n "$YACC"; then
5935 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5936else
13b2be9c
DJ
5937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5938for as_dir in $PATH
5939do
5940 IFS=$as_save_IFS
5941 test -z "$as_dir" && as_dir=.
5942 for ac_exec_ext in '' $ac_executable_extensions; do
5943 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5944 ac_cv_prog_YACC="$ac_prog"
5945 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5946 break 2
5947 fi
5948done
5949done
5950
c8615825
AM
5951fi
5952fi
13b2be9c 5953YACC=$ac_cv_prog_YACC
c8615825 5954if test -n "$YACC"; then
13b2be9c
DJ
5955 echo "$as_me:$LINENO: result: $YACC" >&5
5956echo "${ECHO_T}$YACC" >&6
c8615825 5957else
13b2be9c
DJ
5958 echo "$as_me:$LINENO: result: no" >&5
5959echo "${ECHO_T}no" >&6
c8615825
AM
5960fi
5961
13b2be9c 5962 test -n "$YACC" && break
c8615825
AM
5963done
5964test -n "$YACC" || YACC="yacc"
5965
13b2be9c
DJ
5966for ac_prog in flex lex
5967do
5968 # Extract the first word of "$ac_prog", so it can be a program name with args.
5969set dummy $ac_prog; ac_word=$2
5970echo "$as_me:$LINENO: checking for $ac_word" >&5
5971echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5972if test "${ac_cv_prog_LEX+set}" = set; then
5973 echo $ECHO_N "(cached) $ECHO_C" >&6
c8615825 5974else
13b2be9c
DJ
5975 if test -n "$LEX"; then
5976 ac_cv_prog_LEX="$LEX" # Let the user override the test.
9b2b7d69 5977else
13b2be9c
DJ
5978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5979for as_dir in $PATH
5980do
5981 IFS=$as_save_IFS
5982 test -z "$as_dir" && as_dir=.
5983 for ac_exec_ext in '' $ac_executable_extensions; do
5984 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5985 ac_cv_prog_LEX="$ac_prog"
5986 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5987 break 2
5988 fi
5989done
5990done
5991
5992fi
5993fi
5994LEX=$ac_cv_prog_LEX
5995if test -n "$LEX"; then
5996 echo "$as_me:$LINENO: result: $LEX" >&5
5997echo "${ECHO_T}$LEX" >&6
c8615825 5998else
13b2be9c
DJ
5999 echo "$as_me:$LINENO: result: no" >&5
6000echo "${ECHO_T}no" >&6
6001fi
6002
6003 test -n "$LEX" && break
6004done
6005test -n "$LEX" || LEX=":"
6006
6007if test -z "$LEXLIB"
6008then
6009 echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
6010echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
6011if test "${ac_cv_lib_fl_yywrap+set}" = set; then
6012 echo $ECHO_N "(cached) $ECHO_C" >&6
6013else
6014 ac_check_lib_save_LIBS=$LIBS
6015LIBS="-lfl $LIBS"
6016cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6017/* confdefs.h. */
6018_ACEOF
6019cat confdefs.h >>conftest.$ac_ext
6020cat >>conftest.$ac_ext <<_ACEOF
6021/* end confdefs.h. */
6022
6023/* Override any gcc2 internal prototype to avoid an error. */
6024#ifdef __cplusplus
6025extern "C"
6026#endif
6027/* We use char because int might match the return type of a gcc2
6028 builtin and then its argument prototype would still apply. */
6029char yywrap ();
6030int
6031main ()
6032{
6033yywrap ();
6034 ;
6035 return 0;
6036}
6037_ACEOF
6038rm -f conftest.$ac_objext conftest$ac_exeext
6039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 6040 (eval $ac_link) 2>conftest.er1
13b2be9c 6041 ac_status=$?
ab509236
L
6042 grep -v '^ *+' conftest.er1 >conftest.err
6043 rm -f conftest.er1
6044 cat conftest.err >&5
13b2be9c
DJ
6045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6046 (exit $ac_status); } &&
ab509236
L
6047 { ac_try='test -z "$ac_c_werror_flag"
6048 || test ! -s conftest.err'
6049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6050 (eval $ac_try) 2>&5
6051 ac_status=$?
6052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6053 (exit $ac_status); }; } &&
6054 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
6055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6056 (eval $ac_try) 2>&5
6057 ac_status=$?
6058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059 (exit $ac_status); }; }; then
6060 ac_cv_lib_fl_yywrap=yes
6061else
6062 echo "$as_me: failed program was:" >&5
6063sed 's/^/| /' conftest.$ac_ext >&5
6064
6065ac_cv_lib_fl_yywrap=no
6066fi
ab509236
L
6067rm -f conftest.err conftest.$ac_objext \
6068 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
6069LIBS=$ac_check_lib_save_LIBS
6070fi
6071echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
6072echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
6073if test $ac_cv_lib_fl_yywrap = yes; then
6074 LEXLIB="-lfl"
6075else
6076 echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
6077echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
6078if test "${ac_cv_lib_l_yywrap+set}" = set; then
6079 echo $ECHO_N "(cached) $ECHO_C" >&6
6080else
6081 ac_check_lib_save_LIBS=$LIBS
6082LIBS="-ll $LIBS"
6083cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6084/* confdefs.h. */
6085_ACEOF
6086cat confdefs.h >>conftest.$ac_ext
6087cat >>conftest.$ac_ext <<_ACEOF
6088/* end confdefs.h. */
6089
6090/* Override any gcc2 internal prototype to avoid an error. */
6091#ifdef __cplusplus
6092extern "C"
6093#endif
6094/* We use char because int might match the return type of a gcc2
6095 builtin and then its argument prototype would still apply. */
6096char yywrap ();
6097int
6098main ()
6099{
6100yywrap ();
6101 ;
6102 return 0;
6103}
6104_ACEOF
6105rm -f conftest.$ac_objext conftest$ac_exeext
6106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 6107 (eval $ac_link) 2>conftest.er1
13b2be9c 6108 ac_status=$?
ab509236
L
6109 grep -v '^ *+' conftest.er1 >conftest.err
6110 rm -f conftest.er1
6111 cat conftest.err >&5
13b2be9c
DJ
6112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6113 (exit $ac_status); } &&
ab509236
L
6114 { ac_try='test -z "$ac_c_werror_flag"
6115 || test ! -s conftest.err'
6116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6117 (eval $ac_try) 2>&5
6118 ac_status=$?
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120 (exit $ac_status); }; } &&
6121 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
6122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6123 (eval $ac_try) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); }; }; then
6127 ac_cv_lib_l_yywrap=yes
9b2b7d69 6128else
13b2be9c
DJ
6129 echo "$as_me: failed program was:" >&5
6130sed 's/^/| /' conftest.$ac_ext >&5
6131
6132ac_cv_lib_l_yywrap=no
9b2b7d69 6133fi
ab509236
L
6134rm -f conftest.err conftest.$ac_objext \
6135 conftest$ac_exeext conftest.$ac_ext
13b2be9c 6136LIBS=$ac_check_lib_save_LIBS
9b2b7d69 6137fi
13b2be9c
DJ
6138echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
6139echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
6140if test $ac_cv_lib_l_yywrap = yes; then
6141 LEXLIB="-ll"
252b5132 6142fi
13b2be9c
DJ
6143
6144fi
6145
252b5132 6146fi
13b2be9c
DJ
6147
6148if test "x$LEX" != "x:"; then
6149 echo "$as_me:$LINENO: checking lex output file root" >&5
6150echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
6151if test "${ac_cv_prog_lex_root+set}" = set; then
6152 echo $ECHO_N "(cached) $ECHO_C" >&6
6153else
6154 # The minimal lex program is just a single line: %%. But some broken lexes
6155# (Solaris, I think it was) want two %% lines, so accommodate them.
6156cat >conftest.l <<_ACEOF
6157%%
6158%%
6159_ACEOF
6160{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
6161 (eval $LEX conftest.l) 2>&5
6162 ac_status=$?
6163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164 (exit $ac_status); }
6165if test -f lex.yy.c; then
6166 ac_cv_prog_lex_root=lex.yy
6167elif test -f lexyy.c; then
6168 ac_cv_prog_lex_root=lexyy
252b5132 6169else
13b2be9c
DJ
6170 { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
6171echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
6172 { (exit 1); exit 1; }; }
252b5132 6173fi
13b2be9c
DJ
6174fi
6175echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
6176echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
6177rm -f conftest.l
6178LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
252b5132 6179
13b2be9c
DJ
6180echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
6181echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
6182if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
6183 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6184else
13b2be9c
DJ
6185 # POSIX says lex can declare yytext either as a pointer or an array; the
6186# default is implementation-dependent. Figure out which it is, since
6187# not all implementations provide the %pointer and %array declarations.
6188ac_cv_prog_lex_yytext_pointer=no
6189echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
6190ac_save_LIBS=$LIBS
6191LIBS="$LIBS $LEXLIB"
6192cat >conftest.$ac_ext <<_ACEOF
6193`cat $LEX_OUTPUT_ROOT.c`
6194_ACEOF
6195rm -f conftest.$ac_objext conftest$ac_exeext
6196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 6197 (eval $ac_link) 2>conftest.er1
13b2be9c 6198 ac_status=$?
ab509236
L
6199 grep -v '^ *+' conftest.er1 >conftest.err
6200 rm -f conftest.er1
6201 cat conftest.err >&5
13b2be9c
DJ
6202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6203 (exit $ac_status); } &&
ab509236
L
6204 { ac_try='test -z "$ac_c_werror_flag"
6205 || test ! -s conftest.err'
6206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6207 (eval $ac_try) 2>&5
6208 ac_status=$?
6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210 (exit $ac_status); }; } &&
6211 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
6212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6213 (eval $ac_try) 2>&5
6214 ac_status=$?
6215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6216 (exit $ac_status); }; }; then
6217 ac_cv_prog_lex_yytext_pointer=yes
252b5132 6218else
13b2be9c
DJ
6219 echo "$as_me: failed program was:" >&5
6220sed 's/^/| /' conftest.$ac_ext >&5
6221
252b5132 6222fi
ab509236
L
6223rm -f conftest.err conftest.$ac_objext \
6224 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
6225LIBS=$ac_save_LIBS
6226rm -f "${LEX_OUTPUT_ROOT}.c"
6227
252b5132 6228fi
13b2be9c
DJ
6229echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
6230echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
6231if test $ac_cv_prog_lex_yytext_pointer = yes; then
6232
6233cat >>confdefs.h <<\_ACEOF
6234#define YYTEXT_POINTER 1
6235_ACEOF
6236
6237fi
6238
6239fi
6240if test "$LEX" = :; then
6241 LEX=${am_missing_run}flex
6242fi
6243
6244ALL_LINGUAS="fr tr es"
6245if test -n "$ac_tool_prefix"; then
6246 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6247set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6248echo "$as_me:$LINENO: checking for $ac_word" >&5
6249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6250if test "${ac_cv_prog_RANLIB+set}" = set; then
6251 echo $ECHO_N "(cached) $ECHO_C" >&6
6252else
6253 if test -n "$RANLIB"; then
6254 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6255else
6256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259 IFS=$as_save_IFS
6260 test -z "$as_dir" && as_dir=.
6261 for ac_exec_ext in '' $ac_executable_extensions; do
6262 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6263 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6264 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6265 break 2
6266 fi
6267done
6268done
6269
6270fi
6271fi
6272RANLIB=$ac_cv_prog_RANLIB
6273if test -n "$RANLIB"; then
6274 echo "$as_me:$LINENO: result: $RANLIB" >&5
6275echo "${ECHO_T}$RANLIB" >&6
252b5132 6276else
13b2be9c
DJ
6277 echo "$as_me:$LINENO: result: no" >&5
6278echo "${ECHO_T}no" >&6
252b5132
RH
6279fi
6280
13b2be9c
DJ
6281fi
6282if test -z "$ac_cv_prog_RANLIB"; then
6283 ac_ct_RANLIB=$RANLIB
6284 # Extract the first word of "ranlib", so it can be a program name with args.
6285set dummy ranlib; ac_word=$2
6286echo "$as_me:$LINENO: checking for $ac_word" >&5
6287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6288if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6289 echo $ECHO_N "(cached) $ECHO_C" >&6
6290else
6291 if test -n "$ac_ct_RANLIB"; then
6292 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6293else
6294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6295for as_dir in $PATH
6296do
6297 IFS=$as_save_IFS
6298 test -z "$as_dir" && as_dir=.
6299 for ac_exec_ext in '' $ac_executable_extensions; do
6300 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6301 ac_cv_prog_ac_ct_RANLIB="ranlib"
6302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6303 break 2
6304 fi
6305done
6840198f 6306done
d6d788bd 6307
13b2be9c
DJ
6308 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6309fi
6310fi
6311ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6312if test -n "$ac_ct_RANLIB"; then
6313 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6314echo "${ECHO_T}$ac_ct_RANLIB" >&6
d6d788bd 6315else
13b2be9c
DJ
6316 echo "$as_me:$LINENO: result: no" >&5
6317echo "${ECHO_T}no" >&6
6318fi
6319
6320 RANLIB=$ac_ct_RANLIB
d6d788bd 6321else
13b2be9c
DJ
6322 RANLIB="$ac_cv_prog_RANLIB"
6323fi
6324
6325ac_ext=c
6326ac_cpp='$CPP $CPPFLAGS'
6327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6329ac_compiler_gnu=$ac_cv_c_compiler_gnu
6330echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6331echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
6332# On Suns, sometimes $CPP names a directory.
6333if test -n "$CPP" && test -d "$CPP"; then
6334 CPP=
d6d788bd 6335fi
13b2be9c
DJ
6336if test -z "$CPP"; then
6337 if test "${ac_cv_prog_CPP+set}" = set; then
6338 echo $ECHO_N "(cached) $ECHO_C" >&6
6339else
6340 # Double quotes because CPP needs to be expanded
6341 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6342 do
6343 ac_preproc_ok=false
6344for ac_c_preproc_warn_flag in '' yes
6345do
6346 # Use a header file that comes with gcc, so configuring glibc
6347 # with a fresh cross-compiler works.
6348 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6349 # <limits.h> exists even on freestanding compilers.
6350 # On the NeXT, cc -E runs the code through the compiler's parser,
6351 # not just through cpp. "Syntax error" is here to catch this case.
6352 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6353/* confdefs.h. */
6354_ACEOF
6355cat confdefs.h >>conftest.$ac_ext
6356cat >>conftest.$ac_ext <<_ACEOF
6357/* end confdefs.h. */
6358#ifdef __STDC__
6359# include <limits.h>
6360#else
6361# include <assert.h>
6362#endif
ab509236 6363 Syntax error
13b2be9c
DJ
6364_ACEOF
6365if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6366 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6367 ac_status=$?
6368 grep -v '^ *+' conftest.er1 >conftest.err
6369 rm -f conftest.er1
6370 cat conftest.err >&5
6371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6372 (exit $ac_status); } >/dev/null; then
6373 if test -s conftest.err; then
6374 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 6375 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
6376 else
6377 ac_cpp_err=
6378 fi
6379else
6380 ac_cpp_err=yes
d6d788bd 6381fi
13b2be9c
DJ
6382if test -z "$ac_cpp_err"; then
6383 :
6384else
6385 echo "$as_me: failed program was:" >&5
6386sed 's/^/| /' conftest.$ac_ext >&5
6387
6388 # Broken: fails on valid input.
6389continue
6390fi
6391rm -f conftest.err conftest.$ac_ext
6392
6393 # OK, works on sane cases. Now check whether non-existent headers
6394 # can be detected and how.
6395 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6396/* confdefs.h. */
6397_ACEOF
6398cat confdefs.h >>conftest.$ac_ext
6399cat >>conftest.$ac_ext <<_ACEOF
6400/* end confdefs.h. */
6401#include <ac_nonexistent.h>
6402_ACEOF
6403if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6404 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6405 ac_status=$?
6406 grep -v '^ *+' conftest.er1 >conftest.err
6407 rm -f conftest.er1
6408 cat conftest.err >&5
6409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6410 (exit $ac_status); } >/dev/null; then
6411 if test -s conftest.err; then
6412 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 6413 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
6414 else
6415 ac_cpp_err=
6416 fi
d6d788bd 6417else
13b2be9c 6418 ac_cpp_err=yes
d6d788bd 6419fi
13b2be9c
DJ
6420if test -z "$ac_cpp_err"; then
6421 # Broken: success on invalid input.
6422continue
6423else
6424 echo "$as_me: failed program was:" >&5
6425sed 's/^/| /' conftest.$ac_ext >&5
6840198f 6426
13b2be9c
DJ
6427 # Passes both tests.
6428ac_preproc_ok=:
6429break
6430fi
6431rm -f conftest.err conftest.$ac_ext
252b5132 6432
13b2be9c
DJ
6433done
6434# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6435rm -f conftest.err conftest.$ac_ext
6436if $ac_preproc_ok; then
6437 break
9b2b7d69 6438fi
13b2be9c
DJ
6439
6440 done
6441 ac_cv_prog_CPP=$CPP
9b2b7d69 6442
d6d788bd 6443fi
13b2be9c 6444 CPP=$ac_cv_prog_CPP
c8615825 6445else
13b2be9c 6446 ac_cv_prog_CPP=$CPP
c8615825 6447fi
13b2be9c
DJ
6448echo "$as_me:$LINENO: result: $CPP" >&5
6449echo "${ECHO_T}$CPP" >&6
6450ac_preproc_ok=false
6451for ac_c_preproc_warn_flag in '' yes
6452do
6453 # Use a header file that comes with gcc, so configuring glibc
6454 # with a fresh cross-compiler works.
6455 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6456 # <limits.h> exists even on freestanding compilers.
6457 # On the NeXT, cc -E runs the code through the compiler's parser,
6458 # not just through cpp. "Syntax error" is here to catch this case.
6459 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6460/* confdefs.h. */
6461_ACEOF
6462cat confdefs.h >>conftest.$ac_ext
6463cat >>conftest.$ac_ext <<_ACEOF
6464/* end confdefs.h. */
6465#ifdef __STDC__
6466# include <limits.h>
6467#else
6468# include <assert.h>
6469#endif
ab509236 6470 Syntax error
13b2be9c
DJ
6471_ACEOF
6472if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6473 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6474 ac_status=$?
6475 grep -v '^ *+' conftest.er1 >conftest.err
6476 rm -f conftest.er1
6477 cat conftest.err >&5
6478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6479 (exit $ac_status); } >/dev/null; then
6480 if test -s conftest.err; then
6481 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 6482 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
6483 else
6484 ac_cpp_err=
6485 fi
6486else
6487 ac_cpp_err=yes
252b5132 6488fi
13b2be9c
DJ
6489if test -z "$ac_cpp_err"; then
6490 :
252b5132 6491else
13b2be9c
DJ
6492 echo "$as_me: failed program was:" >&5
6493sed 's/^/| /' conftest.$ac_ext >&5
6494
6495 # Broken: fails on valid input.
6496continue
6497fi
6498rm -f conftest.err conftest.$ac_ext
6499
6500 # OK, works on sane cases. Now check whether non-existent headers
6501 # can be detected and how.
6502 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6503/* confdefs.h. */
6504_ACEOF
6505cat confdefs.h >>conftest.$ac_ext
6506cat >>conftest.$ac_ext <<_ACEOF
6507/* end confdefs.h. */
6508#include <ac_nonexistent.h>
6509_ACEOF
6510if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6511 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6512 ac_status=$?
6513 grep -v '^ *+' conftest.er1 >conftest.err
6514 rm -f conftest.er1
6515 cat conftest.err >&5
6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); } >/dev/null; then
6518 if test -s conftest.err; then
6519 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 6520 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
6521 else
6522 ac_cpp_err=
6523 fi
252b5132 6524else
13b2be9c 6525 ac_cpp_err=yes
252b5132 6526fi
13b2be9c
DJ
6527if test -z "$ac_cpp_err"; then
6528 # Broken: success on invalid input.
6529continue
252b5132 6530else
13b2be9c
DJ
6531 echo "$as_me: failed program was:" >&5
6532sed 's/^/| /' conftest.$ac_ext >&5
c8615825 6533
13b2be9c
DJ
6534 # Passes both tests.
6535ac_preproc_ok=:
6536break
252b5132 6537fi
13b2be9c 6538rm -f conftest.err conftest.$ac_ext
252b5132 6539
13b2be9c
DJ
6540done
6541# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6542rm -f conftest.err conftest.$ac_ext
6543if $ac_preproc_ok; then
6544 :
6545else
6546 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
6547See \`config.log' for more details." >&5
6548echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
6549See \`config.log' for more details." >&2;}
6550 { (exit 1); exit 1; }; }
252b5132 6551fi
9b2b7d69 6552
13b2be9c
DJ
6553ac_ext=c
6554ac_cpp='$CPP $CPPFLAGS'
6555ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6556ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6557ac_compiler_gnu=$ac_cv_c_compiler_gnu
252b5132
RH
6558
6559
13b2be9c
DJ
6560echo "$as_me:$LINENO: checking for egrep" >&5
6561echo $ECHO_N "checking for egrep... $ECHO_C" >&6
6562if test "${ac_cv_prog_egrep+set}" = set; then
6563 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1 6564else
13b2be9c
DJ
6565 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
6566 then ac_cv_prog_egrep='grep -E'
6567 else ac_cv_prog_egrep='egrep'
c8615825 6568 fi
6840198f 6569fi
13b2be9c
DJ
6570echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
6571echo "${ECHO_T}$ac_cv_prog_egrep" >&6
6572 EGREP=$ac_cv_prog_egrep
6840198f 6573
13b2be9c
DJ
6574
6575echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6576echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6577if test "${ac_cv_header_stdc+set}" = set; then
6578 echo $ECHO_N "(cached) $ECHO_C" >&6
6840198f 6579else
13b2be9c 6580 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6581/* confdefs.h. */
6582_ACEOF
6583cat confdefs.h >>conftest.$ac_ext
6584cat >>conftest.$ac_ext <<_ACEOF
6585/* end confdefs.h. */
252b5132
RH
6586#include <stdlib.h>
6587#include <stdarg.h>
6588#include <string.h>
6589#include <float.h>
13b2be9c
DJ
6590
6591int
6592main ()
6593{
6594
6595 ;
6596 return 0;
6597}
6598_ACEOF
6599rm -f conftest.$ac_objext
6600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 6601 (eval $ac_compile) 2>conftest.er1
13b2be9c 6602 ac_status=$?
ab509236
L
6603 grep -v '^ *+' conftest.er1 >conftest.err
6604 rm -f conftest.er1
6605 cat conftest.err >&5
13b2be9c
DJ
6606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6607 (exit $ac_status); } &&
ab509236
L
6608 { ac_try='test -z "$ac_c_werror_flag"
6609 || test ! -s conftest.err'
6610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6611 (eval $ac_try) 2>&5
6612 ac_status=$?
6613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6614 (exit $ac_status); }; } &&
6615 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
6616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6617 (eval $ac_try) 2>&5
6618 ac_status=$?
6619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6620 (exit $ac_status); }; }; then
252b5132
RH
6621 ac_cv_header_stdc=yes
6622else
13b2be9c
DJ
6623 echo "$as_me: failed program was:" >&5
6624sed 's/^/| /' conftest.$ac_ext >&5
6625
6626ac_cv_header_stdc=no
252b5132 6627fi
ab509236 6628rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
252b5132
RH
6629
6630if test $ac_cv_header_stdc = yes; then
6631 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13b2be9c 6632 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6633/* confdefs.h. */
6634_ACEOF
6635cat confdefs.h >>conftest.$ac_ext
6636cat >>conftest.$ac_ext <<_ACEOF
6637/* end confdefs.h. */
252b5132 6638#include <string.h>
13b2be9c
DJ
6639
6640_ACEOF
252b5132 6641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13b2be9c 6642 $EGREP "memchr" >/dev/null 2>&1; then
252b5132
RH
6643 :
6644else
252b5132
RH
6645 ac_cv_header_stdc=no
6646fi
6647rm -f conftest*
6648
6649fi
6650
6651if test $ac_cv_header_stdc = yes; then
6652 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13b2be9c 6653 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6654/* confdefs.h. */
6655_ACEOF
6656cat confdefs.h >>conftest.$ac_ext
6657cat >>conftest.$ac_ext <<_ACEOF
6658/* end confdefs.h. */
252b5132 6659#include <stdlib.h>
13b2be9c
DJ
6660
6661_ACEOF
252b5132 6662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13b2be9c 6663 $EGREP "free" >/dev/null 2>&1; then
252b5132
RH
6664 :
6665else
252b5132
RH
6666 ac_cv_header_stdc=no
6667fi
6668rm -f conftest*
6669
6670fi
6671
6672if test $ac_cv_header_stdc = yes; then
6673 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13b2be9c 6674 if test "$cross_compiling" = yes; then
252b5132
RH
6675 :
6676else
13b2be9c 6677 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6678/* confdefs.h. */
6679_ACEOF
6680cat confdefs.h >>conftest.$ac_ext
6681cat >>conftest.$ac_ext <<_ACEOF
6682/* end confdefs.h. */
252b5132 6683#include <ctype.h>
13b2be9c
DJ
6684#if ((' ' & 0x0FF) == 0x020)
6685# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6686# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6687#else
6688# define ISLOWER(c) \
ab509236
L
6689 (('a' <= (c) && (c) <= 'i') \
6690 || ('j' <= (c) && (c) <= 'r') \
6691 || ('s' <= (c) && (c) <= 'z'))
13b2be9c
DJ
6692# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6693#endif
c8615825 6694
13b2be9c
DJ
6695#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6696int
6697main ()
6698{
6699 int i;
6700 for (i = 0; i < 256; i++)
6701 if (XOR (islower (i), ISLOWER (i))
ab509236 6702 || toupper (i) != TOUPPER (i))
13b2be9c
DJ
6703 exit(2);
6704 exit (0);
6705}
6706_ACEOF
6707rm -f conftest$ac_exeext
6708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6709 (eval $ac_link) 2>&5
6710 ac_status=$?
6711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6714 (eval $ac_try) 2>&5
6715 ac_status=$?
6716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717 (exit $ac_status); }; }; then
c8615825
AM
6718 :
6719else
13b2be9c
DJ
6720 echo "$as_me: program exited with status $ac_status" >&5
6721echo "$as_me: failed program was:" >&5
6722sed 's/^/| /' conftest.$ac_ext >&5
6723
6724( exit $ac_status )
6725ac_cv_header_stdc=no
c8615825 6726fi
ab509236 6727rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c8615825 6728fi
c8615825 6729fi
9b2b7d69 6730fi
13b2be9c
DJ
6731echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6732echo "${ECHO_T}$ac_cv_header_stdc" >&6
c8615825 6733if test $ac_cv_header_stdc = yes; then
13b2be9c
DJ
6734
6735cat >>confdefs.h <<\_ACEOF
c8615825 6736#define STDC_HEADERS 1
13b2be9c 6737_ACEOF
9b2b7d69 6738
c8615825
AM
6739fi
6740
13b2be9c
DJ
6741echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
6742echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
6743if test "${ac_cv_c_const+set}" = set; then
6744 echo $ECHO_N "(cached) $ECHO_C" >&6
6745else
6746 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6747/* confdefs.h. */
6748_ACEOF
6749cat confdefs.h >>conftest.$ac_ext
6750cat >>conftest.$ac_ext <<_ACEOF
6751/* end confdefs.h. */
c8615825 6752
13b2be9c
DJ
6753int
6754main ()
6755{
6756/* FIXME: Include the comments suggested by Paul. */
6757#ifndef __cplusplus
6758 /* Ultrix mips cc rejects this. */
6759 typedef int charset[2];
6760 const charset x;
6761 /* SunOS 4.1.1 cc rejects this. */
6762 char const *const *ccp;
6763 char **p;
6764 /* NEC SVR4.0.2 mips cc rejects this. */
6765 struct point {int x, y;};
6766 static struct point const zero = {0,0};
6767 /* AIX XL C 1.02.0.0 rejects this.
6768 It does not let you subtract one const X* pointer from another in
6769 an arm of an if-expression whose if-part is not a constant
6770 expression */
6771 const char *g = "string";
6772 ccp = &g + (g ? g-g : 0);
6773 /* HPUX 7.0 cc rejects these. */
6774 ++ccp;
6775 p = (char**) ccp;
6776 ccp = (char const *const *) p;
6777 { /* SCO 3.2v4 cc rejects this. */
6778 char *t;
6779 char const *s = 0 ? (char *) 0 : (char const *) 0;
6780
6781 *t++ = 0;
6782 }
6783 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6784 int x[] = {25, 17};
6785 const int *foo = &x[0];
6786 ++foo;
6787 }
6788 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6789 typedef const int *iptr;
6790 iptr p = 0;
6791 ++p;
6792 }
6793 { /* AIX XL C 1.02.0.0 rejects this saying
6794 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6795 struct s { int j; const int *ap[3]; };
6796 struct s *b; b->j = 5;
6797 }
6798 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6799 const int foo = 10;
6800 }
6801#endif
6802
6803 ;
6804 return 0;
6805}
6806_ACEOF
6807rm -f conftest.$ac_objext
6808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 6809 (eval $ac_compile) 2>conftest.er1
13b2be9c 6810 ac_status=$?
ab509236
L
6811 grep -v '^ *+' conftest.er1 >conftest.err
6812 rm -f conftest.er1
6813 cat conftest.err >&5
13b2be9c
DJ
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); } &&
ab509236
L
6816 { ac_try='test -z "$ac_c_werror_flag"
6817 || test ! -s conftest.err'
6818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6819 (eval $ac_try) 2>&5
6820 ac_status=$?
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6822 (exit $ac_status); }; } &&
6823 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
6824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6825 (eval $ac_try) 2>&5
6826 ac_status=$?
6827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6828 (exit $ac_status); }; }; then
252b5132
RH
6829 ac_cv_c_const=yes
6830else
13b2be9c
DJ
6831 echo "$as_me: failed program was:" >&5
6832sed 's/^/| /' conftest.$ac_ext >&5
6833
6834ac_cv_c_const=no
252b5132 6835fi
ab509236 6836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
252b5132 6837fi
13b2be9c
DJ
6838echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
6839echo "${ECHO_T}$ac_cv_c_const" >&6
c8615825 6840if test $ac_cv_c_const = no; then
13b2be9c
DJ
6841
6842cat >>confdefs.h <<\_ACEOF
6843#define const
6844_ACEOF
252b5132
RH
6845
6846fi
6847
13b2be9c
DJ
6848echo "$as_me:$LINENO: checking for inline" >&5
6849echo $ECHO_N "checking for inline... $ECHO_C" >&6
6850if test "${ac_cv_c_inline+set}" = set; then
6851 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
6852else
6853 ac_cv_c_inline=no
6854for ac_kw in inline __inline__ __inline; do
13b2be9c 6855 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6856/* confdefs.h. */
6857_ACEOF
6858cat confdefs.h >>conftest.$ac_ext
6859cat >>conftest.$ac_ext <<_ACEOF
6860/* end confdefs.h. */
6861#ifndef __cplusplus
6862typedef int foo_t;
6863static $ac_kw foo_t static_foo () {return 0; }
6864$ac_kw foo_t foo () {return 0; }
6865#endif
252b5132 6866
13b2be9c
DJ
6867_ACEOF
6868rm -f conftest.$ac_objext
6869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 6870 (eval $ac_compile) 2>conftest.er1
13b2be9c 6871 ac_status=$?
ab509236
L
6872 grep -v '^ *+' conftest.er1 >conftest.err
6873 rm -f conftest.er1
6874 cat conftest.err >&5
13b2be9c
DJ
6875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876 (exit $ac_status); } &&
ab509236
L
6877 { ac_try='test -z "$ac_c_werror_flag"
6878 || test ! -s conftest.err'
6879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6880 (eval $ac_try) 2>&5
6881 ac_status=$?
6882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6883 (exit $ac_status); }; } &&
6884 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
6885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6886 (eval $ac_try) 2>&5
6887 ac_status=$?
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); }; }; then
d6d788bd 6890 ac_cv_c_inline=$ac_kw; break
6840198f 6891else
13b2be9c
DJ
6892 echo "$as_me: failed program was:" >&5
6893sed 's/^/| /' conftest.$ac_ext >&5
6894
6840198f 6895fi
ab509236 6896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
d6d788bd 6897done
6840198f
NC
6898
6899fi
13b2be9c
DJ
6900echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
6901echo "${ECHO_T}$ac_cv_c_inline" >&6
ab509236
L
6902
6903
13b2be9c 6904case $ac_cv_c_inline in
d6d788bd 6905 inline | yes) ;;
ab509236
L
6906 *)
6907 case $ac_cv_c_inline in
6908 no) ac_val=;;
6909 *) ac_val=$ac_cv_c_inline;;
6910 esac
6911 cat >>confdefs.h <<_ACEOF
6912#ifndef __cplusplus
6913#define inline $ac_val
6914#endif
13b2be9c 6915_ACEOF
ab509236 6916 ;;
d6d788bd
L
6917esac
6918
13b2be9c
DJ
6919# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
ab509236 6930 inttypes.h stdint.h unistd.h
13b2be9c
DJ
6931do
6932as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6933echo "$as_me:$LINENO: checking for $ac_header" >&5
6934echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6935if eval "test \"\${$as_ac_Header+set}\" = set"; then
6936 echo $ECHO_N "(cached) $ECHO_C" >&6
6937else
6938 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6939/* confdefs.h. */
6940_ACEOF
6941cat confdefs.h >>conftest.$ac_ext
6942cat >>conftest.$ac_ext <<_ACEOF
6943/* end confdefs.h. */
6944$ac_includes_default
6945
6946#include <$ac_header>
6947_ACEOF
6948rm -f conftest.$ac_objext
6949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 6950 (eval $ac_compile) 2>conftest.er1
13b2be9c 6951 ac_status=$?
ab509236
L
6952 grep -v '^ *+' conftest.er1 >conftest.err
6953 rm -f conftest.er1
6954 cat conftest.err >&5
13b2be9c
DJ
6955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956 (exit $ac_status); } &&
ab509236
L
6957 { ac_try='test -z "$ac_c_werror_flag"
6958 || test ! -s conftest.err'
6959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6960 (eval $ac_try) 2>&5
6961 ac_status=$?
6962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6963 (exit $ac_status); }; } &&
6964 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
6965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6966 (eval $ac_try) 2>&5
6967 ac_status=$?
6968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6969 (exit $ac_status); }; }; then
6970 eval "$as_ac_Header=yes"
6971else
6972 echo "$as_me: failed program was:" >&5
6973sed 's/^/| /' conftest.$ac_ext >&5
6974
6975eval "$as_ac_Header=no"
6976fi
ab509236 6977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
6978fi
6979echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6980echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6981if test `eval echo '${'$as_ac_Header'}'` = yes; then
6982 cat >>confdefs.h <<_ACEOF
6983#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6984_ACEOF
6985
6986fi
6987
6988done
6989
6990
6991echo "$as_me:$LINENO: checking for off_t" >&5
6992echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6993if test "${ac_cv_type_off_t+set}" = set; then
6994 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6995else
13b2be9c 6996 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
6997/* confdefs.h. */
6998_ACEOF
6999cat confdefs.h >>conftest.$ac_ext
7000cat >>conftest.$ac_ext <<_ACEOF
7001/* end confdefs.h. */
7002$ac_includes_default
7003int
7004main ()
7005{
7006if ((off_t *) 0)
7007 return 0;
7008if (sizeof (off_t))
7009 return 0;
7010 ;
7011 return 0;
7012}
7013_ACEOF
7014rm -f conftest.$ac_objext
7015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 7016 (eval $ac_compile) 2>conftest.er1
13b2be9c 7017 ac_status=$?
ab509236
L
7018 grep -v '^ *+' conftest.er1 >conftest.err
7019 rm -f conftest.er1
7020 cat conftest.err >&5
13b2be9c
DJ
7021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7022 (exit $ac_status); } &&
ab509236
L
7023 { ac_try='test -z "$ac_c_werror_flag"
7024 || test ! -s conftest.err'
7025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7026 (eval $ac_try) 2>&5
7027 ac_status=$?
7028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029 (exit $ac_status); }; } &&
7030 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
7031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7032 (eval $ac_try) 2>&5
7033 ac_status=$?
7034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035 (exit $ac_status); }; }; then
a2d91340 7036 ac_cv_type_off_t=yes
252b5132 7037else
13b2be9c
DJ
7038 echo "$as_me: failed program was:" >&5
7039sed 's/^/| /' conftest.$ac_ext >&5
9b2b7d69 7040
13b2be9c 7041ac_cv_type_off_t=no
c8615825 7042fi
ab509236 7043rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
7044fi
7045echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7046echo "${ECHO_T}$ac_cv_type_off_t" >&6
7047if test $ac_cv_type_off_t = yes; then
7048 :
7049else
7050
7051cat >>confdefs.h <<_ACEOF
252b5132 7052#define off_t long
13b2be9c 7053_ACEOF
252b5132
RH
7054
7055fi
7056
13b2be9c
DJ
7057echo "$as_me:$LINENO: checking for size_t" >&5
7058echo $ECHO_N "checking for size_t... $ECHO_C" >&6
7059if test "${ac_cv_type_size_t+set}" = set; then
7060 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7061else
13b2be9c 7062 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7063/* confdefs.h. */
7064_ACEOF
7065cat confdefs.h >>conftest.$ac_ext
7066cat >>conftest.$ac_ext <<_ACEOF
7067/* end confdefs.h. */
7068$ac_includes_default
7069int
7070main ()
7071{
7072if ((size_t *) 0)
7073 return 0;
7074if (sizeof (size_t))
7075 return 0;
7076 ;
7077 return 0;
7078}
7079_ACEOF
7080rm -f conftest.$ac_objext
7081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 7082 (eval $ac_compile) 2>conftest.er1
13b2be9c 7083 ac_status=$?
ab509236
L
7084 grep -v '^ *+' conftest.er1 >conftest.err
7085 rm -f conftest.er1
7086 cat conftest.err >&5
13b2be9c
DJ
7087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088 (exit $ac_status); } &&
ab509236
L
7089 { ac_try='test -z "$ac_c_werror_flag"
7090 || test ! -s conftest.err'
7091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7092 (eval $ac_try) 2>&5
7093 ac_status=$?
7094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095 (exit $ac_status); }; } &&
7096 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
7097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7098 (eval $ac_try) 2>&5
7099 ac_status=$?
7100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7101 (exit $ac_status); }; }; then
a2d91340 7102 ac_cv_type_size_t=yes
252b5132 7103else
13b2be9c
DJ
7104 echo "$as_me: failed program was:" >&5
7105sed 's/^/| /' conftest.$ac_ext >&5
9b2b7d69 7106
13b2be9c
DJ
7107ac_cv_type_size_t=no
7108fi
ab509236 7109rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
c8615825 7110fi
13b2be9c
DJ
7111echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7112echo "${ECHO_T}$ac_cv_type_size_t" >&6
7113if test $ac_cv_type_size_t = yes; then
7114 :
7115else
7116
7117cat >>confdefs.h <<_ACEOF
252b5132 7118#define size_t unsigned
13b2be9c 7119_ACEOF
252b5132
RH
7120
7121fi
7122
7123# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7124# for constant arguments. Useless!
13b2be9c
DJ
7125echo "$as_me:$LINENO: checking for working alloca.h" >&5
7126echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7127if test "${ac_cv_working_alloca_h+set}" = set; then
7128 echo $ECHO_N "(cached) $ECHO_C" >&6
7129else
7130 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7131/* confdefs.h. */
7132_ACEOF
7133cat confdefs.h >>conftest.$ac_ext
7134cat >>conftest.$ac_ext <<_ACEOF
7135/* end confdefs.h. */
252b5132 7136#include <alloca.h>
13b2be9c
DJ
7137int
7138main ()
7139{
7140char *p = (char *) alloca (2 * sizeof (int));
7141 ;
7142 return 0;
7143}
7144_ACEOF
7145rm -f conftest.$ac_objext conftest$ac_exeext
7146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 7147 (eval $ac_link) 2>conftest.er1
13b2be9c 7148 ac_status=$?
ab509236
L
7149 grep -v '^ *+' conftest.er1 >conftest.err
7150 rm -f conftest.er1
7151 cat conftest.err >&5
13b2be9c
DJ
7152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7153 (exit $ac_status); } &&
ab509236
L
7154 { ac_try='test -z "$ac_c_werror_flag"
7155 || test ! -s conftest.err'
7156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7157 (eval $ac_try) 2>&5
7158 ac_status=$?
7159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7160 (exit $ac_status); }; } &&
7161 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
7162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7163 (eval $ac_try) 2>&5
7164 ac_status=$?
7165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7166 (exit $ac_status); }; }; then
7167 ac_cv_working_alloca_h=yes
7168else
7169 echo "$as_me: failed program was:" >&5
7170sed 's/^/| /' conftest.$ac_ext >&5
7171
7172ac_cv_working_alloca_h=no
7173fi
ab509236
L
7174rm -f conftest.err conftest.$ac_objext \
7175 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
7176fi
7177echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
7178echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7179if test $ac_cv_working_alloca_h = yes; then
7180
7181cat >>confdefs.h <<\_ACEOF
252b5132 7182#define HAVE_ALLOCA_H 1
13b2be9c 7183_ACEOF
252b5132
RH
7184
7185fi
7186
13b2be9c
DJ
7187echo "$as_me:$LINENO: checking for alloca" >&5
7188echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7189if test "${ac_cv_func_alloca_works+set}" = set; then
7190 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7191else
13b2be9c 7192 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7193/* confdefs.h. */
7194_ACEOF
7195cat confdefs.h >>conftest.$ac_ext
7196cat >>conftest.$ac_ext <<_ACEOF
7197/* end confdefs.h. */
252b5132
RH
7198#ifdef __GNUC__
7199# define alloca __builtin_alloca
7200#else
7201# ifdef _MSC_VER
7202# include <malloc.h>
7203# define alloca _alloca
7204# else
7205# if HAVE_ALLOCA_H
7206# include <alloca.h>
7207# else
7208# ifdef _AIX
7209 #pragma alloca
7210# else
7211# ifndef alloca /* predefined by HP cc +Olibcalls */
7212char *alloca ();
7213# endif
7214# endif
7215# endif
7216# endif
7217#endif
7218
13b2be9c
DJ
7219int
7220main ()
7221{
7222char *p = (char *) alloca (1);
7223 ;
7224 return 0;
7225}
7226_ACEOF
7227rm -f conftest.$ac_objext conftest$ac_exeext
7228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 7229 (eval $ac_link) 2>conftest.er1
13b2be9c 7230 ac_status=$?
ab509236
L
7231 grep -v '^ *+' conftest.er1 >conftest.err
7232 rm -f conftest.er1
7233 cat conftest.err >&5
13b2be9c
DJ
7234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7235 (exit $ac_status); } &&
ab509236
L
7236 { ac_try='test -z "$ac_c_werror_flag"
7237 || test ! -s conftest.err'
7238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7239 (eval $ac_try) 2>&5
7240 ac_status=$?
7241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7242 (exit $ac_status); }; } &&
7243 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
7244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7245 (eval $ac_try) 2>&5
7246 ac_status=$?
7247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7248 (exit $ac_status); }; }; then
252b5132
RH
7249 ac_cv_func_alloca_works=yes
7250else
13b2be9c
DJ
7251 echo "$as_me: failed program was:" >&5
7252sed 's/^/| /' conftest.$ac_ext >&5
7253
7254ac_cv_func_alloca_works=no
252b5132 7255fi
ab509236
L
7256rm -f conftest.err conftest.$ac_objext \
7257 conftest$ac_exeext conftest.$ac_ext
252b5132 7258fi
13b2be9c
DJ
7259echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
7260echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
252b5132 7261
252b5132 7262if test $ac_cv_func_alloca_works = yes; then
9b2b7d69 7263
13b2be9c
DJ
7264cat >>confdefs.h <<\_ACEOF
7265#define HAVE_ALLOCA 1
7266_ACEOF
9b2b7d69 7267
13b2be9c 7268else
c8615825 7269 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13b2be9c
DJ
7270# that cause trouble. Some versions do not even contain alloca or
7271# contain a buggy version. If you still want to use their alloca,
7272# use ar to extract alloca.o from them instead of compiling alloca.c.
7273
7274ALLOCA=alloca.$ac_objext
7275
7276cat >>confdefs.h <<\_ACEOF
252b5132 7277#define C_ALLOCA 1
13b2be9c 7278_ACEOF
252b5132 7279
d6d788bd 7280
13b2be9c
DJ
7281echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
7282echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7283if test "${ac_cv_os_cray+set}" = set; then
7284 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7285else
13b2be9c 7286 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7287/* confdefs.h. */
7288_ACEOF
7289cat confdefs.h >>conftest.$ac_ext
7290cat >>conftest.$ac_ext <<_ACEOF
7291/* end confdefs.h. */
252b5132
RH
7292#if defined(CRAY) && ! defined(CRAY2)
7293webecray
7294#else
7295wenotbecray
7296#endif
7297
13b2be9c 7298_ACEOF
252b5132 7299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13b2be9c 7300 $EGREP "webecray" >/dev/null 2>&1; then
252b5132
RH
7301 ac_cv_os_cray=yes
7302else
252b5132
RH
7303 ac_cv_os_cray=no
7304fi
7305rm -f conftest*
7306
7307fi
13b2be9c
DJ
7308echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
7309echo "${ECHO_T}$ac_cv_os_cray" >&6
252b5132 7310if test $ac_cv_os_cray = yes; then
13b2be9c
DJ
7311 for ac_func in _getb67 GETB67 getb67; do
7312 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7313echo "$as_me:$LINENO: checking for $ac_func" >&5
7314echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7315if eval "test \"\${$as_ac_var+set}\" = set"; then
7316 echo $ECHO_N "(cached) $ECHO_C" >&6
7317else
7318 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7319/* confdefs.h. */
7320_ACEOF
7321cat confdefs.h >>conftest.$ac_ext
7322cat >>conftest.$ac_ext <<_ACEOF
7323/* end confdefs.h. */
ab509236
L
7324/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7325 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7326#define $ac_func innocuous_$ac_func
7327
252b5132 7328/* System header to define __stub macros and hopefully few prototypes,
13b2be9c
DJ
7329 which can conflict with char $ac_func (); below.
7330 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7331 <limits.h> exists even on freestanding compilers. */
ab509236 7332
13b2be9c
DJ
7333#ifdef __STDC__
7334# include <limits.h>
7335#else
7336# include <assert.h>
7337#endif
ab509236
L
7338
7339#undef $ac_func
7340
252b5132 7341/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
7342#ifdef __cplusplus
7343extern "C"
7344{
7345#endif
252b5132 7346/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
7347 builtin and then its argument prototype would still apply. */
7348char $ac_func ();
252b5132
RH
7349/* The GNU C library defines this for functions which it implements
7350 to always fail with ENOSYS. Some functions are actually named
7351 something starting with __ and the normal name is an alias. */
7352#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7353choke me
7354#else
13b2be9c
DJ
7355char (*f) () = $ac_func;
7356#endif
7357#ifdef __cplusplus
7358}
252b5132
RH
7359#endif
7360
13b2be9c
DJ
7361int
7362main ()
7363{
7364return f != $ac_func;
7365 ;
7366 return 0;
7367}
7368_ACEOF
7369rm -f conftest.$ac_objext conftest$ac_exeext
7370if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 7371 (eval $ac_link) 2>conftest.er1
13b2be9c 7372 ac_status=$?
ab509236
L
7373 grep -v '^ *+' conftest.er1 >conftest.err
7374 rm -f conftest.er1
7375 cat conftest.err >&5
13b2be9c
DJ
7376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); } &&
ab509236
L
7378 { ac_try='test -z "$ac_c_werror_flag"
7379 || test ! -s conftest.err'
7380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7381 (eval $ac_try) 2>&5
7382 ac_status=$?
7383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7384 (exit $ac_status); }; } &&
7385 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
7386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7387 (eval $ac_try) 2>&5
7388 ac_status=$?
7389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7390 (exit $ac_status); }; }; then
7391 eval "$as_ac_var=yes"
7392else
7393 echo "$as_me: failed program was:" >&5
7394sed 's/^/| /' conftest.$ac_ext >&5
7395
7396eval "$as_ac_var=no"
7397fi
ab509236
L
7398rm -f conftest.err conftest.$ac_objext \
7399 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
7400fi
7401echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7402echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7403if test `eval echo '${'$as_ac_var'}'` = yes; then
7404
7405cat >>confdefs.h <<_ACEOF
252b5132 7406#define CRAY_STACKSEG_END $ac_func
13b2be9c 7407_ACEOF
252b5132 7408
13b2be9c 7409 break
252b5132
RH
7410fi
7411
13b2be9c 7412 done
252b5132
RH
7413fi
7414
13b2be9c
DJ
7415echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
7416echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7417if test "${ac_cv_c_stack_direction+set}" = set; then
7418 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
7419else
7420 if test "$cross_compiling" = yes; then
7421 ac_cv_c_stack_direction=0
7422else
13b2be9c 7423 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7424/* confdefs.h. */
7425_ACEOF
7426cat confdefs.h >>conftest.$ac_ext
7427cat >>conftest.$ac_ext <<_ACEOF
7428/* end confdefs.h. */
7429int
252b5132
RH
7430find_stack_direction ()
7431{
7432 static char *addr = 0;
7433 auto char dummy;
7434 if (addr == 0)
7435 {
7436 addr = &dummy;
7437 return find_stack_direction ();
7438 }
7439 else
7440 return (&dummy > addr) ? 1 : -1;
7441}
13b2be9c
DJ
7442
7443int
252b5132
RH
7444main ()
7445{
13b2be9c 7446 exit (find_stack_direction () < 0);
252b5132 7447}
13b2be9c
DJ
7448_ACEOF
7449rm -f conftest$ac_exeext
7450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7451 (eval $ac_link) 2>&5
7452 ac_status=$?
7453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7456 (eval $ac_try) 2>&5
7457 ac_status=$?
7458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7459 (exit $ac_status); }; }; then
252b5132
RH
7460 ac_cv_c_stack_direction=1
7461else
13b2be9c
DJ
7462 echo "$as_me: program exited with status $ac_status" >&5
7463echo "$as_me: failed program was:" >&5
7464sed 's/^/| /' conftest.$ac_ext >&5
7465
7466( exit $ac_status )
7467ac_cv_c_stack_direction=-1
252b5132 7468fi
ab509236 7469rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
252b5132 7470fi
252b5132 7471fi
13b2be9c
DJ
7472echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7473echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
252b5132 7474
13b2be9c 7475cat >>confdefs.h <<_ACEOF
252b5132 7476#define STACK_DIRECTION $ac_cv_c_stack_direction
13b2be9c
DJ
7477_ACEOF
7478
252b5132
RH
7479
7480fi
7481
13b2be9c
DJ
7482
7483
7484for ac_header in stdlib.h unistd.h
252b5132 7485do
13b2be9c
DJ
7486as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7487if eval "test \"\${$as_ac_Header+set}\" = set"; then
7488 echo "$as_me:$LINENO: checking for $ac_header" >&5
7489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7490if eval "test \"\${$as_ac_Header+set}\" = set"; then
7491 echo $ECHO_N "(cached) $ECHO_C" >&6
7492fi
7493echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7494echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7495else
7496 # Is the header compilable?
7497echo "$as_me:$LINENO: checking $ac_header usability" >&5
7498echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7499cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7500/* confdefs.h. */
7501_ACEOF
7502cat confdefs.h >>conftest.$ac_ext
7503cat >>conftest.$ac_ext <<_ACEOF
7504/* end confdefs.h. */
7505$ac_includes_default
7506#include <$ac_header>
7507_ACEOF
7508rm -f conftest.$ac_objext
7509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 7510 (eval $ac_compile) 2>conftest.er1
13b2be9c 7511 ac_status=$?
ab509236
L
7512 grep -v '^ *+' conftest.er1 >conftest.err
7513 rm -f conftest.er1
7514 cat conftest.err >&5
13b2be9c
DJ
7515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516 (exit $ac_status); } &&
ab509236
L
7517 { ac_try='test -z "$ac_c_werror_flag"
7518 || test ! -s conftest.err'
7519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7520 (eval $ac_try) 2>&5
7521 ac_status=$?
7522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7523 (exit $ac_status); }; } &&
7524 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
7525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7526 (eval $ac_try) 2>&5
7527 ac_status=$?
7528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7529 (exit $ac_status); }; }; then
7530 ac_header_compiler=yes
7531else
7532 echo "$as_me: failed program was:" >&5
7533sed 's/^/| /' conftest.$ac_ext >&5
7534
7535ac_header_compiler=no
7536fi
ab509236 7537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
7538echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7539echo "${ECHO_T}$ac_header_compiler" >&6
7540
7541# Is the header present?
7542echo "$as_me:$LINENO: checking $ac_header presence" >&5
7543echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7544cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7545/* confdefs.h. */
7546_ACEOF
7547cat confdefs.h >>conftest.$ac_ext
7548cat >>conftest.$ac_ext <<_ACEOF
7549/* end confdefs.h. */
7550#include <$ac_header>
7551_ACEOF
7552if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7553 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7554 ac_status=$?
7555 grep -v '^ *+' conftest.er1 >conftest.err
7556 rm -f conftest.er1
7557 cat conftest.err >&5
7558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559 (exit $ac_status); } >/dev/null; then
7560 if test -s conftest.err; then
7561 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 7562 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
7563 else
7564 ac_cpp_err=
7565 fi
252b5132 7566else
13b2be9c
DJ
7567 ac_cpp_err=yes
7568fi
7569if test -z "$ac_cpp_err"; then
7570 ac_header_preproc=yes
7571else
7572 echo "$as_me: failed program was:" >&5
7573sed 's/^/| /' conftest.$ac_ext >&5
7574
7575 ac_header_preproc=no
7576fi
7577rm -f conftest.err conftest.$ac_ext
7578echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7579echo "${ECHO_T}$ac_header_preproc" >&6
7580
7581# So? What about this header?
ab509236
L
7582case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7583 yes:no: )
13b2be9c
DJ
7584 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7585echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
ab509236
L
7586 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7587echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7588 ac_header_preproc=yes
13b2be9c 7589 ;;
ab509236 7590 no:yes:* )
13b2be9c
DJ
7591 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7592echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
ab509236
L
7593 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7594echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7595 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7596echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7597 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7598echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
13b2be9c
DJ
7599 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7600echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
ab509236
L
7601 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7602echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13b2be9c
DJ
7603 (
7604 cat <<\_ASBOX
ab509236
L
7605## ------------------------------------------ ##
7606## Report this to the AC_PACKAGE_NAME lists. ##
7607## ------------------------------------------ ##
13b2be9c
DJ
7608_ASBOX
7609 ) |
7610 sed "s/^/$as_me: WARNING: /" >&2
7611 ;;
7612esac
7613echo "$as_me:$LINENO: checking for $ac_header" >&5
7614echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7615if eval "test \"\${$as_ac_Header+set}\" = set"; then
7616 echo $ECHO_N "(cached) $ECHO_C" >&6
7617else
ab509236 7618 eval "$as_ac_Header=\$ac_header_preproc"
252b5132 7619fi
13b2be9c
DJ
7620echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7621echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7622
252b5132 7623fi
13b2be9c
DJ
7624if test `eval echo '${'$as_ac_Header'}'` = yes; then
7625 cat >>confdefs.h <<_ACEOF
7626#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7627_ACEOF
7628
252b5132 7629fi
13b2be9c 7630
252b5132
RH
7631done
7632
13b2be9c 7633
252b5132
RH
7634for ac_func in getpagesize
7635do
13b2be9c
DJ
7636as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7637echo "$as_me:$LINENO: checking for $ac_func" >&5
7638echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7639if eval "test \"\${$as_ac_var+set}\" = set"; then
7640 echo $ECHO_N "(cached) $ECHO_C" >&6
7641else
7642 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7643/* confdefs.h. */
7644_ACEOF
7645cat confdefs.h >>conftest.$ac_ext
7646cat >>conftest.$ac_ext <<_ACEOF
7647/* end confdefs.h. */
ab509236
L
7648/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7649 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7650#define $ac_func innocuous_$ac_func
7651
252b5132 7652/* System header to define __stub macros and hopefully few prototypes,
13b2be9c
DJ
7653 which can conflict with char $ac_func (); below.
7654 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7655 <limits.h> exists even on freestanding compilers. */
ab509236 7656
13b2be9c
DJ
7657#ifdef __STDC__
7658# include <limits.h>
7659#else
7660# include <assert.h>
7661#endif
ab509236
L
7662
7663#undef $ac_func
7664
252b5132 7665/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
7666#ifdef __cplusplus
7667extern "C"
7668{
7669#endif
252b5132 7670/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
7671 builtin and then its argument prototype would still apply. */
7672char $ac_func ();
252b5132
RH
7673/* The GNU C library defines this for functions which it implements
7674 to always fail with ENOSYS. Some functions are actually named
7675 something starting with __ and the normal name is an alias. */
7676#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7677choke me
7678#else
13b2be9c
DJ
7679char (*f) () = $ac_func;
7680#endif
7681#ifdef __cplusplus
7682}
252b5132
RH
7683#endif
7684
13b2be9c
DJ
7685int
7686main ()
7687{
7688return f != $ac_func;
7689 ;
7690 return 0;
7691}
7692_ACEOF
7693rm -f conftest.$ac_objext conftest$ac_exeext
7694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 7695 (eval $ac_link) 2>conftest.er1
13b2be9c 7696 ac_status=$?
ab509236
L
7697 grep -v '^ *+' conftest.er1 >conftest.err
7698 rm -f conftest.er1
7699 cat conftest.err >&5
13b2be9c
DJ
7700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7701 (exit $ac_status); } &&
ab509236
L
7702 { ac_try='test -z "$ac_c_werror_flag"
7703 || test ! -s conftest.err'
7704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7705 (eval $ac_try) 2>&5
7706 ac_status=$?
7707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708 (exit $ac_status); }; } &&
7709 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
7710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7711 (eval $ac_try) 2>&5
7712 ac_status=$?
7713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714 (exit $ac_status); }; }; then
7715 eval "$as_ac_var=yes"
7716else
7717 echo "$as_me: failed program was:" >&5
7718sed 's/^/| /' conftest.$ac_ext >&5
7719
7720eval "$as_ac_var=no"
7721fi
ab509236
L
7722rm -f conftest.err conftest.$ac_objext \
7723 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
7724fi
7725echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7726echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7727if test `eval echo '${'$as_ac_var'}'` = yes; then
7728 cat >>confdefs.h <<_ACEOF
7729#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7730_ACEOF
252b5132 7731
252b5132
RH
7732fi
7733done
7734
13b2be9c
DJ
7735echo "$as_me:$LINENO: checking for working mmap" >&5
7736echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7737if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7738 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
7739else
7740 if test "$cross_compiling" = yes; then
7741 ac_cv_func_mmap_fixed_mapped=no
7742else
13b2be9c 7743 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7744/* confdefs.h. */
7745_ACEOF
7746cat confdefs.h >>conftest.$ac_ext
7747cat >>conftest.$ac_ext <<_ACEOF
7748/* end confdefs.h. */
7749$ac_includes_default
7750/* malloc might have been renamed as rpl_malloc. */
7751#undef malloc
d6d788bd 7752
252b5132
RH
7753/* Thanks to Mike Haertel and Jim Avera for this test.
7754 Here is a matrix of mmap possibilities:
7755 mmap private not fixed
7756 mmap private fixed at somewhere currently unmapped
7757 mmap private fixed at somewhere already mapped
7758 mmap shared not fixed
7759 mmap shared fixed at somewhere currently unmapped
7760 mmap shared fixed at somewhere already mapped
7761 For private mappings, we should verify that changes cannot be read()
7762 back from the file, nor mmap's back from the file at a different
7763 address. (There have been systems where private was not correctly
7764 implemented like the infamous i386 svr4.0, and systems where the
13b2be9c 7765 VM page cache was not coherent with the file system buffer cache
252b5132
RH
7766 like early versions of FreeBSD and possibly contemporary NetBSD.)
7767 For shared mappings, we should conversely verify that changes get
13b2be9c 7768 propagated back to all the places they're supposed to be.
252b5132
RH
7769
7770 Grep wants private fixed already mapped.
7771 The main things grep needs to know about mmap are:
7772 * does it exist and is it safe to write into the mmap'd area
7773 * how to use it (BSD variants) */
13b2be9c 7774
252b5132
RH
7775#include <fcntl.h>
7776#include <sys/mman.h>
7777
13b2be9c
DJ
7778#if !STDC_HEADERS && !HAVE_STDLIB_H
7779char *malloc ();
7780#endif
c8615825 7781
13b2be9c
DJ
7782/* This mess was copied from the GNU getpagesize.h. */
7783#if !HAVE_GETPAGESIZE
252b5132 7784/* Assume that all systems that can run configure have sys/param.h. */
13b2be9c 7785# if !HAVE_SYS_PARAM_H
252b5132
RH
7786# define HAVE_SYS_PARAM_H 1
7787# endif
7788
7789# ifdef _SC_PAGESIZE
7790# define getpagesize() sysconf(_SC_PAGESIZE)
7791# else /* no _SC_PAGESIZE */
13b2be9c 7792# if HAVE_SYS_PARAM_H
252b5132
RH
7793# include <sys/param.h>
7794# ifdef EXEC_PAGESIZE
7795# define getpagesize() EXEC_PAGESIZE
7796# else /* no EXEC_PAGESIZE */
7797# ifdef NBPG
7798# define getpagesize() NBPG * CLSIZE
7799# ifndef CLSIZE
7800# define CLSIZE 1
7801# endif /* no CLSIZE */
7802# else /* no NBPG */
7803# ifdef NBPC
7804# define getpagesize() NBPC
7805# else /* no NBPC */
7806# ifdef PAGESIZE
7807# define getpagesize() PAGESIZE
7808# endif /* PAGESIZE */
7809# endif /* no NBPC */
7810# endif /* no NBPG */
7811# endif /* no EXEC_PAGESIZE */
7812# else /* no HAVE_SYS_PARAM_H */
7813# define getpagesize() 8192 /* punt totally */
7814# endif /* no HAVE_SYS_PARAM_H */
7815# endif /* no _SC_PAGESIZE */
7816
7817#endif /* no HAVE_GETPAGESIZE */
7818
252b5132 7819int
13b2be9c 7820main ()
252b5132 7821{
13b2be9c
DJ
7822 char *data, *data2, *data3;
7823 int i, pagesize;
7824 int fd;
7825
7826 pagesize = getpagesize ();
7827
7828 /* First, make a file with some known garbage in it. */
7829 data = (char *) malloc (pagesize);
7830 if (!data)
7831 exit (1);
7832 for (i = 0; i < pagesize; ++i)
7833 *(data + i) = rand ();
7834 umask (0);
7835 fd = creat ("conftest.mmap", 0600);
7836 if (fd < 0)
7837 exit (1);
7838 if (write (fd, data, pagesize) != pagesize)
7839 exit (1);
7840 close (fd);
7841
7842 /* Next, try to mmap the file at a fixed address which already has
7843 something else allocated at it. If we can, also make sure that
7844 we see the same garbage. */
7845 fd = open ("conftest.mmap", O_RDWR);
7846 if (fd < 0)
7847 exit (1);
7848 data2 = (char *) malloc (2 * pagesize);
7849 if (!data2)
7850 exit (1);
ab509236 7851 data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
13b2be9c 7852 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
ab509236 7853 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13b2be9c
DJ
7854 exit (1);
7855 for (i = 0; i < pagesize; ++i)
7856 if (*(data + i) != *(data2 + i))
7857 exit (1);
7858
7859 /* Finally, make sure that changes to the mapped area do not
7860 percolate back to the file as seen by read(). (This is a bug on
7861 some variants of i386 svr4.0.) */
7862 for (i = 0; i < pagesize; ++i)
7863 *(data2 + i) = *(data2 + i) + 1;
7864 data3 = (char *) malloc (pagesize);
7865 if (!data3)
7866 exit (1);
7867 if (read (fd, data3, pagesize) != pagesize)
7868 exit (1);
7869 for (i = 0; i < pagesize; ++i)
7870 if (*(data + i) != *(data3 + i))
7871 exit (1);
7872 close (fd);
7873 exit (0);
252b5132 7874}
13b2be9c
DJ
7875_ACEOF
7876rm -f conftest$ac_exeext
7877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7878 (eval $ac_link) 2>&5
7879 ac_status=$?
7880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7881 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7883 (eval $ac_try) 2>&5
7884 ac_status=$?
7885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7886 (exit $ac_status); }; }; then
252b5132
RH
7887 ac_cv_func_mmap_fixed_mapped=yes
7888else
13b2be9c
DJ
7889 echo "$as_me: program exited with status $ac_status" >&5
7890echo "$as_me: failed program was:" >&5
7891sed 's/^/| /' conftest.$ac_ext >&5
7892
7893( exit $ac_status )
7894ac_cv_func_mmap_fixed_mapped=no
9b2b7d69 7895fi
ab509236 7896rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
252b5132 7897fi
252b5132 7898fi
13b2be9c
DJ
7899echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7900echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
c8615825 7901if test $ac_cv_func_mmap_fixed_mapped = yes; then
13b2be9c
DJ
7902
7903cat >>confdefs.h <<\_ACEOF
9b2b7d69 7904#define HAVE_MMAP 1
13b2be9c 7905_ACEOF
9b2b7d69
MM
7906
7907fi
13b2be9c
DJ
7908rm -f conftest.mmap
7909
7910
7911
7912
7913
7914
7915
6840198f 7916
13b2be9c
DJ
7917
7918
7919
7920for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
252b5132
RH
7921unistd.h values.h sys/param.h
7922do
13b2be9c
DJ
7923as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7924if eval "test \"\${$as_ac_Header+set}\" = set"; then
7925 echo "$as_me:$LINENO: checking for $ac_header" >&5
7926echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7927if eval "test \"\${$as_ac_Header+set}\" = set"; then
7928 echo $ECHO_N "(cached) $ECHO_C" >&6
7929fi
7930echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7931echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7932else
7933 # Is the header compilable?
7934echo "$as_me:$LINENO: checking $ac_header usability" >&5
7935echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7936cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7937/* confdefs.h. */
7938_ACEOF
7939cat confdefs.h >>conftest.$ac_ext
7940cat >>conftest.$ac_ext <<_ACEOF
7941/* end confdefs.h. */
7942$ac_includes_default
7943#include <$ac_header>
7944_ACEOF
7945rm -f conftest.$ac_objext
7946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 7947 (eval $ac_compile) 2>conftest.er1
13b2be9c 7948 ac_status=$?
ab509236
L
7949 grep -v '^ *+' conftest.er1 >conftest.err
7950 rm -f conftest.er1
7951 cat conftest.err >&5
13b2be9c
DJ
7952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953 (exit $ac_status); } &&
ab509236
L
7954 { ac_try='test -z "$ac_c_werror_flag"
7955 || test ! -s conftest.err'
7956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7957 (eval $ac_try) 2>&5
7958 ac_status=$?
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); }; } &&
7961 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
7962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7963 (eval $ac_try) 2>&5
7964 ac_status=$?
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); }; }; then
7967 ac_header_compiler=yes
7968else
7969 echo "$as_me: failed program was:" >&5
7970sed 's/^/| /' conftest.$ac_ext >&5
7971
7972ac_header_compiler=no
7973fi
ab509236 7974rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
7975echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7976echo "${ECHO_T}$ac_header_compiler" >&6
7977
7978# Is the header present?
7979echo "$as_me:$LINENO: checking $ac_header presence" >&5
7980echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7981cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
7982/* confdefs.h. */
7983_ACEOF
7984cat confdefs.h >>conftest.$ac_ext
7985cat >>conftest.$ac_ext <<_ACEOF
7986/* end confdefs.h. */
7987#include <$ac_header>
7988_ACEOF
7989if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7990 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7991 ac_status=$?
7992 grep -v '^ *+' conftest.er1 >conftest.err
7993 rm -f conftest.er1
7994 cat conftest.err >&5
7995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7996 (exit $ac_status); } >/dev/null; then
7997 if test -s conftest.err; then
7998 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 7999 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
8000 else
8001 ac_cpp_err=
8002 fi
9b2b7d69 8003else
13b2be9c
DJ
8004 ac_cpp_err=yes
8005fi
8006if test -z "$ac_cpp_err"; then
8007 ac_header_preproc=yes
8008else
8009 echo "$as_me: failed program was:" >&5
8010sed 's/^/| /' conftest.$ac_ext >&5
8011
8012 ac_header_preproc=no
8013fi
8014rm -f conftest.err conftest.$ac_ext
8015echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8016echo "${ECHO_T}$ac_header_preproc" >&6
8017
8018# So? What about this header?
ab509236
L
8019case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8020 yes:no: )
13b2be9c
DJ
8021 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8022echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
ab509236
L
8023 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8024echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8025 ac_header_preproc=yes
13b2be9c 8026 ;;
ab509236 8027 no:yes:* )
13b2be9c
DJ
8028 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8029echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
ab509236
L
8030 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8031echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8032 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8033echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8034 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8035echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
13b2be9c
DJ
8036 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8037echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
ab509236
L
8038 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8039echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13b2be9c
DJ
8040 (
8041 cat <<\_ASBOX
ab509236
L
8042## ------------------------------------------ ##
8043## Report this to the AC_PACKAGE_NAME lists. ##
8044## ------------------------------------------ ##
13b2be9c
DJ
8045_ASBOX
8046 ) |
8047 sed "s/^/$as_me: WARNING: /" >&2
8048 ;;
8049esac
8050echo "$as_me:$LINENO: checking for $ac_header" >&5
8051echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8052if eval "test \"\${$as_ac_Header+set}\" = set"; then
8053 echo $ECHO_N "(cached) $ECHO_C" >&6
8054else
ab509236 8055 eval "$as_ac_Header=\$ac_header_preproc"
252b5132 8056fi
13b2be9c
DJ
8057echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8058echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8059
252b5132 8060fi
13b2be9c
DJ
8061if test `eval echo '${'$as_ac_Header'}'` = yes; then
8062 cat >>confdefs.h <<_ACEOF
8063#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8064_ACEOF
8065
252b5132 8066fi
13b2be9c 8067
252b5132
RH
8068done
8069
13b2be9c
DJ
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
252b5132
RH
8081__argz_count __argz_stringify __argz_next
8082do
13b2be9c
DJ
8083as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8084echo "$as_me:$LINENO: checking for $ac_func" >&5
8085echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8086if eval "test \"\${$as_ac_var+set}\" = set"; then
8087 echo $ECHO_N "(cached) $ECHO_C" >&6
8088else
8089 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8090/* confdefs.h. */
8091_ACEOF
8092cat confdefs.h >>conftest.$ac_ext
8093cat >>conftest.$ac_ext <<_ACEOF
8094/* end confdefs.h. */
ab509236
L
8095/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8096 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8097#define $ac_func innocuous_$ac_func
8098
252b5132 8099/* System header to define __stub macros and hopefully few prototypes,
13b2be9c
DJ
8100 which can conflict with char $ac_func (); below.
8101 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8102 <limits.h> exists even on freestanding compilers. */
ab509236 8103
13b2be9c
DJ
8104#ifdef __STDC__
8105# include <limits.h>
8106#else
8107# include <assert.h>
8108#endif
ab509236
L
8109
8110#undef $ac_func
8111
252b5132 8112/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
8113#ifdef __cplusplus
8114extern "C"
8115{
8116#endif
252b5132 8117/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
8118 builtin and then its argument prototype would still apply. */
8119char $ac_func ();
252b5132
RH
8120/* The GNU C library defines this for functions which it implements
8121 to always fail with ENOSYS. Some functions are actually named
8122 something starting with __ and the normal name is an alias. */
8123#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8124choke me
8125#else
13b2be9c
DJ
8126char (*f) () = $ac_func;
8127#endif
8128#ifdef __cplusplus
8129}
252b5132
RH
8130#endif
8131
13b2be9c
DJ
8132int
8133main ()
8134{
8135return f != $ac_func;
8136 ;
8137 return 0;
8138}
8139_ACEOF
8140rm -f conftest.$ac_objext conftest$ac_exeext
8141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 8142 (eval $ac_link) 2>conftest.er1
13b2be9c 8143 ac_status=$?
ab509236
L
8144 grep -v '^ *+' conftest.er1 >conftest.err
8145 rm -f conftest.er1
8146 cat conftest.err >&5
13b2be9c
DJ
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); } &&
ab509236
L
8149 { ac_try='test -z "$ac_c_werror_flag"
8150 || test ! -s conftest.err'
8151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8152 (eval $ac_try) 2>&5
8153 ac_status=$?
8154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155 (exit $ac_status); }; } &&
8156 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
8157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8158 (eval $ac_try) 2>&5
8159 ac_status=$?
8160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8161 (exit $ac_status); }; }; then
8162 eval "$as_ac_var=yes"
8163else
8164 echo "$as_me: failed program was:" >&5
8165sed 's/^/| /' conftest.$ac_ext >&5
8166
8167eval "$as_ac_var=no"
8168fi
ab509236
L
8169rm -f conftest.err conftest.$ac_objext \
8170 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
8171fi
8172echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8173echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8174if test `eval echo '${'$as_ac_var'}'` = yes; then
8175 cat >>confdefs.h <<_ACEOF
8176#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8177_ACEOF
252b5132 8178
252b5132
RH
8179fi
8180done
8181
6840198f 8182
d6d788bd 8183 if test "${ac_cv_func_stpcpy+set}" != "set"; then
13b2be9c
DJ
8184
8185for ac_func in stpcpy
252b5132 8186do
13b2be9c
DJ
8187as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8188echo "$as_me:$LINENO: checking for $ac_func" >&5
8189echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8190if eval "test \"\${$as_ac_var+set}\" = set"; then
8191 echo $ECHO_N "(cached) $ECHO_C" >&6
8192else
8193 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8194/* confdefs.h. */
8195_ACEOF
8196cat confdefs.h >>conftest.$ac_ext
8197cat >>conftest.$ac_ext <<_ACEOF
8198/* end confdefs.h. */
ab509236
L
8199/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8200 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8201#define $ac_func innocuous_$ac_func
8202
252b5132 8203/* System header to define __stub macros and hopefully few prototypes,
13b2be9c
DJ
8204 which can conflict with char $ac_func (); below.
8205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8206 <limits.h> exists even on freestanding compilers. */
ab509236 8207
13b2be9c
DJ
8208#ifdef __STDC__
8209# include <limits.h>
8210#else
8211# include <assert.h>
8212#endif
ab509236
L
8213
8214#undef $ac_func
8215
252b5132 8216/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
8217#ifdef __cplusplus
8218extern "C"
8219{
8220#endif
252b5132 8221/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
8222 builtin and then its argument prototype would still apply. */
8223char $ac_func ();
252b5132
RH
8224/* The GNU C library defines this for functions which it implements
8225 to always fail with ENOSYS. Some functions are actually named
8226 something starting with __ and the normal name is an alias. */
8227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8228choke me
8229#else
13b2be9c
DJ
8230char (*f) () = $ac_func;
8231#endif
8232#ifdef __cplusplus
8233}
252b5132
RH
8234#endif
8235
13b2be9c
DJ
8236int
8237main ()
8238{
8239return f != $ac_func;
8240 ;
8241 return 0;
8242}
8243_ACEOF
8244rm -f conftest.$ac_objext conftest$ac_exeext
8245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 8246 (eval $ac_link) 2>conftest.er1
13b2be9c 8247 ac_status=$?
ab509236
L
8248 grep -v '^ *+' conftest.er1 >conftest.err
8249 rm -f conftest.er1
8250 cat conftest.err >&5
13b2be9c
DJ
8251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8252 (exit $ac_status); } &&
ab509236
L
8253 { ac_try='test -z "$ac_c_werror_flag"
8254 || test ! -s conftest.err'
8255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8256 (eval $ac_try) 2>&5
8257 ac_status=$?
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); }; } &&
8260 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
8261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8262 (eval $ac_try) 2>&5
8263 ac_status=$?
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8265 (exit $ac_status); }; }; then
8266 eval "$as_ac_var=yes"
8267else
8268 echo "$as_me: failed program was:" >&5
8269sed 's/^/| /' conftest.$ac_ext >&5
8270
8271eval "$as_ac_var=no"
8272fi
ab509236
L
8273rm -f conftest.err conftest.$ac_objext \
8274 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
8275fi
8276echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8277echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8278if test `eval echo '${'$as_ac_var'}'` = yes; then
8279 cat >>confdefs.h <<_ACEOF
8280#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8281_ACEOF
252b5132 8282
252b5132
RH
8283fi
8284done
8285
8286 fi
8287 if test "${ac_cv_func_stpcpy}" = "yes"; then
13b2be9c
DJ
8288
8289cat >>confdefs.h <<\_ACEOF
252b5132 8290#define HAVE_STPCPY 1
13b2be9c 8291_ACEOF
252b5132
RH
8292
8293 fi
8294
8295 if test $ac_cv_header_locale_h = yes; then
13b2be9c
DJ
8296 echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
8297echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8298if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8299 echo $ECHO_N "(cached) $ECHO_C" >&6
8300else
8301 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8302/* confdefs.h. */
8303_ACEOF
8304cat confdefs.h >>conftest.$ac_ext
8305cat >>conftest.$ac_ext <<_ACEOF
8306/* end confdefs.h. */
252b5132 8307#include <locale.h>
13b2be9c
DJ
8308int
8309main ()
8310{
252b5132 8311return LC_MESSAGES
13b2be9c
DJ
8312 ;
8313 return 0;
8314}
8315_ACEOF
8316rm -f conftest.$ac_objext conftest$ac_exeext
8317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 8318 (eval $ac_link) 2>conftest.er1
13b2be9c 8319 ac_status=$?
ab509236
L
8320 grep -v '^ *+' conftest.er1 >conftest.err
8321 rm -f conftest.er1
8322 cat conftest.err >&5
13b2be9c
DJ
8323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8324 (exit $ac_status); } &&
ab509236
L
8325 { ac_try='test -z "$ac_c_werror_flag"
8326 || test ! -s conftest.err'
8327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8328 (eval $ac_try) 2>&5
8329 ac_status=$?
8330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8331 (exit $ac_status); }; } &&
8332 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
8333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8334 (eval $ac_try) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); }; }; then
252b5132
RH
8338 am_cv_val_LC_MESSAGES=yes
8339else
13b2be9c
DJ
8340 echo "$as_me: failed program was:" >&5
8341sed 's/^/| /' conftest.$ac_ext >&5
8342
8343am_cv_val_LC_MESSAGES=no
252b5132 8344fi
ab509236
L
8345rm -f conftest.err conftest.$ac_objext \
8346 conftest$ac_exeext conftest.$ac_ext
252b5132 8347fi
13b2be9c
DJ
8348echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
8349echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
c8615825 8350 if test $am_cv_val_LC_MESSAGES = yes; then
13b2be9c
DJ
8351
8352cat >>confdefs.h <<\_ACEOF
252b5132 8353#define HAVE_LC_MESSAGES 1
13b2be9c 8354_ACEOF
252b5132
RH
8355
8356 fi
8357 fi
13b2be9c
DJ
8358 echo "$as_me:$LINENO: checking whether NLS is requested" >&5
8359echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
252b5132
RH
8360 # Check whether --enable-nls or --disable-nls was given.
8361if test "${enable_nls+set}" = set; then
8362 enableval="$enable_nls"
8363 USE_NLS=$enableval
8364else
8365 USE_NLS=yes
13b2be9c
DJ
8366fi;
8367 echo "$as_me:$LINENO: result: $USE_NLS" >&5
8368echo "${ECHO_T}$USE_NLS" >&6
d6d788bd 8369
252b5132
RH
8370
8371 USE_INCLUDED_LIBINTL=no
8372
8373 if test "$USE_NLS" = "yes"; then
13b2be9c
DJ
8374
8375cat >>confdefs.h <<\_ACEOF
252b5132 8376#define ENABLE_NLS 1
13b2be9c 8377_ACEOF
252b5132 8378
13b2be9c
DJ
8379 echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
8380echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
8381
8382# Check whether --with-included-gettext or --without-included-gettext was given.
252b5132
RH
8383if test "${with_included_gettext+set}" = set; then
8384 withval="$with_included_gettext"
8385 nls_cv_force_use_gnu_gettext=$withval
8386else
8387 nls_cv_force_use_gnu_gettext=no
13b2be9c
DJ
8388fi;
8389 echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
8390echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
252b5132
RH
8391
8392 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8393 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8394 nls_cv_header_intl=
8395 nls_cv_header_libgt=
8396 CATOBJEXT=NONE
8397
13b2be9c
DJ
8398 if test "${ac_cv_header_libintl_h+set}" = set; then
8399 echo "$as_me:$LINENO: checking for libintl.h" >&5
8400echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8401if test "${ac_cv_header_libintl_h+set}" = set; then
8402 echo $ECHO_N "(cached) $ECHO_C" >&6
8403fi
8404echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8405echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8406else
8407 # Is the header compilable?
8408echo "$as_me:$LINENO: checking libintl.h usability" >&5
8409echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
8410cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8411/* confdefs.h. */
8412_ACEOF
8413cat confdefs.h >>conftest.$ac_ext
8414cat >>conftest.$ac_ext <<_ACEOF
8415/* end confdefs.h. */
8416$ac_includes_default
9b2b7d69 8417#include <libintl.h>
13b2be9c
DJ
8418_ACEOF
8419rm -f conftest.$ac_objext
8420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 8421 (eval $ac_compile) 2>conftest.er1
13b2be9c 8422 ac_status=$?
ab509236
L
8423 grep -v '^ *+' conftest.er1 >conftest.err
8424 rm -f conftest.er1
8425 cat conftest.err >&5
13b2be9c
DJ
8426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8427 (exit $ac_status); } &&
ab509236
L
8428 { ac_try='test -z "$ac_c_werror_flag"
8429 || test ! -s conftest.err'
8430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8431 (eval $ac_try) 2>&5
8432 ac_status=$?
8433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8434 (exit $ac_status); }; } &&
8435 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
8436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8437 (eval $ac_try) 2>&5
8438 ac_status=$?
8439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8440 (exit $ac_status); }; }; then
8441 ac_header_compiler=yes
8442else
8443 echo "$as_me: failed program was:" >&5
8444sed 's/^/| /' conftest.$ac_ext >&5
8445
8446ac_header_compiler=no
8447fi
ab509236 8448rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
8449echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8450echo "${ECHO_T}$ac_header_compiler" >&6
8451
8452# Is the header present?
8453echo "$as_me:$LINENO: checking libintl.h presence" >&5
8454echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
8455cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8456/* confdefs.h. */
8457_ACEOF
8458cat confdefs.h >>conftest.$ac_ext
8459cat >>conftest.$ac_ext <<_ACEOF
8460/* end confdefs.h. */
8461#include <libintl.h>
8462_ACEOF
8463if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8464 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8465 ac_status=$?
8466 grep -v '^ *+' conftest.er1 >conftest.err
8467 rm -f conftest.er1
8468 cat conftest.err >&5
8469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470 (exit $ac_status); } >/dev/null; then
8471 if test -s conftest.err; then
8472 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 8473 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
8474 else
8475 ac_cpp_err=
8476 fi
252b5132 8477else
13b2be9c
DJ
8478 ac_cpp_err=yes
8479fi
8480if test -z "$ac_cpp_err"; then
8481 ac_header_preproc=yes
8482else
8483 echo "$as_me: failed program was:" >&5
8484sed 's/^/| /' conftest.$ac_ext >&5
8485
8486 ac_header_preproc=no
8487fi
8488rm -f conftest.err conftest.$ac_ext
8489echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8490echo "${ECHO_T}$ac_header_preproc" >&6
8491
8492# So? What about this header?
ab509236
L
8493case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8494 yes:no: )
13b2be9c
DJ
8495 { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8496echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
ab509236
L
8497 { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
8498echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
8499 ac_header_preproc=yes
13b2be9c 8500 ;;
ab509236 8501 no:yes:* )
13b2be9c
DJ
8502 { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
8503echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
ab509236
L
8504 { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
8505echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
8506 { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
8507echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
8508 { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
8509echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
13b2be9c
DJ
8510 { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
8511echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
ab509236
L
8512 { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
8513echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
13b2be9c
DJ
8514 (
8515 cat <<\_ASBOX
ab509236
L
8516## ------------------------------------------ ##
8517## Report this to the AC_PACKAGE_NAME lists. ##
8518## ------------------------------------------ ##
13b2be9c
DJ
8519_ASBOX
8520 ) |
8521 sed "s/^/$as_me: WARNING: /" >&2
8522 ;;
8523esac
8524echo "$as_me:$LINENO: checking for libintl.h" >&5
8525echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8526if test "${ac_cv_header_libintl_h+set}" = set; then
8527 echo $ECHO_N "(cached) $ECHO_C" >&6
8528else
8529 ac_cv_header_libintl_h=$ac_header_preproc
8530fi
8531echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8532echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8533
8534fi
8535if test $ac_cv_header_libintl_h = yes; then
8536 echo "$as_me:$LINENO: checking for gettext in libc" >&5
8537echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
8538if test "${gt_cv_func_gettext_libc+set}" = set; then
8539 echo $ECHO_N "(cached) $ECHO_C" >&6
8540else
8541 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8542/* confdefs.h. */
8543_ACEOF
8544cat confdefs.h >>conftest.$ac_ext
8545cat >>conftest.$ac_ext <<_ACEOF
8546/* end confdefs.h. */
252b5132 8547#include <libintl.h>
13b2be9c
DJ
8548int
8549main ()
8550{
252b5132 8551return (int) gettext ("")
13b2be9c
DJ
8552 ;
8553 return 0;
8554}
8555_ACEOF
8556rm -f conftest.$ac_objext conftest$ac_exeext
8557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 8558 (eval $ac_link) 2>conftest.er1
13b2be9c 8559 ac_status=$?
ab509236
L
8560 grep -v '^ *+' conftest.er1 >conftest.err
8561 rm -f conftest.er1
8562 cat conftest.err >&5
13b2be9c
DJ
8563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564 (exit $ac_status); } &&
ab509236
L
8565 { ac_try='test -z "$ac_c_werror_flag"
8566 || test ! -s conftest.err'
8567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8568 (eval $ac_try) 2>&5
8569 ac_status=$?
8570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8571 (exit $ac_status); }; } &&
8572 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
8573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8574 (eval $ac_try) 2>&5
8575 ac_status=$?
8576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8577 (exit $ac_status); }; }; then
252b5132
RH
8578 gt_cv_func_gettext_libc=yes
8579else
13b2be9c
DJ
8580 echo "$as_me: failed program was:" >&5
8581sed 's/^/| /' conftest.$ac_ext >&5
8582
8583gt_cv_func_gettext_libc=no
252b5132 8584fi
ab509236
L
8585rm -f conftest.err conftest.$ac_objext \
8586 conftest$ac_exeext conftest.$ac_ext
252b5132 8587fi
13b2be9c
DJ
8588echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
8589echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
252b5132
RH
8590
8591 if test "$gt_cv_func_gettext_libc" != "yes"; then
13b2be9c
DJ
8592 echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
8593echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
8594if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
8595 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 8596else
13b2be9c 8597 ac_check_lib_save_LIBS=$LIBS
252b5132 8598LIBS="-lintl $LIBS"
13b2be9c 8599cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8600/* confdefs.h. */
8601_ACEOF
8602cat confdefs.h >>conftest.$ac_ext
8603cat >>conftest.$ac_ext <<_ACEOF
8604/* end confdefs.h. */
8605
252b5132 8606/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
8607#ifdef __cplusplus
8608extern "C"
8609#endif
252b5132 8610/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
8611 builtin and then its argument prototype would still apply. */
8612char bindtextdomain ();
8613int
8614main ()
8615{
8616bindtextdomain ();
8617 ;
8618 return 0;
8619}
8620_ACEOF
8621rm -f conftest.$ac_objext conftest$ac_exeext
8622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 8623 (eval $ac_link) 2>conftest.er1
13b2be9c 8624 ac_status=$?
ab509236
L
8625 grep -v '^ *+' conftest.er1 >conftest.err
8626 rm -f conftest.er1
8627 cat conftest.err >&5
13b2be9c
DJ
8628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8629 (exit $ac_status); } &&
ab509236
L
8630 { ac_try='test -z "$ac_c_werror_flag"
8631 || test ! -s conftest.err'
8632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8633 (eval $ac_try) 2>&5
8634 ac_status=$?
8635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8636 (exit $ac_status); }; } &&
8637 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
8638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8639 (eval $ac_try) 2>&5
8640 ac_status=$?
8641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8642 (exit $ac_status); }; }; then
8643 ac_cv_lib_intl_bindtextdomain=yes
8644else
8645 echo "$as_me: failed program was:" >&5
8646sed 's/^/| /' conftest.$ac_ext >&5
8647
8648ac_cv_lib_intl_bindtextdomain=no
8649fi
ab509236
L
8650rm -f conftest.err conftest.$ac_objext \
8651 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
8652LIBS=$ac_check_lib_save_LIBS
8653fi
8654echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8655echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8656if test $ac_cv_lib_intl_bindtextdomain = yes; then
8657 echo "$as_me:$LINENO: checking for gettext in libintl" >&5
8658echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
8659if test "${gt_cv_func_gettext_libintl+set}" = set; then
8660 echo $ECHO_N "(cached) $ECHO_C" >&6
8661else
8662 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8663/* confdefs.h. */
8664_ACEOF
8665cat confdefs.h >>conftest.$ac_ext
8666cat >>conftest.$ac_ext <<_ACEOF
8667/* end confdefs.h. */
d6d788bd 8668
13b2be9c
DJ
8669int
8670main ()
8671{
252b5132 8672return (int) gettext ("")
13b2be9c
DJ
8673 ;
8674 return 0;
8675}
8676_ACEOF
8677rm -f conftest.$ac_objext conftest$ac_exeext
8678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 8679 (eval $ac_link) 2>conftest.er1
13b2be9c 8680 ac_status=$?
ab509236
L
8681 grep -v '^ *+' conftest.er1 >conftest.err
8682 rm -f conftest.er1
8683 cat conftest.err >&5
13b2be9c
DJ
8684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685 (exit $ac_status); } &&
ab509236
L
8686 { ac_try='test -z "$ac_c_werror_flag"
8687 || test ! -s conftest.err'
8688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8689 (eval $ac_try) 2>&5
8690 ac_status=$?
8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8692 (exit $ac_status); }; } &&
8693 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
8694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5
8696 ac_status=$?
8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; }; then
252b5132
RH
8699 gt_cv_func_gettext_libintl=yes
8700else
13b2be9c
DJ
8701 echo "$as_me: failed program was:" >&5
8702sed 's/^/| /' conftest.$ac_ext >&5
8703
8704gt_cv_func_gettext_libintl=no
252b5132 8705fi
ab509236
L
8706rm -f conftest.err conftest.$ac_objext \
8707 conftest$ac_exeext conftest.$ac_ext
252b5132 8708fi
13b2be9c
DJ
8709echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
8710echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
252b5132
RH
8711fi
8712
8713 fi
8714
8715 if test "$gt_cv_func_gettext_libc" = "yes" \
8716 || test "$gt_cv_func_gettext_libintl" = "yes"; then
13b2be9c
DJ
8717
8718cat >>confdefs.h <<\_ACEOF
252b5132 8719#define HAVE_GETTEXT 1
13b2be9c 8720_ACEOF
252b5132
RH
8721
8722 # Extract the first word of "msgfmt", so it can be a program name with args.
8723set dummy msgfmt; ac_word=$2
13b2be9c
DJ
8724echo "$as_me:$LINENO: checking for $ac_word" >&5
8725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8726if test "${ac_cv_path_MSGFMT+set}" = set; then
8727 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
8728else
8729 case "$MSGFMT" in
8730 /*)
8731 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8732 ;;
8733 *)
8734 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8735 for ac_dir in $PATH; do
8736 test -z "$ac_dir" && ac_dir=.
8737 if test -f $ac_dir/$ac_word; then
8738 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8739 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8740 break
8741 fi
8742 fi
8743 done
8744 IFS="$ac_save_ifs"
8745 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8746 ;;
8747esac
8748fi
8749MSGFMT="$ac_cv_path_MSGFMT"
8750if test -n "$MSGFMT"; then
13b2be9c
DJ
8751 echo "$as_me:$LINENO: result: $MSGFMT" >&5
8752echo "${ECHO_T}$MSGFMT" >&6
252b5132 8753else
13b2be9c
DJ
8754 echo "$as_me:$LINENO: result: no" >&5
8755echo "${ECHO_T}no" >&6
252b5132
RH
8756fi
8757 if test "$MSGFMT" != "no"; then
13b2be9c
DJ
8758
8759for ac_func in dcgettext
252b5132 8760do
13b2be9c
DJ
8761as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8762echo "$as_me:$LINENO: checking for $ac_func" >&5
8763echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8764if eval "test \"\${$as_ac_var+set}\" = set"; then
8765 echo $ECHO_N "(cached) $ECHO_C" >&6
8766else
8767 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8768/* confdefs.h. */
8769_ACEOF
8770cat confdefs.h >>conftest.$ac_ext
8771cat >>conftest.$ac_ext <<_ACEOF
8772/* end confdefs.h. */
ab509236
L
8773/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8774 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8775#define $ac_func innocuous_$ac_func
8776
252b5132 8777/* System header to define __stub macros and hopefully few prototypes,
13b2be9c
DJ
8778 which can conflict with char $ac_func (); below.
8779 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8780 <limits.h> exists even on freestanding compilers. */
ab509236 8781
13b2be9c
DJ
8782#ifdef __STDC__
8783# include <limits.h>
8784#else
8785# include <assert.h>
8786#endif
ab509236
L
8787
8788#undef $ac_func
8789
252b5132 8790/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
8791#ifdef __cplusplus
8792extern "C"
8793{
8794#endif
252b5132 8795/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
8796 builtin and then its argument prototype would still apply. */
8797char $ac_func ();
252b5132
RH
8798/* The GNU C library defines this for functions which it implements
8799 to always fail with ENOSYS. Some functions are actually named
8800 something starting with __ and the normal name is an alias. */
8801#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8802choke me
8803#else
13b2be9c
DJ
8804char (*f) () = $ac_func;
8805#endif
8806#ifdef __cplusplus
8807}
252b5132
RH
8808#endif
8809
13b2be9c
DJ
8810int
8811main ()
8812{
8813return f != $ac_func;
8814 ;
8815 return 0;
8816}
8817_ACEOF
8818rm -f conftest.$ac_objext conftest$ac_exeext
8819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 8820 (eval $ac_link) 2>conftest.er1
13b2be9c 8821 ac_status=$?
ab509236
L
8822 grep -v '^ *+' conftest.er1 >conftest.err
8823 rm -f conftest.er1
8824 cat conftest.err >&5
13b2be9c
DJ
8825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8826 (exit $ac_status); } &&
ab509236
L
8827 { ac_try='test -z "$ac_c_werror_flag"
8828 || test ! -s conftest.err'
8829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8830 (eval $ac_try) 2>&5
8831 ac_status=$?
8832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833 (exit $ac_status); }; } &&
8834 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
8835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8836 (eval $ac_try) 2>&5
8837 ac_status=$?
8838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839 (exit $ac_status); }; }; then
8840 eval "$as_ac_var=yes"
8841else
8842 echo "$as_me: failed program was:" >&5
8843sed 's/^/| /' conftest.$ac_ext >&5
8844
8845eval "$as_ac_var=no"
8846fi
ab509236
L
8847rm -f conftest.err conftest.$ac_objext \
8848 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
8849fi
8850echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8851echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8852if test `eval echo '${'$as_ac_var'}'` = yes; then
8853 cat >>confdefs.h <<_ACEOF
8854#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8855_ACEOF
252b5132 8856
252b5132
RH
8857fi
8858done
8859
8860 # Extract the first word of "gmsgfmt", so it can be a program name with args.
8861set dummy gmsgfmt; ac_word=$2
13b2be9c
DJ
8862echo "$as_me:$LINENO: checking for $ac_word" >&5
8863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8864if test "${ac_cv_path_GMSGFMT+set}" = set; then
8865 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 8866else
13b2be9c
DJ
8867 case $GMSGFMT in
8868 [\\/]* | ?:[\\/]*)
252b5132
RH
8869 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8870 ;;
252b5132 8871 *)
13b2be9c
DJ
8872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8873for as_dir in $PATH
8874do
8875 IFS=$as_save_IFS
8876 test -z "$as_dir" && as_dir=.
8877 for ac_exec_ext in '' $ac_executable_extensions; do
8878 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8879 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8880 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8881 break 2
8882 fi
8883done
8884done
8885
252b5132
RH
8886 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8887 ;;
8888esac
8889fi
13b2be9c
DJ
8890GMSGFMT=$ac_cv_path_GMSGFMT
8891
252b5132 8892if test -n "$GMSGFMT"; then
13b2be9c
DJ
8893 echo "$as_me:$LINENO: result: $GMSGFMT" >&5
8894echo "${ECHO_T}$GMSGFMT" >&6
252b5132 8895else
13b2be9c
DJ
8896 echo "$as_me:$LINENO: result: no" >&5
8897echo "${ECHO_T}no" >&6
252b5132
RH
8898fi
8899
8900 # Extract the first word of "xgettext", so it can be a program name with args.
8901set dummy xgettext; ac_word=$2
13b2be9c
DJ
8902echo "$as_me:$LINENO: checking for $ac_word" >&5
8903echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8904if test "${ac_cv_path_XGETTEXT+set}" = set; then
8905 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
8906else
8907 case "$XGETTEXT" in
8908 /*)
8909 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8910 ;;
8911 *)
8912 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8913 for ac_dir in $PATH; do
8914 test -z "$ac_dir" && ac_dir=.
8915 if test -f $ac_dir/$ac_word; then
8916 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8917 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8918 break
8919 fi
8920 fi
8921 done
8922 IFS="$ac_save_ifs"
8923 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8924 ;;
8925esac
8926fi
8927XGETTEXT="$ac_cv_path_XGETTEXT"
8928if test -n "$XGETTEXT"; then
13b2be9c
DJ
8929 echo "$as_me:$LINENO: result: $XGETTEXT" >&5
8930echo "${ECHO_T}$XGETTEXT" >&6
252b5132 8931else
13b2be9c
DJ
8932 echo "$as_me:$LINENO: result: no" >&5
8933echo "${ECHO_T}no" >&6
252b5132
RH
8934fi
8935
13b2be9c 8936 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
8937/* confdefs.h. */
8938_ACEOF
8939cat confdefs.h >>conftest.$ac_ext
8940cat >>conftest.$ac_ext <<_ACEOF
8941/* end confdefs.h. */
252b5132 8942
13b2be9c
DJ
8943int
8944main ()
8945{
252b5132
RH
8946extern int _nl_msg_cat_cntr;
8947 return _nl_msg_cat_cntr
13b2be9c
DJ
8948 ;
8949 return 0;
8950}
8951_ACEOF
8952rm -f conftest.$ac_objext conftest$ac_exeext
8953if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 8954 (eval $ac_link) 2>conftest.er1
13b2be9c 8955 ac_status=$?
ab509236
L
8956 grep -v '^ *+' conftest.er1 >conftest.err
8957 rm -f conftest.er1
8958 cat conftest.err >&5
13b2be9c
DJ
8959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8960 (exit $ac_status); } &&
ab509236
L
8961 { ac_try='test -z "$ac_c_werror_flag"
8962 || test ! -s conftest.err'
8963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8964 (eval $ac_try) 2>&5
8965 ac_status=$?
8966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967 (exit $ac_status); }; } &&
8968 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
8969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8970 (eval $ac_try) 2>&5
8971 ac_status=$?
8972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8973 (exit $ac_status); }; }; then
252b5132
RH
8974 CATOBJEXT=.gmo
8975 DATADIRNAME=share
8976else
13b2be9c
DJ
8977 echo "$as_me: failed program was:" >&5
8978sed 's/^/| /' conftest.$ac_ext >&5
8979
8980CATOBJEXT=.mo
252b5132
RH
8981 DATADIRNAME=lib
8982fi
ab509236
L
8983rm -f conftest.err conftest.$ac_objext \
8984 conftest$ac_exeext conftest.$ac_ext
252b5132
RH
8985 INSTOBJEXT=.mo
8986 fi
8987 fi
13b2be9c 8988
6840198f 8989fi
252b5132 8990
d6d788bd 8991
13b2be9c
DJ
8992
8993
252b5132
RH
8994 if test "$CATOBJEXT" = "NONE"; then
8995 nls_cv_use_gnu_gettext=yes
8996 fi
8997 fi
8998
8999 if test "$nls_cv_use_gnu_gettext" = "yes"; then
9000 INTLOBJS="\$(GETTOBJS)"
9001 # Extract the first word of "msgfmt", so it can be a program name with args.
9002set dummy msgfmt; ac_word=$2
13b2be9c
DJ
9003echo "$as_me:$LINENO: checking for $ac_word" >&5
9004echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9005if test "${ac_cv_path_MSGFMT+set}" = set; then
9006 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
9007else
9008 case "$MSGFMT" in
9009 /*)
9010 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9011 ;;
9012 *)
9013 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9014 for ac_dir in $PATH; do
9015 test -z "$ac_dir" && ac_dir=.
9016 if test -f $ac_dir/$ac_word; then
9017 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9018 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9019 break
9020 fi
9021 fi
9022 done
9023 IFS="$ac_save_ifs"
9024 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
9025 ;;
9026esac
9027fi
9028MSGFMT="$ac_cv_path_MSGFMT"
9029if test -n "$MSGFMT"; then
13b2be9c
DJ
9030 echo "$as_me:$LINENO: result: $MSGFMT" >&5
9031echo "${ECHO_T}$MSGFMT" >&6
252b5132 9032else
13b2be9c
DJ
9033 echo "$as_me:$LINENO: result: no" >&5
9034echo "${ECHO_T}no" >&6
252b5132
RH
9035fi
9036
9037 # Extract the first word of "gmsgfmt", so it can be a program name with args.
9038set dummy gmsgfmt; ac_word=$2
13b2be9c
DJ
9039echo "$as_me:$LINENO: checking for $ac_word" >&5
9040echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9041if test "${ac_cv_path_GMSGFMT+set}" = set; then
9042 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 9043else
13b2be9c
DJ
9044 case $GMSGFMT in
9045 [\\/]* | ?:[\\/]*)
252b5132
RH
9046 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9047 ;;
252b5132 9048 *)
13b2be9c
DJ
9049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9050for as_dir in $PATH
9051do
9052 IFS=$as_save_IFS
9053 test -z "$as_dir" && as_dir=.
9054 for ac_exec_ext in '' $ac_executable_extensions; do
9055 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9056 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9057 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9058 break 2
9059 fi
9060done
9061done
9062
252b5132
RH
9063 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9064 ;;
9065esac
9066fi
13b2be9c
DJ
9067GMSGFMT=$ac_cv_path_GMSGFMT
9068
252b5132 9069if test -n "$GMSGFMT"; then
13b2be9c
DJ
9070 echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9071echo "${ECHO_T}$GMSGFMT" >&6
252b5132 9072else
13b2be9c
DJ
9073 echo "$as_me:$LINENO: result: no" >&5
9074echo "${ECHO_T}no" >&6
252b5132
RH
9075fi
9076
9077 # Extract the first word of "xgettext", so it can be a program name with args.
9078set dummy xgettext; ac_word=$2
13b2be9c
DJ
9079echo "$as_me:$LINENO: checking for $ac_word" >&5
9080echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9081if test "${ac_cv_path_XGETTEXT+set}" = set; then
9082 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
9083else
9084 case "$XGETTEXT" in
9085 /*)
9086 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9087 ;;
9088 *)
9089 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9090 for ac_dir in $PATH; do
9091 test -z "$ac_dir" && ac_dir=.
9092 if test -f $ac_dir/$ac_word; then
9093 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9094 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9095 break
9096 fi
9097 fi
9098 done
9099 IFS="$ac_save_ifs"
9100 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9101 ;;
9102esac
9103fi
9104XGETTEXT="$ac_cv_path_XGETTEXT"
9105if test -n "$XGETTEXT"; then
13b2be9c
DJ
9106 echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9107echo "${ECHO_T}$XGETTEXT" >&6
252b5132 9108else
13b2be9c
DJ
9109 echo "$as_me:$LINENO: result: no" >&5
9110echo "${ECHO_T}no" >&6
252b5132
RH
9111fi
9112
13b2be9c 9113
252b5132
RH
9114 USE_INCLUDED_LIBINTL=yes
9115 CATOBJEXT=.gmo
9116 INSTOBJEXT=.mo
9117 DATADIRNAME=share
9118 INTLDEPS='$(top_builddir)/../intl/libintl.a'
9119 INTLLIBS=$INTLDEPS
9120 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9121 nls_cv_header_intl=libintl.h
9122 nls_cv_header_libgt=libgettext.h
9123 fi
9124
9125 if test "$XGETTEXT" != ":"; then
9126 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9127 : ;
9128 else
13b2be9c
DJ
9129 echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
9130echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
252b5132
RH
9131 XGETTEXT=":"
9132 fi
9133 fi
9134
9135 # We need to process the po/ directory.
9136 POSUB=po
9137 else
9138 DATADIRNAME=share
9139 nls_cv_header_intl=libintl.h
9140 nls_cv_header_libgt=libgettext.h
9141 fi
9142
9143 # If this is used in GNU gettext we have to set USE_NLS to `yes'
9144 # because some of the sources are only built for this goal.
9145 if test "$PACKAGE" = gettext; then
9146 USE_NLS=yes
9147 USE_INCLUDED_LIBINTL=yes
9148 fi
9149
9150 for lang in $ALL_LINGUAS; do
9151 GMOFILES="$GMOFILES $lang.gmo"
9152 POFILES="$POFILES $lang.po"
9153 done
9154
13b2be9c
DJ
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
d6d788bd 9167
252b5132
RH
9168 if test "x$CATOBJEXT" != "x"; then
9169 if test "x$ALL_LINGUAS" = "x"; then
9170 LINGUAS=
9171 else
13b2be9c
DJ
9172 echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9173echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
252b5132
RH
9174 NEW_LINGUAS=
9175 for lang in ${LINGUAS=$ALL_LINGUAS}; do
9176 case "$ALL_LINGUAS" in
9177 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9178 esac
9179 done
9180 LINGUAS=$NEW_LINGUAS
13b2be9c
DJ
9181 echo "$as_me:$LINENO: result: $LINGUAS" >&5
9182echo "${ECHO_T}$LINGUAS" >&6
252b5132
RH
9183 fi
9184
9185 if test -n "$LINGUAS"; then
9186 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9187 fi
9188 fi
9189
9190 if test $ac_cv_header_locale_h = yes; then
9191 INCLUDE_LOCALE_H="#include <locale.h>"
9192 else
9193 INCLUDE_LOCALE_H="\
9194/* The system does not provide the header <locale.h>. Take care yourself. */"
9195 fi
13b2be9c 9196
252b5132
RH
9197
9198 if test -f $srcdir/po2tbl.sed.in; then
9199 if test "$CATOBJEXT" = ".cat"; then
13b2be9c
DJ
9200 if test "${ac_cv_header_linux_version_h+set}" = set; then
9201 echo "$as_me:$LINENO: checking for linux/version.h" >&5
9202echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9203if test "${ac_cv_header_linux_version_h+set}" = set; then
9204 echo $ECHO_N "(cached) $ECHO_C" >&6
9205fi
9206echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9207echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9208else
9209 # Is the header compilable?
9210echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9211echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
9212cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9213/* confdefs.h. */
9214_ACEOF
9215cat confdefs.h >>conftest.$ac_ext
9216cat >>conftest.$ac_ext <<_ACEOF
9217/* end confdefs.h. */
9218$ac_includes_default
9b2b7d69 9219#include <linux/version.h>
13b2be9c
DJ
9220_ACEOF
9221rm -f conftest.$ac_objext
9222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 9223 (eval $ac_compile) 2>conftest.er1
13b2be9c 9224 ac_status=$?
ab509236
L
9225 grep -v '^ *+' conftest.er1 >conftest.err
9226 rm -f conftest.er1
9227 cat conftest.err >&5
13b2be9c
DJ
9228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229 (exit $ac_status); } &&
ab509236
L
9230 { ac_try='test -z "$ac_c_werror_flag"
9231 || test ! -s conftest.err'
9232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9233 (eval $ac_try) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); }; } &&
9237 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
9238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9239 (eval $ac_try) 2>&5
9240 ac_status=$?
9241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9242 (exit $ac_status); }; }; then
9243 ac_header_compiler=yes
9244else
9245 echo "$as_me: failed program was:" >&5
9246sed 's/^/| /' conftest.$ac_ext >&5
9247
9248ac_header_compiler=no
9249fi
ab509236 9250rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
9251echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9252echo "${ECHO_T}$ac_header_compiler" >&6
9253
9254# Is the header present?
9255echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9256echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
9257cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9258/* confdefs.h. */
9259_ACEOF
9260cat confdefs.h >>conftest.$ac_ext
9261cat >>conftest.$ac_ext <<_ACEOF
9262/* end confdefs.h. */
9263#include <linux/version.h>
9264_ACEOF
9265if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9266 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9267 ac_status=$?
9268 grep -v '^ *+' conftest.er1 >conftest.err
9269 rm -f conftest.er1
9270 cat conftest.err >&5
9271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9272 (exit $ac_status); } >/dev/null; then
9273 if test -s conftest.err; then
9274 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 9275 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
9276 else
9277 ac_cpp_err=
9278 fi
252b5132 9279else
13b2be9c
DJ
9280 ac_cpp_err=yes
9281fi
9282if test -z "$ac_cpp_err"; then
9283 ac_header_preproc=yes
9284else
9285 echo "$as_me: failed program was:" >&5
9286sed 's/^/| /' conftest.$ac_ext >&5
9287
9288 ac_header_preproc=no
9289fi
9290rm -f conftest.err conftest.$ac_ext
9291echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9292echo "${ECHO_T}$ac_header_preproc" >&6
9293
9294# So? What about this header?
ab509236
L
9295case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9296 yes:no: )
13b2be9c
DJ
9297 { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9298echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
ab509236
L
9299 { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9300echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9301 ac_header_preproc=yes
13b2be9c 9302 ;;
ab509236 9303 no:yes:* )
13b2be9c
DJ
9304 { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9305echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
ab509236
L
9306 { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
9307echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
9308 { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9309echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9310 { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
9311echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
13b2be9c
DJ
9312 { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9313echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
ab509236
L
9314 { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9315echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
13b2be9c
DJ
9316 (
9317 cat <<\_ASBOX
ab509236
L
9318## ------------------------------------------ ##
9319## Report this to the AC_PACKAGE_NAME lists. ##
9320## ------------------------------------------ ##
13b2be9c
DJ
9321_ASBOX
9322 ) |
9323 sed "s/^/$as_me: WARNING: /" >&2
9324 ;;
9325esac
9326echo "$as_me:$LINENO: checking for linux/version.h" >&5
9327echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9328if test "${ac_cv_header_linux_version_h+set}" = set; then
9329 echo $ECHO_N "(cached) $ECHO_C" >&6
9330else
9331 ac_cv_header_linux_version_h=$ac_header_preproc
252b5132 9332fi
13b2be9c
DJ
9333echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9334echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9335
252b5132 9336fi
13b2be9c 9337if test $ac_cv_header_linux_version_h = yes; then
252b5132
RH
9338 msgformat=linux
9339else
13b2be9c 9340 msgformat=xopen
252b5132
RH
9341fi
9342
d6d788bd 9343
13b2be9c 9344
252b5132
RH
9345 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
9346 fi
9347 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
9348 $srcdir/po2tbl.sed.in > po2tbl.sed
9349 fi
9350
9351 if test "$PACKAGE" = "gettext"; then
9352 GT_NO="#NO#"
9353 GT_YES=
9354 else
9355 GT_NO=
9356 GT_YES="#YES#"
9357 fi
13b2be9c
DJ
9358
9359
252b5132
RH
9360
9361 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
13b2be9c 9362
252b5132
RH
9363
9364 l=
13b2be9c 9365
252b5132 9366
fcd8210c 9367 if test -f $srcdir/po/POTFILES.in; then
252b5132
RH
9368 test -d po || mkdir po
9369 if test "x$srcdir" != "x."; then
9370 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9371 posrcprefix="$srcdir/"
9372 else
9373 posrcprefix="../$srcdir/"
9374 fi
9375 else
9376 posrcprefix="../"
9377 fi
9378 rm -f po/POTFILES
9379 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
9380 < $srcdir/po/POTFILES.in > po/POTFILES
9381 fi
252b5132 9382
13b2be9c
DJ
9383
9384echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
9385echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
252b5132
RH
9386 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
9387if test "${enable_maintainer_mode+set}" = set; then
9388 enableval="$enable_maintainer_mode"
9389 USE_MAINTAINER_MODE=$enableval
9390else
9391 USE_MAINTAINER_MODE=no
13b2be9c
DJ
9392fi;
9393 echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
9394echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
d6d788bd 9395
252b5132
RH
9396
9397if test $USE_MAINTAINER_MODE = yes; then
9398 MAINTAINER_MODE_TRUE=
c8615825
AM
9399 MAINTAINER_MODE_FALSE='#'
9400else
9401 MAINTAINER_MODE_TRUE='#'
9402 MAINTAINER_MODE_FALSE=
9403fi
13b2be9c 9404
c8615825 9405 MAINT=$MAINTAINER_MODE_TRUE
9b2b7d69
MM
9406
9407
9408
9409
9410
9411
13b2be9c
DJ
9412
9413
9414
9415
9416
9417
9418
9419for ac_header in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
d6d788bd 9420do
13b2be9c
DJ
9421as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9422if eval "test \"\${$as_ac_Header+set}\" = set"; then
9423 echo "$as_me:$LINENO: checking for $ac_header" >&5
9424echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9425if eval "test \"\${$as_ac_Header+set}\" = set"; then
9426 echo $ECHO_N "(cached) $ECHO_C" >&6
9427fi
9428echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9429echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9430else
9431 # Is the header compilable?
9432echo "$as_me:$LINENO: checking $ac_header usability" >&5
9433echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9434cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9435/* confdefs.h. */
9436_ACEOF
9437cat confdefs.h >>conftest.$ac_ext
9438cat >>conftest.$ac_ext <<_ACEOF
9439/* end confdefs.h. */
9440$ac_includes_default
9441#include <$ac_header>
9442_ACEOF
9443rm -f conftest.$ac_objext
9444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 9445 (eval $ac_compile) 2>conftest.er1
13b2be9c 9446 ac_status=$?
ab509236
L
9447 grep -v '^ *+' conftest.er1 >conftest.err
9448 rm -f conftest.er1
9449 cat conftest.err >&5
13b2be9c
DJ
9450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451 (exit $ac_status); } &&
ab509236
L
9452 { ac_try='test -z "$ac_c_werror_flag"
9453 || test ! -s conftest.err'
9454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9455 (eval $ac_try) 2>&5
9456 ac_status=$?
9457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458 (exit $ac_status); }; } &&
9459 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
9460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9461 (eval $ac_try) 2>&5
9462 ac_status=$?
9463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9464 (exit $ac_status); }; }; then
9465 ac_header_compiler=yes
9466else
9467 echo "$as_me: failed program was:" >&5
9468sed 's/^/| /' conftest.$ac_ext >&5
9469
9470ac_header_compiler=no
9471fi
ab509236 9472rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13b2be9c
DJ
9473echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9474echo "${ECHO_T}$ac_header_compiler" >&6
9475
9476# Is the header present?
9477echo "$as_me:$LINENO: checking $ac_header presence" >&5
9478echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9479cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9480/* confdefs.h. */
9481_ACEOF
9482cat confdefs.h >>conftest.$ac_ext
9483cat >>conftest.$ac_ext <<_ACEOF
9484/* end confdefs.h. */
9485#include <$ac_header>
9486_ACEOF
9487if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9488 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9489 ac_status=$?
9490 grep -v '^ *+' conftest.er1 >conftest.err
9491 rm -f conftest.er1
9492 cat conftest.err >&5
9493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9494 (exit $ac_status); } >/dev/null; then
9495 if test -s conftest.err; then
9496 ac_cpp_err=$ac_c_preproc_warn_flag
ab509236 9497 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13b2be9c
DJ
9498 else
9499 ac_cpp_err=
9500 fi
9b2b7d69 9501else
13b2be9c
DJ
9502 ac_cpp_err=yes
9503fi
9504if test -z "$ac_cpp_err"; then
9505 ac_header_preproc=yes
9506else
9507 echo "$as_me: failed program was:" >&5
9508sed 's/^/| /' conftest.$ac_ext >&5
9509
9510 ac_header_preproc=no
9511fi
9512rm -f conftest.err conftest.$ac_ext
9513echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9514echo "${ECHO_T}$ac_header_preproc" >&6
9515
9516# So? What about this header?
ab509236
L
9517case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9518 yes:no: )
13b2be9c
DJ
9519 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9520echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
ab509236
L
9521 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9522echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9523 ac_header_preproc=yes
13b2be9c 9524 ;;
ab509236 9525 no:yes:* )
13b2be9c
DJ
9526 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9527echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
ab509236
L
9528 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9529echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9530 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9531echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9532 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9533echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
13b2be9c
DJ
9534 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9535echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
ab509236
L
9536 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9537echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13b2be9c
DJ
9538 (
9539 cat <<\_ASBOX
ab509236
L
9540## ------------------------------------------ ##
9541## Report this to the AC_PACKAGE_NAME lists. ##
9542## ------------------------------------------ ##
13b2be9c
DJ
9543_ASBOX
9544 ) |
9545 sed "s/^/$as_me: WARNING: /" >&2
9546 ;;
9547esac
9548echo "$as_me:$LINENO: checking for $ac_header" >&5
9549echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9550if eval "test \"\${$as_ac_Header+set}\" = set"; then
9551 echo $ECHO_N "(cached) $ECHO_C" >&6
9552else
ab509236 9553 eval "$as_ac_Header=\$ac_header_preproc"
252b5132 9554fi
13b2be9c
DJ
9555echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9556echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9557
252b5132 9558fi
13b2be9c
DJ
9559if test `eval echo '${'$as_ac_Header'}'` = yes; then
9560 cat >>confdefs.h <<_ACEOF
9561#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9562_ACEOF
9563
252b5132 9564fi
13b2be9c 9565
252b5132
RH
9566done
9567
d6d788bd 9568
252b5132
RH
9569# Put this here so that autoconf's "cross-compiling" message doesn't confuse
9570# people who are not cross-compiling but are compiling cross-assemblers.
13b2be9c
DJ
9571echo "$as_me:$LINENO: checking whether compiling a cross-assembler" >&5
9572echo $ECHO_N "checking whether compiling a cross-assembler... $ECHO_C" >&6
252b5132
RH
9573if test "${host}" = "${target}"; then
9574 cross_gas=no
9575else
9576 cross_gas=yes
13b2be9c
DJ
9577
9578cat >>confdefs.h <<\_ACEOF
252b5132 9579#define CROSS_COMPILE 1
13b2be9c 9580_ACEOF
252b5132
RH
9581
9582fi
13b2be9c
DJ
9583echo "$as_me:$LINENO: result: $cross_gas" >&5
9584echo "${ECHO_T}$cross_gas" >&6
252b5132
RH
9585
9586# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9587# for constant arguments. Useless!
13b2be9c
DJ
9588echo "$as_me:$LINENO: checking for working alloca.h" >&5
9589echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
9590if test "${ac_cv_working_alloca_h+set}" = set; then
9591 echo $ECHO_N "(cached) $ECHO_C" >&6
9592else
9593 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9594/* confdefs.h. */
9595_ACEOF
9596cat confdefs.h >>conftest.$ac_ext
9597cat >>conftest.$ac_ext <<_ACEOF
9598/* end confdefs.h. */
252b5132 9599#include <alloca.h>
13b2be9c
DJ
9600int
9601main ()
9602{
9603char *p = (char *) alloca (2 * sizeof (int));
9604 ;
9605 return 0;
9606}
9607_ACEOF
9608rm -f conftest.$ac_objext conftest$ac_exeext
9609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 9610 (eval $ac_link) 2>conftest.er1
13b2be9c 9611 ac_status=$?
ab509236
L
9612 grep -v '^ *+' conftest.er1 >conftest.err
9613 rm -f conftest.er1
9614 cat conftest.err >&5
13b2be9c
DJ
9615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9616 (exit $ac_status); } &&
ab509236
L
9617 { ac_try='test -z "$ac_c_werror_flag"
9618 || test ! -s conftest.err'
9619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9620 (eval $ac_try) 2>&5
9621 ac_status=$?
9622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9623 (exit $ac_status); }; } &&
9624 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
9625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9626 (eval $ac_try) 2>&5
9627 ac_status=$?
9628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9629 (exit $ac_status); }; }; then
9630 ac_cv_working_alloca_h=yes
9631else
9632 echo "$as_me: failed program was:" >&5
9633sed 's/^/| /' conftest.$ac_ext >&5
9634
9635ac_cv_working_alloca_h=no
9636fi
ab509236
L
9637rm -f conftest.err conftest.$ac_objext \
9638 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
9639fi
9640echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
9641echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
9642if test $ac_cv_working_alloca_h = yes; then
9643
9644cat >>confdefs.h <<\_ACEOF
252b5132 9645#define HAVE_ALLOCA_H 1
13b2be9c 9646_ACEOF
252b5132
RH
9647
9648fi
9649
13b2be9c
DJ
9650echo "$as_me:$LINENO: checking for alloca" >&5
9651echo $ECHO_N "checking for alloca... $ECHO_C" >&6
9652if test "${ac_cv_func_alloca_works+set}" = set; then
9653 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 9654else
13b2be9c 9655 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9656/* confdefs.h. */
9657_ACEOF
9658cat confdefs.h >>conftest.$ac_ext
9659cat >>conftest.$ac_ext <<_ACEOF
9660/* end confdefs.h. */
252b5132
RH
9661#ifdef __GNUC__
9662# define alloca __builtin_alloca
9663#else
9664# ifdef _MSC_VER
9665# include <malloc.h>
9666# define alloca _alloca
9667# else
9668# if HAVE_ALLOCA_H
9669# include <alloca.h>
9670# else
9671# ifdef _AIX
9672 #pragma alloca
9673# else
9674# ifndef alloca /* predefined by HP cc +Olibcalls */
9675char *alloca ();
9676# endif
9677# endif
9678# endif
9679# endif
9680#endif
9681
13b2be9c
DJ
9682int
9683main ()
9684{
9685char *p = (char *) alloca (1);
9686 ;
9687 return 0;
9688}
9689_ACEOF
9690rm -f conftest.$ac_objext conftest$ac_exeext
9691if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 9692 (eval $ac_link) 2>conftest.er1
13b2be9c 9693 ac_status=$?
ab509236
L
9694 grep -v '^ *+' conftest.er1 >conftest.err
9695 rm -f conftest.er1
9696 cat conftest.err >&5
13b2be9c
DJ
9697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9698 (exit $ac_status); } &&
ab509236
L
9699 { ac_try='test -z "$ac_c_werror_flag"
9700 || test ! -s conftest.err'
9701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9702 (eval $ac_try) 2>&5
9703 ac_status=$?
9704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9705 (exit $ac_status); }; } &&
9706 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
9707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9708 (eval $ac_try) 2>&5
9709 ac_status=$?
9710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711 (exit $ac_status); }; }; then
252b5132
RH
9712 ac_cv_func_alloca_works=yes
9713else
13b2be9c
DJ
9714 echo "$as_me: failed program was:" >&5
9715sed 's/^/| /' conftest.$ac_ext >&5
9716
9717ac_cv_func_alloca_works=no
252b5132 9718fi
ab509236
L
9719rm -f conftest.err conftest.$ac_objext \
9720 conftest$ac_exeext conftest.$ac_ext
252b5132 9721fi
13b2be9c
DJ
9722echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
9723echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
252b5132 9724
252b5132 9725if test $ac_cv_func_alloca_works = yes; then
9b2b7d69 9726
13b2be9c
DJ
9727cat >>confdefs.h <<\_ACEOF
9728#define HAVE_ALLOCA 1
9729_ACEOF
9b2b7d69 9730
13b2be9c 9731else
c8615825 9732 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13b2be9c
DJ
9733# that cause trouble. Some versions do not even contain alloca or
9734# contain a buggy version. If you still want to use their alloca,
9735# use ar to extract alloca.o from them instead of compiling alloca.c.
9736
9737ALLOCA=alloca.$ac_objext
9738
9739cat >>confdefs.h <<\_ACEOF
252b5132 9740#define C_ALLOCA 1
13b2be9c 9741_ACEOF
252b5132 9742
d6d788bd 9743
13b2be9c
DJ
9744echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
9745echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
9746if test "${ac_cv_os_cray+set}" = set; then
9747 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 9748else
13b2be9c 9749 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9750/* confdefs.h. */
9751_ACEOF
9752cat confdefs.h >>conftest.$ac_ext
9753cat >>conftest.$ac_ext <<_ACEOF
9754/* end confdefs.h. */
252b5132
RH
9755#if defined(CRAY) && ! defined(CRAY2)
9756webecray
9757#else
9758wenotbecray
9759#endif
9760
13b2be9c 9761_ACEOF
252b5132 9762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13b2be9c 9763 $EGREP "webecray" >/dev/null 2>&1; then
252b5132
RH
9764 ac_cv_os_cray=yes
9765else
252b5132
RH
9766 ac_cv_os_cray=no
9767fi
9768rm -f conftest*
9769
9770fi
13b2be9c
DJ
9771echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
9772echo "${ECHO_T}$ac_cv_os_cray" >&6
252b5132 9773if test $ac_cv_os_cray = yes; then
13b2be9c
DJ
9774 for ac_func in _getb67 GETB67 getb67; do
9775 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9776echo "$as_me:$LINENO: checking for $ac_func" >&5
9777echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9778if eval "test \"\${$as_ac_var+set}\" = set"; then
9779 echo $ECHO_N "(cached) $ECHO_C" >&6
9780else
9781 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9782/* confdefs.h. */
9783_ACEOF
9784cat confdefs.h >>conftest.$ac_ext
9785cat >>conftest.$ac_ext <<_ACEOF
9786/* end confdefs.h. */
ab509236
L
9787/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9788 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9789#define $ac_func innocuous_$ac_func
9790
252b5132 9791/* System header to define __stub macros and hopefully few prototypes,
13b2be9c
DJ
9792 which can conflict with char $ac_func (); below.
9793 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9794 <limits.h> exists even on freestanding compilers. */
ab509236 9795
13b2be9c
DJ
9796#ifdef __STDC__
9797# include <limits.h>
9798#else
9799# include <assert.h>
9800#endif
ab509236
L
9801
9802#undef $ac_func
9803
252b5132 9804/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
9805#ifdef __cplusplus
9806extern "C"
9807{
9808#endif
252b5132 9809/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
9810 builtin and then its argument prototype would still apply. */
9811char $ac_func ();
252b5132
RH
9812/* The GNU C library defines this for functions which it implements
9813 to always fail with ENOSYS. Some functions are actually named
9814 something starting with __ and the normal name is an alias. */
9815#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9816choke me
9817#else
13b2be9c
DJ
9818char (*f) () = $ac_func;
9819#endif
9820#ifdef __cplusplus
9821}
252b5132
RH
9822#endif
9823
13b2be9c
DJ
9824int
9825main ()
9826{
9827return f != $ac_func;
9828 ;
9829 return 0;
9830}
9831_ACEOF
9832rm -f conftest.$ac_objext conftest$ac_exeext
9833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 9834 (eval $ac_link) 2>conftest.er1
13b2be9c 9835 ac_status=$?
ab509236
L
9836 grep -v '^ *+' conftest.er1 >conftest.err
9837 rm -f conftest.er1
9838 cat conftest.err >&5
13b2be9c
DJ
9839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840 (exit $ac_status); } &&
ab509236
L
9841 { ac_try='test -z "$ac_c_werror_flag"
9842 || test ! -s conftest.err'
9843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9844 (eval $ac_try) 2>&5
9845 ac_status=$?
9846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847 (exit $ac_status); }; } &&
9848 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
9849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9850 (eval $ac_try) 2>&5
9851 ac_status=$?
9852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853 (exit $ac_status); }; }; then
9854 eval "$as_ac_var=yes"
9855else
9856 echo "$as_me: failed program was:" >&5
9857sed 's/^/| /' conftest.$ac_ext >&5
9858
9859eval "$as_ac_var=no"
9860fi
ab509236
L
9861rm -f conftest.err conftest.$ac_objext \
9862 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
9863fi
9864echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9865echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9866if test `eval echo '${'$as_ac_var'}'` = yes; then
9867
9868cat >>confdefs.h <<_ACEOF
252b5132 9869#define CRAY_STACKSEG_END $ac_func
13b2be9c 9870_ACEOF
252b5132 9871
13b2be9c 9872 break
252b5132
RH
9873fi
9874
13b2be9c 9875 done
252b5132
RH
9876fi
9877
13b2be9c
DJ
9878echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
9879echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
9880if test "${ac_cv_c_stack_direction+set}" = set; then
9881 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
9882else
9883 if test "$cross_compiling" = yes; then
9884 ac_cv_c_stack_direction=0
9885else
13b2be9c 9886 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9887/* confdefs.h. */
9888_ACEOF
9889cat confdefs.h >>conftest.$ac_ext
9890cat >>conftest.$ac_ext <<_ACEOF
9891/* end confdefs.h. */
9892int
252b5132
RH
9893find_stack_direction ()
9894{
9895 static char *addr = 0;
9896 auto char dummy;
9897 if (addr == 0)
9898 {
9899 addr = &dummy;
9900 return find_stack_direction ();
9901 }
9902 else
9903 return (&dummy > addr) ? 1 : -1;
9904}
13b2be9c
DJ
9905
9906int
252b5132
RH
9907main ()
9908{
13b2be9c 9909 exit (find_stack_direction () < 0);
252b5132 9910}
13b2be9c
DJ
9911_ACEOF
9912rm -f conftest$ac_exeext
9913if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9914 (eval $ac_link) 2>&5
9915 ac_status=$?
9916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9919 (eval $ac_try) 2>&5
9920 ac_status=$?
9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922 (exit $ac_status); }; }; then
252b5132
RH
9923 ac_cv_c_stack_direction=1
9924else
13b2be9c
DJ
9925 echo "$as_me: program exited with status $ac_status" >&5
9926echo "$as_me: failed program was:" >&5
9927sed 's/^/| /' conftest.$ac_ext >&5
9928
9929( exit $ac_status )
9930ac_cv_c_stack_direction=-1
252b5132 9931fi
ab509236 9932rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
252b5132 9933fi
252b5132 9934fi
13b2be9c
DJ
9935echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
9936echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
252b5132 9937
13b2be9c 9938cat >>confdefs.h <<_ACEOF
252b5132 9939#define STACK_DIRECTION $ac_cv_c_stack_direction
13b2be9c
DJ
9940_ACEOF
9941
252b5132
RH
9942
9943fi
9944
13b2be9c
DJ
9945echo "$as_me:$LINENO: checking for inline" >&5
9946echo $ECHO_N "checking for inline... $ECHO_C" >&6
9947if test "${ac_cv_c_inline+set}" = set; then
9948 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
9949else
9950 ac_cv_c_inline=no
9951for ac_kw in inline __inline__ __inline; do
13b2be9c 9952 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
9953/* confdefs.h. */
9954_ACEOF
9955cat confdefs.h >>conftest.$ac_ext
9956cat >>conftest.$ac_ext <<_ACEOF
9957/* end confdefs.h. */
9958#ifndef __cplusplus
9959typedef int foo_t;
9960static $ac_kw foo_t static_foo () {return 0; }
9961$ac_kw foo_t foo () {return 0; }
9962#endif
252b5132 9963
13b2be9c
DJ
9964_ACEOF
9965rm -f conftest.$ac_objext
9966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ab509236 9967 (eval $ac_compile) 2>conftest.er1
13b2be9c 9968 ac_status=$?
ab509236
L
9969 grep -v '^ *+' conftest.er1 >conftest.err
9970 rm -f conftest.er1
9971 cat conftest.err >&5
13b2be9c
DJ
9972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9973 (exit $ac_status); } &&
ab509236
L
9974 { ac_try='test -z "$ac_c_werror_flag"
9975 || test ! -s conftest.err'
9976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9977 (eval $ac_try) 2>&5
9978 ac_status=$?
9979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9980 (exit $ac_status); }; } &&
9981 { ac_try='test -s conftest.$ac_objext'
13b2be9c
DJ
9982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9983 (eval $ac_try) 2>&5
9984 ac_status=$?
9985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9986 (exit $ac_status); }; }; then
252b5132
RH
9987 ac_cv_c_inline=$ac_kw; break
9988else
13b2be9c
DJ
9989 echo "$as_me: failed program was:" >&5
9990sed 's/^/| /' conftest.$ac_ext >&5
9991
252b5132 9992fi
ab509236 9993rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
252b5132
RH
9994done
9995
9996fi
13b2be9c
DJ
9997echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
9998echo "${ECHO_T}$ac_cv_c_inline" >&6
ab509236
L
9999
10000
13b2be9c 10001case $ac_cv_c_inline in
252b5132 10002 inline | yes) ;;
ab509236
L
10003 *)
10004 case $ac_cv_c_inline in
10005 no) ac_val=;;
10006 *) ac_val=$ac_cv_c_inline;;
10007 esac
10008 cat >>confdefs.h <<_ACEOF
10009#ifndef __cplusplus
10010#define inline $ac_val
10011#endif
13b2be9c 10012_ACEOF
ab509236 10013 ;;
252b5132
RH
10014esac
10015
6840198f 10016
d6d788bd 10017# VMS doesn't have unlink.
13b2be9c
DJ
10018
10019
252b5132
RH
10020for ac_func in unlink remove
10021do
13b2be9c
DJ
10022as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10023echo "$as_me:$LINENO: checking for $ac_func" >&5
10024echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10025if eval "test \"\${$as_ac_var+set}\" = set"; then
10026 echo $ECHO_N "(cached) $ECHO_C" >&6
10027else
10028 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10029/* confdefs.h. */
10030_ACEOF
10031cat confdefs.h >>conftest.$ac_ext
10032cat >>conftest.$ac_ext <<_ACEOF
10033/* end confdefs.h. */
ab509236
L
10034/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10035 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10036#define $ac_func innocuous_$ac_func
10037
252b5132 10038/* System header to define __stub macros and hopefully few prototypes,
13b2be9c
DJ
10039 which can conflict with char $ac_func (); below.
10040 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10041 <limits.h> exists even on freestanding compilers. */
ab509236 10042
13b2be9c
DJ
10043#ifdef __STDC__
10044# include <limits.h>
10045#else
10046# include <assert.h>
10047#endif
ab509236
L
10048
10049#undef $ac_func
10050
252b5132 10051/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
10052#ifdef __cplusplus
10053extern "C"
10054{
10055#endif
252b5132 10056/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
10057 builtin and then its argument prototype would still apply. */
10058char $ac_func ();
252b5132
RH
10059/* The GNU C library defines this for functions which it implements
10060 to always fail with ENOSYS. Some functions are actually named
10061 something starting with __ and the normal name is an alias. */
10062#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10063choke me
10064#else
13b2be9c
DJ
10065char (*f) () = $ac_func;
10066#endif
10067#ifdef __cplusplus
10068}
252b5132
RH
10069#endif
10070
13b2be9c
DJ
10071int
10072main ()
10073{
10074return f != $ac_func;
10075 ;
10076 return 0;
10077}
10078_ACEOF
10079rm -f conftest.$ac_objext conftest$ac_exeext
10080if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10081 (eval $ac_link) 2>conftest.er1
13b2be9c 10082 ac_status=$?
ab509236
L
10083 grep -v '^ *+' conftest.er1 >conftest.err
10084 rm -f conftest.er1
10085 cat conftest.err >&5
13b2be9c
DJ
10086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087 (exit $ac_status); } &&
ab509236
L
10088 { ac_try='test -z "$ac_c_werror_flag"
10089 || test ! -s conftest.err'
10090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10091 (eval $ac_try) 2>&5
10092 ac_status=$?
10093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094 (exit $ac_status); }; } &&
10095 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10097 (eval $ac_try) 2>&5
10098 ac_status=$?
10099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10100 (exit $ac_status); }; }; then
10101 eval "$as_ac_var=yes"
10102else
10103 echo "$as_me: failed program was:" >&5
10104sed 's/^/| /' conftest.$ac_ext >&5
10105
10106eval "$as_ac_var=no"
10107fi
ab509236
L
10108rm -f conftest.err conftest.$ac_objext \
10109 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10110fi
10111echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10112echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10113if test `eval echo '${'$as_ac_var'}'` = yes; then
10114 cat >>confdefs.h <<_ACEOF
10115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10116_ACEOF
252b5132 10117 break
252b5132
RH
10118fi
10119done
10120
6840198f 10121
d6d788bd 10122# Some systems don't have sbrk().
13b2be9c 10123
252b5132
RH
10124for ac_func in sbrk
10125do
13b2be9c
DJ
10126as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10127echo "$as_me:$LINENO: checking for $ac_func" >&5
10128echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10129if eval "test \"\${$as_ac_var+set}\" = set"; then
10130 echo $ECHO_N "(cached) $ECHO_C" >&6
10131else
10132 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10133/* confdefs.h. */
10134_ACEOF
10135cat confdefs.h >>conftest.$ac_ext
10136cat >>conftest.$ac_ext <<_ACEOF
10137/* end confdefs.h. */
ab509236
L
10138/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10139 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10140#define $ac_func innocuous_$ac_func
10141
252b5132 10142/* System header to define __stub macros and hopefully few prototypes,
13b2be9c
DJ
10143 which can conflict with char $ac_func (); below.
10144 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10145 <limits.h> exists even on freestanding compilers. */
ab509236 10146
13b2be9c
DJ
10147#ifdef __STDC__
10148# include <limits.h>
10149#else
10150# include <assert.h>
10151#endif
ab509236
L
10152
10153#undef $ac_func
10154
252b5132 10155/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
10156#ifdef __cplusplus
10157extern "C"
10158{
10159#endif
252b5132 10160/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
10161 builtin and then its argument prototype would still apply. */
10162char $ac_func ();
252b5132
RH
10163/* The GNU C library defines this for functions which it implements
10164 to always fail with ENOSYS. Some functions are actually named
10165 something starting with __ and the normal name is an alias. */
10166#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10167choke me
10168#else
13b2be9c
DJ
10169char (*f) () = $ac_func;
10170#endif
10171#ifdef __cplusplus
10172}
252b5132
RH
10173#endif
10174
13b2be9c
DJ
10175int
10176main ()
10177{
10178return f != $ac_func;
10179 ;
10180 return 0;
10181}
10182_ACEOF
10183rm -f conftest.$ac_objext conftest$ac_exeext
10184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10185 (eval $ac_link) 2>conftest.er1
13b2be9c 10186 ac_status=$?
ab509236
L
10187 grep -v '^ *+' conftest.er1 >conftest.err
10188 rm -f conftest.er1
10189 cat conftest.err >&5
13b2be9c
DJ
10190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10191 (exit $ac_status); } &&
ab509236
L
10192 { ac_try='test -z "$ac_c_werror_flag"
10193 || test ! -s conftest.err'
10194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10195 (eval $ac_try) 2>&5
10196 ac_status=$?
10197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10198 (exit $ac_status); }; } &&
10199 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10201 (eval $ac_try) 2>&5
10202 ac_status=$?
10203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10204 (exit $ac_status); }; }; then
10205 eval "$as_ac_var=yes"
10206else
10207 echo "$as_me: failed program was:" >&5
10208sed 's/^/| /' conftest.$ac_ext >&5
10209
10210eval "$as_ac_var=no"
10211fi
ab509236
L
10212rm -f conftest.err conftest.$ac_objext \
10213 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10214fi
10215echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10216echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10217if test `eval echo '${'$as_ac_var'}'` = yes; then
10218 cat >>confdefs.h <<_ACEOF
10219#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10220_ACEOF
252b5132 10221
252b5132
RH
10222fi
10223done
10224
d6d788bd 10225
39bec121
TW
10226# do we need the math library?
10227case "${need_libm}" in
13b2be9c 10228yes)
39bec121 10229 LIBM=
f9c19112 10230case $host in
4b363073 10231*-*-beos* | *-*-cygwin* | *-*-pw32*)
39bec121
TW
10232 # These system don't have libm
10233 ;;
10234*-ncr-sysv4.3*)
13b2be9c
DJ
10235 echo "$as_me:$LINENO: checking for _mwvalidcheckl in -lmw" >&5
10236echo $ECHO_N "checking for _mwvalidcheckl in -lmw... $ECHO_C" >&6
10237if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then
10238 echo $ECHO_N "(cached) $ECHO_C" >&6
39bec121 10239else
13b2be9c 10240 ac_check_lib_save_LIBS=$LIBS
39bec121 10241LIBS="-lmw $LIBS"
13b2be9c 10242cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10243/* confdefs.h. */
10244_ACEOF
10245cat confdefs.h >>conftest.$ac_ext
10246cat >>conftest.$ac_ext <<_ACEOF
10247/* end confdefs.h. */
10248
39bec121 10249/* Override any gcc2 internal prototype to avoid an error. */
13b2be9c
DJ
10250#ifdef __cplusplus
10251extern "C"
10252#endif
39bec121 10253/* We use char because int might match the return type of a gcc2
13b2be9c
DJ
10254 builtin and then its argument prototype would still apply. */
10255char _mwvalidcheckl ();
10256int
10257main ()
10258{
10259_mwvalidcheckl ();
10260 ;
10261 return 0;
10262}
10263_ACEOF
10264rm -f conftest.$ac_objext conftest$ac_exeext
10265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10266 (eval $ac_link) 2>conftest.er1
13b2be9c 10267 ac_status=$?
ab509236
L
10268 grep -v '^ *+' conftest.er1 >conftest.err
10269 rm -f conftest.er1
10270 cat conftest.err >&5
13b2be9c
DJ
10271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10272 (exit $ac_status); } &&
ab509236
L
10273 { ac_try='test -z "$ac_c_werror_flag"
10274 || test ! -s conftest.err'
10275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10276 (eval $ac_try) 2>&5
10277 ac_status=$?
10278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279 (exit $ac_status); }; } &&
10280 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10282 (eval $ac_try) 2>&5
10283 ac_status=$?
10284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10285 (exit $ac_status); }; }; then
10286 ac_cv_lib_mw__mwvalidcheckl=yes
10287else
10288 echo "$as_me: failed program was:" >&5
10289sed 's/^/| /' conftest.$ac_ext >&5
10290
10291ac_cv_lib_mw__mwvalidcheckl=no
10292fi
ab509236
L
10293rm -f conftest.err conftest.$ac_objext \
10294 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10295LIBS=$ac_check_lib_save_LIBS
10296fi
10297echo "$as_me:$LINENO: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
10298echo "${ECHO_T}$ac_cv_lib_mw__mwvalidcheckl" >&6
10299if test $ac_cv_lib_mw__mwvalidcheckl = yes; then
39bec121 10300 LIBM="-lmw"
39bec121
TW
10301fi
10302
13b2be9c
DJ
10303 echo "$as_me:$LINENO: checking for main in -lm" >&5
10304echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
10305if test "${ac_cv_lib_m_main+set}" = set; then
10306 echo $ECHO_N "(cached) $ECHO_C" >&6
39bec121 10307else
13b2be9c 10308 ac_check_lib_save_LIBS=$LIBS
39bec121 10309LIBS="-lm $LIBS"
13b2be9c 10310cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10311/* confdefs.h. */
10312_ACEOF
10313cat confdefs.h >>conftest.$ac_ext
10314cat >>conftest.$ac_ext <<_ACEOF
10315/* end confdefs.h. */
39bec121 10316
d6d788bd 10317
13b2be9c
DJ
10318int
10319main ()
10320{
10321main ();
10322 ;
10323 return 0;
10324}
10325_ACEOF
10326rm -f conftest.$ac_objext conftest$ac_exeext
10327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10328 (eval $ac_link) 2>conftest.er1
13b2be9c 10329 ac_status=$?
ab509236
L
10330 grep -v '^ *+' conftest.er1 >conftest.err
10331 rm -f conftest.er1
10332 cat conftest.err >&5
13b2be9c
DJ
10333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10334 (exit $ac_status); } &&
ab509236
L
10335 { ac_try='test -z "$ac_c_werror_flag"
10336 || test ! -s conftest.err'
10337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10338 (eval $ac_try) 2>&5
10339 ac_status=$?
10340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10341 (exit $ac_status); }; } &&
10342 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10344 (eval $ac_try) 2>&5
10345 ac_status=$?
10346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10347 (exit $ac_status); }; }; then
10348 ac_cv_lib_m_main=yes
10349else
10350 echo "$as_me: failed program was:" >&5
10351sed 's/^/| /' conftest.$ac_ext >&5
10352
10353ac_cv_lib_m_main=no
10354fi
ab509236
L
10355rm -f conftest.err conftest.$ac_objext \
10356 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10357LIBS=$ac_check_lib_save_LIBS
10358fi
10359echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
10360echo "${ECHO_T}$ac_cv_lib_m_main" >&6
10361if test $ac_cv_lib_m_main = yes; then
39bec121 10362 LIBM="$LIBM -lm"
39bec121
TW
10363fi
10364
10365 ;;
10366*)
13b2be9c
DJ
10367 echo "$as_me:$LINENO: checking for main in -lm" >&5
10368echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
10369if test "${ac_cv_lib_m_main+set}" = set; then
10370 echo $ECHO_N "(cached) $ECHO_C" >&6
39bec121 10371else
13b2be9c 10372 ac_check_lib_save_LIBS=$LIBS
39bec121 10373LIBS="-lm $LIBS"
13b2be9c 10374cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10375/* confdefs.h. */
10376_ACEOF
10377cat confdefs.h >>conftest.$ac_ext
10378cat >>conftest.$ac_ext <<_ACEOF
10379/* end confdefs.h. */
39bec121 10380
d6d788bd 10381
13b2be9c
DJ
10382int
10383main ()
10384{
10385main ();
10386 ;
10387 return 0;
10388}
10389_ACEOF
10390rm -f conftest.$ac_objext conftest$ac_exeext
10391if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10392 (eval $ac_link) 2>conftest.er1
13b2be9c 10393 ac_status=$?
ab509236
L
10394 grep -v '^ *+' conftest.er1 >conftest.err
10395 rm -f conftest.er1
10396 cat conftest.err >&5
13b2be9c
DJ
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); } &&
ab509236
L
10399 { ac_try='test -z "$ac_c_werror_flag"
10400 || test ! -s conftest.err'
10401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10402 (eval $ac_try) 2>&5
10403 ac_status=$?
10404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10405 (exit $ac_status); }; } &&
10406 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10408 (eval $ac_try) 2>&5
10409 ac_status=$?
10410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10411 (exit $ac_status); }; }; then
10412 ac_cv_lib_m_main=yes
10413else
10414 echo "$as_me: failed program was:" >&5
10415sed 's/^/| /' conftest.$ac_ext >&5
10416
10417ac_cv_lib_m_main=no
10418fi
ab509236
L
10419rm -f conftest.err conftest.$ac_objext \
10420 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10421LIBS=$ac_check_lib_save_LIBS
10422fi
10423echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
10424echo "${ECHO_T}$ac_cv_lib_m_main" >&6
10425if test $ac_cv_lib_m_main = yes; then
39bec121 10426 LIBM="-lm"
39bec121
TW
10427fi
10428
10429 ;;
10430esac
10431
13b2be9c 10432
39bec121
TW
10433 ;;
10434esac
10435
252b5132
RH
10436# Some non-ANSI preprocessors botch requoting inside strings. That's bad
10437# enough, but on some of those systems, the assert macro relies on requoting
10438# working properly!
13b2be9c
DJ
10439echo "$as_me:$LINENO: checking for working assert macro" >&5
10440echo $ECHO_N "checking for working assert macro... $ECHO_C" >&6
10441if test "${gas_cv_assert_ok+set}" = set; then
10442 echo $ECHO_N "(cached) $ECHO_C" >&6
10443else
10444 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10445/* confdefs.h. */
10446_ACEOF
10447cat confdefs.h >>conftest.$ac_ext
10448cat >>conftest.$ac_ext <<_ACEOF
10449/* end confdefs.h. */
252b5132
RH
10450#include <assert.h>
10451#include <stdio.h>
13b2be9c
DJ
10452int
10453main ()
10454{
252b5132
RH
10455
10456/* check for requoting problems */
10457static int a, b, c, d;
10458static char *s;
10459assert (!strcmp(s, "foo bar baz quux"));
10460/* check for newline handling */
10461assert (a == b
10462 || c == d);
10463
13b2be9c
DJ
10464 ;
10465 return 0;
10466}
10467_ACEOF
10468rm -f conftest.$ac_objext conftest$ac_exeext
10469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10470 (eval $ac_link) 2>conftest.er1
13b2be9c 10471 ac_status=$?
ab509236
L
10472 grep -v '^ *+' conftest.er1 >conftest.err
10473 rm -f conftest.er1
10474 cat conftest.err >&5
13b2be9c
DJ
10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10476 (exit $ac_status); } &&
ab509236
L
10477 { ac_try='test -z "$ac_c_werror_flag"
10478 || test ! -s conftest.err'
10479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10480 (eval $ac_try) 2>&5
10481 ac_status=$?
10482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10483 (exit $ac_status); }; } &&
10484 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10486 (eval $ac_try) 2>&5
10487 ac_status=$?
10488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10489 (exit $ac_status); }; }; then
252b5132
RH
10490 gas_cv_assert_ok=yes
10491else
13b2be9c
DJ
10492 echo "$as_me: failed program was:" >&5
10493sed 's/^/| /' conftest.$ac_ext >&5
10494
10495gas_cv_assert_ok=no
252b5132 10496fi
ab509236
L
10497rm -f conftest.err conftest.$ac_objext \
10498 conftest$ac_exeext conftest.$ac_ext
252b5132 10499fi
13b2be9c
DJ
10500echo "$as_me:$LINENO: result: $gas_cv_assert_ok" >&5
10501echo "${ECHO_T}$gas_cv_assert_ok" >&6
10502test $gas_cv_assert_ok = yes ||
10503cat >>confdefs.h <<\_ACEOF
252b5132 10504#define BROKEN_ASSERT 1
13b2be9c 10505_ACEOF
252b5132 10506
d6d788bd
L
10507
10508
252b5132
RH
10509# On some systems, the system header files may not declare malloc, realloc,
10510# and free. There are places where gas needs these functions to have been
10511# declared -- such as when taking their addresses.
10512gas_test_headers="
10513#ifdef HAVE_MEMORY_H
10514#include <memory.h>
10515#endif
10516#ifdef HAVE_STRING_H
10517#include <string.h>
10518#else
10519#ifdef HAVE_STRINGS_H
10520#include <strings.h>
10521#endif
10522#endif
10523#ifdef HAVE_STDLIB_H
10524#include <stdlib.h>
10525#endif
10526#ifdef HAVE_UNISTD_H
10527#include <unistd.h>
10528#endif
10529"
10530
13b2be9c
DJ
10531echo "$as_me:$LINENO: checking whether declaration is required for strstr" >&5
10532echo $ECHO_N "checking whether declaration is required for strstr... $ECHO_C" >&6
10533if test "${gas_cv_decl_needed_strstr+set}" = set; then
10534 echo $ECHO_N "(cached) $ECHO_C" >&6
10535else
10536 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10537/* confdefs.h. */
10538_ACEOF
10539cat confdefs.h >>conftest.$ac_ext
10540cat >>conftest.$ac_ext <<_ACEOF
10541/* end confdefs.h. */
252b5132 10542$gas_test_headers
13b2be9c
DJ
10543int
10544main ()
10545{
252b5132
RH
10546
10547typedef char *(*f)();
10548f x;
10549x = (f) strstr;
10550
13b2be9c
DJ
10551 ;
10552 return 0;
10553}
10554_ACEOF
10555rm -f conftest.$ac_objext conftest$ac_exeext
10556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10557 (eval $ac_link) 2>conftest.er1
13b2be9c 10558 ac_status=$?
ab509236
L
10559 grep -v '^ *+' conftest.er1 >conftest.err
10560 rm -f conftest.er1
10561 cat conftest.err >&5
13b2be9c
DJ
10562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10563 (exit $ac_status); } &&
ab509236
L
10564 { ac_try='test -z "$ac_c_werror_flag"
10565 || test ! -s conftest.err'
10566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10567 (eval $ac_try) 2>&5
10568 ac_status=$?
10569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10570 (exit $ac_status); }; } &&
10571 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10573 (eval $ac_try) 2>&5
10574 ac_status=$?
10575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10576 (exit $ac_status); }; }; then
252b5132
RH
10577 gas_cv_decl_needed_strstr=no
10578else
13b2be9c
DJ
10579 echo "$as_me: failed program was:" >&5
10580sed 's/^/| /' conftest.$ac_ext >&5
10581
10582gas_cv_decl_needed_strstr=yes
252b5132 10583fi
ab509236
L
10584rm -f conftest.err conftest.$ac_objext \
10585 conftest$ac_exeext conftest.$ac_ext
252b5132 10586fi
13b2be9c
DJ
10587echo "$as_me:$LINENO: result: $gas_cv_decl_needed_strstr" >&5
10588echo "${ECHO_T}$gas_cv_decl_needed_strstr" >&6
252b5132 10589if test $gas_cv_decl_needed_strstr = yes; then
13b2be9c
DJ
10590
10591cat >>confdefs.h <<\_ACEOF
252b5132 10592#define NEED_DECLARATION_STRSTR 1
13b2be9c
DJ
10593_ACEOF
10594
10595fi
10596
10597
10598echo "$as_me:$LINENO: checking whether declaration is required for malloc" >&5
10599echo $ECHO_N "checking whether declaration is required for malloc... $ECHO_C" >&6
10600if test "${gas_cv_decl_needed_malloc+set}" = set; then
10601 echo $ECHO_N "(cached) $ECHO_C" >&6
10602else
10603 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10604/* confdefs.h. */
10605_ACEOF
10606cat confdefs.h >>conftest.$ac_ext
10607cat >>conftest.$ac_ext <<_ACEOF
10608/* end confdefs.h. */
10609$gas_test_headers
10610int
10611main ()
10612{
10613
10614typedef char *(*f)();
10615f x;
10616x = (f) malloc;
10617
10618 ;
10619 return 0;
10620}
10621_ACEOF
10622rm -f conftest.$ac_objext conftest$ac_exeext
10623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10624 (eval $ac_link) 2>conftest.er1
13b2be9c 10625 ac_status=$?
ab509236
L
10626 grep -v '^ *+' conftest.er1 >conftest.err
10627 rm -f conftest.er1
10628 cat conftest.err >&5
13b2be9c
DJ
10629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10630 (exit $ac_status); } &&
ab509236
L
10631 { ac_try='test -z "$ac_c_werror_flag"
10632 || test ! -s conftest.err'
10633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10634 (eval $ac_try) 2>&5
10635 ac_status=$?
10636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10637 (exit $ac_status); }; } &&
10638 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10640 (eval $ac_try) 2>&5
10641 ac_status=$?
10642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10643 (exit $ac_status); }; }; then
10644 gas_cv_decl_needed_malloc=no
10645else
10646 echo "$as_me: failed program was:" >&5
10647sed 's/^/| /' conftest.$ac_ext >&5
10648
10649gas_cv_decl_needed_malloc=yes
10650fi
ab509236
L
10651rm -f conftest.err conftest.$ac_objext \
10652 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10653fi
10654echo "$as_me:$LINENO: result: $gas_cv_decl_needed_malloc" >&5
10655echo "${ECHO_T}$gas_cv_decl_needed_malloc" >&6
10656if test $gas_cv_decl_needed_malloc = yes; then
10657
10658cat >>confdefs.h <<\_ACEOF
10659#define NEED_DECLARATION_MALLOC 1
10660_ACEOF
10661
10662fi
10663
10664
10665echo "$as_me:$LINENO: checking whether declaration is required for free" >&5
10666echo $ECHO_N "checking whether declaration is required for free... $ECHO_C" >&6
10667if test "${gas_cv_decl_needed_free+set}" = set; then
10668 echo $ECHO_N "(cached) $ECHO_C" >&6
10669else
10670 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10671/* confdefs.h. */
10672_ACEOF
10673cat confdefs.h >>conftest.$ac_ext
10674cat >>conftest.$ac_ext <<_ACEOF
10675/* end confdefs.h. */
10676$gas_test_headers
10677int
10678main ()
10679{
10680
10681typedef void (*f)();
10682f x;
10683x = (f) free;
10684
10685 ;
10686 return 0;
10687}
10688_ACEOF
10689rm -f conftest.$ac_objext conftest$ac_exeext
10690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10691 (eval $ac_link) 2>conftest.er1
13b2be9c 10692 ac_status=$?
ab509236
L
10693 grep -v '^ *+' conftest.er1 >conftest.err
10694 rm -f conftest.er1
10695 cat conftest.err >&5
13b2be9c
DJ
10696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10697 (exit $ac_status); } &&
ab509236
L
10698 { ac_try='test -z "$ac_c_werror_flag"
10699 || test ! -s conftest.err'
10700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10701 (eval $ac_try) 2>&5
10702 ac_status=$?
10703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10704 (exit $ac_status); }; } &&
10705 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10707 (eval $ac_try) 2>&5
10708 ac_status=$?
10709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10710 (exit $ac_status); }; }; then
10711 gas_cv_decl_needed_free=no
10712else
10713 echo "$as_me: failed program was:" >&5
10714sed 's/^/| /' conftest.$ac_ext >&5
10715
10716gas_cv_decl_needed_free=yes
10717fi
ab509236
L
10718rm -f conftest.err conftest.$ac_objext \
10719 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10720fi
10721echo "$as_me:$LINENO: result: $gas_cv_decl_needed_free" >&5
10722echo "${ECHO_T}$gas_cv_decl_needed_free" >&6
10723if test $gas_cv_decl_needed_free = yes; then
10724
10725cat >>confdefs.h <<\_ACEOF
10726#define NEED_DECLARATION_FREE 1
10727_ACEOF
10728
10729fi
10730
10731
10732echo "$as_me:$LINENO: checking whether declaration is required for sbrk" >&5
10733echo $ECHO_N "checking whether declaration is required for sbrk... $ECHO_C" >&6
10734if test "${gas_cv_decl_needed_sbrk+set}" = set; then
10735 echo $ECHO_N "(cached) $ECHO_C" >&6
10736else
10737 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10738/* confdefs.h. */
10739_ACEOF
10740cat confdefs.h >>conftest.$ac_ext
10741cat >>conftest.$ac_ext <<_ACEOF
10742/* end confdefs.h. */
10743$gas_test_headers
10744int
10745main ()
10746{
10747
10748typedef char *(*f)();
10749f x;
10750x = (f) sbrk;
10751
10752 ;
10753 return 0;
10754}
10755_ACEOF
10756rm -f conftest.$ac_objext conftest$ac_exeext
10757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10758 (eval $ac_link) 2>conftest.er1
13b2be9c 10759 ac_status=$?
ab509236
L
10760 grep -v '^ *+' conftest.er1 >conftest.err
10761 rm -f conftest.er1
10762 cat conftest.err >&5
13b2be9c
DJ
10763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10764 (exit $ac_status); } &&
ab509236
L
10765 { ac_try='test -z "$ac_c_werror_flag"
10766 || test ! -s conftest.err'
10767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10768 (eval $ac_try) 2>&5
10769 ac_status=$?
10770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10771 (exit $ac_status); }; } &&
10772 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10774 (eval $ac_try) 2>&5
10775 ac_status=$?
10776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10777 (exit $ac_status); }; }; then
10778 gas_cv_decl_needed_sbrk=no
10779else
10780 echo "$as_me: failed program was:" >&5
10781sed 's/^/| /' conftest.$ac_ext >&5
10782
10783gas_cv_decl_needed_sbrk=yes
10784fi
ab509236
L
10785rm -f conftest.err conftest.$ac_objext \
10786 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10787fi
10788echo "$as_me:$LINENO: result: $gas_cv_decl_needed_sbrk" >&5
10789echo "${ECHO_T}$gas_cv_decl_needed_sbrk" >&6
10790if test $gas_cv_decl_needed_sbrk = yes; then
10791
10792cat >>confdefs.h <<\_ACEOF
10793#define NEED_DECLARATION_SBRK 1
10794_ACEOF
10795
10796fi
10797
10798
10799echo "$as_me:$LINENO: checking whether declaration is required for environ" >&5
10800echo $ECHO_N "checking whether declaration is required for environ... $ECHO_C" >&6
10801if test "${gas_cv_decl_needed_environ+set}" = set; then
10802 echo $ECHO_N "(cached) $ECHO_C" >&6
10803else
10804 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10805/* confdefs.h. */
10806_ACEOF
10807cat confdefs.h >>conftest.$ac_ext
10808cat >>conftest.$ac_ext <<_ACEOF
10809/* end confdefs.h. */
10810$gas_test_headers
10811int
10812main ()
10813{
10814
10815typedef char **f;
10816f x;
10817x = (f) environ;
10818
10819 ;
10820 return 0;
10821}
10822_ACEOF
10823rm -f conftest.$ac_objext conftest$ac_exeext
10824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10825 (eval $ac_link) 2>conftest.er1
13b2be9c 10826 ac_status=$?
ab509236
L
10827 grep -v '^ *+' conftest.er1 >conftest.err
10828 rm -f conftest.er1
10829 cat conftest.err >&5
13b2be9c
DJ
10830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10831 (exit $ac_status); } &&
ab509236
L
10832 { ac_try='test -z "$ac_c_werror_flag"
10833 || test ! -s conftest.err'
10834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10835 (eval $ac_try) 2>&5
10836 ac_status=$?
10837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10838 (exit $ac_status); }; } &&
10839 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10841 (eval $ac_try) 2>&5
10842 ac_status=$?
10843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10844 (exit $ac_status); }; }; then
10845 gas_cv_decl_needed_environ=no
10846else
10847 echo "$as_me: failed program was:" >&5
10848sed 's/^/| /' conftest.$ac_ext >&5
10849
10850gas_cv_decl_needed_environ=yes
10851fi
ab509236
L
10852rm -f conftest.err conftest.$ac_objext \
10853 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10854fi
10855echo "$as_me:$LINENO: result: $gas_cv_decl_needed_environ" >&5
10856echo "${ECHO_T}$gas_cv_decl_needed_environ" >&6
10857if test $gas_cv_decl_needed_environ = yes; then
10858
10859cat >>confdefs.h <<\_ACEOF
10860#define NEED_DECLARATION_ENVIRON 1
10861_ACEOF
10862
10863fi
10864
10865
10866# Does errno.h declare errno, or do we have to add a separate declaration
10867# for it?
10868
10869echo "$as_me:$LINENO: checking whether declaration is required for errno" >&5
10870echo $ECHO_N "checking whether declaration is required for errno... $ECHO_C" >&6
10871if test "${gas_cv_decl_needed_errno+set}" = set; then
10872 echo $ECHO_N "(cached) $ECHO_C" >&6
10873else
10874 cat >conftest.$ac_ext <<_ACEOF
13b2be9c
DJ
10875/* confdefs.h. */
10876_ACEOF
10877cat confdefs.h >>conftest.$ac_ext
10878cat >>conftest.$ac_ext <<_ACEOF
10879/* end confdefs.h. */
10880
10881#ifdef HAVE_ERRNO_H
10882#include <errno.h>
10883#endif
10884
10885int
10886main ()
10887{
10888
10889typedef int f;
10890f x;
10891x = (f) errno;
10892
10893 ;
10894 return 0;
10895}
10896_ACEOF
10897rm -f conftest.$ac_objext conftest$ac_exeext
10898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ab509236 10899 (eval $ac_link) 2>conftest.er1
13b2be9c 10900 ac_status=$?
ab509236
L
10901 grep -v '^ *+' conftest.er1 >conftest.err
10902 rm -f conftest.er1
10903 cat conftest.err >&5
13b2be9c
DJ
10904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10905 (exit $ac_status); } &&
ab509236
L
10906 { ac_try='test -z "$ac_c_werror_flag"
10907 || test ! -s conftest.err'
10908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10909 (eval $ac_try) 2>&5
10910 ac_status=$?
10911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10912 (exit $ac_status); }; } &&
10913 { ac_try='test -s conftest$ac_exeext'
13b2be9c
DJ
10914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10915 (eval $ac_try) 2>&5
10916 ac_status=$?
10917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10918 (exit $ac_status); }; }; then
10919 gas_cv_decl_needed_errno=no
10920else
10921 echo "$as_me: failed program was:" >&5
10922sed 's/^/| /' conftest.$ac_ext >&5
10923
10924gas_cv_decl_needed_errno=yes
10925fi
ab509236
L
10926rm -f conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
13b2be9c
DJ
10928fi
10929echo "$as_me:$LINENO: result: $gas_cv_decl_needed_errno" >&5
10930echo "${ECHO_T}$gas_cv_decl_needed_errno" >&6
10931if test $gas_cv_decl_needed_errno = yes; then
10932
10933cat >>confdefs.h <<\_ACEOF
10934#define NEED_DECLARATION_ERRNO 1
10935_ACEOF
10936
10937fi
10938
10939
10940
10941
10942 ac_config_files="$ac_config_files Makefile doc/Makefile po/Makefile.in:po/Make-in"
10943
10944 ac_config_commands="$ac_config_commands default"
10945
10946
10947cat >confcache <<\_ACEOF
10948# This file is a shell script that caches the results of configure
10949# tests run on this system so they can be shared between configure
10950# scripts and configure runs, see configure's option --config-cache.
10951# It is not useful on other systems. If it contains results you don't
10952# want to keep, you may remove or edit it.
10953#
10954# config.status only pays attention to the cache file if you give it
10955# the --recheck option to rerun configure.
10956#
10957# `ac_cv_env_foo' variables (set or unset) will be overridden when
10958# loading this file, other *unset* `ac_cv_foo' will be assigned the
10959# following values.
10960
10961_ACEOF
10962
10963# The following way of writing the cache mishandles newlines in values,
10964# but we know of no workaround that is simple, portable, and efficient.
10965# So, don't put newlines in cache variables' values.
10966# Ultrix sh set writes to stderr and can't be redirected directly,
10967# and sets the high bit in the cache file unless we assign to the vars.
10968{
10969 (set) 2>&1 |
10970 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10971 *ac_space=\ *)
10972 # `set' does not quote correctly, so add quotes (double-quote
10973 # substitution turns \\\\ into \\, and sed turns \\ into \).
10974 sed -n \
ab509236
L
10975 "s/'/'\\\\''/g;
10976 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13b2be9c
DJ
10977 ;;
10978 *)
10979 # `set' quotes correctly as required by POSIX, so do not add quotes.
10980 sed -n \
ab509236 10981 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13b2be9c
DJ
10982 ;;
10983 esac;
10984} |
10985 sed '
10986 t clear
10987 : clear
10988 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10989 t end
10990 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10991 : end' >>confcache
10992if diff $cache_file confcache >/dev/null 2>&1; then :; else
10993 if test -w $cache_file; then
10994 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
10995 cat confcache >$cache_file
10996 else
10997 echo "not updating unwritable cache $cache_file"
10998 fi
10999fi
11000rm -f confcache
11001
11002test "x$prefix" = xNONE && prefix=$ac_default_prefix
11003# Let make expand exec_prefix.
11004test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11005
11006# VPATH may cause trouble with some makes, so we remove $(srcdir),
11007# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11008# trailing colons and then remove the whole line if VPATH becomes empty
11009# (actually we leave an empty line to preserve line numbers).
11010if test "x$srcdir" = x.; then
ab509236 11011 ac_vpsub='/^[ ]*VPATH[ ]*=/{
13b2be9c
DJ
11012s/:*\$(srcdir):*/:/;
11013s/:*\${srcdir}:*/:/;
11014s/:*@srcdir@:*/:/;
ab509236 11015s/^\([^=]*=[ ]*\):*/\1/;
13b2be9c 11016s/:*$//;
ab509236 11017s/^[^=]*=[ ]*$//;
13b2be9c
DJ
11018}'
11019fi
11020
11021DEFS=-DHAVE_CONFIG_H
11022
11023ac_libobjs=
11024ac_ltlibobjs=
11025for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11026 # 1. Remove the extension, and $U if already installed.
11027 ac_i=`echo "$ac_i" |
ab509236 11028 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
13b2be9c
DJ
11029 # 2. Add them.
11030 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
11031 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
11032done
11033LIBOBJS=$ac_libobjs
11034
11035LTLIBOBJS=$ac_ltlibobjs
11036
11037
11038if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
11039 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
11040Usually this means the macro was only invoked conditionally." >&5
11041echo "$as_me: error: conditional \"AMDEP\" was never defined.
11042Usually this means the macro was only invoked conditionally." >&2;}
11043 { (exit 1); exit 1; }; }
11044fi
11045if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
11046 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
11047Usually this means the macro was only invoked conditionally." >&5
11048echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
11049Usually this means the macro was only invoked conditionally." >&2;}
11050 { (exit 1); exit 1; }; }
11051fi
11052if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
11053 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
11054Usually this means the macro was only invoked conditionally." >&5
11055echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
11056Usually this means the macro was only invoked conditionally." >&2;}
11057 { (exit 1); exit 1; }; }
11058fi
11059
11060: ${CONFIG_STATUS=./config.status}
11061ac_clean_files_save=$ac_clean_files
11062ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11063{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11064echo "$as_me: creating $CONFIG_STATUS" >&6;}
11065cat >$CONFIG_STATUS <<_ACEOF
11066#! $SHELL
11067# Generated by $as_me.
11068# Run this file to recreate the current configuration.
11069# Compiler output produced by configure, useful for debugging
11070# configure, is in config.log if it exists.
11071
11072debug=false
11073ac_cs_recheck=false
11074ac_cs_silent=false
11075SHELL=\${CONFIG_SHELL-$SHELL}
11076_ACEOF
11077
11078cat >>$CONFIG_STATUS <<\_ACEOF
11079## --------------------- ##
11080## M4sh Initialization. ##
11081## --------------------- ##
11082
11083# Be Bourne compatible
11084if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11085 emulate sh
11086 NULLCMD=:
11087 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
11088 # is contrary to our usage. Disable this feature.
11089 alias -g '${1+"$@"}'='"$@"'
11090elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11091 set -o posix
11092fi
ab509236 11093DUALCASE=1; export DUALCASE # for MKS sh
13b2be9c
DJ
11094
11095# Support unset when possible.
ab509236 11096if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
13b2be9c
DJ
11097 as_unset=unset
11098else
11099 as_unset=false
11100fi
11101
11102
11103# Work around bugs in pre-3.0 UWIN ksh.
11104$as_unset ENV MAIL MAILPATH
11105PS1='$ '
11106PS2='> '
11107PS4='+ '
11108
11109# NLS nuisances.
11110for as_var in \
11111 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
11112 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
11113 LC_TELEPHONE LC_TIME
11114do
ab509236 11115 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
13b2be9c
DJ
11116 eval $as_var=C; export $as_var
11117 else
11118 $as_unset $as_var
11119 fi
11120done
11121
11122# Required to use basename.
11123if expr a : '\(a\)' >/dev/null 2>&1; then
11124 as_expr=expr
11125else
11126 as_expr=false
11127fi
11128
11129if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
11130 as_basename=basename
11131else
11132 as_basename=false
11133fi
11134
11135
11136# Name of the executable.
11137as_me=`$as_basename "$0" ||
11138$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11139 X"$0" : 'X\(//\)$' \| \
11140 X"$0" : 'X\(/\)$' \| \
11141 . : '\(.\)' 2>/dev/null ||
11142echo X/"$0" |
11143 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
11144 /^X\/\(\/\/\)$/{ s//\1/; q; }
11145 /^X\/\(\/\).*/{ s//\1/; q; }
11146 s/.*/./; q'`
11147
11148
11149# PATH needs CR, and LINENO needs CR and PATH.
11150# Avoid depending upon Character Ranges.
11151as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11152as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11153as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11154as_cr_digits='0123456789'
11155as_cr_alnum=$as_cr_Letters$as_cr_digits
11156
11157# The user is always right.
11158if test "${PATH_SEPARATOR+set}" != set; then
11159 echo "#! /bin/sh" >conf$$.sh
11160 echo "exit 0" >>conf$$.sh
11161 chmod +x conf$$.sh
11162 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11163 PATH_SEPARATOR=';'
11164 else
11165 PATH_SEPARATOR=:
11166 fi
11167 rm -f conf$$.sh
11168fi
11169
11170
11171 as_lineno_1=$LINENO
11172 as_lineno_2=$LINENO
11173 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
11174 test "x$as_lineno_1" != "x$as_lineno_2" &&
11175 test "x$as_lineno_3" = "x$as_lineno_2" || {
11176 # Find who we are. Look in the path if we contain no path at all
11177 # relative or not.
11178 case $0 in
11179 *[\\/]* ) as_myself=$0 ;;
11180 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11181for as_dir in $PATH
11182do
11183 IFS=$as_save_IFS
11184 test -z "$as_dir" && as_dir=.
11185 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11186done
252b5132 11187
13b2be9c
DJ
11188 ;;
11189 esac
11190 # We did not find ourselves, most probably we were run as `sh COMMAND'
11191 # in which case we are not to be found in the path.
11192 if test "x$as_myself" = x; then
11193 as_myself=$0
11194 fi
11195 if test ! -f "$as_myself"; then
11196 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
11197echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
11198 { (exit 1); exit 1; }; }
11199 fi
11200 case $CONFIG_SHELL in
11201 '')
11202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11203for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
11204do
11205 IFS=$as_save_IFS
11206 test -z "$as_dir" && as_dir=.
11207 for as_base in sh bash ksh sh5; do
11208 case $as_dir in
11209 /*)
11210 if ("$as_dir/$as_base" -c '
11211 as_lineno_1=$LINENO
11212 as_lineno_2=$LINENO
11213 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
11214 test "x$as_lineno_1" != "x$as_lineno_2" &&
11215 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
11216 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
11217 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
11218 CONFIG_SHELL=$as_dir/$as_base
11219 export CONFIG_SHELL
11220 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
11221 fi;;
11222 esac
11223 done
11224done
11225;;
11226 esac
252b5132 11227
13b2be9c
DJ
11228 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11229 # uniformly replaced by the line number. The first 'sed' inserts a
11230 # line-number line before each line; the second 'sed' does the real
11231 # work. The second script uses 'N' to pair each line-number line
11232 # with the numbered line, and appends trailing '-' during
11233 # substitution so that $LINENO is not a special case at line end.
11234 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11235 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
11236 sed '=' <$as_myself |
11237 sed '
11238 N
11239 s,$,-,
11240 : loop
11241 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
11242 t loop
11243 s,-$,,
11244 s,^['$as_cr_digits']*\n,,
11245 ' >$as_me.lineno &&
11246 chmod +x $as_me.lineno ||
11247 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
11248echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
11249 { (exit 1); exit 1; }; }
11250
11251 # Don't try to exec as it changes $[0], causing all sort of problems
11252 # (the dirname of $[0] is not the place where we might find the
11253 # original and so on. Autoconf is especially sensible to this).
11254 . ./$as_me.lineno
11255 # Exit status is that of the last command.
11256 exit
11257}
d6d788bd 11258
252b5132 11259
13b2be9c
DJ
11260case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
11261 *c*,-n*) ECHO_N= ECHO_C='
11262' ECHO_T=' ' ;;
11263 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
11264 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
11265esac
252b5132 11266
13b2be9c
DJ
11267if expr a : '\(a\)' >/dev/null 2>&1; then
11268 as_expr=expr
252b5132 11269else
13b2be9c 11270 as_expr=false
252b5132 11271fi
252b5132 11272
13b2be9c
DJ
11273rm -f conf$$ conf$$.exe conf$$.file
11274echo >conf$$.file
11275if ln -s conf$$.file conf$$ 2>/dev/null; then
11276 # We could just check for DJGPP; but this test a) works b) is more generic
11277 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11278 if test -f conf$$.exe; then
11279 # Don't use ln at all; we don't have any links
11280 as_ln_s='cp -p'
11281 else
11282 as_ln_s='ln -s'
11283 fi
11284elif ln conf$$.file conf$$ 2>/dev/null; then
11285 as_ln_s=ln
11286else
11287 as_ln_s='cp -p'
252b5132 11288fi
13b2be9c 11289rm -f conf$$ conf$$.exe conf$$.file
252b5132 11290
13b2be9c
DJ
11291if mkdir -p . 2>/dev/null; then
11292 as_mkdir_p=:
252b5132 11293else
ab509236 11294 test -d ./-p && rmdir ./-p
13b2be9c
DJ
11295 as_mkdir_p=false
11296fi
252b5132 11297
13b2be9c 11298as_executable_p="test -f"
252b5132 11299
13b2be9c 11300# Sed expression to map a string onto a valid CPP name.
ab509236 11301as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
252b5132 11302
13b2be9c 11303# Sed expression to map a string onto a valid variable name.
ab509236 11304as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
252b5132 11305
d6d788bd 11306
13b2be9c
DJ
11307# IFS
11308# We need space, tab and new line, in precisely that order.
11309as_nl='
11310'
11311IFS=" $as_nl"
252b5132 11312
13b2be9c
DJ
11313# CDPATH.
11314$as_unset CDPATH
252b5132 11315
13b2be9c 11316exec 6>&1
252b5132 11317
13b2be9c
DJ
11318# Open the log real soon, to keep \$[0] and so on meaningful, and to
11319# report actual input values of CONFIG_FILES etc. instead of their
11320# values after options handling. Logging --version etc. is OK.
11321exec 5>>config.log
11322{
11323 echo
11324 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11325## Running $as_me. ##
11326_ASBOX
11327} >&5
11328cat >&5 <<_CSEOF
252b5132 11329
13b2be9c 11330This file was extended by $as_me, which was
ab509236 11331generated by GNU Autoconf 2.59. Invocation command line was
d6d788bd 11332
13b2be9c
DJ
11333 CONFIG_FILES = $CONFIG_FILES
11334 CONFIG_HEADERS = $CONFIG_HEADERS
11335 CONFIG_LINKS = $CONFIG_LINKS
11336 CONFIG_COMMANDS = $CONFIG_COMMANDS
11337 $ $0 $@
252b5132 11338
13b2be9c
DJ
11339_CSEOF
11340echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
11341echo >&5
11342_ACEOF
252b5132 11343
13b2be9c
DJ
11344# Files that config.status was made for.
11345if test -n "$ac_config_files"; then
11346 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
252b5132 11347fi
13b2be9c
DJ
11348
11349if test -n "$ac_config_headers"; then
11350 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
252b5132 11351fi
252b5132 11352
13b2be9c
DJ
11353if test -n "$ac_config_links"; then
11354 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
252b5132
RH
11355fi
11356
13b2be9c
DJ
11357if test -n "$ac_config_commands"; then
11358 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11359fi
d6d788bd 11360
13b2be9c 11361cat >>$CONFIG_STATUS <<\_ACEOF
252b5132 11362
13b2be9c
DJ
11363ac_cs_usage="\
11364\`$as_me' instantiates files from templates according to the
11365current configuration.
252b5132 11366
13b2be9c 11367Usage: $0 [OPTIONS] [FILE]...
252b5132 11368
13b2be9c
DJ
11369 -h, --help print this help, then exit
11370 -V, --version print version number, then exit
11371 -q, --quiet do not print progress messages
11372 -d, --debug don't remove temporary files
11373 --recheck update $as_me by reconfiguring in the same conditions
11374 --file=FILE[:TEMPLATE]
ab509236 11375 instantiate the configuration file FILE
13b2be9c 11376 --header=FILE[:TEMPLATE]
ab509236 11377 instantiate the configuration header FILE
252b5132 11378
13b2be9c
DJ
11379Configuration files:
11380$config_files
252b5132 11381
13b2be9c
DJ
11382Configuration headers:
11383$config_headers
252b5132 11384
13b2be9c
DJ
11385Configuration commands:
11386$config_commands
252b5132 11387
13b2be9c
DJ
11388Report bugs to <bug-autoconf@gnu.org>."
11389_ACEOF
d6d788bd 11390
13b2be9c
DJ
11391cat >>$CONFIG_STATUS <<_ACEOF
11392ac_cs_version="\\
11393config.status
ab509236 11394configured by $0, generated by GNU Autoconf 2.59,
13b2be9c 11395 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
d6d788bd 11396
ab509236 11397Copyright (C) 2003 Free Software Foundation, Inc.
13b2be9c
DJ
11398This config.status script is free software; the Free Software Foundation
11399gives unlimited permission to copy, distribute and modify it."
11400srcdir=$srcdir
11401INSTALL="$INSTALL"
11402_ACEOF
d6d788bd 11403
13b2be9c
DJ
11404cat >>$CONFIG_STATUS <<\_ACEOF
11405# If no file are specified by the user, then we need to provide default
11406# value. By we need to know if files were specified by the user.
11407ac_need_defaults=:
11408while test $# != 0
11409do
11410 case $1 in
11411 --*=*)
11412 ac_option=`expr "x$1" : 'x\([^=]*\)='`
11413 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11414 ac_shift=:
c8615825 11415 ;;
13b2be9c
DJ
11416 -*)
11417 ac_option=$1
11418 ac_optarg=$2
11419 ac_shift=shift
c8615825 11420 ;;
13b2be9c
DJ
11421 *) # This is not an option, so the user has probably given explicit
11422 # arguments.
11423 ac_option=$1
11424 ac_need_defaults=false;;
11425 esac
252b5132 11426
13b2be9c
DJ
11427 case $ac_option in
11428 # Handling of the options.
11429_ACEOF
11430cat >>$CONFIG_STATUS <<\_ACEOF
11431 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11432 ac_cs_recheck=: ;;
11433 --version | --vers* | -V )
11434 echo "$ac_cs_version"; exit 0 ;;
11435 --he | --h)
11436 # Conflict between --help and --header
11437 { { echo "$as_me:$LINENO: error: ambiguous option: $1
11438Try \`$0 --help' for more information." >&5
11439echo "$as_me: error: ambiguous option: $1
11440Try \`$0 --help' for more information." >&2;}
11441 { (exit 1); exit 1; }; };;
11442 --help | --hel | -h )
11443 echo "$ac_cs_usage"; exit 0 ;;
11444 --debug | --d* | -d )
11445 debug=: ;;
11446 --file | --fil | --fi | --f )
11447 $ac_shift
11448 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
11449 ac_need_defaults=false;;
11450 --header | --heade | --head | --hea )
11451 $ac_shift
11452 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
11453 ac_need_defaults=false;;
11454 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11455 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11456 ac_cs_silent=: ;;
c8615825 11457
13b2be9c
DJ
11458 # This is an error.
11459 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
11460Try \`$0 --help' for more information." >&5
11461echo "$as_me: error: unrecognized option: $1
11462Try \`$0 --help' for more information." >&2;}
11463 { (exit 1); exit 1; }; } ;;
252b5132 11464
13b2be9c 11465 *) ac_config_targets="$ac_config_targets $1" ;;
252b5132 11466
13b2be9c
DJ
11467 esac
11468 shift
11469done
252b5132 11470
13b2be9c 11471ac_configure_extra_args=
d6d788bd 11472
13b2be9c
DJ
11473if $ac_cs_silent; then
11474 exec 6>/dev/null
11475 ac_configure_extra_args="$ac_configure_extra_args --silent"
11476fi
9b2b7d69 11477
13b2be9c
DJ
11478_ACEOF
11479cat >>$CONFIG_STATUS <<_ACEOF
11480if \$ac_cs_recheck; then
11481 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
11482 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11483fi
11484
11485_ACEOF
11486
11487cat >>$CONFIG_STATUS <<_ACEOF
9b2b7d69 11488#
13b2be9c 11489# INIT-COMMANDS section.
9b2b7d69
MM
11490#
11491
13b2be9c
DJ
11492AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
11493target_cpu_type=${target_cpu_type}
11494 cgen_cpu_prefix=${cgen_cpu_prefix}
11495 obj_format=${obj_format}
11496 te_file=${te_file}
11497
11498_ACEOF
11499
11500
11501
11502cat >>$CONFIG_STATUS <<\_ACEOF
11503for ac_config_target in $ac_config_targets
9b2b7d69 11504do
13b2be9c
DJ
11505 case "$ac_config_target" in
11506 # Handling of arguments.
11507 "gdb.ini" ) CONFIG_FILES="$CONFIG_FILES gdb.ini:gdbinit.in" ;;
11508 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
11509 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11510 "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
11511 "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
11512 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
11513 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11514 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
11515 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
11516echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11517 { (exit 1); exit 1; }; };;
9b2b7d69
MM
11518 esac
11519done
11520
13b2be9c
DJ
11521# If the user did not use the arguments to specify the items to instantiate,
11522# then the envvar interface is used. Set only those that are not.
11523# We use the long form for the default assignment because of an extremely
11524# bizarre bug on SunOS 4.1.3.
11525if $ac_need_defaults; then
11526 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11527 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11528 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11529fi
11530
11531# Have a temporary directory for convenience. Make it in the build tree
11532# simply because there is no reason to put it here, and in addition,
11533# creating and moving files from /tmp can sometimes cause problems.
11534# Create a temporary directory, and hook for its removal unless debugging.
11535$debug ||
11536{
11537 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11538 trap '{ (exit 1); exit 1; }' 1 2 13 15
11539}
9b2b7d69 11540
13b2be9c 11541# Create a (secure) tmp directory for tmp files.
9b2b7d69 11542
13b2be9c
DJ
11543{
11544 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
11545 test -n "$tmp" && test -d "$tmp"
11546} ||
11547{
11548 tmp=./confstat$$-$RANDOM
11549 (umask 077 && mkdir $tmp)
11550} ||
11551{
11552 echo "$me: cannot create a temporary directory in ." >&2
11553 { (exit 1); exit 1; }
11554}
9b2b7d69 11555
13b2be9c
DJ
11556_ACEOF
11557
11558cat >>$CONFIG_STATUS <<_ACEOF
11559
11560#
11561# CONFIG_FILES section.
11562#
11563
11564# No need to generate the scripts if there are no CONFIG_FILES.
11565# This happens for instance when ./config.status config.h
11566if test -n "\$CONFIG_FILES"; then
11567 # Protect against being on the right side of a sed subst in config.status.
11568 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11569 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11570s,@SHELL@,$SHELL,;t t
11571s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
11572s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11573s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11574s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11575s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11576s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11577s,@exec_prefix@,$exec_prefix,;t t
11578s,@prefix@,$prefix,;t t
11579s,@program_transform_name@,$program_transform_name,;t t
11580s,@bindir@,$bindir,;t t
11581s,@sbindir@,$sbindir,;t t
11582s,@libexecdir@,$libexecdir,;t t
11583s,@datadir@,$datadir,;t t
11584s,@sysconfdir@,$sysconfdir,;t t
11585s,@sharedstatedir@,$sharedstatedir,;t t
11586s,@localstatedir@,$localstatedir,;t t
11587s,@libdir@,$libdir,;t t
11588s,@includedir@,$includedir,;t t
11589s,@oldincludedir@,$oldincludedir,;t t
11590s,@infodir@,$infodir,;t t
11591s,@mandir@,$mandir,;t t
11592s,@build_alias@,$build_alias,;t t
11593s,@host_alias@,$host_alias,;t t
11594s,@target_alias@,$target_alias,;t t
11595s,@DEFS@,$DEFS,;t t
11596s,@ECHO_C@,$ECHO_C,;t t
11597s,@ECHO_N@,$ECHO_N,;t t
11598s,@ECHO_T@,$ECHO_T,;t t
11599s,@LIBS@,$LIBS,;t t
11600s,@build@,$build,;t t
11601s,@build_cpu@,$build_cpu,;t t
11602s,@build_vendor@,$build_vendor,;t t
11603s,@build_os@,$build_os,;t t
11604s,@host@,$host,;t t
11605s,@host_cpu@,$host_cpu,;t t
11606s,@host_vendor@,$host_vendor,;t t
11607s,@host_os@,$host_os,;t t
11608s,@target@,$target,;t t
11609s,@target_cpu@,$target_cpu,;t t
11610s,@target_vendor@,$target_vendor,;t t
11611s,@target_os@,$target_os,;t t
11612s,@CC@,$CC,;t t
11613s,@CFLAGS@,$CFLAGS,;t t
11614s,@LDFLAGS@,$LDFLAGS,;t t
11615s,@CPPFLAGS@,$CPPFLAGS,;t t
11616s,@ac_ct_CC@,$ac_ct_CC,;t t
11617s,@EXEEXT@,$EXEEXT,;t t
11618s,@OBJEXT@,$OBJEXT,;t t
11619s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
11620s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
11621s,@INSTALL_DATA@,$INSTALL_DATA,;t t
11622s,@CYGPATH_W@,$CYGPATH_W,;t t
11623s,@PACKAGE@,$PACKAGE,;t t
11624s,@VERSION@,$VERSION,;t t
11625s,@ACLOCAL@,$ACLOCAL,;t t
11626s,@AUTOCONF@,$AUTOCONF,;t t
11627s,@AUTOMAKE@,$AUTOMAKE,;t t
11628s,@AUTOHEADER@,$AUTOHEADER,;t t
11629s,@MAKEINFO@,$MAKEINFO,;t t
11630s,@AMTAR@,$AMTAR,;t t
11631s,@install_sh@,$install_sh,;t t
11632s,@STRIP@,$STRIP,;t t
11633s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
11634s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
ab509236 11635s,@mkdir_p@,$mkdir_p,;t t
13b2be9c
DJ
11636s,@AWK@,$AWK,;t t
11637s,@SET_MAKE@,$SET_MAKE,;t t
11638s,@am__leading_dot@,$am__leading_dot,;t t
11639s,@DEPDIR@,$DEPDIR,;t t
11640s,@am__include@,$am__include,;t t
11641s,@am__quote@,$am__quote,;t t
11642s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
11643s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
11644s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
11645s,@CCDEPMODE@,$CCDEPMODE,;t t
11646s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
11647s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
11648s,@LN_S@,$LN_S,;t t
11649s,@RANLIB@,$RANLIB,;t t
11650s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
11651s,@LIBTOOL@,$LIBTOOL,;t t
11652s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
11653s,@GDBINIT@,$GDBINIT,;t t
11654s,@cgen_cpu_prefix@,$cgen_cpu_prefix,;t t
11655s,@extra_objects@,$extra_objects,;t t
11656s,@target_cpu_type@,$target_cpu_type,;t t
11657s,@obj_format@,$obj_format,;t t
11658s,@te_file@,$te_file,;t t
11659s,@install_tooldir@,$install_tooldir,;t t
11660s,@atof@,$atof,;t t
11661s,@BFDLIB@,$BFDLIB,;t t
11662s,@OPCODES_LIB@,$OPCODES_LIB,;t t
11663s,@BFDVER_H@,$BFDVER_H,;t t
11664s,@ALL_OBJ_DEPS@,$ALL_OBJ_DEPS,;t t
11665s,@YACC@,$YACC,;t t
11666s,@LEX@,$LEX,;t t
11667s,@LEXLIB@,$LEXLIB,;t t
11668s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
11669s,@CPP@,$CPP,;t t
11670s,@EGREP@,$EGREP,;t t
11671s,@ALLOCA@,$ALLOCA,;t t
11672s,@USE_NLS@,$USE_NLS,;t t
11673s,@MSGFMT@,$MSGFMT,;t t
11674s,@GMSGFMT@,$GMSGFMT,;t t
11675s,@XGETTEXT@,$XGETTEXT,;t t
11676s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
11677s,@CATALOGS@,$CATALOGS,;t t
11678s,@CATOBJEXT@,$CATOBJEXT,;t t
11679s,@DATADIRNAME@,$DATADIRNAME,;t t
11680s,@GMOFILES@,$GMOFILES,;t t
11681s,@INSTOBJEXT@,$INSTOBJEXT,;t t
11682s,@INTLDEPS@,$INTLDEPS,;t t
11683s,@INTLLIBS@,$INTLLIBS,;t t
11684s,@INTLOBJS@,$INTLOBJS,;t t
11685s,@POFILES@,$POFILES,;t t
11686s,@POSUB@,$POSUB,;t t
11687s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
11688s,@GT_NO@,$GT_NO,;t t
11689s,@GT_YES@,$GT_YES,;t t
11690s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
11691s,@l@,$l,;t t
11692s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
11693s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
11694s,@MAINT@,$MAINT,;t t
11695s,@LIBM@,$LIBM,;t t
11696s,@LIBOBJS@,$LIBOBJS,;t t
11697s,@LTLIBOBJS@,$LTLIBOBJS,;t t
9b2b7d69
MM
11698CEOF
11699
13b2be9c
DJ
11700_ACEOF
11701
11702 cat >>$CONFIG_STATUS <<\_ACEOF
11703 # Split the substitutions into bite-sized pieces for seds with
11704 # small command number limits, like on Digital OSF/1 and HP-UX.
11705 ac_max_sed_lines=48
11706 ac_sed_frag=1 # Number of current file.
11707 ac_beg=1 # First line for current file.
11708 ac_end=$ac_max_sed_lines # Line after last line for current file.
11709 ac_more_lines=:
11710 ac_sed_cmds=
11711 while $ac_more_lines; do
11712 if test $ac_beg -gt 1; then
11713 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11714 else
11715 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11716 fi
11717 if test ! -s $tmp/subs.frag; then
11718 ac_more_lines=false
9b2b7d69 11719 else
13b2be9c
DJ
11720 # The purpose of the label and of the branching condition is to
11721 # speed up the sed processing (if there are no `@' at all, there
11722 # is no need to browse any of the substitutions).
11723 # These are the two extra sed commands mentioned above.
11724 (echo ':t
11725 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
11726 if test -z "$ac_sed_cmds"; then
ab509236 11727 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
13b2be9c 11728 else
ab509236 11729 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
13b2be9c
DJ
11730 fi
11731 ac_sed_frag=`expr $ac_sed_frag + 1`
11732 ac_beg=$ac_end
11733 ac_end=`expr $ac_end + $ac_max_sed_lines`
9b2b7d69 11734 fi
13b2be9c
DJ
11735 done
11736 if test -z "$ac_sed_cmds"; then
11737 ac_sed_cmds=cat
252b5132 11738 fi
13b2be9c 11739fi # test -n "$CONFIG_FILES"
252b5132 11740
13b2be9c
DJ
11741_ACEOF
11742cat >>$CONFIG_STATUS <<\_ACEOF
11743for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
c8615825 11744 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13b2be9c
DJ
11745 case $ac_file in
11746 - | *:- | *:-:* ) # input from stdin
ab509236
L
11747 cat >$tmp/stdin
11748 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11749 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13b2be9c 11750 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ab509236 11751 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13b2be9c 11752 * ) ac_file_in=$ac_file.in ;;
252b5132 11753 esac
9b2b7d69 11754
13b2be9c
DJ
11755 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
11756 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
11757$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
11758 X"$ac_file" : 'X\(//\)[^/]' \| \
11759 X"$ac_file" : 'X\(//\)$' \| \
11760 X"$ac_file" : 'X\(/\)' \| \
11761 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
11762echo X"$ac_file" |
11763 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11764 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11765 /^X\(\/\/\)$/{ s//\1/; q; }
11766 /^X\(\/\).*/{ s//\1/; q; }
11767 s/.*/./; q'`
11768 { if $as_mkdir_p; then
11769 mkdir -p "$ac_dir"
c8615825 11770 else
13b2be9c
DJ
11771 as_dir="$ac_dir"
11772 as_dirs=
11773 while test ! -d "$as_dir"; do
11774 as_dirs="$as_dir $as_dirs"
11775 as_dir=`(dirname "$as_dir") 2>/dev/null ||
11776$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
11777 X"$as_dir" : 'X\(//\)[^/]' \| \
11778 X"$as_dir" : 'X\(//\)$' \| \
11779 X"$as_dir" : 'X\(/\)' \| \
11780 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
11781echo X"$as_dir" |
11782 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11783 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11784 /^X\(\/\/\)$/{ s//\1/; q; }
11785 /^X\(\/\).*/{ s//\1/; q; }
11786 s/.*/./; q'`
11787 done
11788 test ! -n "$as_dirs" || mkdir $as_dirs
11789 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
11790echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
11791 { (exit 1); exit 1; }; }; }
11792
11793 ac_builddir=.
11794
11795if test "$ac_dir" != .; then
11796 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
11797 # A "../" for each directory in $ac_dir_suffix.
11798 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
11799else
11800 ac_dir_suffix= ac_top_builddir=
11801fi
9b2b7d69 11802
13b2be9c
DJ
11803case $srcdir in
11804 .) # No --srcdir option. We are building in place.
11805 ac_srcdir=.
11806 if test -z "$ac_top_builddir"; then
11807 ac_top_srcdir=.
11808 else
11809 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
11810 fi ;;
11811 [\\/]* | ?:[\\/]* ) # Absolute path.
11812 ac_srcdir=$srcdir$ac_dir_suffix;
11813 ac_top_srcdir=$srcdir ;;
9b2b7d69 11814 *) # Relative path.
13b2be9c
DJ
11815 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
11816 ac_top_srcdir=$ac_top_builddir$srcdir ;;
11817esac
ab509236
L
11818
11819# Do not use `cd foo && pwd` to compute absolute paths, because
11820# the directories may not exist.
11821case `pwd` in
11822.) ac_abs_builddir="$ac_dir";;
11823*)
11824 case "$ac_dir" in
11825 .) ac_abs_builddir=`pwd`;;
11826 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
11827 *) ac_abs_builddir=`pwd`/"$ac_dir";;
11828 esac;;
11829esac
11830case $ac_abs_builddir in
11831.) ac_abs_top_builddir=${ac_top_builddir}.;;
11832*)
11833 case ${ac_top_builddir}. in
11834 .) ac_abs_top_builddir=$ac_abs_builddir;;
11835 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
11836 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
11837 esac;;
11838esac
11839case $ac_abs_builddir in
11840.) ac_abs_srcdir=$ac_srcdir;;
11841*)
11842 case $ac_srcdir in
11843 .) ac_abs_srcdir=$ac_abs_builddir;;
11844 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
11845 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
11846 esac;;
11847esac
11848case $ac_abs_builddir in
11849.) ac_abs_top_srcdir=$ac_top_srcdir;;
11850*)
11851 case $ac_top_srcdir in
11852 .) ac_abs_top_srcdir=$ac_abs_builddir;;
11853 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
11854 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
11855 esac;;
11856esac
252b5132 11857
9b2b7d69 11858
13b2be9c
DJ
11859 case $INSTALL in
11860 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11861 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
c8615825 11862 esac
9b2b7d69 11863
13b2be9c
DJ
11864 if test x"$ac_file" != x-; then
11865 { echo "$as_me:$LINENO: creating $ac_file" >&5
11866echo "$as_me: creating $ac_file" >&6;}
11867 rm -f "$ac_file"
11868 fi
11869 # Let's still pretend it is `configure' which instantiates (i.e., don't
11870 # use $as_me), people would be surprised to read:
11871 # /* config.h. Generated by config.status. */
11872 if test x"$ac_file" = x-; then
11873 configure_input=
11874 else
11875 configure_input="$ac_file. "
11876 fi
11877 configure_input=$configure_input"Generated from `echo $ac_file_in |
ab509236 11878 sed 's,.*/,,'` by configure."
13b2be9c
DJ
11879
11880 # First look for the input files in the build tree, otherwise in the
11881 # src tree.
11882 ac_file_inputs=`IFS=:
11883 for f in $ac_file_in; do
11884 case $f in
11885 -) echo $tmp/stdin ;;
11886 [\\/$]*)
ab509236
L
11887 # Absolute (can't be DOS-style, as IFS=:)
11888 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13b2be9c
DJ
11889echo "$as_me: error: cannot find input file: $f" >&2;}
11890 { (exit 1); exit 1; }; }
ab509236 11891 echo "$f";;
13b2be9c 11892 *) # Relative
ab509236
L
11893 if test -f "$f"; then
11894 # Build tree
11895 echo "$f"
11896 elif test -f "$srcdir/$f"; then
11897 # Source tree
11898 echo "$srcdir/$f"
11899 else
11900 # /dev/null tree
11901 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13b2be9c
DJ
11902echo "$as_me: error: cannot find input file: $f" >&2;}
11903 { (exit 1); exit 1; }; }
ab509236 11904 fi;;
13b2be9c
DJ
11905 esac
11906 done` || { (exit 1); exit 1; }
11907_ACEOF
11908cat >>$CONFIG_STATUS <<_ACEOF
11909 sed "$ac_vpsub
11910$extrasub
11911_ACEOF
11912cat >>$CONFIG_STATUS <<\_ACEOF
11913:t
11914/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11915s,@configure_input@,$configure_input,;t t
11916s,@srcdir@,$ac_srcdir,;t t
11917s,@abs_srcdir@,$ac_abs_srcdir,;t t
11918s,@top_srcdir@,$ac_top_srcdir,;t t
11919s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
11920s,@builddir@,$ac_builddir,;t t
11921s,@abs_builddir@,$ac_abs_builddir,;t t
11922s,@top_builddir@,$ac_top_builddir,;t t
11923s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
11924s,@INSTALL@,$ac_INSTALL,;t t
11925" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
11926 rm -f $tmp/stdin
11927 if test x"$ac_file" != x-; then
11928 mv $tmp/out $ac_file
11929 else
11930 cat $tmp/out
11931 rm -f $tmp/out
11932 fi
11933
11934done
11935_ACEOF
11936cat >>$CONFIG_STATUS <<\_ACEOF
11937
11938#
11939# CONFIG_HEADER section.
11940#
252b5132
RH
11941
11942# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11943# NAME is the cpp macro being defined and VALUE is the value it is being given.
11944#
11945# ac_d sets the value in "#define NAME VALUE" lines.
ab509236
L
11946ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11947ac_dB='[ ].*$,\1#\2'
13b2be9c
DJ
11948ac_dC=' '
11949ac_dD=',;t'
11950# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ab509236 11951ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
13b2be9c 11952ac_uB='$,\1#\2define\3'
252b5132 11953ac_uC=' '
13b2be9c
DJ
11954ac_uD=',;t'
11955
11956for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
252b5132 11957 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13b2be9c
DJ
11958 case $ac_file in
11959 - | *:- | *:-:* ) # input from stdin
ab509236
L
11960 cat >$tmp/stdin
11961 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11962 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13b2be9c 11963 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ab509236 11964 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13b2be9c 11965 * ) ac_file_in=$ac_file.in ;;
252b5132
RH
11966 esac
11967
13b2be9c
DJ
11968 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
11969echo "$as_me: creating $ac_file" >&6;}
11970
11971 # First look for the input files in the build tree, otherwise in the
11972 # src tree.
11973 ac_file_inputs=`IFS=:
11974 for f in $ac_file_in; do
11975 case $f in
11976 -) echo $tmp/stdin ;;
11977 [\\/$]*)
ab509236
L
11978 # Absolute (can't be DOS-style, as IFS=:)
11979 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13b2be9c
DJ
11980echo "$as_me: error: cannot find input file: $f" >&2;}
11981 { (exit 1); exit 1; }; }
ab509236
L
11982 # Do quote $f, to prevent DOS paths from being IFS'd.
11983 echo "$f";;
13b2be9c 11984 *) # Relative
ab509236
L
11985 if test -f "$f"; then
11986 # Build tree
11987 echo "$f"
11988 elif test -f "$srcdir/$f"; then
11989 # Source tree
11990 echo "$srcdir/$f"
11991 else
11992 # /dev/null tree
11993 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13b2be9c
DJ
11994echo "$as_me: error: cannot find input file: $f" >&2;}
11995 { (exit 1); exit 1; }; }
ab509236 11996 fi;;
13b2be9c
DJ
11997 esac
11998 done` || { (exit 1); exit 1; }
11999 # Remove the trailing spaces.
ab509236 12000 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
13b2be9c
DJ
12001
12002_ACEOF
12003
12004# Transform confdefs.h into two sed scripts, `conftest.defines' and
12005# `conftest.undefs', that substitutes the proper values into
12006# config.h.in to produce config.h. The first handles `#define'
12007# templates, and the second `#undef' templates.
12008# And first: Protect against being on the right side of a sed subst in
12009# config.status. Protect against being in an unquoted here document
12010# in config.status.
12011rm -f conftest.defines conftest.undefs
12012# Using a here document instead of a string reduces the quoting nightmare.
12013# Putting comments in sed scripts is not portable.
12014#
12015# `end' is used to avoid that the second main sed command (meant for
12016# 0-ary CPP macros) applies to n-ary macro definitions.
12017# See the Autoconf documentation for `clear'.
12018cat >confdef2sed.sed <<\_ACEOF
12019s/[\\&,]/\\&/g
12020s,[\\$`],\\&,g
12021t clear
12022: clear
ab509236 12023s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
13b2be9c 12024t end
ab509236 12025s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
13b2be9c
DJ
12026: end
12027_ACEOF
12028# If some macros were called several times there might be several times
12029# the same #defines, which is useless. Nevertheless, we may not want to
12030# sort them, since we want the *last* AC-DEFINE to be honored.
12031uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
12032sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
12033rm -f confdef2sed.sed
252b5132
RH
12034
12035# This sed command replaces #undef with comments. This is necessary, for
12036# example, in the case of _POSIX_SOURCE, which is predefined and required
12037# on some systems where configure will not decide to define it.
13b2be9c 12038cat >>conftest.undefs <<\_ACEOF
ab509236 12039s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
13b2be9c
DJ
12040_ACEOF
12041
12042# Break up conftest.defines because some shells have a limit on the size
12043# of here documents, and old seds have small limits too (100 cmds).
12044echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
ab509236 12045echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
13b2be9c
DJ
12046echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
12047echo ' :' >>$CONFIG_STATUS
12048rm -f conftest.tail
12049while grep . conftest.defines >/dev/null
12050do
12051 # Write a limited-size here document to $tmp/defines.sed.
12052 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
12053 # Speed up: don't consider the non `#define' lines.
ab509236 12054 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
13b2be9c
DJ
12055 # Work around the forget-to-reset-the-flag bug.
12056 echo 't clr' >>$CONFIG_STATUS
12057 echo ': clr' >>$CONFIG_STATUS
12058 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
12059 echo 'CEOF
12060 sed -f $tmp/defines.sed $tmp/in >$tmp/out
12061 rm -f $tmp/in
12062 mv $tmp/out $tmp/in
12063' >>$CONFIG_STATUS
12064 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
12065 rm -f conftest.defines
12066 mv conftest.tail conftest.defines
12067done
12068rm -f conftest.defines
12069echo ' fi # grep' >>$CONFIG_STATUS
12070echo >>$CONFIG_STATUS
252b5132 12071
13b2be9c
DJ
12072# Break up conftest.undefs because some shells have a limit on the size
12073# of here documents, and old seds have small limits too (100 cmds).
12074echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
252b5132 12075rm -f conftest.tail
13b2be9c 12076while grep . conftest.undefs >/dev/null
252b5132 12077do
13b2be9c
DJ
12078 # Write a limited-size here document to $tmp/undefs.sed.
12079 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
12080 # Speed up: don't consider the non `#undef'
ab509236 12081 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
13b2be9c
DJ
12082 # Work around the forget-to-reset-the-flag bug.
12083 echo 't clr' >>$CONFIG_STATUS
12084 echo ': clr' >>$CONFIG_STATUS
12085 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
252b5132 12086 echo 'CEOF
13b2be9c
DJ
12087 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
12088 rm -f $tmp/in
12089 mv $tmp/out $tmp/in
12090' >>$CONFIG_STATUS
12091 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
12092 rm -f conftest.undefs
12093 mv conftest.tail conftest.undefs
252b5132 12094done
13b2be9c
DJ
12095rm -f conftest.undefs
12096
12097cat >>$CONFIG_STATUS <<\_ACEOF
12098 # Let's still pretend it is `configure' which instantiates (i.e., don't
12099 # use $as_me), people would be surprised to read:
12100 # /* config.h. Generated by config.status. */
12101 if test x"$ac_file" = x-; then
12102 echo "/* Generated by configure. */" >$tmp/config.h
252b5132 12103 else
13b2be9c
DJ
12104 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
12105 fi
12106 cat $tmp/in >>$tmp/config.h
12107 rm -f $tmp/in
12108 if test x"$ac_file" != x-; then
12109 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
12110 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
12111echo "$as_me: $ac_file is unchanged" >&6;}
12112 else
12113 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
12114$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
12115 X"$ac_file" : 'X\(//\)[^/]' \| \
12116 X"$ac_file" : 'X\(//\)$' \| \
12117 X"$ac_file" : 'X\(/\)' \| \
12118 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
12119echo X"$ac_file" |
12120 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12121 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12122 /^X\(\/\/\)$/{ s//\1/; q; }
12123 /^X\(\/\).*/{ s//\1/; q; }
12124 s/.*/./; q'`
12125 { if $as_mkdir_p; then
12126 mkdir -p "$ac_dir"
12127 else
12128 as_dir="$ac_dir"
12129 as_dirs=
12130 while test ! -d "$as_dir"; do
12131 as_dirs="$as_dir $as_dirs"
12132 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12133$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
12134 X"$as_dir" : 'X\(//\)[^/]' \| \
12135 X"$as_dir" : 'X\(//\)$' \| \
12136 X"$as_dir" : 'X\(/\)' \| \
12137 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
12138echo X"$as_dir" |
12139 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12140 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12141 /^X\(\/\/\)$/{ s//\1/; q; }
12142 /^X\(\/\).*/{ s//\1/; q; }
12143 s/.*/./; q'`
12144 done
12145 test ! -n "$as_dirs" || mkdir $as_dirs
12146 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12147echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12148 { (exit 1); exit 1; }; }; }
12149
12150 rm -f $ac_file
12151 mv $tmp/config.h $ac_file
9b2b7d69 12152 fi
13b2be9c
DJ
12153 else
12154 cat $tmp/config.h
12155 rm -f $tmp/config.h
9b2b7d69 12156 fi
13b2be9c
DJ
12157# Compute $ac_file's index in $config_headers.
12158_am_stamp_count=1
12159for _am_header in $config_headers :; do
12160 case $_am_header in
12161 $ac_file | $ac_file:* )
12162 break ;;
12163 * )
12164 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
12165 esac
12166done
12167echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
12168$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
12169 X$ac_file : 'X\(//\)[^/]' \| \
12170 X$ac_file : 'X\(//\)$' \| \
12171 X$ac_file : 'X\(/\)' \| \
12172 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
12173echo X$ac_file |
12174 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12175 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12176 /^X\(\/\/\)$/{ s//\1/; q; }
12177 /^X\(\/\).*/{ s//\1/; q; }
12178 s/.*/./; q'`/stamp-h$_am_stamp_count
12179done
12180_ACEOF
12181cat >>$CONFIG_STATUS <<\_ACEOF
6840198f 12182
13b2be9c
DJ
12183#
12184# CONFIG_COMMANDS section.
12185#
12186for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12187 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12188 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12189 ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
12190$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
12191 X"$ac_dest" : 'X\(//\)[^/]' \| \
12192 X"$ac_dest" : 'X\(//\)$' \| \
12193 X"$ac_dest" : 'X\(/\)' \| \
12194 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
12195echo X"$ac_dest" |
12196 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12197 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12198 /^X\(\/\/\)$/{ s//\1/; q; }
12199 /^X\(\/\).*/{ s//\1/; q; }
12200 s/.*/./; q'`
ab509236
L
12201 { if $as_mkdir_p; then
12202 mkdir -p "$ac_dir"
12203 else
12204 as_dir="$ac_dir"
12205 as_dirs=
12206 while test ! -d "$as_dir"; do
12207 as_dirs="$as_dir $as_dirs"
12208 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12209$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12210 X"$as_dir" : 'X\(//\)[^/]' \| \
12211 X"$as_dir" : 'X\(//\)$' \| \
12212 X"$as_dir" : 'X\(/\)' \| \
12213 . : '\(.\)' 2>/dev/null ||
12214echo X"$as_dir" |
12215 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12216 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12217 /^X\(\/\/\)$/{ s//\1/; q; }
12218 /^X\(\/\).*/{ s//\1/; q; }
12219 s/.*/./; q'`
12220 done
12221 test ! -n "$as_dirs" || mkdir $as_dirs
12222 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
12223echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
12224 { (exit 1); exit 1; }; }; }
12225
13b2be9c
DJ
12226 ac_builddir=.
12227
12228if test "$ac_dir" != .; then
12229 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12230 # A "../" for each directory in $ac_dir_suffix.
12231 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
12232else
12233 ac_dir_suffix= ac_top_builddir=
12234fi
12235
12236case $srcdir in
12237 .) # No --srcdir option. We are building in place.
12238 ac_srcdir=.
12239 if test -z "$ac_top_builddir"; then
12240 ac_top_srcdir=.
12241 else
12242 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
12243 fi ;;
12244 [\\/]* | ?:[\\/]* ) # Absolute path.
12245 ac_srcdir=$srcdir$ac_dir_suffix;
12246 ac_top_srcdir=$srcdir ;;
12247 *) # Relative path.
12248 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
12249 ac_top_srcdir=$ac_top_builddir$srcdir ;;
12250esac
ab509236
L
12251
12252# Do not use `cd foo && pwd` to compute absolute paths, because
12253# the directories may not exist.
12254case `pwd` in
12255.) ac_abs_builddir="$ac_dir";;
12256*)
12257 case "$ac_dir" in
12258 .) ac_abs_builddir=`pwd`;;
12259 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
12260 *) ac_abs_builddir=`pwd`/"$ac_dir";;
12261 esac;;
12262esac
12263case $ac_abs_builddir in
12264.) ac_abs_top_builddir=${ac_top_builddir}.;;
12265*)
12266 case ${ac_top_builddir}. in
12267 .) ac_abs_top_builddir=$ac_abs_builddir;;
12268 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
12269 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
12270 esac;;
12271esac
12272case $ac_abs_builddir in
12273.) ac_abs_srcdir=$ac_srcdir;;
12274*)
12275 case $ac_srcdir in
12276 .) ac_abs_srcdir=$ac_abs_builddir;;
12277 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
12278 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
12279 esac;;
12280esac
12281case $ac_abs_builddir in
12282.) ac_abs_top_srcdir=$ac_top_srcdir;;
12283*)
12284 case $ac_top_srcdir in
12285 .) ac_abs_top_srcdir=$ac_abs_builddir;;
12286 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
12287 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
12288 esac;;
12289esac
13b2be9c
DJ
12290
12291
12292 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
12293echo "$as_me: executing $ac_dest commands" >&6;}
12294 case $ac_dest in
12295 depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
12296 # Strip MF so we end up with the name of the file.
12297 mf=`echo "$mf" | sed -e 's/:.*$//'`
12298 # Check whether this is an Automake generated Makefile or not.
12299 # We used to match only the files named `Makefile.in', but
12300 # some people rename them; so instead we look at the file content.
12301 # Grep'ing the first line is not enough: some people post-process
12302 # each Makefile.in and add a new line on top of each file to say so.
12303 # So let's grep whole file.
12304 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
12305 dirpart=`(dirname "$mf") 2>/dev/null ||
12306$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
12307 X"$mf" : 'X\(//\)[^/]' \| \
12308 X"$mf" : 'X\(//\)$' \| \
12309 X"$mf" : 'X\(/\)' \| \
12310 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
12311echo X"$mf" |
12312 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12313 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12314 /^X\(\/\/\)$/{ s//\1/; q; }
12315 /^X\(\/\).*/{ s//\1/; q; }
12316 s/.*/./; q'`
12317 else
12318 continue
12319 fi
12320 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
12321 # Extract the definition of DEP_FILES from the Makefile without
12322 # running `make'.
4b363073 12323 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
13b2be9c
DJ
12324 test -z "$DEPDIR" && continue
12325 # When using ansi2knr, U may be empty or an underscore; expand it
4b363073 12326 U=`sed -n 's/^U = //p' < "$mf"`
13b2be9c
DJ
12327 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
12328 # We invoke sed twice because it is the simplest approach to
12329 # changing $(DEPDIR) to its actual value in the expansion.
4b363073 12330 for file in `sed -n '
13b2be9c
DJ
12331 /^DEP_FILES = .*\\\\$/ {
12332 s/^DEP_FILES = //
12333 :loop
12334 s/\\\\$//
12335 p
12336 n
12337 /\\\\$/ b loop
12338 p
12339 }
12340 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
12341 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
12342 # Make sure the directory exists.
12343 test -f "$dirpart/$file" && continue
12344 fdir=`(dirname "$file") 2>/dev/null ||
12345$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
12346 X"$file" : 'X\(//\)[^/]' \| \
12347 X"$file" : 'X\(//\)$' \| \
12348 X"$file" : 'X\(/\)' \| \
12349 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
12350echo X"$file" |
12351 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12352 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12353 /^X\(\/\/\)$/{ s//\1/; q; }
12354 /^X\(\/\).*/{ s//\1/; q; }
12355 s/.*/./; q'`
12356 { if $as_mkdir_p; then
12357 mkdir -p $dirpart/$fdir
12358 else
12359 as_dir=$dirpart/$fdir
12360 as_dirs=
12361 while test ! -d "$as_dir"; do
12362 as_dirs="$as_dir $as_dirs"
12363 as_dir=`(dirname "$as_dir") 2>/dev/null ||
12364$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
ab509236
L
12365 X"$as_dir" : 'X\(//\)[^/]' \| \
12366 X"$as_dir" : 'X\(//\)$' \| \
12367 X"$as_dir" : 'X\(/\)' \| \
12368 . : '\(.\)' 2>/dev/null ||
13b2be9c
DJ
12369echo X"$as_dir" |
12370 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12371 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12372 /^X\(\/\/\)$/{ s//\1/; q; }
12373 /^X\(\/\).*/{ s//\1/; q; }
12374 s/.*/./; q'`
12375 done
12376 test ! -n "$as_dirs" || mkdir $as_dirs
12377 fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
12378echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
12379 { (exit 1); exit 1; }; }; }
c8615825 12380
13b2be9c
DJ
12381 # echo "creating $dirpart/$file"
12382 echo '# dummy' > "$dirpart/$file"
12383 done
12384done
12385 ;;
12386 default ) rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
252b5132
RH
12387 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
12388 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
12389 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
12390 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
12391 if test "x$cgen_cpu_prefix" != x ; then
12392 echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
12393 fi
12394
13b2be9c
DJ
12395 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
12396 esac
12397done
12398_ACEOF
12399
12400cat >>$CONFIG_STATUS <<\_ACEOF
12401
12402{ (exit 0); exit 0; }
12403_ACEOF
252b5132 12404chmod +x $CONFIG_STATUS
13b2be9c
DJ
12405ac_clean_files=$ac_clean_files_save
12406
12407
12408# configure is writing to config.log, and then calls config.status.
12409# config.status does its own redirection, appending to config.log.
12410# Unfortunately, on DOS this fails, as config.log is still kept open
12411# by configure, so config.status won't be able to write to it; its
12412# output is simply discarded. So we exec the FD to /dev/null,
12413# effectively closing config.log, so it can be properly (re)opened and
12414# appended to by config.status. When coming back to configure, we
12415# need to make the FD available again.
12416if test "$no_create" != yes; then
12417 ac_cs_success=:
12418 ac_config_status_args=
12419 test "$silent" = yes &&
12420 ac_config_status_args="$ac_config_status_args --quiet"
12421 exec 5>/dev/null
12422 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12423 exec 5>>config.log
12424 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12425 # would make configure fail if this is the last instruction.
12426 $ac_cs_success || { (exit 1); exit 1; }
12427fi
252b5132 12428
This page took 0.951248 seconds and 4 git commands to generate.