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