]> git.ipfire.org Git - thirdparty/gcc.git/blame - libiberty/configure
gimplify.c (gimplify_omp_ordered): Fix up diagnostics wording.
[thirdparty/gcc.git] / libiberty / configure
CommitLineData
0bc0cd11 1#! /bin/sh
0bc0cd11 2# Guess values for system-dependent variables and create Makefiles.
5213506e
RW
3# Generated by GNU Autoconf 2.64.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
7# Foundation, Inc.
0bc0cd11
JL
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
5213506e
RW
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
238235ef 14
5213506e
RW
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
238235ef
DJ
18 emulate sh
19 NULLCMD=:
5213506e 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
238235ef
DJ
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
5213506e
RW
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
238235ef
DJ
31fi
32
5213506e
RW
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
238235ef
DJ
79fi
80
81
5213506e
RW
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
90case $0 in #((
91 *[\\/]* ) as_myself=$0 ;;
92 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
93for as_dir in $PATH
94do
95 IFS=$as_save_IFS
96 test -z "$as_dir" && as_dir=.
97 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
98 done
99IFS=$as_save_IFS
100
101 ;;
102esac
103# We did not find ourselves, most probably we were run as `sh COMMAND'
104# in which case we are not to be found in the path.
105if test "x$as_myself" = x; then
106 as_myself=$0
107fi
108if test ! -f "$as_myself"; then
109 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
110 exit 1
111fi
112
113# Unset variables that we do not need and which cause bugs (e.g. in
114# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
115# suppresses any "Segmentation fault" message there. '((' could
116# trigger a bug in pdksh 5.2.14.
117for as_var in BASH_ENV ENV MAIL MAILPATH
118do eval test x\${$as_var+set} = xset \
119 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
120done
238235ef
DJ
121PS1='$ '
122PS2='> '
123PS4='+ '
124
125# NLS nuisances.
5213506e
RW
126LC_ALL=C
127export LC_ALL
128LANGUAGE=C
129export LANGUAGE
130
131# CDPATH.
132(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
134if test "x$CONFIG_SHELL" = x; then
135 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
136 emulate sh
137 NULLCMD=:
138 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
139 # is contrary to our usage. Disable this feature.
140 alias -g '\${1+\"\$@\"}'='\"\$@\"'
141 setopt NO_GLOB_SUBST
142else
143 case \`(set -o) 2>/dev/null\` in #(
144 *posix*) :
145 set -o posix ;; #(
146 *) :
147 ;;
148esac
149fi
150"
151 as_required="as_fn_return () { (exit \$1); }
152as_fn_success () { as_fn_return 0; }
153as_fn_failure () { as_fn_return 1; }
154as_fn_ret_success () { return 0; }
155as_fn_ret_failure () { return 1; }
156
157exitcode=0
158as_fn_success || { exitcode=1; echo as_fn_success failed.; }
159as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
160as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
161as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
162if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
163
164else
165 exitcode=1; echo positional parameters were not saved.
166fi
167test x\$exitcode = x0 || exit 1"
168 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
169 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
170 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
171 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
172test \$(( 1 + 1 )) = 2 || exit 1"
173 if (eval "$as_required") 2>/dev/null; then :
174 as_have_required=yes
175else
176 as_have_required=no
177fi
178 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
179
180else
181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
182as_found=false
183for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
238235ef 184do
5213506e
RW
185 IFS=$as_save_IFS
186 test -z "$as_dir" && as_dir=.
187 as_found=:
188 case $as_dir in #(
189 /*)
190 for as_base in sh bash ksh sh5; do
191 # Try only shells that exist, to save several forks.
192 as_shell=$as_dir/$as_base
193 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
194 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
195 CONFIG_SHELL=$as_shell as_have_required=yes
196 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 break 2
198fi
199fi
200 done;;
201 esac
202 as_found=false
203done
204$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
205 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
206 CONFIG_SHELL=$SHELL as_have_required=yes
207fi; }
208IFS=$as_save_IFS
209
210
211 if test "x$CONFIG_SHELL" != x; then :
212 # We cannot yet assume a decent shell, so we have to provide a
213 # neutralization value for shells without unset; and this also
214 # works around shells that cannot unset nonexistent variables.
215 BASH_ENV=/dev/null
216 ENV=/dev/null
217 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
218 export CONFIG_SHELL
219 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
220fi
221
222 if test x$as_have_required = xno; then :
223 $as_echo "$0: This script requires a shell more modern than all"
224 $as_echo "$0: the shells that I found on your system."
225 if test x${ZSH_VERSION+set} = xset ; then
226 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
227 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
238235ef 228 else
5213506e
RW
229 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
230$0: including any error possibly output before this
231$0: message. Then install a modern shell, or manually run
232$0: the script under such a shell if you do have one."
238235ef 233 fi
5213506e
RW
234 exit 1
235fi
236fi
237fi
238SHELL=${CONFIG_SHELL-/bin/sh}
239export SHELL
240# Unset more variables known to interfere with behavior of common tools.
241CLICOLOR_FORCE= GREP_OPTIONS=
242unset CLICOLOR_FORCE GREP_OPTIONS
243
244## --------------------- ##
245## M4sh Shell Functions. ##
246## --------------------- ##
247# as_fn_unset VAR
248# ---------------
249# Portably unset VAR.
250as_fn_unset ()
251{
252 { eval $1=; unset $1;}
253}
254as_unset=as_fn_unset
255
256# as_fn_set_status STATUS
257# -----------------------
258# Set $? to STATUS, without forking.
259as_fn_set_status ()
260{
261 return $1
262} # as_fn_set_status
263
264# as_fn_exit STATUS
265# -----------------
266# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
267as_fn_exit ()
268{
269 set +e
270 as_fn_set_status $1
271 exit $1
272} # as_fn_exit
273
274# as_fn_mkdir_p
275# -------------
276# Create "$as_dir" as a directory, including parents if necessary.
277as_fn_mkdir_p ()
278{
279
280 case $as_dir in #(
281 -*) as_dir=./$as_dir;;
282 esac
283 test -d "$as_dir" || eval $as_mkdir_p || {
284 as_dirs=
285 while :; do
286 case $as_dir in #(
287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
288 *) as_qdir=$as_dir;;
289 esac
290 as_dirs="'$as_qdir' $as_dirs"
291 as_dir=`$as_dirname -- "$as_dir" ||
292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
293 X"$as_dir" : 'X\(//\)[^/]' \| \
294 X"$as_dir" : 'X\(//\)$' \| \
295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
296$as_echo X"$as_dir" |
297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
298 s//\1/
299 q
300 }
301 /^X\(\/\/\)[^/].*/{
302 s//\1/
303 q
304 }
305 /^X\(\/\/\)$/{
306 s//\1/
307 q
308 }
309 /^X\(\/\).*/{
310 s//\1/
311 q
312 }
313 s/.*/./; q'`
314 test -d "$as_dir" && break
315 done
316 test -z "$as_dirs" || eval "mkdir $as_dirs"
317 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
318
319
320} # as_fn_mkdir_p
321# as_fn_append VAR VALUE
322# ----------------------
323# Append the text in VALUE to the end of the definition contained in VAR. Take
324# advantage of any shell optimizations that allow amortized linear growth over
325# repeated appends, instead of the typical quadratic growth present in naive
326# implementations.
327if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
328 eval 'as_fn_append ()
329 {
330 eval $1+=\$2
331 }'
332else
333 as_fn_append ()
334 {
335 eval $1=\$$1\$2
336 }
337fi # as_fn_append
338
339# as_fn_arith ARG...
340# ------------------
341# Perform arithmetic evaluation on the ARGs, and store the result in the
342# global $as_val. Take advantage of shells that can avoid forks. The arguments
343# must be portable across $(()) and expr.
344if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
345 eval 'as_fn_arith ()
346 {
347 as_val=$(( $* ))
348 }'
349else
350 as_fn_arith ()
351 {
352 as_val=`expr "$@" || test $? -eq 1`
353 }
354fi # as_fn_arith
355
356
357# as_fn_error ERROR [LINENO LOG_FD]
358# ---------------------------------
359# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
360# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
361# script with status $?, using 1 if that was 0.
362as_fn_error ()
363{
364 as_status=$?; test $as_status -eq 0 && as_status=1
365 if test "$3"; then
366 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
367 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
368 fi
369 $as_echo "$as_me: error: $1" >&2
370 as_fn_exit $as_status
371} # as_fn_error
238235ef 372
5213506e
RW
373if expr a : '\(a\)' >/dev/null 2>&1 &&
374 test "X`expr 00001 : '.*\(...\)'`" = X001; then
238235ef
DJ
375 as_expr=expr
376else
377 as_expr=false
378fi
379
5213506e 380if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
238235ef
DJ
381 as_basename=basename
382else
383 as_basename=false
384fi
385
5213506e
RW
386if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
387 as_dirname=dirname
388else
389 as_dirname=false
390fi
238235ef 391
5213506e 392as_me=`$as_basename -- "$0" ||
238235ef
DJ
393$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
394 X"$0" : 'X\(//\)$' \| \
5213506e
RW
395 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
396$as_echo X/"$0" |
397 sed '/^.*\/\([^/][^/]*\)\/*$/{
398 s//\1/
399 q
400 }
401 /^X\/\(\/\/\)$/{
402 s//\1/
403 q
404 }
405 /^X\/\(\/\).*/{
406 s//\1/
407 q
408 }
409 s/.*/./; q'`
238235ef 410
238235ef
DJ
411# Avoid depending upon Character Ranges.
412as_cr_letters='abcdefghijklmnopqrstuvwxyz'
413as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
414as_cr_Letters=$as_cr_letters$as_cr_LETTERS
415as_cr_digits='0123456789'
416as_cr_alnum=$as_cr_Letters$as_cr_digits
417
238235ef 418
5213506e
RW
419 as_lineno_1=$LINENO as_lineno_1a=$LINENO
420 as_lineno_2=$LINENO as_lineno_2a=$LINENO
421 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
422 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
423 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
424 sed -n '
425 p
426 /[$]LINENO/=
427 ' <$as_myself |
238235ef 428 sed '
5213506e
RW
429 s/[$]LINENO.*/&-/
430 t lineno
431 b
432 :lineno
238235ef 433 N
5213506e
RW
434 :loop
435 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
238235ef 436 t loop
5213506e 437 s/-\n.*//
238235ef 438 ' >$as_me.lineno &&
5213506e
RW
439 chmod +x "$as_me.lineno" ||
440 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
238235ef
DJ
441
442 # Don't try to exec as it changes $[0], causing all sort of problems
443 # (the dirname of $[0] is not the place where we might find the
5213506e
RW
444 # original and so on. Autoconf is especially sensitive to this).
445 . "./$as_me.lineno"
238235ef
DJ
446 # Exit status is that of the last command.
447 exit
448}
449
5213506e
RW
450ECHO_C= ECHO_N= ECHO_T=
451case `echo -n x` in #(((((
452-n*)
453 case `echo 'xy\c'` in
454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
455 xy) ECHO_C='\c';;
456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
457 ECHO_T=' ';;
458 esac;;
459*)
460 ECHO_N='-n';;
238235ef
DJ
461esac
462
5213506e
RW
463rm -f conf$$ conf$$.exe conf$$.file
464if test -d conf$$.dir; then
465 rm -f conf$$.dir/conf$$.file
238235ef 466else
5213506e
RW
467 rm -f conf$$.dir
468 mkdir conf$$.dir 2>/dev/null
238235ef 469fi
5213506e
RW
470if (echo >conf$$.file) 2>/dev/null; then
471 if ln -s conf$$.file conf$$ 2>/dev/null; then
238235ef 472 as_ln_s='ln -s'
5213506e
RW
473 # ... but there are two gotchas:
474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
476 # In both cases, we have to default to `cp -p'.
477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
478 as_ln_s='cp -p'
479 elif ln conf$$.file conf$$ 2>/dev/null; then
480 as_ln_s=ln
481 else
482 as_ln_s='cp -p'
238235ef 483 fi
238235ef
DJ
484else
485 as_ln_s='cp -p'
486fi
5213506e
RW
487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
488rmdir conf$$.dir 2>/dev/null
238235ef
DJ
489
490if mkdir -p . 2>/dev/null; then
5213506e 491 as_mkdir_p='mkdir -p "$as_dir"'
238235ef 492else
3beb1315 493 test -d ./-p && rmdir ./-p
238235ef
DJ
494 as_mkdir_p=false
495fi
496
5213506e
RW
497if test -x / >/dev/null 2>&1; then
498 as_test_x='test -x'
499else
500 if ls -dL / >/dev/null 2>&1; then
501 as_ls_L_option=L
502 else
503 as_ls_L_option=
504 fi
505 as_test_x='
506 eval sh -c '\''
507 if test -d "$1"; then
508 test -d "$1/.";
509 else
510 case $1 in #(
511 -*)set "./$1";;
512 esac;
513 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
514 ???[sx]*):;;*)false;;esac;fi
515 '\'' sh
516 '
517fi
518as_executable_p=$as_test_x
238235ef
DJ
519
520# Sed expression to map a string onto a valid CPP name.
3beb1315 521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
522
523# Sed expression to map a string onto a valid variable name.
3beb1315 524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
525
526
5213506e 527exec 7<&0 </dev/null 6>&1
238235ef
DJ
528
529# Name of the host.
530# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
531# so uname gets run too.
532ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
533
238235ef
DJ
534#
535# Initializations.
536#
0bc0cd11 537ac_default_prefix=/usr/local
5213506e 538ac_clean_files=
238235ef 539ac_config_libobj_dir=.
5213506e 540LIBOBJS=
238235ef
DJ
541cross_compiling=no
542subdirs=
543MFLAGS=
544MAKEFLAGS=
238235ef
DJ
545
546# Identity of this package.
547PACKAGE_NAME=
548PACKAGE_TARNAME=
549PACKAGE_VERSION=
550PACKAGE_STRING=
551PACKAGE_BUGREPORT=
5213506e 552PACKAGE_URL=
238235ef
DJ
553
554ac_unique_file="xmalloc.c"
555# Factoring default headers for most tests.
556ac_includes_default="\
557#include <stdio.h>
5213506e 558#ifdef HAVE_SYS_TYPES_H
238235ef
DJ
559# include <sys/types.h>
560#endif
5213506e 561#ifdef HAVE_SYS_STAT_H
238235ef
DJ
562# include <sys/stat.h>
563#endif
5213506e 564#ifdef STDC_HEADERS
238235ef
DJ
565# include <stdlib.h>
566# include <stddef.h>
567#else
5213506e 568# ifdef HAVE_STDLIB_H
238235ef
DJ
569# include <stdlib.h>
570# endif
571#endif
5213506e
RW
572#ifdef HAVE_STRING_H
573# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
238235ef
DJ
574# include <memory.h>
575# endif
576# include <string.h>
577#endif
5213506e 578#ifdef HAVE_STRINGS_H
238235ef
DJ
579# include <strings.h>
580#endif
5213506e 581#ifdef HAVE_INTTYPES_H
238235ef 582# include <inttypes.h>
238235ef 583#endif
5213506e
RW
584#ifdef HAVE_STDINT_H
585# include <stdint.h>
586#endif
587#ifdef HAVE_UNISTD_H
238235ef
DJ
588# include <unistd.h>
589#endif"
590
5213506e
RW
591ac_subst_vars='LTLIBOBJS
592INSTALL_DEST
593pexecute
594target_header_dir
595CHECK
596LIBOBJS
4f148bbc 597NOASANFLAG
5213506e
RW
598PICFLAG
599INSTALL_DATA
600INSTALL_SCRIPT
601INSTALL_PROGRAM
5213506e
RW
602OUTPUT_OPTION
603NO_MINUS_C_MINUS_O
604ac_libiberty_warn_cflags
f50f17e6
YJ
605EGREP
606GREP
5213506e
RW
607CPP
608OBJEXT
609EXEEXT
610ac_ct_CC
611CPPFLAGS
612LDFLAGS
613CFLAGS
614CC
615RANLIB
616AR
617host_os
618host_vendor
619host_cpu
620host
621build_os
622build_vendor
623build_cpu
624build
625HAVE_PERL
626PERL
627BUILD_INFO
628MAKEINFO
629NOTMAINT
630MAINT
631libiberty_topdir
632target_alias
633host_alias
634build_alias
635LIBS
636ECHO_T
637ECHO_N
638ECHO_C
639DEFS
640mandir
641localedir
642libdir
643psdir
644pdfdir
645dvidir
646htmldir
647infodir
648docdir
649oldincludedir
650includedir
651localstatedir
652sharedstatedir
653sysconfdir
654datadir
655datarootdir
656libexecdir
657sbindir
658bindir
659program_transform_name
660prefix
661exec_prefix
662PACKAGE_URL
663PACKAGE_BUGREPORT
664PACKAGE_STRING
665PACKAGE_VERSION
666PACKAGE_TARNAME
667PACKAGE_NAME
668PATH_SEPARATOR
669SHELL'
238235ef 670ac_subst_files='host_makefile_frag'
5213506e
RW
671ac_user_opts='
672enable_option_checking
673with_target_subdir
674with_build_subdir
675with_cross_host
676with_newlib
677enable_maintainer_mode
678enable_multilib
5213506e 679enable_install_libiberty
8c9fddf4 680enable_largefile
5213506e
RW
681'
682 ac_precious_vars='build_alias
683host_alias
684target_alias
685CC
686CFLAGS
687LDFLAGS
688LIBS
689CPPFLAGS
690CPP'
691
0bc0cd11
JL
692
693# Initialize some variables set by options.
238235ef
DJ
694ac_init_help=
695ac_init_version=false
5213506e
RW
696ac_unrecognized_opts=
697ac_unrecognized_sep=
0bc0cd11
JL
698# The variables have the same names as the options, with
699# dashes changed to underlines.
238235ef 700cache_file=/dev/null
0bc0cd11 701exec_prefix=NONE
0bc0cd11 702no_create=
0bc0cd11
JL
703no_recursion=
704prefix=NONE
705program_prefix=NONE
706program_suffix=NONE
707program_transform_name=s,x,x,
708silent=
709site=
710srcdir=
0bc0cd11
JL
711verbose=
712x_includes=NONE
713x_libraries=NONE
238235ef
DJ
714
715# Installation directory options.
716# These are left unexpanded so users can "make install exec_prefix=/foo"
717# and all the variables that are supposed to be based on exec_prefix
718# by default will actually change.
719# Use braces instead of parens because sh, perl, etc. also accept them.
5213506e 720# (The list follows the same order as the GNU Coding Standards.)
0bc0cd11
JL
721bindir='${exec_prefix}/bin'
722sbindir='${exec_prefix}/sbin'
723libexecdir='${exec_prefix}/libexec'
5213506e
RW
724datarootdir='${prefix}/share'
725datadir='${datarootdir}'
0bc0cd11
JL
726sysconfdir='${prefix}/etc'
727sharedstatedir='${prefix}/com'
728localstatedir='${prefix}/var'
0bc0cd11
JL
729includedir='${prefix}/include'
730oldincludedir='/usr/include'
5213506e
RW
731docdir='${datarootdir}/doc/${PACKAGE}'
732infodir='${datarootdir}/info'
733htmldir='${docdir}'
734dvidir='${docdir}'
735pdfdir='${docdir}'
736psdir='${docdir}'
737libdir='${exec_prefix}/lib'
738localedir='${datarootdir}/locale'
739mandir='${datarootdir}/man'
0bc0cd11 740
0bc0cd11 741ac_prev=
5213506e 742ac_dashdash=
0bc0cd11
JL
743for ac_option
744do
0bc0cd11
JL
745 # If the previous option needs an argument, assign it.
746 if test -n "$ac_prev"; then
5213506e 747 eval $ac_prev=\$ac_option
0bc0cd11
JL
748 ac_prev=
749 continue
750 fi
751
5213506e
RW
752 case $ac_option in
753 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
754 *) ac_optarg=yes ;;
755 esac
0bc0cd11
JL
756
757 # Accept the important Cygnus configure options, so we can diagnose typos.
758
5213506e
RW
759 case $ac_dashdash$ac_option in
760 --)
761 ac_dashdash=yes ;;
0bc0cd11
JL
762
763 -bindir | --bindir | --bindi | --bind | --bin | --bi)
764 ac_prev=bindir ;;
765 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
238235ef 766 bindir=$ac_optarg ;;
0bc0cd11
JL
767
768 -build | --build | --buil | --bui | --bu)
238235ef 769 ac_prev=build_alias ;;
0bc0cd11 770 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
238235ef 771 build_alias=$ac_optarg ;;
0bc0cd11
JL
772
773 -cache-file | --cache-file | --cache-fil | --cache-fi \
774 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
775 ac_prev=cache_file ;;
776 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
777 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
238235ef
DJ
778 cache_file=$ac_optarg ;;
779
780 --config-cache | -C)
781 cache_file=config.cache ;;
0bc0cd11 782
5213506e 783 -datadir | --datadir | --datadi | --datad)
0bc0cd11 784 ac_prev=datadir ;;
5213506e 785 -datadir=* | --datadir=* | --datadi=* | --datad=*)
238235ef 786 datadir=$ac_optarg ;;
0bc0cd11 787
5213506e
RW
788 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
789 | --dataroo | --dataro | --datar)
790 ac_prev=datarootdir ;;
791 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
792 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
793 datarootdir=$ac_optarg ;;
794
0bc0cd11 795 -disable-* | --disable-*)
5213506e 796 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
0bc0cd11 797 # Reject names that are not valid shell variable names.
5213506e
RW
798 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
799 as_fn_error "invalid feature name: $ac_useropt"
800 ac_useropt_orig=$ac_useropt
801 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
802 case $ac_user_opts in
803 *"
804"enable_$ac_useropt"
805"*) ;;
806 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
807 ac_unrecognized_sep=', ';;
808 esac
809 eval enable_$ac_useropt=no ;;
810
811 -docdir | --docdir | --docdi | --doc | --do)
812 ac_prev=docdir ;;
813 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
814 docdir=$ac_optarg ;;
815
816 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
817 ac_prev=dvidir ;;
818 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
819 dvidir=$ac_optarg ;;
0bc0cd11
JL
820
821 -enable-* | --enable-*)
5213506e 822 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
0bc0cd11 823 # Reject names that are not valid shell variable names.
5213506e
RW
824 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
825 as_fn_error "invalid feature name: $ac_useropt"
826 ac_useropt_orig=$ac_useropt
827 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
828 case $ac_user_opts in
829 *"
830"enable_$ac_useropt"
831"*) ;;
832 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
833 ac_unrecognized_sep=', ';;
0bc0cd11 834 esac
5213506e 835 eval enable_$ac_useropt=\$ac_optarg ;;
0bc0cd11
JL
836
837 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
838 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
839 | --exec | --exe | --ex)
840 ac_prev=exec_prefix ;;
841 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
842 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
843 | --exec=* | --exe=* | --ex=*)
238235ef 844 exec_prefix=$ac_optarg ;;
0bc0cd11
JL
845
846 -gas | --gas | --ga | --g)
847 # Obsolete; use --with-gas.
848 with_gas=yes ;;
849
238235ef
DJ
850 -help | --help | --hel | --he | -h)
851 ac_init_help=long ;;
852 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
853 ac_init_help=recursive ;;
854 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
855 ac_init_help=short ;;
0bc0cd11
JL
856
857 -host | --host | --hos | --ho)
238235ef 858 ac_prev=host_alias ;;
0bc0cd11 859 -host=* | --host=* | --hos=* | --ho=*)
238235ef 860 host_alias=$ac_optarg ;;
0bc0cd11 861
5213506e
RW
862 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
863 ac_prev=htmldir ;;
864 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
865 | --ht=*)
866 htmldir=$ac_optarg ;;
867
0bc0cd11
JL
868 -includedir | --includedir | --includedi | --included | --include \
869 | --includ | --inclu | --incl | --inc)
870 ac_prev=includedir ;;
871 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
872 | --includ=* | --inclu=* | --incl=* | --inc=*)
238235ef 873 includedir=$ac_optarg ;;
0bc0cd11
JL
874
875 -infodir | --infodir | --infodi | --infod | --info | --inf)
876 ac_prev=infodir ;;
877 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
238235ef 878 infodir=$ac_optarg ;;
0bc0cd11
JL
879
880 -libdir | --libdir | --libdi | --libd)
881 ac_prev=libdir ;;
882 -libdir=* | --libdir=* | --libdi=* | --libd=*)
238235ef 883 libdir=$ac_optarg ;;
0bc0cd11
JL
884
885 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
886 | --libexe | --libex | --libe)
887 ac_prev=libexecdir ;;
888 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
889 | --libexe=* | --libex=* | --libe=*)
238235ef 890 libexecdir=$ac_optarg ;;
0bc0cd11 891
5213506e
RW
892 -localedir | --localedir | --localedi | --localed | --locale)
893 ac_prev=localedir ;;
894 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
895 localedir=$ac_optarg ;;
896
0bc0cd11 897 -localstatedir | --localstatedir | --localstatedi | --localstated \
5213506e 898 | --localstate | --localstat | --localsta | --localst | --locals)
0bc0cd11
JL
899 ac_prev=localstatedir ;;
900 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
5213506e 901 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
238235ef 902 localstatedir=$ac_optarg ;;
0bc0cd11
JL
903
904 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
905 ac_prev=mandir ;;
906 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238235ef 907 mandir=$ac_optarg ;;
0bc0cd11
JL
908
909 -nfp | --nfp | --nf)
910 # Obsolete; use --without-fp.
911 with_fp=no ;;
912
913 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
238235ef 914 | --no-cr | --no-c | -n)
0bc0cd11
JL
915 no_create=yes ;;
916
917 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
918 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
919 no_recursion=yes ;;
920
921 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
922 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
923 | --oldin | --oldi | --old | --ol | --o)
924 ac_prev=oldincludedir ;;
925 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
926 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
927 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
238235ef 928 oldincludedir=$ac_optarg ;;
0bc0cd11
JL
929
930 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
931 ac_prev=prefix ;;
932 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
238235ef 933 prefix=$ac_optarg ;;
0bc0cd11
JL
934
935 -program-prefix | --program-prefix | --program-prefi | --program-pref \
936 | --program-pre | --program-pr | --program-p)
937 ac_prev=program_prefix ;;
938 -program-prefix=* | --program-prefix=* | --program-prefi=* \
939 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
238235ef 940 program_prefix=$ac_optarg ;;
0bc0cd11
JL
941
942 -program-suffix | --program-suffix | --program-suffi | --program-suff \
943 | --program-suf | --program-su | --program-s)
944 ac_prev=program_suffix ;;
945 -program-suffix=* | --program-suffix=* | --program-suffi=* \
946 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
238235ef 947 program_suffix=$ac_optarg ;;
0bc0cd11
JL
948
949 -program-transform-name | --program-transform-name \
950 | --program-transform-nam | --program-transform-na \
951 | --program-transform-n | --program-transform- \
952 | --program-transform | --program-transfor \
953 | --program-transfo | --program-transf \
954 | --program-trans | --program-tran \
955 | --progr-tra | --program-tr | --program-t)
956 ac_prev=program_transform_name ;;
957 -program-transform-name=* | --program-transform-name=* \
958 | --program-transform-nam=* | --program-transform-na=* \
959 | --program-transform-n=* | --program-transform-=* \
960 | --program-transform=* | --program-transfor=* \
961 | --program-transfo=* | --program-transf=* \
962 | --program-trans=* | --program-tran=* \
963 | --progr-tra=* | --program-tr=* | --program-t=*)
238235ef 964 program_transform_name=$ac_optarg ;;
0bc0cd11 965
5213506e
RW
966 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
967 ac_prev=pdfdir ;;
968 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
969 pdfdir=$ac_optarg ;;
970
971 -psdir | --psdir | --psdi | --psd | --ps)
972 ac_prev=psdir ;;
973 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
974 psdir=$ac_optarg ;;
975
0bc0cd11
JL
976 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
977 | -silent | --silent | --silen | --sile | --sil)
978 silent=yes ;;
979
980 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
981 ac_prev=sbindir ;;
982 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
983 | --sbi=* | --sb=*)
238235ef 984 sbindir=$ac_optarg ;;
0bc0cd11
JL
985
986 -sharedstatedir | --sharedstatedir | --sharedstatedi \
987 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
988 | --sharedst | --shareds | --shared | --share | --shar \
989 | --sha | --sh)
990 ac_prev=sharedstatedir ;;
991 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
992 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
993 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
994 | --sha=* | --sh=*)
238235ef 995 sharedstatedir=$ac_optarg ;;
0bc0cd11
JL
996
997 -site | --site | --sit)
998 ac_prev=site ;;
999 -site=* | --site=* | --sit=*)
238235ef 1000 site=$ac_optarg ;;
0bc0cd11
JL
1001
1002 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1003 ac_prev=srcdir ;;
1004 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
238235ef 1005 srcdir=$ac_optarg ;;
0bc0cd11
JL
1006
1007 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1008 | --syscon | --sysco | --sysc | --sys | --sy)
1009 ac_prev=sysconfdir ;;
1010 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1011 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
238235ef 1012 sysconfdir=$ac_optarg ;;
0bc0cd11
JL
1013
1014 -target | --target | --targe | --targ | --tar | --ta | --t)
238235ef 1015 ac_prev=target_alias ;;
0bc0cd11 1016 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
238235ef 1017 target_alias=$ac_optarg ;;
0bc0cd11
JL
1018
1019 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1020 verbose=yes ;;
1021
238235ef
DJ
1022 -version | --version | --versio | --versi | --vers | -V)
1023 ac_init_version=: ;;
0bc0cd11
JL
1024
1025 -with-* | --with-*)
5213506e 1026 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
0bc0cd11 1027 # Reject names that are not valid shell variable names.
5213506e
RW
1028 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1029 as_fn_error "invalid package name: $ac_useropt"
1030 ac_useropt_orig=$ac_useropt
1031 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1032 case $ac_user_opts in
1033 *"
1034"with_$ac_useropt"
1035"*) ;;
1036 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1037 ac_unrecognized_sep=', ';;
0bc0cd11 1038 esac
5213506e 1039 eval with_$ac_useropt=\$ac_optarg ;;
0bc0cd11
JL
1040
1041 -without-* | --without-*)
5213506e 1042 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
0bc0cd11 1043 # Reject names that are not valid shell variable names.
5213506e
RW
1044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1045 as_fn_error "invalid package name: $ac_useropt"
1046 ac_useropt_orig=$ac_useropt
1047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1048 case $ac_user_opts in
1049 *"
1050"with_$ac_useropt"
1051"*) ;;
1052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1053 ac_unrecognized_sep=', ';;
1054 esac
1055 eval with_$ac_useropt=no ;;
0bc0cd11
JL
1056
1057 --x)
1058 # Obsolete; use --with-x.
1059 with_x=yes ;;
1060
1061 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1062 | --x-incl | --x-inc | --x-in | --x-i)
1063 ac_prev=x_includes ;;
1064 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1065 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
238235ef 1066 x_includes=$ac_optarg ;;
0bc0cd11
JL
1067
1068 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1069 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1070 ac_prev=x_libraries ;;
1071 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1072 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
238235ef 1073 x_libraries=$ac_optarg ;;
0bc0cd11 1074
5213506e
RW
1075 -*) as_fn_error "unrecognized option: \`$ac_option'
1076Try \`$0 --help' for more information."
0bc0cd11
JL
1077 ;;
1078
238235ef
DJ
1079 *=*)
1080 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1081 # Reject names that are not valid shell variable names.
5213506e
RW
1082 case $ac_envvar in #(
1083 '' | [0-9]* | *[!_$as_cr_alnum]* )
1084 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1085 esac
1086 eval $ac_envvar=\$ac_optarg
238235ef
DJ
1087 export $ac_envvar ;;
1088
0bc0cd11 1089 *)
238235ef 1090 # FIXME: should be removed in autoconf 3.0.
5213506e 1091 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
238235ef 1092 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
5213506e 1093 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
238235ef 1094 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
0bc0cd11
JL
1095 ;;
1096
1097 esac
1098done
1099
1100if test -n "$ac_prev"; then
238235ef 1101 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
5213506e 1102 as_fn_error "missing argument to $ac_option"
0bc0cd11 1103fi
0bc0cd11 1104
5213506e
RW
1105if test -n "$ac_unrecognized_opts"; then
1106 case $enable_option_checking in
1107 no) ;;
1108 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1109 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
238235ef 1110 esac
5213506e 1111fi
0bc0cd11 1112
5213506e
RW
1113# Check all directory arguments for consistency.
1114for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1115 datadir sysconfdir sharedstatedir localstatedir includedir \
1116 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1117 libdir localedir mandir
0bc0cd11 1118do
5213506e
RW
1119 eval ac_val=\$$ac_var
1120 # Remove trailing slashes.
238235ef 1121 case $ac_val in
5213506e
RW
1122 */ )
1123 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1124 eval $ac_var=\$ac_val;;
0bc0cd11 1125 esac
5213506e
RW
1126 # Be sure to have absolute directory names.
1127 case $ac_val in
1128 [\\/$]* | ?:[\\/]* ) continue;;
1129 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1130 esac
1131 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
0bc0cd11
JL
1132done
1133
238235ef
DJ
1134# There might be people who depend on the old broken behavior: `$host'
1135# used to hold the argument of --host etc.
1136# FIXME: To remove some day.
1137build=$build_alias
1138host=$host_alias
1139target=$target_alias
1140
1141# FIXME: To remove some day.
1142if test "x$host_alias" != x; then
1143 if test "x$build_alias" = x; then
1144 cross_compiling=maybe
5213506e 1145 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
238235ef
DJ
1146 If a cross compiler is detected then cross compile mode will be used." >&2
1147 elif test "x$build_alias" != "x$host_alias"; then
1148 cross_compiling=yes
1149 fi
1150fi
0bc0cd11 1151
238235ef
DJ
1152ac_tool_prefix=
1153test -n "$host_alias" && ac_tool_prefix=$host_alias-
1154
1155test "$silent" = yes && exec 6>/dev/null
0bc0cd11 1156
0bc0cd11 1157
5213506e
RW
1158ac_pwd=`pwd` && test -n "$ac_pwd" &&
1159ac_ls_di=`ls -di .` &&
1160ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1161 as_fn_error "working directory cannot be determined"
1162test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1163 as_fn_error "pwd does not report name of working directory"
1164
1165
0bc0cd11
JL
1166# Find the source files, if location was not specified.
1167if test -z "$srcdir"; then
1168 ac_srcdir_defaulted=yes
5213506e
RW
1169 # Try the directory containing this script, then the parent directory.
1170 ac_confdir=`$as_dirname -- "$as_myself" ||
1171$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1172 X"$as_myself" : 'X\(//\)[^/]' \| \
1173 X"$as_myself" : 'X\(//\)$' \| \
1174 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1175$as_echo X"$as_myself" |
1176 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1177 s//\1/
1178 q
1179 }
1180 /^X\(\/\/\)[^/].*/{
1181 s//\1/
1182 q
1183 }
1184 /^X\(\/\/\)$/{
1185 s//\1/
1186 q
1187 }
1188 /^X\(\/\).*/{
1189 s//\1/
1190 q
1191 }
1192 s/.*/./; q'`
0bc0cd11 1193 srcdir=$ac_confdir
5213506e 1194 if test ! -r "$srcdir/$ac_unique_file"; then
0bc0cd11
JL
1195 srcdir=..
1196 fi
1197else
1198 ac_srcdir_defaulted=no
1199fi
5213506e
RW
1200if test ! -r "$srcdir/$ac_unique_file"; then
1201 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1202 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1203fi
1204ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1205ac_abs_confdir=`(
1206 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1207 pwd)`
1208# When building in place, set srcdir=.
1209if test "$ac_abs_confdir" = "$ac_pwd"; then
1210 srcdir=.
1211fi
1212# Remove unnecessary trailing slashes from srcdir.
1213# Double slashes in file names in object file debugging info
1214# mess up M-x gdb in Emacs.
1215case $srcdir in
1216*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1217esac
1218for ac_var in $ac_precious_vars; do
1219 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1220 eval ac_env_${ac_var}_value=\$${ac_var}
1221 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1222 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1223done
238235ef
DJ
1224
1225#
1226# Report the --help message.
1227#
1228if test "$ac_init_help" = "long"; then
1229 # Omit some internal or obsolete options to make the list less imposing.
1230 # This message is too long to be a string in the A/UX 3.1 sh.
1231 cat <<_ACEOF
1232\`configure' configures this package to adapt to many kinds of systems.
1233
1234Usage: $0 [OPTION]... [VAR=VALUE]...
1235
1236To assign environment variables (e.g., CC, CFLAGS...), specify them as
1237VAR=VALUE. See below for descriptions of some of the useful variables.
1238
1239Defaults for the options are specified in brackets.
1240
1241Configuration:
1242 -h, --help display this help and exit
1243 --help=short display options specific to this package
1244 --help=recursive display the short help of all the included packages
1245 -V, --version display version information and exit
1246 -q, --quiet, --silent do not print \`checking...' messages
1247 --cache-file=FILE cache test results in FILE [disabled]
1248 -C, --config-cache alias for \`--cache-file=config.cache'
1249 -n, --no-create do not create output files
1250 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1251
238235ef
DJ
1252Installation directories:
1253 --prefix=PREFIX install architecture-independent files in PREFIX
5213506e 1254 [$ac_default_prefix]
238235ef 1255 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5213506e 1256 [PREFIX]
238235ef
DJ
1257
1258By default, \`make install' will install all the files in
1259\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1260an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1261for instance \`--prefix=\$HOME'.
1262
1263For better control, use the options below.
1264
1265Fine tuning of the installation directories:
5213506e
RW
1266 --bindir=DIR user executables [EPREFIX/bin]
1267 --sbindir=DIR system admin executables [EPREFIX/sbin]
1268 --libexecdir=DIR program executables [EPREFIX/libexec]
1269 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1270 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1271 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1272 --libdir=DIR object code libraries [EPREFIX/lib]
1273 --includedir=DIR C header files [PREFIX/include]
1274 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1275 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1276 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1277 --infodir=DIR info documentation [DATAROOTDIR/info]
1278 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1279 --mandir=DIR man documentation [DATAROOTDIR/man]
1280 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1281 --htmldir=DIR html documentation [DOCDIR]
1282 --dvidir=DIR dvi documentation [DOCDIR]
1283 --pdfdir=DIR pdf documentation [DOCDIR]
1284 --psdir=DIR ps documentation [DOCDIR]
238235ef
DJ
1285_ACEOF
1286
1287 cat <<\_ACEOF
1288
1289System types:
1290 --build=BUILD configure for building on BUILD [guessed]
1291 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1292_ACEOF
1293fi
1294
1295if test -n "$ac_init_help"; then
1296
1297 cat <<\_ACEOF
1298
1299Optional Features:
5213506e 1300 --disable-option-checking ignore unrecognized --enable/--with options
238235ef
DJ
1301 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1302 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1303 --enable-maintainer-mode
1304 enable make rules and dependencies not useful
1305 (and sometimes confusing) to the casual installer
abea993f 1306 --enable-multilib build many library versions (default)
8c9fddf4 1307 --enable-install-libiberty Install headers and library for end users
d208e2d2 1308 --disable-largefile omit support for large files
238235ef
DJ
1309
1310Optional Packages:
1311 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1312 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1313 --with-target-subdir=SUBDIR Configuring in a subdirectory for target
1314 --with-build-subdir=SUBDIR Configuring in a subdirectory for build
1315 --with-cross-host=HOST Configuring with a cross compiler
1316 --with-newlib Configuring with newlib
1317
1318Some influential environment variables:
1319 CC C compiler command
1320 CFLAGS C compiler flags
1321 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1322 nonstandard directory <lib dir>
5213506e
RW
1323 LIBS libraries to pass to the linker, e.g. -l<library>
1324 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1325 you have headers in a nonstandard directory <include dir>
238235ef
DJ
1326 CPP C preprocessor
1327
1328Use these variables to override the choices made by `configure' or to help
1329it to find libraries and programs with nonstandard names/locations.
1330
5213506e 1331Report bugs to the package provider.
238235ef 1332_ACEOF
5213506e 1333ac_status=$?
238235ef
DJ
1334fi
1335
1336if test "$ac_init_help" = "recursive"; then
1337 # If there are subdirs, report their specific --help.
238235ef 1338 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
5213506e
RW
1339 test -d "$ac_dir" ||
1340 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1341 continue
238235ef
DJ
1342 ac_builddir=.
1343
5213506e
RW
1344case "$ac_dir" in
1345.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1346*)
1347 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1348 # A ".." for each directory in $ac_dir_suffix.
1349 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1350 case $ac_top_builddir_sub in
1351 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1352 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1353 esac ;;
1354esac
1355ac_abs_top_builddir=$ac_pwd
1356ac_abs_builddir=$ac_pwd$ac_dir_suffix
1357# for backward compatibility:
1358ac_top_builddir=$ac_top_build_prefix
238235ef
DJ
1359
1360case $srcdir in
5213506e 1361 .) # We are building in place.
238235ef 1362 ac_srcdir=.
5213506e
RW
1363 ac_top_srcdir=$ac_top_builddir_sub
1364 ac_abs_top_srcdir=$ac_pwd ;;
1365 [\\/]* | ?:[\\/]* ) # Absolute name.
238235ef 1366 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
1367 ac_top_srcdir=$srcdir
1368 ac_abs_top_srcdir=$srcdir ;;
1369 *) # Relative name.
1370 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1371 ac_top_srcdir=$ac_top_build_prefix$srcdir
1372 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
3beb1315 1373esac
5213506e
RW
1374ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1375
1376 cd "$ac_dir" || { ac_status=$?; continue; }
1377 # Check for guested configure.
1378 if test -f "$ac_srcdir/configure.gnu"; then
1379 echo &&
1380 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1381 elif test -f "$ac_srcdir/configure"; then
1382 echo &&
1383 $SHELL "$ac_srcdir/configure" --help=recursive
238235ef 1384 else
5213506e
RW
1385 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1386 fi || ac_status=$?
1387 cd "$ac_pwd" || { ac_status=$?; break; }
238235ef
DJ
1388 done
1389fi
1390
5213506e 1391test -n "$ac_init_help" && exit $ac_status
238235ef
DJ
1392if $ac_init_version; then
1393 cat <<\_ACEOF
5213506e
RW
1394configure
1395generated by GNU Autoconf 2.64
238235ef 1396
5213506e 1397Copyright (C) 2009 Free Software Foundation, Inc.
238235ef
DJ
1398This configure script is free software; the Free Software Foundation
1399gives unlimited permission to copy, distribute and modify it.
1400_ACEOF
5213506e 1401 exit
238235ef 1402fi
238235ef 1403
5213506e
RW
1404## ------------------------ ##
1405## Autoconf initialization. ##
1406## ------------------------ ##
238235ef 1407
5213506e
RW
1408# ac_fn_c_try_compile LINENO
1409# --------------------------
1410# Try to compile conftest.$ac_ext, and return whether this succeeded.
1411ac_fn_c_try_compile ()
238235ef 1412{
5213506e
RW
1413 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1414 rm -f conftest.$ac_objext
1415 if { { ac_try="$ac_compile"
1416case "(($ac_try" in
1417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1418 *) ac_try_echo=$ac_try;;
1419esac
1420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1421$as_echo "$ac_try_echo"; } >&5
1422 (eval "$ac_compile") 2>conftest.err
1423 ac_status=$?
1424 if test -s conftest.err; then
1425 grep -v '^ *+' conftest.err >conftest.er1
1426 cat conftest.er1 >&5
1427 mv -f conftest.er1 conftest.err
1428 fi
1429 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1430 test $ac_status = 0; } && {
1431 test -z "$ac_c_werror_flag" ||
1432 test ! -s conftest.err
1433 } && test -s conftest.$ac_objext; then :
1434 ac_retval=0
1435else
1436 $as_echo "$as_me: failed program was:" >&5
1437sed 's/^/| /' conftest.$ac_ext >&5
238235ef 1438
5213506e
RW
1439 ac_retval=1
1440fi
1441 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1442 return $ac_retval
238235ef 1443
5213506e 1444} # ac_fn_c_try_compile
238235ef 1445
5213506e
RW
1446# ac_fn_c_try_cpp LINENO
1447# ----------------------
1448# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1449ac_fn_c_try_cpp ()
1450{
1451 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1452 if { { ac_try="$ac_cpp conftest.$ac_ext"
1453case "(($ac_try" in
1454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1455 *) ac_try_echo=$ac_try;;
1456esac
1457eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1458$as_echo "$ac_try_echo"; } >&5
1459 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1460 ac_status=$?
1461 if test -s conftest.err; then
1462 grep -v '^ *+' conftest.err >conftest.er1
1463 cat conftest.er1 >&5
1464 mv -f conftest.er1 conftest.err
1465 fi
1466 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1467 test $ac_status = 0; } >/dev/null && {
1468 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1469 test ! -s conftest.err
1470 }; then :
1471 ac_retval=0
1472else
1473 $as_echo "$as_me: failed program was:" >&5
1474sed 's/^/| /' conftest.$ac_ext >&5
238235ef 1475
5213506e
RW
1476 ac_retval=1
1477fi
1478 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1479 return $ac_retval
238235ef 1480
5213506e 1481} # ac_fn_c_try_cpp
238235ef 1482
f50f17e6
YJ
1483# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1484# -------------------------------------------------------
1485# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1486# the include files in INCLUDES and setting the cache variable VAR
1487# accordingly.
1488ac_fn_c_check_header_mongrel ()
1489{
1490 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1491 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1493$as_echo_n "checking for $2... " >&6; }
1494if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1495 $as_echo_n "(cached) " >&6
1496fi
1497eval ac_res=\$$3
1498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1499$as_echo "$ac_res" >&6; }
1500else
1501 # Is the header compilable?
1502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1503$as_echo_n "checking $2 usability... " >&6; }
1504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1505/* end confdefs.h. */
1506$4
1507#include <$2>
1508_ACEOF
1509if ac_fn_c_try_compile "$LINENO"; then :
1510 ac_header_compiler=yes
1511else
1512 ac_header_compiler=no
1513fi
1514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1516$as_echo "$ac_header_compiler" >&6; }
1517
1518# Is the header present?
1519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1520$as_echo_n "checking $2 presence... " >&6; }
1521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1522/* end confdefs.h. */
1523#include <$2>
1524_ACEOF
1525if ac_fn_c_try_cpp "$LINENO"; then :
1526 ac_header_preproc=yes
1527else
1528 ac_header_preproc=no
1529fi
1530rm -f conftest.err conftest.$ac_ext
1531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1532$as_echo "$ac_header_preproc" >&6; }
1533
1534# So? What about this header?
1535case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1536 yes:no: )
1537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1538$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1539 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1540$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1541 ;;
1542 no:yes:* )
1543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1544$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1546$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1548$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1550$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1552$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1553 ;;
1554esac
1555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1556$as_echo_n "checking for $2... " >&6; }
1557if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1558 $as_echo_n "(cached) " >&6
1559else
1560 eval "$3=\$ac_header_compiler"
1561fi
1562eval ac_res=\$$3
1563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1564$as_echo "$ac_res" >&6; }
1565fi
1566 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1567
1568} # ac_fn_c_check_header_mongrel
1569
5213506e
RW
1570# ac_fn_c_try_run LINENO
1571# ----------------------
1572# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1573# that executables *can* be run.
1574ac_fn_c_try_run ()
1575{
1576 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1577 if { { ac_try="$ac_link"
1578case "(($ac_try" in
1579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1580 *) ac_try_echo=$ac_try;;
1581esac
1582eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1583$as_echo "$ac_try_echo"; } >&5
1584 (eval "$ac_link") 2>&5
1585 ac_status=$?
1586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1587 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1588 { { case "(($ac_try" in
1589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590 *) ac_try_echo=$ac_try;;
1591esac
1592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593$as_echo "$ac_try_echo"; } >&5
1594 (eval "$ac_try") 2>&5
1595 ac_status=$?
1596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1597 test $ac_status = 0; }; }; then :
1598 ac_retval=0
1599else
1600 $as_echo "$as_me: program exited with status $ac_status" >&5
1601 $as_echo "$as_me: failed program was:" >&5
1602sed 's/^/| /' conftest.$ac_ext >&5
238235ef 1603
5213506e
RW
1604 ac_retval=$ac_status
1605fi
1606 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1607 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1608 return $ac_retval
238235ef 1609
5213506e 1610} # ac_fn_c_try_run
0bc0cd11 1611
f50f17e6
YJ
1612# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1613# -------------------------------------------------------
1614# Tests whether HEADER exists and can be compiled using the include files in
1615# INCLUDES, setting the cache variable VAR accordingly.
1616ac_fn_c_check_header_compile ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1620$as_echo_n "checking for $2... " >&6; }
1621if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1622 $as_echo_n "(cached) " >&6
1623else
1624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1625/* end confdefs.h. */
1626$4
1627#include <$2>
1628_ACEOF
1629if ac_fn_c_try_compile "$LINENO"; then :
1630 eval "$3=yes"
1631else
1632 eval "$3=no"
1633fi
1634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1635fi
1636eval ac_res=\$$3
1637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1638$as_echo "$ac_res" >&6; }
1639 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1640
1641} # ac_fn_c_check_header_compile
1642
5213506e
RW
1643# ac_fn_c_check_header_preproc LINENO HEADER VAR
1644# ----------------------------------------------
1645# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1646ac_fn_c_check_header_preproc ()
1647{
1648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1650$as_echo_n "checking for $2... " >&6; }
1651if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1652 $as_echo_n "(cached) " >&6
1653else
1654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1655/* end confdefs.h. */
1656#include <$2>
238235ef 1657_ACEOF
5213506e
RW
1658if ac_fn_c_try_cpp "$LINENO"; then :
1659 eval "$3=yes"
1660else
1661 eval "$3=no"
1662fi
1663rm -f conftest.err conftest.$ac_ext
1664fi
1665eval ac_res=\$$3
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1667$as_echo "$ac_res" >&6; }
1668 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
238235ef 1669
5213506e 1670} # ac_fn_c_check_header_preproc
238235ef 1671
5213506e
RW
1672# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1673# --------------------------------------------
1674# Tries to find the compile-time value of EXPR in a program that includes
1675# INCLUDES, setting VAR accordingly. Returns whether the value could be
1676# computed
1677ac_fn_c_compute_int ()
1678{
1679 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1680 if test "$cross_compiling" = yes; then
1681 # Depending upon the size, compute the lo and hi bounds.
1682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1683/* end confdefs.h. */
1684$4
1685int
1686main ()
1687{
1688static int test_array [1 - 2 * !(($2) >= 0)];
1689test_array [0] = 0
238235ef 1690
5213506e
RW
1691 ;
1692 return 0;
1693}
1694_ACEOF
1695if ac_fn_c_try_compile "$LINENO"; then :
1696 ac_lo=0 ac_mid=0
1697 while :; do
1698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1699/* end confdefs.h. */
1700$4
1701int
1702main ()
238235ef 1703{
5213506e
RW
1704static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1705test_array [0] = 0
1706
1707 ;
1708 return 0;
238235ef 1709}
5213506e
RW
1710_ACEOF
1711if ac_fn_c_try_compile "$LINENO"; then :
1712 ac_hi=$ac_mid; break
1713else
1714 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1715 if test $ac_lo -le $ac_mid; then
1716 ac_lo= ac_hi=
1717 break
1718 fi
1719 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1720fi
1721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1722 done
1723else
1724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1725/* end confdefs.h. */
1726$4
1727int
1728main ()
1729{
1730static int test_array [1 - 2 * !(($2) < 0)];
1731test_array [0] = 0
238235ef 1732
5213506e
RW
1733 ;
1734 return 0;
1735}
1736_ACEOF
1737if ac_fn_c_try_compile "$LINENO"; then :
1738 ac_hi=-1 ac_mid=-1
1739 while :; do
1740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742$4
1743int
1744main ()
1745{
1746static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1747test_array [0] = 0
238235ef 1748
5213506e
RW
1749 ;
1750 return 0;
1751}
1752_ACEOF
1753if ac_fn_c_try_compile "$LINENO"; then :
1754 ac_lo=$ac_mid; break
1755else
1756 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1757 if test $ac_mid -le $ac_hi; then
1758 ac_lo= ac_hi=
1759 break
1760 fi
1761 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1762fi
1763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1764 done
1765else
1766 ac_lo= ac_hi=
1767fi
1768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1769fi
1770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1771# Binary search between lo and hi bounds.
1772while test "x$ac_lo" != "x$ac_hi"; do
1773 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775/* end confdefs.h. */
1776$4
1777int
1778main ()
1779{
1780static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1781test_array [0] = 0
238235ef 1782
5213506e
RW
1783 ;
1784 return 0;
1785}
1786_ACEOF
1787if ac_fn_c_try_compile "$LINENO"; then :
1788 ac_hi=$ac_mid
1789else
1790 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1791fi
1792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef 1793done
5213506e
RW
1794case $ac_lo in #((
1795?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1796'') ac_retval=1 ;;
1797esac
1798 else
1799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1800/* end confdefs.h. */
1801$4
1802static long int longval () { return $2; }
1803static unsigned long int ulongval () { return $2; }
1804#include <stdio.h>
1805#include <stdlib.h>
1806int
1807main ()
1808{
238235ef 1809
5213506e
RW
1810 FILE *f = fopen ("conftest.val", "w");
1811 if (! f)
1812 return 1;
1813 if (($2) < 0)
1814 {
1815 long int i = longval ();
1816 if (i != ($2))
1817 return 1;
1818 fprintf (f, "%ld", i);
1819 }
1820 else
1821 {
1822 unsigned long int i = ulongval ();
1823 if (i != ($2))
1824 return 1;
1825 fprintf (f, "%lu", i);
1826 }
1827 /* Do not output a trailing newline, as this causes \r\n confusion
1828 on some platforms. */
1829 return ferror (f) || fclose (f) != 0;
238235ef 1830
5213506e
RW
1831 ;
1832 return 0;
1833}
238235ef 1834_ACEOF
5213506e
RW
1835if ac_fn_c_try_run "$LINENO"; then :
1836 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1837else
1838 ac_retval=1
1839fi
1840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1841 conftest.$ac_objext conftest.beam conftest.$ac_ext
1842rm -f conftest.val
238235ef 1843
5213506e
RW
1844 fi
1845 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1846 return $ac_retval
238235ef 1847
5213506e 1848} # ac_fn_c_compute_int
238235ef 1849
5213506e
RW
1850# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1851# -------------------------------------------
1852# Tests whether TYPE exists after having included INCLUDES, setting cache
1853# variable VAR accordingly.
1854ac_fn_c_check_type ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
1859if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1860 $as_echo_n "(cached) " >&6
1861else
1862 eval "$3=no"
1863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864/* end confdefs.h. */
1865$4
1866int
1867main ()
1868{
1869if (sizeof ($2))
1870 return 0;
1871 ;
1872 return 0;
1873}
238235ef 1874_ACEOF
5213506e
RW
1875if ac_fn_c_try_compile "$LINENO"; then :
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$4
1879int
1880main ()
1881{
1882if (sizeof (($2)))
1883 return 0;
1884 ;
1885 return 0;
1886}
238235ef 1887_ACEOF
5213506e 1888if ac_fn_c_try_compile "$LINENO"; then :
238235ef 1889
5213506e
RW
1890else
1891 eval "$3=yes"
1892fi
1893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1894fi
1895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1896fi
1897eval ac_res=\$$3
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899$as_echo "$ac_res" >&6; }
1900 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
238235ef 1901
5213506e 1902} # ac_fn_c_check_type
238235ef 1903
5213506e
RW
1904# ac_fn_c_try_link LINENO
1905# -----------------------
1906# Try to link conftest.$ac_ext, and return whether this succeeded.
1907ac_fn_c_try_link ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 rm -f conftest.$ac_objext conftest$ac_exeext
1911 if { { ac_try="$ac_link"
1912case "(($ac_try" in
1913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1914 *) ac_try_echo=$ac_try;;
1915esac
1916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1917$as_echo "$ac_try_echo"; } >&5
1918 (eval "$ac_link") 2>conftest.err
1919 ac_status=$?
1920 if test -s conftest.err; then
1921 grep -v '^ *+' conftest.err >conftest.er1
1922 cat conftest.er1 >&5
1923 mv -f conftest.er1 conftest.err
0bc0cd11 1924 fi
5213506e
RW
1925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1926 test $ac_status = 0; } && {
1927 test -z "$ac_c_werror_flag" ||
1928 test ! -s conftest.err
1929 } && test -s conftest$ac_exeext && {
1930 test "$cross_compiling" = yes ||
1931 $as_test_x conftest$ac_exeext
1932 }; then :
1933 ac_retval=0
1934else
1935 $as_echo "$as_me: failed program was:" >&5
1936sed 's/^/| /' conftest.$ac_ext >&5
1937
1938 ac_retval=1
0bc0cd11 1939fi
5213506e
RW
1940 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1941 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1942 # interfere with the next link command; also delete a directory that is
1943 # left behind by Apple's compiler. We do this before executing the actions.
1944 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1945 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946 return $ac_retval
0bc0cd11 1947
5213506e
RW
1948} # ac_fn_c_try_link
1949
1950# ac_fn_c_check_func LINENO FUNC VAR
1951# ----------------------------------
1952# Tests whether FUNC exists, setting the cache variable VAR accordingly
1953ac_fn_c_check_func ()
1954{
1955 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1957$as_echo_n "checking for $2... " >&6; }
1958if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1959 $as_echo_n "(cached) " >&6
0bc0cd11 1960else
5213506e
RW
1961 if test x$gcc_no_link = xyes; then
1962 as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
238235ef 1963fi
5213506e
RW
1964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
0e0f02ff
RW
1966/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1967 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1968#define $2 innocuous_$2
1969
5213506e
RW
1970/* System header to define __stub macros and hopefully few prototypes,
1971 which can conflict with char $2 (); below.
1972 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
0e0f02ff
RW
1973 <limits.h> exists even on freestanding compilers. */
1974
1975#ifdef __STDC__
5213506e
RW
1976# include <limits.h>
1977#else
1978# include <assert.h>
1979#endif
0e0f02ff
RW
1980
1981#undef $2
1982
1983/* Override any GCC internal prototype to avoid an error.
1984 Use char because int might match the return type of a GCC
1985 builtin and then its argument prototype would still apply. */
5213506e
RW
1986#ifdef __cplusplus
1987extern "C"
5213506e 1988#endif
5213506e
RW
1989char $2 ();
1990/* The GNU C library defines this for functions which it implements
1991 to always fail with ENOSYS. Some functions are actually named
1992 something starting with __ and the normal name is an alias. */
0e0f02ff 1993#if defined __stub_$2 || defined __stub___$2
5213506e 1994choke me
5213506e 1995#endif
238235ef 1996
5213506e
RW
1997int
1998main ()
1999{
0e0f02ff 2000return $2 ();
5213506e
RW
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_link "$LINENO"; then :
2006 eval "$3=yes"
2007else
2008 eval "$3=no"
0bc0cd11 2009fi
5213506e
RW
2010rm -f core conftest.err conftest.$ac_objext \
2011 conftest$ac_exeext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
2016 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
0bc0cd11 2017
5213506e 2018} # ac_fn_c_check_func
0bc0cd11 2019
5213506e
RW
2020# ac_fn_c_check_decl LINENO SYMBOL VAR
2021# ------------------------------------
2022# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2023ac_fn_c_check_decl ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
c3f247f4
RW
2026 as_decl_name=`echo $2|sed 's/ *(.*//'`
2027 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2029$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
5213506e
RW
2030if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2031 $as_echo_n "(cached) " >&6
2032else
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main ()
2038{
c3f247f4
RW
2039#ifndef $as_decl_name
2040#ifdef __cplusplus
2041 (void) $as_decl_use;
2042#else
2043 (void) $as_decl_name;
2044#endif
5213506e 2045#endif
0bc0cd11 2046
5213506e
RW
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 eval "$3=yes"
2053else
2054 eval "$3=no"
2055fi
2056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2057fi
2058eval ac_res=\$$3
2059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2060$as_echo "$ac_res" >&6; }
2061 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
0bc0cd11 2062
5213506e
RW
2063} # ac_fn_c_check_decl
2064cat >config.log <<_ACEOF
2065This file contains any messages produced by compilers while
2066running configure, to aid debugging if configure makes a mistake.
6706f116 2067
5213506e
RW
2068It was created by $as_me, which was
2069generated by GNU Autoconf 2.64. Invocation command line was
0bc0cd11 2070
5213506e 2071 $ $0 $@
238235ef 2072
5213506e
RW
2073_ACEOF
2074exec 5>>config.log
2075{
2076cat <<_ASUNAME
2077## --------- ##
2078## Platform. ##
2079## --------- ##
238235ef 2080
5213506e
RW
2081hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2082uname -m = `(uname -m) 2>/dev/null || echo unknown`
2083uname -r = `(uname -r) 2>/dev/null || echo unknown`
2084uname -s = `(uname -s) 2>/dev/null || echo unknown`
2085uname -v = `(uname -v) 2>/dev/null || echo unknown`
238235ef 2086
5213506e
RW
2087/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2088/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
238235ef 2089
5213506e
RW
2090/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2091/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2092/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2093/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2094/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2095/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2096/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
238235ef 2097
5213506e 2098_ASUNAME
238235ef 2099
5213506e
RW
2100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2101for as_dir in $PATH
2102do
2103 IFS=$as_save_IFS
2104 test -z "$as_dir" && as_dir=.
2105 $as_echo "PATH: $as_dir"
2106 done
2107IFS=$as_save_IFS
238235ef 2108
5213506e 2109} >&5
238235ef 2110
5213506e 2111cat >&5 <<_ACEOF
238235ef
DJ
2112
2113
5213506e
RW
2114## ----------- ##
2115## Core tests. ##
2116## ----------- ##
238235ef 2117
5213506e 2118_ACEOF
238235ef 2119
18c04407 2120
5213506e
RW
2121# Keep a trace of the command line.
2122# Strip out --no-create and --no-recursion so they do not pile up.
2123# Strip out --silent because we don't want to record it for future runs.
2124# Also quote any args containing shell meta-characters.
2125# Make two passes to allow for proper duplicate-argument suppression.
2126ac_configure_args=
2127ac_configure_args0=
2128ac_configure_args1=
2129ac_must_keep_next=false
2130for ac_pass in 1 2
2131do
2132 for ac_arg
2133 do
2134 case $ac_arg in
2135 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2137 | -silent | --silent | --silen | --sile | --sil)
2138 continue ;;
2139 *\'*)
2140 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2141 esac
2142 case $ac_pass in
2143 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2144 2)
2145 as_fn_append ac_configure_args1 " '$ac_arg'"
2146 if test $ac_must_keep_next = true; then
2147 ac_must_keep_next=false # Got value, back to normal.
2148 else
2149 case $ac_arg in
2150 *=* | --config-cache | -C | -disable-* | --disable-* \
2151 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2152 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2153 | -with-* | --with-* | -without-* | --without-* | --x)
2154 case "$ac_configure_args0 " in
2155 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2156 esac
2157 ;;
2158 -* ) ac_must_keep_next=true ;;
2159 esac
2160 fi
2161 as_fn_append ac_configure_args " '$ac_arg'"
2162 ;;
2163 esac
2164 done
2165done
2166{ ac_configure_args0=; unset ac_configure_args0;}
2167{ ac_configure_args1=; unset ac_configure_args1;}
18c04407 2168
5213506e
RW
2169# When interrupted or exit'd, cleanup temporary files, and complete
2170# config.log. We remove comments because anyway the quotes in there
2171# would cause problems or look ugly.
2172# WARNING: Use '\'' to represent an apostrophe within the trap.
2173# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2174trap 'exit_status=$?
2175 # Save into config.log some information that might help in debugging.
2176 {
2177 echo
18c04407 2178
5213506e
RW
2179 cat <<\_ASBOX
2180## ---------------- ##
2181## Cache variables. ##
2182## ---------------- ##
2183_ASBOX
2184 echo
2185 # The following way of writing the cache mishandles newlines in values,
2186(
2187 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2188 eval ac_val=\$$ac_var
2189 case $ac_val in #(
2190 *${as_nl}*)
2191 case $ac_var in #(
2192 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2193$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2194 esac
2195 case $ac_var in #(
2196 _ | IFS | as_nl) ;; #(
2197 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2198 *) { eval $ac_var=; unset $ac_var;} ;;
2199 esac ;;
2200 esac
2201 done
2202 (set) 2>&1 |
2203 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2204 *${as_nl}ac_space=\ *)
2205 sed -n \
2206 "s/'\''/'\''\\\\'\'''\''/g;
2207 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2208 ;; #(
2209 *)
2210 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2211 ;;
2212 esac |
2213 sort
2214)
2215 echo
238235ef 2216
5213506e
RW
2217 cat <<\_ASBOX
2218## ----------------- ##
2219## Output variables. ##
2220## ----------------- ##
2221_ASBOX
2222 echo
2223 for ac_var in $ac_subst_vars
2224 do
2225 eval ac_val=\$$ac_var
2226 case $ac_val in
2227 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2228 esac
2229 $as_echo "$ac_var='\''$ac_val'\''"
2230 done | sort
2231 echo
238235ef 2232
5213506e
RW
2233 if test -n "$ac_subst_files"; then
2234 cat <<\_ASBOX
2235## ------------------- ##
2236## File substitutions. ##
2237## ------------------- ##
2238_ASBOX
2239 echo
2240 for ac_var in $ac_subst_files
2241 do
2242 eval ac_val=\$$ac_var
2243 case $ac_val in
2244 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2245 esac
2246 $as_echo "$ac_var='\''$ac_val'\''"
2247 done | sort
2248 echo
2249 fi
9bf3c9cc 2250
5213506e
RW
2251 if test -s confdefs.h; then
2252 cat <<\_ASBOX
2253## ----------- ##
2254## confdefs.h. ##
2255## ----------- ##
2256_ASBOX
2257 echo
2258 cat confdefs.h
2259 echo
2260 fi
2261 test "$ac_signal" != 0 &&
2262 $as_echo "$as_me: caught signal $ac_signal"
2263 $as_echo "$as_me: exit $exit_status"
2264 } >&5
2265 rm -f core *.core core.conftest.* &&
2266 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2267 exit $exit_status
2268' 0
2269for ac_signal in 1 2 13 15; do
2270 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2271done
2272ac_signal=0
238235ef 2273
5213506e
RW
2274# confdefs.h avoids OS command line length limits that DEFS can exceed.
2275rm -f -r conftest* confdefs.h
238235ef 2276
5213506e 2277$as_echo "/* confdefs.h */" > confdefs.h
238235ef 2278
5213506e 2279# Predefined preprocessor variables.
238235ef 2280
5213506e
RW
2281cat >>confdefs.h <<_ACEOF
2282#define PACKAGE_NAME "$PACKAGE_NAME"
2283_ACEOF
238235ef 2284
5213506e
RW
2285cat >>confdefs.h <<_ACEOF
2286#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2287_ACEOF
238235ef 2288
5213506e
RW
2289cat >>confdefs.h <<_ACEOF
2290#define PACKAGE_VERSION "$PACKAGE_VERSION"
2291_ACEOF
cd862df8 2292
5213506e
RW
2293cat >>confdefs.h <<_ACEOF
2294#define PACKAGE_STRING "$PACKAGE_STRING"
2295_ACEOF
238235ef 2296
5213506e
RW
2297cat >>confdefs.h <<_ACEOF
2298#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2299_ACEOF
ca6b370d 2300
5213506e
RW
2301cat >>confdefs.h <<_ACEOF
2302#define PACKAGE_URL "$PACKAGE_URL"
2303_ACEOF
0bc0cd11
JL
2304
2305
5213506e
RW
2306# Let the site file select an alternate cache file if it wants to.
2307# Prefer an explicitly selected file to automatically selected ones.
2308ac_site_file1=NONE
2309ac_site_file2=NONE
2310if test -n "$CONFIG_SITE"; then
2311 ac_site_file1=$CONFIG_SITE
2312elif test "x$prefix" != xNONE; then
2313 ac_site_file1=$prefix/share/config.site
2314 ac_site_file2=$prefix/etc/config.site
2315else
2316 ac_site_file1=$ac_default_prefix/share/config.site
2317 ac_site_file2=$ac_default_prefix/etc/config.site
2318fi
2319for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2320do
2321 test "x$ac_site_file" = xNONE && continue
2322 if test -r "$ac_site_file"; then
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2324$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2325 sed 's/^/| /' "$ac_site_file" >&5
2326 . "$ac_site_file"
2327 fi
2328done
2329
2330if test -r "$cache_file"; then
2331 # Some versions of bash will fail to source /dev/null (special
2332 # files actually), so we avoid doing that.
2333 if test -f "$cache_file"; then
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2335$as_echo "$as_me: loading cache $cache_file" >&6;}
2336 case $cache_file in
2337 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2338 *) . "./$cache_file";;
2339 esac
2340 fi
2341else
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2343$as_echo "$as_me: creating cache $cache_file" >&6;}
2344 >$cache_file
2345fi
2346
2347# Check that the precious variables saved in the cache have kept the same
2348# value.
2349ac_cache_corrupted=false
2350for ac_var in $ac_precious_vars; do
2351 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2352 eval ac_new_set=\$ac_env_${ac_var}_set
2353 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2354 eval ac_new_val=\$ac_env_${ac_var}_value
2355 case $ac_old_set,$ac_new_set in
2356 set,)
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2358$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2359 ac_cache_corrupted=: ;;
2360 ,set)
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2362$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2363 ac_cache_corrupted=: ;;
2364 ,);;
2365 *)
2366 if test "x$ac_old_val" != "x$ac_new_val"; then
2367 # differences in whitespace do not lead to failure.
2368 ac_old_val_w=`echo x $ac_old_val`
2369 ac_new_val_w=`echo x $ac_new_val`
2370 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2372$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2373 ac_cache_corrupted=:
2374 else
2375 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2376$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2377 eval $ac_var=\$ac_old_val
2378 fi
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2380$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2381 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2382$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2383 fi;;
2384 esac
2385 # Pass precious variables to config.status.
2386 if test "$ac_new_set" = set; then
2387 case $ac_new_val in
2388 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2389 *) ac_arg=$ac_var=$ac_new_val ;;
2390 esac
2391 case " $ac_configure_args " in
2392 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2393 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2394 esac
2395 fi
2396done
2397if $ac_cache_corrupted; then
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2399$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2401$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2402 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2403fi
2404## -------------------- ##
2405## Main body of script. ##
2406## -------------------- ##
2407
2408ac_ext=c
2409ac_cpp='$CPP $CPPFLAGS'
2410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2412ac_compiler_gnu=$ac_cv_c_compiler_gnu
2413
2414
2415
2416
2417
2418
2419
2420# This works around the fact that libtool configuration may change LD
2421# for this particular configuration, but some shells, instead of
2422# keeping the changes in LD private, export them just because LD is
2423# exported. We don't use libtool yet, but some day we might, so...
2424ORIGINAL_LD_FOR_MULTILIBS=$LD
2425
2426
2427# Check whether --with-target-subdir was given.
2428if test "${with_target_subdir+set}" = set; then :
2429 withval=$with_target_subdir;
2430fi
2431
2432
2433# Check whether --with-build-subdir was given.
2434if test "${with_build_subdir+set}" = set; then :
2435 withval=$with_build_subdir;
2436fi
2437
2438
2439# Check whether --with-cross-host was given.
2440if test "${with_cross_host+set}" = set; then :
2441 withval=$with_cross_host;
2442fi
2443
2444
2445# Check whether --with-newlib was given.
2446if test "${with_newlib+set}" = set; then :
2447 withval=$with_newlib;
2448fi
2449
2450
2451if test "${srcdir}" = "."; then
2452 if test -n "${with_build_subdir}"; then
2453 libiberty_topdir="${srcdir}/../.."
cd862df8
L
2454 with_target_subdir=
2455 elif test -z "${with_target_subdir}"; then
0bc0cd11
JL
2456 libiberty_topdir="${srcdir}/.."
2457 else
2458 if test "${with_target_subdir}" != "."; then
2459 libiberty_topdir="${srcdir}/${with_multisrctop}../.."
2460 else
2461 libiberty_topdir="${srcdir}/${with_multisrctop}.."
2462 fi
2463 fi
2464else
2465 libiberty_topdir="${srcdir}/.."
2466fi
d8c22ce7 2467
0bc0cd11 2468ac_aux_dir=
5213506e
RW
2469for ac_dir in $libiberty_topdir "$srcdir"/$libiberty_topdir; do
2470 for ac_t in install-sh install.sh shtool; do
2471 if test -f "$ac_dir/$ac_t"; then
2472 ac_aux_dir=$ac_dir
2473 ac_install_sh="$ac_aux_dir/$ac_t -c"
2474 break 2
2475 fi
2476 done
0bc0cd11
JL
2477done
2478if test -z "$ac_aux_dir"; then
5213506e 2479 as_fn_error "cannot find install-sh, install.sh, or shtool in $libiberty_topdir \"$srcdir\"/$libiberty_topdir" "$LINENO" 5
0bc0cd11 2480fi
0bc0cd11 2481
5213506e
RW
2482# These three variables are undocumented and unsupported,
2483# and are intended to be withdrawn in a future Autoconf release.
2484# They can cause serious problems if a builder's source tree is in a directory
2485# whose full name contains unusual characters.
2486ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2487ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2488ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
0bc0cd11
JL
2489
2490
5213506e
RW
2491
2492
2493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2494$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2495 # Check whether --enable-maintainer-mode was given.
2496if test "${enable_maintainer_mode+set}" = set; then :
2497 enableval=$enable_maintainer_mode; maintainer_mode=$enableval
aaa5f039
DD
2498else
2499 maintainer_mode=no
5213506e 2500fi
aaa5f039 2501
5213506e
RW
2502
2503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $maintainer_mode" >&5
2504$as_echo "$maintainer_mode" >&6; }
aaa5f039
DD
2505
2506if test "$maintainer_mode" = "yes"; then
2507 MAINT=''
2508 NOTMAINT='#'
2509else
2510 MAINT='#'
2511 NOTMAINT=''
2512fi
2513
0e30ffc5
DD
2514# Do we have a single-tree copy of texinfo? Even if we do, we can't
2515# rely on it - libiberty is built before texinfo.
2516# Extract the first word of "makeinfo", so it can be a program name with args.
aaa5f039 2517set dummy makeinfo; ac_word=$2
5213506e
RW
2518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2519$as_echo_n "checking for $ac_word... " >&6; }
2520if test "${ac_cv_prog_MAKEINFO+set}" = set; then :
2521 $as_echo_n "(cached) " >&6
aaa5f039
DD
2522else
2523 if test -n "$MAKEINFO"; then
2524 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
2525else
238235ef
DJ
2526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
5213506e
RW
2531 for ac_exec_ext in '' $ac_executable_extensions; do
2532 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 2533 ac_cv_prog_MAKEINFO="makeinfo"
5213506e 2534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
2535 break 2
2536 fi
2537done
5213506e
RW
2538 done
2539IFS=$as_save_IFS
238235ef 2540
aaa5f039
DD
2541fi
2542fi
238235ef 2543MAKEINFO=$ac_cv_prog_MAKEINFO
aaa5f039 2544if test -n "$MAKEINFO"; then
5213506e
RW
2545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
2546$as_echo "$MAKEINFO" >&6; }
aaa5f039 2547else
5213506e
RW
2548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2549$as_echo "no" >&6; }
aaa5f039
DD
2550fi
2551
5213506e 2552
f749bd83
AM
2553if test "x$MAKEINFO" = "x"; then
2554 MAKEINFO="@echo makeinfo missing; true"
0e30ffc5 2555 BUILD_INFO=
f749bd83
AM
2556else
2557 BUILD_INFO=info
c0590bfd
L
2558 case "$MAKEINFO" in
2559 */missing\ makeinfo*)
f749bd83 2560 BUILD_INFO=
5213506e 2561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
c0590bfd 2562*** Makeinfo is missing. Info documentation will not be built." >&5
5213506e 2563$as_echo "$as_me: WARNING:
c0590bfd
L
2564*** Makeinfo is missing. Info documentation will not be built." >&2;}
2565 ;;
2566 *)
2567 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
2568 x*\ [1-3].* )
2569 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
2570 BUILD_INFO=
5213506e 2571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
238235ef 2572*** Makeinfo is too old. Info documentation will not be built." >&5
5213506e 2573$as_echo "$as_me: WARNING:
238235ef 2574*** Makeinfo is too old. Info documentation will not be built." >&2;}
c0590bfd
L
2575 ;;
2576 esac
f749bd83
AM
2577 ;;
2578 esac
2579fi
0e30ffc5 2580
aaa5f039
DD
2581
2582
2583# Extract the first word of "perl", so it can be a program name with args.
2584set dummy perl; ac_word=$2
5213506e
RW
2585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2586$as_echo_n "checking for $ac_word... " >&6; }
2587if test "${ac_cv_prog_PERL+set}" = set; then :
2588 $as_echo_n "(cached) " >&6
aaa5f039
DD
2589else
2590 if test -n "$PERL"; then
2591 ac_cv_prog_PERL="$PERL" # Let the user override the test.
2592else
238235ef
DJ
2593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2594for as_dir in $PATH
2595do
2596 IFS=$as_save_IFS
2597 test -z "$as_dir" && as_dir=.
5213506e
RW
2598 for ac_exec_ext in '' $ac_executable_extensions; do
2599 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 2600 ac_cv_prog_PERL="perl"
5213506e 2601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
2602 break 2
2603 fi
2604done
5213506e
RW
2605 done
2606IFS=$as_save_IFS
238235ef 2607
aaa5f039
DD
2608fi
2609fi
238235ef 2610PERL=$ac_cv_prog_PERL
aaa5f039 2611if test -n "$PERL"; then
5213506e
RW
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
2613$as_echo "$PERL" >&6; }
aaa5f039 2614else
5213506e
RW
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2616$as_echo "no" >&6; }
aaa5f039
DD
2617fi
2618
5213506e 2619
aaa5f039
DD
2620if test x"$PERL" = x""; then
2621 HAVE_PERL='#'
2622else
2623 HAVE_PERL=''
2624fi
2625
2626
0bc0cd11 2627# Make sure we can run config.sub.
5213506e
RW
2628$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2629 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2630
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2632$as_echo_n "checking build system type... " >&6; }
2633if test "${ac_cv_build+set}" = set; then :
2634 $as_echo_n "(cached) " >&6
2635else
2636 ac_build_alias=$build_alias
2637test "x$ac_build_alias" = x &&
2638 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2639test "x$ac_build_alias" = x &&
2640 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2641ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2642 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2643
2644fi
2645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2646$as_echo "$ac_cv_build" >&6; }
2647case $ac_cv_build in
2648*-*-*) ;;
2649*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2650esac
238235ef 2651build=$ac_cv_build
5213506e
RW
2652ac_save_IFS=$IFS; IFS='-'
2653set x $ac_cv_build
2654shift
2655build_cpu=$1
2656build_vendor=$2
2657shift; shift
2658# Remember, the first character of IFS is used to create $*,
2659# except with old shells:
2660build_os=$*
2661IFS=$ac_save_IFS
2662case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
0bc0cd11
JL
2663
2664
5213506e
RW
2665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2666$as_echo_n "checking host system type... " >&6; }
2667if test "${ac_cv_host+set}" = set; then :
2668 $as_echo_n "(cached) " >&6
238235ef 2669else
5213506e
RW
2670 if test "x$host_alias" = x; then
2671 ac_cv_host=$ac_cv_build
2672else
2673 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2674 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2675fi
0bc0cd11 2676
238235ef 2677fi
5213506e
RW
2678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2679$as_echo "$ac_cv_host" >&6; }
2680case $ac_cv_host in
2681*-*-*) ;;
2682*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2683esac
238235ef 2684host=$ac_cv_host
5213506e
RW
2685ac_save_IFS=$IFS; IFS='-'
2686set x $ac_cv_host
2687shift
2688host_cpu=$1
2689host_vendor=$2
2690shift; shift
2691# Remember, the first character of IFS is used to create $*,
2692# except with old shells:
2693host_os=$*
2694IFS=$ac_save_IFS
2695case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
0bc0cd11 2696
0bc0cd11 2697
0bc0cd11 2698
0bc0cd11 2699
238235ef
DJ
2700if test -n "$ac_tool_prefix"; then
2701 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
0bc0cd11 2702set dummy ${ac_tool_prefix}ar; ac_word=$2
5213506e
RW
2703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2704$as_echo_n "checking for $ac_word... " >&6; }
2705if test "${ac_cv_prog_AR+set}" = set; then :
2706 $as_echo_n "(cached) " >&6
0bc0cd11
JL
2707else
2708 if test -n "$AR"; then
2709 ac_cv_prog_AR="$AR" # Let the user override the test.
2710else
238235ef
DJ
2711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2712for as_dir in $PATH
2713do
2714 IFS=$as_save_IFS
2715 test -z "$as_dir" && as_dir=.
5213506e
RW
2716 for ac_exec_ext in '' $ac_executable_extensions; do
2717 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 2718 ac_cv_prog_AR="${ac_tool_prefix}ar"
5213506e 2719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
2720 break 2
2721 fi
2722done
5213506e
RW
2723 done
2724IFS=$as_save_IFS
238235ef 2725
0bc0cd11
JL
2726fi
2727fi
238235ef 2728AR=$ac_cv_prog_AR
0bc0cd11 2729if test -n "$AR"; then
5213506e
RW
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
2731$as_echo "$AR" >&6; }
0bc0cd11 2732else
5213506e
RW
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2734$as_echo "no" >&6; }
238235ef
DJ
2735fi
2736
5213506e 2737
0bc0cd11 2738fi
238235ef
DJ
2739if test -z "$ac_cv_prog_AR"; then
2740 ac_ct_AR=$AR
2741 # Extract the first word of "ar", so it can be a program name with args.
2742set dummy ar; ac_word=$2
5213506e
RW
2743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2744$as_echo_n "checking for $ac_word... " >&6; }
2745if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
2746 $as_echo_n "(cached) " >&6
238235ef
DJ
2747else
2748 if test -n "$ac_ct_AR"; then
2749 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
2750else
2751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2752for as_dir in $PATH
2753do
2754 IFS=$as_save_IFS
2755 test -z "$as_dir" && as_dir=.
5213506e
RW
2756 for ac_exec_ext in '' $ac_executable_extensions; do
2757 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 2758 ac_cv_prog_ac_ct_AR="ar"
5213506e 2759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
2760 break 2
2761 fi
2762done
5213506e
RW
2763 done
2764IFS=$as_save_IFS
0bc0cd11 2765
238235ef
DJ
2766fi
2767fi
2768ac_ct_AR=$ac_cv_prog_ac_ct_AR
2769if test -n "$ac_ct_AR"; then
5213506e
RW
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
2771$as_echo "$ac_ct_AR" >&6; }
238235ef 2772else
5213506e
RW
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2774$as_echo "no" >&6; }
238235ef 2775fi
0bc0cd11 2776
5213506e
RW
2777 if test "x$ac_ct_AR" = x; then
2778 AR=""
2779 else
2780 case $cross_compiling:$ac_tool_warned in
2781yes:)
2782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2784ac_tool_warned=yes ;;
2785esac
2786 AR=$ac_ct_AR
2787 fi
238235ef
DJ
2788else
2789 AR="$ac_cv_prog_AR"
2790fi
0bc0cd11 2791
238235ef
DJ
2792if test -n "$ac_tool_prefix"; then
2793 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
0bc0cd11 2794set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5213506e
RW
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2796$as_echo_n "checking for $ac_word... " >&6; }
2797if test "${ac_cv_prog_RANLIB+set}" = set; then :
2798 $as_echo_n "(cached) " >&6
0bc0cd11
JL
2799else
2800 if test -n "$RANLIB"; then
2801 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2802else
238235ef
DJ
2803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2804for as_dir in $PATH
2805do
2806 IFS=$as_save_IFS
2807 test -z "$as_dir" && as_dir=.
5213506e
RW
2808 for ac_exec_ext in '' $ac_executable_extensions; do
2809 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 2810 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5213506e 2811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
2812 break 2
2813 fi
2814done
5213506e
RW
2815 done
2816IFS=$as_save_IFS
238235ef 2817
0bc0cd11
JL
2818fi
2819fi
238235ef 2820RANLIB=$ac_cv_prog_RANLIB
0bc0cd11 2821if test -n "$RANLIB"; then
5213506e
RW
2822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
2823$as_echo "$RANLIB" >&6; }
0bc0cd11 2824else
5213506e
RW
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2826$as_echo "no" >&6; }
0bc0cd11
JL
2827fi
2828
5213506e 2829
238235ef 2830fi
0bc0cd11 2831if test -z "$ac_cv_prog_RANLIB"; then
238235ef 2832 ac_ct_RANLIB=$RANLIB
0bc0cd11
JL
2833 # Extract the first word of "ranlib", so it can be a program name with args.
2834set dummy ranlib; ac_word=$2
5213506e
RW
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2836$as_echo_n "checking for $ac_word... " >&6; }
2837if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
2838 $as_echo_n "(cached) " >&6
0bc0cd11 2839else
238235ef
DJ
2840 if test -n "$ac_ct_RANLIB"; then
2841 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
0bc0cd11 2842else
238235ef
DJ
2843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2844for as_dir in $PATH
2845do
2846 IFS=$as_save_IFS
2847 test -z "$as_dir" && as_dir=.
5213506e
RW
2848 for ac_exec_ext in '' $ac_executable_extensions; do
2849 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 2850 ac_cv_prog_ac_ct_RANLIB="ranlib"
5213506e 2851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
2852 break 2
2853 fi
2854done
5213506e
RW
2855 done
2856IFS=$as_save_IFS
238235ef 2857
0bc0cd11
JL
2858fi
2859fi
238235ef
DJ
2860ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2861if test -n "$ac_ct_RANLIB"; then
5213506e
RW
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
2863$as_echo "$ac_ct_RANLIB" >&6; }
0bc0cd11 2864else
5213506e
RW
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2866$as_echo "no" >&6; }
0bc0cd11
JL
2867fi
2868
5213506e
RW
2869 if test "x$ac_ct_RANLIB" = x; then
2870 RANLIB=":"
2871 else
2872 case $cross_compiling:$ac_tool_warned in
2873yes:)
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2876ac_tool_warned=yes ;;
2877esac
2878 RANLIB=$ac_ct_RANLIB
2879 fi
0bc0cd11 2880else
238235ef 2881 RANLIB="$ac_cv_prog_RANLIB"
0bc0cd11
JL
2882fi
2883
2884
abea993f
GK
2885# Add --enable-multilib to configure.
2886# Default to --enable-multilib
5213506e
RW
2887# Check whether --enable-multilib was given.
2888if test "${enable_multilib+set}" = set; then :
2889 enableval=$enable_multilib; case "$enableval" in
abea993f
GK
2890 yes) multilib=yes ;;
2891 no) multilib=no ;;
5213506e 2892 *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;;
abea993f
GK
2893 esac
2894else
2895 multilib=yes
5213506e
RW
2896fi
2897
abea993f
GK
2898
2899# Even if the default multilib is not a cross compilation,
2900# it may be that some of the other multilibs are.
2901if test $cross_compiling = no && test $multilib = yes \
2902 && test "x${with_multisubdir}" != x ; then
2903 cross_compiling=maybe
2904fi
2905
8c9fddf4
MB
2906# We may wish to install the target headers somewhere.
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5
2908$as_echo_n "checking whether to install libiberty headers and static library... " >&6; }
2909
2910# Check whether --enable-install-libiberty was given.
2911if test "${enable_install_libiberty+set}" = set; then :
2912 enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
2913else
2914 enable_install_libiberty=no
2915fi
2916
2917# Option parsed, now set things appropriately.
2918case x"$enable_install_libiberty" in
2919 xyes|x)
2920 target_header_dir=libiberty
2921 ;;
2922 xno)
2923 target_header_dir=
2924 ;;
2925 *)
2926 # This could be sanity-checked in various ways...
2927 target_header_dir="${enable_install_libiberty}"
2928 ;;
2929esac
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5
2931$as_echo "$enable_install_libiberty" >&6; }
2932{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5
2933$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;}
2934
1eaf7d9c 2935
238235ef
DJ
2936ac_ext=c
2937ac_cpp='$CPP $CPPFLAGS'
2938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2940ac_compiler_gnu=$ac_cv_c_compiler_gnu
2941if test -n "$ac_tool_prefix"; then
2942 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2943set dummy ${ac_tool_prefix}gcc; ac_word=$2
5213506e
RW
2944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2945$as_echo_n "checking for $ac_word... " >&6; }
2946if test "${ac_cv_prog_CC+set}" = set; then :
2947 $as_echo_n "(cached) " >&6
238235ef
DJ
2948else
2949 if test -n "$CC"; then
2950 ac_cv_prog_CC="$CC" # Let the user override the test.
2951else
2952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2953for as_dir in $PATH
2954do
2955 IFS=$as_save_IFS
2956 test -z "$as_dir" && as_dir=.
5213506e
RW
2957 for ac_exec_ext in '' $ac_executable_extensions; do
2958 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 2959 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5213506e 2960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
2961 break 2
2962 fi
2963done
5213506e
RW
2964 done
2965IFS=$as_save_IFS
238235ef
DJ
2966
2967fi
2968fi
2969CC=$ac_cv_prog_CC
2970if test -n "$CC"; then
5213506e
RW
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2972$as_echo "$CC" >&6; }
238235ef 2973else
5213506e
RW
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2975$as_echo "no" >&6; }
238235ef
DJ
2976fi
2977
5213506e 2978
238235ef
DJ
2979fi
2980if test -z "$ac_cv_prog_CC"; then
2981 ac_ct_CC=$CC
2982 # Extract the first word of "gcc", so it can be a program name with args.
0bc0cd11 2983set dummy gcc; ac_word=$2
5213506e
RW
2984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2985$as_echo_n "checking for $ac_word... " >&6; }
2986if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2987 $as_echo_n "(cached) " >&6
238235ef
DJ
2988else
2989 if test -n "$ac_ct_CC"; then
2990 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2991else
2992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2993for as_dir in $PATH
2994do
2995 IFS=$as_save_IFS
2996 test -z "$as_dir" && as_dir=.
5213506e
RW
2997 for ac_exec_ext in '' $ac_executable_extensions; do
2998 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 2999 ac_cv_prog_ac_ct_CC="gcc"
5213506e 3000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
3001 break 2
3002 fi
3003done
5213506e
RW
3004 done
3005IFS=$as_save_IFS
238235ef
DJ
3006
3007fi
3008fi
3009ac_ct_CC=$ac_cv_prog_ac_ct_CC
3010if test -n "$ac_ct_CC"; then
5213506e
RW
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3012$as_echo "$ac_ct_CC" >&6; }
238235ef 3013else
5213506e
RW
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3015$as_echo "no" >&6; }
238235ef
DJ
3016fi
3017
5213506e
RW
3018 if test "x$ac_ct_CC" = x; then
3019 CC=""
3020 else
3021 case $cross_compiling:$ac_tool_warned in
3022yes:)
3023{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3024$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3025ac_tool_warned=yes ;;
3026esac
3027 CC=$ac_ct_CC
3028 fi
238235ef
DJ
3029else
3030 CC="$ac_cv_prog_CC"
3031fi
3032
3033if test -z "$CC"; then
5213506e
RW
3034 if test -n "$ac_tool_prefix"; then
3035 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
238235ef 3036set dummy ${ac_tool_prefix}cc; ac_word=$2
5213506e
RW
3037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3038$as_echo_n "checking for $ac_word... " >&6; }
3039if test "${ac_cv_prog_CC+set}" = set; then :
3040 $as_echo_n "(cached) " >&6
0bc0cd11
JL
3041else
3042 if test -n "$CC"; then
3043 ac_cv_prog_CC="$CC" # Let the user override the test.
3044else
238235ef
DJ
3045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3046for as_dir in $PATH
3047do
3048 IFS=$as_save_IFS
3049 test -z "$as_dir" && as_dir=.
5213506e
RW
3050 for ac_exec_ext in '' $ac_executable_extensions; do
3051 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 3052 ac_cv_prog_CC="${ac_tool_prefix}cc"
5213506e 3053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
3054 break 2
3055 fi
3056done
5213506e
RW
3057 done
3058IFS=$as_save_IFS
238235ef 3059
0bc0cd11
JL
3060fi
3061fi
238235ef 3062CC=$ac_cv_prog_CC
0bc0cd11 3063if test -n "$CC"; then
5213506e
RW
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3065$as_echo "$CC" >&6; }
0bc0cd11 3066else
5213506e
RW
3067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3068$as_echo "no" >&6; }
0bc0cd11
JL
3069fi
3070
238235ef 3071
5213506e 3072 fi
238235ef 3073fi
0bc0cd11
JL
3074if test -z "$CC"; then
3075 # Extract the first word of "cc", so it can be a program name with args.
3076set dummy cc; ac_word=$2
5213506e
RW
3077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3078$as_echo_n "checking for $ac_word... " >&6; }
3079if test "${ac_cv_prog_CC+set}" = set; then :
3080 $as_echo_n "(cached) " >&6
0bc0cd11
JL
3081else
3082 if test -n "$CC"; then
3083 ac_cv_prog_CC="$CC" # Let the user override the test.
3084else
0bc0cd11 3085 ac_prog_rejected=no
238235ef
DJ
3086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3087for as_dir in $PATH
3088do
3089 IFS=$as_save_IFS
3090 test -z "$as_dir" && as_dir=.
5213506e
RW
3091 for ac_exec_ext in '' $ac_executable_extensions; do
3092 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef
DJ
3093 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3094 ac_prog_rejected=yes
3095 continue
3096 fi
3097 ac_cv_prog_CC="cc"
5213506e 3098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
3099 break 2
3100 fi
3101done
5213506e
RW
3102 done
3103IFS=$as_save_IFS
238235ef 3104
0bc0cd11
JL
3105if test $ac_prog_rejected = yes; then
3106 # We found a bogon in the path, so make sure we never use it.
3107 set dummy $ac_cv_prog_CC
3108 shift
238235ef 3109 if test $# != 0; then
0bc0cd11
JL
3110 # We chose a different compiler from the bogus one.
3111 # However, it has the same basename, so the bogon will be chosen
3112 # first if we set CC to just the basename; use the full file name.
3113 shift
238235ef 3114 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
0bc0cd11
JL
3115 fi
3116fi
3117fi
3118fi
238235ef 3119CC=$ac_cv_prog_CC
0bc0cd11 3120if test -n "$CC"; then
5213506e
RW
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3122$as_echo "$CC" >&6; }
0bc0cd11 3123else
5213506e
RW
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3125$as_echo "no" >&6; }
0bc0cd11
JL
3126fi
3127
5213506e 3128
0bc0cd11 3129fi
238235ef
DJ
3130if test -z "$CC"; then
3131 if test -n "$ac_tool_prefix"; then
5213506e 3132 for ac_prog in cl.exe
238235ef
DJ
3133 do
3134 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3135set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5213506e
RW
3136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3137$as_echo_n "checking for $ac_word... " >&6; }
3138if test "${ac_cv_prog_CC+set}" = set; then :
3139 $as_echo_n "(cached) " >&6
0bc0cd11 3140else
238235ef
DJ
3141 if test -n "$CC"; then
3142 ac_cv_prog_CC="$CC" # Let the user override the test.
0bc0cd11 3143else
238235ef
DJ
3144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3145for as_dir in $PATH
3146do
3147 IFS=$as_save_IFS
3148 test -z "$as_dir" && as_dir=.
5213506e
RW
3149 for ac_exec_ext in '' $ac_executable_extensions; do
3150 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 3151 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5213506e 3152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef
DJ
3153 break 2
3154 fi
3155done
5213506e
RW
3156 done
3157IFS=$as_save_IFS
238235ef 3158
0bc0cd11
JL
3159fi
3160fi
238235ef
DJ
3161CC=$ac_cv_prog_CC
3162if test -n "$CC"; then
5213506e
RW
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3164$as_echo "$CC" >&6; }
0bc0cd11 3165else
5213506e
RW
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3167$as_echo "no" >&6; }
0bc0cd11 3168fi
0bc0cd11 3169
5213506e 3170
238235ef
DJ
3171 test -n "$CC" && break
3172 done
0bc0cd11 3173fi
238235ef
DJ
3174if test -z "$CC"; then
3175 ac_ct_CC=$CC
5213506e 3176 for ac_prog in cl.exe
238235ef
DJ
3177do
3178 # Extract the first word of "$ac_prog", so it can be a program name with args.
3179set dummy $ac_prog; ac_word=$2
5213506e
RW
3180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3181$as_echo_n "checking for $ac_word... " >&6; }
3182if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3183 $as_echo_n "(cached) " >&6
238235ef
DJ
3184else
3185 if test -n "$ac_ct_CC"; then
3186 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3187else
3188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3189for as_dir in $PATH
3190do
3191 IFS=$as_save_IFS
3192 test -z "$as_dir" && as_dir=.
5213506e
RW
3193 for ac_exec_ext in '' $ac_executable_extensions; do
3194 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
238235ef 3195 ac_cv_prog_ac_ct_CC="$ac_prog"
5213506e 3196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
238235ef 3197 break 2
0bc0cd11 3198 fi
238235ef 3199done
5213506e
RW
3200 done
3201IFS=$as_save_IFS
238235ef
DJ
3202
3203fi
3204fi
3205ac_ct_CC=$ac_cv_prog_ac_ct_CC
3206if test -n "$ac_ct_CC"; then
5213506e
RW
3207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3208$as_echo "$ac_ct_CC" >&6; }
0bc0cd11 3209else
5213506e
RW
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3211$as_echo "no" >&6; }
0bc0cd11
JL
3212fi
3213
5213506e 3214
238235ef
DJ
3215 test -n "$ac_ct_CC" && break
3216done
0bc0cd11 3217
5213506e
RW
3218 if test "x$ac_ct_CC" = x; then
3219 CC=""
3220 else
3221 case $cross_compiling:$ac_tool_warned in
3222yes:)
3223{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3224$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3225ac_tool_warned=yes ;;
3226esac
3227 CC=$ac_ct_CC
3228 fi
238235ef
DJ
3229fi
3230
3231fi
3232
3233
5213506e
RW
3234test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3236as_fn_error "no acceptable C compiler found in \$PATH
3237See \`config.log' for more details." "$LINENO" 5; }
238235ef
DJ
3238
3239# Provide some information about the compiler.
5213506e
RW
3240$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3241set X $ac_compile
3242ac_compiler=$2
3243for ac_option in --version -v -V -qversion; do
3244 { { ac_try="$ac_compiler $ac_option >&5"
3245case "(($ac_try" in
3246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3247 *) ac_try_echo=$ac_try;;
3248esac
3249eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3250$as_echo "$ac_try_echo"; } >&5
3251 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
238235ef 3252 ac_status=$?
5213506e
RW
3253 if test -s conftest.err; then
3254 sed '10a\
3255... rest of stderr output deleted ...
3256 10q' conftest.err >conftest.er1
3257 cat conftest.er1 >&5
3258 rm -f conftest.er1 conftest.err
3259 fi
3260 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3261 test $ac_status = 0; }
3262done
238235ef 3263
5213506e 3264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef 3265/* end confdefs.h. */
d1209685 3266
238235ef
DJ
3267int
3268main ()
3269{
3270
3271 ;
3272 return 0;
3273}
3274_ACEOF
3275# FIXME: Cleanup?
5213506e 3276if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
238235ef
DJ
3277 (eval $ac_link) 2>&5
3278 ac_status=$?
5213506e
RW
3279 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3280 test $ac_status = 0; }; then :
238235ef
DJ
3281 gcc_no_link=no
3282else
3283 gcc_no_link=yes
3284fi
238235ef
DJ
3285if test x$gcc_no_link = xyes; then
3286 # Setting cross_compile will disable run tests; it will
3287 # also disable AC_CHECK_FILE but that's generally
3288 # correct if we can't link.
3289 cross_compiling=yes
3290 EXEEXT=
3291else
5213506e 3292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef
DJ
3293/* end confdefs.h. */
3294
3295int
3296main ()
3297{
3298
3299 ;
3300 return 0;
3301}
3302_ACEOF
3303ac_clean_files_save=$ac_clean_files
5213506e 3304ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
238235ef
DJ
3305# Try to create an executable without -o first, disregard a.out.
3306# It will help us diagnose broken compilers, and finding out an intuition
3307# of exeext.
5213506e
RW
3308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3309$as_echo_n "checking for C compiler default output file name... " >&6; }
3310ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3311
3312# The possible output files:
3313ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3314
3315ac_rmfiles=
3316for ac_file in $ac_files
3317do
3318 case $ac_file in
3319 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3320 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3321 esac
3322done
3323rm -f $ac_rmfiles
3324
3325if { { ac_try="$ac_link_default"
3326case "(($ac_try" in
3327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3328 *) ac_try_echo=$ac_try;;
3329esac
3330eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3331$as_echo "$ac_try_echo"; } >&5
3332 (eval "$ac_link_default") 2>&5
3333 ac_status=$?
3334 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3335 test $ac_status = 0; }; then :
3336 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3337# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3338# in a Makefile. We should not override ac_cv_exeext if it was cached,
3339# so that the user can short-circuit this test for compilers unknown to
3340# Autoconf.
3341for ac_file in $ac_files ''
238235ef
DJ
3342do
3343 test -f "$ac_file" || continue
3344 case $ac_file in
5213506e 3345 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3beb1315 3346 ;;
238235ef 3347 [ab].out )
3beb1315
HPN
3348 # We found the default executable, but exeext='' is most
3349 # certainly right.
3350 break;;
238235ef 3351 *.* )
5213506e
RW
3352 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3353 then :; else
3354 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3355 fi
3356 # We set ac_cv_exeext here because the later test for it is not
3357 # safe: cross compilers may not add the suffix if given an `-o'
3358 # argument, so we may need to know it at that point already.
3359 # Even if this section looks crufty: it has the advantage of
3360 # actually working.
3beb1315 3361 break;;
238235ef 3362 * )
3beb1315 3363 break;;
238235ef
DJ
3364 esac
3365done
5213506e
RW
3366test "$ac_cv_exeext" = no && ac_cv_exeext=
3367
7fda878c 3368else
5213506e
RW
3369 ac_file=''
3370fi
3371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3372$as_echo "$ac_file" >&6; }
3373if test -z "$ac_file"; then :
3374 $as_echo "$as_me: failed program was:" >&5
238235ef
DJ
3375sed 's/^/| /' conftest.$ac_ext >&5
3376
5213506e
RW
3377{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3379{ as_fn_set_status 77
3380as_fn_error "C compiler cannot create executables
3381See \`config.log' for more details." "$LINENO" 5; }; }
238235ef 3382fi
238235ef 3383ac_exeext=$ac_cv_exeext
238235ef 3384
5213506e 3385# Check that the compiler produces executables we can run. If not, either
238235ef 3386# the compiler is broken, or we cross compile.
5213506e
RW
3387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3388$as_echo_n "checking whether the C compiler works... " >&6; }
238235ef
DJ
3389# If not cross compiling, check that we can run a simple program.
3390if test "$cross_compiling" != yes; then
3391 if { ac_try='./$ac_file'
5213506e
RW
3392 { { case "(($ac_try" in
3393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3394 *) ac_try_echo=$ac_try;;
3395esac
3396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3397$as_echo "$ac_try_echo"; } >&5
3398 (eval "$ac_try") 2>&5
238235ef 3399 ac_status=$?
5213506e
RW
3400 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3401 test $ac_status = 0; }; }; then
238235ef
DJ
3402 cross_compiling=no
3403 else
3404 if test "$cross_compiling" = maybe; then
3405 cross_compiling=yes
3406 else
5213506e
RW
3407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3409as_fn_error "cannot run C compiled programs.
238235ef 3410If you meant to cross compile, use \`--host'.
5213506e 3411See \`config.log' for more details." "$LINENO" 5; }
7fda878c
DR
3412 fi
3413 fi
238235ef 3414fi
5213506e
RW
3415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3416$as_echo "yes" >&6; }
238235ef 3417
5213506e 3418rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
238235ef 3419ac_clean_files=$ac_clean_files_save
5213506e 3420# Check that the compiler produces executables we can run. If not, either
238235ef 3421# the compiler is broken, or we cross compile.
5213506e
RW
3422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3423$as_echo_n "checking whether we are cross compiling... " >&6; }
3424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3425$as_echo "$cross_compiling" >&6; }
3426
3427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3428$as_echo_n "checking for suffix of executables... " >&6; }
3429if { { ac_try="$ac_link"
3430case "(($ac_try" in
3431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3432 *) ac_try_echo=$ac_try;;
3433esac
3434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3435$as_echo "$ac_try_echo"; } >&5
3436 (eval "$ac_link") 2>&5
238235ef 3437 ac_status=$?
5213506e
RW
3438 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3439 test $ac_status = 0; }; then :
238235ef
DJ
3440 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3441# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3442# work properly (i.e., refer to `conftest.exe'), while it won't with
3443# `rm'.
3444for ac_file in conftest.exe conftest conftest.*; do
3445 test -f "$ac_file" || continue
3446 case $ac_file in
5213506e 3447 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
238235ef 3448 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3beb1315 3449 break;;
238235ef
DJ
3450 * ) break;;
3451 esac
3452done
7fda878c 3453else
5213506e
RW
3454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3456as_fn_error "cannot compute suffix of executables: cannot compile and link
3457See \`config.log' for more details." "$LINENO" 5; }
7fda878c 3458fi
238235ef 3459rm -f conftest$ac_cv_exeext
5213506e
RW
3460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3461$as_echo "$ac_cv_exeext" >&6; }
238235ef
DJ
3462
3463rm -f conftest.$ac_ext
3464EXEEXT=$ac_cv_exeext
3465ac_exeext=$EXEEXT
7fda878c 3466fi
5213506e
RW
3467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3468$as_echo_n "checking for suffix of object files... " >&6; }
3469if test "${ac_cv_objext+set}" = set; then :
3470 $as_echo_n "(cached) " >&6
7fda878c 3471else
5213506e 3472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef 3473/* end confdefs.h. */
7fda878c 3474
238235ef
DJ
3475int
3476main ()
3477{
7fda878c 3478
238235ef
DJ
3479 ;
3480 return 0;
3481}
3482_ACEOF
3483rm -f conftest.o conftest.obj
5213506e
RW
3484if { { ac_try="$ac_compile"
3485case "(($ac_try" in
3486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3487 *) ac_try_echo=$ac_try;;
3488esac
3489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3490$as_echo "$ac_try_echo"; } >&5
3491 (eval "$ac_compile") 2>&5
3492 ac_status=$?
3493 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3494 test $ac_status = 0; }; then :
3495 for ac_file in conftest.o conftest.obj conftest.*; do
3496 test -f "$ac_file" || continue;
238235ef 3497 case $ac_file in
5213506e 3498 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
238235ef
DJ
3499 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3500 break;;
3501 esac
3502done
7fda878c 3503else
5213506e 3504 $as_echo "$as_me: failed program was:" >&5
238235ef
DJ
3505sed 's/^/| /' conftest.$ac_ext >&5
3506
5213506e
RW
3507{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3509as_fn_error "cannot compute suffix of object files: cannot compile
3510See \`config.log' for more details." "$LINENO" 5; }
238235ef 3511fi
238235ef 3512rm -f conftest.$ac_cv_objext conftest.$ac_ext
7fda878c 3513fi
5213506e
RW
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3515$as_echo "$ac_cv_objext" >&6; }
238235ef
DJ
3516OBJEXT=$ac_cv_objext
3517ac_objext=$OBJEXT
5213506e
RW
3518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3519$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3520if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3521 $as_echo_n "(cached) " >&6
238235ef 3522else
5213506e 3523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef
DJ
3524/* end confdefs.h. */
3525
3526int
3527main ()
3528{
3529#ifndef __GNUC__
3530 choke me
3531#endif
7fda878c 3532
238235ef
DJ
3533 ;
3534 return 0;
3535}
3536_ACEOF
5213506e 3537if ac_fn_c_try_compile "$LINENO"; then :
238235ef
DJ
3538 ac_compiler_gnu=yes
3539else
5213506e 3540 ac_compiler_gnu=no
238235ef 3541fi
5213506e 3542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef
DJ
3543ac_cv_c_compiler_gnu=$ac_compiler_gnu
3544
3545fi
5213506e
RW
3546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3547$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3548if test $ac_compiler_gnu = yes; then
3549 GCC=yes
3550else
3551 GCC=
3552fi
238235ef
DJ
3553ac_test_CFLAGS=${CFLAGS+set}
3554ac_save_CFLAGS=$CFLAGS
5213506e
RW
3555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3556$as_echo_n "checking whether $CC accepts -g... " >&6; }
3557if test "${ac_cv_prog_cc_g+set}" = set; then :
3558 $as_echo_n "(cached) " >&6
3559else
3560 ac_save_c_werror_flag=$ac_c_werror_flag
3561 ac_c_werror_flag=yes
3562 ac_cv_prog_cc_g=no
3563 CFLAGS="-g"
3564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef 3565/* end confdefs.h. */
7fda878c 3566
238235ef
DJ
3567int
3568main ()
3569{
7fda878c 3570
238235ef
DJ
3571 ;
3572 return 0;
3573}
3574_ACEOF
5213506e 3575if ac_fn_c_try_compile "$LINENO"; then :
238235ef
DJ
3576 ac_cv_prog_cc_g=yes
3577else
5213506e
RW
3578 CFLAGS=""
3579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3580/* end confdefs.h. */
3581
3582int
3583main ()
3584{
3585
3586 ;
3587 return 0;
3588}
3589_ACEOF
3590if ac_fn_c_try_compile "$LINENO"; then :
3591
3592else
3593 ac_c_werror_flag=$ac_save_c_werror_flag
3594 CFLAGS="-g"
3595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3596/* end confdefs.h. */
3597
3598int
3599main ()
3600{
0bc0cd11 3601
5213506e
RW
3602 ;
3603 return 0;
3604}
3605_ACEOF
3606if ac_fn_c_try_compile "$LINENO"; then :
3607 ac_cv_prog_cc_g=yes
3608fi
3609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef 3610fi
5213506e 3611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef 3612fi
5213506e
RW
3613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3614 ac_c_werror_flag=$ac_save_c_werror_flag
3615fi
3616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3617$as_echo "$ac_cv_prog_cc_g" >&6; }
238235ef
DJ
3618if test "$ac_test_CFLAGS" = set; then
3619 CFLAGS=$ac_save_CFLAGS
3620elif test $ac_cv_prog_cc_g = yes; then
0bc0cd11 3621 if test "$GCC" = yes; then
238235ef 3622 CFLAGS="-g -O2"
0bc0cd11 3623 else
238235ef 3624 CFLAGS="-g"
0bc0cd11
JL
3625 fi
3626else
238235ef
DJ
3627 if test "$GCC" = yes; then
3628 CFLAGS="-O2"
3629 else
3630 CFLAGS=
3631 fi
0bc0cd11 3632fi
5213506e
RW
3633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3634$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3635if test "${ac_cv_prog_cc_c89+set}" = set; then :
3636 $as_echo_n "(cached) " >&6
238235ef 3637else
5213506e 3638 ac_cv_prog_cc_c89=no
238235ef 3639ac_save_CC=$CC
5213506e 3640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef
DJ
3641/* end confdefs.h. */
3642#include <stdarg.h>
3643#include <stdio.h>
3644#include <sys/types.h>
3645#include <sys/stat.h>
3646/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3647struct buf { int x; };
3648FILE * (*rcsopen) (struct buf *, struct stat *, int);
3649static char *e (p, i)
3650 char **p;
3651 int i;
3652{
3653 return p[i];
d1209685 3654}
238235ef
DJ
3655static char *f (char * (*g) (char **, int), char **p, ...)
3656{
3657 char *s;
3658 va_list v;
3659 va_start (v,p);
3660 s = g (p, va_arg (v,int));
3661 va_end (v);
3662 return s;
d1209685 3663}
3beb1315
HPN
3664
3665/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3666 function prototypes and stuff, but not '\xHH' hex character constants.
3667 These don't provoke an error unfortunately, instead are silently treated
5213506e 3668 as 'x'. The following induces an error, until -std is added to get
3beb1315
HPN
3669 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3670 array size at least. It's necessary to write '\x00'==0 to get something
5213506e 3671 that's true only with -std. */
3beb1315
HPN
3672int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3673
5213506e
RW
3674/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3675 inside strings and character constants. */
3676#define FOO(x) 'x'
3677int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3678
238235ef
DJ
3679int test (int i, double x);
3680struct s1 {int (*f) (int a);};
3681struct s2 {int (*f) (double a);};
3682int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3683int argc;
3684char **argv;
3685int
3686main ()
3687{
3688return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3689 ;
3690 return 0;
d1209685 3691}
238235ef 3692_ACEOF
5213506e
RW
3693for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3694 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
238235ef
DJ
3695do
3696 CC="$ac_save_CC $ac_arg"
5213506e
RW
3697 if ac_fn_c_try_compile "$LINENO"; then :
3698 ac_cv_prog_cc_c89=$ac_arg
238235ef 3699fi
5213506e
RW
3700rm -f core conftest.err conftest.$ac_objext
3701 test "x$ac_cv_prog_cc_c89" != "xno" && break
238235ef 3702done
5213506e 3703rm -f conftest.$ac_ext
238235ef
DJ
3704CC=$ac_save_CC
3705
3706fi
5213506e
RW
3707# AC_CACHE_VAL
3708case "x$ac_cv_prog_cc_c89" in
3709 x)
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3711$as_echo "none needed" >&6; } ;;
3712 xno)
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3714$as_echo "unsupported" >&6; } ;;
238235ef 3715 *)
5213506e
RW
3716 CC="$CC $ac_cv_prog_cc_c89"
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3718$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
238235ef 3719esac
5213506e 3720if test "x$ac_cv_prog_cc_c89" != xno; then :
238235ef 3721
238235ef
DJ
3722fi
3723
238235ef
DJ
3724ac_ext=c
3725ac_cpp='$CPP $CPPFLAGS'
3726ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3727ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3728ac_compiler_gnu=$ac_cv_c_compiler_gnu
3729
d208e2d2 3730
f50f17e6
YJ
3731ac_ext=c
3732ac_cpp='$CPP $CPPFLAGS'
3733ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3734ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3735ac_compiler_gnu=$ac_cv_c_compiler_gnu
3736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3737$as_echo_n "checking how to run the C preprocessor... " >&6; }
3738# On Suns, sometimes $CPP names a directory.
3739if test -n "$CPP" && test -d "$CPP"; then
3740 CPP=
5213506e 3741fi
f50f17e6
YJ
3742if test -z "$CPP"; then
3743 if test "${ac_cv_prog_CPP+set}" = set; then :
5213506e 3744 $as_echo_n "(cached) " >&6
d208e2d2 3745else
f50f17e6
YJ
3746 # Double quotes because CPP needs to be expanded
3747 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3748 do
3749 ac_preproc_ok=false
3750for ac_c_preproc_warn_flag in '' yes
3751do
3752 # Use a header file that comes with gcc, so configuring glibc
3753 # with a fresh cross-compiler works.
3754 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3755 # <limits.h> exists even on freestanding compilers.
3756 # On the NeXT, cc -E runs the code through the compiler's parser,
3757 # not just through cpp. "Syntax error" is here to catch this case.
3758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d208e2d2 3759/* end confdefs.h. */
f50f17e6
YJ
3760#ifdef __STDC__
3761# include <limits.h>
3762#else
3763# include <assert.h>
3764#endif
3765 Syntax error
d208e2d2 3766_ACEOF
f50f17e6
YJ
3767if ac_fn_c_try_cpp "$LINENO"; then :
3768
3769else
3770 # Broken: fails on valid input.
3771continue
d208e2d2 3772fi
f50f17e6
YJ
3773rm -f conftest.err conftest.$ac_ext
3774
3775 # OK, works on sane cases. Now check whether nonexistent headers
3776 # can be detected and how.
3777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3778/* end confdefs.h. */
3779#include <ac_nonexistent.h>
3780_ACEOF
3781if ac_fn_c_try_cpp "$LINENO"; then :
3782 # Broken: success on invalid input.
3783continue
3784else
3785 # Passes both tests.
3786ac_preproc_ok=:
3787break
d208e2d2 3788fi
f50f17e6
YJ
3789rm -f conftest.err conftest.$ac_ext
3790
3791done
3792# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3793rm -f conftest.err conftest.$ac_ext
3794if $ac_preproc_ok; then :
3795 break
d208e2d2 3796fi
d208e2d2 3797
f50f17e6
YJ
3798 done
3799 ac_cv_prog_CPP=$CPP
3800
3801fi
3802 CPP=$ac_cv_prog_CPP
d208e2d2 3803else
f50f17e6
YJ
3804 ac_cv_prog_CPP=$CPP
3805fi
3806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3807$as_echo "$CPP" >&6; }
3808ac_preproc_ok=false
3809for ac_c_preproc_warn_flag in '' yes
3810do
3811 # Use a header file that comes with gcc, so configuring glibc
3812 # with a fresh cross-compiler works.
3813 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3814 # <limits.h> exists even on freestanding compilers.
3815 # On the NeXT, cc -E runs the code through the compiler's parser,
3816 # not just through cpp. "Syntax error" is here to catch this case.
5213506e 3817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d208e2d2 3818/* end confdefs.h. */
f50f17e6
YJ
3819#ifdef __STDC__
3820# include <limits.h>
3821#else
3822# include <assert.h>
3823#endif
3824 Syntax error
d208e2d2 3825_ACEOF
f50f17e6
YJ
3826if ac_fn_c_try_cpp "$LINENO"; then :
3827
3828else
3829 # Broken: fails on valid input.
3830continue
d208e2d2 3831fi
f50f17e6
YJ
3832rm -f conftest.err conftest.$ac_ext
3833
3834 # OK, works on sane cases. Now check whether nonexistent headers
3835 # can be detected and how.
5213506e 3836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d208e2d2 3837/* end confdefs.h. */
f50f17e6 3838#include <ac_nonexistent.h>
b033df90 3839_ACEOF
5213506e 3840if ac_fn_c_try_cpp "$LINENO"; then :
b033df90
DJ
3841 # Broken: success on invalid input.
3842continue
3843else
b033df90
DJ
3844 # Passes both tests.
3845ac_preproc_ok=:
3846break
3847fi
3848rm -f conftest.err conftest.$ac_ext
3849
3850done
3851# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3852rm -f conftest.err conftest.$ac_ext
5213506e
RW
3853if $ac_preproc_ok; then :
3854
b033df90 3855else
5213506e
RW
3856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3858as_fn_error "C preprocessor \"$CPP\" fails sanity check
3859See \`config.log' for more details." "$LINENO" 5; }
b033df90
DJ
3860fi
3861
3862ac_ext=c
3863ac_cpp='$CPP $CPPFLAGS'
3864ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3865ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3866ac_compiler_gnu=$ac_cv_c_compiler_gnu
3867
3868
f50f17e6
YJ
3869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3870$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3871if test "${ac_cv_path_GREP+set}" = set; then :
5213506e 3872 $as_echo_n "(cached) " >&6
e8f9ec35 3873else
f50f17e6
YJ
3874 if test -z "$GREP"; then
3875 ac_path_GREP_found=false
3876 # Loop through the user's path and test for each of PROGNAME-LIST
3877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3879do
3880 IFS=$as_save_IFS
3881 test -z "$as_dir" && as_dir=.
3882 for ac_prog in grep ggrep; do
3883 for ac_exec_ext in '' $ac_executable_extensions; do
3884 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3885 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3886# Check for GNU ac_path_GREP and select it if it is found.
3887 # Check for GNU $ac_path_GREP
3888case `"$ac_path_GREP" --version 2>&1` in
3889*GNU*)
3890 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3891*)
3892 ac_count=0
3893 $as_echo_n 0123456789 >"conftest.in"
3894 while :
3895 do
3896 cat "conftest.in" "conftest.in" >"conftest.tmp"
3897 mv "conftest.tmp" "conftest.in"
3898 cp "conftest.in" "conftest.nl"
3899 $as_echo 'GREP' >> "conftest.nl"
3900 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3901 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3902 as_fn_arith $ac_count + 1 && ac_count=$as_val
3903 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3904 # Best one so far, save it but keep looking for a better one
3905 ac_cv_path_GREP="$ac_path_GREP"
3906 ac_path_GREP_max=$ac_count
3907 fi
3908 # 10*(2^10) chars as input seems more than enough
3909 test $ac_count -gt 10 && break
3910 done
3911 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3912esac
3913
3914 $ac_path_GREP_found && break 3
3915 done
3916 done
3917 done
3918IFS=$as_save_IFS
3919 if test -z "$ac_cv_path_GREP"; then
3920 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3921 fi
aa2480c5 3922else
f50f17e6
YJ
3923 ac_cv_path_GREP=$GREP
3924fi
3925
3926fi
3927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3928$as_echo "$ac_cv_path_GREP" >&6; }
3929 GREP="$ac_cv_path_GREP"
3930
3931
3932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3933$as_echo_n "checking for egrep... " >&6; }
3934if test "${ac_cv_path_EGREP+set}" = set; then :
3935 $as_echo_n "(cached) " >&6
3936else
3937 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3938 then ac_cv_path_EGREP="$GREP -E"
3939 else
3940 if test -z "$EGREP"; then
3941 ac_path_EGREP_found=false
3942 # Loop through the user's path and test for each of PROGNAME-LIST
3943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3944for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3945do
3946 IFS=$as_save_IFS
3947 test -z "$as_dir" && as_dir=.
3948 for ac_prog in egrep; do
3949 for ac_exec_ext in '' $ac_executable_extensions; do
3950 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3951 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3952# Check for GNU ac_path_EGREP and select it if it is found.
3953 # Check for GNU $ac_path_EGREP
3954case `"$ac_path_EGREP" --version 2>&1` in
3955*GNU*)
3956 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3957*)
3958 ac_count=0
3959 $as_echo_n 0123456789 >"conftest.in"
3960 while :
3961 do
3962 cat "conftest.in" "conftest.in" >"conftest.tmp"
3963 mv "conftest.tmp" "conftest.in"
3964 cp "conftest.in" "conftest.nl"
3965 $as_echo 'EGREP' >> "conftest.nl"
3966 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3967 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3968 as_fn_arith $ac_count + 1 && ac_count=$as_val
3969 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3970 # Best one so far, save it but keep looking for a better one
3971 ac_cv_path_EGREP="$ac_path_EGREP"
3972 ac_path_EGREP_max=$ac_count
3973 fi
3974 # 10*(2^10) chars as input seems more than enough
3975 test $ac_count -gt 10 && break
3976 done
3977 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3978esac
3979
3980 $ac_path_EGREP_found && break 3
3981 done
3982 done
3983 done
3984IFS=$as_save_IFS
3985 if test -z "$ac_cv_path_EGREP"; then
3986 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3987 fi
3988else
3989 ac_cv_path_EGREP=$EGREP
3990fi
3991
3992 fi
3993fi
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3995$as_echo "$ac_cv_path_EGREP" >&6; }
3996 EGREP="$ac_cv_path_EGREP"
3997
3998
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4000$as_echo_n "checking for ANSI C header files... " >&6; }
4001if test "${ac_cv_header_stdc+set}" = set; then :
4002 $as_echo_n "(cached) " >&6
4003else
4004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aa2480c5 4005/* end confdefs.h. */
f50f17e6
YJ
4006#include <stdlib.h>
4007#include <stdarg.h>
4008#include <string.h>
4009#include <float.h>
aa2480c5
PB
4010
4011int
4012main ()
4013{
4014
4015 ;
4016 return 0;
4017}
4018_ACEOF
5213506e 4019if ac_fn_c_try_compile "$LINENO"; then :
f50f17e6 4020 ac_cv_header_stdc=yes
aa2480c5 4021else
f50f17e6 4022 ac_cv_header_stdc=no
aa2480c5 4023fi
5213506e 4024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f50f17e6
YJ
4025
4026if test $ac_cv_header_stdc = yes; then
4027 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4029/* end confdefs.h. */
4030#include <string.h>
4031
4032_ACEOF
4033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4034 $EGREP "memchr" >/dev/null 2>&1; then :
4035
4036else
4037 ac_cv_header_stdc=no
aa2480c5 4038fi
f50f17e6 4039rm -f conftest*
aa2480c5 4040
aa2480c5
PB
4041fi
4042
f50f17e6
YJ
4043if test $ac_cv_header_stdc = yes; then
4044 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4046/* end confdefs.h. */
4047#include <stdlib.h>
4048
4049_ACEOF
4050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4051 $EGREP "free" >/dev/null 2>&1; then :
aa2480c5 4052
24f2cabb 4053else
f50f17e6 4054 ac_cv_header_stdc=no
24f2cabb 4055fi
f50f17e6
YJ
4056rm -f conftest*
4057
4058fi
4059
4060if test $ac_cv_header_stdc = yes; then
4061 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4062 if test "$cross_compiling" = yes; then :
4063 :
24f2cabb 4064else
5213506e 4065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24f2cabb 4066/* end confdefs.h. */
f50f17e6
YJ
4067#include <ctype.h>
4068#include <stdlib.h>
4069#if ((' ' & 0x0FF) == 0x020)
4070# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4071# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4072#else
4073# define ISLOWER(c) \
4074 (('a' <= (c) && (c) <= 'i') \
4075 || ('j' <= (c) && (c) <= 'r') \
4076 || ('s' <= (c) && (c) <= 'z'))
4077# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4078#endif
24f2cabb 4079
f50f17e6 4080#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
24f2cabb
L
4081int
4082main ()
4083{
f50f17e6
YJ
4084 int i;
4085 for (i = 0; i < 256; i++)
4086 if (XOR (islower (i), ISLOWER (i))
4087 || toupper (i) != TOUPPER (i))
4088 return 2;
24f2cabb
L
4089 return 0;
4090}
4091_ACEOF
f50f17e6
YJ
4092if ac_fn_c_try_run "$LINENO"; then :
4093
24f2cabb 4094else
f50f17e6
YJ
4095 ac_cv_header_stdc=no
4096fi
4097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4098 conftest.$ac_objext conftest.beam conftest.$ac_ext
24f2cabb 4099fi
24f2cabb
L
4100
4101fi
f50f17e6
YJ
4102fi
4103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4104$as_echo "$ac_cv_header_stdc" >&6; }
4105if test $ac_cv_header_stdc = yes; then
24f2cabb 4106
f50f17e6 4107$as_echo "#define STDC_HEADERS 1" >>confdefs.h
24f2cabb
L
4108
4109fi
4110
f50f17e6
YJ
4111# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4112for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4113 inttypes.h stdint.h unistd.h
4114do :
4115 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4116ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4117"
4118eval as_val=\$$as_ac_Header
4119 if test "x$as_val" = x""yes; then :
4120 cat >>confdefs.h <<_ACEOF
4121#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4122_ACEOF
4123
4124fi
4125
4126done
4127
4128
4129
4130 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4131if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4132 MINIX=yes
24f2cabb 4133else
f50f17e6 4134 MINIX=
24f2cabb
L
4135fi
4136
4137
f50f17e6 4138 if test "$MINIX" = yes; then
24f2cabb 4139
f50f17e6
YJ
4140$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4141
4142
4143$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4144
4145
4146$as_echo "#define _MINIX 1" >>confdefs.h
4147
4148 fi
4149
4150
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4152$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4153if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5213506e 4154 $as_echo_n "(cached) " >&6
207db768 4155else
5213506e 4156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ad49d865
L
4157/* end confdefs.h. */
4158
f50f17e6
YJ
4159# define __EXTENSIONS__ 1
4160 $ac_includes_default
ad49d865
L
4161int
4162main ()
4163{
ad49d865
L
4164
4165 ;
4166 return 0;
4167}
4168_ACEOF
5213506e 4169if ac_fn_c_try_compile "$LINENO"; then :
f50f17e6 4170 ac_cv_safe_to_define___extensions__=yes
207db768 4171else
f50f17e6 4172 ac_cv_safe_to_define___extensions__=no
207db768 4173fi
5213506e 4174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
207db768 4175fi
f50f17e6
YJ
4176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4177$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4178 test $ac_cv_safe_to_define___extensions__ = yes &&
4179 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4180
4181 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4182
4183 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4184
4185 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4186
4187 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4188
ad49d865 4189
207db768 4190
f50f17e6
YJ
4191# Check whether --enable-largefile was given.
4192if test "${enable_largefile+set}" = set; then :
4193 enableval=$enable_largefile;
207db768 4194fi
ad49d865 4195
f50f17e6
YJ
4196if test "$enable_largefile" != no; then
4197
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4199$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4200if test "${ac_cv_sys_largefile_CC+set}" = set; then :
5213506e 4201 $as_echo_n "(cached) " >&6
207db768 4202else
f50f17e6
YJ
4203 ac_cv_sys_largefile_CC=no
4204 if test "$GCC" != yes; then
4205 ac_save_CC=$CC
4206 while :; do
4207 # IRIX 6.2 and later do not support large files by default,
4208 # so use the C compiler's -n32 option if that helps.
4209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4210/* end confdefs.h. */
4211#include <sys/types.h>
4212 /* Check that off_t can represent 2**63 - 1 correctly.
4213 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4214 since some C++ compilers masquerading as C compilers
4215 incorrectly reject 9223372036854775807. */
4216#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4217 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4218 && LARGE_OFF_T % 2147483647 == 1)
4219 ? 1 : -1];
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
4228 if ac_fn_c_try_compile "$LINENO"; then :
4229 break
4230fi
4231rm -f core conftest.err conftest.$ac_objext
4232 CC="$CC -n32"
4233 if ac_fn_c_try_compile "$LINENO"; then :
4234 ac_cv_sys_largefile_CC=' -n32'; break
4235fi
4236rm -f core conftest.err conftest.$ac_objext
4237 break
4238 done
4239 CC=$ac_save_CC
4240 rm -f conftest.$ac_ext
4241 fi
4242fi
4243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4244$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4245 if test "$ac_cv_sys_largefile_CC" != no; then
4246 CC=$CC$ac_cv_sys_largefile_CC
4247 fi
4248
4249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4250$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4251if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
4252 $as_echo_n "(cached) " >&6
4253else
4254 while :; do
5213506e 4255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ad49d865 4256/* end confdefs.h. */
f50f17e6
YJ
4257#include <sys/types.h>
4258 /* Check that off_t can represent 2**63 - 1 correctly.
4259 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4260 since some C++ compilers masquerading as C compilers
4261 incorrectly reject 9223372036854775807. */
4262#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4263 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4264 && LARGE_OFF_T % 2147483647 == 1)
4265 ? 1 : -1];
4266int
4267main ()
4268{
238235ef 4269
f50f17e6
YJ
4270 ;
4271 return 0;
4272}
ad49d865 4273_ACEOF
5213506e 4274if ac_fn_c_try_compile "$LINENO"; then :
f50f17e6 4275 ac_cv_sys_file_offset_bits=no; break
207db768 4276fi
5213506e 4277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f50f17e6
YJ
4278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4279/* end confdefs.h. */
4280#define _FILE_OFFSET_BITS 64
4281#include <sys/types.h>
4282 /* Check that off_t can represent 2**63 - 1 correctly.
4283 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4284 since some C++ compilers masquerading as C compilers
4285 incorrectly reject 9223372036854775807. */
4286#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4287 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4288 && LARGE_OFF_T % 2147483647 == 1)
4289 ? 1 : -1];
4290int
4291main ()
4292{
ad49d865 4293
f50f17e6
YJ
4294 ;
4295 return 0;
4296}
4297_ACEOF
4298if ac_fn_c_try_compile "$LINENO"; then :
4299 ac_cv_sys_file_offset_bits=64; break
207db768 4300fi
f50f17e6
YJ
4301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4302 ac_cv_sys_file_offset_bits=unknown
4303 break
4304done
4305fi
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4307$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4308case $ac_cv_sys_file_offset_bits in #(
4309 no | unknown) ;;
4310 *)
4311cat >>confdefs.h <<_ACEOF
4312#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
ad49d865 4313_ACEOF
f50f17e6 4314;;
ad49d865 4315esac
f50f17e6
YJ
4316rm -rf conftest*
4317 if test $ac_cv_sys_file_offset_bits = unknown; then
4318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4319$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4320if test "${ac_cv_sys_large_files+set}" = set; then :
4321 $as_echo_n "(cached) " >&6
4322else
4323 while :; do
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325/* end confdefs.h. */
4326#include <sys/types.h>
4327 /* Check that off_t can represent 2**63 - 1 correctly.
4328 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4329 since some C++ compilers masquerading as C compilers
4330 incorrectly reject 9223372036854775807. */
4331#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4332 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4333 && LARGE_OFF_T % 2147483647 == 1)
4334 ? 1 : -1];
4335int
4336main ()
4337{
207db768 4338
f50f17e6
YJ
4339 ;
4340 return 0;
4341}
4342_ACEOF
4343if ac_fn_c_try_compile "$LINENO"; then :
4344 ac_cv_sys_large_files=no; break
4345fi
4346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4348/* end confdefs.h. */
4349#define _LARGE_FILES 1
4350#include <sys/types.h>
4351 /* Check that off_t can represent 2**63 - 1 correctly.
4352 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4353 since some C++ compilers masquerading as C compilers
4354 incorrectly reject 9223372036854775807. */
4355#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4356 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4357 && LARGE_OFF_T % 2147483647 == 1)
4358 ? 1 : -1];
4359int
4360main ()
4361{
5213506e 4362
f50f17e6
YJ
4363 ;
4364 return 0;
4365}
4366_ACEOF
4367if ac_fn_c_try_compile "$LINENO"; then :
4368 ac_cv_sys_large_files=1; break
4369fi
4370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4371 ac_cv_sys_large_files=unknown
4372 break
4373done
4374fi
4375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4376$as_echo "$ac_cv_sys_large_files" >&6; }
4377case $ac_cv_sys_large_files in #(
4378 no | unknown) ;;
4379 *)
4380cat >>confdefs.h <<_ACEOF
4381#define _LARGE_FILES $ac_cv_sys_large_files
4382_ACEOF
4383;;
4384esac
4385rm -rf conftest*
4386 fi
4387fi
4388
4389
4390ac_c_preproc_warn_flag=yes
4391
4392ac_libiberty_warn_cflags=
4393save_CFLAGS="$CFLAGS"
4394for real_option in -W -Wall -Wwrite-strings -Wc++-compat \
4395 -Wstrict-prototypes; do
4396 # Do the check with the no- prefix removed since gcc silently
4397 # accepts any -Wno-* option on purpose
4398 case $real_option in
4399 -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
4400 *) option=$real_option ;;
4401 esac
4402 as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
4403
4404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
4405$as_echo_n "checking whether $CC supports $option... " >&6; }
4406if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
5213506e 4407 $as_echo_n "(cached) " >&6
207db768 4408else
f50f17e6
YJ
4409 CFLAGS="$option"
4410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4411/* end confdefs.h. */
5213506e 4412
f50f17e6
YJ
4413int
4414main ()
4415{
4416
4417 ;
4418 return 0;
4419}
4420_ACEOF
4421if ac_fn_c_try_compile "$LINENO"; then :
4422 eval "$as_acx_Woption=yes"
4423else
4424 eval "$as_acx_Woption=no"
4425fi
4426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4427
4428fi
4429eval ac_res=\$$as_acx_Woption
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4431$as_echo "$ac_res" >&6; }
4432 if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
4433 ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$real_option"
4434fi
5213506e 4435 done
f50f17e6
YJ
4436CFLAGS="$save_CFLAGS"
4437
4438# Do the check with the no- prefix removed from the warning options
4439# since gcc silently accepts any -Wno-* option on purpose
4440if test "$GCC" = yes; then :
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic " >&5
4442$as_echo_n "checking whether $CC supports -pedantic ... " >&6; }
4443if test "${acx_cv_prog_cc_pedantic_+set}" = set; then :
4444 $as_echo_n "(cached) " >&6
5213506e 4445else
f50f17e6
YJ
4446 save_CFLAGS="$CFLAGS"
4447CFLAGS="-pedantic "
4448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450
4451int
4452main ()
4453{
4454
4455 ;
4456 return 0;
4457}
4458_ACEOF
4459if ac_fn_c_try_compile "$LINENO"; then :
4460 acx_cv_prog_cc_pedantic_=yes
4461else
4462 acx_cv_prog_cc_pedantic_=no
4463fi
4464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4465CFLAGS="$save_CFLAGS"
4466fi
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic_" >&5
4468$as_echo "$acx_cv_prog_cc_pedantic_" >&6; }
4469if test $acx_cv_prog_cc_pedantic_ = yes; then :
4470 ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic "
5213506e
RW
4471fi
4472
4473fi
5213506e
RW
4474
4475
f50f17e6
YJ
4476if test "x$CC" != xcc; then
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4478$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
4479else
4480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4481$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4482fi
4483set dummy $CC; ac_cc=`$as_echo "$2" |
4484 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4485if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5213506e
RW
4486 $as_echo_n "(cached) " >&6
4487else
f50f17e6
YJ
4488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4489/* end confdefs.h. */
4490
4491int
4492main ()
4493{
4494
4495 ;
4496 return 0;
4497}
4498_ACEOF
4499# Make sure it works both with $CC and with simple cc.
4500# We do the test twice because some compilers refuse to overwrite an
4501# existing .o file with -o, though they will create one.
4502ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4503rm -f conftest2.*
4504if { { case "(($ac_try" in
4505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4506 *) ac_try_echo=$ac_try;;
4507esac
4508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4509$as_echo "$ac_try_echo"; } >&5
4510 (eval "$ac_try") 2>&5
4511 ac_status=$?
4512 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4513 test $ac_status = 0; } &&
4514 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4516 *) ac_try_echo=$ac_try;;
4517esac
4518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4519$as_echo "$ac_try_echo"; } >&5
4520 (eval "$ac_try") 2>&5
4521 ac_status=$?
4522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4523 test $ac_status = 0; };
4524then
4525 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
4526 if test "x$CC" != xcc; then
4527 # Test first that cc exists at all.
4528 if { ac_try='cc -c conftest.$ac_ext >&5'
4529 { { case "(($ac_try" in
4530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4531 *) ac_try_echo=$ac_try;;
5213506e 4532esac
f50f17e6
YJ
4533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4534$as_echo "$ac_try_echo"; } >&5
4535 (eval "$ac_try") 2>&5
4536 ac_status=$?
4537 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4538 test $ac_status = 0; }; }; then
4539 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4540 rm -f conftest2.*
4541 if { { case "(($ac_try" in
4542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4543 *) ac_try_echo=$ac_try;;
4544esac
4545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4546$as_echo "$ac_try_echo"; } >&5
4547 (eval "$ac_try") 2>&5
4548 ac_status=$?
4549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4550 test $ac_status = 0; } &&
4551 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4553 *) ac_try_echo=$ac_try;;
4554esac
4555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4556$as_echo "$ac_try_echo"; } >&5
4557 (eval "$ac_try") 2>&5
4558 ac_status=$?
4559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4560 test $ac_status = 0; };
4561 then
4562 # cc works too.
4563 :
4564 else
4565 # cc exists but doesn't like -o.
4566 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4567 fi
4568 fi
5213506e
RW
4569 fi
4570else
f50f17e6 4571 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5213506e 4572fi
f50f17e6 4573rm -f core conftest*
5213506e 4574
5213506e 4575fi
f50f17e6
YJ
4576if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4578$as_echo "yes" >&6; }
4579else
4580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
4582
4583$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5213506e 4584
f50f17e6 4585fi
5213506e 4586
f50f17e6
YJ
4587# autoconf is lame and doesn't give us any substitution variable for this.
4588if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
4589 NO_MINUS_C_MINUS_O=yes
4590else
4591 OUTPUT_OPTION='-o $@'
4592fi
4593
4594
4595
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4597$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4598if test "${ac_cv_c_const+set}" = set; then :
5213506e
RW
4599 $as_echo_n "(cached) " >&6
4600else
4601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ad49d865 4602/* end confdefs.h. */
fbc1bc09 4603
ad49d865
L
4604int
4605main ()
4606{
f50f17e6
YJ
4607/* FIXME: Include the comments suggested by Paul. */
4608#ifndef __cplusplus
4609 /* Ultrix mips cc rejects this. */
4610 typedef int charset[2];
4611 const charset cs;
4612 /* SunOS 4.1.1 cc rejects this. */
4613 char const *const *pcpcc;
4614 char **ppc;
4615 /* NEC SVR4.0.2 mips cc rejects this. */
4616 struct point {int x, y;};
4617 static struct point const zero = {0,0};
4618 /* AIX XL C 1.02.0.0 rejects this.
4619 It does not let you subtract one const X* pointer from another in
4620 an arm of an if-expression whose if-part is not a constant
4621 expression */
4622 const char *g = "string";
4623 pcpcc = &g + (g ? g-g : 0);
4624 /* HPUX 7.0 cc rejects these. */
4625 ++pcpcc;
4626 ppc = (char**) pcpcc;
4627 pcpcc = (char const *const *) ppc;
4628 { /* SCO 3.2v4 cc rejects this. */
4629 char *t;
4630 char const *s = 0 ? (char *) 0 : (char const *) 0;
4631
4632 *t++ = 0;
4633 if (s) return 0;
4634 }
4635 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4636 int x[] = {25, 17};
4637 const int *foo = &x[0];
4638 ++foo;
4639 }
4640 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4641 typedef const int *iptr;
4642 iptr p = 0;
4643 ++p;
4644 }
4645 { /* AIX XL C 1.02.0.0 rejects this saying
4646 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4647 struct s { int j; const int *ap[3]; };
4648 struct s *b; b->j = 5;
4649 }
4650 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4651 const int foo = 10;
4652 if (!foo) return 0;
4653 }
4654 return !cs[0] && !zero.x;
4655#endif
fbc1bc09 4656
ad49d865
L
4657 ;
4658 return 0;
4659}
4660_ACEOF
5213506e 4661if ac_fn_c_try_compile "$LINENO"; then :
f50f17e6 4662 ac_cv_c_const=yes
5213506e 4663else
f50f17e6 4664 ac_cv_c_const=no
5213506e
RW
4665fi
4666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5213506e 4667fi
f50f17e6
YJ
4668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4669$as_echo "$ac_cv_c_const" >&6; }
4670if test $ac_cv_c_const = no; then
5213506e 4671
f50f17e6 4672$as_echo "#define const /**/" >>confdefs.h
5213506e
RW
4673
4674fi
4675
f50f17e6
YJ
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4677$as_echo_n "checking for inline... " >&6; }
4678if test "${ac_cv_c_inline+set}" = set; then :
4679 $as_echo_n "(cached) " >&6
5213506e 4680else
f50f17e6
YJ
4681 ac_cv_c_inline=no
4682for ac_kw in inline __inline__ __inline; do
5213506e
RW
4683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4684/* end confdefs.h. */
f50f17e6
YJ
4685#ifndef __cplusplus
4686typedef int foo_t;
4687static $ac_kw foo_t static_foo () {return 0; }
4688$ac_kw foo_t foo () {return 0; }
24f2cabb 4689#endif
fbc1bc09 4690
238235ef 4691_ACEOF
f50f17e6
YJ
4692if ac_fn_c_try_compile "$LINENO"; then :
4693 ac_cv_c_inline=$ac_kw
5213506e 4694fi
f50f17e6
YJ
4695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4696 test "$ac_cv_c_inline" != no && break
4697done
5213506e
RW
4698
4699fi
f50f17e6
YJ
4700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4701$as_echo "$ac_cv_c_inline" >&6; }
5213506e 4702
f50f17e6
YJ
4703case $ac_cv_c_inline in
4704 inline | yes) ;;
4705 *)
4706 case $ac_cv_c_inline in
4707 no) ac_val=;;
4708 *) ac_val=$ac_cv_c_inline;;
4709 esac
4710 cat >>confdefs.h <<_ACEOF
4711#ifndef __cplusplus
4712#define inline $ac_val
4713#endif
5213506e 4714_ACEOF
f50f17e6
YJ
4715 ;;
4716esac
5213506e
RW
4717
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4719$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4720if test "${ac_cv_c_bigendian+set}" = set; then :
4721 $as_echo_n "(cached) " >&6
4722else
fbc1bc09 4723 ac_cv_c_bigendian=unknown
5213506e
RW
4724 # See if we're dealing with a universal compiler.
4725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726/* end confdefs.h. */
4727#ifndef __APPLE_CC__
4728 not a universal capable compiler
4729 #endif
4730 typedef int dummy;
4731
4732_ACEOF
4733if ac_fn_c_try_compile "$LINENO"; then :
4734
4735 # Check for potential -arch flags. It is not universal unless
4736 # there are at least two -arch flags with different values.
4737 ac_arch=
4738 ac_prev=
4739 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4740 if test -n "$ac_prev"; then
4741 case $ac_word in
4742 i?86 | x86_64 | ppc | ppc64)
4743 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4744 ac_arch=$ac_word
4745 else
4746 ac_cv_c_bigendian=universal
4747 break
4748 fi
4749 ;;
4750 esac
4751 ac_prev=
4752 elif test "x$ac_word" = "x-arch"; then
4753 ac_prev=arch
4754 fi
4755 done
4756fi
4757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4758 if test $ac_cv_c_bigendian = unknown; then
4759 # See if sys/param.h defines the BYTE_ORDER macro.
4760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4761/* end confdefs.h. */
4762#include <sys/types.h>
4763 #include <sys/param.h>
4764
4765int
4766main ()
4767{
4768#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4769 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4770 && LITTLE_ENDIAN)
4771 bogus endian macros
4772 #endif
4773
4774 ;
4775 return 0;
4776}
fbc1bc09 4777_ACEOF
5213506e
RW
4778if ac_fn_c_try_compile "$LINENO"; then :
4779 # It does; now see whether it defined to BIG_ENDIAN or not.
4780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
fbc1bc09 4781/* end confdefs.h. */
5213506e
RW
4782#include <sys/types.h>
4783 #include <sys/param.h>
4784
fbc1bc09
KC
4785int
4786main ()
4787{
5213506e
RW
4788#if BYTE_ORDER != BIG_ENDIAN
4789 not big endian
4790 #endif
4791
fbc1bc09
KC
4792 ;
4793 return 0;
4794}
4795_ACEOF
5213506e 4796if ac_fn_c_try_compile "$LINENO"; then :
fbc1bc09 4797 ac_cv_c_bigendian=yes
5213506e
RW
4798else
4799 ac_cv_c_bigendian=no
fbc1bc09 4800fi
5213506e 4801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fbc1bc09 4802fi
5213506e
RW
4803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4804 fi
4805 if test $ac_cv_c_bigendian = unknown; then
4806 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4808/* end confdefs.h. */
4809#include <limits.h>
fbc1bc09 4810
5213506e
RW
4811int
4812main ()
4813{
4814#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4815 bogus endian macros
4816 #endif
4817
4818 ;
4819 return 0;
4820}
24f2cabb 4821_ACEOF
5213506e
RW
4822if ac_fn_c_try_compile "$LINENO"; then :
4823 # It does; now see whether it defined to _BIG_ENDIAN or not.
4824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24f2cabb 4825/* end confdefs.h. */
5213506e
RW
4826#include <limits.h>
4827
fbc1bc09
KC
4828int
4829main ()
4830{
5213506e
RW
4831#ifndef _BIG_ENDIAN
4832 not big endian
4833 #endif
4834
4835 ;
4836 return 0;
24f2cabb 4837}
238235ef 4838_ACEOF
5213506e
RW
4839if ac_fn_c_try_compile "$LINENO"; then :
4840 ac_cv_c_bigendian=yes
24f2cabb 4841else
5213506e 4842 ac_cv_c_bigendian=no
5cc5a0d0 4843fi
5213506e 4844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24f2cabb 4845fi
5213506e
RW
4846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4847 fi
4848 if test $ac_cv_c_bigendian = unknown; then
4849 # Compile a test program.
4850 if test "$cross_compiling" = yes; then :
4851 # Try to guess by grepping values from an object file.
4852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4853/* end confdefs.h. */
4854short int ascii_mm[] =
4855 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4856 short int ascii_ii[] =
4857 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4858 int use_ascii (int i) {
4859 return ascii_mm[i] + ascii_ii[i];
4860 }
4861 short int ebcdic_ii[] =
4862 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4863 short int ebcdic_mm[] =
4864 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4865 int use_ebcdic (int i) {
4866 return ebcdic_mm[i] + ebcdic_ii[i];
4867 }
4868 extern int foo;
4869
4870int
4871main ()
4872{
4873return use_ascii (foo) == use_ebcdic (foo);
4874 ;
4875 return 0;
4876}
4877_ACEOF
4878if ac_fn_c_try_compile "$LINENO"; then :
4879 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4880 ac_cv_c_bigendian=yes
4881 fi
4882 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4883 if test "$ac_cv_c_bigendian" = unknown; then
4884 ac_cv_c_bigendian=no
4885 else
4886 # finding both strings is unlikely to happen, but who knows?
4887 ac_cv_c_bigendian=unknown
4888 fi
4889 fi
4890fi
4891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4892else
4893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4894/* end confdefs.h. */
4895$ac_includes_default
4896int
4897main ()
4898{
4899
4900 /* Are we little or big endian? From Harbison&Steele. */
4901 union
4902 {
4903 long int l;
4904 char c[sizeof (long int)];
4905 } u;
4906 u.l = 1;
4907 return u.c[sizeof (long int) - 1] == 1;
4908
4909 ;
4910 return 0;
4911}
4912_ACEOF
4913if ac_fn_c_try_run "$LINENO"; then :
4914 ac_cv_c_bigendian=no
4915else
4916 ac_cv_c_bigendian=yes
24f2cabb 4917fi
5213506e
RW
4918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4919 conftest.$ac_objext conftest.beam conftest.$ac_ext
24f2cabb 4920fi
238235ef 4921
5213506e
RW
4922 fi
4923fi
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4925$as_echo "$ac_cv_c_bigendian" >&6; }
4926 case $ac_cv_c_bigendian in #(
4927 yes)
4928 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4929;; #(
4930 no)
4931 ;; #(
4932 universal)
4933
4934$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4935
4936 ;; #(
4937 *)
4938 as_fn_error "unknown endianness
4939 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4940 esac
5cc5a0d0 4941
0bc0cd11
JL
4942
4943
4944
5213506e 4945ac_config_headers="$ac_config_headers config.h:config.in"
0bc0cd11
JL
4946
4947
4948
4949# Find a good install program. We prefer a C program (faster),
4950# so one script is as good as another. But avoid the broken or
4951# incompatible versions:
4952# SysV /etc/install, /usr/sbin/install
4953# SunOS /usr/etc/install
4954# IRIX /sbin/install
4955# AIX /bin/install
238235ef 4956# AmigaOS /C/install, which installs bootblocks on floppy discs
0bc0cd11
JL
4957# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4958# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4959# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3beb1315 4960# OS/2's system install, which has a completely different semantic
0bc0cd11 4961# ./install, which can be erroneously created by make from ./install.sh.
5213506e
RW
4962# Reject install programs that cannot install multiple files.
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4964$as_echo_n "checking for a BSD-compatible install... " >&6; }
0bc0cd11 4965if test -z "$INSTALL"; then
5213506e
RW
4966if test "${ac_cv_path_install+set}" = set; then :
4967 $as_echo_n "(cached) " >&6
238235ef
DJ
4968else
4969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4970for as_dir in $PATH
4971do
4972 IFS=$as_save_IFS
4973 test -z "$as_dir" && as_dir=.
5213506e
RW
4974 # Account for people who put trailing slashes in PATH elements.
4975case $as_dir/ in #((
4976 ./ | .// | /[cC]/* | \
238235ef 4977 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5213506e 4978 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
238235ef
DJ
4979 /usr/ucb/* ) ;;
4980 *)
4981 # OSF1 and SCO ODT 3.0 have their own names for install.
4982 # Don't use installbsd from OSF since it installs stuff as root
4983 # by default.
4984 for ac_prog in ginstall scoinst install; do
4985 for ac_exec_ext in '' $ac_executable_extensions; do
5213506e 4986 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3beb1315
HPN
4987 if test $ac_prog = install &&
4988 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4989 # AIX install. It has an incompatible calling convention.
4990 :
4991 elif test $ac_prog = install &&
4992 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4993 # program-specific install script used by HP pwplus--don't use.
4994 :
4995 else
5213506e
RW
4996 rm -rf conftest.one conftest.two conftest.dir
4997 echo one > conftest.one
4998 echo two > conftest.two
4999 mkdir conftest.dir
5000 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5001 test -s conftest.one && test -s conftest.two &&
5002 test -s conftest.dir/conftest.one &&
5003 test -s conftest.dir/conftest.two
5004 then
5005 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5006 break 3
5007 fi
3beb1315
HPN
5008 fi
5009 fi
0bc0cd11 5010 done
238235ef
DJ
5011 done
5012 ;;
5013esac
238235ef 5014
5213506e
RW
5015 done
5016IFS=$as_save_IFS
5017
5018rm -rf conftest.one conftest.two conftest.dir
0bc0cd11
JL
5019
5020fi
5021 if test "${ac_cv_path_install+set}" = set; then
238235ef 5022 INSTALL=$ac_cv_path_install
0bc0cd11 5023 else
5213506e
RW
5024 # As a last resort, use the slow shell script. Don't cache a
5025 # value for INSTALL within a source directory, because that will
0bc0cd11 5026 # break other packages using the cache if that directory is
5213506e 5027 # removed, or if the value is a relative name.
238235ef 5028 INSTALL=$ac_install_sh
0bc0cd11
JL
5029 fi
5030fi
5213506e
RW
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5032$as_echo "$INSTALL" >&6; }
0bc0cd11
JL
5033
5034# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5035# It thinks the first close brace ends the variable substitution.
5036test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5037
238235ef 5038test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
687361c8 5039
0bc0cd11
JL
5040test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5041
5042
769b009e
KC
5043# Don't build the shared library for build.
5044if [ -n "${with_build_subdir}" ]; then
5045 enable_shared=no
5046fi
5047
5048frag=
5049case "${host}" in
5050 rs6000-ibm-aix3.1 | rs6000-ibm-aix)
5051 frag=mh-aix ;;
5052 *-*-cxux7*) frag=mh-cxux7 ;;
5053 *-*-freebsd2.1.*) frag=mh-fbsd21 ;;
5054 *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;;
5055 i370-*-opened*) frag=mh-openedition ;;
5056 i[34567]86-*-windows*) frag=mh-windows ;;
5057esac
5058
5059if [ -n "${frag}" ]; then
c91c9c2e 5060 frag=${libiberty_topdir}/libiberty/config/$frag
769b009e
KC
5061fi
5062
e3aa9eba
RO
5063
5064
5065
5066
5067case "${host}" in
5068 # PIC is the default on some targets or must not be used.
5069 *-*-darwin*)
cacf1f59
JJ
5070 # For darwin, common symbols are not allowed in MH_DYLIB files
5071 case "${CFLAGS}" in
5072 # If we are using a compiler supporting mdynamic-no-pic
5073 # and the option has been tested as safe to add, then cancel
5074 # it here, since the code generated is incompatible with shared
5075 # libs.
5076 *-mdynamic-no-pic*) PICFLAG='-fno-common -mno-dynamic-no-pic' ;;
5077 *) PICFLAG=-fno-common ;;
5078 esac
e3aa9eba
RO
5079 ;;
5080 alpha*-dec-osf5*)
5081 # PIC is the default.
5082 ;;
5083 hppa*64*-*-hpux*)
5084 # PIC is the default for 64-bit PA HP-UX.
5085 ;;
071928d9
KT
5086 i[34567]86-*-cygwin* | x86_64-*-cygwin*)
5087 ;;
5088 i[34567]86-*-mingw* | x86_64-*-mingw*)
e3aa9eba 5089 ;;
daecebc8 5090 i[34567]86-*-interix[3-9]*)
e3aa9eba
RO
5091 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5092 # Instead, we relocate shared libraries at runtime.
5093 ;;
5094 i[34567]86-*-nto-qnx*)
5095 # QNX uses GNU C++, but need to define -shared option too, otherwise
5096 # it will coredump.
5097 PICFLAG='-fPIC -shared'
5098 ;;
5099 i[34567]86-pc-msdosdjgpp*)
5100 # DJGPP does not support shared libraries at all.
5101 ;;
5102 ia64*-*-hpux*)
5103 # On IA64 HP-UX, PIC is the default but the pic flag
5104 # sets the default TLS model and affects inlining.
5105 PICFLAG=-fPIC
5106 ;;
5107 mips-sgi-irix6*)
5108 # PIC is the default.
5109 ;;
5110 rs6000-ibm-aix* | powerpc-ibm-aix*)
5111 # All AIX code is PIC.
5112 ;;
5113
5114 # Some targets support both -fPIC and -fpic, but prefer the latter.
5115 # FIXME: Why?
5116 i[34567]86-*-* | x86_64-*-*)
5117 PICFLAG=-fpic
5118 ;;
e3aa9eba
RO
5119 # FIXME: Override -fPIC default in libgcc only?
5120 sh-*-linux* | sh[2346lbe]*-*-linux*)
5121 PICFLAG=-fpic
5122 ;;
5123 # FIXME: Simplify to sh*-*-netbsd*?
5124 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
5125 sh64-*-netbsd* | sh64l*-*-netbsd*)
5126 PICFLAG=-fpic
5127 ;;
5128 # Default to -fPIC unless specified otherwise.
5129 *)
5130 PICFLAG=-fPIC
5131 ;;
5132esac
5133
5134# If the user explicitly uses -fpic/-fPIC, keep that.
5135case "${CFLAGS}" in
5136 *-fpic*)
5137 PICFLAG=-fpic
5138 ;;
5139 *-fPIC*)
5140 PICFLAG=-fPIC
5141 ;;
5142esac
5143
5144
769b009e
KC
5145# If they didn't specify --enable-shared, don't generate shared libs.
5146case "${enable_shared}" in
5147 yes) shared=yes ;;
5148 no) shared=no ;;
5149 "") shared=no ;;
5150 *) shared=yes ;;
5151esac
459260ec
DM
5152
5153# ...unless --enable-host-shared was passed from top-level config:
5154if [ "${enable_host_shared}" = "yes" ]; then
5155 shared=yes
5156fi
5157
e3aa9eba
RO
5158if [ "${shared}" != "yes" ]; then
5159 PICFLAG=
769b009e
KC
5160fi
5161
c91c9c2e 5162
4f148bbc
JJ
5163NOASANFLAG=
5164case " ${CFLAGS} " in
5165 *\ -fsanitize=address\ *) NOASANFLAG=-fno-sanitize=address ;;
5166esac
5167
5168
769b009e
KC
5169echo "# Warning: this fragment is automatically generated" > temp-frag
5170
c91c9c2e
PB
5171if [ -n "${frag}" ] && [ -f "${frag}" ]; then
5172 echo "Appending ${frag} to xhost-mkfrag"
5173 echo "# Following fragment copied from ${frag}" >> temp-frag
5174 cat ${frag} >> temp-frag
5175fi
769b009e
KC
5176
5177# record if we want to build shared libs.
5178if [ "${shared}" = "yes" ]; then
5179 echo enable_shared = yes >> temp-frag
5180else
5181 echo enable_shared = no >> temp-frag
5182fi
5183
5184frag=xhost-mkfrag
5185${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
5186
0bc0cd11
JL
5187host_makefile_frag=${frag}
5188
5189
5190# It's OK to check for header files. Although the compiler may not be
5191# able to link anything, it had better be able to at least compile
5192# something.
52ae149d 5193for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h
5213506e
RW
5194do :
5195 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5196ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
5197eval as_val=\$$as_ac_Header
5198 if test "x$as_val" = x""yes; then :
238235ef 5199 cat >>confdefs.h <<_ACEOF
5213506e 5200#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
238235ef
DJ
5201_ACEOF
5202
5203fi
238235ef
DJ
5204done
5205
5213506e
RW
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
5207$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5208if test "${ac_cv_header_sys_wait_h+set}" = set; then :
5209 $as_echo_n "(cached) " >&6
238235ef 5210else
5213506e 5211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef 5212/* end confdefs.h. */
d3982b71 5213#include <sys/types.h>
238235ef
DJ
5214#include <sys/wait.h>
5215#ifndef WEXITSTATUS
5213506e 5216# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
fdfc290b 5217#endif
238235ef
DJ
5218#ifndef WIFEXITED
5219# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5220#endif
5221
5222int
5223main ()
5224{
5225 int s;
5226 wait (&s);
5227 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5228 ;
5229 return 0;
5230}
5231_ACEOF
5213506e 5232if ac_fn_c_try_compile "$LINENO"; then :
238235ef 5233 ac_cv_header_sys_wait_h=yes
d3982b71 5234else
5213506e 5235 ac_cv_header_sys_wait_h=no
d3982b71 5236fi
5213506e 5237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef 5238fi
5213506e
RW
5239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
5240$as_echo "$ac_cv_header_sys_wait_h" >&6; }
238235ef
DJ
5241if test $ac_cv_header_sys_wait_h = yes; then
5242
5213506e 5243$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
b033df90
DJ
5244
5245fi
5246
5213506e
RW
5247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
5248$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5249if test "${ac_cv_header_time+set}" = set; then :
5250 $as_echo_n "(cached) " >&6
b033df90 5251else
5213506e 5252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b033df90
DJ
5253/* end confdefs.h. */
5254#include <sys/types.h>
5255#include <sys/time.h>
5256#include <time.h>
5257
5258int
5259main ()
5260{
5261if ((struct tm *) 0)
5262return 0;
5263 ;
5264 return 0;
5265}
5266_ACEOF
5213506e 5267if ac_fn_c_try_compile "$LINENO"; then :
b033df90
DJ
5268 ac_cv_header_time=yes
5269else
5213506e 5270 ac_cv_header_time=no
b033df90 5271fi
5213506e 5272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90 5273fi
5213506e
RW
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
5275$as_echo "$ac_cv_header_time" >&6; }
b033df90
DJ
5276if test $ac_cv_header_time = yes; then
5277
5213506e 5278$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
b033df90
DJ
5279
5280fi
5281
5282
5213506e
RW
5283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether errno must be declared" >&5
5284$as_echo_n "checking whether errno must be declared... " >&6; }
5285if test "${libiberty_cv_declare_errno+set}" = set; then :
5286 $as_echo_n "(cached) " >&6
b033df90 5287else
5213506e 5288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
b033df90
DJ
5289/* end confdefs.h. */
5290#include <errno.h>
5291int
5292main ()
5293{
5294int x = errno;
5295 ;
5296 return 0;
5297}
5298_ACEOF
5213506e 5299if ac_fn_c_try_compile "$LINENO"; then :
b033df90
DJ
5300 libiberty_cv_declare_errno=no
5301else
5213506e 5302 libiberty_cv_declare_errno=yes
b033df90 5303fi
5213506e 5304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90 5305fi
5213506e
RW
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libiberty_cv_declare_errno" >&5
5307$as_echo "$libiberty_cv_declare_errno" >&6; }
b033df90
DJ
5308if test $libiberty_cv_declare_errno = yes
5309then
5213506e 5310$as_echo "#define NEED_DECLARATION_ERRNO 1" >>confdefs.h
b033df90
DJ
5311
5312fi
5313
5314
ea41822a 5315# Determine sizes of some types.
5213506e
RW
5316# The cast to long int works around a bug in the HP C Compiler
5317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5319# This bug is HP SR number 8606223364.
5320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
5321$as_echo_n "checking size of int... " >&6; }
5322if test "${ac_cv_sizeof_int+set}" = set; then :
5323 $as_echo_n "(cached) " >&6
5324else
5325 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
5326
5327else
5328 if test "$ac_cv_type_int" = yes; then
5329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5331{ as_fn_set_status 77
5332as_fn_error "cannot compute sizeof (int)
5333See \`config.log' for more details." "$LINENO" 5; }; }
5334 else
5335 ac_cv_sizeof_int=0
5336 fi
b033df90 5337fi
b033df90 5338
5213506e
RW
5339fi
5340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
5341$as_echo "$ac_cv_sizeof_int" >&6; }
b033df90 5342
b033df90 5343
b033df90 5344
5213506e
RW
5345cat >>confdefs.h <<_ACEOF
5346#define SIZEOF_INT $ac_cv_sizeof_int
b033df90 5347_ACEOF
b033df90 5348
b033df90 5349
ea41822a
YG
5350# The cast to long int works around a bug in the HP C Compiler
5351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5353# This bug is HP SR number 8606223364.
5354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
5355$as_echo_n "checking size of long... " >&6; }
5356if test "${ac_cv_sizeof_long+set}" = set; then :
5357 $as_echo_n "(cached) " >&6
5358else
5359 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
5360
5361else
5362 if test "$ac_cv_type_long" = yes; then
5363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5365{ as_fn_set_status 77
5366as_fn_error "cannot compute sizeof (long)
5367See \`config.log' for more details." "$LINENO" 5; }; }
5368 else
5369 ac_cv_sizeof_long=0
5370 fi
5371fi
5372
5373fi
5374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
5375$as_echo "$ac_cv_sizeof_long" >&6; }
5376
5377
5378
5379cat >>confdefs.h <<_ACEOF
5380#define SIZEOF_LONG $ac_cv_sizeof_long
5381_ACEOF
5382
5383
5384
5385# Check for presense of long long
5386ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
5387if test "x$ac_cv_type_long_long" = x""yes; then :
5388
5389$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
5390 # The cast to long int works around a bug in the HP C Compiler
5391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5393# This bug is HP SR number 8606223364.
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
5395$as_echo_n "checking size of long long... " >&6; }
5396if test "${ac_cv_sizeof_long_long+set}" = set; then :
5397 $as_echo_n "(cached) " >&6
5398else
5399 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
5400
5401else
5402 if test "$ac_cv_type_long_long" = yes; then
5403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5405{ as_fn_set_status 77
5406as_fn_error "cannot compute sizeof (long long)
5407See \`config.log' for more details." "$LINENO" 5; }; }
5408 else
5409 ac_cv_sizeof_long_long=0
5410 fi
5411fi
5412
5413fi
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
5415$as_echo "$ac_cv_sizeof_long_long" >&6; }
5416
5417
5418
5419cat >>confdefs.h <<_ACEOF
5420#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
5421_ACEOF
5422
5423
5424fi
5425
b033df90 5426
5213506e
RW
5427# Look for a 64-bit type.
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a 64-bit type" >&5
5429$as_echo_n "checking for a 64-bit type... " >&6; }
5430if test "${liberty_cv_uint64+set}" = set; then :
5431 $as_echo_n "(cached) " >&6
238235ef 5432else
5213506e
RW
5433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5434/* end confdefs.h. */
5435#ifdef HAVE_STDINT_H
5436#include <stdint.h>
5437#endif
5438int
5439main ()
5440{
5441extern uint64_t foo;
5442 ;
5443 return 0;
5444}
238235ef 5445_ACEOF
5213506e
RW
5446if ac_fn_c_try_compile "$LINENO"; then :
5447 liberty_cv_uint64=uint64_t
5448else
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef 5450/* end confdefs.h. */
5213506e
RW
5451#ifdef HAVE_LIMITS_H
5452#include <limits.h>
5453#endif
5454#ifndef CHAR_BIT
5455#define CHAR_BIT 8
b033df90 5456#endif
238235ef
DJ
5457int
5458main ()
5459{
5213506e
RW
5460extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];
5461 ;
5462 return 0;
238235ef
DJ
5463}
5464_ACEOF
5213506e
RW
5465if ac_fn_c_try_compile "$LINENO"; then :
5466 liberty_cv_uint64="unsigned long"
238235ef 5467else
5213506e
RW
5468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5469/* end confdefs.h. */
5470#ifdef HAVE_LIMITS_H
5471#include <limits.h>
5472#endif
5473#ifndef CHAR_BIT
5474#define CHAR_BIT 8
5475#endif
5476int
5477main ()
5478{
5479extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];
5480 ;
5481 return 0;
5482}
5483_ACEOF
5484if ac_fn_c_try_compile "$LINENO"; then :
5485 liberty_cv_uint64="unsigned long long"
5486else
5487 liberty_cv_uint64=none
238235ef 5488fi
5213506e 5489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
238235ef 5490fi
5213506e 5491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90 5492fi
5213506e 5493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b033df90 5494fi
238235ef 5495
5213506e
RW
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $liberty_cv_uint64" >&5
5497$as_echo "$liberty_cv_uint64" >&6; }
5498if test "$liberty_cv_uint64" != none; then
5499
5500cat >>confdefs.h <<_ACEOF
5501#define UNSIGNED_64BIT_TYPE $liberty_cv_uint64
238235ef
DJ
5502_ACEOF
5503
5504fi
5505
0e497905
OS
5506
5507 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
5508if test "x$ac_cv_type_intptr_t" = x""yes; then :
5509
5510$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
5511
5512else
5513 for ac_type in 'int' 'long int' 'long long int'; do
5514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h. */
5516$ac_includes_default
5517int
5518main ()
5519{
5520static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
5521test_array [0] = 0
5522
5523 ;
5524 return 0;
5525}
5526_ACEOF
5527if ac_fn_c_try_compile "$LINENO"; then :
5528
5529cat >>confdefs.h <<_ACEOF
5530#define intptr_t $ac_type
5531_ACEOF
5532
5533 ac_type=
5534fi
5535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5536 test -z "$ac_type" && break
5537 done
5538fi
5539
5540
5541
5542 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
5543if test "x$ac_cv_type_uintptr_t" = x""yes; then :
5544
5545$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
5546
5547else
5548 for ac_type in 'unsigned int' 'unsigned long int' \
5549 'unsigned long long int'; do
5550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5551/* end confdefs.h. */
5552$ac_includes_default
5553int
5554main ()
5555{
5556static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
5557test_array [0] = 0
5558
5559 ;
5560 return 0;
5561}
5562_ACEOF
5563if ac_fn_c_try_compile "$LINENO"; then :
5564
5565cat >>confdefs.h <<_ACEOF
5566#define uintptr_t $ac_type
5567_ACEOF
5568
5569 ac_type=
5570fi
5571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5572 test -z "$ac_type" && break
5573 done
5574fi
5575
5576
1cfabf34
ILT
5577ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
5578if test "x$ac_cv_type_ssize_t" = x""yes; then :
5579
5580else
5581
5582cat >>confdefs.h <<_ACEOF
5583#define ssize_t int
5584_ACEOF
5585
5586fi
5587
0e497905 5588
5213506e
RW
5589# Given the above check, we always have uintptr_t or a fallback
5590# definition. So define HAVE_UINTPTR_T in case any imported code
5591# relies on it.
238235ef 5592
5213506e 5593$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
b033df90
DJ
5594
5595
5213506e
RW
5596ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
5597if test "x$ac_cv_type_pid_t" = x""yes; then :
b033df90 5598
5213506e 5599else
b033df90 5600
5213506e
RW
5601cat >>confdefs.h <<_ACEOF
5602#define pid_t int
5603_ACEOF
b033df90 5604
5213506e 5605fi
b033df90
DJ
5606
5607
5213506e
RW
5608# This is the list of functions which libiberty will provide if they
5609# are not available on the host.
b033df90 5610
5213506e
RW
5611funcs="asprintf"
5612funcs="$funcs atexit"
5613funcs="$funcs basename"
5614funcs="$funcs bcmp"
5615funcs="$funcs bcopy"
5616funcs="$funcs bsearch"
5617funcs="$funcs bzero"
5618funcs="$funcs calloc"
5619funcs="$funcs clock"
5620funcs="$funcs ffs"
5621funcs="$funcs getcwd"
5622funcs="$funcs getpagesize"
5623funcs="$funcs gettimeofday"
5624funcs="$funcs index"
5625funcs="$funcs insque"
5626funcs="$funcs memchr"
5627funcs="$funcs memcmp"
5628funcs="$funcs memcpy"
5629funcs="$funcs memmem"
5630funcs="$funcs memmove"
5631funcs="$funcs mempcpy"
5632funcs="$funcs memset"
5633funcs="$funcs mkstemps"
5634funcs="$funcs putenv"
5635funcs="$funcs random"
5636funcs="$funcs rename"
5637funcs="$funcs rindex"
5638funcs="$funcs setenv"
5639funcs="$funcs snprintf"
5640funcs="$funcs sigsetmask"
5641funcs="$funcs stpcpy"
5642funcs="$funcs stpncpy"
5643funcs="$funcs strcasecmp"
5644funcs="$funcs strchr"
5645funcs="$funcs strdup"
5646funcs="$funcs strncasecmp"
5647funcs="$funcs strndup"
9a9baa52 5648funcs="$funcs strnlen"
5213506e
RW
5649funcs="$funcs strrchr"
5650funcs="$funcs strstr"
5651funcs="$funcs strtod"
5652funcs="$funcs strtol"
5653funcs="$funcs strtoul"
ea41822a
YG
5654funcs="$funcs strtoll"
5655funcs="$funcs strtoull"
5213506e
RW
5656funcs="$funcs strverscmp"
5657funcs="$funcs tmpnam"
5658funcs="$funcs vasprintf"
5659funcs="$funcs vfprintf"
5660funcs="$funcs vprintf"
5661funcs="$funcs vsnprintf"
5662funcs="$funcs vsprintf"
5663funcs="$funcs waitpid"
6e9bd0f8 5664funcs="$funcs setproctitle"
238235ef 5665
5213506e
RW
5666# Also in the old function.def file: alloca, vfork, getopt.
5667
5668vars="sys_errlist sys_nerr sys_siglist"
5669
d423df48
JJ
5670checkfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \
5671 getsysinfo gettimeofday on_exit psignal pstat_getdynamic pstat_getstatic \
5672 realpath setrlimit sbrk spawnve spawnvpe strerror strsignal sysconf sysctl \
5673 sysmp table times wait3 wait4"
5213506e
RW
5674
5675# These are neither executed nor required, but they help keep
5676# autoheader happy without adding a bunch of text to acconfig.h.
5677if test "x" = "y"; then
59a8dc25
BE
5678 for ac_func in asprintf atexit \
5679 basename bcmp bcopy bsearch bzero \
5680 calloc canonicalize_file_name clock \
3b63ca7e 5681 dup3 \
59a8dc25 5682 ffs __fsetlocking \
d423df48 5683 getcwd getpagesize getrlimit getrusage getsysinfo gettimeofday \
59a8dc25
BE
5684 index insque \
5685 memchr memcmp memcpy memmem memmove memset mkstemps \
5686 on_exit \
5687 psignal pstat_getdynamic pstat_getstatic putenv \
5688 random realpath rename rindex \
d423df48 5689 sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
3b63ca7e 5690 stpcpy stpncpy strcasecmp strchr strdup \
9a9baa52 5691 strerror strncasecmp strndup strnlen strrchr strsignal strstr strtod \
ea41822a 5692 strtol strtoul strtoll strtoull strverscmp sysconf sysctl sysmp \
59a8dc25
BE
5693 table times tmpnam \
5694 vasprintf vfprintf vprintf vsprintf \
5695 wait3 wait4 waitpid
5213506e
RW
5696do :
5697 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5698ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5699eval as_val=\$$as_ac_var
5700 if test "x$as_val" = x""yes; then :
b033df90 5701 cat >>confdefs.h <<_ACEOF
5213506e 5702#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
238235ef
DJ
5703_ACEOF
5704
5705fi
b033df90 5706done
238235ef 5707
c3f247f4
RW
5708 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
5709if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
5213506e 5710 ac_have_decl=1
d49d0907 5711else
5213506e
RW
5712 ac_have_decl=0
5713fi
5714
5715cat >>confdefs.h <<_ACEOF
5716#define HAVE_DECL_BASENAME $ac_have_decl
d49d0907 5717_ACEOF
5213506e
RW
5718ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
5719if test "x$ac_cv_have_decl_ffs" = x""yes; then :
5720 ac_have_decl=1
d49d0907 5721else
5213506e 5722 ac_have_decl=0
d49d0907 5723fi
5213506e
RW
5724
5725cat >>confdefs.h <<_ACEOF
5726#define HAVE_DECL_FFS $ac_have_decl
5727_ACEOF
5728ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
5729if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
5730 ac_have_decl=1
5731else
5732 ac_have_decl=0
d49d0907 5733fi
d49d0907 5734
5213506e
RW
5735cat >>confdefs.h <<_ACEOF
5736#define HAVE_DECL_ASPRINTF $ac_have_decl
5737_ACEOF
5738ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
5739if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
5740 ac_have_decl=1
d49d0907 5741else
5213506e
RW
5742 ac_have_decl=0
5743fi
5744
5745cat >>confdefs.h <<_ACEOF
5746#define HAVE_DECL_VASPRINTF $ac_have_decl
d49d0907 5747_ACEOF
5213506e
RW
5748ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
5749if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
5750 ac_have_decl=1
5751else
5752 ac_have_decl=0
5753fi
d49d0907 5754
5213506e
RW
5755cat >>confdefs.h <<_ACEOF
5756#define HAVE_DECL_SNPRINTF $ac_have_decl
d49d0907 5757_ACEOF
5213506e
RW
5758ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
5759if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
5760 ac_have_decl=1
5761else
5762 ac_have_decl=0
5763fi
5764
5765cat >>confdefs.h <<_ACEOF
5766#define HAVE_DECL_VSNPRINTF $ac_have_decl
d49d0907 5767_ACEOF
ea41822a
YG
5768ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
5769if test "x$ac_cv_have_decl_strtol" = x""yes; then :
5770 ac_have_decl=1
5771else
5772 ac_have_decl=0
5773fi
5774
5775cat >>confdefs.h <<_ACEOF
5776#define HAVE_DECL_STRTOL $ac_have_decl
5777_ACEOF
5778ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
5779if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
5780 ac_have_decl=1
5781else
5782 ac_have_decl=0
5783fi
5784
5785cat >>confdefs.h <<_ACEOF
5786#define HAVE_DECL_STRTOUL $ac_have_decl
5787_ACEOF
5788ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
5789if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
5790 ac_have_decl=1
5791else
5792 ac_have_decl=0
5793fi
5794
5795cat >>confdefs.h <<_ACEOF
5796#define HAVE_DECL_STRTOLL $ac_have_decl
5797_ACEOF
5798ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
5799if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
5800 ac_have_decl=1
5801else
5802 ac_have_decl=0
5803fi
5804
5805cat >>confdefs.h <<_ACEOF
5806#define HAVE_DECL_STRTOULL $ac_have_decl
5807_ACEOF
d49d0907 5808
d49d0907 5809
5213506e 5810$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
d49d0907 5811
d49d0907 5812
5213506e 5813$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
d49d0907 5814
d49d0907 5815
5213506e 5816$as_echo "#define HAVE_SYS_SIGLIST 1" >>confdefs.h
d49d0907 5817
d49d0907 5818fi
d49d0907 5819
5213506e
RW
5820# For each of these functions, if the host does not provide the
5821# function we want to put FN.o in LIBOBJS, and if the host does
5822# provide the function, we want to define HAVE_FN in config.h.
d49d0907 5823
5213506e
RW
5824setobjs=
5825CHECK=
5213506e 5826if test -n "${with_target_subdir}"; then
d49d0907 5827
5213506e
RW
5828 # We are being configured as a target library. AC_REPLACE_FUNCS
5829 # may not work correctly, because the compiler may not be able to
5830 # link executables. Note that we may still be being configured
5831 # native.
d49d0907 5832
5213506e
RW
5833 # If we are being configured for newlib, we know which functions
5834 # newlib provide and which ones we will be expected to provide.
d49d0907 5835
5213506e
RW
5836 if test "x${with_newlib}" = "xyes"; then
5837 case " $LIBOBJS " in
5838 *" asprintf.$ac_objext "* ) ;;
5839 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
5840 ;;
5841esac
d49d0907 5842
5213506e
RW
5843 case " $LIBOBJS " in
5844 *" basename.$ac_objext "* ) ;;
5845 *) LIBOBJS="$LIBOBJS basename.$ac_objext"
5846 ;;
5847esac
d49d0907 5848
5213506e
RW
5849 case " $LIBOBJS " in
5850 *" insque.$ac_objext "* ) ;;
5851 *) LIBOBJS="$LIBOBJS insque.$ac_objext"
5852 ;;
5853esac
d49d0907 5854
5213506e
RW
5855 case " $LIBOBJS " in
5856 *" random.$ac_objext "* ) ;;
5857 *) LIBOBJS="$LIBOBJS random.$ac_objext"
5858 ;;
5859esac
d3982b71 5860
5213506e
RW
5861 case " $LIBOBJS " in
5862 *" strdup.$ac_objext "* ) ;;
5863 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
5864 ;;
5865esac
238235ef 5866
5213506e
RW
5867 case " $LIBOBJS " in
5868 *" vasprintf.$ac_objext "* ) ;;
5869 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
5870 ;;
5871esac
5872
5873
5874 for f in $funcs; do
5875 case "$f" in
5876 asprintf | basename | insque | random | strdup | vasprintf)
5877 ;;
5878 *)
5879 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5880 cat >>confdefs.h <<_ACEOF
5881#define $n 1
238235ef 5882_ACEOF
fdfc290b 5883
5213506e
RW
5884 ;;
5885 esac
5886 done
238235ef 5887
5213506e
RW
5888 # newlib doesnt provide any of the variables in $vars, so we
5889 # dont have to check them here.
238235ef 5890
5213506e
RW
5891 # Of the functions in $checkfuncs, newlib only has strerror.
5892 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
238235ef
DJ
5893
5894
5213506e 5895 setobjs=yes
238235ef 5896
5213506e 5897 fi
238235ef 5898
5213506e
RW
5899 # If we are being configured for Mingw, we know which functions
5900 # Mingw provides and which ones we will be expected to provide.
238235ef 5901
5213506e
RW
5902 case "${host}" in
5903 *-*-mingw*)
5904 case " $LIBOBJS " in
5905 *" asprintf.$ac_objext "* ) ;;
5906 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
5907 ;;
5908esac
238235ef 5909
5213506e
RW
5910 case " $LIBOBJS " in
5911 *" basename.$ac_objext "* ) ;;
5912 *) LIBOBJS="$LIBOBJS basename.$ac_objext"
5913 ;;
5914esac
238235ef 5915
5213506e
RW
5916 case " $LIBOBJS " in
5917 *" bcmp.$ac_objext "* ) ;;
5918 *) LIBOBJS="$LIBOBJS bcmp.$ac_objext"
5919 ;;
5920esac
238235ef 5921
5213506e
RW
5922 case " $LIBOBJS " in
5923 *" bcopy.$ac_objext "* ) ;;
5924 *) LIBOBJS="$LIBOBJS bcopy.$ac_objext"
5925 ;;
5926esac
238235ef 5927
5213506e
RW
5928 case " $LIBOBJS " in
5929 *" bzero.$ac_objext "* ) ;;
5930 *) LIBOBJS="$LIBOBJS bzero.$ac_objext"
5931 ;;
5932esac
238235ef 5933
5213506e
RW
5934 case " $LIBOBJS " in
5935 *" clock.$ac_objext "* ) ;;
5936 *) LIBOBJS="$LIBOBJS clock.$ac_objext"
5937 ;;
5938esac
238235ef 5939
5213506e
RW
5940 case " $LIBOBJS " in
5941 *" ffs.$ac_objext "* ) ;;
5942 *) LIBOBJS="$LIBOBJS ffs.$ac_objext"
5943 ;;
5944esac
238235ef 5945
5213506e
RW
5946 case " $LIBOBJS " in
5947 *" getpagesize.$ac_objext "* ) ;;
5948 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext"
5949 ;;
5950esac
238235ef 5951
5213506e
RW
5952 case " $LIBOBJS " in
5953 *" index.$ac_objext "* ) ;;
5954 *) LIBOBJS="$LIBOBJS index.$ac_objext"
5955 ;;
5956esac
238235ef 5957
5213506e
RW
5958 case " $LIBOBJS " in
5959 *" insque.$ac_objext "* ) ;;
5960 *) LIBOBJS="$LIBOBJS insque.$ac_objext"
5961 ;;
5962esac
238235ef 5963
5213506e
RW
5964 case " $LIBOBJS " in
5965 *" mempcpy.$ac_objext "* ) ;;
5966 *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext"
5967 ;;
5968esac
238235ef 5969
5213506e
RW
5970 case " $LIBOBJS " in
5971 *" mkstemps.$ac_objext "* ) ;;
5972 *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext"
5973 ;;
5974esac
238235ef 5975
5213506e
RW
5976 case " $LIBOBJS " in
5977 *" random.$ac_objext "* ) ;;
5978 *) LIBOBJS="$LIBOBJS random.$ac_objext"
5979 ;;
5980esac
238235ef 5981
5213506e
RW
5982 case " $LIBOBJS " in
5983 *" rindex.$ac_objext "* ) ;;
5984 *) LIBOBJS="$LIBOBJS rindex.$ac_objext"
5985 ;;
5986esac
238235ef 5987
5213506e
RW
5988 case " $LIBOBJS " in
5989 *" sigsetmask.$ac_objext "* ) ;;
5990 *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext"
5991 ;;
5992esac
238235ef 5993
5213506e
RW
5994 case " $LIBOBJS " in
5995 *" stpcpy.$ac_objext "* ) ;;
5996 *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext"
5997 ;;
5998esac
238235ef 5999
5213506e
RW
6000 case " $LIBOBJS " in
6001 *" stpncpy.$ac_objext "* ) ;;
6002 *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext"
6003 ;;
6004esac
238235ef 6005
5213506e
RW
6006 case " $LIBOBJS " in
6007 *" strndup.$ac_objext "* ) ;;
6008 *) LIBOBJS="$LIBOBJS strndup.$ac_objext"
6009 ;;
6010esac
238235ef 6011
9a9baa52
ILT
6012 case " $LIBOBJS " in
6013 *" strnlen.$ac_objext "* ) ;;
6014 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
6015 ;;
6016esac
6017
5213506e
RW
6018 case " $LIBOBJS " in
6019 *" strverscmp.$ac_objext "* ) ;;
6020 *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext"
6021 ;;
6022esac
238235ef 6023
5213506e
RW
6024 case " $LIBOBJS " in
6025 *" vasprintf.$ac_objext "* ) ;;
6026 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
6027 ;;
6028esac
238235ef 6029
5213506e
RW
6030 case " $LIBOBJS " in
6031 *" waitpid.$ac_objext "* ) ;;
6032 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
6033 ;;
6034esac
238235ef
DJ
6035
6036
5213506e
RW
6037 for f in $funcs; do
6038 case "$f" in
9a9baa52 6039 asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strnlen | strverscmp | vasprintf | waitpid)
5213506e
RW
6040 ;;
6041 *)
6042 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6043 cat >>confdefs.h <<_ACEOF
6044#define $n 1
6045_ACEOF
238235ef 6046
5213506e
RW
6047 ;;
6048 esac
6049 done
238235ef 6050
5213506e
RW
6051 # Mingw doesnt provide any of the variables in $vars, so we
6052 # dont have to check them here.
238235ef 6053
5213506e
RW
6054 # Of the functions in $checkfuncs, Mingw only has strerror.
6055 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
238235ef
DJ
6056
6057
5213506e
RW
6058 setobjs=yes
6059 ;;
238235ef 6060
5213506e
RW
6061 *-*-msdosdjgpp)
6062 case " $LIBOBJS " in
6063 *" vasprintf.$ac_objext "* ) ;;
6064 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
6065 ;;
6066esac
238235ef 6067
5213506e
RW
6068 case " $LIBOBJS " in
6069 *" vsnprintf.$ac_objext "* ) ;;
6070 *) LIBOBJS="$LIBOBJS vsnprintf.$ac_objext"
6071 ;;
6072esac
238235ef 6073
5213506e
RW
6074 case " $LIBOBJS " in
6075 *" snprintf.$ac_objext "* ) ;;
6076 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
6077 ;;
6078esac
238235ef 6079
5213506e
RW
6080 case " $LIBOBJS " in
6081 *" asprintf.$ac_objext "* ) ;;
6082 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
6083 ;;
6084esac
238235ef
DJ
6085
6086
5213506e
RW
6087 for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \
6088 getcwd getpagesize getrusage gettimeofday \
6089 index insque memchr memcmp memcpy memmove memset psignal \
6090 putenv random rename rindex sbrk setenv stpcpy strcasecmp \
6091 strchr strdup strerror strncasecmp strrchr strstr strtod \
6092 strtol strtoul sysconf times tmpnam vfprintf vprintf \
6093 vsprintf waitpid
6094 do
6095 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6096 cat >>confdefs.h <<_ACEOF
6097#define $n 1
6098_ACEOF
238235ef 6099
5213506e 6100 done
238235ef 6101
17998b22 6102
5213506e
RW
6103 setobjs=yes
6104 ;;
17998b22 6105
5213506e 6106 esac
f9a9ac80 6107
0bc0cd11 6108else
238235ef 6109
5213506e
RW
6110 # Not a target library, so we set things up to run the test suite.
6111 CHECK=really-check
0bc0cd11
JL
6112
6113fi
6114
238235ef 6115
238235ef 6116
238235ef 6117
5213506e
RW
6118case "${host}" in
6119 *-*-cygwin* | *-*-mingw*)
6120 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
238235ef 6121
5213506e 6122 $as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
238235ef 6123
5213506e
RW
6124 ;;
6125esac
0bc0cd11 6126
5213506e
RW
6127if test -z "${setobjs}"; then
6128 case "${host}" in
0bc0cd11 6129
5213506e
RW
6130 *-*-vxworks*)
6131 # Handle VxWorks configuration specially, since on VxWorks the
6132 # libraries are actually on the target board, not in the file
6133 # system.
6134 case " $LIBOBJS " in
6135 *" basename.$ac_objext "* ) ;;
6136 *) LIBOBJS="$LIBOBJS basename.$ac_objext"
6137 ;;
3beb1315
HPN
6138esac
6139
5213506e
RW
6140 case " $LIBOBJS " in
6141 *" getpagesize.$ac_objext "* ) ;;
6142 *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext"
6143 ;;
6144esac
238235ef 6145
5213506e
RW
6146 case " $LIBOBJS " in
6147 *" insque.$ac_objext "* ) ;;
6148 *) LIBOBJS="$LIBOBJS insque.$ac_objext"
6149 ;;
6150esac
e490616e 6151
5213506e
RW
6152 case " $LIBOBJS " in
6153 *" random.$ac_objext "* ) ;;
6154 *) LIBOBJS="$LIBOBJS random.$ac_objext"
6155 ;;
6156esac
238235ef 6157
5213506e
RW
6158 case " $LIBOBJS " in
6159 *" strcasecmp.$ac_objext "* ) ;;
6160 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
6161 ;;
6162esac
238235ef 6163
5213506e
RW
6164 case " $LIBOBJS " in
6165 *" strncasecmp.$ac_objext "* ) ;;
6166 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext"
6167 ;;
3beb1315
HPN
6168esac
6169
5213506e
RW
6170 case " $LIBOBJS " in
6171 *" strdup.$ac_objext "* ) ;;
6172 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
6173 ;;
6174esac
e490616e 6175
5213506e
RW
6176 case " $LIBOBJS " in
6177 *" vfork.$ac_objext "* ) ;;
6178 *) LIBOBJS="$LIBOBJS vfork.$ac_objext"
6179 ;;
6180esac
e490616e 6181
5213506e
RW
6182 case " $LIBOBJS " in
6183 *" waitpid.$ac_objext "* ) ;;
6184 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
6185 ;;
6186esac
238235ef 6187
5213506e
RW
6188 case " $LIBOBJS " in
6189 *" vasprintf.$ac_objext "* ) ;;
6190 *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
6191 ;;
6192esac
9ce3f7e5 6193
5213506e
RW
6194 for f in $funcs; do
6195 case "$f" in
6196 basename | getpagesize | insque | random | strcasecmp)
6197 ;;
6198 strncasecmp | strdup | vfork | waitpid | vasprintf)
6199 ;;
6200 *)
6201 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6202 cat >>confdefs.h <<_ACEOF
6203#define $n 1
238235ef 6204_ACEOF
238235ef 6205
5213506e
RW
6206 ;;
6207 esac
6208 done
9ce3f7e5 6209
5213506e
RW
6210 # VxWorks doesn't provide any of the variables in $vars, so we
6211 # don't have to check them here.
9ce3f7e5 6212
5213506e
RW
6213 # Of the functions in $checkfuncs, VxWorks only has strerror.
6214 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
e490616e 6215
238235ef 6216
5213506e
RW
6217 setobjs=yes
6218 ;;
6219
6220 esac
0bc0cd11
JL
6221fi
6222
5213506e 6223if test -z "${setobjs}"; then
0bc0cd11 6224
5213506e 6225 case "${host}" in
aa9dc53d 6226
5213506e
RW
6227 *-*-mingw32*)
6228 # Under mingw32, sys_nerr and sys_errlist exist, but they are
6229 # macros, so the test below won't find them.
6230 libiberty_cv_var_sys_nerr=yes
6231 libiberty_cv_var_sys_errlist=yes
6232 ;;
238235ef 6233
5213506e
RW
6234 *-*-msdosdjgpp*)
6235 # vfork and fork are stubs.
6236 ac_cv_func_vfork_works=no
6237 ;;
aa9dc53d 6238
5213506e
RW
6239 *-*-uwin*)
6240 # Under some versions of uwin, vfork is notoriously buggy and the test
6241 # can hang configure; on other versions, vfork exists just as a stub.
6242 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
6243 ac_cv_func_vfork_works=no
6244 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
6245 # macros (actually, these are imported from a DLL, but the end effect
6246 # is the same), so the test below won't find them.
6247 libiberty_cv_var_sys_nerr=yes
6248 libiberty_cv_var_sys_errlist=yes
6249 ;;
238235ef 6250
5213506e
RW
6251 *-*-*vms*)
6252 # Under VMS, vfork works very different than on Unix. The standard test
6253 # won't work, and it isn't easily adaptable. It makes more sense to
6254 # just force it.
6255 ac_cv_func_vfork_works=yes
6256 ;;
238235ef 6257
5213506e 6258 esac
aa9dc53d 6259
5213506e
RW
6260 # We haven't set the list of objects yet. Use the standard autoconf
6261 # tests. This will only work if the compiler works.
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
6263$as_echo_n "checking for library containing strerror... " >&6; }
6264if test "${ac_cv_search_strerror+set}" = set; then :
6265 $as_echo_n "(cached) " >&6
238235ef 6266else
5213506e
RW
6267 ac_func_search_save_LIBS=$LIBS
6268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef 6269/* end confdefs.h. */
5213506e
RW
6270
6271/* Override any GCC internal prototype to avoid an error.
6272 Use char because int might match the return type of a GCC
238235ef 6273 builtin and then its argument prototype would still apply. */
238235ef 6274#ifdef __cplusplus
5213506e 6275extern "C"
0bc0cd11 6276#endif
5213506e 6277char strerror ();
238235ef
DJ
6278int
6279main ()
6280{
5213506e 6281return strerror ();
238235ef
DJ
6282 ;
6283 return 0;
6284}
6285_ACEOF
5213506e
RW
6286for ac_lib in '' cposix; do
6287 if test -z "$ac_lib"; then
6288 ac_res="none required"
6289 else
6290 ac_res=-l$ac_lib
6291 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6292 fi
6293 if test x$gcc_no_link = xyes; then
6294 as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
6295fi
6296if ac_fn_c_try_link "$LINENO"; then :
6297 ac_cv_search_strerror=$ac_res
6298fi
6299rm -f core conftest.err conftest.$ac_objext \
6300 conftest$ac_exeext
6301 if test "${ac_cv_search_strerror+set}" = set; then :
6302 break
6303fi
6304done
6305if test "${ac_cv_search_strerror+set}" = set; then :
238235ef 6306
5213506e
RW
6307else
6308 ac_cv_search_strerror=no
238235ef 6309fi
5213506e
RW
6310rm conftest.$ac_ext
6311LIBS=$ac_func_search_save_LIBS
6312fi
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
6314$as_echo "$ac_cv_search_strerror" >&6; }
6315ac_res=$ac_cv_search_strerror
6316if test "$ac_res" != no; then :
6317 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6318
238235ef 6319fi
5213506e
RW
6320
6321 for ac_func in $funcs
6322do :
6323 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6324ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6325eval as_val=\$$as_ac_var
6326 if test "x$as_val" = x""yes; then :
238235ef 6327 cat >>confdefs.h <<_ACEOF
5213506e 6328#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
238235ef 6329_ACEOF
0bc0cd11 6330
5213506e
RW
6331else
6332 case " $LIBOBJS " in
6333 *" $ac_func.$ac_objext "* ) ;;
6334 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
6335 ;;
6336esac
6337
0bc0cd11
JL
6338fi
6339done
6340
5213506e
RW
6341
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether alloca needs Cray hooks" >&5
6343$as_echo_n "checking whether alloca needs Cray hooks... " >&6; }
6344if test "${ac_cv_os_cray+set}" = set; then :
6345 $as_echo_n "(cached) " >&6
3c60ae5a 6346else
5213506e 6347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3c60ae5a 6348/* end confdefs.h. */
5213506e
RW
6349#if defined(CRAY) && ! defined(CRAY2)
6350webecray
6351#else
6352wenotbecray
3c60ae5a
GDR
6353#endif
6354
3c60ae5a 6355_ACEOF
5213506e
RW
6356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6357 $EGREP "webecray" >/dev/null 2>&1; then :
6358 ac_cv_os_cray=yes
3c60ae5a 6359else
5213506e 6360 ac_cv_os_cray=no
3c60ae5a 6361fi
5213506e
RW
6362rm -f conftest*
6363
3c60ae5a 6364fi
5213506e
RW
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6366$as_echo "$ac_cv_os_cray" >&6; }
6367if test $ac_cv_os_cray = yes; then
6368 for ac_func in _getb67 GETB67 getb67; do
6369 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6370ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6371eval as_val=\$$as_ac_var
6372 if test "x$as_val" = x""yes; then :
3c60ae5a
GDR
6373
6374cat >>confdefs.h <<_ACEOF
5213506e 6375#define CRAY_STACKSEG_END $ac_func
3c60ae5a 6376_ACEOF
5213506e
RW
6377 break
6378fi
3c60ae5a 6379
5213506e
RW
6380 done
6381fi
3c60ae5a 6382
5213506e
RW
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6384$as_echo_n "checking stack direction for C alloca... " >&6; }
6385if test "${ac_cv_c_stack_direction+set}" = set; then :
6386 $as_echo_n "(cached) " >&6
3c60ae5a 6387else
5213506e
RW
6388 if test "$cross_compiling" = yes; then :
6389 ac_cv_c_stack_direction=0
3c60ae5a 6390else
5213506e 6391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3c60ae5a 6392/* end confdefs.h. */
5213506e
RW
6393find_stack_direction ()
6394{
6395 static char *addr = 0;
6396 auto char dummy;
6397 if (addr == 0)
6398 {
6399 addr = &dummy;
6400 return find_stack_direction ();
6401 }
6402 else
6403 return (&dummy > addr) ? 1 : -1;
6404}
3c60ae5a
GDR
6405main ()
6406{
5213506e 6407 exit (find_stack_direction() < 0);
3c60ae5a
GDR
6408}
6409_ACEOF
5213506e
RW
6410if ac_fn_c_try_run "$LINENO"; then :
6411 ac_cv_c_stack_direction=1
3c60ae5a 6412else
5213506e
RW
6413 ac_cv_c_stack_direction=-1
6414fi
6415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6416 conftest.$ac_objext conftest.beam conftest.$ac_ext
3c60ae5a 6417fi
5213506e 6418
3c60ae5a 6419fi
5213506e
RW
6420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6421$as_echo "$ac_cv_c_stack_direction" >&6; }
3c60ae5a
GDR
6422
6423cat >>confdefs.h <<_ACEOF
5213506e 6424#define STACK_DIRECTION $ac_cv_c_stack_direction
3c60ae5a
GDR
6425_ACEOF
6426
6427
5213506e
RW
6428 for ac_header in vfork.h
6429do :
6430 ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h"
6431if test "x$ac_cv_header_vfork_h" = x""yes; then :
3c60ae5a 6432 cat >>confdefs.h <<_ACEOF
5213506e 6433#define HAVE_VFORK_H 1
3c60ae5a
GDR
6434_ACEOF
6435
5213506e
RW
6436fi
6437done
6438
6439for ac_func in fork vfork
6440do :
6441 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6442ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6443eval as_val=\$$as_ac_var
6444 if test "x$as_val" = x""yes; then :
6445 cat >>confdefs.h <<_ACEOF
6446#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6447_ACEOF
3c60ae5a
GDR
6448
6449fi
5213506e
RW
6450done
6451
6452if test "x$ac_cv_func_fork" = xyes; then
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
6454$as_echo_n "checking for working fork... " >&6; }
6455if test "${ac_cv_func_fork_works+set}" = set; then :
6456 $as_echo_n "(cached) " >&6
3c60ae5a 6457else
5213506e
RW
6458 if test "$cross_compiling" = yes; then :
6459 ac_cv_func_fork_works=cross
6460else
6461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3c60ae5a
GDR
6462/* end confdefs.h. */
6463$ac_includes_default
6464int
6465main ()
6466{
5213506e
RW
6467
6468 /* By Ruediger Kuhlmann. */
6469 return fork () < 0;
3c60ae5a
GDR
6470
6471 ;
6472 return 0;
6473}
6474_ACEOF
5213506e
RW
6475if ac_fn_c_try_run "$LINENO"; then :
6476 ac_cv_func_fork_works=yes
3c60ae5a 6477else
5213506e 6478 ac_cv_func_fork_works=no
3c60ae5a 6479fi
5213506e
RW
6480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6481 conftest.$ac_objext conftest.beam conftest.$ac_ext
3c60ae5a 6482fi
3c60ae5a 6483
5213506e
RW
6484fi
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
6486$as_echo "$ac_cv_func_fork_works" >&6; }
3c60ae5a
GDR
6487
6488else
5213506e
RW
6489 ac_cv_func_fork_works=$ac_cv_func_fork
6490fi
6491if test "x$ac_cv_func_fork_works" = xcross; then
6492 case $host in
6493 *-*-amigaos* | *-*-msdosdjgpp*)
6494 # Override, as these systems have only a dummy fork() stub
6495 ac_cv_func_fork_works=no
6496 ;;
6497 *)
6498 ac_cv_func_fork_works=yes
6499 ;;
6500 esac
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
6502$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
3c60ae5a 6503fi
5213506e
RW
6504ac_cv_func_vfork_works=$ac_cv_func_vfork
6505if test "x$ac_cv_func_vfork" = xyes; then
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
6507$as_echo_n "checking for working vfork... " >&6; }
6508if test "${ac_cv_func_vfork_works+set}" = set; then :
6509 $as_echo_n "(cached) " >&6
3c60ae5a 6510else
5213506e
RW
6511 if test "$cross_compiling" = yes; then :
6512 ac_cv_func_vfork_works=cross
6513else
6514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3c60ae5a 6515/* end confdefs.h. */
5213506e 6516/* Thanks to Paul Eggert for this test. */
3c60ae5a 6517$ac_includes_default
5213506e
RW
6518#include <sys/wait.h>
6519#ifdef HAVE_VFORK_H
6520# include <vfork.h>
6521#endif
6522/* On some sparc systems, changes by the child to local and incoming
6523 argument registers are propagated back to the parent. The compiler
6524 is told about this with #include <vfork.h>, but some compilers
6525 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
6526 static variable whose address is put into a register that is
6527 clobbered by the vfork. */
6528static void
6529#ifdef __cplusplus
6530sparc_address_test (int arg)
6531# else
6532sparc_address_test (arg) int arg;
6533#endif
6534{
6535 static pid_t child;
6536 if (!child) {
6537 child = vfork ();
6538 if (child < 0) {
6539 perror ("vfork");
6540 _exit(2);
6541 }
6542 if (!child) {
6543 arg = getpid();
6544 write(-1, "", 0);
6545 _exit (arg);
6546 }
6547 }
6548}
6549
3c60ae5a
GDR
6550int
6551main ()
6552{
5213506e
RW
6553 pid_t parent = getpid ();
6554 pid_t child;
3c60ae5a 6555
5213506e 6556 sparc_address_test (0);
3c60ae5a 6557
5213506e 6558 child = vfork ();
3c60ae5a 6559
5213506e
RW
6560 if (child == 0) {
6561 /* Here is another test for sparc vfork register problems. This
6562 test uses lots of local variables, at least as many local
6563 variables as main has allocated so far including compiler
6564 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
6565 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
6566 reuse the register of parent for one of the local variables,
6567 since it will think that parent can't possibly be used any more
6568 in this routine. Assigning to the local variable will thus
6569 munge parent in the parent process. */
6570 pid_t
6571 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6572 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6573 /* Convince the compiler that p..p7 are live; otherwise, it might
6574 use the same hardware register for all 8 local variables. */
6575 if (p != p1 || p != p2 || p != p3 || p != p4
6576 || p != p5 || p != p6 || p != p7)
6577 _exit(1);
3c60ae5a 6578
5213506e
RW
6579 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
6580 from child file descriptors. If the child closes a descriptor
6581 before it execs or exits, this munges the parent's descriptor
6582 as well. Test for this by closing stdout in the child. */
6583 _exit(close(fileno(stdout)) != 0);
6584 } else {
6585 int status;
6586 struct stat st;
3c60ae5a 6587
5213506e
RW
6588 while (wait(&status) != child)
6589 ;
6590 return (
6591 /* Was there some problem with vforking? */
6592 child < 0
3c60ae5a 6593
5213506e
RW
6594 /* Did the child fail? (This shouldn't happen.) */
6595 || status
3c60ae5a 6596
5213506e
RW
6597 /* Did the vfork/compiler bug occur? */
6598 || parent != getpid()
ddcf783b 6599
5213506e
RW
6600 /* Did the file descriptor bug occur? */
6601 || fstat(fileno(stdout), &st) != 0
6602 );
6603 }
ddcf783b
EZ
6604}
6605_ACEOF
5213506e
RW
6606if ac_fn_c_try_run "$LINENO"; then :
6607 ac_cv_func_vfork_works=yes
ddcf783b 6608else
5213506e
RW
6609 ac_cv_func_vfork_works=no
6610fi
6611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6612 conftest.$ac_objext conftest.beam conftest.$ac_ext
6613fi
ddcf783b 6614
ddcf783b 6615fi
5213506e
RW
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
6617$as_echo "$ac_cv_func_vfork_works" >&6; }
6618
6619fi;
6620if test "x$ac_cv_func_fork_works" = xcross; then
6621 ac_cv_func_vfork_works=$ac_cv_func_vfork
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
6623$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
ddcf783b 6624fi
ddcf783b 6625
5213506e 6626if test "x$ac_cv_func_vfork_works" = xyes; then
ddcf783b 6627
5213506e 6628$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
ddcf783b
EZ
6629
6630else
ddcf783b 6631
5213506e 6632$as_echo "#define vfork fork" >>confdefs.h
ddcf783b
EZ
6633
6634fi
5213506e 6635if test "x$ac_cv_func_fork_works" = xyes; then
ddcf783b 6636
5213506e 6637$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
ddcf783b 6638
ddcf783b 6639fi
ddcf783b 6640
5213506e
RW
6641 if test $ac_cv_func_vfork_works = no; then
6642 case " $LIBOBJS " in
6643 *" vfork.$ac_objext "* ) ;;
6644 *) LIBOBJS="$LIBOBJS vfork.$ac_objext"
6645 ;;
6646esac
ddcf783b 6647
5213506e
RW
6648 fi
6649 # We only need _doprnt if we might use it to implement v*printf.
6650 if test $ac_cv_func_vprintf != yes \
6651 || test $ac_cv_func_vfprintf != yes \
6652 || test $ac_cv_func_vsprintf != yes; then
6653 for ac_func in _doprnt
6654do :
6655 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
6656if test "x$ac_cv_func__doprnt" = x""yes; then :
ddcf783b 6657 cat >>confdefs.h <<_ACEOF
5213506e 6658#define HAVE__DOPRNT 1
ddcf783b
EZ
6659_ACEOF
6660
5213506e
RW
6661else
6662 case " $LIBOBJS " in
6663 *" $ac_func.$ac_objext "* ) ;;
6664 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
6665 ;;
6666esac
ddcf783b 6667
d7cf8390 6668fi
5213506e 6669done
d7cf8390
GDR
6670
6671
5213506e
RW
6672 else
6673 for ac_func in _doprnt
6674do :
6675 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
6676if test "x$ac_cv_func__doprnt" = x""yes; then :
6677 cat >>confdefs.h <<_ACEOF
6678#define HAVE__DOPRNT 1
d7cf8390 6679_ACEOF
d7cf8390 6680
d7cf8390 6681fi
5213506e 6682done
d7cf8390 6683
5213506e 6684 fi
d7cf8390 6685
5213506e
RW
6686 for v in $vars; do
6687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $v" >&5
6688$as_echo_n "checking for $v... " >&6; }
6689 if { as_var=libiberty_cv_var_$v; eval "test \"\${$as_var+set}\" = set"; }; then :
6690 $as_echo_n "(cached) " >&6
d7cf8390 6691else
5213506e
RW
6692 if test x$gcc_no_link = xyes; then
6693 as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
d7cf8390 6694fi
5213506e 6695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d7cf8390 6696/* end confdefs.h. */
5213506e 6697int *p;
d7cf8390
GDR
6698int
6699main ()
6700{
5213506e 6701extern int $v []; p = $v;
d7cf8390
GDR
6702 ;
6703 return 0;
6704}
6705_ACEOF
5213506e
RW
6706if ac_fn_c_try_link "$LINENO"; then :
6707 eval "libiberty_cv_var_$v=yes"
d7cf8390 6708else
5213506e 6709 eval "libiberty_cv_var_$v=no"
d7cf8390 6710fi
5213506e
RW
6711rm -f core conftest.err conftest.$ac_objext \
6712 conftest$ac_exeext conftest.$ac_ext
d7cf8390 6713fi
d7cf8390 6714
5213506e
RW
6715 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
6716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6717$as_echo "yes" >&6; }
6718 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6719 cat >>confdefs.h <<_ACEOF
6720#define $n 1
d7cf8390
GDR
6721_ACEOF
6722
5213506e
RW
6723 else
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726 fi
6727 done
d7cf8390 6728
5213506e
RW
6729 # special check for _system_configuration because AIX <4.3.2 do not
6730 # contain the `physmem' member.
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external symbol _system_configuration" >&5
6732$as_echo_n "checking for external symbol _system_configuration... " >&6; }
6733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8b82b724 6734/* end confdefs.h. */
5213506e 6735#include <sys/systemcfg.h>
8b82b724
BE
6736int
6737main ()
6738{
5213506e 6739double x = _system_configuration.physmem;
8b82b724
BE
6740 ;
6741 return 0;
6742}
6743_ACEOF
5213506e
RW
6744if ac_fn_c_try_compile "$LINENO"; then :
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6746$as_echo "yes" >&6; }
8b82b724 6747
5213506e 6748$as_echo "#define HAVE__SYSTEM_CONFIGURATION 1" >>confdefs.h
8b82b724
BE
6749
6750else
5213506e
RW
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6752$as_echo "no" >&6; }
6753fi
6754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6755
6756 for ac_func in $checkfuncs
6757do :
6758 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6759ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6760eval as_val=\$$as_ac_var
6761 if test "x$as_val" = x""yes; then :
8b82b724 6762 cat >>confdefs.h <<_ACEOF
5213506e 6763#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8b82b724
BE
6764_ACEOF
6765
d7cf8390 6766fi
5213506e 6767done
d7cf8390 6768
c3f247f4
RW
6769 ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default"
6770if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then :
5213506e 6771 ac_have_decl=1
d7cf8390 6772else
5213506e 6773 ac_have_decl=0
d7cf8390 6774fi
d7cf8390
GDR
6775
6776cat >>confdefs.h <<_ACEOF
5213506e 6777#define HAVE_DECL_BASENAME $ac_have_decl
d7cf8390 6778_ACEOF
5213506e
RW
6779ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
6780if test "x$ac_cv_have_decl_ffs" = x""yes; then :
6781 ac_have_decl=1
d7cf8390 6782else
5213506e 6783 ac_have_decl=0
d7cf8390 6784fi
d7cf8390 6785
5213506e
RW
6786cat >>confdefs.h <<_ACEOF
6787#define HAVE_DECL_FFS $ac_have_decl
d7cf8390 6788_ACEOF
5213506e
RW
6789ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
6790if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
6791 ac_have_decl=1
d7cf8390 6792else
5213506e 6793 ac_have_decl=0
d7cf8390 6794fi
d7cf8390
GDR
6795
6796cat >>confdefs.h <<_ACEOF
5213506e 6797#define HAVE_DECL_ASPRINTF $ac_have_decl
d7cf8390 6798_ACEOF
5213506e
RW
6799ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
6800if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
6801 ac_have_decl=1
d7cf8390 6802else
5213506e 6803 ac_have_decl=0
d7cf8390 6804fi
d7cf8390 6805
5213506e
RW
6806cat >>confdefs.h <<_ACEOF
6807#define HAVE_DECL_VASPRINTF $ac_have_decl
d7cf8390 6808_ACEOF
5213506e
RW
6809ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
6810if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
6811 ac_have_decl=1
d7cf8390 6812else
5213506e 6813 ac_have_decl=0
d7cf8390 6814fi
d7cf8390
GDR
6815
6816cat >>confdefs.h <<_ACEOF
5213506e 6817#define HAVE_DECL_SNPRINTF $ac_have_decl
d7cf8390 6818_ACEOF
5213506e
RW
6819ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
6820if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then :
6821 ac_have_decl=1
d7cf8390 6822else
5213506e 6823 ac_have_decl=0
83fbfe42
GK
6824fi
6825
5213506e
RW
6826cat >>confdefs.h <<_ACEOF
6827#define HAVE_DECL_VSNPRINTF $ac_have_decl
6828_ACEOF
83fbfe42 6829
5213506e
RW
6830 ac_fn_c_check_decl "$LINENO" "calloc" "ac_cv_have_decl_calloc" "$ac_includes_default"
6831if test "x$ac_cv_have_decl_calloc" = x""yes; then :
6832 ac_have_decl=1
6833else
6834 ac_have_decl=0
83fbfe42 6835fi
5213506e
RW
6836
6837cat >>confdefs.h <<_ACEOF
6838#define HAVE_DECL_CALLOC $ac_have_decl
6839_ACEOF
6840ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
6841if test "x$ac_cv_have_decl_getenv" = x""yes; then :
6842 ac_have_decl=1
6843else
6844 ac_have_decl=0
83fbfe42 6845fi
83fbfe42
GK
6846
6847cat >>confdefs.h <<_ACEOF
5213506e 6848#define HAVE_DECL_GETENV $ac_have_decl
83fbfe42 6849_ACEOF
5213506e
RW
6850ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
6851if test "x$ac_cv_have_decl_getopt" = x""yes; then :
6852 ac_have_decl=1
6853else
6854 ac_have_decl=0
6855fi
83fbfe42 6856
5213506e
RW
6857cat >>confdefs.h <<_ACEOF
6858#define HAVE_DECL_GETOPT $ac_have_decl
6859_ACEOF
6860ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default"
6861if test "x$ac_cv_have_decl_malloc" = x""yes; then :
6862 ac_have_decl=1
6863else
6864 ac_have_decl=0
6865fi
83fbfe42 6866
5213506e
RW
6867cat >>confdefs.h <<_ACEOF
6868#define HAVE_DECL_MALLOC $ac_have_decl
6869_ACEOF
6870ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default"
6871if test "x$ac_cv_have_decl_realloc" = x""yes; then :
6872 ac_have_decl=1
83fbfe42 6873else
5213506e
RW
6874 ac_have_decl=0
6875fi
6876
6877cat >>confdefs.h <<_ACEOF
6878#define HAVE_DECL_REALLOC $ac_have_decl
83fbfe42 6879_ACEOF
5213506e
RW
6880ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default"
6881if test "x$ac_cv_have_decl_sbrk" = x""yes; then :
6882 ac_have_decl=1
6883else
6884 ac_have_decl=0
6885fi
83fbfe42 6886
5213506e
RW
6887cat >>confdefs.h <<_ACEOF
6888#define HAVE_DECL_SBRK $ac_have_decl
2d3a2063
JDA
6889_ACEOF
6890
6891 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
6892if test "x$ac_cv_have_decl_strtol" = x""yes; then :
6893 ac_have_decl=1
6894else
6895 ac_have_decl=0
6896fi
6897
6898cat >>confdefs.h <<_ACEOF
6899#define HAVE_DECL_STRTOL $ac_have_decl
6900_ACEOF
6901ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
6902if test "x$ac_cv_have_decl_strtoul" = x""yes; then :
6903 ac_have_decl=1
6904else
6905 ac_have_decl=0
6906fi
6907
6908cat >>confdefs.h <<_ACEOF
6909#define HAVE_DECL_STRTOUL $ac_have_decl
6910_ACEOF
6911ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
6912if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
6913 ac_have_decl=1
6914else
6915 ac_have_decl=0
6916fi
6917
6918cat >>confdefs.h <<_ACEOF
6919#define HAVE_DECL_STRTOLL $ac_have_decl
6920_ACEOF
6921ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
6922if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
6923 ac_have_decl=1
6924else
6925 ac_have_decl=0
6926fi
6927
6928cat >>confdefs.h <<_ACEOF
6929#define HAVE_DECL_STRTOULL $ac_have_decl
5213506e 6930_ACEOF
83fbfe42 6931
5213506e
RW
6932 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
6933if test "x$ac_cv_have_decl_strverscmp" = x""yes; then :
6934 ac_have_decl=1
6935else
6936 ac_have_decl=0
3c60ae5a
GDR
6937fi
6938
5213506e
RW
6939cat >>confdefs.h <<_ACEOF
6940#define HAVE_DECL_STRVERSCMP $ac_have_decl
6941_ACEOF
3c60ae5a 6942
5213506e
RW
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether canonicalize_file_name must be declared" >&5
6944$as_echo_n "checking whether canonicalize_file_name must be declared... " >&6; }
6945if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then :
6946 $as_echo_n "(cached) " >&6
4876b2b4 6947else
5213506e 6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef 6949/* end confdefs.h. */
4876b2b4
DJ
6950
6951#include "confdefs.h"
6952#include <stdio.h>
6953#ifdef HAVE_STRING_H
6954#include <string.h>
6955#else
6956#ifdef HAVE_STRINGS_H
6957#include <strings.h>
6958#endif
6959#endif
6960#ifdef HAVE_STDLIB_H
6961#include <stdlib.h>
6962#endif
6963#ifdef HAVE_UNISTD_H
6964#include <unistd.h>
6965#endif
238235ef
DJ
6966int
6967main ()
6968{
4876b2b4 6969char *(*pfn) = (char *(*)) canonicalize_file_name
238235ef
DJ
6970 ;
6971 return 0;
6972}
6973_ACEOF
5213506e 6974if ac_fn_c_try_compile "$LINENO"; then :
4876b2b4
DJ
6975 libiberty_cv_decl_needed_canonicalize_file_name=no
6976else
5213506e 6977 libiberty_cv_decl_needed_canonicalize_file_name=yes
4876b2b4 6978fi
5213506e 6979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4876b2b4
DJ
6980fi
6981
5213506e
RW
6982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
6983$as_echo "$libiberty_cv_decl_needed_canonicalize_file_name" >&6; }
4876b2b4 6984if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
238235ef 6985
5213506e 6986$as_echo "#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1" >>confdefs.h
4876b2b4
DJ
6987
6988fi
6989
0bc0cd11
JL
6990fi
6991
55d0e5e0
ZW
6992# Figure out which version of pexecute to use.
6993case "${host}" in
16f60fcb
TG
6994 *-*-mingw* | *-*-winnt*) pexecute=pex-win32 ;;
6995 *-*-msdosdjgpp*) pexecute=pex-djgpp ;;
6996 *-*-msdos*) pexecute=pex-msdos ;;
6997 *) pexecute=pex-unix ;;
55d0e5e0
ZW
6998esac
6999
7000
238235ef
DJ
7001if test x$gcc_no_link = xyes; then
7002 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
7003 ac_cv_func_mmap_fixed_mapped=no
7004 fi
7005fi
83fbfe42 7006if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
5213506e
RW
7007 for ac_header in stdlib.h unistd.h
7008do :
7009 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7010ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
7011eval as_val=\$$as_ac_Header
7012 if test "x$as_val" = x""yes; then :
238235ef 7013 cat >>confdefs.h <<_ACEOF
5213506e 7014#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
238235ef
DJ
7015_ACEOF
7016
a9266bfa
KG
7017fi
7018done
7019
7020for ac_func in getpagesize
5213506e
RW
7021do :
7022 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7023if test "x$ac_cv_func_getpagesize" = x""yes; then :
238235ef 7024 cat >>confdefs.h <<_ACEOF
5213506e 7025#define HAVE_GETPAGESIZE 1
238235ef 7026_ACEOF
a9266bfa 7027
a9266bfa
KG
7028fi
7029done
7030
5213506e
RW
7031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7032$as_echo_n "checking for working mmap... " >&6; }
7033if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7034 $as_echo_n "(cached) " >&6
a9266bfa 7035else
5213506e 7036 if test "$cross_compiling" = yes; then :
a9266bfa
KG
7037 ac_cv_func_mmap_fixed_mapped=no
7038else
5213506e 7039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef
DJ
7040/* end confdefs.h. */
7041$ac_includes_default
7042/* malloc might have been renamed as rpl_malloc. */
7043#undef malloc
a9266bfa
KG
7044
7045/* Thanks to Mike Haertel and Jim Avera for this test.
7046 Here is a matrix of mmap possibilities:
7047 mmap private not fixed
7048 mmap private fixed at somewhere currently unmapped
7049 mmap private fixed at somewhere already mapped
7050 mmap shared not fixed
7051 mmap shared fixed at somewhere currently unmapped
7052 mmap shared fixed at somewhere already mapped
7053 For private mappings, we should verify that changes cannot be read()
7054 back from the file, nor mmap's back from the file at a different
7055 address. (There have been systems where private was not correctly
7056 implemented like the infamous i386 svr4.0, and systems where the
238235ef 7057 VM page cache was not coherent with the file system buffer cache
a9266bfa
KG
7058 like early versions of FreeBSD and possibly contemporary NetBSD.)
7059 For shared mappings, we should conversely verify that changes get
238235ef 7060 propagated back to all the places they're supposed to be.
a9266bfa
KG
7061
7062 Grep wants private fixed already mapped.
7063 The main things grep needs to know about mmap are:
7064 * does it exist and is it safe to write into the mmap'd area
7065 * how to use it (BSD variants) */
238235ef 7066
a9266bfa
KG
7067#include <fcntl.h>
7068#include <sys/mman.h>
7069
5213506e 7070#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
238235ef 7071char *malloc ();
cf8e4b78
DH
7072#endif
7073
a9266bfa 7074/* This mess was copied from the GNU getpagesize.h. */
5213506e 7075#ifndef HAVE_GETPAGESIZE
a9266bfa 7076/* Assume that all systems that can run configure have sys/param.h. */
5213506e 7077# ifndef HAVE_SYS_PARAM_H
a9266bfa
KG
7078# define HAVE_SYS_PARAM_H 1
7079# endif
7080
7081# ifdef _SC_PAGESIZE
7082# define getpagesize() sysconf(_SC_PAGESIZE)
7083# else /* no _SC_PAGESIZE */
5213506e 7084# ifdef HAVE_SYS_PARAM_H
a9266bfa
KG
7085# include <sys/param.h>
7086# ifdef EXEC_PAGESIZE
7087# define getpagesize() EXEC_PAGESIZE
7088# else /* no EXEC_PAGESIZE */
7089# ifdef NBPG
7090# define getpagesize() NBPG * CLSIZE
7091# ifndef CLSIZE
7092# define CLSIZE 1
7093# endif /* no CLSIZE */
7094# else /* no NBPG */
7095# ifdef NBPC
7096# define getpagesize() NBPC
7097# else /* no NBPC */
7098# ifdef PAGESIZE
7099# define getpagesize() PAGESIZE
7100# endif /* PAGESIZE */
7101# endif /* no NBPC */
7102# endif /* no NBPG */
7103# endif /* no EXEC_PAGESIZE */
7104# else /* no HAVE_SYS_PARAM_H */
7105# define getpagesize() 8192 /* punt totally */
7106# endif /* no HAVE_SYS_PARAM_H */
7107# endif /* no _SC_PAGESIZE */
7108
7109#endif /* no HAVE_GETPAGESIZE */
7110
a9266bfa 7111int
238235ef 7112main ()
a9266bfa 7113{
238235ef
DJ
7114 char *data, *data2, *data3;
7115 int i, pagesize;
7116 int fd;
a9266bfa 7117
238235ef
DJ
7118 pagesize = getpagesize ();
7119
7120 /* First, make a file with some known garbage in it. */
7121 data = (char *) malloc (pagesize);
7122 if (!data)
5213506e 7123 return 1;
238235ef
DJ
7124 for (i = 0; i < pagesize; ++i)
7125 *(data + i) = rand ();
7126 umask (0);
7127 fd = creat ("conftest.mmap", 0600);
7128 if (fd < 0)
5213506e 7129 return 1;
238235ef 7130 if (write (fd, data, pagesize) != pagesize)
5213506e 7131 return 1;
238235ef
DJ
7132 close (fd);
7133
7134 /* Next, try to mmap the file at a fixed address which already has
7135 something else allocated at it. If we can, also make sure that
7136 we see the same garbage. */
7137 fd = open ("conftest.mmap", O_RDWR);
7138 if (fd < 0)
5213506e 7139 return 1;
238235ef
DJ
7140 data2 = (char *) malloc (2 * pagesize);
7141 if (!data2)
5213506e
RW
7142 return 1;
7143 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
238235ef 7144 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
3beb1315 7145 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5213506e 7146 return 1;
238235ef
DJ
7147 for (i = 0; i < pagesize; ++i)
7148 if (*(data + i) != *(data2 + i))
5213506e 7149 return 1;
238235ef
DJ
7150
7151 /* Finally, make sure that changes to the mapped area do not
7152 percolate back to the file as seen by read(). (This is a bug on
7153 some variants of i386 svr4.0.) */
7154 for (i = 0; i < pagesize; ++i)
7155 *(data2 + i) = *(data2 + i) + 1;
7156 data3 = (char *) malloc (pagesize);
7157 if (!data3)
5213506e 7158 return 1;
238235ef 7159 if (read (fd, data3, pagesize) != pagesize)
5213506e 7160 return 1;
238235ef
DJ
7161 for (i = 0; i < pagesize; ++i)
7162 if (*(data + i) != *(data3 + i))
5213506e 7163 return 1;
238235ef 7164 close (fd);
5213506e 7165 return 0;
238235ef
DJ
7166}
7167_ACEOF
5213506e 7168if ac_fn_c_try_run "$LINENO"; then :
a9266bfa
KG
7169 ac_cv_func_mmap_fixed_mapped=yes
7170else
5213506e 7171 ac_cv_func_mmap_fixed_mapped=no
a9266bfa 7172fi
5213506e
RW
7173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7174 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9266bfa 7175fi
5213506e 7176
a9266bfa 7177fi
5213506e
RW
7178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7179$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
a9266bfa 7180if test $ac_cv_func_mmap_fixed_mapped = yes; then
238235ef 7181
5213506e 7182$as_echo "#define HAVE_MMAP 1" >>confdefs.h
a9266bfa
KG
7183
7184fi
238235ef 7185rm -f conftest.mmap
a9266bfa 7186
238235ef 7187fi
a9266bfa 7188
5213506e
RW
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strncmp" >&5
7190$as_echo_n "checking for working strncmp... " >&6; }
7191if test "${ac_cv_func_strncmp_works+set}" = set; then :
7192 $as_echo_n "(cached) " >&6
a9266bfa 7193else
5213506e 7194 if test "$cross_compiling" = yes; then :
8c3db96e 7195 ac_cv_func_strncmp_works=yes
a9266bfa 7196else
5213506e 7197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
238235ef 7198/* end confdefs.h. */
a9266bfa
KG
7199
7200/* Test by Jim Wilson and Kaveh Ghazi.
7201 Check whether strncmp reads past the end of its string parameters. */
7202#include <sys/types.h>
7203
7204#ifdef HAVE_FCNTL_H
7205#include <fcntl.h>
7206#endif
7207
7208#ifdef HAVE_SYS_MMAN_H
7209#include <sys/mman.h>
7210#endif
7211
7212#ifndef MAP_ANON
7213#ifdef MAP_ANONYMOUS
7214#define MAP_ANON MAP_ANONYMOUS
7215#else
7216#define MAP_ANON MAP_FILE
7217#endif
7218#endif
7219
7220#ifndef MAP_FILE
7221#define MAP_FILE 0
7222#endif
7223#ifndef O_RDONLY
7224#define O_RDONLY 0
7225#endif
7226
7227#define MAP_LEN 0x10000
7228
7229main ()
7230{
7231#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
7232 char *p;
7233 int dev_zero;
7234
7235 dev_zero = open ("/dev/zero", O_RDONLY);
7236 if (dev_zero < 0)
7237 exit (1);
238235ef 7238
a9266bfa
KG
7239 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
7240 MAP_ANON|MAP_PRIVATE, dev_zero, 0);
a4219437
IR
7241 if (p == (char *)-1)
7242 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
7243 MAP_ANON|MAP_PRIVATE, -1, 0);
a9266bfa
KG
7244 if (p == (char *)-1)
7245 exit (2);
7246 else
7247 {
7248 char *string = "__si_type_info";
7249 char *q = (char *) p + MAP_LEN - strlen (string) - 2;
7250 char *r = (char *) p + 0xe;
7251
7252 strcpy (q, string);
7253 strcpy (r, string);
7254 strncmp (r, q, 14);
7255 }
7256#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */
7257 exit (0);
7258}
7259
238235ef 7260_ACEOF
5213506e 7261if ac_fn_c_try_run "$LINENO"; then :
a9266bfa
KG
7262 ac_cv_func_strncmp_works=yes
7263else
5213506e 7264 ac_cv_func_strncmp_works=no
a9266bfa 7265fi
5213506e
RW
7266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7267 conftest.$ac_objext conftest.beam conftest.$ac_ext
a9266bfa 7268fi
5213506e 7269
a9266bfa
KG
7270rm -f core core.* *.core
7271fi
5213506e
RW
7272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strncmp_works" >&5
7273$as_echo "$ac_cv_func_strncmp_works" >&6; }
a9266bfa 7274if test $ac_cv_func_strncmp_works = no ; then
5213506e 7275 case " $LIBOBJS " in
3beb1315 7276 *" strncmp.$ac_objext "* ) ;;
5213506e
RW
7277 *) LIBOBJS="$LIBOBJS strncmp.$ac_objext"
7278 ;;
3beb1315
HPN
7279esac
7280
a9266bfa
KG
7281fi
7282
7283
0bc0cd11
JL
7284# Install a library built with a cross compiler in $(tooldir) rather
7285# than $(libdir).
ca6b370d 7286if test -z "${with_cross_host}"; then
0bc0cd11
JL
7287 INSTALL_DEST=libdir
7288else
7289 INSTALL_DEST=tooldir
7290fi
7291
7292
ad49d865
L
7293
7294L=""
7295for l in x $LIBOBJS; do
7296 case $l in
7297 x) ;;
7298 *) L="$L ./$l" ;;
7299 esac
7300done
7301LIBOBJS="$L"
7302
cf61af07
CD
7303
7304
7305
7306
0bc0cd11 7307# We need multilib support, but only if configuring for the target.
5213506e 7308ac_config_files="$ac_config_files Makefile testsuite/Makefile"
9bf3c9cc 7309
5213506e 7310ac_config_commands="$ac_config_commands default"
9bf3c9cc 7311
238235ef 7312cat >confcache <<\_ACEOF
0bc0cd11
JL
7313# This file is a shell script that caches the results of configure
7314# tests run on this system so they can be shared between configure
238235ef
DJ
7315# scripts and configure runs, see configure's option --config-cache.
7316# It is not useful on other systems. If it contains results you don't
7317# want to keep, you may remove or edit it.
0bc0cd11 7318#
238235ef
DJ
7319# config.status only pays attention to the cache file if you give it
7320# the --recheck option to rerun configure.
0bc0cd11 7321#
238235ef
DJ
7322# `ac_cv_env_foo' variables (set or unset) will be overridden when
7323# loading this file, other *unset* `ac_cv_foo' will be assigned the
7324# following values.
7325
7326_ACEOF
7327
0bc0cd11
JL
7328# The following way of writing the cache mishandles newlines in values,
7329# but we know of no workaround that is simple, portable, and efficient.
5213506e 7330# So, we kill variables containing newlines.
0bc0cd11
JL
7331# Ultrix sh set writes to stderr and can't be redirected directly,
7332# and sets the high bit in the cache file unless we assign to the vars.
5213506e
RW
7333(
7334 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
7335 eval ac_val=\$$ac_var
7336 case $ac_val in #(
7337 *${as_nl}*)
7338 case $ac_var in #(
7339 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
7340$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
7341 esac
7342 case $ac_var in #(
7343 _ | IFS | as_nl) ;; #(
7344 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
7345 *) { eval $ac_var=; unset $ac_var;} ;;
7346 esac ;;
7347 esac
7348 done
7349
238235ef 7350 (set) 2>&1 |
5213506e
RW
7351 case $as_nl`(ac_space=' '; set) 2>&1` in #(
7352 *${as_nl}ac_space=\ *)
7353 # `set' does not quote correctly, so add quotes: double-quote
7354 # substitution turns \\\\ into \\, and sed turns \\ into \.
238235ef 7355 sed -n \
3beb1315
HPN
7356 "s/'/'\\\\''/g;
7357 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5213506e 7358 ;; #(
238235ef
DJ
7359 *)
7360 # `set' quotes correctly as required by POSIX, so do not add quotes.
5213506e 7361 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
238235ef 7362 ;;
5213506e
RW
7363 esac |
7364 sort
7365) |
238235ef 7366 sed '
5213506e 7367 /^ac_cv_env_/b end
238235ef 7368 t clear
5213506e 7369 :clear
238235ef
DJ
7370 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7371 t end
5213506e
RW
7372 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7373 :end' >>confcache
7374if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
7375 if test -w "$cache_file"; then
7376 test "x$cache_file" != "x/dev/null" &&
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
7378$as_echo "$as_me: updating cache $cache_file" >&6;}
238235ef 7379 cat confcache >$cache_file
0bc0cd11 7380 else
5213506e
RW
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
7382$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
0bc0cd11
JL
7383 fi
7384fi
7385rm -f confcache
7386
0bc0cd11
JL
7387test "x$prefix" = xNONE && prefix=$ac_default_prefix
7388# Let make expand exec_prefix.
7389test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7390
0bc0cd11
JL
7391DEFS=-DHAVE_CONFIG_H
7392
238235ef
DJ
7393ac_libobjs=
7394ac_ltlibobjs=
7395for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7396 # 1. Remove the extension, and $U if already installed.
5213506e
RW
7397 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
7398 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
7399 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
7400 # will be set to the directory where LIBOBJS objects are built.
7401 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
7402 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
238235ef
DJ
7403done
7404LIBOBJS=$ac_libobjs
0bc0cd11 7405
238235ef
DJ
7406LTLIBOBJS=$ac_ltlibobjs
7407
7408
7409
5213506e 7410
238235ef 7411: ${CONFIG_STATUS=./config.status}
5213506e 7412ac_write_fail=0
238235ef
DJ
7413ac_clean_files_save=$ac_clean_files
7414ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5213506e
RW
7415{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
7416$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
7417as_write_fail=0
7418cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
238235ef
DJ
7419#! $SHELL
7420# Generated by $as_me.
0bc0cd11 7421# Run this file to recreate the current configuration.
0bc0cd11 7422# Compiler output produced by configure, useful for debugging
238235ef 7423# configure, is in config.log if it exists.
0bc0cd11 7424
238235ef
DJ
7425debug=false
7426ac_cs_recheck=false
7427ac_cs_silent=false
238235ef 7428
5213506e
RW
7429SHELL=\${CONFIG_SHELL-$SHELL}
7430export SHELL
7431_ASEOF
7432cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
7433## -------------------- ##
7434## M4sh Initialization. ##
7435## -------------------- ##
7436
7437# Be more Bourne compatible
7438DUALCASE=1; export DUALCASE # for MKS sh
7439if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
238235ef
DJ
7440 emulate sh
7441 NULLCMD=:
5213506e 7442 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
238235ef
DJ
7443 # is contrary to our usage. Disable this feature.
7444 alias -g '${1+"$@"}'='"$@"'
5213506e
RW
7445 setopt NO_GLOB_SUBST
7446else
7447 case `(set -o) 2>/dev/null` in #(
7448 *posix*) :
7449 set -o posix ;; #(
7450 *) :
7451 ;;
7452esac
238235ef
DJ
7453fi
7454
5213506e
RW
7455
7456as_nl='
7457'
7458export as_nl
7459# Printing a long string crashes Solaris 7 /usr/bin/printf.
7460as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7461as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
7462as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
7463# Prefer a ksh shell builtin over an external printf program on Solaris,
7464# but without wasting forks for bash or zsh.
7465if test -z "$BASH_VERSION$ZSH_VERSION" \
7466 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
7467 as_echo='print -r --'
7468 as_echo_n='print -rn --'
7469elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
7470 as_echo='printf %s\n'
7471 as_echo_n='printf %s'
7472else
7473 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
7474 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
7475 as_echo_n='/usr/ucb/echo -n'
7476 else
7477 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
7478 as_echo_n_body='eval
7479 arg=$1;
7480 case $arg in #(
7481 *"$as_nl"*)
7482 expr "X$arg" : "X\\(.*\\)$as_nl";
7483 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7484 esac;
7485 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7486 '
7487 export as_echo_n_body
7488 as_echo_n='sh -c $as_echo_n_body as_echo'
7489 fi
7490 export as_echo_body
7491 as_echo='sh -c $as_echo_body as_echo'
7492fi
7493
7494# The user is always right.
7495if test "${PATH_SEPARATOR+set}" != set; then
7496 PATH_SEPARATOR=:
7497 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
7498 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
7499 PATH_SEPARATOR=';'
7500 }
238235ef
DJ
7501fi
7502
7503
5213506e
RW
7504# IFS
7505# We need space, tab and new line, in precisely that order. Quoting is
7506# there to prevent editors from complaining about space-tab.
7507# (If _AS_PATH_WALK were called with IFS unset, it would disable word
7508# splitting by setting IFS to empty value.)
7509IFS=" "" $as_nl"
7510
7511# Find who we are. Look in the path if we contain no directory separator.
7512case $0 in #((
7513 *[\\/]* ) as_myself=$0 ;;
7514 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7515for as_dir in $PATH
7516do
7517 IFS=$as_save_IFS
7518 test -z "$as_dir" && as_dir=.
7519 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
7520 done
7521IFS=$as_save_IFS
7522
7523 ;;
7524esac
7525# We did not find ourselves, most probably we were run as `sh COMMAND'
7526# in which case we are not to be found in the path.
7527if test "x$as_myself" = x; then
7528 as_myself=$0
7529fi
7530if test ! -f "$as_myself"; then
7531 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
7532 exit 1
7533fi
7534
7535# Unset variables that we do not need and which cause bugs (e.g. in
7536# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
7537# suppresses any "Segmentation fault" message there. '((' could
7538# trigger a bug in pdksh 5.2.14.
7539for as_var in BASH_ENV ENV MAIL MAILPATH
7540do eval test x\${$as_var+set} = xset \
7541 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
7542done
238235ef
DJ
7543PS1='$ '
7544PS2='> '
7545PS4='+ '
7546
7547# NLS nuisances.
5213506e
RW
7548LC_ALL=C
7549export LC_ALL
7550LANGUAGE=C
7551export LANGUAGE
7552
7553# CDPATH.
7554(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
7555
7556
7557# as_fn_error ERROR [LINENO LOG_FD]
7558# ---------------------------------
7559# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
7560# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
7561# script with status $?, using 1 if that was 0.
7562as_fn_error ()
7563{
7564 as_status=$?; test $as_status -eq 0 && as_status=1
7565 if test "$3"; then
7566 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
7567 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
238235ef 7568 fi
5213506e
RW
7569 $as_echo "$as_me: error: $1" >&2
7570 as_fn_exit $as_status
7571} # as_fn_error
7572
7573
7574# as_fn_set_status STATUS
7575# -----------------------
7576# Set $? to STATUS, without forking.
7577as_fn_set_status ()
7578{
7579 return $1
7580} # as_fn_set_status
7581
7582# as_fn_exit STATUS
7583# -----------------
7584# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
7585as_fn_exit ()
7586{
7587 set +e
7588 as_fn_set_status $1
7589 exit $1
7590} # as_fn_exit
7591
7592# as_fn_unset VAR
7593# ---------------
7594# Portably unset VAR.
7595as_fn_unset ()
7596{
7597 { eval $1=; unset $1;}
7598}
7599as_unset=as_fn_unset
7600# as_fn_append VAR VALUE
7601# ----------------------
7602# Append the text in VALUE to the end of the definition contained in VAR. Take
7603# advantage of any shell optimizations that allow amortized linear growth over
7604# repeated appends, instead of the typical quadratic growth present in naive
7605# implementations.
7606if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
7607 eval 'as_fn_append ()
7608 {
7609 eval $1+=\$2
7610 }'
7611else
7612 as_fn_append ()
7613 {
7614 eval $1=\$$1\$2
7615 }
7616fi # as_fn_append
7617
7618# as_fn_arith ARG...
7619# ------------------
7620# Perform arithmetic evaluation on the ARGs, and store the result in the
7621# global $as_val. Take advantage of shells that can avoid forks. The arguments
7622# must be portable across $(()) and expr.
7623if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
7624 eval 'as_fn_arith ()
7625 {
7626 as_val=$(( $* ))
7627 }'
7628else
7629 as_fn_arith ()
7630 {
7631 as_val=`expr "$@" || test $? -eq 1`
7632 }
7633fi # as_fn_arith
7634
0bc0cd11 7635
5213506e
RW
7636if expr a : '\(a\)' >/dev/null 2>&1 &&
7637 test "X`expr 00001 : '.*\(...\)'`" = X001; then
238235ef
DJ
7638 as_expr=expr
7639else
7640 as_expr=false
7641fi
0bc0cd11 7642
5213506e 7643if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
238235ef
DJ
7644 as_basename=basename
7645else
7646 as_basename=false
7647fi
0bc0cd11 7648
5213506e
RW
7649if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
7650 as_dirname=dirname
7651else
7652 as_dirname=false
7653fi
0bc0cd11 7654
5213506e 7655as_me=`$as_basename -- "$0" ||
238235ef
DJ
7656$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
7657 X"$0" : 'X\(//\)$' \| \
5213506e
RW
7658 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
7659$as_echo X/"$0" |
7660 sed '/^.*\/\([^/][^/]*\)\/*$/{
7661 s//\1/
7662 q
7663 }
7664 /^X\/\(\/\/\)$/{
7665 s//\1/
7666 q
7667 }
7668 /^X\/\(\/\).*/{
7669 s//\1/
7670 q
7671 }
7672 s/.*/./; q'`
238235ef 7673
238235ef
DJ
7674# Avoid depending upon Character Ranges.
7675as_cr_letters='abcdefghijklmnopqrstuvwxyz'
7676as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
7677as_cr_Letters=$as_cr_letters$as_cr_LETTERS
7678as_cr_digits='0123456789'
7679as_cr_alnum=$as_cr_Letters$as_cr_digits
0bc0cd11 7680
5213506e
RW
7681ECHO_C= ECHO_N= ECHO_T=
7682case `echo -n x` in #(((((
7683-n*)
7684 case `echo 'xy\c'` in
7685 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
7686 xy) ECHO_C='\c';;
7687 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
7688 ECHO_T=' ';;
7689 esac;;
7690*)
7691 ECHO_N='-n';;
238235ef
DJ
7692esac
7693
5213506e
RW
7694rm -f conf$$ conf$$.exe conf$$.file
7695if test -d conf$$.dir; then
7696 rm -f conf$$.dir/conf$$.file
238235ef 7697else
5213506e
RW
7698 rm -f conf$$.dir
7699 mkdir conf$$.dir 2>/dev/null
238235ef 7700fi
5213506e
RW
7701if (echo >conf$$.file) 2>/dev/null; then
7702 if ln -s conf$$.file conf$$ 2>/dev/null; then
238235ef 7703 as_ln_s='ln -s'
5213506e
RW
7704 # ... but there are two gotchas:
7705 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
7706 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
7707 # In both cases, we have to default to `cp -p'.
7708 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
7709 as_ln_s='cp -p'
7710 elif ln conf$$.file conf$$ 2>/dev/null; then
7711 as_ln_s=ln
7712 else
7713 as_ln_s='cp -p'
0bc0cd11 7714 fi
238235ef
DJ
7715else
7716 as_ln_s='cp -p'
7717fi
5213506e
RW
7718rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
7719rmdir conf$$.dir 2>/dev/null
7720
7721
7722# as_fn_mkdir_p
7723# -------------
7724# Create "$as_dir" as a directory, including parents if necessary.
7725as_fn_mkdir_p ()
7726{
7727
7728 case $as_dir in #(
7729 -*) as_dir=./$as_dir;;
7730 esac
7731 test -d "$as_dir" || eval $as_mkdir_p || {
7732 as_dirs=
7733 while :; do
7734 case $as_dir in #(
7735 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
7736 *) as_qdir=$as_dir;;
7737 esac
7738 as_dirs="'$as_qdir' $as_dirs"
7739 as_dir=`$as_dirname -- "$as_dir" ||
7740$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7741 X"$as_dir" : 'X\(//\)[^/]' \| \
7742 X"$as_dir" : 'X\(//\)$' \| \
7743 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
7744$as_echo X"$as_dir" |
7745 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
7746 s//\1/
7747 q
7748 }
7749 /^X\(\/\/\)[^/].*/{
7750 s//\1/
7751 q
7752 }
7753 /^X\(\/\/\)$/{
7754 s//\1/
7755 q
7756 }
7757 /^X\(\/\).*/{
7758 s//\1/
7759 q
7760 }
7761 s/.*/./; q'`
7762 test -d "$as_dir" && break
7763 done
7764 test -z "$as_dirs" || eval "mkdir $as_dirs"
7765 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
238235ef 7766
5213506e
RW
7767
7768} # as_fn_mkdir_p
238235ef 7769if mkdir -p . 2>/dev/null; then
5213506e 7770 as_mkdir_p='mkdir -p "$as_dir"'
238235ef 7771else
3beb1315 7772 test -d ./-p && rmdir ./-p
238235ef
DJ
7773 as_mkdir_p=false
7774fi
7775
5213506e
RW
7776if test -x / >/dev/null 2>&1; then
7777 as_test_x='test -x'
7778else
7779 if ls -dL / >/dev/null 2>&1; then
7780 as_ls_L_option=L
7781 else
7782 as_ls_L_option=
7783 fi
7784 as_test_x='
7785 eval sh -c '\''
7786 if test -d "$1"; then
7787 test -d "$1/.";
7788 else
7789 case $1 in #(
7790 -*)set "./$1";;
7791 esac;
7792 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
7793 ???[sx]*):;;*)false;;esac;fi
7794 '\'' sh
7795 '
7796fi
7797as_executable_p=$as_test_x
238235ef
DJ
7798
7799# Sed expression to map a string onto a valid CPP name.
3beb1315 7800as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
7801
7802# Sed expression to map a string onto a valid variable name.
3beb1315 7803as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
238235ef
DJ
7804
7805
238235ef 7806exec 6>&1
5213506e
RW
7807## ----------------------------------- ##
7808## Main body of $CONFIG_STATUS script. ##
7809## ----------------------------------- ##
7810_ASEOF
7811test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
7812
7813cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7814# Save the log message, to keep $0 and so on meaningful, and to
238235ef 7815# report actual input values of CONFIG_FILES etc. instead of their
5213506e
RW
7816# values after options handling.
7817ac_log="
238235ef 7818This file was extended by $as_me, which was
5213506e 7819generated by GNU Autoconf 2.64. Invocation command line was
238235ef
DJ
7820
7821 CONFIG_FILES = $CONFIG_FILES
7822 CONFIG_HEADERS = $CONFIG_HEADERS
7823 CONFIG_LINKS = $CONFIG_LINKS
7824 CONFIG_COMMANDS = $CONFIG_COMMANDS
7825 $ $0 $@
7826
5213506e
RW
7827on `(hostname || uname -n) 2>/dev/null | sed 1q`
7828"
7829
238235ef
DJ
7830_ACEOF
7831
5213506e
RW
7832case $ac_config_files in *"
7833"*) set x $ac_config_files; shift; ac_config_files=$*;;
7834esac
238235ef 7835
5213506e
RW
7836case $ac_config_headers in *"
7837"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
7838esac
238235ef 7839
238235ef 7840
5213506e
RW
7841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7842# Files that config.status was made for.
7843config_files="$ac_config_files"
7844config_headers="$ac_config_headers"
7845config_commands="$ac_config_commands"
238235ef 7846
5213506e 7847_ACEOF
238235ef 7848
5213506e 7849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
238235ef 7850ac_cs_usage="\
5213506e
RW
7851\`$as_me' instantiates files and other configuration actions
7852from templates according to the current configuration. Unless the files
7853and actions are specified as TAGs, all are instantiated by default.
238235ef 7854
5213506e 7855Usage: $0 [OPTION]... [TAG]...
238235ef
DJ
7856
7857 -h, --help print this help, then exit
5213506e
RW
7858 -V, --version print version number and configuration settings, then exit
7859 -q, --quiet, --silent
7860 do not print progress messages
238235ef
DJ
7861 -d, --debug don't remove temporary files
7862 --recheck update $as_me by reconfiguring in the same conditions
5213506e
RW
7863 --file=FILE[:TEMPLATE]
7864 instantiate the configuration file FILE
7865 --header=FILE[:TEMPLATE]
7866 instantiate the configuration header FILE
238235ef
DJ
7867
7868Configuration files:
7869$config_files
7870
7871Configuration headers:
7872$config_headers
7873
7874Configuration commands:
7875$config_commands
7876
5213506e 7877Report bugs to the package provider."
238235ef 7878
5213506e
RW
7879_ACEOF
7880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
238235ef
DJ
7881ac_cs_version="\\
7882config.status
5213506e
RW
7883configured by $0, generated by GNU Autoconf 2.64,
7884 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
238235ef 7885
5213506e 7886Copyright (C) 2009 Free Software Foundation, Inc.
238235ef
DJ
7887This config.status script is free software; the Free Software Foundation
7888gives unlimited permission to copy, distribute and modify it."
5213506e
RW
7889
7890ac_pwd='$ac_pwd'
7891srcdir='$srcdir'
7892INSTALL='$INSTALL'
7893test -n "\$AWK" || AWK=awk
238235ef
DJ
7894_ACEOF
7895
5213506e
RW
7896cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7897# The default lists apply if the user does not specify any file.
238235ef
DJ
7898ac_need_defaults=:
7899while test $# != 0
7900do
7901 case $1 in
7902 --*=*)
5213506e
RW
7903 ac_option=`expr "X$1" : 'X\([^=]*\)='`
7904 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
238235ef
DJ
7905 ac_shift=:
7906 ;;
5213506e 7907 *)
238235ef
DJ
7908 ac_option=$1
7909 ac_optarg=$2
7910 ac_shift=shift
7911 ;;
238235ef
DJ
7912 esac
7913
7914 case $ac_option in
7915 # Handling of the options.
238235ef
DJ
7916 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7917 ac_cs_recheck=: ;;
5213506e
RW
7918 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
7919 $as_echo "$ac_cs_version"; exit ;;
7920 --debug | --debu | --deb | --de | --d | -d )
238235ef
DJ
7921 debug=: ;;
7922 --file | --fil | --fi | --f )
7923 $ac_shift
5213506e
RW
7924 case $ac_optarg in
7925 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7926 esac
7927 as_fn_append CONFIG_FILES " '$ac_optarg'"
238235ef
DJ
7928 ac_need_defaults=false;;
7929 --header | --heade | --head | --hea )
7930 $ac_shift
5213506e
RW
7931 case $ac_optarg in
7932 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7933 esac
7934 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
238235ef 7935 ac_need_defaults=false;;
5213506e
RW
7936 --he | --h)
7937 # Conflict between --help and --header
7938 as_fn_error "ambiguous option: \`$1'
7939Try \`$0 --help' for more information.";;
7940 --help | --hel | -h )
7941 $as_echo "$ac_cs_usage"; exit ;;
238235ef
DJ
7942 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7943 | -silent | --silent | --silen | --sile | --sil | --si | --s)
7944 ac_cs_silent=: ;;
7945
7946 # This is an error.
5213506e
RW
7947 -*) as_fn_error "unrecognized option: \`$1'
7948Try \`$0 --help' for more information." ;;
238235ef 7949
5213506e
RW
7950 *) as_fn_append ac_config_targets " $1"
7951 ac_need_defaults=false ;;
238235ef
DJ
7952
7953 esac
7954 shift
0bc0cd11 7955done
238235ef
DJ
7956
7957ac_configure_extra_args=
7958
7959if $ac_cs_silent; then
7960 exec 6>/dev/null
7961 ac_configure_extra_args="$ac_configure_extra_args --silent"
0bc0cd11 7962fi
0bc0cd11 7963
238235ef 7964_ACEOF
5213506e 7965cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
238235ef 7966if \$ac_cs_recheck; then
5213506e
RW
7967 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7968 shift
7969 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
7970 CONFIG_SHELL='$SHELL'
7971 export CONFIG_SHELL
7972 exec "\$@"
238235ef 7973fi
0bc0cd11 7974
238235ef 7975_ACEOF
5213506e
RW
7976cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7977exec 5>>config.log
7978{
7979 echo
7980 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7981## Running $as_me. ##
7982_ASBOX
7983 $as_echo "$ac_log"
7984} >&5
238235ef 7985
5213506e
RW
7986_ACEOF
7987cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
238235ef 7988#
5213506e 7989# INIT-COMMANDS
238235ef 7990#
238235ef
DJ
7991srcdir=${srcdir}
7992host=${host}
7993target=${target}
7994with_target_subdir=${with_target_subdir}
238235ef
DJ
7995with_multisubdir=${with_multisubdir}
7996ac_configure_args="--enable-multilib ${ac_configure_args}"
7997CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7998ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
7999libiberty_topdir=${libiberty_topdir}
8000
8001
8002_ACEOF
8003
5213506e 8004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
238235ef 8005
5213506e 8006# Handling of arguments.
238235ef
DJ
8007for ac_config_target in $ac_config_targets
8008do
5213506e
RW
8009 case $ac_config_target in
8010 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
8011 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
8012 "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
8013 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
8014
8015 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
0bc0cd11 8016 esac
238235ef 8017done
0bc0cd11 8018
5213506e 8019
238235ef
DJ
8020# If the user did not use the arguments to specify the items to instantiate,
8021# then the envvar interface is used. Set only those that are not.
8022# We use the long form for the default assignment because of an extremely
8023# bizarre bug on SunOS 4.1.3.
8024if $ac_need_defaults; then
8025 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
8026 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
8027 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
8028fi
8029
8030# Have a temporary directory for convenience. Make it in the build tree
5213506e 8031# simply because there is no reason against having it here, and in addition,
238235ef 8032# creating and moving files from /tmp can sometimes cause problems.
5213506e
RW
8033# Hook for its removal unless debugging.
8034# Note that there is a small window in which the directory will not be cleaned:
8035# after its creation but before its name has been assigned to `$tmp'.
238235ef
DJ
8036$debug ||
8037{
5213506e
RW
8038 tmp=
8039 trap 'exit_status=$?
8040 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
8041' 0
8042 trap 'as_fn_exit 1' 1 2 13 15
238235ef 8043}
238235ef
DJ
8044# Create a (secure) tmp directory for tmp files.
8045
8046{
5213506e 8047 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
238235ef
DJ
8048 test -n "$tmp" && test -d "$tmp"
8049} ||
8050{
5213506e
RW
8051 tmp=./conf$$-$RANDOM
8052 (umask 077 && mkdir "$tmp")
8053} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
8054
8055# Set up the scripts for CONFIG_FILES section.
8056# No need to generate them if there are no CONFIG_FILES.
8057# This happens for instance with `./config.status config.h'.
8058if test -n "$CONFIG_FILES"; then
8059
8060if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
8061 ac_cs_awk_getline=:
8062 ac_cs_awk_pipe_init=
8063 ac_cs_awk_read_file='
8064 while ((getline aline < (F[key])) > 0)
8065 print(aline)
8066 close(F[key])'
8067 ac_cs_awk_pipe_fini=
8068else
8069 ac_cs_awk_getline=false
8070 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
8071 ac_cs_awk_read_file='
8072 print "|#_!!_#|"
8073 print "cat " F[key] " &&"
8074 '$ac_cs_awk_pipe_init
8075 # The final `:' finishes the AND list.
8076 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
8077fi
8078ac_cr=`echo X | tr X '\015'`
8079# On cygwin, bash can eat \r inside `` if the user requested igncr.
8080# But we know of no other shell where ac_cr would be empty at this
8081# point, so we can use a bashism as a fallback.
8082if test "x$ac_cr" = x; then
8083 eval ac_cr=\$\'\\r\'
8084fi
8085ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
8086if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
8087 ac_cs_awk_cr='\r'
8088else
8089 ac_cs_awk_cr=$ac_cr
8090fi
8091
8092echo 'BEGIN {' >"$tmp/subs1.awk" &&
8093_ACEOF
8094
8095# Create commands to substitute file output variables.
8096{
8097 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
8098 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
8099 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
8100 echo "_ACAWK" &&
8101 echo "_ACEOF"
8102} >conf$$files.sh &&
8103. ./conf$$files.sh ||
8104 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
8105rm -f conf$$files.sh
8106
238235ef 8107{
5213506e
RW
8108 echo "cat >conf$$subs.awk <<_ACEOF" &&
8109 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
8110 echo "_ACEOF"
8111} >conf$$subs.sh ||
8112 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
8113ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
8114ac_delim='%!_!# '
8115for ac_last_try in false false false false false :; do
8116 . ./conf$$subs.sh ||
8117 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
8118
8119 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
8120 if test $ac_delim_n = $ac_delim_num; then
8121 break
8122 elif $ac_last_try; then
8123 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
8124 else
8125 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8126 fi
8127done
8128rm -f conf$$subs.sh
8129
8130cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8131cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
8132_ACEOF
8133sed -n '
8134h
8135s/^/S["/; s/!.*/"]=/
8136p
8137g
8138s/^[^!]*!//
8139:repl
8140t repl
8141s/'"$ac_delim"'$//
8142t delim
8143:nl
8144h
8145s/\(.\{148\}\).*/\1/
8146t more1
8147s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
8148p
8149n
8150b repl
8151:more1
8152s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8153p
8154g
8155s/.\{148\}//
8156t nl
8157:delim
8158h
8159s/\(.\{148\}\).*/\1/
8160t more2
8161s/["\\]/\\&/g; s/^/"/; s/$/"/
8162p
8163b
8164:more2
8165s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8166p
8167g
8168s/.\{148\}//
8169t delim
8170' <conf$$subs.awk | sed '
8171/^[^""]/{
8172 N
8173 s/\n//
238235ef 8174}
5213506e
RW
8175' >>$CONFIG_STATUS || ac_write_fail=1
8176rm -f conf$$subs.awk
8177cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8178_ACAWK
8179cat >>"\$tmp/subs1.awk" <<_ACAWK &&
8180 for (key in S) S_is_set[key] = 1
8181 FS = "\a"
8182 \$ac_cs_awk_pipe_init
8183}
8184{
8185 line = $ 0
8186 nfields = split(line, field, "@")
8187 substed = 0
8188 len = length(field[1])
8189 for (i = 2; i < nfields; i++) {
8190 key = field[i]
8191 keylen = length(key)
8192 if (S_is_set[key]) {
8193 value = S[key]
8194 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
8195 len += length(value) + length(field[++i])
8196 substed = 1
8197 } else
8198 len += 1 + keylen
8199 }
8200 if (nfields == 3 && !substed) {
8201 key = field[2]
8202 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
8203 \$ac_cs_awk_read_file
8204 next
8205 }
8206 }
8207 print line
8208}
8209\$ac_cs_awk_pipe_fini
8210_ACAWK
8211_ACEOF
8212cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8213if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
8214 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
8215else
8216 cat
8217fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
8218 || as_fn_error "could not setup config files machinery" "$LINENO" 5
238235ef
DJ
8219_ACEOF
8220
5213506e
RW
8221# VPATH may cause trouble with some makes, so we remove $(srcdir),
8222# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
8223# trailing colons and then remove the whole line if VPATH becomes empty
8224# (actually we leave an empty line to preserve line numbers).
8225if test "x$srcdir" = x.; then
8226 ac_vpsub='/^[ ]*VPATH[ ]*=/{
8227s/:*\$(srcdir):*/:/
8228s/:*\${srcdir}:*/:/
8229s/:*@srcdir@:*/:/
8230s/^\([^=]*=[ ]*\):*/\1/
8231s/:*$//
8232s/^[^=]*=[ ]*$//
8233}'
8234fi
238235ef 8235
5213506e
RW
8236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8237fi # test -n "$CONFIG_FILES"
238235ef 8238
5213506e
RW
8239# Set up the scripts for CONFIG_HEADERS section.
8240# No need to generate them if there are no CONFIG_HEADERS.
8241# This happens for instance with `./config.status Makefile'.
8242if test -n "$CONFIG_HEADERS"; then
8243cat >"$tmp/defines.awk" <<\_ACAWK ||
8244BEGIN {
8245_ACEOF
8246
8247# Transform confdefs.h into an awk script `defines.awk', embedded as
8248# here-document in config.status, that substitutes the proper values into
8249# config.h.in to produce config.h.
8250
8251# Create a delimiter string that does not exist in confdefs.h, to ease
8252# handling of long lines.
8253ac_delim='%!_!# '
8254for ac_last_try in false false :; do
8255 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
8256 if test -z "$ac_t"; then
8257 break
8258 elif $ac_last_try; then
8259 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
8260 else
8261 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
0bc0cd11 8262 fi
5213506e 8263done
0bc0cd11 8264
5213506e
RW
8265# For the awk script, D is an array of macro values keyed by name,
8266# likewise P contains macro parameters if any. Preserve backslash
8267# newline sequences.
8268
8269ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
8270sed -n '
8271s/.\{148\}/&'"$ac_delim"'/g
8272t rset
8273:rset
8274s/^[ ]*#[ ]*define[ ][ ]*/ /
8275t def
8276d
8277:def
8278s/\\$//
8279t bsnl
8280s/["\\]/\\&/g
8281s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
8282D["\1"]=" \3"/p
8283s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
8284d
8285:bsnl
8286s/["\\]/\\&/g
8287s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
8288D["\1"]=" \3\\\\\\n"\\/p
8289t cont
8290s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
8291t cont
8292d
8293:cont
8294n
8295s/.\{148\}/&'"$ac_delim"'/g
8296t clear
8297:clear
8298s/\\$//
8299t bsnlc
8300s/["\\]/\\&/g; s/^/"/; s/$/"/p
8301d
8302:bsnlc
8303s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
8304b cont
8305' <confdefs.h | sed '
8306s/'"$ac_delim"'/"\\\
8307"/g' >>$CONFIG_STATUS || ac_write_fail=1
8308
8309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8310 for (key in D) D_is_set[key] = 1
8311 FS = "\a"
8312}
8313/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
8314 line = \$ 0
8315 split(line, arg, " ")
8316 if (arg[1] == "#") {
8317 defundef = arg[2]
8318 mac1 = arg[3]
8319 } else {
8320 defundef = substr(arg[1], 2)
8321 mac1 = arg[2]
8322 }
8323 split(mac1, mac2, "(") #)
8324 macro = mac2[1]
8325 prefix = substr(line, 1, index(line, defundef) - 1)
8326 if (D_is_set[macro]) {
8327 # Preserve the white space surrounding the "#".
8328 print prefix "define", macro P[macro] D[macro]
8329 next
8330 } else {
8331 # Replace #undef with comments. This is necessary, for example,
8332 # in the case of _POSIX_SOURCE, which is predefined and required
8333 # on some systems where configure will not decide to define it.
8334 if (defundef == "undef") {
8335 print "/*", prefix defundef, macro, "*/"
8336 next
8337 }
8338 }
8339}
8340{ print }
8341_ACAWK
238235ef 8342_ACEOF
5213506e
RW
8343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8344 as_fn_error "could not setup config headers machinery" "$LINENO" 5
8345fi # test -n "$CONFIG_HEADERS"
8346
8347
8348eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
8349shift
8350for ac_tag
8351do
8352 case $ac_tag in
8353 :[FHLC]) ac_mode=$ac_tag; continue;;
8354 esac
8355 case $ac_mode$ac_tag in
8356 :[FHL]*:*);;
8357 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
8358 :[FH]-) ac_tag=-:-;;
8359 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
8360 esac
8361 ac_save_IFS=$IFS
8362 IFS=:
8363 set x $ac_tag
8364 IFS=$ac_save_IFS
8365 shift
8366 ac_file=$1
8367 shift
8368
8369 case $ac_mode in
8370 :L) ac_source=$1;;
8371 :[FH])
8372 ac_file_inputs=
8373 for ac_f
8374 do
8375 case $ac_f in
8376 -) ac_f="$tmp/stdin";;
8377 *) # Look for the file first in the build tree, then in the source tree
8378 # (if the path is not absolute). The absolute path cannot be DOS-style,
8379 # because $ac_f cannot contain `:'.
8380 test -f "$ac_f" ||
8381 case $ac_f in
8382 [\\/$]*) false;;
8383 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
8384 esac ||
8385 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
8386 esac
8387 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
8388 as_fn_append ac_file_inputs " '$ac_f'"
8389 done
8390
8391 # Let's still pretend it is `configure' which instantiates (i.e., don't
8392 # use $as_me), people would be surprised to read:
8393 # /* config.h. Generated by config.status. */
8394 configure_input='Generated from '`
8395 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
8396 `' by configure.'
8397 if test x"$ac_file" != x-; then
8398 configure_input="$ac_file. $configure_input"
8399 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
8400$as_echo "$as_me: creating $ac_file" >&6;}
8401 fi
8402 # Neutralize special characters interpreted by sed in replacement strings.
8403 case $configure_input in #(
8404 *\&* | *\|* | *\\* )
8405 ac_sed_conf_input=`$as_echo "$configure_input" |
8406 sed 's/[\\\\&|]/\\\\&/g'`;; #(
8407 *) ac_sed_conf_input=$configure_input;;
8408 esac
8409
8410 case $ac_tag in
8411 *:-:* | *:-) cat >"$tmp/stdin" \
8412 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
8413 esac
8414 ;;
0bc0cd11
JL
8415 esac
8416
5213506e 8417 ac_dir=`$as_dirname -- "$ac_file" ||
238235ef 8418$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3beb1315
HPN
8419 X"$ac_file" : 'X\(//\)[^/]' \| \
8420 X"$ac_file" : 'X\(//\)$' \| \
5213506e
RW
8421 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
8422$as_echo X"$ac_file" |
8423 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8424 s//\1/
8425 q
8426 }
8427 /^X\(\/\/\)[^/].*/{
8428 s//\1/
8429 q
8430 }
8431 /^X\(\/\/\)$/{
8432 s//\1/
8433 q
8434 }
8435 /^X\(\/\).*/{
8436 s//\1/
8437 q
8438 }
8439 s/.*/./; q'`
8440 as_dir="$ac_dir"; as_fn_mkdir_p
238235ef 8441 ac_builddir=.
0bc0cd11 8442
5213506e
RW
8443case "$ac_dir" in
8444.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
8445*)
8446 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
8447 # A ".." for each directory in $ac_dir_suffix.
8448 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
8449 case $ac_top_builddir_sub in
8450 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
8451 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
8452 esac ;;
8453esac
8454ac_abs_top_builddir=$ac_pwd
8455ac_abs_builddir=$ac_pwd$ac_dir_suffix
8456# for backward compatibility:
8457ac_top_builddir=$ac_top_build_prefix
238235ef
DJ
8458
8459case $srcdir in
5213506e 8460 .) # We are building in place.
238235ef 8461 ac_srcdir=.
5213506e
RW
8462 ac_top_srcdir=$ac_top_builddir_sub
8463 ac_abs_top_srcdir=$ac_pwd ;;
8464 [\\/]* | ?:[\\/]* ) # Absolute name.
238235ef 8465 ac_srcdir=$srcdir$ac_dir_suffix;
5213506e
RW
8466 ac_top_srcdir=$srcdir
8467 ac_abs_top_srcdir=$srcdir ;;
8468 *) # Relative name.
8469 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
8470 ac_top_srcdir=$ac_top_build_prefix$srcdir
8471 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
238235ef 8472esac
5213506e 8473ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
a4f74b58 8474
238235ef 8475
5213506e
RW
8476 case $ac_mode in
8477 :F)
8478 #
8479 # CONFIG_FILE
8480 #
238235ef
DJ
8481
8482 case $INSTALL in
8483 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
5213506e 8484 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
0bc0cd11 8485 esac
5213506e 8486_ACEOF
0bc0cd11 8487
5213506e
RW
8488cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8489# If the template does not know about datarootdir, expand it.
8490# FIXME: This hack should be removed a few years after 2.60.
8491ac_datarootdir_hack=; ac_datarootdir_seen=
8492ac_sed_dataroot='
8493/datarootdir/ {
8494 p
8495 q
8496}
8497/@datadir@/p
8498/@docdir@/p
8499/@infodir@/p
8500/@localedir@/p
8501/@mandir@/p'
8502case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
8503*datarootdir*) ac_datarootdir_seen=yes;;
8504*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
8505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
8506$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8507_ACEOF
8508cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8509 ac_datarootdir_hack='
8510 s&@datadir@&$datadir&g
8511 s&@docdir@&$docdir&g
8512 s&@infodir@&$infodir&g
8513 s&@localedir@&$localedir&g
8514 s&@mandir@&$mandir&g
8515 s&\\\${datarootdir}&$datarootdir&g' ;;
8516esac
238235ef 8517_ACEOF
5213506e
RW
8518
8519# Neutralize VPATH when `$srcdir' = `.'.
8520# Shell code in configure.ac might set extrasub.
8521# FIXME: do we really want to maintain this feature?
8522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8523ac_sed_extra="$ac_vpsub
238235ef
DJ
8524$extrasub
8525_ACEOF
5213506e 8526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
238235ef
DJ
8527:t
8528/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5213506e
RW
8529s|@configure_input@|$ac_sed_conf_input|;t t
8530s&@top_builddir@&$ac_top_builddir_sub&;t t
8531s&@top_build_prefix@&$ac_top_build_prefix&;t t
8532s&@srcdir@&$ac_srcdir&;t t
8533s&@abs_srcdir@&$ac_abs_srcdir&;t t
8534s&@top_srcdir@&$ac_top_srcdir&;t t
8535s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
8536s&@builddir@&$ac_builddir&;t t
8537s&@abs_builddir@&$ac_abs_builddir&;t t
8538s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
8539s&@INSTALL@&$ac_INSTALL&;t t
8540$ac_datarootdir_hack
8541"
8542eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
8543if $ac_cs_awk_getline; then
8544 $AWK -f "$tmp/subs.awk"
8545else
8546 $AWK -f "$tmp/subs.awk" | $SHELL
8547fi >$tmp/out \
8548 || as_fn_error "could not create $ac_file" "$LINENO" 5
8549
8550test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
8551 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
8552 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
8554which seems to be undefined. Please make sure it is defined." >&5
8555$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
8556which seems to be undefined. Please make sure it is defined." >&2;}
8557
8558 rm -f "$tmp/stdin"
238235ef 8559 case $ac_file in
5213506e
RW
8560 -) cat "$tmp/out" && rm -f "$tmp/out";;
8561 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
8562 esac \
8563 || as_fn_error "could not create $ac_file" "$LINENO" 5
8564 ;;
8565 :H)
8566 #
8567 # CONFIG_HEADER
8568 #
238235ef 8569 if test x"$ac_file" != x-; then
5213506e
RW
8570 {
8571 $as_echo "/* $configure_input */" \
8572 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
8573 } >"$tmp/config.h" \
8574 || as_fn_error "could not create $ac_file" "$LINENO" 5
8575 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
8576 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
8577$as_echo "$as_me: $ac_file is unchanged" >&6;}
238235ef 8578 else
5213506e
RW
8579 rm -f "$ac_file"
8580 mv "$tmp/config.h" "$ac_file" \
8581 || as_fn_error "could not create $ac_file" "$LINENO" 5
238235ef
DJ
8582 fi
8583 else
5213506e
RW
8584 $as_echo "/* $configure_input */" \
8585 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
8586 || as_fn_error "could not create -" "$LINENO" 5
238235ef 8587 fi
5213506e 8588 ;;
a4f74b58 8589
5213506e
RW
8590 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
8591$as_echo "$as_me: executing $ac_file commands" >&6;}
8592 ;;
8593 esac
238235ef
DJ
8594
8595
5213506e
RW
8596 case $ac_file$ac_mode in
8597 "default":C) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
0bc0cd11 8598if test -n "$CONFIG_FILES"; then
7b3ed47d 8599 if test -n "${with_target_subdir}"; then
0bc0cd11
JL
8600 # FIXME: We shouldn't need to set ac_file
8601 ac_file=Makefile
6706f116 8602 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
0bc0cd11
JL
8603 . ${libiberty_topdir}/config-ml.in
8604 fi
238235ef 8605fi ;;
5213506e 8606
238235ef 8607 esac
5213506e 8608done # for ac_tag
238235ef 8609
238235ef 8610
5213506e 8611as_fn_exit 0
238235ef 8612_ACEOF
238235ef
DJ
8613ac_clean_files=$ac_clean_files_save
8614
5213506e
RW
8615test $ac_write_fail = 0 ||
8616 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
8617
238235ef
DJ
8618
8619# configure is writing to config.log, and then calls config.status.
8620# config.status does its own redirection, appending to config.log.
8621# Unfortunately, on DOS this fails, as config.log is still kept open
8622# by configure, so config.status won't be able to write to it; its
8623# output is simply discarded. So we exec the FD to /dev/null,
8624# effectively closing config.log, so it can be properly (re)opened and
8625# appended to by config.status. When coming back to configure, we
8626# need to make the FD available again.
8627if test "$no_create" != yes; then
8628 ac_cs_success=:
8629 ac_config_status_args=
8630 test "$silent" = yes &&
8631 ac_config_status_args="$ac_config_status_args --quiet"
8632 exec 5>/dev/null
8633 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
8634 exec 5>>config.log
8635 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
8636 # would make configure fail if this is the last instruction.
5213506e
RW
8637 $ac_cs_success || as_fn_exit $?
8638fi
8639if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
8640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
8641$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
238235ef 8642fi
0bc0cd11 8643