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