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