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