blob: 23b90778ec30a449e42f8547912ea39b90cf396d [file] [log] [blame]
Austin Schuhbb1338c2024-06-15 19:31:16 -07001#! /bin/sh
2# From configure.ac Revision.
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.69 for GNU MP 6.2.0.
5#
6# Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>.
7#
8#
9#
10# Copyright 1996-2020 Free Software Foundation, Inc.
11#
12# This file is part of the GNU MP Library.
13#
14# The GNU MP Library is free software; you can redistribute it and/or modify
15# it under the terms of either:
16#
17# * the GNU Lesser General Public License as published by the Free
18# Software Foundation; either version 3 of the License, or (at your
19# option) any later version.
20#
21# or
22#
23# * the GNU General Public License as published by the Free Software
24# Foundation; either version 2 of the License, or (at your option) any
25# later version.
26#
27# or both in parallel, as here.
28#
29# The GNU MP Library is distributed in the hope that it will be useful, but
30# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
31# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
32# for more details.
33#
34# You should have received copies of the GNU General Public License and the
35# GNU Lesser General Public License along with the GNU MP Library. If not,
36# see https://www.gnu.org/licenses/.
37#
38#
39#
40# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
41#
42#
43# This configure script is free software; the Free Software Foundation
44# gives unlimited permission to copy, distribute and modify it.
45## -------------------- ##
46## M4sh Initialization. ##
47## -------------------- ##
48
49# Be more Bourne compatible
50DUALCASE=1; export DUALCASE # for MKS sh
51if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
52 emulate sh
53 NULLCMD=:
54 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55 # is contrary to our usage. Disable this feature.
56 alias -g '${1+"$@"}'='"$@"'
57 setopt NO_GLOB_SUBST
58else
59 case `(set -o) 2>/dev/null` in #(
60 *posix*) :
61 set -o posix ;; #(
62 *) :
63 ;;
64esac
65fi
66
67
68as_nl='
69'
70export as_nl
71# Printing a long string crashes Solaris 7 /usr/bin/printf.
72as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
73as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
74as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
75# Prefer a ksh shell builtin over an external printf program on Solaris,
76# but without wasting forks for bash or zsh.
77if test -z "$BASH_VERSION$ZSH_VERSION" \
78 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
79 as_echo='print -r --'
80 as_echo_n='print -rn --'
81elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
82 as_echo='printf %s\n'
83 as_echo_n='printf %s'
84else
85 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
86 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
87 as_echo_n='/usr/ucb/echo -n'
88 else
89 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
90 as_echo_n_body='eval
91 arg=$1;
92 case $arg in #(
93 *"$as_nl"*)
94 expr "X$arg" : "X\\(.*\\)$as_nl";
95 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
96 esac;
97 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
98 '
99 export as_echo_n_body
100 as_echo_n='sh -c $as_echo_n_body as_echo'
101 fi
102 export as_echo_body
103 as_echo='sh -c $as_echo_body as_echo'
104fi
105
106# The user is always right.
107if test "${PATH_SEPARATOR+set}" != set; then
108 PATH_SEPARATOR=:
109 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
110 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
111 PATH_SEPARATOR=';'
112 }
113fi
114
115
116# IFS
117# We need space, tab and new line, in precisely that order. Quoting is
118# there to prevent editors from complaining about space-tab.
119# (If _AS_PATH_WALK were called with IFS unset, it would disable word
120# splitting by setting IFS to empty value.)
121IFS=" "" $as_nl"
122
123# Find who we are. Look in the path if we contain no directory separator.
124as_myself=
125case $0 in #((
126 *[\\/]* ) as_myself=$0 ;;
127 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
128for as_dir in $PATH
129do
130 IFS=$as_save_IFS
131 test -z "$as_dir" && as_dir=.
132 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
133 done
134IFS=$as_save_IFS
135
136 ;;
137esac
138# We did not find ourselves, most probably we were run as `sh COMMAND'
139# in which case we are not to be found in the path.
140if test "x$as_myself" = x; then
141 as_myself=$0
142fi
143if test ! -f "$as_myself"; then
144 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
145 exit 1
146fi
147
148# Unset variables that we do not need and which cause bugs (e.g. in
149# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
150# suppresses any "Segmentation fault" message there. '((' could
151# trigger a bug in pdksh 5.2.14.
152for as_var in BASH_ENV ENV MAIL MAILPATH
153do eval test x\${$as_var+set} = xset \
154 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
155done
156PS1='$ '
157PS2='> '
158PS4='+ '
159
160# NLS nuisances.
161LC_ALL=C
162export LC_ALL
163LANGUAGE=C
164export LANGUAGE
165
166# CDPATH.
167(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
168
169# Use a proper internal environment variable to ensure we don't fall
170 # into an infinite loop, continuously re-executing ourselves.
171 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
172 _as_can_reexec=no; export _as_can_reexec;
173 # We cannot yet assume a decent shell, so we have to provide a
174# neutralization value for shells without unset; and this also
175# works around shells that cannot unset nonexistent variables.
176# Preserve -v and -x to the replacement shell.
177BASH_ENV=/dev/null
178ENV=/dev/null
179(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
180case $- in # ((((
181 *v*x* | *x*v* ) as_opts=-vx ;;
182 *v* ) as_opts=-v ;;
183 *x* ) as_opts=-x ;;
184 * ) as_opts= ;;
185esac
186exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
187# Admittedly, this is quite paranoid, since all the known shells bail
188# out after a failed `exec'.
189$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
190as_fn_exit 255
191 fi
192 # We don't want this to propagate to other subprocesses.
193 { _as_can_reexec=; unset _as_can_reexec;}
194if test "x$CONFIG_SHELL" = x; then
195 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
196 emulate sh
197 NULLCMD=:
198 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
199 # is contrary to our usage. Disable this feature.
200 alias -g '\${1+\"\$@\"}'='\"\$@\"'
201 setopt NO_GLOB_SUBST
202else
203 case \`(set -o) 2>/dev/null\` in #(
204 *posix*) :
205 set -o posix ;; #(
206 *) :
207 ;;
208esac
209fi
210"
211 as_required="as_fn_return () { (exit \$1); }
212as_fn_success () { as_fn_return 0; }
213as_fn_failure () { as_fn_return 1; }
214as_fn_ret_success () { return 0; }
215as_fn_ret_failure () { return 1; }
216
217exitcode=0
218as_fn_success || { exitcode=1; echo as_fn_success failed.; }
219as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
220as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
221as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
222if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
223
224else
225 exitcode=1; echo positional parameters were not saved.
226fi
227test x\$exitcode = x0 || exit 1
228test -x / || exit 1"
229 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
230 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
231 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
232 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
233test \$(( 1 + 1 )) = 2 || exit 1
234
235 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
236 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
237 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
238 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
239 PATH=/empty FPATH=/empty; export PATH FPATH
240 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
241 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
242 if (eval "$as_required") 2>/dev/null; then :
243 as_have_required=yes
244else
245 as_have_required=no
246fi
247 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
248
249else
250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
251as_found=false
252for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
253do
254 IFS=$as_save_IFS
255 test -z "$as_dir" && as_dir=.
256 as_found=:
257 case $as_dir in #(
258 /*)
259 for as_base in sh bash ksh sh5; do
260 # Try only shells that exist, to save several forks.
261 as_shell=$as_dir/$as_base
262 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
263 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
264 CONFIG_SHELL=$as_shell as_have_required=yes
265 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
266 break 2
267fi
268fi
269 done;;
270 esac
271 as_found=false
272done
273$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
274 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
275 CONFIG_SHELL=$SHELL as_have_required=yes
276fi; }
277IFS=$as_save_IFS
278
279
280 if test "x$CONFIG_SHELL" != x; then :
281 export CONFIG_SHELL
282 # We cannot yet assume a decent shell, so we have to provide a
283# neutralization value for shells without unset; and this also
284# works around shells that cannot unset nonexistent variables.
285# Preserve -v and -x to the replacement shell.
286BASH_ENV=/dev/null
287ENV=/dev/null
288(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
289case $- in # ((((
290 *v*x* | *x*v* ) as_opts=-vx ;;
291 *v* ) as_opts=-v ;;
292 *x* ) as_opts=-x ;;
293 * ) as_opts= ;;
294esac
295exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
296# Admittedly, this is quite paranoid, since all the known shells bail
297# out after a failed `exec'.
298$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
299exit 255
300fi
301
302 if test x$as_have_required = xno; then :
303 $as_echo "$0: This script requires a shell more modern than all"
304 $as_echo "$0: the shells that I found on your system."
305 if test x${ZSH_VERSION+set} = xset ; then
306 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
307 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
308 else
309 $as_echo "$0: Please tell bug-autoconf@gnu.org and
310$0: gmp-bugs@gmplib.org, see
311$0: https://gmplib.org/manual/Reporting-Bugs.html about
312$0: your system, including any error possibly output before
313$0: this message. Then install a modern shell, or manually
314$0: run the script under such a shell if you do have one."
315 fi
316 exit 1
317fi
318fi
319fi
320SHELL=${CONFIG_SHELL-/bin/sh}
321export SHELL
322# Unset more variables known to interfere with behavior of common tools.
323CLICOLOR_FORCE= GREP_OPTIONS=
324unset CLICOLOR_FORCE GREP_OPTIONS
325
326## --------------------- ##
327## M4sh Shell Functions. ##
328## --------------------- ##
329# as_fn_unset VAR
330# ---------------
331# Portably unset VAR.
332as_fn_unset ()
333{
334 { eval $1=; unset $1;}
335}
336as_unset=as_fn_unset
337
338# as_fn_set_status STATUS
339# -----------------------
340# Set $? to STATUS, without forking.
341as_fn_set_status ()
342{
343 return $1
344} # as_fn_set_status
345
346# as_fn_exit STATUS
347# -----------------
348# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
349as_fn_exit ()
350{
351 set +e
352 as_fn_set_status $1
353 exit $1
354} # as_fn_exit
355
356# as_fn_mkdir_p
357# -------------
358# Create "$as_dir" as a directory, including parents if necessary.
359as_fn_mkdir_p ()
360{
361
362 case $as_dir in #(
363 -*) as_dir=./$as_dir;;
364 esac
365 test -d "$as_dir" || eval $as_mkdir_p || {
366 as_dirs=
367 while :; do
368 case $as_dir in #(
369 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
370 *) as_qdir=$as_dir;;
371 esac
372 as_dirs="'$as_qdir' $as_dirs"
373 as_dir=`$as_dirname -- "$as_dir" ||
374$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
375 X"$as_dir" : 'X\(//\)[^/]' \| \
376 X"$as_dir" : 'X\(//\)$' \| \
377 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
378$as_echo X"$as_dir" |
379 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
380 s//\1/
381 q
382 }
383 /^X\(\/\/\)[^/].*/{
384 s//\1/
385 q
386 }
387 /^X\(\/\/\)$/{
388 s//\1/
389 q
390 }
391 /^X\(\/\).*/{
392 s//\1/
393 q
394 }
395 s/.*/./; q'`
396 test -d "$as_dir" && break
397 done
398 test -z "$as_dirs" || eval "mkdir $as_dirs"
399 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
400
401
402} # as_fn_mkdir_p
403
404# as_fn_executable_p FILE
405# -----------------------
406# Test if FILE is an executable regular file.
407as_fn_executable_p ()
408{
409 test -f "$1" && test -x "$1"
410} # as_fn_executable_p
411# as_fn_append VAR VALUE
412# ----------------------
413# Append the text in VALUE to the end of the definition contained in VAR. Take
414# advantage of any shell optimizations that allow amortized linear growth over
415# repeated appends, instead of the typical quadratic growth present in naive
416# implementations.
417if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
418 eval 'as_fn_append ()
419 {
420 eval $1+=\$2
421 }'
422else
423 as_fn_append ()
424 {
425 eval $1=\$$1\$2
426 }
427fi # as_fn_append
428
429# as_fn_arith ARG...
430# ------------------
431# Perform arithmetic evaluation on the ARGs, and store the result in the
432# global $as_val. Take advantage of shells that can avoid forks. The arguments
433# must be portable across $(()) and expr.
434if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
435 eval 'as_fn_arith ()
436 {
437 as_val=$(( $* ))
438 }'
439else
440 as_fn_arith ()
441 {
442 as_val=`expr "$@" || test $? -eq 1`
443 }
444fi # as_fn_arith
445
446
447# as_fn_error STATUS ERROR [LINENO LOG_FD]
448# ----------------------------------------
449# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
450# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
451# script with STATUS, using 1 if that was 0.
452as_fn_error ()
453{
454 as_status=$1; test $as_status -eq 0 && as_status=1
455 if test "$4"; then
456 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
457 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
458 fi
459 $as_echo "$as_me: error: $2" >&2
460 as_fn_exit $as_status
461} # as_fn_error
462
463if expr a : '\(a\)' >/dev/null 2>&1 &&
464 test "X`expr 00001 : '.*\(...\)'`" = X001; then
465 as_expr=expr
466else
467 as_expr=false
468fi
469
470if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
471 as_basename=basename
472else
473 as_basename=false
474fi
475
476if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
477 as_dirname=dirname
478else
479 as_dirname=false
480fi
481
482as_me=`$as_basename -- "$0" ||
483$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
484 X"$0" : 'X\(//\)$' \| \
485 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
486$as_echo X/"$0" |
487 sed '/^.*\/\([^/][^/]*\)\/*$/{
488 s//\1/
489 q
490 }
491 /^X\/\(\/\/\)$/{
492 s//\1/
493 q
494 }
495 /^X\/\(\/\).*/{
496 s//\1/
497 q
498 }
499 s/.*/./; q'`
500
501# Avoid depending upon Character Ranges.
502as_cr_letters='abcdefghijklmnopqrstuvwxyz'
503as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
504as_cr_Letters=$as_cr_letters$as_cr_LETTERS
505as_cr_digits='0123456789'
506as_cr_alnum=$as_cr_Letters$as_cr_digits
507
508
509 as_lineno_1=$LINENO as_lineno_1a=$LINENO
510 as_lineno_2=$LINENO as_lineno_2a=$LINENO
511 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
512 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
513 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
514 sed -n '
515 p
516 /[$]LINENO/=
517 ' <$as_myself |
518 sed '
519 s/[$]LINENO.*/&-/
520 t lineno
521 b
522 :lineno
523 N
524 :loop
525 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
526 t loop
527 s/-\n.*//
528 ' >$as_me.lineno &&
529 chmod +x "$as_me.lineno" ||
530 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
531
532 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
533 # already done that, so ensure we don't try to do so again and fall
534 # in an infinite loop. This has already happened in practice.
535 _as_can_reexec=no; export _as_can_reexec
536 # Don't try to exec as it changes $[0], causing all sort of problems
537 # (the dirname of $[0] is not the place where we might find the
538 # original and so on. Autoconf is especially sensitive to this).
539 . "./$as_me.lineno"
540 # Exit status is that of the last command.
541 exit
542}
543
544ECHO_C= ECHO_N= ECHO_T=
545case `echo -n x` in #(((((
546-n*)
547 case `echo 'xy\c'` in
548 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
549 xy) ECHO_C='\c';;
550 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
551 ECHO_T=' ';;
552 esac;;
553*)
554 ECHO_N='-n';;
555esac
556
557rm -f conf$$ conf$$.exe conf$$.file
558if test -d conf$$.dir; then
559 rm -f conf$$.dir/conf$$.file
560else
561 rm -f conf$$.dir
562 mkdir conf$$.dir 2>/dev/null
563fi
564if (echo >conf$$.file) 2>/dev/null; then
565 if ln -s conf$$.file conf$$ 2>/dev/null; then
566 as_ln_s='ln -s'
567 # ... but there are two gotchas:
568 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
569 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
570 # In both cases, we have to default to `cp -pR'.
571 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
572 as_ln_s='cp -pR'
573 elif ln conf$$.file conf$$ 2>/dev/null; then
574 as_ln_s=ln
575 else
576 as_ln_s='cp -pR'
577 fi
578else
579 as_ln_s='cp -pR'
580fi
581rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
582rmdir conf$$.dir 2>/dev/null
583
584if mkdir -p . 2>/dev/null; then
585 as_mkdir_p='mkdir -p "$as_dir"'
586else
587 test -d ./-p && rmdir ./-p
588 as_mkdir_p=false
589fi
590
591as_test_x='test -x'
592as_executable_p=as_fn_executable_p
593
594# Sed expression to map a string onto a valid CPP name.
595as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
596
597# Sed expression to map a string onto a valid variable name.
598as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
599
600SHELL=${CONFIG_SHELL-/bin/sh}
601
602
603test -n "$DJDIR" || exec 7<&0 </dev/null
604exec 6>&1
605
606# Name of the host.
607# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
608# so uname gets run too.
609ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
610
611#
612# Initializations.
613#
614ac_default_prefix=/usr/local
615ac_clean_files=
616ac_config_libobj_dir=.
617LIBOBJS=
618cross_compiling=no
619subdirs=
620MFLAGS=
621MAKEFLAGS=
622
623# Identity of this package.
624PACKAGE_NAME='GNU MP'
625PACKAGE_TARNAME='gmp'
626PACKAGE_VERSION='6.2.0'
627PACKAGE_STRING='GNU MP 6.2.0'
628PACKAGE_BUGREPORT='gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html'
629PACKAGE_URL='http://www.gnu.org/software/gmp/'
630
631ac_unique_file="gmp-impl.h"
632# Factoring default headers for most tests.
633ac_includes_default="\
634#include <stdio.h>
635#ifdef HAVE_SYS_TYPES_H
636# include <sys/types.h>
637#endif
638#ifdef HAVE_SYS_STAT_H
639# include <sys/stat.h>
640#endif
641#ifdef STDC_HEADERS
642# include <stdlib.h>
643# include <stddef.h>
644#else
645# ifdef HAVE_STDLIB_H
646# include <stdlib.h>
647# endif
648#endif
649#ifdef HAVE_STRING_H
650# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
651# include <memory.h>
652# endif
653# include <string.h>
654#endif
655#ifdef HAVE_STRINGS_H
656# include <strings.h>
657#endif
658#ifdef HAVE_INTTYPES_H
659# include <inttypes.h>
660#endif
661#ifdef HAVE_STDINT_H
662# include <stdint.h>
663#endif
664#ifdef HAVE_UNISTD_H
665# include <unistd.h>
666#endif"
667
668ac_subst_vars='am__EXEEXT_FALSE
669am__EXEEXT_TRUE
670LTLIBOBJS
671LIBOBJS
672LEXLIB
673LEX_OUTPUT_ROOT
674LEX
675YFLAGS
676YACC
677LIBREADLINE
678WITH_READLINE_01
679LIBCURSES
680HAVE_STACK_T_01
681HAVE_SYS_RESOURCE_H_01
682HAVE_SIGSTACK_01
683HAVE_SIGALTSTACK_01
684HAVE_SIGACTION_01
685HAVE_GETTIMEOFDAY_01
686HAVE_GETRUSAGE_01
687HAVE_CPUTIME_01
688HAVE_CLOCK_01
689TUNE_SQR_OBJ
690gmp_srclinks
691mpn_objs_in_libgmp
692mpn_objects
693GMP_LIMB_BITS
694M4
695TUNE_LIBS
696TAL_OBJECT
697LIBM
698ENABLE_STATIC_FALSE
699ENABLE_STATIC_TRUE
700LT_SYS_LIBRARY_PATH
701OTOOL64
702OTOOL
703LIPO
704NMEDIT
705DSYMUTIL
706MANIFEST_TOOL
707RANLIB
708ac_ct_AR
709LN_S
710LD
711FGREP
712SED
713LIBTOOL
714LIBGMP_DLL
715OBJDUMP
716DLLTOOL
717AS
718NM
719ac_ct_DUMPBIN
720DUMPBIN
721AR
722ASMFLAGS
723EGREP
724GREP
725CXXCPP
726WANT_CXX_FALSE
727WANT_CXX_TRUE
728ac_ct_CXX
729CXXFLAGS
730CXX
731CCAS
732LIBM_FOR_BUILD
733U_FOR_BUILD
734EXEEXT_FOR_BUILD
735CPP_FOR_BUILD
736CC_FOR_BUILD
737CPP
738OBJEXT
739EXEEXT
740ac_ct_CC
741CPPFLAGS
742LDFLAGS
743CFLAGS
744CC
745DEFN_LONG_LONG_LIMB
746CALLING_CONVENTIONS_OBJS
747SPEED_CYCLECOUNTER_OBJ
748LIBGMPXX_LDFLAGS
749LIBGMP_LDFLAGS
750GMP_LDFLAGS
751HAVE_HOST_CPU_FAMILY_powerpc
752HAVE_HOST_CPU_FAMILY_power
753ABI
754GMP_NAIL_BITS
755MAINT
756MAINTAINER_MODE_FALSE
757MAINTAINER_MODE_TRUE
758AM_BACKSLASH
759AM_DEFAULT_VERBOSITY
760AM_DEFAULT_V
761AM_V
762am__untar
763am__tar
764AMTAR
765am__leading_dot
766SET_MAKE
767AWK
768mkdir_p
769MKDIR_P
770INSTALL_STRIP_PROGRAM
771STRIP
772install_sh
773MAKEINFO
774AUTOHEADER
775AUTOMAKE
776AUTOCONF
777ACLOCAL
778VERSION
779PACKAGE
780CYGPATH_W
781am__isrc
782INSTALL_DATA
783INSTALL_SCRIPT
784INSTALL_PROGRAM
785host_os
786host_vendor
787host_cpu
788host
789build_os
790build_vendor
791build_cpu
792build
793target_alias
794host_alias
795build_alias
796LIBS
797ECHO_T
798ECHO_N
799ECHO_C
800DEFS
801mandir
802localedir
803libdir
804psdir
805pdfdir
806dvidir
807htmldir
808infodir
809docdir
810oldincludedir
811includedir
812localstatedir
813sharedstatedir
814sysconfdir
815datadir
816datarootdir
817libexecdir
818sbindir
819bindir
820program_transform_name
821prefix
822exec_prefix
823PACKAGE_URL
824PACKAGE_BUGREPORT
825PACKAGE_STRING
826PACKAGE_VERSION
827PACKAGE_TARNAME
828PACKAGE_NAME
829PATH_SEPARATOR
830SHELL'
831ac_subst_files=''
832ac_user_opts='
833enable_option_checking
834enable_silent_rules
835enable_maintainer_mode
836enable_assert
837enable_alloca
838enable_cxx
839enable_assembly
840enable_fft
841enable_old_fft_full
842enable_nails
843enable_profiling
844with_readline
845enable_fat
846enable_minithres
847enable_fake_cpuid
848enable_shared
849enable_static
850with_pic
851enable_fast_install
852with_aix_soname
853with_gnu_ld
854with_sysroot
855enable_libtool_lock
856'
857 ac_precious_vars='build_alias
858host_alias
859target_alias
860ABI
861CC
862CFLAGS
863LDFLAGS
864LIBS
865CPPFLAGS
866CPP
867CC_FOR_BUILD
868CPP_FOR_BUILD
869CXX
870CXXFLAGS
871CCC
872CXXCPP
873LT_SYS_LIBRARY_PATH
874M4
875YACC
876YFLAGS'
877
878
879# Initialize some variables set by options.
880ac_init_help=
881ac_init_version=false
882ac_unrecognized_opts=
883ac_unrecognized_sep=
884# The variables have the same names as the options, with
885# dashes changed to underlines.
886cache_file=/dev/null
887exec_prefix=NONE
888no_create=
889no_recursion=
890prefix=NONE
891program_prefix=NONE
892program_suffix=NONE
893program_transform_name=s,x,x,
894silent=
895site=
896srcdir=
897verbose=
898x_includes=NONE
899x_libraries=NONE
900
901# Installation directory options.
902# These are left unexpanded so users can "make install exec_prefix=/foo"
903# and all the variables that are supposed to be based on exec_prefix
904# by default will actually change.
905# Use braces instead of parens because sh, perl, etc. also accept them.
906# (The list follows the same order as the GNU Coding Standards.)
907bindir='${exec_prefix}/bin'
908sbindir='${exec_prefix}/sbin'
909libexecdir='${exec_prefix}/libexec'
910datarootdir='${prefix}/share'
911datadir='${datarootdir}'
912sysconfdir='${prefix}/etc'
913sharedstatedir='${prefix}/com'
914localstatedir='${prefix}/var'
915includedir='${prefix}/include'
916oldincludedir='/usr/include'
917docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
918infodir='${datarootdir}/info'
919htmldir='${docdir}'
920dvidir='${docdir}'
921pdfdir='${docdir}'
922psdir='${docdir}'
923libdir='${exec_prefix}/lib'
924localedir='${datarootdir}/locale'
925mandir='${datarootdir}/man'
926
927ac_prev=
928ac_dashdash=
929for ac_option
930do
931 # If the previous option needs an argument, assign it.
932 if test -n "$ac_prev"; then
933 eval $ac_prev=\$ac_option
934 ac_prev=
935 continue
936 fi
937
938 case $ac_option in
939 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
940 *=) ac_optarg= ;;
941 *) ac_optarg=yes ;;
942 esac
943
944 # Accept the important Cygnus configure options, so we can diagnose typos.
945
946 case $ac_dashdash$ac_option in
947 --)
948 ac_dashdash=yes ;;
949
950 -bindir | --bindir | --bindi | --bind | --bin | --bi)
951 ac_prev=bindir ;;
952 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
953 bindir=$ac_optarg ;;
954
955 -build | --build | --buil | --bui | --bu)
956 ac_prev=build_alias ;;
957 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
958 build_alias=$ac_optarg ;;
959
960 -cache-file | --cache-file | --cache-fil | --cache-fi \
961 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
962 ac_prev=cache_file ;;
963 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
964 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
965 cache_file=$ac_optarg ;;
966
967 --config-cache | -C)
968 cache_file=config.cache ;;
969
970 -datadir | --datadir | --datadi | --datad)
971 ac_prev=datadir ;;
972 -datadir=* | --datadir=* | --datadi=* | --datad=*)
973 datadir=$ac_optarg ;;
974
975 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
976 | --dataroo | --dataro | --datar)
977 ac_prev=datarootdir ;;
978 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
979 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
980 datarootdir=$ac_optarg ;;
981
982 -disable-* | --disable-*)
983 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
984 # Reject names that are not valid shell variable names.
985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
986 as_fn_error $? "invalid feature name: $ac_useropt"
987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=no ;;
997
998 -docdir | --docdir | --docdi | --doc | --do)
999 ac_prev=docdir ;;
1000 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1001 docdir=$ac_optarg ;;
1002
1003 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1004 ac_prev=dvidir ;;
1005 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1006 dvidir=$ac_optarg ;;
1007
1008 -enable-* | --enable-*)
1009 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1010 # Reject names that are not valid shell variable names.
1011 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1012 as_fn_error $? "invalid feature name: $ac_useropt"
1013 ac_useropt_orig=$ac_useropt
1014 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1015 case $ac_user_opts in
1016 *"
1017"enable_$ac_useropt"
1018"*) ;;
1019 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1020 ac_unrecognized_sep=', ';;
1021 esac
1022 eval enable_$ac_useropt=\$ac_optarg ;;
1023
1024 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1025 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1026 | --exec | --exe | --ex)
1027 ac_prev=exec_prefix ;;
1028 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1029 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1030 | --exec=* | --exe=* | --ex=*)
1031 exec_prefix=$ac_optarg ;;
1032
1033 -gas | --gas | --ga | --g)
1034 # Obsolete; use --with-gas.
1035 with_gas=yes ;;
1036
1037 -help | --help | --hel | --he | -h)
1038 ac_init_help=long ;;
1039 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1040 ac_init_help=recursive ;;
1041 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1042 ac_init_help=short ;;
1043
1044 -host | --host | --hos | --ho)
1045 ac_prev=host_alias ;;
1046 -host=* | --host=* | --hos=* | --ho=*)
1047 host_alias=$ac_optarg ;;
1048
1049 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1050 ac_prev=htmldir ;;
1051 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1052 | --ht=*)
1053 htmldir=$ac_optarg ;;
1054
1055 -includedir | --includedir | --includedi | --included | --include \
1056 | --includ | --inclu | --incl | --inc)
1057 ac_prev=includedir ;;
1058 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1059 | --includ=* | --inclu=* | --incl=* | --inc=*)
1060 includedir=$ac_optarg ;;
1061
1062 -infodir | --infodir | --infodi | --infod | --info | --inf)
1063 ac_prev=infodir ;;
1064 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1065 infodir=$ac_optarg ;;
1066
1067 -libdir | --libdir | --libdi | --libd)
1068 ac_prev=libdir ;;
1069 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1070 libdir=$ac_optarg ;;
1071
1072 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1073 | --libexe | --libex | --libe)
1074 ac_prev=libexecdir ;;
1075 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1076 | --libexe=* | --libex=* | --libe=*)
1077 libexecdir=$ac_optarg ;;
1078
1079 -localedir | --localedir | --localedi | --localed | --locale)
1080 ac_prev=localedir ;;
1081 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1082 localedir=$ac_optarg ;;
1083
1084 -localstatedir | --localstatedir | --localstatedi | --localstated \
1085 | --localstate | --localstat | --localsta | --localst | --locals)
1086 ac_prev=localstatedir ;;
1087 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1088 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1089 localstatedir=$ac_optarg ;;
1090
1091 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1092 ac_prev=mandir ;;
1093 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1094 mandir=$ac_optarg ;;
1095
1096 -nfp | --nfp | --nf)
1097 # Obsolete; use --without-fp.
1098 with_fp=no ;;
1099
1100 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1101 | --no-cr | --no-c | -n)
1102 no_create=yes ;;
1103
1104 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1105 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1106 no_recursion=yes ;;
1107
1108 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1109 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1110 | --oldin | --oldi | --old | --ol | --o)
1111 ac_prev=oldincludedir ;;
1112 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1113 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1114 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1115 oldincludedir=$ac_optarg ;;
1116
1117 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1118 ac_prev=prefix ;;
1119 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1120 prefix=$ac_optarg ;;
1121
1122 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1123 | --program-pre | --program-pr | --program-p)
1124 ac_prev=program_prefix ;;
1125 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1126 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1127 program_prefix=$ac_optarg ;;
1128
1129 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1130 | --program-suf | --program-su | --program-s)
1131 ac_prev=program_suffix ;;
1132 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1133 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1134 program_suffix=$ac_optarg ;;
1135
1136 -program-transform-name | --program-transform-name \
1137 | --program-transform-nam | --program-transform-na \
1138 | --program-transform-n | --program-transform- \
1139 | --program-transform | --program-transfor \
1140 | --program-transfo | --program-transf \
1141 | --program-trans | --program-tran \
1142 | --progr-tra | --program-tr | --program-t)
1143 ac_prev=program_transform_name ;;
1144 -program-transform-name=* | --program-transform-name=* \
1145 | --program-transform-nam=* | --program-transform-na=* \
1146 | --program-transform-n=* | --program-transform-=* \
1147 | --program-transform=* | --program-transfor=* \
1148 | --program-transfo=* | --program-transf=* \
1149 | --program-trans=* | --program-tran=* \
1150 | --progr-tra=* | --program-tr=* | --program-t=*)
1151 program_transform_name=$ac_optarg ;;
1152
1153 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1154 ac_prev=pdfdir ;;
1155 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1156 pdfdir=$ac_optarg ;;
1157
1158 -psdir | --psdir | --psdi | --psd | --ps)
1159 ac_prev=psdir ;;
1160 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1161 psdir=$ac_optarg ;;
1162
1163 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1164 | -silent | --silent | --silen | --sile | --sil)
1165 silent=yes ;;
1166
1167 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1168 ac_prev=sbindir ;;
1169 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1170 | --sbi=* | --sb=*)
1171 sbindir=$ac_optarg ;;
1172
1173 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1174 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1175 | --sharedst | --shareds | --shared | --share | --shar \
1176 | --sha | --sh)
1177 ac_prev=sharedstatedir ;;
1178 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1179 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1180 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1181 | --sha=* | --sh=*)
1182 sharedstatedir=$ac_optarg ;;
1183
1184 -site | --site | --sit)
1185 ac_prev=site ;;
1186 -site=* | --site=* | --sit=*)
1187 site=$ac_optarg ;;
1188
1189 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1190 ac_prev=srcdir ;;
1191 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1192 srcdir=$ac_optarg ;;
1193
1194 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1195 | --syscon | --sysco | --sysc | --sys | --sy)
1196 ac_prev=sysconfdir ;;
1197 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1198 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1199 sysconfdir=$ac_optarg ;;
1200
1201 -target | --target | --targe | --targ | --tar | --ta | --t)
1202 ac_prev=target_alias ;;
1203 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1204 target_alias=$ac_optarg ;;
1205
1206 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1207 verbose=yes ;;
1208
1209 -version | --version | --versio | --versi | --vers | -V)
1210 ac_init_version=: ;;
1211
1212 -with-* | --with-*)
1213 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1214 # Reject names that are not valid shell variable names.
1215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1216 as_fn_error $? "invalid package name: $ac_useropt"
1217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=\$ac_optarg ;;
1227
1228 -without-* | --without-*)
1229 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1230 # Reject names that are not valid shell variable names.
1231 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1232 as_fn_error $? "invalid package name: $ac_useropt"
1233 ac_useropt_orig=$ac_useropt
1234 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1235 case $ac_user_opts in
1236 *"
1237"with_$ac_useropt"
1238"*) ;;
1239 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1240 ac_unrecognized_sep=', ';;
1241 esac
1242 eval with_$ac_useropt=no ;;
1243
1244 --x)
1245 # Obsolete; use --with-x.
1246 with_x=yes ;;
1247
1248 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1249 | --x-incl | --x-inc | --x-in | --x-i)
1250 ac_prev=x_includes ;;
1251 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1252 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1253 x_includes=$ac_optarg ;;
1254
1255 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1256 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1257 ac_prev=x_libraries ;;
1258 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1259 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1260 x_libraries=$ac_optarg ;;
1261
1262 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1263Try \`$0 --help' for more information"
1264 ;;
1265
1266 *=*)
1267 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1268 # Reject names that are not valid shell variable names.
1269 case $ac_envvar in #(
1270 '' | [0-9]* | *[!_$as_cr_alnum]* )
1271 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1272 esac
1273 eval $ac_envvar=\$ac_optarg
1274 export $ac_envvar ;;
1275
1276 *)
1277 # FIXME: should be removed in autoconf 3.0.
1278 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1279 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1280 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1281 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1282 ;;
1283
1284 esac
1285done
1286
1287if test -n "$ac_prev"; then
1288 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1289 as_fn_error $? "missing argument to $ac_option"
1290fi
1291
1292if test -n "$ac_unrecognized_opts"; then
1293 case $enable_option_checking in
1294 no) ;;
1295 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1296 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1297 esac
1298fi
1299
1300# Check all directory arguments for consistency.
1301for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1302 datadir sysconfdir sharedstatedir localstatedir includedir \
1303 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1304 libdir localedir mandir
1305do
1306 eval ac_val=\$$ac_var
1307 # Remove trailing slashes.
1308 case $ac_val in
1309 */ )
1310 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1311 eval $ac_var=\$ac_val;;
1312 esac
1313 # Be sure to have absolute directory names.
1314 case $ac_val in
1315 [\\/$]* | ?:[\\/]* ) continue;;
1316 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1317 esac
1318 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1319done
1320
1321# There might be people who depend on the old broken behavior: `$host'
1322# used to hold the argument of --host etc.
1323# FIXME: To remove some day.
1324build=$build_alias
1325host=$host_alias
1326target=$target_alias
1327
1328# FIXME: To remove some day.
1329if test "x$host_alias" != x; then
1330 if test "x$build_alias" = x; then
1331 cross_compiling=maybe
1332 elif test "x$build_alias" != "x$host_alias"; then
1333 cross_compiling=yes
1334 fi
1335fi
1336
1337ac_tool_prefix=
1338test -n "$host_alias" && ac_tool_prefix=$host_alias-
1339
1340test "$silent" = yes && exec 6>/dev/null
1341
1342
1343ac_pwd=`pwd` && test -n "$ac_pwd" &&
1344ac_ls_di=`ls -di .` &&
1345ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1346 as_fn_error $? "working directory cannot be determined"
1347test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1348 as_fn_error $? "pwd does not report name of working directory"
1349
1350
1351# Find the source files, if location was not specified.
1352if test -z "$srcdir"; then
1353 ac_srcdir_defaulted=yes
1354 # Try the directory containing this script, then the parent directory.
1355 ac_confdir=`$as_dirname -- "$as_myself" ||
1356$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1357 X"$as_myself" : 'X\(//\)[^/]' \| \
1358 X"$as_myself" : 'X\(//\)$' \| \
1359 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1360$as_echo X"$as_myself" |
1361 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\/\)[^/].*/{
1366 s//\1/
1367 q
1368 }
1369 /^X\(\/\/\)$/{
1370 s//\1/
1371 q
1372 }
1373 /^X\(\/\).*/{
1374 s//\1/
1375 q
1376 }
1377 s/.*/./; q'`
1378 srcdir=$ac_confdir
1379 if test ! -r "$srcdir/$ac_unique_file"; then
1380 srcdir=..
1381 fi
1382else
1383 ac_srcdir_defaulted=no
1384fi
1385if test ! -r "$srcdir/$ac_unique_file"; then
1386 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1387 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1388fi
1389ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1390ac_abs_confdir=`(
1391 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1392 pwd)`
1393# When building in place, set srcdir=.
1394if test "$ac_abs_confdir" = "$ac_pwd"; then
1395 srcdir=.
1396fi
1397# Remove unnecessary trailing slashes from srcdir.
1398# Double slashes in file names in object file debugging info
1399# mess up M-x gdb in Emacs.
1400case $srcdir in
1401*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1402esac
1403for ac_var in $ac_precious_vars; do
1404 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1405 eval ac_env_${ac_var}_value=\$${ac_var}
1406 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1407 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1408done
1409
1410#
1411# Report the --help message.
1412#
1413if test "$ac_init_help" = "long"; then
1414 # Omit some internal or obsolete options to make the list less imposing.
1415 # This message is too long to be a string in the A/UX 3.1 sh.
1416 cat <<_ACEOF
1417\`configure' configures GNU MP 6.2.0 to adapt to many kinds of systems.
1418
1419Usage: $0 [OPTION]... [VAR=VALUE]...
1420
1421To assign environment variables (e.g., CC, CFLAGS...), specify them as
1422VAR=VALUE. See below for descriptions of some of the useful variables.
1423
1424Defaults for the options are specified in brackets.
1425
1426Configuration:
1427 -h, --help display this help and exit
1428 --help=short display options specific to this package
1429 --help=recursive display the short help of all the included packages
1430 -V, --version display version information and exit
1431 -q, --quiet, --silent do not print \`checking ...' messages
1432 --cache-file=FILE cache test results in FILE [disabled]
1433 -C, --config-cache alias for \`--cache-file=config.cache'
1434 -n, --no-create do not create output files
1435 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1436
1437Installation directories:
1438 --prefix=PREFIX install architecture-independent files in PREFIX
1439 [$ac_default_prefix]
1440 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1441 [PREFIX]
1442
1443By default, \`make install' will install all the files in
1444\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1445an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1446for instance \`--prefix=\$HOME'.
1447
1448For better control, use the options below.
1449
1450Fine tuning of the installation directories:
1451 --bindir=DIR user executables [EPREFIX/bin]
1452 --sbindir=DIR system admin executables [EPREFIX/sbin]
1453 --libexecdir=DIR program executables [EPREFIX/libexec]
1454 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1455 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1456 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1457 --libdir=DIR object code libraries [EPREFIX/lib]
1458 --includedir=DIR C header files [PREFIX/include]
1459 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1460 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1461 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1462 --infodir=DIR info documentation [DATAROOTDIR/info]
1463 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1464 --mandir=DIR man documentation [DATAROOTDIR/man]
1465 --docdir=DIR documentation root [DATAROOTDIR/doc/gmp]
1466 --htmldir=DIR html documentation [DOCDIR]
1467 --dvidir=DIR dvi documentation [DOCDIR]
1468 --pdfdir=DIR pdf documentation [DOCDIR]
1469 --psdir=DIR ps documentation [DOCDIR]
1470_ACEOF
1471
1472 cat <<\_ACEOF
1473
1474Program names:
1475 --program-prefix=PREFIX prepend PREFIX to installed program names
1476 --program-suffix=SUFFIX append SUFFIX to installed program names
1477 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1478
1479System types:
1480 --build=BUILD configure for building on BUILD [guessed]
1481 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1482_ACEOF
1483fi
1484
1485if test -n "$ac_init_help"; then
1486 case $ac_init_help in
1487 short | recursive ) echo "Configuration of GNU MP 6.2.0:";;
1488 esac
1489 cat <<\_ACEOF
1490
1491Optional Features:
1492 --disable-option-checking ignore unrecognized --enable/--with options
1493 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1494 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1495 --enable-silent-rules less verbose build output (undo: "make V=1")
1496 --disable-silent-rules verbose build output (undo: "make V=0")
1497 --enable-maintainer-mode
1498 enable make rules and dependencies not useful (and
1499 sometimes confusing) to the casual installer
1500 --enable-assert enable ASSERT checking [default=no]
1501 --enable-alloca how to get temp memory [default=reentrant]
1502 --enable-cxx enable C++ support [default=no]
1503 --enable-assembly enable the use of assembly loops [default=yes]
1504 --enable-fft enable FFTs for multiplication [default=yes]
1505 --enable-old-fft-full enable old mpn_mul_fft_full for multiplication
1506 [default=no]
1507 --enable-nails use nails on limbs [default=no]
1508 --enable-profiling build with profiler support [default=no]
1509 --enable-fat build fat libraries on systems that support it
1510 [default=no]
1511 --enable-minithres choose minimal thresholds for testing [default=no]
1512 --enable-fake-cpuid enable GMP_CPU_TYPE faking cpuid [default=no]
1513 --enable-shared[=PKGS] build shared libraries [default=yes]
1514 --enable-static[=PKGS] build static libraries [default=yes]
1515 --enable-fast-install[=PKGS]
1516 optimize for fast installation [default=yes]
1517 --disable-libtool-lock avoid locking (might break parallel builds)
1518
1519Optional Packages:
1520 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1521 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1522 --with-readline readline support in demo programs [default=detect]
1523 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1524 both]
1525 --with-aix-soname=aix|svr4|both
1526 shared library versioning (aka "SONAME") variant to
1527 provide on AIX, [default=aix].
1528 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1529 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1530 compiler's sysroot if not specified).
1531
1532Some influential environment variables:
1533 ABI desired ABI (for processors supporting more than one ABI)
1534 CC C compiler command
1535 CFLAGS C compiler flags
1536 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1537 nonstandard directory <lib dir>
1538 LIBS libraries to pass to the linker, e.g. -l<library>
1539 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1540 you have headers in a nonstandard directory <include dir>
1541 CPP C preprocessor
1542 CC_FOR_BUILD
1543 build system C compiler
1544 CPP_FOR_BUILD
1545 build system C preprocessor
1546 CXX C++ compiler command
1547 CXXFLAGS C++ compiler flags
1548 CXXCPP C++ preprocessor
1549 LT_SYS_LIBRARY_PATH
1550 User-defined run-time library search path.
1551 M4 m4 macro processor
1552 YACC The `Yet Another Compiler Compiler' implementation to use.
1553 Defaults to the first program found out of: `bison -y', `byacc',
1554 `yacc'.
1555 YFLAGS The list of arguments that will be passed by default to $YACC.
1556 This script will default YFLAGS to the empty string to avoid a
1557 default value of `-d' given by some make applications.
1558
1559Use these variables to override the choices made by `configure' or to help
1560it to find libraries and programs with nonstandard names/locations.
1561
1562Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>.
1563GNU MP home page: <http://www.gnu.org/software/gmp/>.
1564General help using GNU software: <http://www.gnu.org/gethelp/>.
1565_ACEOF
1566ac_status=$?
1567fi
1568
1569if test "$ac_init_help" = "recursive"; then
1570 # If there are subdirs, report their specific --help.
1571 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1572 test -d "$ac_dir" ||
1573 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1574 continue
1575 ac_builddir=.
1576
1577case "$ac_dir" in
1578.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579*)
1580 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1581 # A ".." for each directory in $ac_dir_suffix.
1582 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1583 case $ac_top_builddir_sub in
1584 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1586 esac ;;
1587esac
1588ac_abs_top_builddir=$ac_pwd
1589ac_abs_builddir=$ac_pwd$ac_dir_suffix
1590# for backward compatibility:
1591ac_top_builddir=$ac_top_build_prefix
1592
1593case $srcdir in
1594 .) # We are building in place.
1595 ac_srcdir=.
1596 ac_top_srcdir=$ac_top_builddir_sub
1597 ac_abs_top_srcdir=$ac_pwd ;;
1598 [\\/]* | ?:[\\/]* ) # Absolute name.
1599 ac_srcdir=$srcdir$ac_dir_suffix;
1600 ac_top_srcdir=$srcdir
1601 ac_abs_top_srcdir=$srcdir ;;
1602 *) # Relative name.
1603 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1604 ac_top_srcdir=$ac_top_build_prefix$srcdir
1605 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1606esac
1607ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1608
1609 cd "$ac_dir" || { ac_status=$?; continue; }
1610 # Check for guested configure.
1611 if test -f "$ac_srcdir/configure.gnu"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1614 elif test -f "$ac_srcdir/configure"; then
1615 echo &&
1616 $SHELL "$ac_srcdir/configure" --help=recursive
1617 else
1618 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1619 fi || ac_status=$?
1620 cd "$ac_pwd" || { ac_status=$?; break; }
1621 done
1622fi
1623
1624test -n "$ac_init_help" && exit $ac_status
1625if $ac_init_version; then
1626 cat <<\_ACEOF
1627GNU MP configure 6.2.0
1628generated by GNU Autoconf 2.69
1629
1630Copyright (C) 2012 Free Software Foundation, Inc.
1631This configure script is free software; the Free Software Foundation
1632gives unlimited permission to copy, distribute and modify it.
1633
1634
1635
1636Copyright 1996-2020 Free Software Foundation, Inc.
1637
1638This file is part of the GNU MP Library.
1639
1640The GNU MP Library is free software; you can redistribute it and/or modify
1641it under the terms of either:
1642
1643 * the GNU Lesser General Public License as published by the Free
1644 Software Foundation; either version 3 of the License, or (at your
1645 option) any later version.
1646
1647or
1648
1649 * the GNU General Public License as published by the Free Software
1650 Foundation; either version 2 of the License, or (at your option) any
1651 later version.
1652
1653or both in parallel, as here.
1654
1655The GNU MP Library is distributed in the hope that it will be useful, but
1656WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1657or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1658for more details.
1659
1660You should have received copies of the GNU General Public License and the
1661GNU Lesser General Public License along with the GNU MP Library. If not,
1662see https://www.gnu.org/licenses/.
1663
1664_ACEOF
1665 exit
1666fi
1667
1668## ------------------------ ##
1669## Autoconf initialization. ##
1670## ------------------------ ##
1671
1672# ac_fn_c_try_compile LINENO
1673# --------------------------
1674# Try to compile conftest.$ac_ext, and return whether this succeeded.
1675ac_fn_c_try_compile ()
1676{
1677 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1678 rm -f conftest.$ac_objext
1679 if { { ac_try="$ac_compile"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_compile") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1694 test $ac_status = 0; } && {
1695 test -z "$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 } && test -s conftest.$ac_objext; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
1702
1703 ac_retval=1
1704fi
1705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1706 as_fn_set_status $ac_retval
1707
1708} # ac_fn_c_try_compile
1709
1710# ac_fn_c_try_cpp LINENO
1711# ----------------------
1712# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1713ac_fn_c_try_cpp ()
1714{
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 if { { ac_try="$ac_cpp conftest.$ac_ext"
1717case "(($ac_try" in
1718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1719 *) ac_try_echo=$ac_try;;
1720esac
1721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1722$as_echo "$ac_try_echo"; } >&5
1723 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1724 ac_status=$?
1725 if test -s conftest.err; then
1726 grep -v '^ *+' conftest.err >conftest.er1
1727 cat conftest.er1 >&5
1728 mv -f conftest.er1 conftest.err
1729 fi
1730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1731 test $ac_status = 0; } > conftest.i && {
1732 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1733 test ! -s conftest.err
1734 }; then :
1735 ac_retval=0
1736else
1737 $as_echo "$as_me: failed program was:" >&5
1738sed 's/^/| /' conftest.$ac_ext >&5
1739
1740 ac_retval=1
1741fi
1742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1743 as_fn_set_status $ac_retval
1744
1745} # ac_fn_c_try_cpp
1746
1747# ac_fn_cxx_try_compile LINENO
1748# ----------------------------
1749# Try to compile conftest.$ac_ext, and return whether this succeeded.
1750ac_fn_cxx_try_compile ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 rm -f conftest.$ac_objext
1754 if { { ac_try="$ac_compile"
1755case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_compile") 2>conftest.err
1762 ac_status=$?
1763 if test -s conftest.err; then
1764 grep -v '^ *+' conftest.err >conftest.er1
1765 cat conftest.er1 >&5
1766 mv -f conftest.er1 conftest.err
1767 fi
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; } && {
1770 test -z "$ac_cxx_werror_flag" ||
1771 test ! -s conftest.err
1772 } && test -s conftest.$ac_objext; then :
1773 ac_retval=0
1774else
1775 $as_echo "$as_me: failed program was:" >&5
1776sed 's/^/| /' conftest.$ac_ext >&5
1777
1778 ac_retval=1
1779fi
1780 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1781 as_fn_set_status $ac_retval
1782
1783} # ac_fn_cxx_try_compile
1784
1785# ac_fn_cxx_try_cpp LINENO
1786# ------------------------
1787# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1788ac_fn_cxx_try_cpp ()
1789{
1790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1791 if { { ac_try="$ac_cpp conftest.$ac_ext"
1792case "(($ac_try" in
1793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1794 *) ac_try_echo=$ac_try;;
1795esac
1796eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1797$as_echo "$ac_try_echo"; } >&5
1798 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1799 ac_status=$?
1800 if test -s conftest.err; then
1801 grep -v '^ *+' conftest.err >conftest.er1
1802 cat conftest.er1 >&5
1803 mv -f conftest.er1 conftest.err
1804 fi
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } > conftest.i && {
1807 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
1808 test ! -s conftest.err
1809 }; then :
1810 ac_retval=0
1811else
1812 $as_echo "$as_me: failed program was:" >&5
1813sed 's/^/| /' conftest.$ac_ext >&5
1814
1815 ac_retval=1
1816fi
1817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1818 as_fn_set_status $ac_retval
1819
1820} # ac_fn_cxx_try_cpp
1821
1822# ac_fn_c_try_link LINENO
1823# -----------------------
1824# Try to link conftest.$ac_ext, and return whether this succeeded.
1825ac_fn_c_try_link ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 rm -f conftest.$ac_objext conftest$ac_exeext
1829 if { { ac_try="$ac_link"
1830case "(($ac_try" in
1831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1832 *) ac_try_echo=$ac_try;;
1833esac
1834eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1835$as_echo "$ac_try_echo"; } >&5
1836 (eval "$ac_link") 2>conftest.err
1837 ac_status=$?
1838 if test -s conftest.err; then
1839 grep -v '^ *+' conftest.err >conftest.er1
1840 cat conftest.er1 >&5
1841 mv -f conftest.er1 conftest.err
1842 fi
1843 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1844 test $ac_status = 0; } && {
1845 test -z "$ac_c_werror_flag" ||
1846 test ! -s conftest.err
1847 } && test -s conftest$ac_exeext && {
1848 test "$cross_compiling" = yes ||
1849 test -x conftest$ac_exeext
1850 }; then :
1851 ac_retval=0
1852else
1853 $as_echo "$as_me: failed program was:" >&5
1854sed 's/^/| /' conftest.$ac_ext >&5
1855
1856 ac_retval=1
1857fi
1858 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1859 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1860 # interfere with the next link command; also delete a directory that is
1861 # left behind by Apple's compiler. We do this before executing the actions.
1862 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1864 as_fn_set_status $ac_retval
1865
1866} # ac_fn_c_try_link
1867
1868# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1869# -------------------------------------------------------
1870# Tests whether HEADER exists and can be compiled using the include files in
1871# INCLUDES, setting the cache variable VAR accordingly.
1872ac_fn_c_check_header_compile ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876$as_echo_n "checking for $2... " >&6; }
1877if eval \${$3+:} false; then :
1878 $as_echo_n "(cached) " >&6
1879else
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$4
1883#include <$2>
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 eval "$3=yes"
1887else
1888 eval "$3=no"
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891fi
1892eval ac_res=\$$3
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894$as_echo "$ac_res" >&6; }
1895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1896
1897} # ac_fn_c_check_header_compile
1898
1899# ac_fn_c_try_run LINENO
1900# ----------------------
1901# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1902# that executables *can* be run.
1903ac_fn_c_try_run ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 if { { ac_try="$ac_link"
1907case "(($ac_try" in
1908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1909 *) ac_try_echo=$ac_try;;
1910esac
1911eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1912$as_echo "$ac_try_echo"; } >&5
1913 (eval "$ac_link") 2>&5
1914 ac_status=$?
1915 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1916 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1917 { { case "(($ac_try" in
1918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1919 *) ac_try_echo=$ac_try;;
1920esac
1921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1922$as_echo "$ac_try_echo"; } >&5
1923 (eval "$ac_try") 2>&5
1924 ac_status=$?
1925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1926 test $ac_status = 0; }; }; then :
1927 ac_retval=0
1928else
1929 $as_echo "$as_me: program exited with status $ac_status" >&5
1930 $as_echo "$as_me: failed program was:" >&5
1931sed 's/^/| /' conftest.$ac_ext >&5
1932
1933 ac_retval=$ac_status
1934fi
1935 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1937 as_fn_set_status $ac_retval
1938
1939} # ac_fn_c_try_run
1940
1941# ac_fn_c_check_func LINENO FUNC VAR
1942# ----------------------------------
1943# Tests whether FUNC exists, setting the cache variable VAR accordingly
1944ac_fn_c_check_func ()
1945{
1946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1948$as_echo_n "checking for $2... " >&6; }
1949if eval \${$3+:} false; then :
1950 $as_echo_n "(cached) " >&6
1951else
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1955 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1956#define $2 innocuous_$2
1957
1958/* System header to define __stub macros and hopefully few prototypes,
1959 which can conflict with char $2 (); below.
1960 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1961 <limits.h> exists even on freestanding compilers. */
1962
1963#ifdef __STDC__
1964# include <limits.h>
1965#else
1966# include <assert.h>
1967#endif
1968
1969#undef $2
1970
1971/* Override any GCC internal prototype to avoid an error.
1972 Use char because int might match the return type of a GCC
1973 builtin and then its argument prototype would still apply. */
1974#ifdef __cplusplus
1975extern "C"
1976#endif
1977char $2 ();
1978/* The GNU C library defines this for functions which it implements
1979 to always fail with ENOSYS. Some functions are actually named
1980 something starting with __ and the normal name is an alias. */
1981#if defined __stub_$2 || defined __stub___$2
1982choke me
1983#endif
1984
1985int
1986main ()
1987{
1988return $2 ();
1989 ;
1990 return 0;
1991}
1992_ACEOF
1993if ac_fn_c_try_link "$LINENO"; then :
1994 eval "$3=yes"
1995else
1996 eval "$3=no"
1997fi
1998rm -f core conftest.err conftest.$ac_objext \
1999 conftest$ac_exeext conftest.$ac_ext
2000fi
2001eval ac_res=\$$3
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003$as_echo "$ac_res" >&6; }
2004 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2005
2006} # ac_fn_c_check_func
2007
2008# ac_fn_cxx_try_link LINENO
2009# -------------------------
2010# Try to link conftest.$ac_ext, and return whether this succeeded.
2011ac_fn_cxx_try_link ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 rm -f conftest.$ac_objext conftest$ac_exeext
2015 if { { ac_try="$ac_link"
2016case "(($ac_try" in
2017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2018 *) ac_try_echo=$ac_try;;
2019esac
2020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2021$as_echo "$ac_try_echo"; } >&5
2022 (eval "$ac_link") 2>conftest.err
2023 ac_status=$?
2024 if test -s conftest.err; then
2025 grep -v '^ *+' conftest.err >conftest.er1
2026 cat conftest.er1 >&5
2027 mv -f conftest.er1 conftest.err
2028 fi
2029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2030 test $ac_status = 0; } && {
2031 test -z "$ac_cxx_werror_flag" ||
2032 test ! -s conftest.err
2033 } && test -s conftest$ac_exeext && {
2034 test "$cross_compiling" = yes ||
2035 test -x conftest$ac_exeext
2036 }; then :
2037 ac_retval=0
2038else
2039 $as_echo "$as_me: failed program was:" >&5
2040sed 's/^/| /' conftest.$ac_ext >&5
2041
2042 ac_retval=1
2043fi
2044 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2045 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2046 # interfere with the next link command; also delete a directory that is
2047 # left behind by Apple's compiler. We do this before executing the actions.
2048 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2049 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050 as_fn_set_status $ac_retval
2051
2052} # ac_fn_cxx_try_link
2053
2054# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2055# -------------------------------------------------------
2056# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2057# the include files in INCLUDES and setting the cache variable VAR
2058# accordingly.
2059ac_fn_c_check_header_mongrel ()
2060{
2061 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062 if eval \${$3+:} false; then :
2063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2064$as_echo_n "checking for $2... " >&6; }
2065if eval \${$3+:} false; then :
2066 $as_echo_n "(cached) " >&6
2067fi
2068eval ac_res=\$$3
2069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2070$as_echo "$ac_res" >&6; }
2071else
2072 # Is the header compilable?
2073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2074$as_echo_n "checking $2 usability... " >&6; }
2075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078#include <$2>
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081 ac_header_compiler=yes
2082else
2083 ac_header_compiler=no
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2087$as_echo "$ac_header_compiler" >&6; }
2088
2089# Is the header present?
2090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2091$as_echo_n "checking $2 presence... " >&6; }
2092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094#include <$2>
2095_ACEOF
2096if ac_fn_c_try_cpp "$LINENO"; then :
2097 ac_header_preproc=yes
2098else
2099 ac_header_preproc=no
2100fi
2101rm -f conftest.err conftest.i conftest.$ac_ext
2102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2103$as_echo "$ac_header_preproc" >&6; }
2104
2105# So? What about this header?
2106case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2107 yes:no: )
2108 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2109$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2111$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2112 ;;
2113 no:yes:* )
2114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2115$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2117$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2119$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2120 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2121$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2123$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2124( $as_echo "## ssssssssssssssssssssssssssssssssss ##
2125## Report this to gmp-bugs@gmplib.org ##
2126## ssssssssssssssssssssssssssssssssss ##"
2127 ) | sed "s/^/$as_me: WARNING: /" >&2
2128 ;;
2129esac
2130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2131$as_echo_n "checking for $2... " >&6; }
2132if eval \${$3+:} false; then :
2133 $as_echo_n "(cached) " >&6
2134else
2135 eval "$3=\$ac_header_compiler"
2136fi
2137eval ac_res=\$$3
2138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2139$as_echo "$ac_res" >&6; }
2140fi
2141 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2142
2143} # ac_fn_c_check_header_mongrel
2144
2145# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2146# ---------------------------------------------
2147# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2148# accordingly.
2149ac_fn_c_check_decl ()
2150{
2151 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2152 as_decl_name=`echo $2|sed 's/ *(.*//'`
2153 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2155$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2156if eval \${$3+:} false; then :
2157 $as_echo_n "(cached) " >&6
2158else
2159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h. */
2161$4
2162int
2163main ()
2164{
2165#ifndef $as_decl_name
2166#ifdef __cplusplus
2167 (void) $as_decl_use;
2168#else
2169 (void) $as_decl_name;
2170#endif
2171#endif
2172
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 eval "$3=yes"
2179else
2180 eval "$3=no"
2181fi
2182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2183fi
2184eval ac_res=\$$3
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2186$as_echo "$ac_res" >&6; }
2187 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2188
2189} # ac_fn_c_check_decl
2190
2191# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2192# -------------------------------------------
2193# Tests whether TYPE exists after having included INCLUDES, setting cache
2194# variable VAR accordingly.
2195ac_fn_c_check_type ()
2196{
2197 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2199$as_echo_n "checking for $2... " >&6; }
2200if eval \${$3+:} false; then :
2201 $as_echo_n "(cached) " >&6
2202else
2203 eval "$3=no"
2204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2205/* end confdefs.h. */
2206$4
2207int
2208main ()
2209{
2210if (sizeof ($2))
2211 return 0;
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_compile "$LINENO"; then :
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218/* end confdefs.h. */
2219$4
2220int
2221main ()
2222{
2223if (sizeof (($2)))
2224 return 0;
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_compile "$LINENO"; then :
2230
2231else
2232 eval "$3=yes"
2233fi
2234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2235fi
2236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2237fi
2238eval ac_res=\$$3
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2240$as_echo "$ac_res" >&6; }
2241 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242
2243} # ac_fn_c_check_type
2244
2245# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2246# ----------------------------------------------------
2247# Tries to find if the field MEMBER exists in type AGGR, after including
2248# INCLUDES, setting cache variable VAR accordingly.
2249ac_fn_c_check_member ()
2250{
2251 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2253$as_echo_n "checking for $2.$3... " >&6; }
2254if eval \${$4+:} false; then :
2255 $as_echo_n "(cached) " >&6
2256else
2257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258/* end confdefs.h. */
2259$5
2260int
2261main ()
2262{
2263static $2 ac_aggr;
2264if (ac_aggr.$3)
2265return 0;
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$4=yes"
2272else
2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h. */
2275$5
2276int
2277main ()
2278{
2279static $2 ac_aggr;
2280if (sizeof ac_aggr.$3)
2281return 0;
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
2287 eval "$4=yes"
2288else
2289 eval "$4=no"
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295eval ac_res=\$$4
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
2298 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299
2300} # ac_fn_c_check_member
2301
2302# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2303# ---------------------------------------------------------
2304# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2305# the include files in INCLUDES and setting the cache variable VAR
2306# accordingly.
2307ac_fn_cxx_check_header_mongrel ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310 if eval \${$3+:} false; then :
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2312$as_echo_n "checking for $2... " >&6; }
2313if eval \${$3+:} false; then :
2314 $as_echo_n "(cached) " >&6
2315fi
2316eval ac_res=\$$3
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2318$as_echo "$ac_res" >&6; }
2319else
2320 # Is the header compilable?
2321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2322$as_echo_n "checking $2 usability... " >&6; }
2323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2324/* end confdefs.h. */
2325$4
2326#include <$2>
2327_ACEOF
2328if ac_fn_cxx_try_compile "$LINENO"; then :
2329 ac_header_compiler=yes
2330else
2331 ac_header_compiler=no
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2335$as_echo "$ac_header_compiler" >&6; }
2336
2337# Is the header present?
2338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2339$as_echo_n "checking $2 presence... " >&6; }
2340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341/* end confdefs.h. */
2342#include <$2>
2343_ACEOF
2344if ac_fn_cxx_try_cpp "$LINENO"; then :
2345 ac_header_preproc=yes
2346else
2347 ac_header_preproc=no
2348fi
2349rm -f conftest.err conftest.i conftest.$ac_ext
2350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2351$as_echo "$ac_header_preproc" >&6; }
2352
2353# So? What about this header?
2354case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2355 yes:no: )
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2357$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2359$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2360 ;;
2361 no:yes:* )
2362 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2363$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2365$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2367$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2369$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2371$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2372( $as_echo "## ssssssssssssssssssssssssssssssssss ##
2373## Report this to gmp-bugs@gmplib.org ##
2374## ssssssssssssssssssssssssssssssssss ##"
2375 ) | sed "s/^/$as_me: WARNING: /" >&2
2376 ;;
2377esac
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2379$as_echo_n "checking for $2... " >&6; }
2380if eval \${$3+:} false; then :
2381 $as_echo_n "(cached) " >&6
2382else
2383 eval "$3=\$ac_header_compiler"
2384fi
2385eval ac_res=\$$3
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2387$as_echo "$ac_res" >&6; }
2388fi
2389 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2390
2391} # ac_fn_cxx_check_header_mongrel
2392
2393# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES
2394# ---------------------------------------------
2395# Tests whether TYPE exists after having included INCLUDES, setting cache
2396# variable VAR accordingly.
2397ac_fn_cxx_check_type ()
2398{
2399 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2401$as_echo_n "checking for $2... " >&6; }
2402if eval \${$3+:} false; then :
2403 $as_echo_n "(cached) " >&6
2404else
2405 eval "$3=no"
2406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2407/* end confdefs.h. */
2408$4
2409int
2410main ()
2411{
2412if (sizeof ($2))
2413 return 0;
2414 ;
2415 return 0;
2416}
2417_ACEOF
2418if ac_fn_cxx_try_compile "$LINENO"; then :
2419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420/* end confdefs.h. */
2421$4
2422int
2423main ()
2424{
2425if (sizeof (($2)))
2426 return 0;
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431if ac_fn_cxx_try_compile "$LINENO"; then :
2432
2433else
2434 eval "$3=yes"
2435fi
2436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440eval ac_res=\$$3
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2442$as_echo "$ac_res" >&6; }
2443 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2444
2445} # ac_fn_cxx_check_type
2446
2447# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2448# --------------------------------------------
2449# Tries to find the compile-time value of EXPR in a program that includes
2450# INCLUDES, setting VAR accordingly. Returns whether the value could be
2451# computed
2452ac_fn_c_compute_int ()
2453{
2454 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2455 if test "$cross_compiling" = yes; then
2456 # Depending upon the size, compute the lo and hi bounds.
2457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2458/* end confdefs.h. */
2459$4
2460int
2461main ()
2462{
2463static int test_array [1 - 2 * !(($2) >= 0)];
2464test_array [0] = 0;
2465return test_array [0];
2466
2467 ;
2468 return 0;
2469}
2470_ACEOF
2471if ac_fn_c_try_compile "$LINENO"; then :
2472 ac_lo=0 ac_mid=0
2473 while :; do
2474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2475/* end confdefs.h. */
2476$4
2477int
2478main ()
2479{
2480static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2481test_array [0] = 0;
2482return test_array [0];
2483
2484 ;
2485 return 0;
2486}
2487_ACEOF
2488if ac_fn_c_try_compile "$LINENO"; then :
2489 ac_hi=$ac_mid; break
2490else
2491 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2492 if test $ac_lo -le $ac_mid; then
2493 ac_lo= ac_hi=
2494 break
2495 fi
2496 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2497fi
2498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2499 done
2500else
2501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2502/* end confdefs.h. */
2503$4
2504int
2505main ()
2506{
2507static int test_array [1 - 2 * !(($2) < 0)];
2508test_array [0] = 0;
2509return test_array [0];
2510
2511 ;
2512 return 0;
2513}
2514_ACEOF
2515if ac_fn_c_try_compile "$LINENO"; then :
2516 ac_hi=-1 ac_mid=-1
2517 while :; do
2518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2519/* end confdefs.h. */
2520$4
2521int
2522main ()
2523{
2524static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2525test_array [0] = 0;
2526return test_array [0];
2527
2528 ;
2529 return 0;
2530}
2531_ACEOF
2532if ac_fn_c_try_compile "$LINENO"; then :
2533 ac_lo=$ac_mid; break
2534else
2535 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2536 if test $ac_mid -le $ac_hi; then
2537 ac_lo= ac_hi=
2538 break
2539 fi
2540 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2541fi
2542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2543 done
2544else
2545 ac_lo= ac_hi=
2546fi
2547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2548fi
2549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2550# Binary search between lo and hi bounds.
2551while test "x$ac_lo" != "x$ac_hi"; do
2552 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2554/* end confdefs.h. */
2555$4
2556int
2557main ()
2558{
2559static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2560test_array [0] = 0;
2561return test_array [0];
2562
2563 ;
2564 return 0;
2565}
2566_ACEOF
2567if ac_fn_c_try_compile "$LINENO"; then :
2568 ac_hi=$ac_mid
2569else
2570 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2571fi
2572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2573done
2574case $ac_lo in #((
2575?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2576'') ac_retval=1 ;;
2577esac
2578 else
2579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2580/* end confdefs.h. */
2581$4
2582static long int longval () { return $2; }
2583static unsigned long int ulongval () { return $2; }
2584#include <stdio.h>
2585#include <stdlib.h>
2586int
2587main ()
2588{
2589
2590 FILE *f = fopen ("conftest.val", "w");
2591 if (! f)
2592 return 1;
2593 if (($2) < 0)
2594 {
2595 long int i = longval ();
2596 if (i != ($2))
2597 return 1;
2598 fprintf (f, "%ld", i);
2599 }
2600 else
2601 {
2602 unsigned long int i = ulongval ();
2603 if (i != ($2))
2604 return 1;
2605 fprintf (f, "%lu", i);
2606 }
2607 /* Do not output a trailing newline, as this causes \r\n confusion
2608 on some platforms. */
2609 return ferror (f) || fclose (f) != 0;
2610
2611 ;
2612 return 0;
2613}
2614_ACEOF
2615if ac_fn_c_try_run "$LINENO"; then :
2616 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2617else
2618 ac_retval=1
2619fi
2620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2621 conftest.$ac_objext conftest.beam conftest.$ac_ext
2622rm -f conftest.val
2623
2624 fi
2625 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2626 as_fn_set_status $ac_retval
2627
2628} # ac_fn_c_compute_int
2629cat >config.log <<_ACEOF
2630This file contains any messages produced by compilers while
2631running configure, to aid debugging if configure makes a mistake.
2632
2633It was created by GNU MP $as_me 6.2.0, which was
2634generated by GNU Autoconf 2.69. Invocation command line was
2635
2636 $ $0 $@
2637
2638_ACEOF
2639exec 5>>config.log
2640{
2641cat <<_ASUNAME
2642## --------- ##
2643## Platform. ##
2644## --------- ##
2645
2646hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2647uname -m = `(uname -m) 2>/dev/null || echo unknown`
2648uname -r = `(uname -r) 2>/dev/null || echo unknown`
2649uname -s = `(uname -s) 2>/dev/null || echo unknown`
2650uname -v = `(uname -v) 2>/dev/null || echo unknown`
2651
2652/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2653/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2654
2655/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2656/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2657/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2658/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2659/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2660/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2661/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2662
2663_ASUNAME
2664
2665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2666for as_dir in $PATH
2667do
2668 IFS=$as_save_IFS
2669 test -z "$as_dir" && as_dir=.
2670 $as_echo "PATH: $as_dir"
2671 done
2672IFS=$as_save_IFS
2673
2674} >&5
2675
2676cat >&5 <<_ACEOF
2677
2678
2679## ----------- ##
2680## Core tests. ##
2681## ----------- ##
2682
2683_ACEOF
2684
2685
2686# Keep a trace of the command line.
2687# Strip out --no-create and --no-recursion so they do not pile up.
2688# Strip out --silent because we don't want to record it for future runs.
2689# Also quote any args containing shell meta-characters.
2690# Make two passes to allow for proper duplicate-argument suppression.
2691ac_configure_args=
2692ac_configure_args0=
2693ac_configure_args1=
2694ac_must_keep_next=false
2695for ac_pass in 1 2
2696do
2697 for ac_arg
2698 do
2699 case $ac_arg in
2700 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2701 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2702 | -silent | --silent | --silen | --sile | --sil)
2703 continue ;;
2704 *\'*)
2705 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2706 esac
2707 case $ac_pass in
2708 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2709 2)
2710 as_fn_append ac_configure_args1 " '$ac_arg'"
2711 if test $ac_must_keep_next = true; then
2712 ac_must_keep_next=false # Got value, back to normal.
2713 else
2714 case $ac_arg in
2715 *=* | --config-cache | -C | -disable-* | --disable-* \
2716 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2717 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2718 | -with-* | --with-* | -without-* | --without-* | --x)
2719 case "$ac_configure_args0 " in
2720 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2721 esac
2722 ;;
2723 -* ) ac_must_keep_next=true ;;
2724 esac
2725 fi
2726 as_fn_append ac_configure_args " '$ac_arg'"
2727 ;;
2728 esac
2729 done
2730done
2731{ ac_configure_args0=; unset ac_configure_args0;}
2732{ ac_configure_args1=; unset ac_configure_args1;}
2733
2734# When interrupted or exit'd, cleanup temporary files, and complete
2735# config.log. We remove comments because anyway the quotes in there
2736# would cause problems or look ugly.
2737# WARNING: Use '\'' to represent an apostrophe within the trap.
2738# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2739trap 'exit_status=$?
2740 # Save into config.log some information that might help in debugging.
2741 {
2742 echo
2743
2744 $as_echo "## ---------------- ##
2745## Cache variables. ##
2746## ---------------- ##"
2747 echo
2748 # The following way of writing the cache mishandles newlines in values,
2749(
2750 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2751 eval ac_val=\$$ac_var
2752 case $ac_val in #(
2753 *${as_nl}*)
2754 case $ac_var in #(
2755 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2756$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2757 esac
2758 case $ac_var in #(
2759 _ | IFS | as_nl) ;; #(
2760 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2761 *) { eval $ac_var=; unset $ac_var;} ;;
2762 esac ;;
2763 esac
2764 done
2765 (set) 2>&1 |
2766 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2767 *${as_nl}ac_space=\ *)
2768 sed -n \
2769 "s/'\''/'\''\\\\'\'''\''/g;
2770 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2771 ;; #(
2772 *)
2773 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2774 ;;
2775 esac |
2776 sort
2777)
2778 echo
2779
2780 $as_echo "## ----------------- ##
2781## Output variables. ##
2782## ----------------- ##"
2783 echo
2784 for ac_var in $ac_subst_vars
2785 do
2786 eval ac_val=\$$ac_var
2787 case $ac_val in
2788 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2789 esac
2790 $as_echo "$ac_var='\''$ac_val'\''"
2791 done | sort
2792 echo
2793
2794 if test -n "$ac_subst_files"; then
2795 $as_echo "## ------------------- ##
2796## File substitutions. ##
2797## ------------------- ##"
2798 echo
2799 for ac_var in $ac_subst_files
2800 do
2801 eval ac_val=\$$ac_var
2802 case $ac_val in
2803 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2804 esac
2805 $as_echo "$ac_var='\''$ac_val'\''"
2806 done | sort
2807 echo
2808 fi
2809
2810 if test -s confdefs.h; then
2811 $as_echo "## ----------- ##
2812## confdefs.h. ##
2813## ----------- ##"
2814 echo
2815 cat confdefs.h
2816 echo
2817 fi
2818 test "$ac_signal" != 0 &&
2819 $as_echo "$as_me: caught signal $ac_signal"
2820 $as_echo "$as_me: exit $exit_status"
2821 } >&5
2822 rm -f core *.core core.conftest.* &&
2823 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2824 exit $exit_status
2825' 0
2826for ac_signal in 1 2 13 15; do
2827 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2828done
2829ac_signal=0
2830
2831# confdefs.h avoids OS command line length limits that DEFS can exceed.
2832rm -f -r conftest* confdefs.h
2833
2834$as_echo "/* confdefs.h */" > confdefs.h
2835
2836# Predefined preprocessor variables.
2837
2838cat >>confdefs.h <<_ACEOF
2839#define PACKAGE_NAME "$PACKAGE_NAME"
2840_ACEOF
2841
2842cat >>confdefs.h <<_ACEOF
2843#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2844_ACEOF
2845
2846cat >>confdefs.h <<_ACEOF
2847#define PACKAGE_VERSION "$PACKAGE_VERSION"
2848_ACEOF
2849
2850cat >>confdefs.h <<_ACEOF
2851#define PACKAGE_STRING "$PACKAGE_STRING"
2852_ACEOF
2853
2854cat >>confdefs.h <<_ACEOF
2855#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2856_ACEOF
2857
2858cat >>confdefs.h <<_ACEOF
2859#define PACKAGE_URL "$PACKAGE_URL"
2860_ACEOF
2861
2862
2863# Let the site file select an alternate cache file if it wants to.
2864# Prefer an explicitly selected file to automatically selected ones.
2865ac_site_file1=NONE
2866ac_site_file2=NONE
2867if test -n "$CONFIG_SITE"; then
2868 # We do not want a PATH search for config.site.
2869 case $CONFIG_SITE in #((
2870 -*) ac_site_file1=./$CONFIG_SITE;;
2871 */*) ac_site_file1=$CONFIG_SITE;;
2872 *) ac_site_file1=./$CONFIG_SITE;;
2873 esac
2874elif test "x$prefix" != xNONE; then
2875 ac_site_file1=$prefix/share/config.site
2876 ac_site_file2=$prefix/etc/config.site
2877else
2878 ac_site_file1=$ac_default_prefix/share/config.site
2879 ac_site_file2=$ac_default_prefix/etc/config.site
2880fi
2881for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2882do
2883 test "x$ac_site_file" = xNONE && continue
2884 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2886$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2887 sed 's/^/| /' "$ac_site_file" >&5
2888 . "$ac_site_file" \
2889 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2890$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2891as_fn_error $? "failed to load site script $ac_site_file
2892See \`config.log' for more details" "$LINENO" 5; }
2893 fi
2894done
2895
2896if test -r "$cache_file"; then
2897 # Some versions of bash will fail to source /dev/null (special files
2898 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2899 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2901$as_echo "$as_me: loading cache $cache_file" >&6;}
2902 case $cache_file in
2903 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2904 *) . "./$cache_file";;
2905 esac
2906 fi
2907else
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2909$as_echo "$as_me: creating cache $cache_file" >&6;}
2910 >$cache_file
2911fi
2912
2913# Check that the precious variables saved in the cache have kept the same
2914# value.
2915ac_cache_corrupted=false
2916for ac_var in $ac_precious_vars; do
2917 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2918 eval ac_new_set=\$ac_env_${ac_var}_set
2919 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2920 eval ac_new_val=\$ac_env_${ac_var}_value
2921 case $ac_old_set,$ac_new_set in
2922 set,)
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2924$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2925 ac_cache_corrupted=: ;;
2926 ,set)
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2928$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2929 ac_cache_corrupted=: ;;
2930 ,);;
2931 *)
2932 if test "x$ac_old_val" != "x$ac_new_val"; then
2933 # differences in whitespace do not lead to failure.
2934 ac_old_val_w=`echo x $ac_old_val`
2935 ac_new_val_w=`echo x $ac_new_val`
2936 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2938$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2939 ac_cache_corrupted=:
2940 else
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2942$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2943 eval $ac_var=\$ac_old_val
2944 fi
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2946$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2948$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2949 fi;;
2950 esac
2951 # Pass precious variables to config.status.
2952 if test "$ac_new_set" = set; then
2953 case $ac_new_val in
2954 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2955 *) ac_arg=$ac_var=$ac_new_val ;;
2956 esac
2957 case " $ac_configure_args " in
2958 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2959 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2960 esac
2961 fi
2962done
2963if $ac_cache_corrupted; then
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2967$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2968 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2969fi
2970## -------------------- ##
2971## Main body of script. ##
2972## -------------------- ##
2973
2974ac_ext=c
2975ac_cpp='$CPP $CPPFLAGS'
2976ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2977ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2978ac_compiler_gnu=$ac_cv_c_compiler_gnu
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992# If --target is not used then $target_alias is empty, but if say
2993# "./configure athlon-pc-freebsd3.5" is used, then all three of
2994# $build_alias, $host_alias and $target_alias are set to
2995# "athlon-pc-freebsd3.5".
2996#
2997if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then
2998 as_fn_error $? "--target is not appropriate for GMP
2999Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
3000explicitly. Use --host if cross-compiling (see \"Installing GMP\" in the
3001manual for more on this)." "$LINENO" 5
3002fi
3003
3004gmp_configm4="config.m4"
3005gmp_tmpconfigm4=cnfm4.tmp
3006gmp_tmpconfigm4i=cnfm4i.tmp
3007gmp_tmpconfigm4p=cnfm4p.tmp
3008rm -f $gmp_tmpconfigm4 $gmp_tmpconfigm4i $gmp_tmpconfigm4p
3009
3010# CONFIG_TOP_SRCDIR is a path from the mpn builddir to the top srcdir.
3011# The pattern here tests for an absolute path the same way as
3012# _AC_OUTPUT_FILES in autoconf acgeneral.m4.
3013case $srcdir in
3014[\\/]* | ?:[\\/]* ) tmp="$srcdir" ;;
3015*) tmp="../$srcdir" ;;
3016esac
3017echo "define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)" >>$gmp_tmpconfigm4
3018
3019# All CPUs use asm-defs.m4
3020echo "include(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')" >>$gmp_tmpconfigm4i
3021
3022
3023ac_aux_dir=
3024for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3025 if test -f "$ac_dir/install-sh"; then
3026 ac_aux_dir=$ac_dir
3027 ac_install_sh="$ac_aux_dir/install-sh -c"
3028 break
3029 elif test -f "$ac_dir/install.sh"; then
3030 ac_aux_dir=$ac_dir
3031 ac_install_sh="$ac_aux_dir/install.sh -c"
3032 break
3033 elif test -f "$ac_dir/shtool"; then
3034 ac_aux_dir=$ac_dir
3035 ac_install_sh="$ac_aux_dir/shtool install -c"
3036 break
3037 fi
3038done
3039if test -z "$ac_aux_dir"; then
3040 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3041fi
3042
3043# These three variables are undocumented and unsupported,
3044# and are intended to be withdrawn in a future Autoconf release.
3045# They can cause serious problems if a builder's source tree is in a directory
3046# whose full name contains unusual characters.
3047ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3048ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3049ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3050
3051
3052# Make sure we can run config.sub.
3053$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3054 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3055
3056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3057$as_echo_n "checking build system type... " >&6; }
3058if ${ac_cv_build+:} false; then :
3059 $as_echo_n "(cached) " >&6
3060else
3061 ac_build_alias=$build_alias
3062test "x$ac_build_alias" = x &&
3063 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3064test "x$ac_build_alias" = x &&
3065 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3066ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3067 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3068
3069fi
3070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3071$as_echo "$ac_cv_build" >&6; }
3072case $ac_cv_build in
3073*-*-*) ;;
3074*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3075esac
3076build=$ac_cv_build
3077ac_save_IFS=$IFS; IFS='-'
3078set x $ac_cv_build
3079shift
3080build_cpu=$1
3081build_vendor=$2
3082shift; shift
3083# Remember, the first character of IFS is used to create $*,
3084# except with old shells:
3085build_os=$*
3086IFS=$ac_save_IFS
3087case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3088
3089
3090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3091$as_echo_n "checking host system type... " >&6; }
3092if ${ac_cv_host+:} false; then :
3093 $as_echo_n "(cached) " >&6
3094else
3095 if test "x$host_alias" = x; then
3096 ac_cv_host=$ac_cv_build
3097else
3098 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3099 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3100fi
3101
3102fi
3103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3104$as_echo "$ac_cv_host" >&6; }
3105case $ac_cv_host in
3106*-*-*) ;;
3107*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3108esac
3109host=$ac_cv_host
3110ac_save_IFS=$IFS; IFS='-'
3111set x $ac_cv_host
3112shift
3113host_cpu=$1
3114host_vendor=$2
3115shift; shift
3116# Remember, the first character of IFS is used to create $*,
3117# except with old shells:
3118host_os=$*
3119IFS=$ac_save_IFS
3120case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3121
3122
3123
3124am__api_version='1.15'
3125
3126# Find a good install program. We prefer a C program (faster),
3127# so one script is as good as another. But avoid the broken or
3128# incompatible versions:
3129# SysV /etc/install, /usr/sbin/install
3130# SunOS /usr/etc/install
3131# IRIX /sbin/install
3132# AIX /bin/install
3133# AmigaOS /C/install, which installs bootblocks on floppy discs
3134# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3135# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3136# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3137# OS/2's system install, which has a completely different semantic
3138# ./install, which can be erroneously created by make from ./install.sh.
3139# Reject install programs that cannot install multiple files.
3140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3141$as_echo_n "checking for a BSD-compatible install... " >&6; }
3142if test -z "$INSTALL"; then
3143if ${ac_cv_path_install+:} false; then :
3144 $as_echo_n "(cached) " >&6
3145else
3146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3147for as_dir in $PATH
3148do
3149 IFS=$as_save_IFS
3150 test -z "$as_dir" && as_dir=.
3151 # Account for people who put trailing slashes in PATH elements.
3152case $as_dir/ in #((
3153 ./ | .// | /[cC]/* | \
3154 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3155 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3156 /usr/ucb/* ) ;;
3157 *)
3158 # OSF1 and SCO ODT 3.0 have their own names for install.
3159 # Don't use installbsd from OSF since it installs stuff as root
3160 # by default.
3161 for ac_prog in ginstall scoinst install; do
3162 for ac_exec_ext in '' $ac_executable_extensions; do
3163 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3164 if test $ac_prog = install &&
3165 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3166 # AIX install. It has an incompatible calling convention.
3167 :
3168 elif test $ac_prog = install &&
3169 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3170 # program-specific install script used by HP pwplus--don't use.
3171 :
3172 else
3173 rm -rf conftest.one conftest.two conftest.dir
3174 echo one > conftest.one
3175 echo two > conftest.two
3176 mkdir conftest.dir
3177 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3178 test -s conftest.one && test -s conftest.two &&
3179 test -s conftest.dir/conftest.one &&
3180 test -s conftest.dir/conftest.two
3181 then
3182 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3183 break 3
3184 fi
3185 fi
3186 fi
3187 done
3188 done
3189 ;;
3190esac
3191
3192 done
3193IFS=$as_save_IFS
3194
3195rm -rf conftest.one conftest.two conftest.dir
3196
3197fi
3198 if test "${ac_cv_path_install+set}" = set; then
3199 INSTALL=$ac_cv_path_install
3200 else
3201 # As a last resort, use the slow shell script. Don't cache a
3202 # value for INSTALL within a source directory, because that will
3203 # break other packages using the cache if that directory is
3204 # removed, or if the value is a relative name.
3205 INSTALL=$ac_install_sh
3206 fi
3207fi
3208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3209$as_echo "$INSTALL" >&6; }
3210
3211# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3212# It thinks the first close brace ends the variable substitution.
3213test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3214
3215test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3216
3217test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3218
3219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3220$as_echo_n "checking whether build environment is sane... " >&6; }
3221# Reject unsafe characters in $srcdir or the absolute working directory
3222# name. Accept space and tab only in the latter.
3223am_lf='
3224'
3225case `pwd` in
3226 *[\\\"\#\$\&\'\`$am_lf]*)
3227 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3228esac
3229case $srcdir in
3230 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3231 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3232esac
3233
3234# Do 'set' in a subshell so we don't clobber the current shell's
3235# arguments. Must try -L first in case configure is actually a
3236# symlink; some systems play weird games with the mod time of symlinks
3237# (eg FreeBSD returns the mod time of the symlink's containing
3238# directory).
3239if (
3240 am_has_slept=no
3241 for am_try in 1 2; do
3242 echo "timestamp, slept: $am_has_slept" > conftest.file
3243 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3244 if test "$*" = "X"; then
3245 # -L didn't work.
3246 set X `ls -t "$srcdir/configure" conftest.file`
3247 fi
3248 if test "$*" != "X $srcdir/configure conftest.file" \
3249 && test "$*" != "X conftest.file $srcdir/configure"; then
3250
3251 # If neither matched, then we have a broken ls. This can happen
3252 # if, for instance, CONFIG_SHELL is bash and it inherits a
3253 # broken ls alias from the environment. This has actually
3254 # happened. Such a system could not be considered "sane".
3255 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3256 alias in your environment" "$LINENO" 5
3257 fi
3258 if test "$2" = conftest.file || test $am_try -eq 2; then
3259 break
3260 fi
3261 # Just in case.
3262 sleep 1
3263 am_has_slept=yes
3264 done
3265 test "$2" = conftest.file
3266 )
3267then
3268 # Ok.
3269 :
3270else
3271 as_fn_error $? "newly created file is older than distributed files!
3272Check your system clock" "$LINENO" 5
3273fi
3274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3275$as_echo "yes" >&6; }
3276# If we didn't sleep, we still need to ensure time stamps of config.status and
3277# generated files are strictly newer.
3278am_sleep_pid=
3279if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3280 ( sleep 1 ) &
3281 am_sleep_pid=$!
3282fi
3283
3284rm -f conftest.file
3285
3286test "$program_prefix" != NONE &&
3287 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3288# Use a double $ so make ignores it.
3289test "$program_suffix" != NONE &&
3290 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3291# Double any \ or $.
3292# By default was `s,x,x', remove it if useless.
3293ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3294program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3295
3296# Expand $ac_aux_dir to an absolute path.
3297am_aux_dir=`cd "$ac_aux_dir" && pwd`
3298
3299if test x"${MISSING+set}" != xset; then
3300 case $am_aux_dir in
3301 *\ * | *\ *)
3302 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3303 *)
3304 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3305 esac
3306fi
3307# Use eval to expand $SHELL
3308if eval "$MISSING --is-lightweight"; then
3309 am_missing_run="$MISSING "
3310else
3311 am_missing_run=
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3313$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3314fi
3315
3316if test x"${install_sh+set}" != xset; then
3317 case $am_aux_dir in
3318 *\ * | *\ *)
3319 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3320 *)
3321 install_sh="\${SHELL} $am_aux_dir/install-sh"
3322 esac
3323fi
3324
3325# Installed binaries are usually stripped using 'strip' when the user
3326# run "make install-strip". However 'strip' might not be the right
3327# tool to use in cross-compilation environments, therefore Automake
3328# will honor the 'STRIP' environment variable to overrule this program.
3329if test "$cross_compiling" != no; then
3330 if test -n "$ac_tool_prefix"; then
3331 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3332set dummy ${ac_tool_prefix}strip; ac_word=$2
3333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3334$as_echo_n "checking for $ac_word... " >&6; }
3335if ${ac_cv_prog_STRIP+:} false; then :
3336 $as_echo_n "(cached) " >&6
3337else
3338 if test -n "$STRIP"; then
3339 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3340else
3341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3342for as_dir in $PATH
3343do
3344 IFS=$as_save_IFS
3345 test -z "$as_dir" && as_dir=.
3346 for ac_exec_ext in '' $ac_executable_extensions; do
3347 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3348 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3350 break 2
3351 fi
3352done
3353 done
3354IFS=$as_save_IFS
3355
3356fi
3357fi
3358STRIP=$ac_cv_prog_STRIP
3359if test -n "$STRIP"; then
3360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3361$as_echo "$STRIP" >&6; }
3362else
3363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3364$as_echo "no" >&6; }
3365fi
3366
3367
3368fi
3369if test -z "$ac_cv_prog_STRIP"; then
3370 ac_ct_STRIP=$STRIP
3371 # Extract the first word of "strip", so it can be a program name with args.
3372set dummy strip; ac_word=$2
3373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3374$as_echo_n "checking for $ac_word... " >&6; }
3375if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3376 $as_echo_n "(cached) " >&6
3377else
3378 if test -n "$ac_ct_STRIP"; then
3379 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3380else
3381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3382for as_dir in $PATH
3383do
3384 IFS=$as_save_IFS
3385 test -z "$as_dir" && as_dir=.
3386 for ac_exec_ext in '' $ac_executable_extensions; do
3387 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3388 ac_cv_prog_ac_ct_STRIP="strip"
3389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3390 break 2
3391 fi
3392done
3393 done
3394IFS=$as_save_IFS
3395
3396fi
3397fi
3398ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3399if test -n "$ac_ct_STRIP"; then
3400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3401$as_echo "$ac_ct_STRIP" >&6; }
3402else
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3404$as_echo "no" >&6; }
3405fi
3406
3407 if test "x$ac_ct_STRIP" = x; then
3408 STRIP=":"
3409 else
3410 case $cross_compiling:$ac_tool_warned in
3411yes:)
3412{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3413$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3414ac_tool_warned=yes ;;
3415esac
3416 STRIP=$ac_ct_STRIP
3417 fi
3418else
3419 STRIP="$ac_cv_prog_STRIP"
3420fi
3421
3422fi
3423INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3424
3425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3426$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3427if test -z "$MKDIR_P"; then
3428 if ${ac_cv_path_mkdir+:} false; then :
3429 $as_echo_n "(cached) " >&6
3430else
3431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3432for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3433do
3434 IFS=$as_save_IFS
3435 test -z "$as_dir" && as_dir=.
3436 for ac_prog in mkdir gmkdir; do
3437 for ac_exec_ext in '' $ac_executable_extensions; do
3438 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3439 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3440 'mkdir (GNU coreutils) '* | \
3441 'mkdir (coreutils) '* | \
3442 'mkdir (fileutils) '4.1*)
3443 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3444 break 3;;
3445 esac
3446 done
3447 done
3448 done
3449IFS=$as_save_IFS
3450
3451fi
3452
3453 test -d ./--version && rmdir ./--version
3454 if test "${ac_cv_path_mkdir+set}" = set; then
3455 MKDIR_P="$ac_cv_path_mkdir -p"
3456 else
3457 # As a last resort, use the slow shell script. Don't cache a
3458 # value for MKDIR_P within a source directory, because that will
3459 # break other packages using the cache if that directory is
3460 # removed, or if the value is a relative name.
3461 MKDIR_P="$ac_install_sh -d"
3462 fi
3463fi
3464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3465$as_echo "$MKDIR_P" >&6; }
3466
3467for ac_prog in gawk mawk nawk awk
3468do
3469 # Extract the first word of "$ac_prog", so it can be a program name with args.
3470set dummy $ac_prog; ac_word=$2
3471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3472$as_echo_n "checking for $ac_word... " >&6; }
3473if ${ac_cv_prog_AWK+:} false; then :
3474 $as_echo_n "(cached) " >&6
3475else
3476 if test -n "$AWK"; then
3477 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3478else
3479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480for as_dir in $PATH
3481do
3482 IFS=$as_save_IFS
3483 test -z "$as_dir" && as_dir=.
3484 for ac_exec_ext in '' $ac_executable_extensions; do
3485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3486 ac_cv_prog_AWK="$ac_prog"
3487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3488 break 2
3489 fi
3490done
3491 done
3492IFS=$as_save_IFS
3493
3494fi
3495fi
3496AWK=$ac_cv_prog_AWK
3497if test -n "$AWK"; then
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3499$as_echo "$AWK" >&6; }
3500else
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3502$as_echo "no" >&6; }
3503fi
3504
3505
3506 test -n "$AWK" && break
3507done
3508
3509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3510$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3511set x ${MAKE-make}
3512ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3513if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3514 $as_echo_n "(cached) " >&6
3515else
3516 cat >conftest.make <<\_ACEOF
3517SHELL = /bin/sh
3518all:
3519 @echo '@@@%%%=$(MAKE)=@@@%%%'
3520_ACEOF
3521# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3522case `${MAKE-make} -f conftest.make 2>/dev/null` in
3523 *@@@%%%=?*=@@@%%%*)
3524 eval ac_cv_prog_make_${ac_make}_set=yes;;
3525 *)
3526 eval ac_cv_prog_make_${ac_make}_set=no;;
3527esac
3528rm -f conftest.make
3529fi
3530if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3532$as_echo "yes" >&6; }
3533 SET_MAKE=
3534else
3535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3536$as_echo "no" >&6; }
3537 SET_MAKE="MAKE=${MAKE-make}"
3538fi
3539
3540rm -rf .tst 2>/dev/null
3541mkdir .tst 2>/dev/null
3542if test -d .tst; then
3543 am__leading_dot=.
3544else
3545 am__leading_dot=_
3546fi
3547rmdir .tst 2>/dev/null
3548
3549# Check whether --enable-silent-rules was given.
3550if test "${enable_silent_rules+set}" = set; then :
3551 enableval=$enable_silent_rules;
3552fi
3553
3554case $enable_silent_rules in # (((
3555 yes) AM_DEFAULT_VERBOSITY=0;;
3556 no) AM_DEFAULT_VERBOSITY=1;;
3557 *) AM_DEFAULT_VERBOSITY=1;;
3558esac
3559am_make=${MAKE-make}
3560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3561$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3562if ${am_cv_make_support_nested_variables+:} false; then :
3563 $as_echo_n "(cached) " >&6
3564else
3565 if $as_echo 'TRUE=$(BAR$(V))
3566BAR0=false
3567BAR1=true
3568V=1
3569am__doit:
3570 @$(TRUE)
3571.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3572 am_cv_make_support_nested_variables=yes
3573else
3574 am_cv_make_support_nested_variables=no
3575fi
3576fi
3577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3578$as_echo "$am_cv_make_support_nested_variables" >&6; }
3579if test $am_cv_make_support_nested_variables = yes; then
3580 AM_V='$(V)'
3581 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3582else
3583 AM_V=$AM_DEFAULT_VERBOSITY
3584 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3585fi
3586AM_BACKSLASH='\'
3587
3588if test "`cd $srcdir && pwd`" != "`pwd`"; then
3589 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3590 # is not polluted with repeated "-I."
3591 am__isrc=' -I$(srcdir)'
3592 # test to see if srcdir already configured
3593 if test -f $srcdir/config.status; then
3594 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3595 fi
3596fi
3597
3598# test whether we have cygpath
3599if test -z "$CYGPATH_W"; then
3600 if (cygpath --version) >/dev/null 2>/dev/null; then
3601 CYGPATH_W='cygpath -w'
3602 else
3603 CYGPATH_W=echo
3604 fi
3605fi
3606
3607
3608# Define the identity of the package.
3609 PACKAGE='gmp'
3610 VERSION='6.2.0'
3611
3612
3613cat >>confdefs.h <<_ACEOF
3614#define PACKAGE "$PACKAGE"
3615_ACEOF
3616
3617
3618cat >>confdefs.h <<_ACEOF
3619#define VERSION "$VERSION"
3620_ACEOF
3621
3622# Some tools Automake needs.
3623
3624ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3625
3626
3627AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3628
3629
3630AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3631
3632
3633AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3634
3635
3636MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3637
3638# For better backward compatibility. To be removed once Automake 1.9.x
3639# dies out for good. For more background, see:
3640# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3641# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3642mkdir_p='$(MKDIR_P)'
3643
3644# We need awk for the "check" target (and possibly the TAP driver). The
3645# system "awk" is bad on some platforms.
3646# Always define AMTAR for backward compatibility. Yes, it's still used
3647# in the wild :-( We should find a proper way to deprecate it ...
3648AMTAR='$${TAR-tar}'
3649
3650
3651# We'll loop over all known methods to create a tar archive until one works.
3652_am_tools='gnutar pax cpio none'
3653
3654am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3655
3656
3657
3658
3659
3660
3661# POSIX will say in a future version that running "rm -f" with no argument
3662# is OK; and we want to be able to make that assumption in our Makefile
3663# recipes. So use an aggressive probe to check that the usage we want is
3664# actually supported "in the wild" to an acceptable degree.
3665# See automake bug#10828.
3666# To make any issue more visible, cause the running configure to be aborted
3667# by default if the 'rm' program in use doesn't match our expectations; the
3668# user can still override this though.
3669if rm -f && rm -fr && rm -rf; then : OK; else
3670 cat >&2 <<'END'
3671Oops!
3672
3673Your 'rm' program seems unable to run without file operands specified
3674on the command line, even when the '-f' option is present. This is contrary
3675to the behaviour of most rm programs out there, and not conforming with
3676the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3677
3678Please tell bug-automake@gnu.org about your system, including the value
3679of your $PATH and any error possibly output before this message. This
3680can help us improve future automake versions.
3681
3682END
3683 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3684 echo 'Configuration will proceed anyway, since you have set the' >&2
3685 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3686 echo >&2
3687 else
3688 cat >&2 <<'END'
3689Aborting the configuration process, to ensure you take notice of the issue.
3690
3691You can download and install GNU coreutils to get an 'rm' implementation
3692that behaves properly: <http://www.gnu.org/software/coreutils/>.
3693
3694If you want to complete the configuration process using your problematic
3695'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3696to "yes", and re-run configure.
3697
3698END
3699 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3700 fi
3701fi
3702
3703ac_config_headers="$ac_config_headers config.h:config.in"
3704
3705
3706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3707$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3708 # Check whether --enable-maintainer-mode was given.
3709if test "${enable_maintainer_mode+set}" = set; then :
3710 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3711else
3712 USE_MAINTAINER_MODE=no
3713fi
3714
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3716$as_echo "$USE_MAINTAINER_MODE" >&6; }
3717 if test $USE_MAINTAINER_MODE = yes; then
3718 MAINTAINER_MODE_TRUE=
3719 MAINTAINER_MODE_FALSE='#'
3720else
3721 MAINTAINER_MODE_TRUE='#'
3722 MAINTAINER_MODE_FALSE=
3723fi
3724
3725 MAINT=$MAINTAINER_MODE_TRUE
3726
3727
3728
3729
3730# Check whether --enable-assert was given.
3731if test "${enable_assert+set}" = set; then :
3732 enableval=$enable_assert; case $enableval in
3733yes|no) ;;
3734*) as_fn_error $? "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;;
3735esac
3736else
3737 enable_assert=no
3738fi
3739
3740
3741if test "$enable_assert" = "yes"; then
3742
3743$as_echo "#define WANT_ASSERT 1" >>confdefs.h
3744
3745 want_assert_01=1
3746else
3747 want_assert_01=0
3748fi
3749
3750echo "define(<WANT_ASSERT>,$want_assert_01)" >> $gmp_tmpconfigm4
3751
3752
3753
3754# Check whether --enable-alloca was given.
3755if test "${enable_alloca+set}" = set; then :
3756 enableval=$enable_alloca; case $enableval in
3757alloca|malloc-reentrant|malloc-notreentrant) ;;
3758yes|no|reentrant|notreentrant) ;;
3759debug) ;;
3760*)
3761 as_fn_error $? "bad value $enableval for --enable-alloca, need one of:
3762yes no reentrant notreentrant alloca malloc-reentrant malloc-notreentrant debug" "$LINENO" 5 ;;
3763esac
3764else
3765 enable_alloca=reentrant
3766fi
3767
3768
3769
3770# IMPROVE ME: The default for C++ is disabled. The tests currently
3771# performed below for a working C++ compiler are not particularly strong,
3772# and in general can't be expected to get the right setup on their own. The
3773# most significant problem is getting the ABI the same. Defaulting CXXFLAGS
3774# to CFLAGS takes only a small step towards this. It's also probably worth
3775# worrying whether the C and C++ runtimes from say gcc and a vendor C++ can
3776# work together. Some rather broken C++ installations were encountered
3777# during testing, and though such things clearly aren't GMP's problem, if
3778# --enable-cxx=detect were to be the default then some careful checks of
3779# which, if any, C++ compiler on the system is up to scratch would be
3780# wanted.
3781#
3782# Check whether --enable-cxx was given.
3783if test "${enable_cxx+set}" = set; then :
3784 enableval=$enable_cxx; case $enableval in
3785yes|no|detect) ;;
3786*) as_fn_error $? "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;;
3787esac
3788else
3789 enable_cxx=no
3790fi
3791
3792
3793
3794# Check whether --enable-assembly was given.
3795if test "${enable_assembly+set}" = set; then :
3796 enableval=$enable_assembly; case $enableval in
3797yes|no) ;;
3798*) as_fn_error $? "bad value $enableval for --enable-assembly, need yes or no" "$LINENO" 5 ;;
3799esac
3800else
3801 enable_assembly=yes
3802fi
3803
3804
3805
3806# Check whether --enable-fft was given.
3807if test "${enable_fft+set}" = set; then :
3808 enableval=$enable_fft; case $enableval in
3809yes|no) ;;
3810*) as_fn_error $? "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;;
3811esac
3812else
3813 enable_fft=yes
3814fi
3815
3816
3817if test "$enable_fft" = "yes"; then
3818
3819$as_echo "#define WANT_FFT 1" >>confdefs.h
3820
3821fi
3822
3823
3824# Check whether --enable-old-fft-full was given.
3825if test "${enable_old_fft_full+set}" = set; then :
3826 enableval=$enable_old_fft_full; case $enableval in
3827yes|no) ;;
3828*) as_fn_error $? "bad value $enableval for --enable-old-fft-full, need yes or no" "$LINENO" 5 ;;
3829esac
3830else
3831 enable_old_fft_full=no
3832fi
3833
3834
3835if test "$enable_old_fft_full" = "yes"; then
3836
3837$as_echo "#define WANT_OLD_FFT_FULL 1" >>confdefs.h
3838
3839fi
3840
3841
3842# Check whether --enable-nails was given.
3843if test "${enable_nails+set}" = set; then :
3844 enableval=$enable_nails; case $enableval in
3845yes|no|[02468]|[0-9][02468]) ;;
3846*[13579])
3847 as_fn_error $? "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;;
3848*)
3849 as_fn_error $? "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;;
3850esac
3851else
3852 enable_nails=no
3853fi
3854
3855
3856case $enable_nails in
3857yes) GMP_NAIL_BITS=2 ;;
3858no) GMP_NAIL_BITS=0 ;;
3859*) GMP_NAIL_BITS=$enable_nails ;;
3860esac
3861
3862
3863
3864# Check whether --enable-profiling was given.
3865if test "${enable_profiling+set}" = set; then :
3866 enableval=$enable_profiling; case $enableval in
3867no|prof|gprof|instrument) ;;
3868*) as_fn_error $? "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;;
3869esac
3870else
3871 enable_profiling=no
3872fi
3873
3874
3875case $enable_profiling in
3876 prof)
3877
3878$as_echo "#define WANT_PROFILING_PROF 1" >>confdefs.h
3879
3880 ;;
3881 gprof)
3882
3883$as_echo "#define WANT_PROFILING_GPROF 1" >>confdefs.h
3884
3885 ;;
3886 instrument)
3887
3888$as_echo "#define WANT_PROFILING_INSTRUMENT 1" >>confdefs.h
3889
3890 ;;
3891esac
3892
3893
3894echo "define(<WANT_PROFILING>,<\`$enable_profiling'>)" >> $gmp_tmpconfigm4
3895
3896
3897# -fomit-frame-pointer is incompatible with -pg on some chips
3898if test "$enable_profiling" = gprof; then
3899 fomit_frame_pointer=
3900else
3901 fomit_frame_pointer="-fomit-frame-pointer"
3902fi
3903
3904
3905
3906# Check whether --with-readline was given.
3907if test "${with_readline+set}" = set; then :
3908 withval=$with_readline; case $withval in
3909yes|no|detect) ;;
3910*) as_fn_error $? "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;;
3911esac
3912else
3913 with_readline=detect
3914fi
3915
3916
3917
3918# Check whether --enable-fat was given.
3919if test "${enable_fat+set}" = set; then :
3920 enableval=$enable_fat; case $enableval in
3921yes|no) ;;
3922*) as_fn_error $? "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;;
3923esac
3924else
3925 enable_fat=no
3926fi
3927
3928
3929
3930# Check whether --enable-minithres was given.
3931if test "${enable_minithres+set}" = set; then :
3932 enableval=$enable_minithres; case $enableval in
3933yes|no) ;;
3934*) as_fn_error $? "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;;
3935esac
3936else
3937 enable_minithres=no
3938fi
3939
3940
3941
3942# Check whether --enable-fake-cpuid was given.
3943if test "${enable_fake_cpuid+set}" = set; then :
3944 enableval=$enable_fake_cpuid; case $enableval in
3945yes|no) ;;
3946*) as_fn_error $? "bad value $enableval for --enable-fake-cpuid, need yes or no" "$LINENO" 5 ;;
3947esac
3948else
3949 enable_fake_cpuid=no
3950fi
3951
3952
3953if test "$enable_fake_cpuid" = "yes"; then
3954
3955$as_echo "#define WANT_FAKE_CPUID 1" >>confdefs.h
3956
3957fi
3958
3959
3960if test $enable_fat = yes && test $enable_assembly = no ; then
3961 as_fn_error $? "when doing a fat build, disabling assembly will not work" "$LINENO" 5
3962fi
3963
3964if test $enable_fake_cpuid = yes && test $enable_fat = no ; then
3965 as_fn_error $? "--enable-fake-cpuid requires --enable-fat" "$LINENO" 5
3966fi
3967
3968
3969tmp_host=`echo $host_cpu | sed 's/\./_/'`
3970cat >>confdefs.h <<_ACEOF
3971#define HAVE_HOST_CPU_$tmp_host 1
3972_ACEOF
3973
3974
3975echo "define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')" >> $gmp_tmpconfigm4p
3976
3977
3978
3979
3980
3981
3982# Table of compilers, options, and mpn paths. This code has various related
3983# purposes
3984#
3985# - better default CC/CFLAGS selections than autoconf otherwise gives
3986# - default CC/CFLAGS selections for extra CPU types specific to GMP
3987# - a few tests for known bad compilers
3988# - choice of ABIs on suitable systems
3989# - selection of corresponding mpn search path
3990#
3991# After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
3992# called. User selections of CC etc are respected.
3993#
3994# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
3995# pre-testing, since they of course depend on AC_PROG_CC, and also some of
3996# them cache their results, which is not wanted.
3997#
3998# The ABI selection mechanism is unique to GMP. All that reaches autoconf
3999# is a different selection of CC/CFLAGS according to the best ABI the system
4000# supports, and/or what the user selects. Naturally the mpn assembler code
4001# selected is very dependent on the ABI.
4002#
4003# The closest the standard tools come to a notion of ABI is something like
4004# "sparc64" which encodes a CPU and an ABI together. This doesn't seem to
4005# scale well for GMP, where exact CPU types like "ultrasparc2" are wanted,
4006# separate from the ABI used on them.
4007#
4008#
4009# The variables set here are
4010#
4011# cclist the compiler choices
4012# xx_cflags flags for compiler xx
4013# xx_cflags_maybe flags for compiler xx, if they work
4014# xx_cppflags cpp flags for compiler xx
4015# xx_cflags_optlist list of sets of optional flags
4016# xx_cflags_yyy set yyy of optional flags for compiler xx
4017# xx_ldflags -Wc,-foo flags for libtool linking with compiler xx
4018# ar_flags extra flags for $AR
4019# nm_flags extra flags for $NM
4020# limb limb size, can be "longlong"
4021# path mpn search path
4022# extra_functions extra mpn functions
4023# fat_path fat binary mpn search path [if fat binary desired]
4024# fat_functions fat functions
4025# fat_thresholds fat thresholds
4026#
4027# Suppose xx_cflags_optlist="arch", then flags from $xx_cflags_arch are
4028# tried, and the first flag that works will be used. An optlist like "arch
4029# cpu optimize" can be used to get multiple independent sets of flags tried.
4030# The first that works from each will be used. If no flag in a set works
4031# then nothing from that set is added.
4032#
4033# For multiple ABIs, the scheme extends as follows.
4034#
4035# abilist set of ABI choices
4036# cclist_aa compiler choices in ABI aa
4037# xx_aa_cflags flags for xx in ABI aa
4038# xx_aa_cflags_maybe flags for xx in ABI aa, if they work
4039# xx_aa_cppflags cpp flags for xx in ABI aa
4040# xx_aa_cflags_optlist list of sets of optional flags in ABI aa
4041# xx_aa_cflags_yyy set yyy of optional flags for compiler xx in ABI aa
4042# xx_aa_ldflags -Wc,-foo flags for libtool linking
4043# ar_aa_flags extra flags for $AR in ABI aa
4044# nm_aa_flags extra flags for $NM in ABI aa
4045# limb_aa limb size in ABI aa, can be "longlong"
4046# path_aa mpn search path in ABI aa
4047# extra_functions_aa extra mpn functions in ABI aa
4048#
4049# As a convenience, the unadorned xx_cflags (etc) are used for the last ABI
4050# in ablist, if an xx_aa_cflags for that ABI isn't given. For example if
4051# abilist="64 32" then $cc_64_cflags will be used for the 64-bit ABI, but
4052# for the 32-bit either $cc_32_cflags or $cc_cflags is used, whichever is
4053# defined. This makes it easy to add some 64-bit compilers and flags to an
4054# unadorned 32-bit set.
4055#
4056# limb=longlong (or limb_aa=longlong) applies to all compilers within that
4057# ABI. It won't work to have some needing long long and some not, since a
4058# single instantiated gmp.h will be used by both.
4059#
4060# SPEED_CYCLECOUNTER, cyclecounter_size and CALLING_CONVENTIONS_OBJS are
4061# also set here, with an ABI suffix.
4062#
4063#
4064#
4065# A table-driven approach like this to mapping cpu type to good compiler
4066# options is a bit of a maintenance burden, but there's not much uniformity
4067# between options specifications on different compilers. Some sort of
4068# separately updatable tool might be cute.
4069#
4070# The use of lots of variables like this, direct and indirect, tends to
4071# obscure when and how various things are done, but unfortunately it's
4072# pretty much the only way. If shell subroutines were portable then actual
4073# code like "if this .. do that" could be written, but attempting the same
4074# with full copies of GMP_PROG_CC_WORKS etc expanded at every point would
4075# hugely bloat the output.
4076
4077
4078
4079
4080# abilist needs to be non-empty, "standard" is just a generic name here
4081abilist="standard"
4082
4083# FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
4084# c89 over cc here. But note that on HP-UX c89 provides a castrated
4085# environment, and would want to be excluded somehow. Maybe
4086# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
4087# we don't need to worry.
4088#
4089cclist="gcc cc"
4090
4091gcc_cflags="-O2 -pedantic"
4092gcc_64_cflags="-O2 -pedantic"
4093cc_cflags="-O"
4094cc_64_cflags="-O"
4095
4096SPEED_CYCLECOUNTER_OBJ=
4097cyclecounter_size=2
4098
4099HAVE_HOST_CPU_FAMILY_power=0
4100
4101HAVE_HOST_CPU_FAMILY_powerpc=0
4102
4103
4104case $host in
4105
4106 alpha*-*-*)
4107 $as_echo "#define HAVE_HOST_CPU_FAMILY_alpha 1" >>confdefs.h
4108
4109 case $host_cpu in
4110 alphaev5* | alphapca5*)
4111 path="alpha/ev5 alpha" ;;
4112 alphaev67 | alphaev68 | alphaev7*)
4113 path="alpha/ev67 alpha/ev6 alpha" ;;
4114 alphaev6)
4115 path="alpha/ev6 alpha" ;;
4116 *)
4117 path="alpha" ;;
4118 esac
4119 if test "$enable_assembly" = "yes" ; then
4120 extra_functions="cntlz"
4121 fi
4122 gcc_cflags_optlist="asm cpu oldas" # need asm ahead of cpu, see below
4123 gcc_cflags_maybe="-mieee"
4124 gcc_cflags_oldas="-Wa,-oldas" # see GMP_GCC_WA_OLDAS.
4125
4126 # gcc 2.7.2.3 doesn't know any -mcpu= for alpha, apparently.
4127 # gcc 2.95 knows -mcpu= ev4, ev5, ev56, pca56, ev6.
4128 # gcc 3.0 adds nothing.
4129 # gcc 3.1 adds ev45, ev67 (but ev45 is the same as ev4).
4130 # gcc 3.2 adds nothing.
4131 #
4132 # gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6" strikes internal
4133 # compiler errors too easily and is rejected by GMP_PROG_CC_WORKS. Each
4134 # -mcpu=ev6 below has a fallback to -mcpu=ev56 for this reason.
4135 #
4136 case $host_cpu in
4137 alpha) gcc_cflags_cpu="-mcpu=ev4" ;;
4138 alphaev5) gcc_cflags_cpu="-mcpu=ev5" ;;
4139 alphaev56) gcc_cflags_cpu="-mcpu=ev56" ;;
4140 alphapca56 | alphapca57)
4141 gcc_cflags_cpu="-mcpu=pca56" ;;
4142 alphaev6) gcc_cflags_cpu="-mcpu=ev6 -mcpu=ev56" ;;
4143 alphaev67 | alphaev68 | alphaev7*)
4144 gcc_cflags_cpu="-mcpu=ev67 -mcpu=ev6 -mcpu=ev56" ;;
4145 esac
4146
4147 # gcc version "2.9-gnupro-99r1" on alphaev68-dec-osf5.1 has been seen
4148 # accepting -mcpu=ev6, but not putting the assembler in the right mode
4149 # for what it produces. We need to do this for it, and need to do it
4150 # before testing the -mcpu options.
4151 #
4152 # On old versions of gcc, which don't know -mcpu=, we believe an
4153 # explicit -Wa,-mev5 etc will be necessary to put the assembler in
4154 # the right mode for our .asm files and longlong.h asm blocks.
4155 #
4156 # On newer versions of gcc, when -mcpu= is known, we must give a -Wa
4157 # which is at least as high as the code gcc will generate. gcc
4158 # establishes what it needs with a ".arch" directive, our command line
4159 # option seems to override that.
4160 #
4161 # gas prior to 2.14 doesn't accept -mev67, but -mev6 seems enough for
4162 # ctlz and cttz (in 2.10.0 at least).
4163 #
4164 # OSF `as' accepts ev68 but stupidly treats it as ev4. -arch only seems
4165 # to affect insns like ldbu which are expanded as macros when necessary.
4166 # Insns like ctlz which were never available as macros are always
4167 # accepted and always generate their plain code.
4168 #
4169 case $host_cpu in
4170 alpha) gcc_cflags_asm="-Wa,-arch,ev4 -Wa,-mev4" ;;
4171 alphaev5) gcc_cflags_asm="-Wa,-arch,ev5 -Wa,-mev5" ;;
4172 alphaev56) gcc_cflags_asm="-Wa,-arch,ev56 -Wa,-mev56" ;;
4173 alphapca56 | alphapca57)
4174 gcc_cflags_asm="-Wa,-arch,pca56 -Wa,-mpca56" ;;
4175 alphaev6) gcc_cflags_asm="-Wa,-arch,ev6 -Wa,-mev6" ;;
4176 alphaev67 | alphaev68 | alphaev7*)
4177 gcc_cflags_asm="-Wa,-arch,ev67 -Wa,-mev67 -Wa,-arch,ev6 -Wa,-mev6" ;;
4178 esac
4179
4180 # It might be better to ask "cc" whether it's Cray C or DEC C,
4181 # instead of relying on the OS part of $host. But it's hard to
4182 # imagine either of those compilers anywhere except their native
4183 # systems.
4184 #
4185
4186echo "include_mpn(\`alpha/alpha-defs.m4')" >> $gmp_tmpconfigm4i
4187
4188 case $host in
4189 *-cray-unicos*)
4190 cc_cflags="-O" # no -g, it silently disables all optimizations
4191
4192echo "include_mpn(\`alpha/unicos.m4')" >> $gmp_tmpconfigm4i
4193
4194 # Don't perform any assembly syntax tests on this beast.
4195 gmp_asm_syntax_testing=no
4196 ;;
4197 *-*-osf*)
4198
4199echo "include_mpn(\`alpha/default.m4')" >> $gmp_tmpconfigm4i
4200
4201 cc_cflags=""
4202 cc_cflags_optlist="opt cpu"
4203
4204 # not sure if -fast works on old versions, so make it optional
4205 cc_cflags_opt="-fast -O2"
4206
4207 # DEC C V5.9-005 knows ev4, ev5, ev56, pca56, ev6.
4208 # Compaq C V6.3-029 adds ev67.
4209 #
4210 case $host_cpu in
4211 alpha) cc_cflags_cpu="-arch~ev4~-tune~ev4" ;;
4212 alphaev5) cc_cflags_cpu="-arch~ev5~-tune~ev5" ;;
4213 alphaev56) cc_cflags_cpu="-arch~ev56~-tune~ev56" ;;
4214 alphapca56 | alphapca57)
4215 cc_cflags_cpu="-arch~pca56~-tune~pca56" ;;
4216 alphaev6) cc_cflags_cpu="-arch~ev6~-tune~ev6" ;;
4217 alphaev67 | alphaev68 | alphaev7*)
4218 cc_cflags_cpu="-arch~ev67~-tune~ev67 -arch~ev6~-tune~ev6" ;;
4219 esac
4220 ;;
4221 *)
4222
4223echo "include_mpn(\`alpha/default.m4')" >> $gmp_tmpconfigm4i
4224
4225 ;;
4226 esac
4227
4228 case $host in
4229 *-*-unicos*)
4230 # tune/alpha.asm assumes int==4bytes but unicos uses int==8bytes
4231 ;;
4232 *)
4233 SPEED_CYCLECOUNTER_OBJ=alpha.lo
4234 cyclecounter_size=1 ;;
4235 esac
4236 ;;
4237
4238
4239 # Cray vector machines.
4240 # This must come after alpha* so that we can recognize present and future
4241 # vector processors with a wildcard.
4242 *-cray-unicos*)
4243 gmp_asm_syntax_testing=no
4244 cclist="cc"
4245 # We used to have -hscalar0 here as a workaround for miscompilation of
4246 # mpz/import.c, but let's hope Cray fixes their bugs instead, since
4247 # -hscalar0 causes disastrously poor code to be generated.
4248 cc_cflags="-O3 -hnofastmd -htask0 -Wa,-B"
4249 path="cray"
4250 ;;
4251
4252
4253 arm*-*-* | aarch64*-*-*)
4254 abilist="32"
4255 gcc_cflags="$gcc_cflags $fomit_frame_pointer"
4256 gcc_cflags_optlist="arch fpmode neon tune"
4257 gcc_64_cflags_optlist="arch tune"
4258 gcc_testlist="gcc-arm-umodsi"
4259 gcc_64_testlist=""
4260 CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo'
4261 CALLING_CONVENTIONS_OBJS_64=""
4262 cclist_64="gcc cc"
4263 any_32_testlist="sizeof-void*-4"
4264 any_64_testlist="sizeof-void*-8"
4265
4266 # This is needed for clang, which is not content with flags like -mfpu=neon
4267 # alone.
4268 case $host in
4269 *-*-*eabi)
4270 gcc_cflags_fpmode="-mfloat-abi=softfp" ;;
4271 *-*-*eabihf)
4272 gcc_cflags_fpmode="-mfloat-abi=hard" ;;
4273 *-*-mingw*)
4274 limb_64=longlong ;;
4275 esac
4276
4277 # FIXME: We make mandatory compiler options optional here. We should
4278 # either enforce them, or organise to strip paths as the corresponding
4279 # options fail.
4280 case $host_cpu in
4281 armxscale | arm7ej | arm9te | arm9e* | arm10* | armv5*)
4282 path="arm/v5 arm"
4283 gcc_cflags_arch="-march=armv5"
4284 ;;
4285 armsa1 | arm7t* | arm9t* | armv4t*)
4286 path="arm"
4287 gcc_cflags_arch="-march=armv4"
4288 ;;
4289 arm1156 | armv6t2*)
4290 path="arm/v6t2 arm/v6 arm/v5 arm"
4291 gcc_cflags_arch="-march=armv6t2"
4292 ;;
4293 arm11* | armv6*)
4294 path="arm/v6 arm/v5 arm"
4295 gcc_cflags_arch="-march=armv6"
4296 ;;
4297 armcortexa5 | armv7*)
4298 path="arm/v7a/cora5 arm/v6t2 arm/v6 arm/v5 arm"
4299 gcc_cflags_arch="-march=armv7-a"
4300 gcc_cflags_tune="-mtune=cortex-a5"
4301 ;;
4302 armcortexa5neon)
4303 path="arm/neon arm/v7a/cora5 arm/v6t2 arm/v6 arm/v5 arm"
4304 gcc_cflags_neon="-mfpu=neon"
4305 gcc_cflags_arch="-march=armv7-a"
4306 gcc_cflags_tune="-mtune=cortex-a5"
4307 ;;
4308 armcortexa7)
4309 path="arm/v7a/cora7 arm/v6t2 arm/v6 arm/v5 arm"
4310 gcc_cflags_arch="-march=armv7ve -march=armv7-a"
4311 gcc_cflags_tune="-mtune=cortex-a7"
4312 ;;
4313 armcortexa7neon)
4314 path="arm/neon arm/v7a/cora7 arm/v6t2 arm/v6 arm/v5 arm"
4315 gcc_cflags_arch="-march=armv7ve -march=armv7-a"
4316 gcc_cflags_neon="-mfpu=neon"
4317 gcc_cflags_tune="-mtune=cortex-a7"
4318 ;;
4319 armcortexa8)
4320 path="arm/v7a/cora8 arm/v6t2 arm/v6 arm/v5 arm"
4321 gcc_cflags_arch="-march=armv7-a"
4322 gcc_cflags_tune="-mtune=cortex-a8"
4323 ;;
4324 armcortexa8neon)
4325 path="arm/neon arm/v7a/cora8 arm/v6t2 arm/v6 arm/v5 arm"
4326 gcc_cflags_arch="-march=armv7-a"
4327 gcc_cflags_neon="-mfpu=neon"
4328 gcc_cflags_tune="-mtune=cortex-a8"
4329 ;;
4330 armcortexa9)
4331 path="arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm"
4332 gcc_cflags_arch="-march=armv7-a"
4333 gcc_cflags_tune="-mtune=cortex-a9"
4334 ;;
4335 armcortexa9neon)
4336 path="arm/neon arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm"
4337 gcc_cflags_arch="-march=armv7-a"
4338 gcc_cflags_neon="-mfpu=neon"
4339 gcc_cflags_tune="-mtune=cortex-a9"
4340 ;;
4341 armcortexa15)
4342 path="arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4343 gcc_cflags_arch="-march=armv7ve -march=armv7-a"
4344 gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9"
4345 ;;
4346 armcortexa15neon)
4347 path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4348 gcc_cflags_arch="-march=armv7ve -march=armv7-a"
4349 gcc_cflags_neon="-mfpu=neon"
4350 gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9"
4351 ;;
4352 armcortexa12 | armcortexa17)
4353 path="arm/v7a/cora17 arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4354 gcc_cflags_arch="-march=armv7ve -march=armv7-a"
4355 gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9"
4356 ;;
4357 armcortexa12neon | armcortexa17neon)
4358 path="arm/v7a/cora17/neon arm/v7a/cora15/neon arm/neon arm/v7a/cora17 arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4359 gcc_cflags_arch="-march=armv7ve -march=armv7-a"
4360 gcc_cflags_neon="-mfpu=neon"
4361 gcc_cflags_tune="-mtune=cortex-a15 -mtune=cortex-a9"
4362 ;;
4363 armcortexa53 | armcortexa53neon)
4364 abilist="64 32"
4365 path="arm/neon arm/v7a/cora9 arm/v6t2 arm/v6 arm/v5 arm"
4366 path_64="arm64/cora53 arm64"
4367 gcc_cflags_arch="-march=armv8-a"
4368 gcc_cflags_neon="-mfpu=neon"
4369 gcc_cflags_tune="-mtune=cortex-a53"
4370 ;;
4371 armcortexa57 | armcortexa57neon)
4372 abilist="64 32"
4373 path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4374 path_64="arm64/cora57 arm64"
4375 gcc_cflags_arch="-march=armv8-a"
4376 gcc_cflags_neon="-mfpu=neon"
4377 gcc_cflags_tune="-mtune=cortex-a57"
4378 ;;
4379 armcortexa7[2-9] | armcortexa7[2-9]neon)
4380 abilist="64 32"
4381 path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4382 path_64="arm64/cora57 arm64"
4383 gcc_cflags_arch="-march=armv8-a"
4384 gcc_cflags_neon="-mfpu=neon"
4385 gcc_cflags_tune="-mtune=cortex-a72 -mtune=cortex-a57"
4386 ;;
4387 armexynosm1)
4388 abilist="64 32"
4389 path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4390 path_64="arm64"
4391 gcc_cflags_arch="-march=armv8-a"
4392 gcc_cflags_neon="-mfpu=neon"
4393 gcc_cflags_tune="-mtune=exynosm1"
4394 ;;
4395 armthunderx)
4396 abilist="64 32"
4397 path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4398 path_64="arm64"
4399 gcc_cflags_arch="-march=armv8-a"
4400 gcc_cflags_neon="-mfpu=neon"
4401 gcc_cflags_tune="-mtune=thunderx"
4402 ;;
4403 armxgene1)
4404 abilist="64 32"
4405 path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4406 path_64="arm64/xgene1 arm64"
4407 gcc_cflags_arch="-march=armv8-a"
4408 gcc_cflags_neon="-mfpu=neon"
4409 gcc_cflags_tune="-mtune=xgene1"
4410 ;;
4411 aarch64*)
4412 abilist="64 32"
4413 path="arm/v7a/cora15/neon arm/neon arm/v7a/cora15 arm/v6t2 arm/v6 arm/v5 arm"
4414 path_64="arm64"
4415 gcc_cflags_arch="-march=armv8-a"
4416 gcc_cflags_neon="-mfpu=neon"
4417 gcc_cflags_tune=""
4418 ;;
4419 *)
4420 path="arm"
4421 gcc_cflags_arch="-march=armv4"
4422
4423echo "define(<NOTHUMB>,1)" >> $gmp_tmpconfigm4
4424
4425 ;;
4426 esac
4427 ;;
4428
4429
4430 # Fujitsu
4431 f30[01]-fujitsu-sysv*)
4432 cclist="gcc vcc"
4433 # FIXME: flags for vcc?
4434 vcc_cflags="-g"
4435 path="fujitsu"
4436 ;;
4437
4438
4439 hppa*-*-*)
4440 # HP cc (the one sold separately) is K&R by default, but AM_C_PROTOTYPES
4441 # will add "-Ae", or "-Aa -D_HPUX_SOURCE", to put it into ansi mode, if
4442 # possible.
4443 #
4444 # gcc for hppa 2.0 can be built either for 2.0n (32-bit) or 2.0w
4445 # (64-bit), but not both, so there's no option to choose the desired
4446 # mode, we must instead detect which of the two it is. This is done by
4447 # checking sizeof(long), either 4 or 8 bytes respectively. Do this in
4448 # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc.
4449 #
4450 gcc_cflags_optlist="arch"
4451 gcc_testlist="sizeof-long-4"
4452 SPEED_CYCLECOUNTER_OBJ=hppa.lo
4453 cyclecounter_size=1
4454
4455 # FIXME: For hppa2.0*, path should be "pa32/hppa2_0 pa32/hppa1_1 pa32".
4456 # (Can't remember why this isn't done already, have to check what .asm
4457 # files are available in each and how they run on a typical 2.0 cpu.)
4458 #
4459 case $host_cpu in
4460 hppa1.0*) path="pa32" ;;
4461 hppa7000*) path="pa32/hppa1_1 pa32" ;;
4462 hppa2.0* | hppa64)
4463 path="pa32/hppa2_0 pa32/hppa1_1/pa7100 pa32/hppa1_1 pa32" ;;
4464 *) # default to 7100
4465 path="pa32/hppa1_1/pa7100 pa32/hppa1_1 pa32" ;;
4466 esac
4467
4468 # gcc 2.7.2.3 knows -mpa-risc-1-0 and -mpa-risc-1-1
4469 # gcc 2.95 adds -mpa-risc-2-0, plus synonyms -march=1.0, 1.1 and 2.0
4470 #
4471 # We don't use -mpa-risc-2-0 in ABI=1.0 because 64-bit registers may not
4472 # be saved by the kernel on an old system. Actually gcc (as of 3.2)
4473 # only adds a few float instructions with -mpa-risc-2-0, so it would
4474 # probably be safe, but let's not take the chance. In any case, a
4475 # configuration like --host=hppa2.0 ABI=1.0 is far from optimal.
4476 #
4477 case $host_cpu in
4478 hppa1.0*) gcc_cflags_arch="-mpa-risc-1-0" ;;
4479 *) # default to 7100
4480 gcc_cflags_arch="-mpa-risc-1-1" ;;
4481 esac
4482
4483 case $host_cpu in
4484 hppa1.0*) cc_cflags="+O2" ;;
4485 *) # default to 7100
4486 cc_cflags="+DA1.1 +O2" ;;
4487 esac
4488
4489 case $host in
4490 hppa2.0*-*-* | hppa64-*-*)
4491 cclist_20n="gcc cc"
4492 abilist="2.0n 1.0"
4493 path_20n="pa64"
4494 limb_20n=longlong
4495 any_20n_testlist="sizeof-long-4"
4496 SPEED_CYCLECOUNTER_OBJ_20n=hppa2.lo
4497 cyclecounter_size_20n=2
4498
4499 # -mpa-risc-2-0 is only an optional flag, in case an old gcc is
4500 # used. Assembler support for 2.0 is essential though, for our asm
4501 # files.
4502 gcc_20n_cflags="$gcc_cflags"
4503 gcc_20n_cflags_optlist="arch"
4504 gcc_20n_cflags_arch="-mpa-risc-2-0 -mpa-risc-1-1"
4505 gcc_20n_testlist="sizeof-long-4 hppa-level-2.0"
4506
4507 cc_20n_cflags="+DA2.0 +e +O2 -Wl,+vnocompatwarnings"
4508 cc_20n_testlist="hpc-hppa-2-0"
4509
4510 # ABI=2.0w is available for hppa2.0w and hppa2.0, but not for
4511 # hppa2.0n, on the assumption that that the latter indicates a
4512 # desire for ABI=2.0n.
4513 case $host in
4514 hppa2.0n-*-*) ;;
4515 *)
4516 # HPUX 10 and earlier cannot run 2.0w. Not sure about other
4517 # systems (GNU/Linux for instance), but lets assume they're ok.
4518 case $host in
4519 *-*-hpux[1-9] | *-*-hpux[1-9].* | *-*-hpux10 | *-*-hpux10.*) ;;
4520 *) abilist="2.0w $abilist" ;;
4521 esac
4522
4523 cclist_20w="gcc cc"
4524 gcc_20w_cflags="$gcc_cflags -mpa-risc-2-0"
4525 cc_20w_cflags="+DD64 +O2"
4526 cc_20w_testlist="hpc-hppa-2-0"
4527 path_20w="pa64"
4528 any_20w_testlist="sizeof-long-8"
4529 SPEED_CYCLECOUNTER_OBJ_20w=hppa2w.lo
4530 cyclecounter_size_20w=2
4531 ;;
4532 esac
4533 ;;
4534 esac
4535 ;;
4536
4537
4538 ia64*-*-* | itanium-*-* | itanium2-*-*)
4539 abilist="64"
4540
4541echo "include_mpn(\`ia64/ia64-defs.m4')" >> $gmp_tmpconfigm4i
4542
4543 SPEED_CYCLECOUNTER_OBJ=ia64.lo
4544 any_32_testlist="sizeof-long-4"
4545
4546 case $host_cpu in
4547 itanium) path="ia64/itanium ia64" ;;
4548 itanium2) path="ia64/itanium2 ia64" ;;
4549 *) path="ia64" ;;
4550 esac
4551
4552 gcc_64_cflags_optlist="tune"
4553 gcc_32_cflags_optlist=$gcc_64_cflags_optlist
4554
4555 # gcc pre-release 3.4 adds -mtune itanium and itanium2
4556 case $host_cpu in
4557 itanium) gcc_cflags_tune="-mtune=itanium" ;;
4558 itanium2) gcc_cflags_tune="-mtune=itanium2" ;;
4559 esac
4560
4561 case $host in
4562 *-*-linux*)
4563 cclist="gcc icc"
4564 icc_cflags="-no-gcc"
4565 icc_cflags_optlist="opt"
4566 # Don't use -O3, it is for "large data sets" and also miscompiles GMP.
4567 # But icc miscompiles GMP at any optimization level, at higher levels
4568 # it miscompiles more files...
4569 icc_cflags_opt="-O2 -O1"
4570 icc_cflags_opt_maybe="-fp-model~precise"
4571 ;;
4572
4573 *-*-hpux*)
4574 # HP cc sometimes gets internal errors if the optimization level is
4575 # too high. GMP_PROG_CC_WORKS detects this, the "_opt" fallbacks
4576 # let us use whatever seems to work.
4577 #
4578 abilist="32 64"
4579 any_64_testlist="sizeof-long-8"
4580
4581 cclist_32="gcc cc"
4582 path_32="ia64"
4583 cc_32_cflags=""
4584 cc_32_cflags_optlist="opt"
4585 cc_32_cflags_opt="+O2 +O1"
4586 gcc_32_cflags="$gcc_cflags -milp32"
4587 limb_32=longlong
4588 SPEED_CYCLECOUNTER_OBJ_32=ia64.lo
4589 cyclecounter_size_32=2
4590
4591 # Must have +DD64 in CPPFLAGS to get the right __LP64__ for headers,
4592 # but also need it in CFLAGS for linking programs, since automake
4593 # only uses CFLAGS when linking, not CPPFLAGS.
4594 # FIXME: Maybe should use cc_64_ldflags for this, but that would
4595 # need GMP_LDFLAGS used consistently by all the programs.
4596 #
4597 cc_64_cflags="+DD64"
4598 cc_64_cppflags="+DD64"
4599 cc_64_cflags_optlist="opt"
4600 cc_64_cflags_opt="+O2 +O1"
4601 gcc_64_cflags="$gcc_cflags -mlp64"
4602 ;;
4603 esac
4604 ;;
4605
4606
4607 # Motorola 68k
4608 #
4609 m68k-*-* | m68[0-9][0-9][0-9]-*-*)
4610 $as_echo "#define HAVE_HOST_CPU_FAMILY_m68k 1" >>confdefs.h
4611
4612
4613echo "include_mpn(\`m68k/m68k-defs.m4')" >> $gmp_tmpconfigm4i
4614
4615 gcc_cflags="$gcc_cflags $fomit_frame_pointer"
4616 gcc_cflags_optlist="arch"
4617
4618 # gcc 2.7.2 knows -m68000, -m68020, -m68030, -m68040.
4619 # gcc 2.95 adds -mcpu32, -m68060.
4620 # FIXME: Maybe "-m68020 -mnobitfield" would suit cpu32 on 2.7.2.
4621 #
4622 case $host_cpu in
4623 m68020) gcc_cflags_arch="-m68020" ;;
4624 m68030) gcc_cflags_arch="-m68030" ;;
4625 m68040) gcc_cflags_arch="-m68040" ;;
4626 m68060) gcc_cflags_arch="-m68060 -m68000" ;;
4627 m68360) gcc_cflags_arch="-mcpu32 -m68000" ;;
4628 *) gcc_cflags_arch="-m68000" ;;
4629 esac
4630
4631 # FIXME: m68k/mc68020 looks like it's ok for cpu32, but this wants to be
4632 # tested. Will need to introduce an m68k/cpu32 if m68k/mc68020 ever uses
4633 # the bitfield instructions.
4634 case $host_cpu in
4635 m680[234]0 | m68360) path="m68k/mc68020 m68k" ;;
4636 *) path="m68k" ;;
4637 esac
4638 ;;
4639
4640
4641 # Motorola 88k
4642 m88k*-*-*)
4643 path="m88k"
4644 ;;
4645 m88110*-*-*)
4646 gcc_cflags="$gcc_cflags -m88110"
4647 path="m88k/mc88110 m88k"
4648 ;;
4649
4650
4651 # IRIX 5 and earlier can only run 32-bit o32.
4652 #
4653 # IRIX 6 and up always has a 64-bit mips CPU can run n32 or 64. n32 is
4654 # preferred over 64, but only because that's been the default in past
4655 # versions of GMP. The two are equally efficient.
4656 #
4657 # Linux kernel 2.2.13 arch/mips/kernel/irixelf.c has a comment about not
4658 # supporting n32 or 64.
4659 #
4660 # For reference, libtool (eg. 1.5.6) recognises the n32 ABI and knows the
4661 # right options to use when linking (both cc and gcc), so no need for
4662 # anything special from us.
4663 #
4664 mips*-*-*)
4665 abilist="o32"
4666 gcc_cflags_optlist="abi"
4667 gcc_cflags_abi="-mabi=32 -m32"
4668 gcc_testlist="gcc-mips-o32"
4669 path="mips32"
4670 cc_cflags="-O2 -o32" # no -g, it disables all optimizations
4671 # this suits both mips32 and mips64
4672
4673echo "include_mpn(\`mips32/mips-defs.m4')" >> $gmp_tmpconfigm4i
4674
4675
4676 case $host in
4677 mips64*-*-* | mipsisa64*-*-* | mips*-*-irix[6789]*)
4678 abilist="n32 64 o32"
4679
4680 cclist_n32="gcc cc"
4681 gcc_n32_cflags_optlist="abi"
4682 gcc_n32_cflags="$gcc_cflags"
4683 gcc_n32_cflags_abi="-mabi=n32 -mn32"
4684 cc_n32_cflags="-O2 -n32" # no -g, it disables all optimizations
4685 limb_n32=longlong
4686
4687 cclist_64="gcc cc"
4688 gcc_64_cflags_optlist="abi"
4689 gcc_64_cflags="$gcc_cflags"
4690 gcc_64_cflags_abi="-mabi=64 -m64"
4691 gcc_64_ldflags="-Wc,-mabi=64"
4692 cc_64_cflags="-O2 -64" # no -g, it disables all optimizations
4693 cc_64_ldflags="-Wc,-64"
4694
4695 case $host_cpu in
4696 mips64r[6789]* | mipsisa64r[6789]*)
4697 path_n32="mips64/r6 mips64"
4698 path_64="mips64/r6 mips64"
4699 ;;
4700 *)
4701 path_n32="mips64/hilo mips64"
4702 path_64="mips64/hilo mips64"
4703 ;;
4704 esac
4705
4706 ;;
4707 esac
4708 ;;
4709
4710
4711 # Darwin (powerpc-apple-darwin1.3) has it's hacked gcc installed as cc.
4712 # Our usual "gcc in disguise" detection means gcc_cflags etc here gets
4713 # used.
4714 #
4715 # The darwin pre-compiling preprocessor is disabled with -no-cpp-precomp
4716 # since it doesn't like "__attribute__ ((mode (SI)))" etc in gmp-impl.h,
4717 # and so always ends up running the plain preprocessor anyway. This could
4718 # be done in CPPFLAGS rather than CFLAGS, but there's not many places
4719 # preprocessing is done separately, and this is only a speedup, the normal
4720 # preprocessor gets run if there's any problems.
4721 #
4722 # We used to use -Wa,-mppc with gcc, but can't remember exactly why.
4723 # Presumably it was for old versions of gcc where -mpowerpc doesn't put
4724 # the assembler in the right mode. In any case -Wa,-mppc is not good, for
4725 # instance -mcpu=604 makes recent gcc use -m604 to get access to the
4726 # "fsel" instruction, but a -Wa,-mppc overrides that, making code that
4727 # comes out with fsel fail.
4728 #
4729 # (Note also that the darwin assembler doesn't accept "-mppc", so any
4730 # -Wa,-mppc was used only if it worked. The right flag on darwin would be
4731 # "-arch ppc" or some such, but that's already the default.)
4732 #
4733 powerpc*-*-* | power[3-9]-*-*)
4734 $as_echo "#define HAVE_HOST_CPU_FAMILY_powerpc 1" >>confdefs.h
4735
4736 HAVE_HOST_CPU_FAMILY_powerpc=1
4737 abilist="32"
4738 cclist="gcc cc"
4739 cc_cflags="-O2"
4740 gcc_32_cflags_maybe="-m32"
4741 gcc_cflags_optlist="precomp subtype asm cpu"
4742 gcc_cflags_precomp="-no-cpp-precomp"
4743 gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin
4744 gcc_cflags_asm=""
4745 gcc_cflags_cpu=""
4746 vmx_path=""
4747
4748 # grab this object, though it's not a true cycle counter routine
4749 SPEED_CYCLECOUNTER_OBJ=powerpc.lo
4750 cyclecounter_size=0
4751
4752 case $host_cpu in
4753 powerpc740 | powerpc750)
4754 path="powerpc32/750 powerpc32" ;;
4755 powerpc7400 | powerpc7410)
4756 path="powerpc32/vmx powerpc32/750 powerpc32" ;;
4757 powerpc74[45]?)
4758 path="powerpc32/vmx powerpc32" ;;
4759 *)
4760 path="powerpc32" ;;
4761 esac
4762
4763 case $host_cpu in
4764 powerpc401) gcc_cflags_cpu="-mcpu=401" ;;
4765 powerpc403) gcc_cflags_cpu="-mcpu=403"
4766 xlc_cflags_arch="-qarch=403 -qarch=ppc" ;;
4767 powerpc405) gcc_cflags_cpu="-mcpu=405" ;;
4768 powerpc505) gcc_cflags_cpu="-mcpu=505" ;;
4769 powerpc601) gcc_cflags_cpu="-mcpu=601"
4770 xlc_cflags_arch="-qarch=601 -qarch=ppc" ;;
4771 powerpc602) gcc_cflags_cpu="-mcpu=602"
4772 xlc_cflags_arch="-qarch=602 -qarch=ppc" ;;
4773 powerpc603) gcc_cflags_cpu="-mcpu=603"
4774 xlc_cflags_arch="-qarch=603 -qarch=ppc" ;;
4775 powerpc603e) gcc_cflags_cpu="-mcpu=603e -mcpu=603"
4776 xlc_cflags_arch="-qarch=603 -qarch=ppc" ;;
4777 powerpc604) gcc_cflags_cpu="-mcpu=604"
4778 xlc_cflags_arch="-qarch=604 -qarch=ppc" ;;
4779 powerpc604e) gcc_cflags_cpu="-mcpu=604e -mcpu=604"
4780 xlc_cflags_arch="-qarch=604 -qarch=ppc" ;;
4781 powerpc620) gcc_cflags_cpu="-mcpu=620" ;;
4782 powerpc630) gcc_cflags_cpu="-mcpu=630"
4783 xlc_cflags_arch="-qarch=pwr3"
4784 cpu_path="p3 p3-p7" ;;
4785 powerpc740) gcc_cflags_cpu="-mcpu=740" ;;
4786 powerpc7400 | powerpc7410)
4787 gcc_cflags_asm="-Wa,-maltivec"
4788 gcc_cflags_cpu="-mcpu=7400 -mcpu=750" ;;
4789 powerpc74[45]?)
4790 gcc_cflags_asm="-Wa,-maltivec"
4791 gcc_cflags_cpu="-mcpu=7450" ;;
4792 powerpc750) gcc_cflags_cpu="-mcpu=750" ;;
4793 powerpc801) gcc_cflags_cpu="-mcpu=801" ;;
4794 powerpc821) gcc_cflags_cpu="-mcpu=821" ;;
4795 powerpc823) gcc_cflags_cpu="-mcpu=823" ;;
4796 powerpc860) gcc_cflags_cpu="-mcpu=860" ;;
4797 powerpc970) gcc_cflags_cpu="-mtune=970"
4798 xlc_cflags_arch="-qarch=970 -qarch=pwr3"
4799 vmx_path="powerpc64/vmx"
4800 cpu_path="p4 p3-p7" ;;
4801 power4) gcc_cflags_cpu="-mtune=power4"
4802 xlc_cflags_arch="-qarch=pwr4"
4803 cpu_path="p4 p3-p7" ;;
4804 power5) gcc_cflags_cpu="-mtune=power5 -mtune=power4"
4805 xlc_cflags_arch="-qarch=pwr5"
4806 cpu_path="p5 p4 p3-p7" ;;
4807 power6) gcc_cflags_cpu="-mtune=power6"
4808 xlc_cflags_arch="-qarch=pwr6"
4809 cpu_path="p6 p3-p7" ;;
4810 power7) gcc_cflags_cpu="-mtune=power7 -mtune=power5"
4811 xlc_cflags_arch="-qarch=pwr7 -qarch=pwr5"
4812 cpu_path="p7 p5 p4 p3-p7" ;;
4813 power8) gcc_cflags_cpu="-mtune=power8 -mtune=power7 -mtune=power5"
4814 xlc_cflags_arch="-qarch=pwr8 -qarch=pwr7 -qarch=pwr5"
4815 cpu_path="p8 p7 p5 p4 p3-p7" ;;
4816 power9) gcc_cflags_cpu="-mtune=power9 -mtune=power8 -mtune=power7 -mtune=power5"
4817 xlc_cflags_arch="-qarch=pwr9 -qarch=pwr8 -qarch=pwr7 -qarch=pwr5"
4818 cpu_path="p9 p8 p7 p5 p4 p3-p7" ;;
4819 esac
4820
4821 case $host in
4822 *-*-aix*)
4823 cclist="gcc xlc cc"
4824 gcc_32_cflags_maybe="-maix32"
4825 xlc_cflags="-O2 -qmaxmem=20000"
4826 xlc_cflags_optlist="arch"
4827 xlc_32_cflags_maybe="-q32"
4828 ar_32_flags="-X32"
4829 nm_32_flags="-X32"
4830 esac
4831
4832 case $host in
4833 powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*)
4834 case $host in
4835 *-*-aix*)
4836 # On AIX a true 64-bit ABI is available.
4837 # Need -Wc to pass object type flags through to the linker.
4838 abilist="mode64 $abilist"
4839 cclist_mode64="gcc xlc"
4840 gcc_mode64_cflags="$gcc_cflags -maix64 -mpowerpc64"
4841 gcc_mode64_cflags_optlist="cpu"
4842 gcc_mode64_ldflags="-Wc,-maix64"
4843 xlc_mode64_cflags="-O2 -q64 -qmaxmem=20000"
4844 xlc_mode64_cflags_optlist="arch"
4845 xlc_mode64_ldflags="-Wc,-q64"
4846 # Must indicate object type to ar and nm
4847 ar_mode64_flags="-X64"
4848 nm_mode64_flags="-X64"
4849 path_mode64=""
4850 p=""
4851 for i in $cpu_path
4852 do path_mode64="${path_mode64}powerpc64/mode64/$i "
4853 path_mode64="${path_mode64}powerpc64/$i "
4854 p="${p} powerpc32/$i "
4855 done
4856 path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64"
4857 path="$p $path"
4858 # grab this object, though it's not a true cycle counter routine
4859 SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo
4860 cyclecounter_size_mode64=0
4861 ;;
4862 *-*-darwin*)
4863 # On Darwin we can use 64-bit instructions with a longlong limb,
4864 # but the chip still in 32-bit mode.
4865 # In theory this can be used on any OS which knows how to save
4866 # 64-bit registers in a context switch.
4867 #
4868 # Note that we must use -mpowerpc64 with gcc, since the
4869 # longlong.h macros expect limb operands in a single 64-bit
4870 # register, not two 32-bit registers as would be given for a
4871 # long long without -mpowerpc64. In theory we could detect and
4872 # accommodate both styles, but the proper 64-bit registers will
4873 # be fastest and are what we really want to use.
4874 #
4875 # One would think -mpowerpc64 would set the assembler in the right
4876 # mode to handle 64-bit instructions. But for that, also
4877 # -force_cpusubtype_ALL is needed.
4878 #
4879 # Do not use -fast for Darwin, it actually adds options
4880 # incompatible with a shared library.
4881 #
4882 abilist="mode64 mode32 $abilist"
4883 gcc_cflags_opt="-O2 -O1" # will this become used?
4884 cclist_mode32="gcc"
4885 gcc_mode32_cflags_maybe="-m32"
4886 gcc_mode32_cflags="-mpowerpc64"
4887 gcc_mode32_cflags_optlist="subtype cpu opt"
4888 gcc_mode32_cflags_subtype="-force_cpusubtype_ALL"
4889 gcc_mode32_cflags_opt="-O2 -O1"
4890 limb_mode32=longlong
4891 cclist_mode64="gcc"
4892 gcc_mode64_cflags="-m64"
4893 gcc_mode64_cflags_optlist="cpu opt"
4894 gcc_mode64_cflags_opt="-O2 -O1"
4895 path_mode64=""
4896 path_mode32=""
4897 p=""
4898 for i in $cpu_path
4899 do path_mode64="${path_mode64}powerpc64/mode64/$i "
4900 path_mode64="${path_mode64}powerpc64/$i "
4901 path_mode32="${path_mode32}powerpc64/mode32/$i "
4902 path_mode32="${path_mode32}powerpc64/$i "
4903 p="${p} powerpc32/$i "
4904 done
4905 path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64"
4906 path_mode32="${path_mode32}powerpc64/mode32 $vmx_path powerpc64"
4907 path="$p $path"
4908 SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo
4909 cyclecounter_size_mode64=0
4910 any_mode64_testlist="sizeof-long-8"
4911 ;;
4912 *-*-linux* | *-*-*bsd*)
4913 # On GNU/Linux, assume the processor is in 64-bit mode. Some
4914 # environments have a gcc that is always in 64-bit mode, while
4915 # others require -m64, hence the use of cflags_maybe. The
4916 # sizeof-long-8 test checks the mode is right (for the no option
4917 # case).
4918 #
4919 # -mpowerpc64 is not used, since it should be the default in
4920 # 64-bit mode. (We need its effect for the various longlong.h
4921 # asm macros to be right of course.)
4922 #
4923 # gcc64 was an early port of gcc to 64-bit mode, but should be
4924 # obsolete before too long. We prefer plain gcc when it knows
4925 # 64-bits.
4926 #
4927 abilist="mode64 mode32 $abilist"
4928 cclist_mode32="gcc"
4929 gcc_mode32_cflags_maybe="-m32"
4930 gcc_mode32_cflags="-mpowerpc64"
4931 gcc_mode32_cflags_optlist="cpu opt"
4932 gcc_mode32_cflags_opt="-O2 -O1"
4933 limb_mode32=longlong
4934 cclist_mode64="gcc gcc64"
4935 gcc_mode64_cflags_maybe="-m64"
4936 gcc_mode64_cflags_optlist="cpu opt"
4937 gcc_mode64_cflags_opt="-O2 -O1"
4938 path_mode64=""
4939 path_mode32=""
4940 p=""
4941 for i in $cpu_path
4942 do path_mode64="${path_mode64}powerpc64/mode64/$i "
4943 path_mode64="${path_mode64}powerpc64/$i "
4944 path_mode32="${path_mode32}powerpc64/mode32/$i "
4945 path_mode32="${path_mode32}powerpc64/$i "
4946 p="${p} powerpc32/$i "
4947 done
4948 path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64"
4949 path_mode32="${path_mode32}powerpc64/mode32 $vmx_path powerpc64"
4950 path="$p $path"
4951 SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo
4952 cyclecounter_size_mode64=0
4953 any_mode64_testlist="sizeof-long-8"
4954 ;;
4955 esac
4956 ;;
4957 esac
4958 ;;
4959
4960
4961 # POWER 32-bit
4962 power-*-* | power[12]-*-* | power2sc-*-*)
4963 $as_echo "#define HAVE_HOST_CPU_FAMILY_power 1" >>confdefs.h
4964
4965 HAVE_HOST_CPU_FAMILY_power=1
4966 cclist="gcc"
4967 if test "$enable_assembly" = "yes" ; then
4968 extra_functions="udiv_w_sdiv"
4969 fi
4970 path="power"
4971
4972 # gcc 2.7.2 knows rios1, rios2, rsc
4973 #
4974 # -mcpu=rios2 can tickle an AIX assembler bug (see GMP_PROG_CC_WORKS) so
4975 # there needs to be a fallback to just -mpower.
4976 #
4977 gcc_cflags_optlist="cpu"
4978 case $host in
4979 power-*-*) gcc_cflags_cpu="-mcpu=power -mpower" ;;
4980 power1-*-*) gcc_cflags_cpu="-mcpu=rios1 -mpower" ;;
4981 power2-*-*) gcc_cflags_cpu="-mcpu=rios2 -mpower" ;;
4982 power2sc-*-*) gcc_cflags_cpu="-mcpu=rsc -mpower" ;;
4983 esac
4984 case $host in
4985 *-*-aix*)
4986 cclist="gcc xlc"
4987 xlc_cflags="-O2 -qarch=pwr -qmaxmem=20000"
4988 ;;
4989 esac
4990 ;;
4991
4992
4993 # RISC-V
4994 riscv64-*-*)
4995 cclist="gcc"
4996 path="riscv/64"
4997 ;;
4998
4999
5000 # IBM System/390 and z/Architecture
5001 s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-* | s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*)
5002 abilist="32"
5003 gcc_cflags="$gcc_cflags $fomit_frame_pointer"
5004 gcc_cflags_optlist="arch"
5005 path="s390_32"
5006 if test "$enable_assembly" = "yes" ; then
5007 extra_functions="udiv_w_sdiv"
5008 fi
5009 gcc_32_cflags_maybe="-m31"
5010
5011 case $host_cpu in
5012 s390)
5013 ;;
5014 z900 | z900esa)
5015 cpu="z900"
5016 gccarch="$cpu"
5017 path="s390_32/esame/$cpu s390_32/esame s390_32"
5018 gcc_cflags_arch="-march=$gccarch"
5019 cat >>confdefs.h <<_ACEOF
5020#define HAVE_HOST_CPU_s390_$cpu 1
5021_ACEOF
5022
5023 $as_echo "#define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h
5024
5025 extra_functions=""
5026 ;;
5027 z990 | z990esa)
5028 cpu="z990"
5029 gccarch="$cpu"
5030 path="s390_32/esame/$cpu s390_32/esame s390_32"
5031 gcc_cflags_arch="-march=$gccarch"
5032 cat >>confdefs.h <<_ACEOF
5033#define HAVE_HOST_CPU_s390_$cpu 1
5034_ACEOF
5035
5036 $as_echo "#define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h
5037
5038 extra_functions=""
5039 ;;
5040 z9 | z9esa)
5041 cpu="z9"
5042 gccarch="z9-109"
5043 path="s390_32/esame/$cpu s390_32/esame s390_32"
5044 gcc_cflags_arch="-march=$gccarch"
5045 cat >>confdefs.h <<_ACEOF
5046#define HAVE_HOST_CPU_s390_$cpu 1
5047_ACEOF
5048
5049 $as_echo "#define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h
5050
5051 extra_functions=""
5052 ;;
5053 z10 | z10esa)
5054 cpu="z10"
5055 gccarch="z10"
5056 path="s390_32/esame/$cpu s390_32/esame s390_32"
5057 gcc_cflags_arch="-march=$gccarch"
5058 cat >>confdefs.h <<_ACEOF
5059#define HAVE_HOST_CPU_s390_$cpu 1
5060_ACEOF
5061
5062 $as_echo "#define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h
5063
5064 extra_functions=""
5065 ;;
5066 z196 | z196esa)
5067 cpu="z196"
5068 gccarch="z196"
5069 path="s390_32/esame/$cpu s390_32/esame s390_32"
5070 gcc_cflags_arch="-march=$gccarch"
5071 cat >>confdefs.h <<_ACEOF
5072#define HAVE_HOST_CPU_s390_$cpu 1
5073_ACEOF
5074
5075 $as_echo "#define HAVE_HOST_CPU_s390_zarch 1" >>confdefs.h
5076
5077 extra_functions=""
5078 ;;
5079 esac
5080
5081 case $host in
5082 s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*)
5083 abilist="64 32"
5084 cclist_64="gcc"
5085 gcc_64_cflags_optlist="arch"
5086 gcc_64_cflags="$gcc_cflags -m64"
5087 path_64="s390_64/$host_cpu s390_64"
5088 extra_functions=""
5089 ;;
5090 esac
5091 ;;
5092
5093
5094 sh-*-*) path="sh" ;;
5095 sh[2-4]-*-*) path="sh/sh2 sh" ;;
5096
5097
5098 *sparc*-*-*)
5099 # sizeof(long)==4 or 8 is tested, to ensure we get the right ABI. We've
5100 # had various bug reports where users have set CFLAGS for their desired
5101 # mode, but not set our ABI. For some reason it's sparc where this
5102 # keeps coming up, presumably users there are accustomed to driving the
5103 # compiler mode that way. The effect of our testlist setting is to
5104 # reject ABI=64 in favour of ABI=32 if the user has forced the flags to
5105 # 32-bit mode.
5106 #
5107 abilist="32"
5108 cclist="gcc acc cc"
5109 any_testlist="sizeof-long-4"
5110
5111echo "include_mpn(\`sparc32/sparc-defs.m4')" >> $gmp_tmpconfigm4i
5112
5113
5114 case $host_cpu in
5115 sparcv8 | microsparc | turbosparc)
5116 path="sparc32/v8 sparc32" ;;
5117 supersparc)
5118 path="sparc32/v8/supersparc sparc32/v8 sparc32" ;;
5119 sparc64 | sparcv9* | ultrasparc | ultrasparc[234]*)
5120 path="sparc32/v9 sparc32/v8 sparc32" ;;
5121 ultrasparct[12345])
5122 path="sparc32/ultrasparct1 sparc32/v8 sparc32" ;;
5123 *)
5124 path="sparc32" ;;
5125 esac
5126
5127 # gcc 2.7.2 doesn't know about v9 and doesn't pass -xarch=v8plus to the
5128 # assembler. Add it explicitly since the solaris assembler won't accept
5129 # our sparc32/v9 asm code without it. gas accepts -xarch=v8plus too, so
5130 # it can be in the cflags unconditionally (though gas doesn't need it).
5131 #
5132 # gcc -m32 is needed to force 32-bit mode on a dual-ABI system, but past
5133 # gcc doesn't know that flag, hence cflags_maybe. Note that -m32 cannot
5134 # be done through the optlist since the plain cflags would be run first
5135 # and we don't want to require the default mode (whatever it is) works.
5136 #
5137 # Note it's gcc_32_cflags_maybe and not gcc_cflags_maybe because the
5138 # latter would be used in the 64-bit ABI on systems like "*bsd" where
5139 # abilist="64" only.
5140 #
5141 gcc_32_cflags_maybe="-m32"
5142 gcc_cflags_optlist="cpu asm"
5143
5144 # gcc 2.7.2 knows -mcypress, -msupersparc, -mv8, -msparclite.
5145 # gcc 2.95 knows -mcpu= v7, hypersparc, sparclite86x, f930, f934,
5146 # sparclet, tsc701, v9, ultrasparc. A warning is given that the
5147 # plain -m forms will disappear.
5148 # gcc 3.3 adds ultrasparc3.
5149 #
5150 case $host_cpu in
5151 supersparc*)
5152 gcc_cflags_cpu="-mcpu=supersparc -msupersparc"
5153 gcc_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8";;
5154 sparcv8 | microsparc* | turbosparc | hypersparc*)
5155 gcc_cflags_cpu="-mcpu=v8 -mv8"
5156 gcc_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8";;
5157 sparc64 | sparcv9*)
5158 gcc_cflags_cpu="-mcpu=v9"
5159 gcc_32_cflags_asm="-Wa,-Av8 -Wa,-xarch=v8plus"
5160 gcc_64_cflags_asm="-Wa,-Av9 -Wa,-xarch=v9";;
5161 ultrasparc1 | ultrasparc2*)
5162 gcc_cflags_cpu="-mcpu=ultrasparc -mcpu=v9"
5163 gcc_32_cflags_asm="-Wa,-Av8plusa -Wa,-xarch=v8plusa"
5164 gcc_64_cflags_asm="-Wa,-Av9a -Wa,-xarch=v9a";;
5165 ultrasparc[34])
5166 gcc_cflags_cpu="-mcpu=ultrasparc3 -mcpu=ultrasparc -mcpu=v9"
5167 gcc_32_cflags_asm="-Wa,-Av8plusb -Wa,-xarch=v8plusb"
5168 gcc_64_cflags_asm="-Wa,-Av9b -Wa,-xarch=v9b";;
5169 ultrasparct[12])
5170 gcc_cflags_cpu="-mcpu=niagara -mcpu=v9"
5171 gcc_32_cflags_asm="-Wa,-Av8plusc -Wa,-xarch=v8plusc"
5172 gcc_64_cflags_asm="-Wa,-Av9c -Wa,-xarch=v9c";;
5173 ultrasparct3)
5174 gcc_cflags_cpu="-mcpu=niagara3 -mcpu=niagara -mcpu=v9"
5175 gcc_32_cflags_asm="-Wa,-Av8plusd -Wa,-xarch=v8plusd"
5176 gcc_64_cflags_asm="-Wa,-Av9d -Wa,-xarch=v9d";;
5177 ultrasparct[45])
5178 gcc_cflags_cpu="-mcpu=niagara4 -mcpu=niagara3 -mcpu=niagara -mcpu=v9"
5179 gcc_32_cflags_asm="-Wa,-Av8plusd -Wa,-xarch=v8plusd"
5180 gcc_64_cflags_asm="-Wa,-Av9d -Wa,-xarch=v9d";;
5181 *)
5182 gcc_cflags_cpu="-mcpu=v7 -mcypress"
5183 gcc_cflags_asm="";;
5184 esac
5185
5186 # SunPRO cc and acc, and SunOS bundled cc
5187 case $host in
5188 *-*-solaris* | *-*-sunos*)
5189 # Note no -g, it disables all optimizations.
5190 cc_cflags=
5191 cc_cflags_optlist="opt arch cpu"
5192
5193 # SunOS <= 4 cc doesn't know -xO3, fallback to -O2.
5194 cc_cflags_opt="-xO3 -O2"
5195
5196 # SunOS cc doesn't know -xarch, apparently always generating v7
5197 # code, so make this optional
5198 case $host_cpu in
5199 sparcv8 | microsparc* | supersparc* | turbosparc | hypersparc*)
5200 cc_cflags_arch="-xarch=v8";;
5201 ultrasparct[345])
5202 cc_cflags_arch="-xarch=v8plusd" ;;
5203 sparc64 | sparcv9* | ultrasparc*)
5204 cc_cflags_arch="-xarch=v8plus" ;;
5205 *)
5206 cc_cflags_arch="-xarch=v7" ;;
5207 esac
5208
5209 # SunOS cc doesn't know -xchip and doesn't seem to have an equivalent.
5210 # SunPRO cc 5 recognises -xchip=generic, old, super, super2, micro,
5211 # micro2, hyper, hyper2, powerup, ultra, ultra2, ultra2i.
5212 # SunPRO cc 6 adds -xchip=ultra2e, ultra3cu.
5213 #
5214 case $host_cpu in
5215 supersparc*) cc_cflags_cpu="-xchip=super" ;;
5216 microsparc*) cc_cflags_cpu="-xchip=micro" ;;
5217 turbosparc) cc_cflags_cpu="-xchip=micro2" ;;
5218 hypersparc*) cc_cflags_cpu="-xchip=hyper" ;;
5219 ultrasparc) cc_cflags_cpu="-xchip=ultra" ;;
5220 ultrasparc2) cc_cflags_cpu="-xchip=ultra2 -xchip=ultra" ;;
5221 ultrasparc2i) cc_cflags_cpu="-xchip=ultra2i -xchip=ultra2 -xchip=ultra" ;;
5222 ultrasparc3) cc_cflags_cpu="-xchip=ultra3 -xchip=ultra" ;;
5223 ultrasparc4) cc_cflags_cpu="-xchip=ultra4 -xchip=ultra3 -xchip=ultra" ;;
5224 ultrasparct1) cc_cflags_cpu="-xchip=ultraT1" ;;
5225 ultrasparct2) cc_cflags_cpu="-xchip=ultraT2 -xchip=ultraT1" ;;
5226 ultrasparct3) cc_cflags_cpu="-xchip=ultraT3 -xchip=ultraT2" ;;
5227 ultrasparct4) cc_cflags_cpu="-xchip=T4" ;;
5228 ultrasparct5) cc_cflags_cpu="-xchip=T5 -xchip=T4" ;;
5229 *) cc_cflags_cpu="-xchip=generic" ;;
5230 esac
5231 esac
5232
5233 case $host_cpu in
5234 sparc64 | sparcv9* | ultrasparc*)
5235 case $host in
5236 # Solaris 6 and earlier cannot run ABI=64 since it doesn't save
5237 # registers properly, so ABI=32 is left as the only choice.
5238 #
5239 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
5240
5241 # BSD sparc64 ports are 64-bit-only systems, so ABI=64 is the only
5242 # choice. In fact they need no special compiler flags, gcc -m64
5243 # is the default, but it doesn't hurt to add it. v9 CPUs always
5244 # use the sparc64 port, since the plain 32-bit sparc ports don't
5245 # run on a v9.
5246 #
5247 *-*-*bsd*) abilist="64" ;;
5248
5249 # For all other systems, we try both 64 and 32.
5250 #
5251 # GNU/Linux sparc64 has only recently gained a 64-bit user mode.
5252 # In the past sparc64 meant a v9 cpu, but there were no 64-bit
5253 # operations in user mode. We assume that if "gcc -m64" works
5254 # then the system is suitable. Hopefully even if someone attempts
5255 # to put a new gcc and/or glibc on an old system it won't run.
5256 #
5257 *) abilist="64 32" ;;
5258 esac
5259
5260 case $host_cpu in
5261 ultrasparc | ultrasparc2 | ultrasparc2i)
5262 path_64="sparc64/ultrasparc1234 sparc64" ;;
5263 ultrasparc[34])
5264 path_64="sparc64/ultrasparc34 sparc64/ultrasparc1234 sparc64" ;;
5265 ultrasparct[12])
5266 path_64="sparc64/ultrasparct1 sparc64" ;;
5267 ultrasparct3)
5268 path_64="sparc64/ultrasparct3 sparc64" ;;
5269 ultrasparct[45])
5270 path_64="sparc64/ultrasparct45 sparc64/ultrasparct3 sparc64" ;;
5271 *)
5272 path_64="sparc64"
5273 esac
5274
5275 cclist_64="gcc"
5276 any_64_testlist="sizeof-long-8"
5277
5278 # gcc -mptr64 is probably implied by -m64, but we're not sure if
5279 # this was always so. On Solaris in the past we always used both
5280 # "-m64 -mptr64".
5281 #
5282 # gcc -Wa,-xarch=v9 is thought to be necessary in some cases on
5283 # solaris, but it would seem likely that if gcc is going to generate
5284 # 64-bit code it will have to add that option itself where needed.
5285 # An extra copy of this option should be harmless though, but leave
5286 # it until we're sure. (Might want -xarch=v9a or -xarch=v9b for the
5287 # higher cpu types instead.)
5288 #
5289 gcc_64_cflags="$gcc_cflags -m64 -mptr64"
5290 gcc_64_ldflags="-Wc,-m64"
5291 gcc_64_cflags_optlist="cpu asm"
5292
5293 case $host in
5294 *-*-solaris*)
5295 # Sun cc.
5296 #
5297 # We used to have -fast and some fixup options here, but it
5298 # recurrently caused problems with miscompilation. Of course,
5299 # -fast is documented as miscompiling things for the sake of speed.
5300 #
5301 cclist_64="$cclist_64 cc"
5302 cc_64_cflags_optlist="cpu"
5303 case $host_cpu in
5304 ultrasparct[345])
5305 cc_64_cflags="$cc_64_cflags -xO3 -xarch=v9d" ;;
5306 *)
5307 cc_64_cflags="-xO3 -xarch=v9" ;;
5308 esac
5309 ;;
5310 esac
5311
5312 # using the v9 %tick register
5313 SPEED_CYCLECOUNTER_OBJ_32=sparcv9.lo
5314 SPEED_CYCLECOUNTER_OBJ_64=sparcv9.lo
5315 cyclecounter_size_32=2
5316 cyclecounter_size_64=2
5317 ;;
5318 esac
5319 ;;
5320
5321
5322 # VAX
5323 vax*-*-*elf*)
5324 # Use elf conventions (i.e., '%' register prefix, no global prefix)
5325 #
5326
5327echo "include_mpn(\`vax/elf.m4')" >> $gmp_tmpconfigm4i
5328
5329 gcc_cflags="$gcc_cflags $fomit_frame_pointer"
5330 path="vax"
5331 if test "$enable_assembly" = "yes" ; then
5332 extra_functions="udiv_w_sdiv"
5333 fi
5334 ;;
5335 vax*-*-*)
5336 # Default to aout conventions (i.e., no register prefix, '_' global prefix)
5337 #
5338 gcc_cflags="$gcc_cflags $fomit_frame_pointer"
5339 path="vax"
5340 if test "$enable_assembly" = "yes" ; then
5341 extra_functions="udiv_w_sdiv"
5342 fi
5343 ;;
5344
5345
5346 # AMD and Intel x86 configurations, including AMD64
5347 #
5348 # Rumour has it gcc -O2 used to give worse register allocation than just
5349 # -O, but lets assume that's no longer true.
5350 #
5351 # -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc. -m64 is
5352 # the default in such a build (we think), so -m32 is essential for ABI=32.
5353 # This is, of course, done for any $host_cpu, not just x86_64, so we can
5354 # get such a gcc into the right mode to cross-compile to say i486-*-*.
5355 #
5356 # -m32 is not available in gcc 2.95 and earlier, hence cflags_maybe to use
5357 # it when it works. We check sizeof(long)==4 to ensure we get the right
5358 # mode, in case -m32 has failed not because it's an old gcc, but because
5359 # it's a dual 32/64-bit gcc without a 32-bit libc, or whatever.
5360 #
5361 i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | zen*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | kabylake*-*-*)
5362 abilist="32"
5363 cclist="gcc icc cc"
5364 gcc_cflags="$gcc_cflags $fomit_frame_pointer"
5365 gcc_32_cflags_maybe="-m32"
5366 icc_cflags="-no-gcc"
5367 icc_cflags_optlist="opt"
5368 icc_cflags_opt="-O3 -O2 -O1"
5369 icc_cflags_opt_maybe="-fp-model~precise"
5370 any_32_testlist="sizeof-long-4"
5371 gcc_cflags_optlist="cpu arch noavx"
5372 CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo'
5373
5374 # Availability of rdtsc is checked at run-time.
5375 SPEED_CYCLECOUNTER_OBJ=pentium.lo
5376
5377 # Set to "yes" below on a per-cpu basis. We do that in order to allow for
5378 # a relevant warning to be output when using a CPU with mulx on a system
5379 # which cannot assemble it.
5380 x86_have_mulx=no
5381
5382 # gcc 2.7.2 only knows i386 and i486, using -m386 or -m486. These
5383 # represent -mcpu= since -m486 doesn't generate 486 specific insns.
5384 # gcc 2.95 adds k6, pentium and pentiumpro, and takes -march= and -mcpu=.
5385 # gcc 3.0 adds athlon.
5386 # gcc 3.1 adds k6-2, k6-3, pentium-mmx, pentium2, pentium3, pentium4,
5387 # athlon-tbird, athlon-4, athlon-xp, athlon-mp.
5388 # gcc 3.2 adds winchip2.
5389 # gcc 3.3 adds winchip-c6.
5390 # gcc 3.3.1 from mandrake adds k8 and knows -mtune.
5391 # gcc 3.4 adds c3, c3-2, k8, and deprecates -mcpu in favour of -mtune.
5392 #
5393 # In gcc 2.95.[0123], -march=pentiumpro provoked a stack slot bug in an
5394 # old version of mpz/powm.c. Seems to be fine with the current code, so
5395 # no need for any restrictions on that option.
5396 #
5397 # -march=pentiumpro can fail if the assembler doesn't know "cmov"
5398 # (eg. solaris 2.8 native "as"), so always have -march=pentium after
5399 # that as a fallback.
5400 #
5401 # -march=pentium4 and -march=k8 enable SSE2 instructions, which may or
5402 # may not be supported by the assembler and/or the OS, and is bad in gcc
5403 # prior to 3.3. The tests will reject these if no good, so fallbacks
5404 # like "-march=pentium4 -mno-sse2" are given to try also without SSE2.
5405 # Note the relevant -march types are listed in the optflags handling
5406 # below, be sure to update there if adding new types emitting SSE2.
5407 #
5408 # -mtune is used at the start of each cpu option list to give something
5409 # gcc 3.4 will use, thereby avoiding warnings from -mcpu. -mcpu forms
5410 # are retained for use by prior gcc. For example pentium has
5411 # "-mtune=pentium -mcpu=pentium ...", the -mtune is for 3.4 and the
5412 # -mcpu for prior. If there's a brand new choice in 3.4 for a chip,
5413 # like k8 for x86_64, then it can be the -mtune at the start, no need to
5414 # duplicate anything.
5415 #
5416 case $host_cpu in
5417 i386*)
5418 gcc_cflags_cpu="-mtune=i386 -mcpu=i386 -m386"
5419 gcc_cflags_arch="-march=i386"
5420 path="x86"
5421 ;;
5422 i486*)
5423 gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486"
5424 gcc_cflags_arch="-march=i486"
5425 path="x86/i486 x86"
5426 ;;
5427 i586 | pentium)
5428 gcc_cflags_cpu="-mtune=pentium -mcpu=pentium -m486"
5429 gcc_cflags_arch="-march=pentium"
5430 path="x86/pentium x86"
5431 ;;
5432 pentiummmx)
5433 gcc_cflags_cpu="-mtune=pentium-mmx -mcpu=pentium-mmx -mcpu=pentium -m486"
5434 gcc_cflags_arch="-march=pentium-mmx -march=pentium"
5435 path="x86/pentium/mmx x86/pentium x86/mmx x86"
5436 ;;
5437 i686 | pentiumpro)
5438 gcc_cflags_cpu="-mtune=pentiumpro -mcpu=pentiumpro -mcpu=i486 -m486"
5439 gcc_cflags_arch="-march=pentiumpro -march=pentium"
5440 path="x86/p6 x86"
5441 ;;
5442 pentium2)
5443 gcc_cflags_cpu="-mtune=pentium2 -mcpu=pentium2 -mcpu=pentiumpro -mcpu=i486 -m486"
5444 gcc_cflags_arch="-march=pentium2 -march=pentiumpro -march=pentium"
5445 path="x86/p6/mmx x86/p6 x86/mmx x86"
5446 ;;
5447 pentium3)
5448 gcc_cflags_cpu="-mtune=pentium3 -mcpu=pentium3 -mcpu=pentiumpro -mcpu=i486 -m486"
5449 gcc_cflags_arch="-march=pentium3 -march=pentiumpro -march=pentium"
5450 path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5451 ;;
5452 pentiumm)
5453 gcc_cflags_cpu="-mtune=pentium3 -mcpu=pentium3 -mcpu=pentiumpro -mcpu=i486 -m486"
5454 gcc_cflags_arch="-march=pentium3 -march=pentiumpro -march=pentium"
5455 path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5456 ;;
5457 k6)
5458 gcc_cflags_cpu="-mtune=k6 -mcpu=k6 -mcpu=i486 -m486"
5459 gcc_cflags_arch="-march=k6"
5460 path="x86/k6/mmx x86/k6 x86/mmx x86"
5461 ;;
5462 k62)
5463 gcc_cflags_cpu="-mtune=k6-2 -mcpu=k6-2 -mcpu=k6 -mcpu=i486 -m486"
5464 gcc_cflags_arch="-march=k6-2 -march=k6"
5465 path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86"
5466 ;;
5467 k63)
5468 gcc_cflags_cpu="-mtune=k6-3 -mcpu=k6-3 -mcpu=k6 -mcpu=i486 -m486"
5469 gcc_cflags_arch="-march=k6-3 -march=k6"
5470 path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86"
5471 ;;
5472 geode)
5473 gcc_cflags_cpu="-mtune=k6-3 -mcpu=k6-3 -mcpu=k6 -mcpu=i486 -m486"
5474 gcc_cflags_arch="-march=k6-3 -march=k6"
5475 path="x86/geode x86/k6/k62mmx x86/k6/mmx x86/k6 x86/mmx x86"
5476 ;;
5477 athlon)
5478 # Athlon instruction costs are close to P6 (3 cycle load latency,
5479 # 4-6 cycle mul, 40 cycle div, pairable adc, etc) so if gcc doesn't
5480 # know athlon (eg. 2.95.2 doesn't) then fall back on pentiumpro.
5481 gcc_cflags_cpu="-mtune=athlon -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486"
5482 gcc_cflags_arch="-march=athlon -march=pentiumpro -march=pentium"
5483 path="x86/k7/mmx x86/k7 x86/mmx x86"
5484 ;;
5485 i786 | pentium4)
5486 # pentiumpro is the primary fallback when gcc doesn't know pentium4.
5487 # This gets us cmov to eliminate branches. Maybe "athlon" would be
5488 # a possibility on gcc 3.0.
5489 #
5490 gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486"
5491 gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium"
5492 gcc_64_cflags_cpu="-mtune=nocona"
5493 path="x86/pentium4/sse2 x86/pentium4/mmx x86/pentium4 x86/mmx x86"
5494 path_64="x86_64/pentium4 x86_64"
5495 ;;
5496 viac32)
5497 # Not sure of the best fallbacks here for -mcpu.
5498 # c3-2 has sse and mmx, so pentium3 is good for -march.
5499 gcc_cflags_cpu="-mtune=c3-2 -mcpu=c3-2 -mcpu=i486 -m486"
5500 gcc_cflags_arch="-march=c3-2 -march=pentium3 -march=pentiumpro -march=pentium"
5501 path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5502 ;;
5503 viac3*)
5504 # Not sure of the best fallbacks here.
5505 gcc_cflags_cpu="-mtune=c3 -mcpu=c3 -mcpu=i486 -m486"
5506 gcc_cflags_arch="-march=c3 -march=pentium-mmx -march=pentium"
5507 path="x86/pentium/mmx x86/pentium x86/mmx x86"
5508 ;;
5509 athlon64 | k8 | x86_64)
5510 gcc_cflags_cpu="-mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486"
5511 gcc_cflags_arch="-march=k8 -march=k8~-mno-sse2 -march=athlon -march=pentiumpro -march=pentium"
5512 path="x86/k8 x86/k7/mmx x86/k7 x86/mmx x86"
5513 path_64="x86_64/k8 x86_64"
5514 ;;
5515 k10)
5516 gcc_cflags_cpu="-mtune=amdfam10 -mtune=k8"
5517 gcc_cflags_arch="-march=amdfam10 -march=k8 -march=k8~-mno-sse2"
5518 path="x86/k10 x86/k8 x86/k7/mmx x86/k7 x86/mmx x86"
5519 path_64="x86_64/k10 x86_64/k8 x86_64"
5520 ;;
5521 bobcat)
5522 gcc_cflags_cpu="-mtune=btver1 -mtune=amdfam10 -mtune=k8"
5523 gcc_cflags_arch="-march=btver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2"
5524 path="x86/bt1 x86/k7/mmx x86/k7 x86/mmx x86"
5525 path_64="x86_64/bt1 x86_64/k10 x86_64/k8 x86_64"
5526 ;;
5527 jaguar | jaguarnoavx)
5528 gcc_cflags_cpu="-mtune=btver2 -mtune=btver1 -mtune=amdfam10 -mtune=k8"
5529 gcc_cflags_arch="-march=btver2 -march=btver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2"
5530 path="x86/bt2 x86/bt1 x86/k7/mmx x86/k7 x86/mmx x86"
5531 path_64="x86_64/bt2 x86_64/bt1 x86_64/k10 x86_64/k8 x86_64"
5532 ;;
5533 bulldozer | bd1 | bulldozernoavx | bd1noavx)
5534 gcc_cflags_cpu="-mtune=bdver1 -mtune=amdfam10 -mtune=k8"
5535 gcc_cflags_arch="-march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2"
5536 path="x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86"
5537 path_64="x86_64/bd1 x86_64/k10 x86_64/k8 x86_64"
5538 ;;
5539 piledriver | bd2 | piledrivernoavx | bd2noavx)
5540 gcc_cflags_cpu="-mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8"
5541 gcc_cflags_arch="-march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2"
5542 path="x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86"
5543 path_64="x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64"
5544 ;;
5545 steamroller | bd3 | steamrollernoavx | bd3noavx)
5546 gcc_cflags_cpu="-mtune=bdver3 -mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8"
5547 gcc_cflags_arch="-march=bdver3 -march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2"
5548 path="x86/bd3 x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86"
5549 path_64="x86_64/bd3 x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64"
5550 ;;
5551 excavator | bd4 | excavatornoavx | bd4noavx)
5552 gcc_cflags_cpu="-mtune=bdver4 -mtune=bdver3 -mtune=bdver2 -mtune=bdver1 -mtune=amdfam10 -mtune=k8"
5553 gcc_cflags_arch="-march=bdver4 -march=bdver3 -march=bdver2 -march=bdver1 -march=amdfam10 -march=k8 -march=k8~-mno-sse2"
5554 path="x86/bd4 x86/bd3 x86/bd2 x86/bd1 x86/k7/mmx x86/k7 x86/mmx x86"
5555 path_64="x86_64/bd4 x86_64/bd3 x86_64/bd2 x86_64/bd1 x86_64/k10 x86_64/k8 x86_64"
5556 x86_have_mulx=yes
5557 ;;
5558 zen | zennoavx)
5559 gcc_cflags_cpu="-mtune=znver1 -mtune=amdfam10 -mtune=k8"
5560 gcc_cflags_arch="-march=znver1 -march=amdfam10 -march=k8"
5561 path="x86/k7/mmx x86/k7 x86/mmx x86"
5562 x86_have_mulx=yes
5563 path_64="x86_64/zen x86_64"
5564 ;;
5565 zen2 | zen2noavx)
5566 gcc_cflags_cpu="-mtune=znver2 -mtune=znver1 -mtune=amdfam10 -mtune=k8"
5567 gcc_cflags_arch="-march=znver2 -march=znver1 -march=amdfam10 -march=k8"
5568 path="x86/k7/mmx x86/k7 x86/mmx x86"
5569 x86_have_mulx=yes
5570 path_64="x86_64/zen2 x86_64/zen x86_64"
5571 ;;
5572 core2)
5573 gcc_cflags_cpu="-mtune=core2 -mtune=k8"
5574 gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
5575 path="x86/core2 x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5576 path_64="x86_64/core2 x86_64"
5577 ;;
5578 corei | coreinhm | coreiwsm | nehalem | westmere)
5579 gcc_cflags_cpu="-mtune=nehalem -mtune=corei7 -mtune=core2 -mtune=k8"
5580 gcc_cflags_arch="-march=nehalem -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
5581 path="x86/coreinhm x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5582 path_64="x86_64/coreinhm x86_64/core2 x86_64"
5583 ;;
5584 coreisbr | coreisbrnoavx | coreiibr | coreiibrnoavx | \
5585 sandybridge | sandybridgenoavx | ivybridge | ivybridgenoavx)
5586 gcc_cflags_cpu="-mtune=sandybridge -mtune=corei7 -mtune=core2 -mtune=k8"
5587 gcc_cflags_arch="-march=sandybridge -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
5588 path="x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5589 path_64="x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64"
5590 ;;
5591 coreihwl | coreihwlnoavx | haswell | haswellnoavx)
5592 gcc_cflags_cpu="-mtune=haswell -mtune=corei7 -mtune=core2 -mtune=k8"
5593 gcc_cflags_arch="-march=haswell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
5594 path="x86/coreihwl x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5595 path_64="x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64"
5596 x86_have_mulx=yes
5597 ;;
5598 coreibwl | coreibwlnoavx | broadwell | broadwellnoavx)
5599 gcc_cflags_cpu="-mtune=broadwell -mtune=corei7 -mtune=core2 -mtune=k8"
5600 gcc_cflags_arch="-march=broadwell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
5601 path="x86/coreihwl x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5602 path_64="x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64"
5603 # extra_functions_64="missing" # enable for bmi2/adx simulation
5604 x86_have_mulx=yes
5605 ;;
5606 skylake | skylakenoavx | kabylake | kabylakenoavx)
5607 gcc_cflags_cpu="-mtune=skylake -mtune=broadwell -mtune=corei7 -mtune=core2 -mtune=k8"
5608 # Don't pass -march=skylake for now as then some compilers emit AVX512.
5609 gcc_cflags_arch="-march=broadwell -march=corei7 -march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2"
5610 path="x86/coreihwl x86/coreisbr x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86/mmx x86"
5611 path_64="x86_64/skylake x86_64/coreibwl x86_64/coreihwl x86_64/coreisbr x86_64/coreinhm x86_64/core2 x86_64"
5612 # extra_functions_64="missing" # enable for bmi2/adx simulation
5613 x86_have_mulx=yes
5614 ;;
5615 atom) # in-order pipeline atom
5616 gcc_cflags_cpu="-mtune=atom -mtune=pentium3"
5617 gcc_cflags_arch="-march=atom -march=pentium3"
5618 path="x86/atom/sse2 x86/atom/mmx x86/atom x86/mmx x86"
5619 path_64="x86_64/atom x86_64"
5620 ;;
5621 silvermont) # out-of-order pipeline atom
5622 gcc_cflags_cpu="-mtune=slm -mtune=atom -mtune=pentium3"
5623 gcc_cflags_arch="-march=slm -march=atom -march=pentium3"
5624 path="x86/silvermont x86/atom/sse2 x86/atom/mmx x86/atom x86/mmx x86"
5625 path_64="x86_64/silvermont x86_64/atom x86_64"
5626 ;;
5627 goldmont) # out-of-order pipeline atom
5628 gcc_cflags_cpu="-mtune=slm -mtune=atom -mtune=pentium3"
5629 gcc_cflags_arch="-march=slm -march=atom -march=pentium3"
5630 path="x86/goldmont x86/atom/sse2 x86/atom/mmx x86/atom x86/mmx x86"
5631 path_64="x86_64/goldmont x86_64/silvermont x86_64/atom x86_64"
5632 ;;
5633 nano)
5634 gcc_cflags_cpu="-mtune=nano"
5635 gcc_cflags_arch="-march=nano"
5636 path="x86/nano x86/mmx x86"
5637 path_64="x86_64/nano x86_64"
5638 ;;
5639 *)
5640 gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486"
5641 gcc_cflags_arch="-march=i486"
5642 path="x86"
5643 path_64="x86_64"
5644 ;;
5645 esac
5646
5647 case $host in
5648 # Disable AVX if the CPU part tells us AVX is unavailable, but also
5649 # unconditionally for NetBSD where they don't work but OSXSAVE is set
5650 # to claim the contrary.
5651 *noavx-*-* | *-*-netbsd*)
5652 gcc_cflags_noavx="-mno-avx"
5653
5654echo "define(<GMP_AVX_NOT_REALLY_AVAILABLE>,1)" >> $gmp_tmpconfigm4
5655
5656 ;;
5657 esac
5658
5659 case $host in
5660 athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | zen*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | kabylake*-*-*)
5661 cclist_64="gcc cc"
5662 gcc_64_cflags="$gcc_cflags -m64"
5663 gcc_64_cflags_optlist="cpu arch noavx"
5664 CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo'
5665 SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo
5666 cyclecounter_size_64=2
5667
5668 cclist_x32="gcc cc"
5669 gcc_x32_cflags="$gcc_cflags -mx32"
5670 gcc_x32_cflags_optlist="$gcc_64_cflags_optlist"
5671 CALLING_CONVENTIONS_OBJS_x32="$CALLING_CONVENTIONS_OBJS_64"
5672 SPEED_CYCLECOUNTER_OBJ_x32="$SPEED_CYCLECOUNTER_OBJ_64"
5673 cyclecounter_size_x32="$cyclecounter_size_64"
5674 path_x32="$path_64"
5675 limb_x32=longlong
5676 any_x32_testlist="sizeof-long-4"
5677
5678 abilist="64 x32 32"
5679 if test "$enable_assembly" = "yes" ; then
5680 extra_functions_64="$extra_functions_64 invert_limb_table"
5681 extra_functions_x32=$extra_functions_64
5682 fi
5683
5684 case $host in
5685 *-*-solaris*)
5686 # Sun cc.
5687 cc_64_cflags="-xO3 -m64"
5688 ;;
5689 *-*-mingw* | *-*-cygwin)
5690 limb_64=longlong
5691 CALLING_CONVENTIONS_OBJS_64=""
5692
5693$as_echo "#define HOST_DOS64 1" >>confdefs.h
5694
5695 GMP_NONSTD_ABI_64=DOS64
5696 ;;
5697 esac
5698 ;;
5699 esac
5700 ;;
5701
5702
5703 # Special CPU "none" used to select generic C, now this is obsolete.
5704 none-*-*)
5705 enable_assembly=no
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the \"none\" host is obsolete, use --disable-assembly" >&5
5707$as_echo "$as_me: WARNING: the \"none\" host is obsolete, use --disable-assembly" >&2;}
5708 ;;
5709
5710esac
5711
5712# mingw can be built by the cygwin gcc if -mno-cygwin is added. For
5713# convenience add this automatically if it works. Actual mingw gcc accepts
5714# -mno-cygwin too, but of course is the default. mingw only runs on the
5715# x86s, but allow any CPU here so as to catch "none" too.
5716#
5717case $host in
5718 *-*-mingw*)
5719 gcc_cflags_optlist="$gcc_cflags_optlist nocygwin"
5720 gcc_cflags_nocygwin="-mno-cygwin"
5721 ;;
5722esac
5723
5724
5725CFLAGS_or_unset=${CFLAGS-'(unset)'}
5726CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
5727
5728cat >&5 <<EOF
5729User:
5730ABI=$ABI
5731CC=$CC
5732CFLAGS=$CFLAGS_or_unset
5733CPPFLAGS=$CPPFLAGS_or_unset
5734MPN_PATH=$MPN_PATH
5735GMP:
5736abilist=$abilist
5737cclist=$cclist
5738EOF
5739
5740
5741test_CFLAGS=${CFLAGS+set}
5742test_CPPFLAGS=${CPPFLAGS+set}
5743
5744for abi in $abilist; do
5745 abi_last="$abi"
5746done
5747
5748# If the user specifies an ABI then it must be in $abilist, after that
5749# $abilist is restricted to just that choice.
5750#
5751if test -n "$ABI"; then
5752 found=no
5753 for abi in $abilist; do
5754 if test $abi = "$ABI"; then found=yes; break; fi
5755 done
5756 if test $found = no; then
5757 as_fn_error $? "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5
5758 fi
5759 abilist="$ABI"
5760fi
5761
5762found_compiler=no
5763
5764for abi in $abilist; do
5765
5766 echo "checking ABI=$abi"
5767
5768 # Suppose abilist="64 32", then for abi=64, will have abi1="_64" and
5769 # abi2="_64". For abi=32, will have abi1="_32" and abi2="". This is how
5770 # $gcc_cflags becomes a fallback for $gcc_32_cflags (the last in the
5771 # abilist), but there's no fallback for $gcc_64_cflags.
5772 #
5773 abi1=`echo _$abi | sed 's/[.]//g'`
5774 if test $abi = $abi_last; then abi2=; else abi2="$abi1"; fi
5775
5776 # Compiler choices under this ABI
5777 eval cclist_chosen=\"\$cclist$abi1\"
5778 test -n "$cclist_chosen" || eval cclist_chosen=\"\$cclist$abi2\"
5779
5780 # If there's a user specified $CC then don't use a list for
5781 # $cclist_chosen, just a single value for $ccbase.
5782 #
5783 if test -n "$CC"; then
5784
5785 # The first word of $CC, stripped of any directory. For instance
5786 # CC="/usr/local/bin/gcc -pipe" will give "gcc".
5787 #
5788 for ccbase in $CC; do break; done
5789 ccbase=`echo $ccbase | sed 's:.*/::'`
5790
5791 # If this $ccbase is in $cclist_chosen then it's a compiler we know and
5792 # we can do flags defaulting with it. If not, then $cclist_chosen is
5793 # set to "unrecognised" so no default flags are used.
5794 #
5795 # "unrecognised" is used to avoid bad effects with eval if $ccbase has
5796 # non-symbol characters. For instance ccbase=my+cc would end up with
5797 # something like cflags="$my+cc_cflags" which would give
5798 # cflags="+cc_cflags" rather than the intended empty string for an
5799 # unknown compiler.
5800 #
5801 found=unrecognised
5802 for i in $cclist_chosen; do
5803 if test "$ccbase" = $i; then
5804 found=$ccbase
5805 break
5806 fi
5807 done
5808 cclist_chosen=$found
5809 fi
5810
5811 for ccbase in $cclist_chosen; do
5812
5813 # When cross compiling, look for a compiler with the $host_alias as a
5814 # prefix, the same way that AC_CHECK_TOOL does. But don't do this to a
5815 # user-selected $CC.
5816 #
5817 # $cross_compiling will be yes/no/maybe at this point. Do the host
5818 # prefixing for "maybe" as well as "yes".
5819 #
5820 if test "$cross_compiling" != no && test -z "$CC"; then
5821 cross_compiling_prefix="${host_alias}-"
5822 fi
5823
5824 for ccprefix in $cross_compiling_prefix ""; do
5825
5826 cc="$CC"
5827 test -n "$cc" || cc="$ccprefix$ccbase"
5828
5829 # If the compiler is gcc but installed under another name, then change
5830 # $ccbase so as to use the flags we know for gcc. This helps for
5831 # instance when specifying CC=gcc272 on Debian GNU/Linux, or the
5832 # native cc which is really gcc on NeXT or MacOS-X.
5833 #
5834 # FIXME: There's a slight misfeature here. If cc is actually gcc but
5835 # gcc is not a known compiler under this $abi then we'll end up
5836 # testing it with no flags and it'll work, but chances are it won't be
5837 # in the right mode for the ABI we desire. Let's quietly hope this
5838 # doesn't happen.
5839 #
5840 if test $ccbase != gcc; then
5841 cat >conftest.c <<EOF
5842#if ! defined (__GNUC__) || defined (__INTEL_COMPILER)
5843 choke me
5844#endif
5845EOF
5846gmp_compile="$cc -c conftest.c >&5"
5847if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
5848 (eval $gmp_compile) 2>&5
5849 ac_status=$?
5850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5851 test $ac_status = 0; }; then
5852 rm -f conftest*
5853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $cc is gcc" >&5
5854$as_echo_n "checking whether $cc is gcc... " >&6; }
5855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5856$as_echo "yes" >&6; }
5857 ccbase=gcc
5858else
5859 rm -f conftest*
5860 :
5861fi
5862
5863 fi
5864
5865 # Similarly if the compiler is IBM xlc but invoked as cc or whatever
5866 # then change $ccbase and make the default xlc flags available.
5867 if test $ccbase != xlc; then
5868 gmp_command="$cc 2>&1 | grep xlc >/dev/null"
5869if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_command\""; } >&5
5870 (eval $gmp_command) 2>&5
5871 ac_status=$?
5872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5873 test $ac_status = 0; }; then
5874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $cc is xlc" >&5
5875$as_echo_n "checking whether $cc is xlc... " >&6; }
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5877$as_echo "yes" >&6; }
5878 ccbase=xlc
5879else
5880 :
5881fi
5882
5883 fi
5884
5885 # acc was Sun's first unbundled compiler back in the SunOS days, or
5886 # something like that, but today its man page says it's not meant to
5887 # be used directly (instead via /usr/ucb/cc). The options are pretty
5888 # much the same as the main SunPRO cc, so share those configs.
5889 #
5890 case $host in
5891 *sparc*-*-solaris* | *sparc*-*-sunos*)
5892 if test "$ccbase" = acc; then ccbase=cc; fi ;;
5893 esac
5894
5895 for tmp_cflags_maybe in yes no; do
5896 eval cflags=\"\$${ccbase}${abi1}_cflags\"
5897 test -n "$cflags" || eval cflags=\"\$${ccbase}${abi2}_cflags\"
5898
5899 if test "$tmp_cflags_maybe" = yes; then
5900 # don't try cflags_maybe when the user set CFLAGS
5901 if test "$test_CFLAGS" = set; then continue; fi
5902 eval cflags_maybe=\"\$${ccbase}${abi1}_cflags_maybe\"
5903 test -n "$cflags_maybe" || eval cflags_maybe=\"\$${ccbase}${abi2}_cflags_maybe\"
5904 # don't try cflags_maybe if there's nothing set
5905 if test -z "$cflags_maybe"; then continue; fi
5906 cflags="$cflags_maybe $cflags"
5907 fi
5908
5909 # Any user CFLAGS, even an empty string, takes precedence
5910 if test "$test_CFLAGS" = set; then cflags=$CFLAGS; fi
5911
5912 # Any user CPPFLAGS, even an empty string, takes precedence
5913 eval cppflags=\"\$${ccbase}${abi1}_cppflags\"
5914 test -n "$cppflags" || eval cppflags=\"\$${ccbase}${abi2}_cppflags\"
5915 if test "$test_CPPFLAGS" = set; then cppflags=$CPPFLAGS; fi
5916
5917 # --enable-profiling adds -p/-pg even to user-specified CFLAGS.
5918 # This is convenient, but it's perhaps a bit naughty to modify user
5919 # CFLAGS.
5920 case "$enable_profiling" in
5921 prof) cflags="$cflags -p" ;;
5922 gprof) cflags="$cflags -pg" ;;
5923 instrument) cflags="$cflags -finstrument-functions" ;;
5924 esac
5925
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags" >&5
5927$as_echo_n "checking compiler $cc $cflags $cppflags... " >&6; }
5928gmp_prog_cc_works=yes
5929
5930# first see a simple "main()" works, then go on to other checks
5931if test "$gmp_prog_cc_works" = yes; then
5932 # remove anything that might look like compiler output to our "||" expression
5933 rm -f conftest* a.out b.out a.exe a_out.exe
5934 cat >conftest.c <<EOF
5935
5936int main () { return 0; }
5937EOF
5938 echo "Test compile: " >&5
5939 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
5940 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
5941 (eval $gmp_compile) 2>&5
5942 ac_status=$?
5943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5944 test $ac_status = 0; }; then
5945 cc_works_part=yes
5946 if test "$cross_compiling" = no; then
5947 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
5948 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
5949 (eval $ac_try) 2>&5
5950 ac_status=$?
5951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5952 test $ac_status = 0; }; }; then :;
5953 else
5954 cc_works_part=norun
5955 fi
5956 fi
5957 else
5958 cc_works_part=no
5959 fi
5960 if test "$cc_works_part" != yes; then
5961 echo "failed program was:" >&5
5962 cat conftest.c >&5
5963 fi
5964 rm -f conftest* a.out b.out a.exe a_out.exe
5965 case $cc_works_part in
5966 yes)
5967
5968 ;;
5969 no)
5970 gmp_prog_cc_works="no"
5971 ;;
5972 norun)
5973 gmp_prog_cc_works="no, program does not run"
5974 ;;
5975 esac
5976fi
5977
5978
5979
5980
5981if test "$gmp_prog_cc_works" = yes; then
5982 # remove anything that might look like compiler output to our "||" expression
5983 rm -f conftest* a.out b.out a.exe a_out.exe
5984 cat >conftest.c <<EOF
5985/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64
5986 (without -maix64), hence detecting an unusable compiler */
5987void *g() { return (void *) 0; }
5988void *f() { return g(); }
5989
5990int main () { return 0; }
5991EOF
5992 echo "Test compile: function pointer return" >&5
5993 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
5994 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
5995 (eval $gmp_compile) 2>&5
5996 ac_status=$?
5997 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5998 test $ac_status = 0; }; then
5999 cc_works_part=yes
6000 if test "$cross_compiling" = no; then
6001 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6002 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6003 (eval $ac_try) 2>&5
6004 ac_status=$?
6005 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6006 test $ac_status = 0; }; }; then :;
6007 else
6008 cc_works_part=norun
6009 fi
6010 fi
6011 else
6012 cc_works_part=no
6013 fi
6014 if test "$cc_works_part" != yes; then
6015 echo "failed program was:" >&5
6016 cat conftest.c >&5
6017 fi
6018 rm -f conftest* a.out b.out a.exe a_out.exe
6019 case $cc_works_part in
6020 yes)
6021
6022 ;;
6023 no)
6024 gmp_prog_cc_works="no, function pointer return"
6025 ;;
6026 norun)
6027 gmp_prog_cc_works="no, function pointer return, program does not run"
6028 ;;
6029 esac
6030fi
6031
6032
6033
6034
6035if test "$gmp_prog_cc_works" = yes; then
6036 # remove anything that might look like compiler output to our "||" expression
6037 rm -f conftest* a.out b.out a.exe a_out.exe
6038 cat >conftest.c <<EOF
6039/* The following provokes an invalid instruction syntax from i386 gcc
6040 -march=pentiumpro on Solaris 2.8. The native sun assembler
6041 requires a non-standard syntax for cmov which gcc (as of 2.95.2 at
6042 least) doesn't know. */
6043int n;
6044int cmov () { return (n >= 0 ? n : 0); }
6045
6046int main () { return 0; }
6047EOF
6048 echo "Test compile: cmov instruction" >&5
6049 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6050 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6051 (eval $gmp_compile) 2>&5
6052 ac_status=$?
6053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6054 test $ac_status = 0; }; then
6055 cc_works_part=yes
6056 if test "$cross_compiling" = no; then
6057 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6058 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6059 (eval $ac_try) 2>&5
6060 ac_status=$?
6061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6062 test $ac_status = 0; }; }; then :;
6063 else
6064 cc_works_part=norun
6065 fi
6066 fi
6067 else
6068 cc_works_part=no
6069 fi
6070 if test "$cc_works_part" != yes; then
6071 echo "failed program was:" >&5
6072 cat conftest.c >&5
6073 fi
6074 rm -f conftest* a.out b.out a.exe a_out.exe
6075 case $cc_works_part in
6076 yes)
6077
6078 ;;
6079 no)
6080 gmp_prog_cc_works="no, cmov instruction"
6081 ;;
6082 norun)
6083 gmp_prog_cc_works="no, cmov instruction, program does not run"
6084 ;;
6085 esac
6086fi
6087
6088
6089
6090
6091if test "$gmp_prog_cc_works" = yes; then
6092 # remove anything that might look like compiler output to our "||" expression
6093 rm -f conftest* a.out b.out a.exe a_out.exe
6094 cat >conftest.c <<EOF
6095/* The following provokes a linker invocation problem with gcc 3.0.3
6096 on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630
6097 option causes gcc to incorrectly select the 32-bit libgcc.a, not
6098 the 64-bit one, and consequently it misses out on the __fixunsdfdi
6099 helper (double -> uint64 conversion). */
6100double d;
6101unsigned long gcc303 () { return (unsigned long) d; }
6102
6103int main () { return 0; }
6104EOF
6105 echo "Test compile: double -> ulong conversion" >&5
6106 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6107 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6108 (eval $gmp_compile) 2>&5
6109 ac_status=$?
6110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6111 test $ac_status = 0; }; then
6112 cc_works_part=yes
6113 if test "$cross_compiling" = no; then
6114 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6115 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6116 (eval $ac_try) 2>&5
6117 ac_status=$?
6118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6119 test $ac_status = 0; }; }; then :;
6120 else
6121 cc_works_part=norun
6122 fi
6123 fi
6124 else
6125 cc_works_part=no
6126 fi
6127 if test "$cc_works_part" != yes; then
6128 echo "failed program was:" >&5
6129 cat conftest.c >&5
6130 fi
6131 rm -f conftest* a.out b.out a.exe a_out.exe
6132 case $cc_works_part in
6133 yes)
6134
6135 ;;
6136 no)
6137 gmp_prog_cc_works="no, double -> ulong conversion"
6138 ;;
6139 norun)
6140 gmp_prog_cc_works="no, double -> ulong conversion, program does not run"
6141 ;;
6142 esac
6143fi
6144
6145
6146
6147
6148if test "$gmp_prog_cc_works" = yes; then
6149 # remove anything that might look like compiler output to our "||" expression
6150 rm -f conftest* a.out b.out a.exe a_out.exe
6151 cat >conftest.c <<EOF
6152/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if
6153 the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0
6154 instruction, and a negation like this comes out using it. */
6155double fneg_data;
6156unsigned long fneg () { return -fneg_data; }
6157
6158int main () { return 0; }
6159EOF
6160 echo "Test compile: double negation" >&5
6161 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6162 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6163 (eval $gmp_compile) 2>&5
6164 ac_status=$?
6165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6166 test $ac_status = 0; }; then
6167 cc_works_part=yes
6168 if test "$cross_compiling" = no; then
6169 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6170 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6171 (eval $ac_try) 2>&5
6172 ac_status=$?
6173 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6174 test $ac_status = 0; }; }; then :;
6175 else
6176 cc_works_part=norun
6177 fi
6178 fi
6179 else
6180 cc_works_part=no
6181 fi
6182 if test "$cc_works_part" != yes; then
6183 echo "failed program was:" >&5
6184 cat conftest.c >&5
6185 fi
6186 rm -f conftest* a.out b.out a.exe a_out.exe
6187 case $cc_works_part in
6188 yes)
6189
6190 ;;
6191 no)
6192 gmp_prog_cc_works="no, double negation"
6193 ;;
6194 norun)
6195 gmp_prog_cc_works="no, double negation, program does not run"
6196 ;;
6197 esac
6198fi
6199
6200
6201
6202
6203if test "$gmp_prog_cc_works" = yes; then
6204 # remove anything that might look like compiler output to our "||" expression
6205 rm -f conftest* a.out b.out a.exe a_out.exe
6206 cat >conftest.c <<EOF
6207/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn
6208 (cvtsd2ss) which will provoke an error if the assembler doesn't recognise
6209 those instructions. Not sure how much of the gmp code will come out
6210 wanting sse2, but it's easiest to reject an option we know is bad. */
6211double ftod_data;
6212float ftod () { return (float) ftod_data; }
6213
6214int main () { return 0; }
6215EOF
6216 echo "Test compile: double -> float conversion" >&5
6217 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6218 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6219 (eval $gmp_compile) 2>&5
6220 ac_status=$?
6221 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6222 test $ac_status = 0; }; then
6223 cc_works_part=yes
6224 if test "$cross_compiling" = no; then
6225 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6226 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6227 (eval $ac_try) 2>&5
6228 ac_status=$?
6229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6230 test $ac_status = 0; }; }; then :;
6231 else
6232 cc_works_part=norun
6233 fi
6234 fi
6235 else
6236 cc_works_part=no
6237 fi
6238 if test "$cc_works_part" != yes; then
6239 echo "failed program was:" >&5
6240 cat conftest.c >&5
6241 fi
6242 rm -f conftest* a.out b.out a.exe a_out.exe
6243 case $cc_works_part in
6244 yes)
6245
6246 ;;
6247 no)
6248 gmp_prog_cc_works="no, double -> float conversion"
6249 ;;
6250 norun)
6251 gmp_prog_cc_works="no, double -> float conversion, program does not run"
6252 ;;
6253 esac
6254fi
6255
6256
6257
6258
6259if test "$gmp_prog_cc_works" = yes; then
6260 # remove anything that might look like compiler output to our "||" expression
6261 rm -f conftest* a.out b.out a.exe a_out.exe
6262 cat >conftest.c <<EOF
6263/* The following provokes an internal compiler error from gcc version
6264 "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char
6265 values being spilled into floating point registers. The problem doesn't
6266 show up all the time, but has occurred enough in GMP for us to reject
6267 this compiler+flags. */
6268#include <string.h> /* for memcpy */
6269struct try_t
6270{
6271 char dst[2];
6272 char size;
6273 long d0, d1, d2, d3, d4, d5, d6;
6274 char overlap;
6275};
6276struct try_t param[6];
6277int
6278param_init ()
6279{
6280 struct try_t *p;
6281 memcpy (p, &param[ 2 ], sizeof (*p));
6282 memcpy (p, &param[ 2 ], sizeof (*p));
6283 p->size = 2;
6284 memcpy (p, &param[ 1 ], sizeof (*p));
6285 p->dst[0] = 1;
6286 p->overlap = 2;
6287 memcpy (p, &param[ 3 ], sizeof (*p));
6288 p->dst[0] = 1;
6289 p->overlap = 8;
6290 memcpy (p, &param[ 4 ], sizeof (*p));
6291 memcpy (p, &param[ 4 ], sizeof (*p));
6292 p->overlap = 8;
6293 memcpy (p, &param[ 5 ], sizeof (*p));
6294 memcpy (p, &param[ 5 ], sizeof (*p));
6295 memcpy (p, &param[ 5 ], sizeof (*p));
6296 return 0;
6297}
6298
6299int main () { return 0; }
6300EOF
6301 echo "Test compile: gnupro alpha ev6 char spilling" >&5
6302 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6303 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6304 (eval $gmp_compile) 2>&5
6305 ac_status=$?
6306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6307 test $ac_status = 0; }; then
6308 cc_works_part=yes
6309 if test "$cross_compiling" = no; then
6310 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6311 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6312 (eval $ac_try) 2>&5
6313 ac_status=$?
6314 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6315 test $ac_status = 0; }; }; then :;
6316 else
6317 cc_works_part=norun
6318 fi
6319 fi
6320 else
6321 cc_works_part=no
6322 fi
6323 if test "$cc_works_part" != yes; then
6324 echo "failed program was:" >&5
6325 cat conftest.c >&5
6326 fi
6327 rm -f conftest* a.out b.out a.exe a_out.exe
6328 case $cc_works_part in
6329 yes)
6330
6331 ;;
6332 no)
6333 gmp_prog_cc_works="no, gnupro alpha ev6 char spilling"
6334 ;;
6335 norun)
6336 gmp_prog_cc_works="no, gnupro alpha ev6 char spilling, program does not run"
6337 ;;
6338 esac
6339fi
6340
6341
6342
6343
6344# __builtin_alloca is not available everywhere, check it exists before
6345# seeing that it works
6346if test "$gmp_prog_cc_works" = yes; then
6347 # remove anything that might look like compiler output to our "||" expression
6348 rm -f conftest* a.out b.out a.exe a_out.exe
6349 cat >conftest.c <<EOF
6350int k; int foo () { __builtin_alloca (k); }
6351EOF
6352 echo "Test compile: __builtin_alloca availability" >&5
6353 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6354 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6355 (eval $gmp_compile) 2>&5
6356 ac_status=$?
6357 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6358 test $ac_status = 0; }; then
6359 cc_works_part=yes
6360 if test "$cross_compiling" = no; then
6361 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6362 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6363 (eval $ac_try) 2>&5
6364 ac_status=$?
6365 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6366 test $ac_status = 0; }; }; then :;
6367 else
6368 cc_works_part=norun
6369 fi
6370 fi
6371 else
6372 cc_works_part=no
6373 fi
6374 if test "$cc_works_part" != yes; then
6375 echo "failed program was:" >&5
6376 cat conftest.c >&5
6377 fi
6378 rm -f conftest* a.out b.out a.exe a_out.exe
6379 case $cc_works_part in
6380 yes)
6381 if test "$gmp_prog_cc_works" = yes; then
6382 # remove anything that might look like compiler output to our "||" expression
6383 rm -f conftest* a.out b.out a.exe a_out.exe
6384 cat >conftest.c <<EOF
6385/* The following provokes an internal compiler error from Itanium HP-UX cc
6386 under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */
6387int k;
6388int foo ()
6389{
6390 int i, **a;
6391 a = __builtin_alloca (k);
6392 for (i = 0; i <= k; i++)
6393 a[i] = __builtin_alloca (1 << i);
6394}
6395
6396int main () { return 0; }
6397EOF
6398 echo "Test compile: alloca array" >&5
6399 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6400 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6401 (eval $gmp_compile) 2>&5
6402 ac_status=$?
6403 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6404 test $ac_status = 0; }; then
6405 cc_works_part=yes
6406 if test "$cross_compiling" = no; then
6407 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6408 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6409 (eval $ac_try) 2>&5
6410 ac_status=$?
6411 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6412 test $ac_status = 0; }; }; then :;
6413 else
6414 cc_works_part=norun
6415 fi
6416 fi
6417 else
6418 cc_works_part=no
6419 fi
6420 if test "$cc_works_part" != yes; then
6421 echo "failed program was:" >&5
6422 cat conftest.c >&5
6423 fi
6424 rm -f conftest* a.out b.out a.exe a_out.exe
6425 case $cc_works_part in
6426 yes)
6427
6428 ;;
6429 no)
6430 gmp_prog_cc_works="no, alloca array"
6431 ;;
6432 norun)
6433 gmp_prog_cc_works="no, alloca array, program does not run"
6434 ;;
6435 esac
6436fi
6437
6438
6439
6440 ;;
6441 no)
6442
6443 ;;
6444 norun)
6445
6446 ;;
6447 esac
6448fi
6449
6450
6451if test "$gmp_prog_cc_works" = yes; then
6452 # remove anything that might look like compiler output to our "||" expression
6453 rm -f conftest* a.out b.out a.exe a_out.exe
6454 cat >conftest.c <<EOF
6455/* The following provokes an internal error from the assembler on
6456 power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this
6457 results in "Internal error related to the source program domain".
6458
6459 For reference it seems to be the combination of nabs+fcirz which is bad,
6460 not either alone. This sort of thing occurs in mpz/get_str.c with the
6461 way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps
6462 if that code changes to a scaled-integer style then we won't need this
6463 test. */
6464
6465double fp[1];
6466int x;
6467int f ()
6468{
6469 int a;
6470 a = (x >= 0 ? x : -x);
6471 return a * fp[0];
6472}
6473
6474int main () { return 0; }
6475EOF
6476 echo "Test compile: abs int -> double conversion" >&5
6477 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6478 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6479 (eval $gmp_compile) 2>&5
6480 ac_status=$?
6481 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6482 test $ac_status = 0; }; then
6483 cc_works_part=yes
6484 if test "$cross_compiling" = no; then
6485 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6486 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6487 (eval $ac_try) 2>&5
6488 ac_status=$?
6489 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6490 test $ac_status = 0; }; }; then :;
6491 else
6492 cc_works_part=norun
6493 fi
6494 fi
6495 else
6496 cc_works_part=no
6497 fi
6498 if test "$cc_works_part" != yes; then
6499 echo "failed program was:" >&5
6500 cat conftest.c >&5
6501 fi
6502 rm -f conftest* a.out b.out a.exe a_out.exe
6503 case $cc_works_part in
6504 yes)
6505
6506 ;;
6507 no)
6508 gmp_prog_cc_works="no, abs int -> double conversion"
6509 ;;
6510 norun)
6511 gmp_prog_cc_works="no, abs int -> double conversion, program does not run"
6512 ;;
6513 esac
6514fi
6515
6516
6517
6518
6519if test "$gmp_prog_cc_works" = yes; then
6520 # remove anything that might look like compiler output to our "||" expression
6521 rm -f conftest* a.out b.out a.exe a_out.exe
6522 cat >conftest.c <<EOF
6523/* The following provokes a segfault in the compiler on powerpc-apple-darwin.
6524 Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and
6525 1666 to segfault with e.g., -O2 -mpowerpc64. */
6526
6527#if defined (__GNUC__) && ! defined (__cplusplus)
6528typedef unsigned long long t1;typedef t1*t2;
6529void g(){}
6530void h(){}
6531static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
6532{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
6533void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
6534for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
6535#else
6536int dummy;
6537#endif
6538
6539int main () { return 0; }
6540EOF
6541 echo "Test compile: long long reliability test 1" >&5
6542 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6543 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6544 (eval $gmp_compile) 2>&5
6545 ac_status=$?
6546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6547 test $ac_status = 0; }; then
6548 cc_works_part=yes
6549 if test "$cross_compiling" = no; then
6550 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6551 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6552 (eval $ac_try) 2>&5
6553 ac_status=$?
6554 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6555 test $ac_status = 0; }; }; then :;
6556 else
6557 cc_works_part=norun
6558 fi
6559 fi
6560 else
6561 cc_works_part=no
6562 fi
6563 if test "$cc_works_part" != yes; then
6564 echo "failed program was:" >&5
6565 cat conftest.c >&5
6566 fi
6567 rm -f conftest* a.out b.out a.exe a_out.exe
6568 case $cc_works_part in
6569 yes)
6570
6571 ;;
6572 no)
6573 gmp_prog_cc_works="no, long long reliability test 1"
6574 ;;
6575 norun)
6576 gmp_prog_cc_works="no, long long reliability test 1, program does not run"
6577 ;;
6578 esac
6579fi
6580
6581
6582
6583
6584if test "$gmp_prog_cc_works" = yes; then
6585 # remove anything that might look like compiler output to our "||" expression
6586 rm -f conftest* a.out b.out a.exe a_out.exe
6587 cat >conftest.c <<EOF
6588/* The following provokes an internal compiler error on powerpc-apple-darwin.
6589 Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and
6590 1666 to get an ICE with -O1 -mpowerpc64. */
6591
6592#if defined (__GNUC__) && ! defined (__cplusplus)
6593int g();
6594void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
6595int g(){return 0;}
6596#else
6597int dummy;
6598#endif
6599
6600int main () { return 0; }
6601EOF
6602 echo "Test compile: long long reliability test 2" >&5
6603 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6604 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6605 (eval $gmp_compile) 2>&5
6606 ac_status=$?
6607 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6608 test $ac_status = 0; }; then
6609 cc_works_part=yes
6610 if test "$cross_compiling" = no; then
6611 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6612 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6613 (eval $ac_try) 2>&5
6614 ac_status=$?
6615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6616 test $ac_status = 0; }; }; then :;
6617 else
6618 cc_works_part=norun
6619 fi
6620 fi
6621 else
6622 cc_works_part=no
6623 fi
6624 if test "$cc_works_part" != yes; then
6625 echo "failed program was:" >&5
6626 cat conftest.c >&5
6627 fi
6628 rm -f conftest* a.out b.out a.exe a_out.exe
6629 case $cc_works_part in
6630 yes)
6631
6632 ;;
6633 no)
6634 gmp_prog_cc_works="no, long long reliability test 2"
6635 ;;
6636 norun)
6637 gmp_prog_cc_works="no, long long reliability test 2, program does not run"
6638 ;;
6639 esac
6640fi
6641
6642
6643
6644
6645if test "$gmp_prog_cc_works" = yes; then
6646 # remove anything that might look like compiler output to our "||" expression
6647 rm -f conftest* a.out b.out a.exe a_out.exe
6648 cat >conftest.c <<EOF
6649/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under
6650 -O2 -march=amdfam10. We call helper functions here "open" and "close" in
6651 order for linking to succeed. */
6652
6653#if defined (__GNUC__) && ! defined (__cplusplus)
6654int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){
6655__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl
6656(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}}
6657#else
6658int dummy;
6659#endif
6660
6661int main () { return 0; }
6662EOF
6663 echo "Test compile: freebsd hacked gcc" >&5
6664 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6665 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6666 (eval $gmp_compile) 2>&5
6667 ac_status=$?
6668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6669 test $ac_status = 0; }; then
6670 cc_works_part=yes
6671 if test "$cross_compiling" = no; then
6672 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6673 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6674 (eval $ac_try) 2>&5
6675 ac_status=$?
6676 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6677 test $ac_status = 0; }; }; then :;
6678 else
6679 cc_works_part=norun
6680 fi
6681 fi
6682 else
6683 cc_works_part=no
6684 fi
6685 if test "$cc_works_part" != yes; then
6686 echo "failed program was:" >&5
6687 cat conftest.c >&5
6688 fi
6689 rm -f conftest* a.out b.out a.exe a_out.exe
6690 case $cc_works_part in
6691 yes)
6692
6693 ;;
6694 no)
6695 gmp_prog_cc_works="no, freebsd hacked gcc"
6696 ;;
6697 norun)
6698 gmp_prog_cc_works="no, freebsd hacked gcc, program does not run"
6699 ;;
6700 esac
6701fi
6702
6703
6704
6705
6706if test "$gmp_prog_cc_works" = yes; then
6707 # remove anything that might look like compiler output to our "||" expression
6708 rm -f conftest* a.out b.out a.exe a_out.exe
6709 cat >conftest.c <<EOF
6710/* The following is mis-compiled by HP ia-64 cc version
6711 cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]
6712 under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets
6713 inlined and its return value somehow botched to be 0 instead of 1. This
6714 arises in the real mpn_lshift_com in mul_fft.c. A lower optimization
6715 level, like +O2 seems ok. This code needs to be run to show the problem,
6716 but that's fine, the offending cc is a native-only compiler so we don't
6717 have to worry about cross compiling. */
6718
6719#if ! defined (__cplusplus)
6720unsigned long
6721lshift_com (rp, up, n, cnt)
6722 unsigned long *rp;
6723 unsigned long *up;
6724 long n;
6725 unsigned cnt;
6726{
6727 unsigned long retval, high_limb, low_limb;
6728 unsigned tnc;
6729 long i;
6730 tnc = 8 * sizeof (unsigned long) - cnt;
6731 low_limb = *up++;
6732 retval = low_limb >> tnc;
6733 high_limb = low_limb << cnt;
6734 for (i = n - 1; i != 0; i--)
6735 {
6736 low_limb = *up++;
6737 *rp++ = ~(high_limb | (low_limb >> tnc));
6738 high_limb = low_limb << cnt;
6739 }
6740 return retval;
6741}
6742int
6743main ()
6744{
6745 unsigned long cy, rp[2], up[2];
6746 up[0] = ~ 0L;
6747 up[1] = 0;
6748 cy = lshift_com (rp, up, 2L, 1);
6749 if (cy != 1L)
6750 return 1;
6751 return 0;
6752}
6753#else
6754int
6755main ()
6756{
6757 return 0;
6758}
6759#endif
6760
6761EOF
6762 echo "Test compile: mpn_lshift_com optimization" >&5
6763 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6764 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6765 (eval $gmp_compile) 2>&5
6766 ac_status=$?
6767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6768 test $ac_status = 0; }; then
6769 cc_works_part=yes
6770 if test "$cross_compiling" = no; then
6771 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6772 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6773 (eval $ac_try) 2>&5
6774 ac_status=$?
6775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6776 test $ac_status = 0; }; }; then :;
6777 else
6778 cc_works_part=norun
6779 fi
6780 fi
6781 else
6782 cc_works_part=no
6783 fi
6784 if test "$cc_works_part" != yes; then
6785 echo "failed program was:" >&5
6786 cat conftest.c >&5
6787 fi
6788 rm -f conftest* a.out b.out a.exe a_out.exe
6789 case $cc_works_part in
6790 yes)
6791
6792 ;;
6793 no)
6794 gmp_prog_cc_works="no, mpn_lshift_com optimization"
6795 ;;
6796 norun)
6797 gmp_prog_cc_works="no, mpn_lshift_com optimization, program does not run"
6798 ;;
6799 esac
6800fi
6801
6802
6803
6804if test "$gmp_prog_cc_works" = yes; then
6805 # remove anything that might look like compiler output to our "||" expression
6806 rm -f conftest* a.out b.out a.exe a_out.exe
6807 cat >conftest.c <<EOF
6808/* The following is mis-compiled by Intel ia-64 icc version 1.8 under
6809 "icc -O3", After several calls, the function writes partial garbage to
6810 the result vector. Perhaps relates to the chk.a.nc insn. This code needs
6811 to be run to show the problem, but that's fine, the offending cc is a
6812 native-only compiler so we don't have to worry about cross compiling. */
6813
6814#if ! defined (__cplusplus)
6815#include <stdlib.h>
6816void
6817lshift_com (rp, up, n, cnt)
6818 unsigned long *rp;
6819 unsigned long *up;
6820 long n;
6821 unsigned cnt;
6822{
6823 unsigned long high_limb, low_limb;
6824 unsigned tnc;
6825 long i;
6826 up += n;
6827 rp += n;
6828 tnc = 8 * sizeof (unsigned long) - cnt;
6829 low_limb = *--up;
6830 high_limb = low_limb << cnt;
6831 for (i = n - 1; i != 0; i--)
6832 {
6833 low_limb = *--up;
6834 *--rp = ~(high_limb | (low_limb >> tnc));
6835 high_limb = low_limb << cnt;
6836 }
6837 *--rp = ~high_limb;
6838}
6839int
6840main ()
6841{
6842 unsigned long *r, *r2;
6843 unsigned long a[88 + 1];
6844 long i;
6845 for (i = 0; i < 88 + 1; i++)
6846 a[i] = ~0L;
6847 r = calloc (10000, sizeof (unsigned long));
6848 r2 = r;
6849 for (i = 0; i < 528; i += 23)
6850 {
6851 lshift_com (r2, a,
6852 i / (8 * sizeof (unsigned long)) + 1,
6853 i % (8 * sizeof (unsigned long)));
6854 r2 += 88 + 1;
6855 }
6856 if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 ||
6857 r[2052] != 0 || r[2053] != 0 || r[2054] != 0)
6858 abort ();
6859 free (r);
6860 return 0;
6861}
6862#else
6863int
6864main ()
6865{
6866 return 0;
6867}
6868#endif
6869
6870EOF
6871 echo "Test compile: mpn_lshift_com optimization 2" >&5
6872 gmp_compile="$cc $cflags $cppflags conftest.c >&5"
6873 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6874 (eval $gmp_compile) 2>&5
6875 ac_status=$?
6876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6877 test $ac_status = 0; }; then
6878 cc_works_part=yes
6879 if test "$cross_compiling" = no; then
6880 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
6881 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
6882 (eval $ac_try) 2>&5
6883 ac_status=$?
6884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6885 test $ac_status = 0; }; }; then :;
6886 else
6887 cc_works_part=norun
6888 fi
6889 fi
6890 else
6891 cc_works_part=no
6892 fi
6893 if test "$cc_works_part" != yes; then
6894 echo "failed program was:" >&5
6895 cat conftest.c >&5
6896 fi
6897 rm -f conftest* a.out b.out a.exe a_out.exe
6898 case $cc_works_part in
6899 yes)
6900
6901 ;;
6902 no)
6903 gmp_prog_cc_works="no, mpn_lshift_com optimization 2"
6904 ;;
6905 norun)
6906 gmp_prog_cc_works="no, mpn_lshift_com optimization 2, program does not run"
6907 ;;
6908 esac
6909fi
6910
6911
6912
6913
6914# A certain _GLOBAL_OFFSET_TABLE_ problem in past versions of gas, tickled
6915# by recent versions of gcc.
6916#
6917if test "$gmp_prog_cc_works" = yes; then
6918 case $host in
6919 i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*)
6920 # this problem only arises in PIC code, so don't need to test when
6921 # --disable-shared. We don't necessarily have $enable_shared set to
6922 # yes at this point, it will still be unset for the default (which is
6923 # yes); hence the use of "!= no".
6924 if test "$enable_shared" != no; then
6925 echo "Testing gcc GOT with eax emitted" >&5
6926cat >conftest.c <<\EOF
6927int foo;
6928int bar () { return foo; }
6929EOF
6930tmp_got_emitted=no
6931gmp_compile="$cc $cflags $cppflags -fPIC -S conftest.c >&5 2>&1"
6932if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
6933 (eval $gmp_compile) 2>&5
6934 ac_status=$?
6935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6936 test $ac_status = 0; }; then
6937 if grep "addl.*_GLOBAL_OFFSET_TABLE_.*eax" conftest.s >/dev/null; then
6938 tmp_got_emitted=yes
6939 fi
6940fi
6941rm -f conftest.*
6942echo "Result: $tmp_got_emitted" >&5
6943if test "$tmp_got_emitted" = yes; then
6944 echo "Testing gas GOT with eax good" >&5
6945cat >conftest.awk <<\EOF
6946BEGIN {
6947 want[0] = "001"
6948 want[1] = "043"
6949 want[2] = "105"
6950 want[3] = "147"
6951 want[4] = "211"
6952 want[5] = "253"
6953 want[6] = "315"
6954 want[7] = "357"
6955
6956 want[8] = "005"
6957 want[9] = "002"
6958 want[10] = "000"
6959 want[11] = "000"
6960 want[12] = "000"
6961
6962 want[13] = "376"
6963 want[14] = "334"
6964 want[15] = "272"
6965 want[16] = "230"
6966 want[17] = "166"
6967 want[18] = "124"
6968 want[19] = "062"
6969 want[20] = "020"
6970
6971 result = "yes"
6972}
6973{
6974 for (f = 2; f <= NF; f++)
6975 {
6976 for (i = 0; i < 20; i++)
6977 got[i] = got[i+1];
6978 got[20] = $f;
6979
6980 found = 1
6981 for (i = 0; i < 21; i++)
6982 if (got[i] != want[i])
6983 {
6984 found = 0
6985 break
6986 }
6987 if (found)
6988 {
6989 result = "no"
6990 exit
6991 }
6992 }
6993}
6994END {
6995 print result
6996}
6997EOF
6998cat >conftest.s <<\EOF
6999 .text
7000 .byte 1, 35, 69, 103, 137, 171, 205, 239
7001 addl $_GLOBAL_OFFSET_TABLE_, %eax
7002 .byte 254, 220, 186, 152, 118, 84, 50, 16
7003EOF
7004tmp_got_good=yes
7005gmp_compile="$cc $cflags $cppflags -fPIC -o conftest.o -c conftest.s >&5 2>&1"
7006if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7007 (eval $gmp_compile) 2>&5
7008 ac_status=$?
7009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7010 test $ac_status = 0; }; then
7011 tmp_got_good=`od -b conftest.o | $AWK -f conftest.awk`
7012fi
7013rm -f conftest.*
7014echo "Result: $tmp_got_good" >&5
7015if test "$tmp_got_good" = no; then
7016 gmp_prog_cc_works="no, bad gas GOT with eax"
7017else
7018 :
7019fi
7020
7021else
7022 :
7023fi
7024
7025 fi
7026 ;;
7027 esac
7028fi
7029
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5
7031$as_echo "$gmp_prog_cc_works" >&6; }
7032case $gmp_prog_cc_works in
7033 yes)
7034
7035 ;;
7036 *)
7037 continue
7038 ;;
7039esac
7040
7041
7042 # If we're supposed to be using a "long long" for a limb, check that
7043 # it works.
7044 eval limb_chosen=\"\$limb$abi1\"
7045 test -n "$limb_chosen" || eval limb_chosen=\"\$limb$abi2\"
7046 if test "$limb_chosen" = longlong; then
7047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags has long long" >&5
7048$as_echo_n "checking compiler $cc $cflags $cppflags has long long... " >&6; }
7049cat >conftest.c <<EOF
7050long long foo;
7051long long bar () { return foo; }
7052int main () { return 0; }
7053EOF
7054gmp_prog_cc_works=no
7055gmp_compile="$cc $cflags $cppflags -c conftest.c >&5"
7056if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7057 (eval $gmp_compile) 2>&5
7058 ac_status=$?
7059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7060 test $ac_status = 0; }; then
7061 gmp_prog_cc_works=yes
7062else
7063 echo "failed program was:" >&5
7064 cat conftest.c >&5
7065fi
7066rm -f conftest* a.out b.out a.exe a_out.exe
7067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5
7068$as_echo "$gmp_prog_cc_works" >&6; }
7069if test $gmp_prog_cc_works = yes; then
7070 :
7071else
7072 continue
7073fi
7074
7075 fi
7076
7077 # The tests to perform on this $cc, if any
7078 eval testlist=\"\$${ccbase}${abi1}_testlist\"
7079 test -n "$testlist" || eval testlist=\"\$${ccbase}${abi2}_testlist\"
7080 test -n "$testlist" || eval testlist=\"\$any${abi1}_testlist\"
7081 test -n "$testlist" || eval testlist=\"\$any${abi2}_testlist\"
7082
7083 testlist_pass=yes
7084 for tst in $testlist; do
7085 case $tst in
7086 hpc-hppa-2-0) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HP compiler $cc is good for 64-bits" >&5
7087$as_echo_n "checking whether HP compiler $cc is good for 64-bits... " >&6; }
7088# Bad compiler output:
7089# ccom: HP92453-01 G.10.32.05 HP C Compiler
7090# Good compiler output:
7091# ccom: HP92453-01 A.10.32.30 HP C Compiler
7092# Let A.10.32.30 or higher be ok.
7093echo >conftest.c
7094gmp_tmp_vs=`$cc -V -c -o conftest.$OBJEXT conftest.c 2>&1 | grep "^ccom:"`
7095echo "Version string: $gmp_tmp_vs" >&5
7096rm conftest*
7097gmp_tmp_v1=`echo $gmp_tmp_vs | sed 's/.* .\.\([0-9]*\).*/\1/'`
7098gmp_tmp_v2=`echo $gmp_tmp_vs | sed 's/.* .\..*\.\(.*\)\..* HP C.*/\1/'`
7099gmp_tmp_v3=`echo $gmp_tmp_vs | sed 's/.* .\..*\..*\.\(.*\) HP C.*/\1/'`
7100echo "Version number: $gmp_tmp_v1.$gmp_tmp_v2.$gmp_tmp_v3" >&5
7101if test -z "$gmp_tmp_v1"; then
7102 gmp_hpc_64bit=not-applicable
7103else
7104 gmp_compare_ge=no
7105if test -n "$gmp_tmp_v1"; then
7106 if test "$gmp_tmp_v1" -gt 10; then
7107 gmp_compare_ge=yes
7108 else
7109 if test "$gmp_tmp_v1" -eq 10; then
7110 if test -n "$gmp_tmp_v2"; then
7111 if test "$gmp_tmp_v2" -gt 32; then
7112 gmp_compare_ge=yes
7113 else
7114 if test "$gmp_tmp_v2" -eq 32; then
7115 if test -n "$gmp_tmp_v3" && test "$gmp_tmp_v3" -ge 30; then
7116 gmp_compare_ge=yes
7117fi
7118
7119 fi
7120 fi
7121fi
7122
7123 fi
7124 fi
7125fi
7126
7127
7128 gmp_hpc_64bit=$gmp_compare_ge
7129fi
7130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_hpc_64bit" >&5
7131$as_echo "$gmp_hpc_64bit" >&6; }
7132if test $gmp_hpc_64bit = yes; then
7133 :
7134else
7135 testlist_pass=no
7136fi
7137 ;;
7138 gcc-arm-umodsi) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ARM gcc unsigned division works" >&5
7139$as_echo_n "checking whether ARM gcc unsigned division works... " >&6; }
7140tmp_version=`$cc --version`
7141echo "$tmp_version" >&5
7142case $tmp_version in
7143 2.95 | 2.95.[123])
7144 testlist_pass=no
7145 gmp_gcc_arm_umodsi_result="no, gcc 2.95.[0123]" ;;
7146 *)
7147 :
7148 gmp_gcc_arm_umodsi_result=yes ;;
7149esac
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_gcc_arm_umodsi_result" >&5
7151$as_echo "$gmp_gcc_arm_umodsi_result" >&6; }
7152 ;;
7153 gcc-mips-o32) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports o32" >&5
7154$as_echo_n "checking whether gcc supports o32... " >&6; }
7155echo 'int x;' >conftest.c
7156echo "$cc -mabi=32 -c conftest.c" >&5
7157if $cc -mabi=32 -c conftest.c >conftest.out 2>&1; then
7158 result=yes
7159else
7160 cat conftest.out >&5
7161 if grep "cc1: Invalid option \`abi=32'" conftest.out >/dev/null; then
7162 result=yes
7163 else
7164 result=no
7165 fi
7166fi
7167rm -f conftest.*
7168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
7169$as_echo "$result" >&6; }
7170if test $result = yes; then
7171 :
7172else
7173 testlist_pass=no
7174fi
7175 ;;
7176 hppa-level-2.0) { $as_echo "$as_me:${as_lineno-$LINENO}: checking $cc $cflags assembler knows hppa 2.0" >&5
7177$as_echo_n "checking $cc $cflags assembler knows hppa 2.0... " >&6; }
7178result=no
7179cat >conftest.s <<EOF
7180 .level 2.0
7181EOF
7182gmp_compile="$cc $cflags -c conftest.s >&5 2>&1"
7183if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7184 (eval $gmp_compile) 2>&5
7185 ac_status=$?
7186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7187 test $ac_status = 0; }; then
7188 result=yes
7189else
7190 echo "failed program was" >&5
7191 cat conftest.s >&5
7192fi
7193rm -f conftest*
7194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
7195$as_echo "$result" >&6; }
7196if test "$result" = yes; then
7197 :
7198else
7199 testlist_pass=no
7200fi
7201 ;;
7202 sizeof*) echo "configure: testlist $tst" >&5
7203gmp_sizeof_type=`echo "$tst" | sed 's/sizeof-\([a-z\*]*\).*/\1/'`
7204gmp_sizeof_want=`echo "$tst" | sed 's/sizeof-[a-z\*]*-\([0-9]*\).*/\1/'`
7205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags has sizeof($gmp_sizeof_type)==$gmp_sizeof_want" >&5
7206$as_echo_n "checking compiler $cc $cflags has sizeof($gmp_sizeof_type)==$gmp_sizeof_want... " >&6; }
7207cat >conftest.c <<EOF
7208int
7209main ()
7210{
7211 static int test_array [1 - 2 * (long) (sizeof ($gmp_sizeof_type) != $gmp_sizeof_want)];
7212 test_array[0] = 0;
7213 return 0;
7214}
7215EOF
7216gmp_c_testlist_sizeof=no
7217gmp_compile="$cc $cflags -c conftest.c >&5"
7218if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7219 (eval $gmp_compile) 2>&5
7220 ac_status=$?
7221 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7222 test $ac_status = 0; }; then
7223 gmp_c_testlist_sizeof=yes
7224fi
7225rm -f conftest*
7226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_c_testlist_sizeof" >&5
7227$as_echo "$gmp_c_testlist_sizeof" >&6; }
7228if test $gmp_c_testlist_sizeof = yes; then
7229 :
7230else
7231 testlist_pass=no
7232fi
7233 ;;
7234 esac
7235 if test $testlist_pass = no; then break; fi
7236 done
7237
7238 if test $testlist_pass = yes; then
7239 found_compiler=yes
7240 break
7241 fi
7242 done
7243
7244 if test $found_compiler = yes; then break; fi
7245 done
7246
7247 if test $found_compiler = yes; then break; fi
7248 done
7249
7250 if test $found_compiler = yes; then break; fi
7251done
7252
7253
7254# If we recognised the CPU, as indicated by $path being set, then insist
7255# that we have a working compiler, either from our $cclist choices or from
7256# $CC. We can't let AC_PROG_CC look around for a compiler because it might
7257# find one that we've rejected (for not supporting the modes our asm code
7258# demands, etc).
7259#
7260# If we didn't recognise the CPU (and this includes host_cpu=none), then
7261# fall through and let AC_PROG_CC look around for a compiler too. This is
7262# mostly in the interests of following a standard autoconf setup, after all
7263# we've already tested cc and gcc adequately (hopefully). As of autoconf
7264# 2.50 the only thing AC_PROG_CC really adds is a check for "cl" (Microsoft
7265# C on MS-DOS systems).
7266#
7267if test $found_compiler = no && test -n "$path"; then
7268 as_fn_error $? "could not find a working compiler, see config.log for details" "$LINENO" 5
7269fi
7270
7271case $host in
7272 i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | zen*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | kabylake*-*-*)
7273 # If the user asked for a fat build, override the path and flags set above
7274 if test $enable_fat = yes; then
7275 gcc_cflags_cpu=""
7276 gcc_cflags_arch=""
7277
7278 fat_functions="add_n addmul_1 bdiv_dbm1c com cnd_add_n cnd_sub_n
7279 copyd copyi dive_1 divrem_1
7280 gcd_11 lshift lshiftc mod_1 mod_1_1 mod_1_1_cps mod_1_2
7281 mod_1_2_cps mod_1_4 mod_1_4_cps mod_34lsub1 mode1o mul_1
7282 mul_basecase mullo_basecase pre_divrem_1 pre_mod_1 redc_1
7283 redc_2 rshift sqr_basecase sub_n submul_1"
7284
7285 if test "$abi" = 32; then
7286 extra_functions="$extra_functions fat fat_entry"
7287 path="x86/fat x86"
7288 fat_path="x86 x86/fat x86/i486
7289 x86/k6 x86/k6/mmx x86/k6/k62mmx
7290 x86/k7 x86/k7/mmx
7291 x86/k8 x86/k10 x86/bt1
7292 x86/pentium x86/pentium/mmx
7293 x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2
7294 x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2
7295 x86/core2 x86/coreinhm x86/coreisbr
7296 x86/atom x86/atom/mmx x86/atom/sse2 x86/nano"
7297 fi
7298
7299 if test "$abi" = 64; then
7300 gcc_64_cflags=""
7301 extra_functions_64="$extra_functions_64 fat fat_entry"
7302 path_64="x86_64/fat x86_64"
7303 fat_path="x86_64 x86_64/fat
7304 x86_64/k8 x86_64/k10 x86_64/bd1 x86_64/bt1 x86_64/bt2 x86_64/zen
7305 x86_64/pentium4 x86_64/core2 x86_64/coreinhm x86_64/coreisbr
7306 x86_64/coreihwl x86_64/coreibwl x86_64/skylake x86_64/atom
7307 x86_64/silvermont x86_64/goldmont x86_64/nano"
7308 fat_functions="$fat_functions addmul_2 addlsh1_n addlsh2_n sublsh1_n"
7309 fi
7310
7311 fat_thresholds="MUL_TOOM22_THRESHOLD MUL_TOOM33_THRESHOLD
7312 SQR_TOOM2_THRESHOLD SQR_TOOM3_THRESHOLD
7313 BMOD_1_TO_MOD_1_THRESHOLD"
7314 fi
7315 ;;
7316esac
7317
7318
7319if test $found_compiler = yes; then
7320
7321 # If we're creating CFLAGS, then look for optional additions. If the user
7322 # set CFLAGS then leave it alone.
7323 #
7324 if test "$test_CFLAGS" != set; then
7325 eval optlist=\"\$${ccbase}${abi1}_cflags_optlist\"
7326 test -n "$optlist" || eval optlist=\"\$${ccbase}${abi2}_cflags_optlist\"
7327
7328 for opt in $optlist; do
7329 eval optflags=\"\$${ccbase}${abi1}_cflags_${opt}\"
7330 test -n "$optflags" || eval optflags=\"\$${ccbase}${abi2}_cflags_${opt}\"
7331 test -n "$optflags" || eval optflags=\"\$${ccbase}_cflags_${opt}\"
7332
7333 for flag in $optflags; do
7334
7335 # ~ represents a space in an option spec
7336 flag=`echo "$flag" | tr '~' ' '`
7337
7338 case $flag in
7339 -march=pentium4 | -march=k8)
7340 # For -march settings which enable SSE2 we exclude certain bad
7341 # gcc versions and we need an OS knowing how to save xmm regs.
7342 #
7343 # This is only for ABI=32, any 64-bit gcc is good and any OS
7344 # knowing x86_64 will know xmm.
7345 #
7346 # -march=k8 was only introduced in gcc 3.3, so we shouldn't need
7347 # the GMP_GCC_PENTIUM4_SSE2 check (for gcc 3.2 and prior). But
7348 # it doesn't hurt to run it anyway, sharing code with the
7349 # pentium4 case.
7350 #
7351 if test "$abi" = 32; then
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc is good for sse2" >&5
7353$as_echo_n "checking whether gcc is good for sse2... " >&6; }
7354case `$cc $cflags $cppflags -dumpversion` in
7355 3.[012] | 3.[012].*) result=no ;;
7356 *) result=yes ;;
7357esac
7358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
7359$as_echo "$result" >&6; }
7360if test "$result" = yes; then
7361 :
7362else
7363 continue
7364fi
7365
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports XMM registers" >&5
7367$as_echo_n "checking whether the operating system supports XMM registers... " >&6; }
7368if ${gmp_cv_os_x86_xmm+:} false; then :
7369 $as_echo_n "(cached) " >&6
7370else
7371 if test "$build" = "$host"; then
7372 # remove anything that might look like compiler output to our "||" expression
7373 rm -f conftest* a.out b.out a.exe a_out.exe
7374 cat >conftest.s <<EOF
7375 .text
7376main:
7377_main:
7378 .globl main
7379 .globl _main
7380 .byte 0x0f, 0x57, 0xc0
7381 xorl %eax, %eax
7382 ret
7383EOF
7384 gmp_compile="$cc $cflags $cppflags conftest.s -o conftest >&5"
7385 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7386 (eval $gmp_compile) 2>&5
7387 ac_status=$?
7388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7389 test $ac_status = 0; }; then
7390 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7391 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7392 (eval $ac_try) 2>&5
7393 ac_status=$?
7394 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7395 test $ac_status = 0; }; }; then
7396 gmp_cv_os_x86_xmm=yes
7397 else
7398 gmp_cv_os_x86_xmm=no
7399 fi
7400 else
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Oops, cannot compile test program" >&5
7402$as_echo "$as_me: WARNING: Oops, cannot compile test program" >&2;}
7403 fi
7404 rm -f conftest*
7405fi
7406
7407if test -z "$gmp_cv_os_x86_xmm"; then
7408 case $host_os in
7409 freebsd[123] | freebsd[123].*)
7410 gmp_cv_os_x86_xmm=no ;;
7411 freebsd*)
7412 gmp_cv_os_x86_xmm=yes ;;
7413 *)
7414 gmp_cv_os_x86_xmm=probably ;;
7415 esac
7416fi
7417
7418fi
7419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_os_x86_xmm" >&5
7420$as_echo "$gmp_cv_os_x86_xmm" >&6; }
7421
7422if test "$gmp_cv_os_x86_xmm" = probably; then
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not certain of OS support for xmm when cross compiling." >&5
7424$as_echo "$as_me: WARNING: Not certain of OS support for xmm when cross compiling." >&2;}
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will assume it's ok, expect a SIGILL if this is wrong." >&5
7426$as_echo "$as_me: WARNING: Will assume it's ok, expect a SIGILL if this is wrong." >&2;}
7427fi
7428
7429case $gmp_cv_os_x86_xmm in
7430no)
7431 continue
7432 ;;
7433*)
7434
7435 ;;
7436esac
7437
7438 fi
7439 ;;
7440 -no-cpp-precomp)
7441 # special check, avoiding a warning
7442 if test "$ccbase" = gcc; then
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags -no-cpp-precomp" >&5
7444$as_echo_n "checking compiler $cc $cflags -no-cpp-precomp... " >&6; }
7445 result=no
7446 cat >conftest.c <<EOF
7447int main () { return 0; }
7448EOF
7449 gmp_compile="$cc $cflags -no-cpp-precomp conftest.c >conftest.out 2>&1"
7450 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7451 (eval $gmp_compile) 2>&5
7452 ac_status=$?
7453 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7454 test $ac_status = 0; }; then
7455 if grep "unrecognized option.*-no-cpp-precomp" conftest.out >/dev/null; then : ;
7456 else
7457 result=yes
7458 fi
7459 fi
7460 cat conftest.out >&5
7461 rm -f conftest* a.out b.out a.exe a_out.exe
7462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
7463$as_echo "$result" >&6; }
7464 if test "$result" = yes; then
7465 cflags="$cflags $flag"
7466 break
7467 else
7468 continue
7469 fi
7470fi
7471
7472 ;;
7473 -Wa,-m*)
7474 case $host in
7475 alpha*-*-*)
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler $cc $cflags $flag" >&5
7477$as_echo_n "checking assembler $cc $cflags $flag... " >&6; }
7478result=no
7479cat >conftest.c <<EOF
7480int main () {}
7481EOF
7482gmp_compile="$cc $cflags $flag -c conftest.c >conftest.out 2>&1"
7483if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7484 (eval $gmp_compile) 2>&5
7485 ac_status=$?
7486 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7487 test $ac_status = 0; }; then
7488 if grep "Unknown CPU identifier" conftest.out >/dev/null; then : ;
7489 else
7490 result=yes
7491 fi
7492fi
7493cat conftest.out >&5
7494rm -f conftest*
7495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
7496$as_echo "$result" >&6; }
7497if test "$result" = yes; then
7498 :
7499else
7500 continue
7501fi
7502
7503 ;;
7504 esac
7505 ;;
7506 -Wa,-oldas)
7507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cc $cflags $cppflags -Wa,-oldas" >&5
7508$as_echo_n "checking for $cc $cflags $cppflags -Wa,-oldas... " >&6; }
7509result=no
7510cat >conftest.c <<EOF
7511EOF
7512echo "with empty conftest.c" >&5
7513gmp_compile="$cc $cflags $cppflags -c conftest.c >&5 2>&1"
7514if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7515 (eval $gmp_compile) 2>&5
7516 ac_status=$?
7517 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7518 test $ac_status = 0; }; then : ;
7519else
7520 # empty fails
7521 gmp_compile="$cc $cflags $cppflags -Wa,-oldas -c conftest.c >&5 2>&1"
7522 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7523 (eval $gmp_compile) 2>&5
7524 ac_status=$?
7525 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7526 test $ac_status = 0; }; then
7527 # but with -Wa,-oldas it works
7528 result=yes
7529 fi
7530fi
7531rm -f conftest*
7532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
7533$as_echo "$result" >&6; }
7534if test "$result" = yes; then
7535 cflags="$cflags $flag"
7536 break
7537else
7538 continue
7539fi
7540
7541 ;;
7542 esac
7543
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler $cc $cflags $cppflags $flag" >&5
7545$as_echo_n "checking compiler $cc $cflags $cppflags $flag... " >&6; }
7546gmp_prog_cc_works=yes
7547
7548# first see a simple "main()" works, then go on to other checks
7549if test "$gmp_prog_cc_works" = yes; then
7550 # remove anything that might look like compiler output to our "||" expression
7551 rm -f conftest* a.out b.out a.exe a_out.exe
7552 cat >conftest.c <<EOF
7553
7554int main () { return 0; }
7555EOF
7556 echo "Test compile: " >&5
7557 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
7558 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7559 (eval $gmp_compile) 2>&5
7560 ac_status=$?
7561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7562 test $ac_status = 0; }; then
7563 cc_works_part=yes
7564 if test "$cross_compiling" = no; then
7565 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7566 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7567 (eval $ac_try) 2>&5
7568 ac_status=$?
7569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7570 test $ac_status = 0; }; }; then :;
7571 else
7572 cc_works_part=norun
7573 fi
7574 fi
7575 else
7576 cc_works_part=no
7577 fi
7578 if test "$cc_works_part" != yes; then
7579 echo "failed program was:" >&5
7580 cat conftest.c >&5
7581 fi
7582 rm -f conftest* a.out b.out a.exe a_out.exe
7583 case $cc_works_part in
7584 yes)
7585
7586 ;;
7587 no)
7588 gmp_prog_cc_works="no"
7589 ;;
7590 norun)
7591 gmp_prog_cc_works="no, program does not run"
7592 ;;
7593 esac
7594fi
7595
7596
7597
7598
7599if test "$gmp_prog_cc_works" = yes; then
7600 # remove anything that might look like compiler output to our "||" expression
7601 rm -f conftest* a.out b.out a.exe a_out.exe
7602 cat >conftest.c <<EOF
7603/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64
7604 (without -maix64), hence detecting an unusable compiler */
7605void *g() { return (void *) 0; }
7606void *f() { return g(); }
7607
7608int main () { return 0; }
7609EOF
7610 echo "Test compile: function pointer return" >&5
7611 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
7612 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7613 (eval $gmp_compile) 2>&5
7614 ac_status=$?
7615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7616 test $ac_status = 0; }; then
7617 cc_works_part=yes
7618 if test "$cross_compiling" = no; then
7619 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7620 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7621 (eval $ac_try) 2>&5
7622 ac_status=$?
7623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7624 test $ac_status = 0; }; }; then :;
7625 else
7626 cc_works_part=norun
7627 fi
7628 fi
7629 else
7630 cc_works_part=no
7631 fi
7632 if test "$cc_works_part" != yes; then
7633 echo "failed program was:" >&5
7634 cat conftest.c >&5
7635 fi
7636 rm -f conftest* a.out b.out a.exe a_out.exe
7637 case $cc_works_part in
7638 yes)
7639
7640 ;;
7641 no)
7642 gmp_prog_cc_works="no, function pointer return"
7643 ;;
7644 norun)
7645 gmp_prog_cc_works="no, function pointer return, program does not run"
7646 ;;
7647 esac
7648fi
7649
7650
7651
7652
7653if test "$gmp_prog_cc_works" = yes; then
7654 # remove anything that might look like compiler output to our "||" expression
7655 rm -f conftest* a.out b.out a.exe a_out.exe
7656 cat >conftest.c <<EOF
7657/* The following provokes an invalid instruction syntax from i386 gcc
7658 -march=pentiumpro on Solaris 2.8. The native sun assembler
7659 requires a non-standard syntax for cmov which gcc (as of 2.95.2 at
7660 least) doesn't know. */
7661int n;
7662int cmov () { return (n >= 0 ? n : 0); }
7663
7664int main () { return 0; }
7665EOF
7666 echo "Test compile: cmov instruction" >&5
7667 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
7668 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7669 (eval $gmp_compile) 2>&5
7670 ac_status=$?
7671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7672 test $ac_status = 0; }; then
7673 cc_works_part=yes
7674 if test "$cross_compiling" = no; then
7675 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7676 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7677 (eval $ac_try) 2>&5
7678 ac_status=$?
7679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7680 test $ac_status = 0; }; }; then :;
7681 else
7682 cc_works_part=norun
7683 fi
7684 fi
7685 else
7686 cc_works_part=no
7687 fi
7688 if test "$cc_works_part" != yes; then
7689 echo "failed program was:" >&5
7690 cat conftest.c >&5
7691 fi
7692 rm -f conftest* a.out b.out a.exe a_out.exe
7693 case $cc_works_part in
7694 yes)
7695
7696 ;;
7697 no)
7698 gmp_prog_cc_works="no, cmov instruction"
7699 ;;
7700 norun)
7701 gmp_prog_cc_works="no, cmov instruction, program does not run"
7702 ;;
7703 esac
7704fi
7705
7706
7707
7708
7709if test "$gmp_prog_cc_works" = yes; then
7710 # remove anything that might look like compiler output to our "||" expression
7711 rm -f conftest* a.out b.out a.exe a_out.exe
7712 cat >conftest.c <<EOF
7713/* The following provokes a linker invocation problem with gcc 3.0.3
7714 on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630
7715 option causes gcc to incorrectly select the 32-bit libgcc.a, not
7716 the 64-bit one, and consequently it misses out on the __fixunsdfdi
7717 helper (double -> uint64 conversion). */
7718double d;
7719unsigned long gcc303 () { return (unsigned long) d; }
7720
7721int main () { return 0; }
7722EOF
7723 echo "Test compile: double -> ulong conversion" >&5
7724 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
7725 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7726 (eval $gmp_compile) 2>&5
7727 ac_status=$?
7728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7729 test $ac_status = 0; }; then
7730 cc_works_part=yes
7731 if test "$cross_compiling" = no; then
7732 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7733 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7734 (eval $ac_try) 2>&5
7735 ac_status=$?
7736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7737 test $ac_status = 0; }; }; then :;
7738 else
7739 cc_works_part=norun
7740 fi
7741 fi
7742 else
7743 cc_works_part=no
7744 fi
7745 if test "$cc_works_part" != yes; then
7746 echo "failed program was:" >&5
7747 cat conftest.c >&5
7748 fi
7749 rm -f conftest* a.out b.out a.exe a_out.exe
7750 case $cc_works_part in
7751 yes)
7752
7753 ;;
7754 no)
7755 gmp_prog_cc_works="no, double -> ulong conversion"
7756 ;;
7757 norun)
7758 gmp_prog_cc_works="no, double -> ulong conversion, program does not run"
7759 ;;
7760 esac
7761fi
7762
7763
7764
7765
7766if test "$gmp_prog_cc_works" = yes; then
7767 # remove anything that might look like compiler output to our "||" expression
7768 rm -f conftest* a.out b.out a.exe a_out.exe
7769 cat >conftest.c <<EOF
7770/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if
7771 the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0
7772 instruction, and a negation like this comes out using it. */
7773double fneg_data;
7774unsigned long fneg () { return -fneg_data; }
7775
7776int main () { return 0; }
7777EOF
7778 echo "Test compile: double negation" >&5
7779 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
7780 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7781 (eval $gmp_compile) 2>&5
7782 ac_status=$?
7783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7784 test $ac_status = 0; }; then
7785 cc_works_part=yes
7786 if test "$cross_compiling" = no; then
7787 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7788 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7789 (eval $ac_try) 2>&5
7790 ac_status=$?
7791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7792 test $ac_status = 0; }; }; then :;
7793 else
7794 cc_works_part=norun
7795 fi
7796 fi
7797 else
7798 cc_works_part=no
7799 fi
7800 if test "$cc_works_part" != yes; then
7801 echo "failed program was:" >&5
7802 cat conftest.c >&5
7803 fi
7804 rm -f conftest* a.out b.out a.exe a_out.exe
7805 case $cc_works_part in
7806 yes)
7807
7808 ;;
7809 no)
7810 gmp_prog_cc_works="no, double negation"
7811 ;;
7812 norun)
7813 gmp_prog_cc_works="no, double negation, program does not run"
7814 ;;
7815 esac
7816fi
7817
7818
7819
7820
7821if test "$gmp_prog_cc_works" = yes; then
7822 # remove anything that might look like compiler output to our "||" expression
7823 rm -f conftest* a.out b.out a.exe a_out.exe
7824 cat >conftest.c <<EOF
7825/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn
7826 (cvtsd2ss) which will provoke an error if the assembler doesn't recognise
7827 those instructions. Not sure how much of the gmp code will come out
7828 wanting sse2, but it's easiest to reject an option we know is bad. */
7829double ftod_data;
7830float ftod () { return (float) ftod_data; }
7831
7832int main () { return 0; }
7833EOF
7834 echo "Test compile: double -> float conversion" >&5
7835 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
7836 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7837 (eval $gmp_compile) 2>&5
7838 ac_status=$?
7839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7840 test $ac_status = 0; }; then
7841 cc_works_part=yes
7842 if test "$cross_compiling" = no; then
7843 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7844 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7845 (eval $ac_try) 2>&5
7846 ac_status=$?
7847 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7848 test $ac_status = 0; }; }; then :;
7849 else
7850 cc_works_part=norun
7851 fi
7852 fi
7853 else
7854 cc_works_part=no
7855 fi
7856 if test "$cc_works_part" != yes; then
7857 echo "failed program was:" >&5
7858 cat conftest.c >&5
7859 fi
7860 rm -f conftest* a.out b.out a.exe a_out.exe
7861 case $cc_works_part in
7862 yes)
7863
7864 ;;
7865 no)
7866 gmp_prog_cc_works="no, double -> float conversion"
7867 ;;
7868 norun)
7869 gmp_prog_cc_works="no, double -> float conversion, program does not run"
7870 ;;
7871 esac
7872fi
7873
7874
7875
7876
7877if test "$gmp_prog_cc_works" = yes; then
7878 # remove anything that might look like compiler output to our "||" expression
7879 rm -f conftest* a.out b.out a.exe a_out.exe
7880 cat >conftest.c <<EOF
7881/* The following provokes an internal compiler error from gcc version
7882 "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char
7883 values being spilled into floating point registers. The problem doesn't
7884 show up all the time, but has occurred enough in GMP for us to reject
7885 this compiler+flags. */
7886#include <string.h> /* for memcpy */
7887struct try_t
7888{
7889 char dst[2];
7890 char size;
7891 long d0, d1, d2, d3, d4, d5, d6;
7892 char overlap;
7893};
7894struct try_t param[6];
7895int
7896param_init ()
7897{
7898 struct try_t *p;
7899 memcpy (p, &param[ 2 ], sizeof (*p));
7900 memcpy (p, &param[ 2 ], sizeof (*p));
7901 p->size = 2;
7902 memcpy (p, &param[ 1 ], sizeof (*p));
7903 p->dst[0] = 1;
7904 p->overlap = 2;
7905 memcpy (p, &param[ 3 ], sizeof (*p));
7906 p->dst[0] = 1;
7907 p->overlap = 8;
7908 memcpy (p, &param[ 4 ], sizeof (*p));
7909 memcpy (p, &param[ 4 ], sizeof (*p));
7910 p->overlap = 8;
7911 memcpy (p, &param[ 5 ], sizeof (*p));
7912 memcpy (p, &param[ 5 ], sizeof (*p));
7913 memcpy (p, &param[ 5 ], sizeof (*p));
7914 return 0;
7915}
7916
7917int main () { return 0; }
7918EOF
7919 echo "Test compile: gnupro alpha ev6 char spilling" >&5
7920 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
7921 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7922 (eval $gmp_compile) 2>&5
7923 ac_status=$?
7924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7925 test $ac_status = 0; }; then
7926 cc_works_part=yes
7927 if test "$cross_compiling" = no; then
7928 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7929 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7930 (eval $ac_try) 2>&5
7931 ac_status=$?
7932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7933 test $ac_status = 0; }; }; then :;
7934 else
7935 cc_works_part=norun
7936 fi
7937 fi
7938 else
7939 cc_works_part=no
7940 fi
7941 if test "$cc_works_part" != yes; then
7942 echo "failed program was:" >&5
7943 cat conftest.c >&5
7944 fi
7945 rm -f conftest* a.out b.out a.exe a_out.exe
7946 case $cc_works_part in
7947 yes)
7948
7949 ;;
7950 no)
7951 gmp_prog_cc_works="no, gnupro alpha ev6 char spilling"
7952 ;;
7953 norun)
7954 gmp_prog_cc_works="no, gnupro alpha ev6 char spilling, program does not run"
7955 ;;
7956 esac
7957fi
7958
7959
7960
7961
7962# __builtin_alloca is not available everywhere, check it exists before
7963# seeing that it works
7964if test "$gmp_prog_cc_works" = yes; then
7965 # remove anything that might look like compiler output to our "||" expression
7966 rm -f conftest* a.out b.out a.exe a_out.exe
7967 cat >conftest.c <<EOF
7968int k; int foo () { __builtin_alloca (k); }
7969EOF
7970 echo "Test compile: __builtin_alloca availability" >&5
7971 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
7972 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
7973 (eval $gmp_compile) 2>&5
7974 ac_status=$?
7975 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7976 test $ac_status = 0; }; then
7977 cc_works_part=yes
7978 if test "$cross_compiling" = no; then
7979 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
7980 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
7981 (eval $ac_try) 2>&5
7982 ac_status=$?
7983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7984 test $ac_status = 0; }; }; then :;
7985 else
7986 cc_works_part=norun
7987 fi
7988 fi
7989 else
7990 cc_works_part=no
7991 fi
7992 if test "$cc_works_part" != yes; then
7993 echo "failed program was:" >&5
7994 cat conftest.c >&5
7995 fi
7996 rm -f conftest* a.out b.out a.exe a_out.exe
7997 case $cc_works_part in
7998 yes)
7999 if test "$gmp_prog_cc_works" = yes; then
8000 # remove anything that might look like compiler output to our "||" expression
8001 rm -f conftest* a.out b.out a.exe a_out.exe
8002 cat >conftest.c <<EOF
8003/* The following provokes an internal compiler error from Itanium HP-UX cc
8004 under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */
8005int k;
8006int foo ()
8007{
8008 int i, **a;
8009 a = __builtin_alloca (k);
8010 for (i = 0; i <= k; i++)
8011 a[i] = __builtin_alloca (1 << i);
8012}
8013
8014int main () { return 0; }
8015EOF
8016 echo "Test compile: alloca array" >&5
8017 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
8018 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8019 (eval $gmp_compile) 2>&5
8020 ac_status=$?
8021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8022 test $ac_status = 0; }; then
8023 cc_works_part=yes
8024 if test "$cross_compiling" = no; then
8025 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
8026 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8027 (eval $ac_try) 2>&5
8028 ac_status=$?
8029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8030 test $ac_status = 0; }; }; then :;
8031 else
8032 cc_works_part=norun
8033 fi
8034 fi
8035 else
8036 cc_works_part=no
8037 fi
8038 if test "$cc_works_part" != yes; then
8039 echo "failed program was:" >&5
8040 cat conftest.c >&5
8041 fi
8042 rm -f conftest* a.out b.out a.exe a_out.exe
8043 case $cc_works_part in
8044 yes)
8045
8046 ;;
8047 no)
8048 gmp_prog_cc_works="no, alloca array"
8049 ;;
8050 norun)
8051 gmp_prog_cc_works="no, alloca array, program does not run"
8052 ;;
8053 esac
8054fi
8055
8056
8057
8058 ;;
8059 no)
8060
8061 ;;
8062 norun)
8063
8064 ;;
8065 esac
8066fi
8067
8068
8069if test "$gmp_prog_cc_works" = yes; then
8070 # remove anything that might look like compiler output to our "||" expression
8071 rm -f conftest* a.out b.out a.exe a_out.exe
8072 cat >conftest.c <<EOF
8073/* The following provokes an internal error from the assembler on
8074 power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this
8075 results in "Internal error related to the source program domain".
8076
8077 For reference it seems to be the combination of nabs+fcirz which is bad,
8078 not either alone. This sort of thing occurs in mpz/get_str.c with the
8079 way double chars_per_bit_exactly is applied in MPN_SIZEINBASE. Perhaps
8080 if that code changes to a scaled-integer style then we won't need this
8081 test. */
8082
8083double fp[1];
8084int x;
8085int f ()
8086{
8087 int a;
8088 a = (x >= 0 ? x : -x);
8089 return a * fp[0];
8090}
8091
8092int main () { return 0; }
8093EOF
8094 echo "Test compile: abs int -> double conversion" >&5
8095 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
8096 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8097 (eval $gmp_compile) 2>&5
8098 ac_status=$?
8099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8100 test $ac_status = 0; }; then
8101 cc_works_part=yes
8102 if test "$cross_compiling" = no; then
8103 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
8104 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8105 (eval $ac_try) 2>&5
8106 ac_status=$?
8107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8108 test $ac_status = 0; }; }; then :;
8109 else
8110 cc_works_part=norun
8111 fi
8112 fi
8113 else
8114 cc_works_part=no
8115 fi
8116 if test "$cc_works_part" != yes; then
8117 echo "failed program was:" >&5
8118 cat conftest.c >&5
8119 fi
8120 rm -f conftest* a.out b.out a.exe a_out.exe
8121 case $cc_works_part in
8122 yes)
8123
8124 ;;
8125 no)
8126 gmp_prog_cc_works="no, abs int -> double conversion"
8127 ;;
8128 norun)
8129 gmp_prog_cc_works="no, abs int -> double conversion, program does not run"
8130 ;;
8131 esac
8132fi
8133
8134
8135
8136
8137if test "$gmp_prog_cc_works" = yes; then
8138 # remove anything that might look like compiler output to our "||" expression
8139 rm -f conftest* a.out b.out a.exe a_out.exe
8140 cat >conftest.c <<EOF
8141/* The following provokes a segfault in the compiler on powerpc-apple-darwin.
8142 Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and
8143 1666 to segfault with e.g., -O2 -mpowerpc64. */
8144
8145#if defined (__GNUC__) && ! defined (__cplusplus)
8146typedef unsigned long long t1;typedef t1*t2;
8147void g(){}
8148void h(){}
8149static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
8150{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
8151void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
8152for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
8153#else
8154int dummy;
8155#endif
8156
8157int main () { return 0; }
8158EOF
8159 echo "Test compile: long long reliability test 1" >&5
8160 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
8161 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8162 (eval $gmp_compile) 2>&5
8163 ac_status=$?
8164 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8165 test $ac_status = 0; }; then
8166 cc_works_part=yes
8167 if test "$cross_compiling" = no; then
8168 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
8169 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8170 (eval $ac_try) 2>&5
8171 ac_status=$?
8172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8173 test $ac_status = 0; }; }; then :;
8174 else
8175 cc_works_part=norun
8176 fi
8177 fi
8178 else
8179 cc_works_part=no
8180 fi
8181 if test "$cc_works_part" != yes; then
8182 echo "failed program was:" >&5
8183 cat conftest.c >&5
8184 fi
8185 rm -f conftest* a.out b.out a.exe a_out.exe
8186 case $cc_works_part in
8187 yes)
8188
8189 ;;
8190 no)
8191 gmp_prog_cc_works="no, long long reliability test 1"
8192 ;;
8193 norun)
8194 gmp_prog_cc_works="no, long long reliability test 1, program does not run"
8195 ;;
8196 esac
8197fi
8198
8199
8200
8201
8202if test "$gmp_prog_cc_works" = yes; then
8203 # remove anything that might look like compiler output to our "||" expression
8204 rm -f conftest* a.out b.out a.exe a_out.exe
8205 cat >conftest.c <<EOF
8206/* The following provokes an internal compiler error on powerpc-apple-darwin.
8207 Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and
8208 1666 to get an ICE with -O1 -mpowerpc64. */
8209
8210#if defined (__GNUC__) && ! defined (__cplusplus)
8211int g();
8212void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
8213int g(){return 0;}
8214#else
8215int dummy;
8216#endif
8217
8218int main () { return 0; }
8219EOF
8220 echo "Test compile: long long reliability test 2" >&5
8221 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
8222 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8223 (eval $gmp_compile) 2>&5
8224 ac_status=$?
8225 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8226 test $ac_status = 0; }; then
8227 cc_works_part=yes
8228 if test "$cross_compiling" = no; then
8229 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
8230 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8231 (eval $ac_try) 2>&5
8232 ac_status=$?
8233 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8234 test $ac_status = 0; }; }; then :;
8235 else
8236 cc_works_part=norun
8237 fi
8238 fi
8239 else
8240 cc_works_part=no
8241 fi
8242 if test "$cc_works_part" != yes; then
8243 echo "failed program was:" >&5
8244 cat conftest.c >&5
8245 fi
8246 rm -f conftest* a.out b.out a.exe a_out.exe
8247 case $cc_works_part in
8248 yes)
8249
8250 ;;
8251 no)
8252 gmp_prog_cc_works="no, long long reliability test 2"
8253 ;;
8254 norun)
8255 gmp_prog_cc_works="no, long long reliability test 2, program does not run"
8256 ;;
8257 esac
8258fi
8259
8260
8261
8262
8263if test "$gmp_prog_cc_works" = yes; then
8264 # remove anything that might look like compiler output to our "||" expression
8265 rm -f conftest* a.out b.out a.exe a_out.exe
8266 cat >conftest.c <<EOF
8267/* Provokes an ICE on i386-freebsd with the FreeBSD-hacked gcc, under
8268 -O2 -march=amdfam10. We call helper functions here "open" and "close" in
8269 order for linking to succeed. */
8270
8271#if defined (__GNUC__) && ! defined (__cplusplus)
8272int open(int*,int*,int);void*close(int);void g(int*rp,int*up,int un){
8273__builtin_expect(un<=0x7f00,1)?__builtin_alloca(un):close(un);if(__builtin_clzl
8274(up[un])){open(rp,up,un);while(1){if(rp[un-1]!=0)break;un--;}}}
8275#else
8276int dummy;
8277#endif
8278
8279int main () { return 0; }
8280EOF
8281 echo "Test compile: freebsd hacked gcc" >&5
8282 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
8283 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8284 (eval $gmp_compile) 2>&5
8285 ac_status=$?
8286 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8287 test $ac_status = 0; }; then
8288 cc_works_part=yes
8289 if test "$cross_compiling" = no; then
8290 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
8291 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8292 (eval $ac_try) 2>&5
8293 ac_status=$?
8294 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8295 test $ac_status = 0; }; }; then :;
8296 else
8297 cc_works_part=norun
8298 fi
8299 fi
8300 else
8301 cc_works_part=no
8302 fi
8303 if test "$cc_works_part" != yes; then
8304 echo "failed program was:" >&5
8305 cat conftest.c >&5
8306 fi
8307 rm -f conftest* a.out b.out a.exe a_out.exe
8308 case $cc_works_part in
8309 yes)
8310
8311 ;;
8312 no)
8313 gmp_prog_cc_works="no, freebsd hacked gcc"
8314 ;;
8315 norun)
8316 gmp_prog_cc_works="no, freebsd hacked gcc, program does not run"
8317 ;;
8318 esac
8319fi
8320
8321
8322
8323
8324if test "$gmp_prog_cc_works" = yes; then
8325 # remove anything that might look like compiler output to our "||" expression
8326 rm -f conftest* a.out b.out a.exe a_out.exe
8327 cat >conftest.c <<EOF
8328/* The following is mis-compiled by HP ia-64 cc version
8329 cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]
8330 under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets
8331 inlined and its return value somehow botched to be 0 instead of 1. This
8332 arises in the real mpn_lshift_com in mul_fft.c. A lower optimization
8333 level, like +O2 seems ok. This code needs to be run to show the problem,
8334 but that's fine, the offending cc is a native-only compiler so we don't
8335 have to worry about cross compiling. */
8336
8337#if ! defined (__cplusplus)
8338unsigned long
8339lshift_com (rp, up, n, cnt)
8340 unsigned long *rp;
8341 unsigned long *up;
8342 long n;
8343 unsigned cnt;
8344{
8345 unsigned long retval, high_limb, low_limb;
8346 unsigned tnc;
8347 long i;
8348 tnc = 8 * sizeof (unsigned long) - cnt;
8349 low_limb = *up++;
8350 retval = low_limb >> tnc;
8351 high_limb = low_limb << cnt;
8352 for (i = n - 1; i != 0; i--)
8353 {
8354 low_limb = *up++;
8355 *rp++ = ~(high_limb | (low_limb >> tnc));
8356 high_limb = low_limb << cnt;
8357 }
8358 return retval;
8359}
8360int
8361main ()
8362{
8363 unsigned long cy, rp[2], up[2];
8364 up[0] = ~ 0L;
8365 up[1] = 0;
8366 cy = lshift_com (rp, up, 2L, 1);
8367 if (cy != 1L)
8368 return 1;
8369 return 0;
8370}
8371#else
8372int
8373main ()
8374{
8375 return 0;
8376}
8377#endif
8378
8379EOF
8380 echo "Test compile: mpn_lshift_com optimization" >&5
8381 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
8382 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8383 (eval $gmp_compile) 2>&5
8384 ac_status=$?
8385 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8386 test $ac_status = 0; }; then
8387 cc_works_part=yes
8388 if test "$cross_compiling" = no; then
8389 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
8390 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8391 (eval $ac_try) 2>&5
8392 ac_status=$?
8393 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8394 test $ac_status = 0; }; }; then :;
8395 else
8396 cc_works_part=norun
8397 fi
8398 fi
8399 else
8400 cc_works_part=no
8401 fi
8402 if test "$cc_works_part" != yes; then
8403 echo "failed program was:" >&5
8404 cat conftest.c >&5
8405 fi
8406 rm -f conftest* a.out b.out a.exe a_out.exe
8407 case $cc_works_part in
8408 yes)
8409
8410 ;;
8411 no)
8412 gmp_prog_cc_works="no, mpn_lshift_com optimization"
8413 ;;
8414 norun)
8415 gmp_prog_cc_works="no, mpn_lshift_com optimization, program does not run"
8416 ;;
8417 esac
8418fi
8419
8420
8421
8422if test "$gmp_prog_cc_works" = yes; then
8423 # remove anything that might look like compiler output to our "||" expression
8424 rm -f conftest* a.out b.out a.exe a_out.exe
8425 cat >conftest.c <<EOF
8426/* The following is mis-compiled by Intel ia-64 icc version 1.8 under
8427 "icc -O3", After several calls, the function writes partial garbage to
8428 the result vector. Perhaps relates to the chk.a.nc insn. This code needs
8429 to be run to show the problem, but that's fine, the offending cc is a
8430 native-only compiler so we don't have to worry about cross compiling. */
8431
8432#if ! defined (__cplusplus)
8433#include <stdlib.h>
8434void
8435lshift_com (rp, up, n, cnt)
8436 unsigned long *rp;
8437 unsigned long *up;
8438 long n;
8439 unsigned cnt;
8440{
8441 unsigned long high_limb, low_limb;
8442 unsigned tnc;
8443 long i;
8444 up += n;
8445 rp += n;
8446 tnc = 8 * sizeof (unsigned long) - cnt;
8447 low_limb = *--up;
8448 high_limb = low_limb << cnt;
8449 for (i = n - 1; i != 0; i--)
8450 {
8451 low_limb = *--up;
8452 *--rp = ~(high_limb | (low_limb >> tnc));
8453 high_limb = low_limb << cnt;
8454 }
8455 *--rp = ~high_limb;
8456}
8457int
8458main ()
8459{
8460 unsigned long *r, *r2;
8461 unsigned long a[88 + 1];
8462 long i;
8463 for (i = 0; i < 88 + 1; i++)
8464 a[i] = ~0L;
8465 r = calloc (10000, sizeof (unsigned long));
8466 r2 = r;
8467 for (i = 0; i < 528; i += 23)
8468 {
8469 lshift_com (r2, a,
8470 i / (8 * sizeof (unsigned long)) + 1,
8471 i % (8 * sizeof (unsigned long)));
8472 r2 += 88 + 1;
8473 }
8474 if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 ||
8475 r[2052] != 0 || r[2053] != 0 || r[2054] != 0)
8476 abort ();
8477 free (r);
8478 return 0;
8479}
8480#else
8481int
8482main ()
8483{
8484 return 0;
8485}
8486#endif
8487
8488EOF
8489 echo "Test compile: mpn_lshift_com optimization 2" >&5
8490 gmp_compile="$cc $cflags $cppflags $flag conftest.c >&5"
8491 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8492 (eval $gmp_compile) 2>&5
8493 ac_status=$?
8494 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8495 test $ac_status = 0; }; then
8496 cc_works_part=yes
8497 if test "$cross_compiling" = no; then
8498 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
8499 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
8500 (eval $ac_try) 2>&5
8501 ac_status=$?
8502 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8503 test $ac_status = 0; }; }; then :;
8504 else
8505 cc_works_part=norun
8506 fi
8507 fi
8508 else
8509 cc_works_part=no
8510 fi
8511 if test "$cc_works_part" != yes; then
8512 echo "failed program was:" >&5
8513 cat conftest.c >&5
8514 fi
8515 rm -f conftest* a.out b.out a.exe a_out.exe
8516 case $cc_works_part in
8517 yes)
8518
8519 ;;
8520 no)
8521 gmp_prog_cc_works="no, mpn_lshift_com optimization 2"
8522 ;;
8523 norun)
8524 gmp_prog_cc_works="no, mpn_lshift_com optimization 2, program does not run"
8525 ;;
8526 esac
8527fi
8528
8529
8530
8531
8532# A certain _GLOBAL_OFFSET_TABLE_ problem in past versions of gas, tickled
8533# by recent versions of gcc.
8534#
8535if test "$gmp_prog_cc_works" = yes; then
8536 case $host in
8537 i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*)
8538 # this problem only arises in PIC code, so don't need to test when
8539 # --disable-shared. We don't necessarily have $enable_shared set to
8540 # yes at this point, it will still be unset for the default (which is
8541 # yes); hence the use of "!= no".
8542 if test "$enable_shared" != no; then
8543 echo "Testing gcc GOT with eax emitted" >&5
8544cat >conftest.c <<\EOF
8545int foo;
8546int bar () { return foo; }
8547EOF
8548tmp_got_emitted=no
8549gmp_compile="$cc $cflags $cppflags $flag -fPIC -S conftest.c >&5 2>&1"
8550if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8551 (eval $gmp_compile) 2>&5
8552 ac_status=$?
8553 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8554 test $ac_status = 0; }; then
8555 if grep "addl.*_GLOBAL_OFFSET_TABLE_.*eax" conftest.s >/dev/null; then
8556 tmp_got_emitted=yes
8557 fi
8558fi
8559rm -f conftest.*
8560echo "Result: $tmp_got_emitted" >&5
8561if test "$tmp_got_emitted" = yes; then
8562 echo "Testing gas GOT with eax good" >&5
8563cat >conftest.awk <<\EOF
8564BEGIN {
8565 want[0] = "001"
8566 want[1] = "043"
8567 want[2] = "105"
8568 want[3] = "147"
8569 want[4] = "211"
8570 want[5] = "253"
8571 want[6] = "315"
8572 want[7] = "357"
8573
8574 want[8] = "005"
8575 want[9] = "002"
8576 want[10] = "000"
8577 want[11] = "000"
8578 want[12] = "000"
8579
8580 want[13] = "376"
8581 want[14] = "334"
8582 want[15] = "272"
8583 want[16] = "230"
8584 want[17] = "166"
8585 want[18] = "124"
8586 want[19] = "062"
8587 want[20] = "020"
8588
8589 result = "yes"
8590}
8591{
8592 for (f = 2; f <= NF; f++)
8593 {
8594 for (i = 0; i < 20; i++)
8595 got[i] = got[i+1];
8596 got[20] = $f;
8597
8598 found = 1
8599 for (i = 0; i < 21; i++)
8600 if (got[i] != want[i])
8601 {
8602 found = 0
8603 break
8604 }
8605 if (found)
8606 {
8607 result = "no"
8608 exit
8609 }
8610 }
8611}
8612END {
8613 print result
8614}
8615EOF
8616cat >conftest.s <<\EOF
8617 .text
8618 .byte 1, 35, 69, 103, 137, 171, 205, 239
8619 addl $_GLOBAL_OFFSET_TABLE_, %eax
8620 .byte 254, 220, 186, 152, 118, 84, 50, 16
8621EOF
8622tmp_got_good=yes
8623gmp_compile="$cc $cflags $cppflags $flag -fPIC -o conftest.o -c conftest.s >&5 2>&1"
8624if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
8625 (eval $gmp_compile) 2>&5
8626 ac_status=$?
8627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8628 test $ac_status = 0; }; then
8629 tmp_got_good=`od -b conftest.o | $AWK -f conftest.awk`
8630fi
8631rm -f conftest.*
8632echo "Result: $tmp_got_good" >&5
8633if test "$tmp_got_good" = no; then
8634 gmp_prog_cc_works="no, bad gas GOT with eax"
8635else
8636 :
8637fi
8638
8639else
8640 :
8641fi
8642
8643 fi
8644 ;;
8645 esac
8646fi
8647
8648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cc_works" >&5
8649$as_echo "$gmp_prog_cc_works" >&6; }
8650case $gmp_prog_cc_works in
8651 yes)
8652 cflags="$cflags $flag"
8653 break
8654 ;;
8655 *)
8656
8657 ;;
8658esac
8659
8660 done
8661 done
8662 fi
8663
8664 ABI="$abi"
8665 CC="$cc"
8666 CFLAGS="$cflags"
8667 CPPFLAGS="$cppflags"
8668
8669 # Could easily have this in config.h too, if desired.
8670 ABI_nodots=`echo $ABI | sed 's/\./_/'`
8671
8672echo "define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')" >> $gmp_tmpconfigm4p
8673
8674
8675 eval GMP_NONSTD_ABI=\"\$GMP_NONSTD_ABI_$ABI_nodots\"
8676
8677 # GMP_LDFLAGS substitution, selected according to ABI.
8678 # These are needed on libgmp.la and libmp.la, but currently not on
8679 # convenience libraries like tune/libspeed.la or mpz/libmpz.la.
8680 #
8681 eval GMP_LDFLAGS=\"\$${ccbase}${abi1}_ldflags\"
8682 test -n "$GMP_LDFLAGS" || eval GMP_LDFLAGS=\"\$${ccbase}${abi1}_ldflags\"
8683
8684
8685
8686
8687 # extra_functions, selected according to ABI
8688 eval tmp=\"\$extra_functions$abi1\"
8689 test -n "$tmp" || eval tmp=\"\$extra_functions$abi2\"
8690 extra_functions="$tmp"
8691
8692
8693 # Cycle counter, selected according to ABI.
8694 #
8695 eval tmp=\"\$SPEED_CYCLECOUNTER_OBJ$abi1\"
8696 test -n "$tmp" || eval tmp=\"\$SPEED_CYCLECOUNTER_OBJ$abi2\"
8697 SPEED_CYCLECOUNTER_OBJ="$tmp"
8698 eval tmp=\"\$cyclecounter_size$abi1\"
8699 test -n "$tmp" || eval tmp=\"\$cyclecounter_size$abi2\"
8700 cyclecounter_size="$tmp"
8701
8702 if test -n "$SPEED_CYCLECOUNTER_OBJ"; then
8703
8704cat >>confdefs.h <<_ACEOF
8705#define HAVE_SPEED_CYCLECOUNTER $cyclecounter_size
8706_ACEOF
8707
8708 fi
8709
8710
8711
8712 # Calling conventions checking, selected according to ABI.
8713 #
8714 eval tmp=\"\$CALLING_CONVENTIONS_OBJS$abi1\"
8715 test -n "$tmp" || eval tmp=\"\$CALLING_CONVENTIONS_OBJS$abi2\"
8716 if test "$enable_assembly" = "yes"; then
8717 CALLING_CONVENTIONS_OBJS="$tmp"
8718 else
8719 CALLING_CONVENTIONS_OBJS=""
8720 fi
8721
8722 if test -n "$CALLING_CONVENTIONS_OBJS"; then
8723
8724$as_echo "#define HAVE_CALLING_CONVENTIONS 1" >>confdefs.h
8725
8726 fi
8727
8728
8729fi
8730
8731
8732# If the user gave an MPN_PATH, use that verbatim, otherwise choose
8733# according to the ABI and add "generic".
8734#
8735if test -n "$MPN_PATH"; then
8736 path="$MPN_PATH"
8737else
8738 eval tmp=\"\$path$abi1\"
8739 test -n "$tmp" || eval tmp=\"\$path$abi2\"
8740 path="$tmp generic"
8741fi
8742
8743
8744# Long long limb setup for gmp.h.
8745case $limb_chosen in
8746longlong) DEFN_LONG_LONG_LIMB="#define _LONG_LONG_LIMB 1" ;;
8747*) DEFN_LONG_LONG_LIMB="/* #undef _LONG_LONG_LIMB */" ;;
8748esac
8749
8750
8751
8752# The C compiler and preprocessor, put into ANSI mode if possible.
8753ac_ext=c
8754ac_cpp='$CPP $CPPFLAGS'
8755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8757ac_compiler_gnu=$ac_cv_c_compiler_gnu
8758if test -n "$ac_tool_prefix"; then
8759 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
8760set dummy ${ac_tool_prefix}gcc; ac_word=$2
8761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8762$as_echo_n "checking for $ac_word... " >&6; }
8763if ${ac_cv_prog_CC+:} false; then :
8764 $as_echo_n "(cached) " >&6
8765else
8766 if test -n "$CC"; then
8767 ac_cv_prog_CC="$CC" # Let the user override the test.
8768else
8769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8770for as_dir in $PATH
8771do
8772 IFS=$as_save_IFS
8773 test -z "$as_dir" && as_dir=.
8774 for ac_exec_ext in '' $ac_executable_extensions; do
8775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8776 ac_cv_prog_CC="${ac_tool_prefix}gcc"
8777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8778 break 2
8779 fi
8780done
8781 done
8782IFS=$as_save_IFS
8783
8784fi
8785fi
8786CC=$ac_cv_prog_CC
8787if test -n "$CC"; then
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8789$as_echo "$CC" >&6; }
8790else
8791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792$as_echo "no" >&6; }
8793fi
8794
8795
8796fi
8797if test -z "$ac_cv_prog_CC"; then
8798 ac_ct_CC=$CC
8799 # Extract the first word of "gcc", so it can be a program name with args.
8800set dummy gcc; ac_word=$2
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8802$as_echo_n "checking for $ac_word... " >&6; }
8803if ${ac_cv_prog_ac_ct_CC+:} false; then :
8804 $as_echo_n "(cached) " >&6
8805else
8806 if test -n "$ac_ct_CC"; then
8807 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8808else
8809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8810for as_dir in $PATH
8811do
8812 IFS=$as_save_IFS
8813 test -z "$as_dir" && as_dir=.
8814 for ac_exec_ext in '' $ac_executable_extensions; do
8815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8816 ac_cv_prog_ac_ct_CC="gcc"
8817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8818 break 2
8819 fi
8820done
8821 done
8822IFS=$as_save_IFS
8823
8824fi
8825fi
8826ac_ct_CC=$ac_cv_prog_ac_ct_CC
8827if test -n "$ac_ct_CC"; then
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8829$as_echo "$ac_ct_CC" >&6; }
8830else
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8832$as_echo "no" >&6; }
8833fi
8834
8835 if test "x$ac_ct_CC" = x; then
8836 CC=""
8837 else
8838 case $cross_compiling:$ac_tool_warned in
8839yes:)
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8841$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8842ac_tool_warned=yes ;;
8843esac
8844 CC=$ac_ct_CC
8845 fi
8846else
8847 CC="$ac_cv_prog_CC"
8848fi
8849
8850if test -z "$CC"; then
8851 if test -n "$ac_tool_prefix"; then
8852 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
8853set dummy ${ac_tool_prefix}cc; ac_word=$2
8854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8855$as_echo_n "checking for $ac_word... " >&6; }
8856if ${ac_cv_prog_CC+:} false; then :
8857 $as_echo_n "(cached) " >&6
8858else
8859 if test -n "$CC"; then
8860 ac_cv_prog_CC="$CC" # Let the user override the test.
8861else
8862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8863for as_dir in $PATH
8864do
8865 IFS=$as_save_IFS
8866 test -z "$as_dir" && as_dir=.
8867 for ac_exec_ext in '' $ac_executable_extensions; do
8868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8869 ac_cv_prog_CC="${ac_tool_prefix}cc"
8870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8871 break 2
8872 fi
8873done
8874 done
8875IFS=$as_save_IFS
8876
8877fi
8878fi
8879CC=$ac_cv_prog_CC
8880if test -n "$CC"; then
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8882$as_echo "$CC" >&6; }
8883else
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8885$as_echo "no" >&6; }
8886fi
8887
8888
8889 fi
8890fi
8891if test -z "$CC"; then
8892 # Extract the first word of "cc", so it can be a program name with args.
8893set dummy cc; ac_word=$2
8894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8895$as_echo_n "checking for $ac_word... " >&6; }
8896if ${ac_cv_prog_CC+:} false; then :
8897 $as_echo_n "(cached) " >&6
8898else
8899 if test -n "$CC"; then
8900 ac_cv_prog_CC="$CC" # Let the user override the test.
8901else
8902 ac_prog_rejected=no
8903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8904for as_dir in $PATH
8905do
8906 IFS=$as_save_IFS
8907 test -z "$as_dir" && as_dir=.
8908 for ac_exec_ext in '' $ac_executable_extensions; do
8909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8910 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
8911 ac_prog_rejected=yes
8912 continue
8913 fi
8914 ac_cv_prog_CC="cc"
8915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916 break 2
8917 fi
8918done
8919 done
8920IFS=$as_save_IFS
8921
8922if test $ac_prog_rejected = yes; then
8923 # We found a bogon in the path, so make sure we never use it.
8924 set dummy $ac_cv_prog_CC
8925 shift
8926 if test $# != 0; then
8927 # We chose a different compiler from the bogus one.
8928 # However, it has the same basename, so the bogon will be chosen
8929 # first if we set CC to just the basename; use the full file name.
8930 shift
8931 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
8932 fi
8933fi
8934fi
8935fi
8936CC=$ac_cv_prog_CC
8937if test -n "$CC"; then
8938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8939$as_echo "$CC" >&6; }
8940else
8941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8942$as_echo "no" >&6; }
8943fi
8944
8945
8946fi
8947if test -z "$CC"; then
8948 if test -n "$ac_tool_prefix"; then
8949 for ac_prog in cl.exe
8950 do
8951 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8952set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8954$as_echo_n "checking for $ac_word... " >&6; }
8955if ${ac_cv_prog_CC+:} false; then :
8956 $as_echo_n "(cached) " >&6
8957else
8958 if test -n "$CC"; then
8959 ac_cv_prog_CC="$CC" # Let the user override the test.
8960else
8961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8962for as_dir in $PATH
8963do
8964 IFS=$as_save_IFS
8965 test -z "$as_dir" && as_dir=.
8966 for ac_exec_ext in '' $ac_executable_extensions; do
8967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8968 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
8969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8970 break 2
8971 fi
8972done
8973 done
8974IFS=$as_save_IFS
8975
8976fi
8977fi
8978CC=$ac_cv_prog_CC
8979if test -n "$CC"; then
8980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8981$as_echo "$CC" >&6; }
8982else
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8984$as_echo "no" >&6; }
8985fi
8986
8987
8988 test -n "$CC" && break
8989 done
8990fi
8991if test -z "$CC"; then
8992 ac_ct_CC=$CC
8993 for ac_prog in cl.exe
8994do
8995 # Extract the first word of "$ac_prog", so it can be a program name with args.
8996set dummy $ac_prog; ac_word=$2
8997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8998$as_echo_n "checking for $ac_word... " >&6; }
8999if ${ac_cv_prog_ac_ct_CC+:} false; then :
9000 $as_echo_n "(cached) " >&6
9001else
9002 if test -n "$ac_ct_CC"; then
9003 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
9004else
9005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9006for as_dir in $PATH
9007do
9008 IFS=$as_save_IFS
9009 test -z "$as_dir" && as_dir=.
9010 for ac_exec_ext in '' $ac_executable_extensions; do
9011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9012 ac_cv_prog_ac_ct_CC="$ac_prog"
9013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9014 break 2
9015 fi
9016done
9017 done
9018IFS=$as_save_IFS
9019
9020fi
9021fi
9022ac_ct_CC=$ac_cv_prog_ac_ct_CC
9023if test -n "$ac_ct_CC"; then
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
9025$as_echo "$ac_ct_CC" >&6; }
9026else
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9028$as_echo "no" >&6; }
9029fi
9030
9031
9032 test -n "$ac_ct_CC" && break
9033done
9034
9035 if test "x$ac_ct_CC" = x; then
9036 CC=""
9037 else
9038 case $cross_compiling:$ac_tool_warned in
9039yes:)
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9042ac_tool_warned=yes ;;
9043esac
9044 CC=$ac_ct_CC
9045 fi
9046fi
9047
9048fi
9049
9050
9051test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9053as_fn_error $? "no acceptable C compiler found in \$PATH
9054See \`config.log' for more details" "$LINENO" 5; }
9055
9056# Provide some information about the compiler.
9057$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
9058set X $ac_compile
9059ac_compiler=$2
9060for ac_option in --version -v -V -qversion; do
9061 { { ac_try="$ac_compiler $ac_option >&5"
9062case "(($ac_try" in
9063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9064 *) ac_try_echo=$ac_try;;
9065esac
9066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9067$as_echo "$ac_try_echo"; } >&5
9068 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
9069 ac_status=$?
9070 if test -s conftest.err; then
9071 sed '10a\
9072... rest of stderr output deleted ...
9073 10q' conftest.err >conftest.er1
9074 cat conftest.er1 >&5
9075 fi
9076 rm -f conftest.er1 conftest.err
9077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9078 test $ac_status = 0; }
9079done
9080
9081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9082/* end confdefs.h. */
9083
9084int
9085main ()
9086{
9087
9088 ;
9089 return 0;
9090}
9091_ACEOF
9092ac_clean_files_save=$ac_clean_files
9093ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
9094# Try to create an executable without -o first, disregard a.out.
9095# It will help us diagnose broken compilers, and finding out an intuition
9096# of exeext.
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
9098$as_echo_n "checking whether the C compiler works... " >&6; }
9099ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
9100
9101# The possible output files:
9102ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
9103
9104ac_rmfiles=
9105for ac_file in $ac_files
9106do
9107 case $ac_file in
9108 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
9109 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
9110 esac
9111done
9112rm -f $ac_rmfiles
9113
9114if { { ac_try="$ac_link_default"
9115case "(($ac_try" in
9116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9117 *) ac_try_echo=$ac_try;;
9118esac
9119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9120$as_echo "$ac_try_echo"; } >&5
9121 (eval "$ac_link_default") 2>&5
9122 ac_status=$?
9123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9124 test $ac_status = 0; }; then :
9125 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
9126# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
9127# in a Makefile. We should not override ac_cv_exeext if it was cached,
9128# so that the user can short-circuit this test for compilers unknown to
9129# Autoconf.
9130for ac_file in $ac_files ''
9131do
9132 test -f "$ac_file" || continue
9133 case $ac_file in
9134 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
9135 ;;
9136 [ab].out )
9137 # We found the default executable, but exeext='' is most
9138 # certainly right.
9139 break;;
9140 *.* )
9141 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
9142 then :; else
9143 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
9144 fi
9145 # We set ac_cv_exeext here because the later test for it is not
9146 # safe: cross compilers may not add the suffix if given an `-o'
9147 # argument, so we may need to know it at that point already.
9148 # Even if this section looks crufty: it has the advantage of
9149 # actually working.
9150 break;;
9151 * )
9152 break;;
9153 esac
9154done
9155test "$ac_cv_exeext" = no && ac_cv_exeext=
9156
9157else
9158 ac_file=''
9159fi
9160if test -z "$ac_file"; then :
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9162$as_echo "no" >&6; }
9163$as_echo "$as_me: failed program was:" >&5
9164sed 's/^/| /' conftest.$ac_ext >&5
9165
9166{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9168as_fn_error 77 "C compiler cannot create executables
9169See \`config.log' for more details" "$LINENO" 5; }
9170else
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9172$as_echo "yes" >&6; }
9173fi
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
9175$as_echo_n "checking for C compiler default output file name... " >&6; }
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
9177$as_echo "$ac_file" >&6; }
9178ac_exeext=$ac_cv_exeext
9179
9180rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
9181ac_clean_files=$ac_clean_files_save
9182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
9183$as_echo_n "checking for suffix of executables... " >&6; }
9184if { { ac_try="$ac_link"
9185case "(($ac_try" in
9186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9187 *) ac_try_echo=$ac_try;;
9188esac
9189eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9190$as_echo "$ac_try_echo"; } >&5
9191 (eval "$ac_link") 2>&5
9192 ac_status=$?
9193 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9194 test $ac_status = 0; }; then :
9195 # If both `conftest.exe' and `conftest' are `present' (well, observable)
9196# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
9197# work properly (i.e., refer to `conftest.exe'), while it won't with
9198# `rm'.
9199for ac_file in conftest.exe conftest conftest.*; do
9200 test -f "$ac_file" || continue
9201 case $ac_file in
9202 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
9203 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
9204 break;;
9205 * ) break;;
9206 esac
9207done
9208else
9209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9210$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9211as_fn_error $? "cannot compute suffix of executables: cannot compile and link
9212See \`config.log' for more details" "$LINENO" 5; }
9213fi
9214rm -f conftest conftest$ac_cv_exeext
9215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
9216$as_echo "$ac_cv_exeext" >&6; }
9217
9218rm -f conftest.$ac_ext
9219EXEEXT=$ac_cv_exeext
9220ac_exeext=$EXEEXT
9221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9222/* end confdefs.h. */
9223#include <stdio.h>
9224int
9225main ()
9226{
9227FILE *f = fopen ("conftest.out", "w");
9228 return ferror (f) || fclose (f) != 0;
9229
9230 ;
9231 return 0;
9232}
9233_ACEOF
9234ac_clean_files="$ac_clean_files conftest.out"
9235# Check that the compiler produces executables we can run. If not, either
9236# the compiler is broken, or we cross compile.
9237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
9238$as_echo_n "checking whether we are cross compiling... " >&6; }
9239if test "$cross_compiling" != yes; then
9240 { { ac_try="$ac_link"
9241case "(($ac_try" in
9242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9243 *) ac_try_echo=$ac_try;;
9244esac
9245eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9246$as_echo "$ac_try_echo"; } >&5
9247 (eval "$ac_link") 2>&5
9248 ac_status=$?
9249 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9250 test $ac_status = 0; }
9251 if { ac_try='./conftest$ac_cv_exeext'
9252 { { case "(($ac_try" in
9253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9254 *) ac_try_echo=$ac_try;;
9255esac
9256eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9257$as_echo "$ac_try_echo"; } >&5
9258 (eval "$ac_try") 2>&5
9259 ac_status=$?
9260 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9261 test $ac_status = 0; }; }; then
9262 cross_compiling=no
9263 else
9264 if test "$cross_compiling" = maybe; then
9265 cross_compiling=yes
9266 else
9267 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9268$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9269as_fn_error $? "cannot run C compiled programs.
9270If you meant to cross compile, use \`--host'.
9271See \`config.log' for more details" "$LINENO" 5; }
9272 fi
9273 fi
9274fi
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
9276$as_echo "$cross_compiling" >&6; }
9277
9278rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
9279ac_clean_files=$ac_clean_files_save
9280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
9281$as_echo_n "checking for suffix of object files... " >&6; }
9282if ${ac_cv_objext+:} false; then :
9283 $as_echo_n "(cached) " >&6
9284else
9285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9286/* end confdefs.h. */
9287
9288int
9289main ()
9290{
9291
9292 ;
9293 return 0;
9294}
9295_ACEOF
9296rm -f conftest.o conftest.obj
9297if { { ac_try="$ac_compile"
9298case "(($ac_try" in
9299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9300 *) ac_try_echo=$ac_try;;
9301esac
9302eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9303$as_echo "$ac_try_echo"; } >&5
9304 (eval "$ac_compile") 2>&5
9305 ac_status=$?
9306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9307 test $ac_status = 0; }; then :
9308 for ac_file in conftest.o conftest.obj conftest.*; do
9309 test -f "$ac_file" || continue;
9310 case $ac_file in
9311 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
9312 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
9313 break;;
9314 esac
9315done
9316else
9317 $as_echo "$as_me: failed program was:" >&5
9318sed 's/^/| /' conftest.$ac_ext >&5
9319
9320{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9321$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9322as_fn_error $? "cannot compute suffix of object files: cannot compile
9323See \`config.log' for more details" "$LINENO" 5; }
9324fi
9325rm -f conftest.$ac_cv_objext conftest.$ac_ext
9326fi
9327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
9328$as_echo "$ac_cv_objext" >&6; }
9329OBJEXT=$ac_cv_objext
9330ac_objext=$OBJEXT
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
9332$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
9333if ${ac_cv_c_compiler_gnu+:} false; then :
9334 $as_echo_n "(cached) " >&6
9335else
9336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9337/* end confdefs.h. */
9338
9339int
9340main ()
9341{
9342#ifndef __GNUC__
9343 choke me
9344#endif
9345
9346 ;
9347 return 0;
9348}
9349_ACEOF
9350if ac_fn_c_try_compile "$LINENO"; then :
9351 ac_compiler_gnu=yes
9352else
9353 ac_compiler_gnu=no
9354fi
9355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9356ac_cv_c_compiler_gnu=$ac_compiler_gnu
9357
9358fi
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
9360$as_echo "$ac_cv_c_compiler_gnu" >&6; }
9361if test $ac_compiler_gnu = yes; then
9362 GCC=yes
9363else
9364 GCC=
9365fi
9366ac_test_CFLAGS=${CFLAGS+set}
9367ac_save_CFLAGS=$CFLAGS
9368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
9369$as_echo_n "checking whether $CC accepts -g... " >&6; }
9370if ${ac_cv_prog_cc_g+:} false; then :
9371 $as_echo_n "(cached) " >&6
9372else
9373 ac_save_c_werror_flag=$ac_c_werror_flag
9374 ac_c_werror_flag=yes
9375 ac_cv_prog_cc_g=no
9376 CFLAGS="-g"
9377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9378/* end confdefs.h. */
9379
9380int
9381main ()
9382{
9383
9384 ;
9385 return 0;
9386}
9387_ACEOF
9388if ac_fn_c_try_compile "$LINENO"; then :
9389 ac_cv_prog_cc_g=yes
9390else
9391 CFLAGS=""
9392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9393/* end confdefs.h. */
9394
9395int
9396main ()
9397{
9398
9399 ;
9400 return 0;
9401}
9402_ACEOF
9403if ac_fn_c_try_compile "$LINENO"; then :
9404
9405else
9406 ac_c_werror_flag=$ac_save_c_werror_flag
9407 CFLAGS="-g"
9408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9409/* end confdefs.h. */
9410
9411int
9412main ()
9413{
9414
9415 ;
9416 return 0;
9417}
9418_ACEOF
9419if ac_fn_c_try_compile "$LINENO"; then :
9420 ac_cv_prog_cc_g=yes
9421fi
9422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9423fi
9424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9425fi
9426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9427 ac_c_werror_flag=$ac_save_c_werror_flag
9428fi
9429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
9430$as_echo "$ac_cv_prog_cc_g" >&6; }
9431if test "$ac_test_CFLAGS" = set; then
9432 CFLAGS=$ac_save_CFLAGS
9433elif test $ac_cv_prog_cc_g = yes; then
9434 if test "$GCC" = yes; then
9435 CFLAGS="-g -O2"
9436 else
9437 CFLAGS="-g"
9438 fi
9439else
9440 if test "$GCC" = yes; then
9441 CFLAGS="-O2"
9442 else
9443 CFLAGS=
9444 fi
9445fi
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
9447$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
9448if ${ac_cv_prog_cc_c89+:} false; then :
9449 $as_echo_n "(cached) " >&6
9450else
9451 ac_cv_prog_cc_c89=no
9452ac_save_CC=$CC
9453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9454/* end confdefs.h. */
9455#include <stdarg.h>
9456#include <stdio.h>
9457struct stat;
9458/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
9459struct buf { int x; };
9460FILE * (*rcsopen) (struct buf *, struct stat *, int);
9461static char *e (p, i)
9462 char **p;
9463 int i;
9464{
9465 return p[i];
9466}
9467static char *f (char * (*g) (char **, int), char **p, ...)
9468{
9469 char *s;
9470 va_list v;
9471 va_start (v,p);
9472 s = g (p, va_arg (v,int));
9473 va_end (v);
9474 return s;
9475}
9476
9477/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
9478 function prototypes and stuff, but not '\xHH' hex character constants.
9479 These don't provoke an error unfortunately, instead are silently treated
9480 as 'x'. The following induces an error, until -std is added to get
9481 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
9482 array size at least. It's necessary to write '\x00'==0 to get something
9483 that's true only with -std. */
9484int osf4_cc_array ['\x00' == 0 ? 1 : -1];
9485
9486/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
9487 inside strings and character constants. */
9488#define FOO(x) 'x'
9489int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
9490
9491int test (int i, double x);
9492struct s1 {int (*f) (int a);};
9493struct s2 {int (*f) (double a);};
9494int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
9495int argc;
9496char **argv;
9497int
9498main ()
9499{
9500return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
9501 ;
9502 return 0;
9503}
9504_ACEOF
9505for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
9506 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
9507do
9508 CC="$ac_save_CC $ac_arg"
9509 if ac_fn_c_try_compile "$LINENO"; then :
9510 ac_cv_prog_cc_c89=$ac_arg
9511fi
9512rm -f core conftest.err conftest.$ac_objext
9513 test "x$ac_cv_prog_cc_c89" != "xno" && break
9514done
9515rm -f conftest.$ac_ext
9516CC=$ac_save_CC
9517
9518fi
9519# AC_CACHE_VAL
9520case "x$ac_cv_prog_cc_c89" in
9521 x)
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
9523$as_echo "none needed" >&6; } ;;
9524 xno)
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
9526$as_echo "unsupported" >&6; } ;;
9527 *)
9528 CC="$CC $ac_cv_prog_cc_c89"
9529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
9530$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
9531esac
9532if test "x$ac_cv_prog_cc_c89" != xno; then :
9533
9534fi
9535
9536ac_ext=c
9537ac_cpp='$CPP $CPPFLAGS'
9538ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9539ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9540ac_compiler_gnu=$ac_cv_c_compiler_gnu
9541
9542ac_ext=c
9543ac_cpp='$CPP $CPPFLAGS'
9544ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9545ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9546ac_compiler_gnu=$ac_cv_c_compiler_gnu
9547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
9548$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
9549if ${am_cv_prog_cc_c_o+:} false; then :
9550 $as_echo_n "(cached) " >&6
9551else
9552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9553/* end confdefs.h. */
9554
9555int
9556main ()
9557{
9558
9559 ;
9560 return 0;
9561}
9562_ACEOF
9563 # Make sure it works both with $CC and with simple cc.
9564 # Following AC_PROG_CC_C_O, we do the test twice because some
9565 # compilers refuse to overwrite an existing .o file with -o,
9566 # though they will create one.
9567 am_cv_prog_cc_c_o=yes
9568 for am_i in 1 2; do
9569 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
9570 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
9571 ac_status=$?
9572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9573 (exit $ac_status); } \
9574 && test -f conftest2.$ac_objext; then
9575 : OK
9576 else
9577 am_cv_prog_cc_c_o=no
9578 break
9579 fi
9580 done
9581 rm -f core conftest*
9582 unset am_i
9583fi
9584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
9585$as_echo "$am_cv_prog_cc_c_o" >&6; }
9586if test "$am_cv_prog_cc_c_o" != yes; then
9587 # Losing compiler, so override with the script.
9588 # FIXME: It is wrong to rewrite CC.
9589 # But if we don't then we get into trouble of one sort or another.
9590 # A longer-term fix would be to have automake use am__CC in this case,
9591 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9592 CC="$am_aux_dir/compile $CC"
9593fi
9594ac_ext=c
9595ac_cpp='$CPP $CPPFLAGS'
9596ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9597ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9598ac_compiler_gnu=$ac_cv_c_compiler_gnu
9599
9600
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
9602$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
9603if ${ac_cv_prog_cc_c99+:} false; then :
9604 $as_echo_n "(cached) " >&6
9605else
9606 ac_cv_prog_cc_c99=no
9607ac_save_CC=$CC
9608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9609/* end confdefs.h. */
9610#include <stdarg.h>
9611#include <stdbool.h>
9612#include <stdlib.h>
9613#include <wchar.h>
9614#include <stdio.h>
9615
9616// Check varargs macros. These examples are taken from C99 6.10.3.5.
9617#define debug(...) fprintf (stderr, __VA_ARGS__)
9618#define showlist(...) puts (#__VA_ARGS__)
9619#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
9620static void
9621test_varargs_macros (void)
9622{
9623 int x = 1234;
9624 int y = 5678;
9625 debug ("Flag");
9626 debug ("X = %d\n", x);
9627 showlist (The first, second, and third items.);
9628 report (x>y, "x is %d but y is %d", x, y);
9629}
9630
9631// Check long long types.
9632#define BIG64 18446744073709551615ull
9633#define BIG32 4294967295ul
9634#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
9635#if !BIG_OK
9636 your preprocessor is broken;
9637#endif
9638#if BIG_OK
9639#else
9640 your preprocessor is broken;
9641#endif
9642static long long int bignum = -9223372036854775807LL;
9643static unsigned long long int ubignum = BIG64;
9644
9645struct incomplete_array
9646{
9647 int datasize;
9648 double data[];
9649};
9650
9651struct named_init {
9652 int number;
9653 const wchar_t *name;
9654 double average;
9655};
9656
9657typedef const char *ccp;
9658
9659static inline int
9660test_restrict (ccp restrict text)
9661{
9662 // See if C++-style comments work.
9663 // Iterate through items via the restricted pointer.
9664 // Also check for declarations in for loops.
9665 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
9666 continue;
9667 return 0;
9668}
9669
9670// Check varargs and va_copy.
9671static void
9672test_varargs (const char *format, ...)
9673{
9674 va_list args;
9675 va_start (args, format);
9676 va_list args_copy;
9677 va_copy (args_copy, args);
9678
9679 const char *str;
9680 int number;
9681 float fnumber;
9682
9683 while (*format)
9684 {
9685 switch (*format++)
9686 {
9687 case 's': // string
9688 str = va_arg (args_copy, const char *);
9689 break;
9690 case 'd': // int
9691 number = va_arg (args_copy, int);
9692 break;
9693 case 'f': // float
9694 fnumber = va_arg (args_copy, double);
9695 break;
9696 default:
9697 break;
9698 }
9699 }
9700 va_end (args_copy);
9701 va_end (args);
9702}
9703
9704int
9705main ()
9706{
9707
9708 // Check bool.
9709 _Bool success = false;
9710
9711 // Check restrict.
9712 if (test_restrict ("String literal") == 0)
9713 success = true;
9714 char *restrict newvar = "Another string";
9715
9716 // Check varargs.
9717 test_varargs ("s, d' f .", "string", 65, 34.234);
9718 test_varargs_macros ();
9719
9720 // Check flexible array members.
9721 struct incomplete_array *ia =
9722 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
9723 ia->datasize = 10;
9724 for (int i = 0; i < ia->datasize; ++i)
9725 ia->data[i] = i * 1.234;
9726
9727 // Check named initializers.
9728 struct named_init ni = {
9729 .number = 34,
9730 .name = L"Test wide string",
9731 .average = 543.34343,
9732 };
9733
9734 ni.number = 58;
9735
9736 int dynamic_array[ni.number];
9737 dynamic_array[ni.number - 1] = 543;
9738
9739 // work around unused variable warnings
9740 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
9741 || dynamic_array[ni.number - 1] != 543);
9742
9743 ;
9744 return 0;
9745}
9746_ACEOF
9747for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
9748do
9749 CC="$ac_save_CC $ac_arg"
9750 if ac_fn_c_try_compile "$LINENO"; then :
9751 ac_cv_prog_cc_c99=$ac_arg
9752fi
9753rm -f core conftest.err conftest.$ac_objext
9754 test "x$ac_cv_prog_cc_c99" != "xno" && break
9755done
9756rm -f conftest.$ac_ext
9757CC=$ac_save_CC
9758
9759fi
9760# AC_CACHE_VAL
9761case "x$ac_cv_prog_cc_c99" in
9762 x)
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
9764$as_echo "none needed" >&6; } ;;
9765 xno)
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
9767$as_echo "unsupported" >&6; } ;;
9768 *)
9769 CC="$CC $ac_cv_prog_cc_c99"
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
9771$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
9772esac
9773if test "x$ac_cv_prog_cc_c99" != xno; then :
9774
9775fi
9776
9777
9778ac_ext=c
9779ac_cpp='$CPP $CPPFLAGS'
9780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9782ac_compiler_gnu=$ac_cv_c_compiler_gnu
9783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
9784$as_echo_n "checking how to run the C preprocessor... " >&6; }
9785# On Suns, sometimes $CPP names a directory.
9786if test -n "$CPP" && test -d "$CPP"; then
9787 CPP=
9788fi
9789if test -z "$CPP"; then
9790 if ${ac_cv_prog_CPP+:} false; then :
9791 $as_echo_n "(cached) " >&6
9792else
9793 # Double quotes because CPP needs to be expanded
9794 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
9795 do
9796 ac_preproc_ok=false
9797for ac_c_preproc_warn_flag in '' yes
9798do
9799 # Use a header file that comes with gcc, so configuring glibc
9800 # with a fresh cross-compiler works.
9801 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9802 # <limits.h> exists even on freestanding compilers.
9803 # On the NeXT, cc -E runs the code through the compiler's parser,
9804 # not just through cpp. "Syntax error" is here to catch this case.
9805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9806/* end confdefs.h. */
9807#ifdef __STDC__
9808# include <limits.h>
9809#else
9810# include <assert.h>
9811#endif
9812 Syntax error
9813_ACEOF
9814if ac_fn_c_try_cpp "$LINENO"; then :
9815
9816else
9817 # Broken: fails on valid input.
9818continue
9819fi
9820rm -f conftest.err conftest.i conftest.$ac_ext
9821
9822 # OK, works on sane cases. Now check whether nonexistent headers
9823 # can be detected and how.
9824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9825/* end confdefs.h. */
9826#include <ac_nonexistent.h>
9827_ACEOF
9828if ac_fn_c_try_cpp "$LINENO"; then :
9829 # Broken: success on invalid input.
9830continue
9831else
9832 # Passes both tests.
9833ac_preproc_ok=:
9834break
9835fi
9836rm -f conftest.err conftest.i conftest.$ac_ext
9837
9838done
9839# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9840rm -f conftest.i conftest.err conftest.$ac_ext
9841if $ac_preproc_ok; then :
9842 break
9843fi
9844
9845 done
9846 ac_cv_prog_CPP=$CPP
9847
9848fi
9849 CPP=$ac_cv_prog_CPP
9850else
9851 ac_cv_prog_CPP=$CPP
9852fi
9853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
9854$as_echo "$CPP" >&6; }
9855ac_preproc_ok=false
9856for ac_c_preproc_warn_flag in '' yes
9857do
9858 # Use a header file that comes with gcc, so configuring glibc
9859 # with a fresh cross-compiler works.
9860 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9861 # <limits.h> exists even on freestanding compilers.
9862 # On the NeXT, cc -E runs the code through the compiler's parser,
9863 # not just through cpp. "Syntax error" is here to catch this case.
9864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9865/* end confdefs.h. */
9866#ifdef __STDC__
9867# include <limits.h>
9868#else
9869# include <assert.h>
9870#endif
9871 Syntax error
9872_ACEOF
9873if ac_fn_c_try_cpp "$LINENO"; then :
9874
9875else
9876 # Broken: fails on valid input.
9877continue
9878fi
9879rm -f conftest.err conftest.i conftest.$ac_ext
9880
9881 # OK, works on sane cases. Now check whether nonexistent headers
9882 # can be detected and how.
9883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9884/* end confdefs.h. */
9885#include <ac_nonexistent.h>
9886_ACEOF
9887if ac_fn_c_try_cpp "$LINENO"; then :
9888 # Broken: success on invalid input.
9889continue
9890else
9891 # Passes both tests.
9892ac_preproc_ok=:
9893break
9894fi
9895rm -f conftest.err conftest.i conftest.$ac_ext
9896
9897done
9898# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9899rm -f conftest.i conftest.err conftest.$ac_ext
9900if $ac_preproc_ok; then :
9901
9902else
9903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9905as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
9906See \`config.log' for more details" "$LINENO" 5; }
9907fi
9908
9909ac_ext=c
9910ac_cpp='$CPP $CPPFLAGS'
9911ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9912ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9913ac_compiler_gnu=$ac_cv_c_compiler_gnu
9914
9915
9916#if test "$ac_cv_prog_cc_c99" = no; then
9917# AC_MSG_ERROR([Cannot find a C99 capable compiler])
9918#fi
9919
9920# The C compiler on the build system, and associated tests.
9921
9922if test -n "$CC_FOR_BUILD"; then
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $CC_FOR_BUILD" >&5
9924$as_echo_n "checking build system compiler $CC_FOR_BUILD... " >&6; }
9925# remove anything that might look like compiler output to our "||" expression
9926rm -f conftest* a.out b.out a.exe a_out.exe
9927cat >conftest.c <<EOF
9928int
9929main ()
9930{
9931 return 0;
9932}
9933EOF
9934gmp_compile="$CC_FOR_BUILD conftest.c"
9935cc_for_build_works=no
9936if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
9937 (eval $gmp_compile) 2>&5
9938 ac_status=$?
9939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9940 test $ac_status = 0; }; then
9941 if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then
9942 cc_for_build_works=yes
9943 fi
9944fi
9945rm -f conftest* a.out b.out a.exe a_out.exe
9946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5
9947$as_echo "$cc_for_build_works" >&6; }
9948if test "$cc_for_build_works" = yes; then
9949 :
9950else
9951 as_fn_error $? "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5
9952fi
9953
9954elif test -n "$HOST_CC"; then
9955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $HOST_CC" >&5
9956$as_echo_n "checking build system compiler $HOST_CC... " >&6; }
9957# remove anything that might look like compiler output to our "||" expression
9958rm -f conftest* a.out b.out a.exe a_out.exe
9959cat >conftest.c <<EOF
9960int
9961main ()
9962{
9963 return 0;
9964}
9965EOF
9966gmp_compile="$HOST_CC conftest.c"
9967cc_for_build_works=no
9968if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
9969 (eval $gmp_compile) 2>&5
9970 ac_status=$?
9971 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9972 test $ac_status = 0; }; then
9973 if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then
9974 cc_for_build_works=yes
9975 fi
9976fi
9977rm -f conftest* a.out b.out a.exe a_out.exe
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5
9979$as_echo "$cc_for_build_works" >&6; }
9980if test "$cc_for_build_works" = yes; then
9981 CC_FOR_BUILD=$HOST_CC
9982else
9983 as_fn_error $? "Specified HOST_CC doesn't seem to work" "$LINENO" 5
9984fi
9985
9986else
9987 for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do
9988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $i" >&5
9989$as_echo_n "checking build system compiler $i... " >&6; }
9990# remove anything that might look like compiler output to our "||" expression
9991rm -f conftest* a.out b.out a.exe a_out.exe
9992cat >conftest.c <<EOF
9993int
9994main ()
9995{
9996 return 0;
9997}
9998EOF
9999gmp_compile="$i conftest.c"
10000cc_for_build_works=no
10001if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
10002 (eval $gmp_compile) 2>&5
10003 ac_status=$?
10004 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10005 test $ac_status = 0; }; then
10006 if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then
10007 cc_for_build_works=yes
10008 fi
10009fi
10010rm -f conftest* a.out b.out a.exe a_out.exe
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5
10012$as_echo "$cc_for_build_works" >&6; }
10013if test "$cc_for_build_works" = yes; then
10014 CC_FOR_BUILD=$i
10015 break
10016else
10017 :
10018fi
10019
10020 done
10021 if test -z "$CC_FOR_BUILD"; then
10022 as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5
10023 fi
10024fi
10025
10026
10027
10028
10029
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system preprocessor" >&5
10031$as_echo_n "checking for build system preprocessor... " >&6; }
10032if test -z "$CPP_FOR_BUILD"; then
10033 if ${gmp_cv_prog_cpp_for_build+:} false; then :
10034 $as_echo_n "(cached) " >&6
10035else
10036 cat >conftest.c <<EOF
10037#define FOO BAR
10038EOF
10039 for i in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" "/lib/cpp"; do
10040 gmp_compile="$i conftest.c"
10041 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
10042 (eval $gmp_compile) 2>&5
10043 ac_status=$?
10044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10045 test $ac_status = 0; } >&5 2>&1; then
10046 gmp_cv_prog_cpp_for_build=$i
10047 break
10048 fi
10049 done
10050 rm -f conftest* a.out b.out a.exe a_out.exe
10051 if test -z "$gmp_cv_prog_cpp_for_build"; then
10052 as_fn_error $? "Cannot find build system C preprocessor." "$LINENO" 5
10053 fi
10054
10055fi
10056
10057 CPP_FOR_BUILD=$gmp_cv_prog_cpp_for_build
10058fi
10059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5
10060$as_echo "$CPP_FOR_BUILD" >&6; }
10061
10062
10063
10064
10065
10066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
10067$as_echo_n "checking for build system executable suffix... " >&6; }
10068if ${gmp_cv_prog_exeext_for_build+:} false; then :
10069 $as_echo_n "(cached) " >&6
10070else
10071 cat >conftest.c <<EOF
10072int
10073main ()
10074{
10075 return 0;
10076}
10077EOF
10078for i in .exe ,ff8 ""; do
10079 gmp_compile="$CC_FOR_BUILD conftest.c -o conftest$i"
10080 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
10081 (eval $gmp_compile) 2>&5
10082 ac_status=$?
10083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10084 test $ac_status = 0; }; then
10085 if (./conftest) 2>&5; then
10086 gmp_cv_prog_exeext_for_build=$i
10087 break
10088 fi
10089 fi
10090done
10091rm -f conftest*
10092if test "${gmp_cv_prog_exeext_for_build+set}" != set; then
10093 as_fn_error $? "Cannot determine executable suffix" "$LINENO" 5
10094fi
10095
10096fi
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_prog_exeext_for_build" >&5
10098$as_echo "$gmp_cv_prog_exeext_for_build" >&6; }
10099EXEEXT_FOR_BUILD=$gmp_cv_prog_exeext_for_build
10100
10101
10102
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build system compiler is ANSI" >&5
10104$as_echo_n "checking whether build system compiler is ANSI... " >&6; }
10105if ${gmp_cv_c_for_build_ansi+:} false; then :
10106 $as_echo_n "(cached) " >&6
10107else
10108 cat >conftest.c <<EOF
10109int
10110main (int argc, char **argv)
10111{
10112 return 0;
10113}
10114EOF
10115gmp_compile="$CC_FOR_BUILD conftest.c"
10116if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
10117 (eval $gmp_compile) 2>&5
10118 ac_status=$?
10119 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10120 test $ac_status = 0; }; then
10121 gmp_cv_c_for_build_ansi=yes
10122else
10123 gmp_cv_c_for_build_ansi=no
10124fi
10125rm -f conftest* a.out b.out a.exe a_out.exe
10126
10127fi
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_for_build_ansi" >&5
10129$as_echo "$gmp_cv_c_for_build_ansi" >&6; }
10130if test "$gmp_cv_c_for_build_ansi" = yes; then
10131 U_FOR_BUILD=
10132else
10133 U_FOR_BUILD=_
10134
10135fi
10136
10137
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system compiler math library" >&5
10139$as_echo_n "checking for build system compiler math library... " >&6; }
10140if ${gmp_cv_check_libm_for_build+:} false; then :
10141 $as_echo_n "(cached) " >&6
10142else
10143 cat >conftest.c <<EOF
10144#include <math.h>
10145int
10146main ()
10147{
10148 return 0;
10149}
10150double d;
10151double
10152foo ()
10153{
10154 return log (d);
10155}
10156EOF
10157gmp_compile="$CC_FOR_BUILD conftest.c -lm"
10158if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
10159 (eval $gmp_compile) 2>&5
10160 ac_status=$?
10161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10162 test $ac_status = 0; }; then
10163 gmp_cv_check_libm_for_build=-lm
10164else
10165 gmp_cv_check_libm_for_build=no
10166fi
10167rm -f conftest* a.out b.out a.exe a_out.exe
10168
10169fi
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_check_libm_for_build" >&5
10171$as_echo "$gmp_cv_check_libm_for_build" >&6; }
10172case $gmp_cv_check_libm_for_build in
10173 yes) LIBM_FOR_BUILD=-lm
10174 ;;
10175 no) LIBM_FOR_BUILD= ;;
10176 *) LIBM_FOR_BUILD=$gmp_cv_check_libm_for_build ;;
10177esac
10178
10179
10180
10181# How to assemble, used with CFLAGS etc, see mpn/Makeasm.am.
10182# Using the compiler is a lot easier than figuring out how to invoke the
10183# assembler directly.
10184#
10185test -n "$CCAS" || CCAS="$CC -c"
10186
10187
10188
10189# The C++ compiler, if desired.
10190want_cxx=no
10191if test $enable_cxx != no; then
10192 test_CXXFLAGS=${CXXFLAGS+set}
10193 ac_ext=cpp
10194ac_cpp='$CXXCPP $CPPFLAGS'
10195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10198if test -z "$CXX"; then
10199 if test -n "$CCC"; then
10200 CXX=$CCC
10201 else
10202 if test -n "$ac_tool_prefix"; then
10203 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
10204 do
10205 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10206set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10208$as_echo_n "checking for $ac_word... " >&6; }
10209if ${ac_cv_prog_CXX+:} false; then :
10210 $as_echo_n "(cached) " >&6
10211else
10212 if test -n "$CXX"; then
10213 ac_cv_prog_CXX="$CXX" # Let the user override the test.
10214else
10215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10216for as_dir in $PATH
10217do
10218 IFS=$as_save_IFS
10219 test -z "$as_dir" && as_dir=.
10220 for ac_exec_ext in '' $ac_executable_extensions; do
10221 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10222 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
10223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10224 break 2
10225 fi
10226done
10227 done
10228IFS=$as_save_IFS
10229
10230fi
10231fi
10232CXX=$ac_cv_prog_CXX
10233if test -n "$CXX"; then
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
10235$as_echo "$CXX" >&6; }
10236else
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
10239fi
10240
10241
10242 test -n "$CXX" && break
10243 done
10244fi
10245if test -z "$CXX"; then
10246 ac_ct_CXX=$CXX
10247 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
10248do
10249 # Extract the first word of "$ac_prog", so it can be a program name with args.
10250set dummy $ac_prog; ac_word=$2
10251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10252$as_echo_n "checking for $ac_word... " >&6; }
10253if ${ac_cv_prog_ac_ct_CXX+:} false; then :
10254 $as_echo_n "(cached) " >&6
10255else
10256 if test -n "$ac_ct_CXX"; then
10257 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
10258else
10259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262 IFS=$as_save_IFS
10263 test -z "$as_dir" && as_dir=.
10264 for ac_exec_ext in '' $ac_executable_extensions; do
10265 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266 ac_cv_prog_ac_ct_CXX="$ac_prog"
10267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268 break 2
10269 fi
10270done
10271 done
10272IFS=$as_save_IFS
10273
10274fi
10275fi
10276ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
10277if test -n "$ac_ct_CXX"; then
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
10279$as_echo "$ac_ct_CXX" >&6; }
10280else
10281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
10283fi
10284
10285
10286 test -n "$ac_ct_CXX" && break
10287done
10288
10289 if test "x$ac_ct_CXX" = x; then
10290 CXX="g++"
10291 else
10292 case $cross_compiling:$ac_tool_warned in
10293yes:)
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10296ac_tool_warned=yes ;;
10297esac
10298 CXX=$ac_ct_CXX
10299 fi
10300fi
10301
10302 fi
10303fi
10304# Provide some information about the compiler.
10305$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
10306set X $ac_compile
10307ac_compiler=$2
10308for ac_option in --version -v -V -qversion; do
10309 { { ac_try="$ac_compiler $ac_option >&5"
10310case "(($ac_try" in
10311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10312 *) ac_try_echo=$ac_try;;
10313esac
10314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
10315$as_echo "$ac_try_echo"; } >&5
10316 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
10317 ac_status=$?
10318 if test -s conftest.err; then
10319 sed '10a\
10320... rest of stderr output deleted ...
10321 10q' conftest.err >conftest.er1
10322 cat conftest.er1 >&5
10323 fi
10324 rm -f conftest.er1 conftest.err
10325 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10326 test $ac_status = 0; }
10327done
10328
10329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
10330$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
10331if ${ac_cv_cxx_compiler_gnu+:} false; then :
10332 $as_echo_n "(cached) " >&6
10333else
10334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10335/* end confdefs.h. */
10336
10337int
10338main ()
10339{
10340#ifndef __GNUC__
10341 choke me
10342#endif
10343
10344 ;
10345 return 0;
10346}
10347_ACEOF
10348if ac_fn_cxx_try_compile "$LINENO"; then :
10349 ac_compiler_gnu=yes
10350else
10351 ac_compiler_gnu=no
10352fi
10353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10354ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
10355
10356fi
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
10358$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
10359if test $ac_compiler_gnu = yes; then
10360 GXX=yes
10361else
10362 GXX=
10363fi
10364ac_test_CXXFLAGS=${CXXFLAGS+set}
10365ac_save_CXXFLAGS=$CXXFLAGS
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
10367$as_echo_n "checking whether $CXX accepts -g... " >&6; }
10368if ${ac_cv_prog_cxx_g+:} false; then :
10369 $as_echo_n "(cached) " >&6
10370else
10371 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
10372 ac_cxx_werror_flag=yes
10373 ac_cv_prog_cxx_g=no
10374 CXXFLAGS="-g"
10375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10376/* end confdefs.h. */
10377
10378int
10379main ()
10380{
10381
10382 ;
10383 return 0;
10384}
10385_ACEOF
10386if ac_fn_cxx_try_compile "$LINENO"; then :
10387 ac_cv_prog_cxx_g=yes
10388else
10389 CXXFLAGS=""
10390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10391/* end confdefs.h. */
10392
10393int
10394main ()
10395{
10396
10397 ;
10398 return 0;
10399}
10400_ACEOF
10401if ac_fn_cxx_try_compile "$LINENO"; then :
10402
10403else
10404 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
10405 CXXFLAGS="-g"
10406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10407/* end confdefs.h. */
10408
10409int
10410main ()
10411{
10412
10413 ;
10414 return 0;
10415}
10416_ACEOF
10417if ac_fn_cxx_try_compile "$LINENO"; then :
10418 ac_cv_prog_cxx_g=yes
10419fi
10420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10421fi
10422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10423fi
10424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10425 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
10426fi
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
10428$as_echo "$ac_cv_prog_cxx_g" >&6; }
10429if test "$ac_test_CXXFLAGS" = set; then
10430 CXXFLAGS=$ac_save_CXXFLAGS
10431elif test $ac_cv_prog_cxx_g = yes; then
10432 if test "$GXX" = yes; then
10433 CXXFLAGS="-g -O2"
10434 else
10435 CXXFLAGS="-g"
10436 fi
10437else
10438 if test "$GXX" = yes; then
10439 CXXFLAGS="-O2"
10440 else
10441 CXXFLAGS=
10442 fi
10443fi
10444ac_ext=c
10445ac_cpp='$CPP $CPPFLAGS'
10446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10448ac_compiler_gnu=$ac_cv_c_compiler_gnu
10449
10450
10451 echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&5
10452 cxxflags_ac_prog_cxx=$CXXFLAGS
10453 cxxflags_list=ac_prog_cxx
10454
10455 # If the user didn't specify $CXXFLAGS, then try $CFLAGS, with -g removed
10456 # if AC_PROG_CXX thinks that doesn't work. $CFLAGS stands a good chance
10457 # of working, eg. on a GNU system where CC=gcc and CXX=g++.
10458 #
10459 if test "$test_CXXFLAGS" != set; then
10460 cxxflags_cflags=$CFLAGS
10461 cxxflags_list="cflags $cxxflags_list"
10462 if test "$ac_prog_cxx_g" = no; then
10463 cxxflags_cflags=`echo "$cxxflags_cflags" | sed -e 's/ -g //' -e 's/^-g //' -e 's/ -g$//'`
10464 fi
10465 fi
10466
10467 # See if the C++ compiler works. If the user specified CXXFLAGS then all
10468 # we're doing is checking whether AC_PROG_CXX succeeded, since it doesn't
10469 # give a fatal error, just leaves CXX set to a default g++. If on the
10470 # other hand the user didn't specify CXXFLAGS then we get to try here our
10471 # $cxxflags_list alternatives.
10472 #
10473 # Automake includes $CPPFLAGS in a C++ compile, so we do the same here.
10474 #
10475 for cxxflags_choice in $cxxflags_list; do
10476 eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\"
10477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS" >&5
10478$as_echo_n "checking C++ compiler $CXX $CPPFLAGS $CXXFLAGS... " >&6; }
10479gmp_prog_cxx_works=yes
10480
10481# start with a plain "main()", then go on to further checks
10482if test "$gmp_prog_cxx_works" = yes; then
10483 # remove anything that might look like compiler output to our "||" expression
10484 rm -f conftest* a.out b.out a.exe a_out.exe
10485 cat >conftest.cc <<EOF
10486
10487int main (void) { return 0; }
10488EOF
10489 echo "Test compile: " >&5
10490 gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5"
10491 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5
10492 (eval $gmp_cxxcompile) 2>&5
10493 ac_status=$?
10494 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10495 test $ac_status = 0; }; then
10496 if test "$cross_compiling" = no; then
10497 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
10498 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
10499 (eval $ac_try) 2>&5
10500 ac_status=$?
10501 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10502 test $ac_status = 0; }; }; then :;
10503 else
10504 gmp_prog_cxx_works="no, program does not run"
10505 fi
10506 fi
10507 else
10508 gmp_prog_cxx_works="no"
10509 fi
10510 case $gmp_prog_cxx_works in
10511 no*)
10512 echo "failed program was:" >&5
10513 cat conftest.cc >&5
10514 ;;
10515 esac
10516 rm -f conftest* a.out b.out a.exe a_out.exe
10517fi
10518
10519
10520if test "$gmp_prog_cxx_works" = yes; then
10521 # remove anything that might look like compiler output to our "||" expression
10522 rm -f conftest* a.out b.out a.exe a_out.exe
10523 cat >conftest.cc <<EOF
10524namespace foo { }
10525using namespace foo;
10526
10527int main (void) { return 0; }
10528EOF
10529 echo "Test compile: namespace" >&5
10530 gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5"
10531 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5
10532 (eval $gmp_cxxcompile) 2>&5
10533 ac_status=$?
10534 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10535 test $ac_status = 0; }; then
10536 if test "$cross_compiling" = no; then
10537 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
10538 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
10539 (eval $ac_try) 2>&5
10540 ac_status=$?
10541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10542 test $ac_status = 0; }; }; then :;
10543 else
10544 gmp_prog_cxx_works="no, namespace, program does not run"
10545 fi
10546 fi
10547 else
10548 gmp_prog_cxx_works="no, namespace"
10549 fi
10550 case $gmp_prog_cxx_works in
10551 no*)
10552 echo "failed program was:" >&5
10553 cat conftest.cc >&5
10554 ;;
10555 esac
10556 rm -f conftest* a.out b.out a.exe a_out.exe
10557fi
10558
10559
10560# GMP requires the standard C++ iostream classes
10561if test "$gmp_prog_cxx_works" = yes; then
10562 # remove anything that might look like compiler output to our "||" expression
10563 rm -f conftest* a.out b.out a.exe a_out.exe
10564 cat >conftest.cc <<EOF
10565/* This test rejects g++ 2.7.2 which doesn't have <iostream>, only a
10566 pre-standard iostream.h. */
10567#include <iostream>
10568
10569/* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream
10570 mode, since that mode puts cout in the global namespace, not "std". */
10571void someoutput (void) { std::cout << 123; }
10572
10573int main (void) { return 0; }
10574EOF
10575 echo "Test compile: std iostream" >&5
10576 gmp_cxxcompile="$CXX $CPPFLAGS $CXXFLAGS conftest.cc >&5"
10577 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_cxxcompile\""; } >&5
10578 (eval $gmp_cxxcompile) 2>&5
10579 ac_status=$?
10580 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10581 test $ac_status = 0; }; then
10582 if test "$cross_compiling" = no; then
10583 if { ac_try='./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest'
10584 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
10585 (eval $ac_try) 2>&5
10586 ac_status=$?
10587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10588 test $ac_status = 0; }; }; then :;
10589 else
10590 gmp_prog_cxx_works="no, std iostream, program does not run"
10591 fi
10592 fi
10593 else
10594 gmp_prog_cxx_works="no, std iostream"
10595 fi
10596 case $gmp_prog_cxx_works in
10597 no*)
10598 echo "failed program was:" >&5
10599 cat conftest.cc >&5
10600 ;;
10601 esac
10602 rm -f conftest* a.out b.out a.exe a_out.exe
10603fi
10604
10605
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_prog_cxx_works" >&5
10607$as_echo "$gmp_prog_cxx_works" >&6; }
10608case $gmp_prog_cxx_works in
10609 yes)
10610 want_cxx=yes
10611 break
10612 ;;
10613 *)
10614
10615 ;;
10616esac
10617
10618 done
10619
10620 # If --enable-cxx=yes but a C++ compiler can't be found, then abort.
10621 if test $want_cxx = no && test $enable_cxx = yes; then
10622 as_fn_error $? "C++ compiler not available, see config.log for details" "$LINENO" 5
10623 fi
10624fi
10625
10626 if test $want_cxx = yes; then
10627 WANT_CXX_TRUE=
10628 WANT_CXX_FALSE='#'
10629else
10630 WANT_CXX_TRUE='#'
10631 WANT_CXX_FALSE=
10632fi
10633
10634
10635# FIXME: We're not interested in CXXCPP for ourselves, but if we don't do it
10636# here then AC_PROG_LIBTOOL will AC_REQUIRE it (via _LT_AC_TAGCONFIG) and
10637# hence execute it unconditionally, and that will fail if there's no C++
10638# compiler (and no generic /lib/cpp).
10639#
10640if test $want_cxx = yes; then
10641 ac_ext=cpp
10642ac_cpp='$CXXCPP $CPPFLAGS'
10643ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10644ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10645ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
10647$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
10648if test -z "$CXXCPP"; then
10649 if ${ac_cv_prog_CXXCPP+:} false; then :
10650 $as_echo_n "(cached) " >&6
10651else
10652 # Double quotes because CXXCPP needs to be expanded
10653 for CXXCPP in "$CXX -E" "/lib/cpp"
10654 do
10655 ac_preproc_ok=false
10656for ac_cxx_preproc_warn_flag in '' yes
10657do
10658 # Use a header file that comes with gcc, so configuring glibc
10659 # with a fresh cross-compiler works.
10660 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10661 # <limits.h> exists even on freestanding compilers.
10662 # On the NeXT, cc -E runs the code through the compiler's parser,
10663 # not just through cpp. "Syntax error" is here to catch this case.
10664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10665/* end confdefs.h. */
10666#ifdef __STDC__
10667# include <limits.h>
10668#else
10669# include <assert.h>
10670#endif
10671 Syntax error
10672_ACEOF
10673if ac_fn_cxx_try_cpp "$LINENO"; then :
10674
10675else
10676 # Broken: fails on valid input.
10677continue
10678fi
10679rm -f conftest.err conftest.i conftest.$ac_ext
10680
10681 # OK, works on sane cases. Now check whether nonexistent headers
10682 # can be detected and how.
10683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10684/* end confdefs.h. */
10685#include <ac_nonexistent.h>
10686_ACEOF
10687if ac_fn_cxx_try_cpp "$LINENO"; then :
10688 # Broken: success on invalid input.
10689continue
10690else
10691 # Passes both tests.
10692ac_preproc_ok=:
10693break
10694fi
10695rm -f conftest.err conftest.i conftest.$ac_ext
10696
10697done
10698# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
10699rm -f conftest.i conftest.err conftest.$ac_ext
10700if $ac_preproc_ok; then :
10701 break
10702fi
10703
10704 done
10705 ac_cv_prog_CXXCPP=$CXXCPP
10706
10707fi
10708 CXXCPP=$ac_cv_prog_CXXCPP
10709else
10710 ac_cv_prog_CXXCPP=$CXXCPP
10711fi
10712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
10713$as_echo "$CXXCPP" >&6; }
10714ac_preproc_ok=false
10715for ac_cxx_preproc_warn_flag in '' yes
10716do
10717 # Use a header file that comes with gcc, so configuring glibc
10718 # with a fresh cross-compiler works.
10719 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10720 # <limits.h> exists even on freestanding compilers.
10721 # On the NeXT, cc -E runs the code through the compiler's parser,
10722 # not just through cpp. "Syntax error" is here to catch this case.
10723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10724/* end confdefs.h. */
10725#ifdef __STDC__
10726# include <limits.h>
10727#else
10728# include <assert.h>
10729#endif
10730 Syntax error
10731_ACEOF
10732if ac_fn_cxx_try_cpp "$LINENO"; then :
10733
10734else
10735 # Broken: fails on valid input.
10736continue
10737fi
10738rm -f conftest.err conftest.i conftest.$ac_ext
10739
10740 # OK, works on sane cases. Now check whether nonexistent headers
10741 # can be detected and how.
10742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10743/* end confdefs.h. */
10744#include <ac_nonexistent.h>
10745_ACEOF
10746if ac_fn_cxx_try_cpp "$LINENO"; then :
10747 # Broken: success on invalid input.
10748continue
10749else
10750 # Passes both tests.
10751ac_preproc_ok=:
10752break
10753fi
10754rm -f conftest.err conftest.i conftest.$ac_ext
10755
10756done
10757# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
10758rm -f conftest.i conftest.err conftest.$ac_ext
10759if $ac_preproc_ok; then :
10760
10761else
10762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10764as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
10765See \`config.log' for more details" "$LINENO" 5; }
10766fi
10767
10768ac_ext=c
10769ac_cpp='$CPP $CPPFLAGS'
10770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10772ac_compiler_gnu=$ac_cv_c_compiler_gnu
10773
10774fi
10775
10776
10777# Path setups for Cray, according to IEEE or CFP. These must come after
10778# deciding the compiler.
10779#
10780
10781
10782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10783$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10784if ${ac_cv_path_GREP+:} false; then :
10785 $as_echo_n "(cached) " >&6
10786else
10787 if test -z "$GREP"; then
10788 ac_path_GREP_found=false
10789 # Loop through the user's path and test for each of PROGNAME-LIST
10790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10791for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10792do
10793 IFS=$as_save_IFS
10794 test -z "$as_dir" && as_dir=.
10795 for ac_prog in grep ggrep; do
10796 for ac_exec_ext in '' $ac_executable_extensions; do
10797 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10798 as_fn_executable_p "$ac_path_GREP" || continue
10799# Check for GNU ac_path_GREP and select it if it is found.
10800 # Check for GNU $ac_path_GREP
10801case `"$ac_path_GREP" --version 2>&1` in
10802*GNU*)
10803 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10804*)
10805 ac_count=0
10806 $as_echo_n 0123456789 >"conftest.in"
10807 while :
10808 do
10809 cat "conftest.in" "conftest.in" >"conftest.tmp"
10810 mv "conftest.tmp" "conftest.in"
10811 cp "conftest.in" "conftest.nl"
10812 $as_echo 'GREP' >> "conftest.nl"
10813 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10814 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10815 as_fn_arith $ac_count + 1 && ac_count=$as_val
10816 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10817 # Best one so far, save it but keep looking for a better one
10818 ac_cv_path_GREP="$ac_path_GREP"
10819 ac_path_GREP_max=$ac_count
10820 fi
10821 # 10*(2^10) chars as input seems more than enough
10822 test $ac_count -gt 10 && break
10823 done
10824 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10825esac
10826
10827 $ac_path_GREP_found && break 3
10828 done
10829 done
10830 done
10831IFS=$as_save_IFS
10832 if test -z "$ac_cv_path_GREP"; then
10833 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10834 fi
10835else
10836 ac_cv_path_GREP=$GREP
10837fi
10838
10839fi
10840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10841$as_echo "$ac_cv_path_GREP" >&6; }
10842 GREP="$ac_cv_path_GREP"
10843
10844
10845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10846$as_echo_n "checking for egrep... " >&6; }
10847if ${ac_cv_path_EGREP+:} false; then :
10848 $as_echo_n "(cached) " >&6
10849else
10850 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10851 then ac_cv_path_EGREP="$GREP -E"
10852 else
10853 if test -z "$EGREP"; then
10854 ac_path_EGREP_found=false
10855 # Loop through the user's path and test for each of PROGNAME-LIST
10856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10857for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10858do
10859 IFS=$as_save_IFS
10860 test -z "$as_dir" && as_dir=.
10861 for ac_prog in egrep; do
10862 for ac_exec_ext in '' $ac_executable_extensions; do
10863 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10864 as_fn_executable_p "$ac_path_EGREP" || continue
10865# Check for GNU ac_path_EGREP and select it if it is found.
10866 # Check for GNU $ac_path_EGREP
10867case `"$ac_path_EGREP" --version 2>&1` in
10868*GNU*)
10869 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10870*)
10871 ac_count=0
10872 $as_echo_n 0123456789 >"conftest.in"
10873 while :
10874 do
10875 cat "conftest.in" "conftest.in" >"conftest.tmp"
10876 mv "conftest.tmp" "conftest.in"
10877 cp "conftest.in" "conftest.nl"
10878 $as_echo 'EGREP' >> "conftest.nl"
10879 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10880 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10881 as_fn_arith $ac_count + 1 && ac_count=$as_val
10882 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10883 # Best one so far, save it but keep looking for a better one
10884 ac_cv_path_EGREP="$ac_path_EGREP"
10885 ac_path_EGREP_max=$ac_count
10886 fi
10887 # 10*(2^10) chars as input seems more than enough
10888 test $ac_count -gt 10 && break
10889 done
10890 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10891esac
10892
10893 $ac_path_EGREP_found && break 3
10894 done
10895 done
10896 done
10897IFS=$as_save_IFS
10898 if test -z "$ac_cv_path_EGREP"; then
10899 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10900 fi
10901else
10902 ac_cv_path_EGREP=$EGREP
10903fi
10904
10905 fi
10906fi
10907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10908$as_echo "$ac_cv_path_EGREP" >&6; }
10909 EGREP="$ac_cv_path_EGREP"
10910
10911
10912case $host_cpu in
10913 c90 | t90)
10914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915/* end confdefs.h. */
10916#ifdef _CRAYIEEE
10917yes
10918#endif
10919_ACEOF
10920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10921 $EGREP "yes" >/dev/null 2>&1; then :
10922 add_path="cray/ieee"
10923else
10924 add_path="cray/cfp"; extra_functions="mulwwc90"
10925fi
10926rm -f conftest*
10927
10928 ;;
10929 j90 | sv1)
10930 add_path="cray/cfp"; extra_functions="mulwwj90"
10931 ;;
10932esac
10933
10934
10935
10936if test -z "$MPN_PATH"; then
10937 path="$add_path $path"
10938fi
10939
10940# For a nail build, also look in "nails" subdirectories.
10941#
10942if test $GMP_NAIL_BITS != 0 && test -z "$MPN_PATH"; then
10943 new_path=
10944 for i in $path; do
10945 case $i in
10946 generic) new_path="$new_path $i" ;;
10947 *) new_path="$new_path $i/nails $i" ;;
10948 esac
10949 done
10950 path=$new_path
10951fi
10952
10953
10954# Put all directories into CPUVEC_list so as to get a full set of
10955# CPUVEC_SETUP_$tmp_suffix defines into config.h, even if some of them are
10956# empty because mmx and/or sse2 had to be dropped.
10957#
10958for i in $fat_path; do
10959 tmp_suffix=`echo $i | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`
10960 CPUVEC_list="$CPUVEC_list CPUVEC_SETUP_$tmp_suffix"
10961done
10962
10963
10964# If there's any sse2 or mmx in the path, check whether the assembler
10965# supports it, and remove if not.
10966#
10967# We only need this in ABI=32, for ABI=64 on x86_64 we can assume a new
10968# enough assembler.
10969#
10970case $host in
10971 i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | zen*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | kabylake*-*-*)
10972 if test "$ABI" = 32; then
10973 case "$path $fat_path" in
10974 *mmx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about MMX instructions" >&5
10975$as_echo_n "checking if the assembler knows about MMX instructions... " >&6; }
10976if ${gmp_cv_asm_x86_mmx+:} false; then :
10977 $as_echo_n "(cached) " >&6
10978else
10979 cat >conftest.s <<EOF
10980 .text
10981 movq %mm0, %mm1
10982EOF
10983gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
10984if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
10985 (eval $gmp_assemble) 2>&5
10986 ac_status=$?
10987 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10988 test $ac_status = 0; }; then
10989 cat conftest.out >&5
10990 gmp_cv_asm_x86_mmx=yes
10991case $host in
10992*-*-solaris*)
10993 if (dis conftest.$OBJEXT >conftest.out) 2>/dev/null; then
10994 if grep "0f 6f c1" conftest.out >/dev/null; then
10995 gmp_cv_asm_x86_mmx=movq-bug
10996 fi
10997 else
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"dis\" not available to check for \"as\" movq bug" >&5
10999$as_echo "$as_me: WARNING: \"dis\" not available to check for \"as\" movq bug" >&2;}
11000 fi
11001esac
11002else
11003 cat conftest.out >&5
11004 echo "configure: failed program was:" >&5
11005 cat conftest.s >&5
11006 gmp_cv_asm_x86_mmx=no
11007fi
11008rm -f conftest*
11009
11010fi
11011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_mmx" >&5
11012$as_echo "$gmp_cv_asm_x86_mmx" >&6; }
11013
11014case $gmp_cv_asm_x86_mmx in
11015movq-bug)
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
11017$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5
11019$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;}
11020 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has MMX code, but the assembler" >&5
11021$as_echo "$as_me: WARNING: | Host CPU has MMX code, but the assembler" >&2;}
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5
11023$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;}
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | has the Solaris 2.6 and 2.7 bug where register to register" >&5
11025$as_echo "$as_me: WARNING: | has the Solaris 2.6 and 2.7 bug where register to register" >&2;}
11026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | movq operands are reversed." >&5
11027$as_echo "$as_me: WARNING: | movq operands are reversed." >&2;}
11028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-MMX replacements will be used." >&5
11029$as_echo "$as_me: WARNING: | Non-MMX replacements will be used." >&2;}
11030 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5
11031$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;}
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
11033$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
11034 ;;
11035no)
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
11037$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5
11039$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;}
11040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has MMX code, but it can't be assembled by" >&5
11041$as_echo "$as_me: WARNING: | Host CPU has MMX code, but it can't be assembled by" >&2;}
11042 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5
11043$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;}
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-MMX replacements will be used." >&5
11045$as_echo "$as_me: WARNING: | Non-MMX replacements will be used." >&2;}
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5
11047$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;}
11048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
11049$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
11050 ;;
11051esac
11052if test "$gmp_cv_asm_x86_mmx" = yes; then
11053 :
11054else
11055 tmp_path=
11056for i in $path; do
11057 case $i in
11058 */*mmx*) ;;
11059 *) tmp_path="$tmp_path $i" ;;
11060 esac
11061done
11062path="$tmp_path"
11063
11064tmp_path=
11065for i in $fat_path; do
11066 case $i in
11067 */*mmx*) ;;
11068 *) tmp_path="$tmp_path $i" ;;
11069 esac
11070done
11071fat_path="$tmp_path"
11072
11073
11074fi
11075 ;;
11076 esac
11077 case "$path $fat_path" in
11078 *sse2*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about SSE2 instructions" >&5
11079$as_echo_n "checking if the assembler knows about SSE2 instructions... " >&6; }
11080if ${gmp_cv_asm_x86_sse2+:} false; then :
11081 $as_echo_n "(cached) " >&6
11082else
11083 cat >conftest.s <<EOF
11084 .text
11085 paddq %mm0, %mm1
11086EOF
11087gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
11088if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
11089 (eval $gmp_assemble) 2>&5
11090 ac_status=$?
11091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11092 test $ac_status = 0; }; then
11093 cat conftest.out >&5
11094 gmp_cv_asm_x86_sse2=yes
11095else
11096 cat conftest.out >&5
11097 echo "configure: failed program was:" >&5
11098 cat conftest.s >&5
11099 gmp_cv_asm_x86_sse2=no
11100fi
11101rm -f conftest*
11102
11103
11104fi
11105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_sse2" >&5
11106$as_echo "$gmp_cv_asm_x86_sse2" >&6; }
11107case $gmp_cv_asm_x86_sse2 in
11108yes)
11109 :
11110 ;;
11111*)
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
11113$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5
11115$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;}
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has SSE2 code, but it can't be assembled by" >&5
11117$as_echo "$as_me: WARNING: | Host CPU has SSE2 code, but it can't be assembled by" >&2;}
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5
11119$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;}
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Non-SSE2 replacements will be used." >&5
11121$as_echo "$as_me: WARNING: | Non-SSE2 replacements will be used." >&2;}
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5
11123$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;}
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
11125$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
11126 tmp_path=
11127for i in $path; do
11128 case $i in
11129 */sse2) ;;
11130 *) tmp_path="$tmp_path $i" ;;
11131 esac
11132done
11133path="$tmp_path"
11134
11135tmp_path=
11136for i in $fat_path; do
11137 case $i in
11138 */sse2) ;;
11139 *) tmp_path="$tmp_path $i" ;;
11140 esac
11141done
11142fat_path="$tmp_path"
11143
11144
11145 ;;
11146esac
11147 ;;
11148 esac
11149 fi
11150 ;;
11151esac
11152
11153
11154if test "$enable_assembly" = "no"; then
11155 path="generic"
11156
11157$as_echo "#define NO_ASM 1" >>confdefs.h
11158
11159# for abi in $abilist; do
11160# eval unset "path_\$abi"
11161# eval gcc_${abi}_cflags=\"\$gcc_${abi}_cflags -DNO_ASM\"
11162# done
11163fi
11164
11165
11166cat >&5 <<EOF
11167Decided:
11168ABI=$ABI
11169CC=$CC
11170CFLAGS=$CFLAGS
11171CPPFLAGS=$CPPFLAGS
11172GMP_LDFLAGS=$GMP_LDFLAGS
11173CXX=$CXX
11174CXXFLAGS=$CXXFLAGS
11175path=$path
11176EOF
11177echo "using ABI=\"$ABI\""
11178echo " CC=\"$CC\""
11179echo " CFLAGS=\"$CFLAGS\""
11180echo " CPPFLAGS=\"$CPPFLAGS\""
11181if test $want_cxx = yes; then
11182 echo " CXX=\"$CXX\""
11183 echo " CXXFLAGS=\"$CXXFLAGS\""
11184fi
11185echo " MPN_PATH=\"$path\""
11186
11187
11188
11189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports --noexecstack option" >&5
11190$as_echo_n "checking whether assembler supports --noexecstack option... " >&6; }
11191if ${cl_cv_as_noexecstack+:} false; then :
11192 $as_echo_n "(cached) " >&6
11193else
11194 cat > conftest.c <<EOF
11195void foo() {}
11196EOF
11197 if { ac_try='${CC} $CFLAGS $CPPFLAGS
11198 -S -o conftest.s conftest.c >/dev/null'
11199 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
11200 (eval $ac_try) 2>&5
11201 ac_status=$?
11202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11203 test $ac_status = 0; }; } \
11204 && grep .note.GNU-stack conftest.s >/dev/null \
11205 && { ac_try='${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack
11206 -c -o conftest.o conftest.s >/dev/null'
11207 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
11208 (eval $ac_try) 2>&5
11209 ac_status=$?
11210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11211 test $ac_status = 0; }; }
11212 then
11213 cl_cv_as_noexecstack=yes
11214 else
11215 cl_cv_as_noexecstack=no
11216 fi
11217 rm -f conftest*
11218fi
11219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_as_noexecstack" >&5
11220$as_echo "$cl_cv_as_noexecstack" >&6; }
11221 if test "$cl_cv_as_noexecstack" = yes; then
11222 ASMFLAGS="$ASMFLAGS -Wa,--noexecstack"
11223 fi
11224
11225
11226
11227
11228gmp_user_AR=$AR
11229if test -n "$ac_tool_prefix"; then
11230 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
11231set dummy ${ac_tool_prefix}ar; ac_word=$2
11232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11233$as_echo_n "checking for $ac_word... " >&6; }
11234if ${ac_cv_prog_AR+:} false; then :
11235 $as_echo_n "(cached) " >&6
11236else
11237 if test -n "$AR"; then
11238 ac_cv_prog_AR="$AR" # Let the user override the test.
11239else
11240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241for as_dir in $PATH
11242do
11243 IFS=$as_save_IFS
11244 test -z "$as_dir" && as_dir=.
11245 for ac_exec_ext in '' $ac_executable_extensions; do
11246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247 ac_cv_prog_AR="${ac_tool_prefix}ar"
11248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249 break 2
11250 fi
11251done
11252 done
11253IFS=$as_save_IFS
11254
11255fi
11256fi
11257AR=$ac_cv_prog_AR
11258if test -n "$AR"; then
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
11260$as_echo "$AR" >&6; }
11261else
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263$as_echo "no" >&6; }
11264fi
11265
11266
11267fi
11268if test -z "$ac_cv_prog_AR"; then
11269 ac_ct_AR=$AR
11270 # Extract the first word of "ar", so it can be a program name with args.
11271set dummy ar; ac_word=$2
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11273$as_echo_n "checking for $ac_word... " >&6; }
11274if ${ac_cv_prog_ac_ct_AR+:} false; then :
11275 $as_echo_n "(cached) " >&6
11276else
11277 if test -n "$ac_ct_AR"; then
11278 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
11279else
11280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11281for as_dir in $PATH
11282do
11283 IFS=$as_save_IFS
11284 test -z "$as_dir" && as_dir=.
11285 for ac_exec_ext in '' $ac_executable_extensions; do
11286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11287 ac_cv_prog_ac_ct_AR="ar"
11288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11289 break 2
11290 fi
11291done
11292 done
11293IFS=$as_save_IFS
11294
11295fi
11296fi
11297ac_ct_AR=$ac_cv_prog_ac_ct_AR
11298if test -n "$ac_ct_AR"; then
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
11300$as_echo "$ac_ct_AR" >&6; }
11301else
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303$as_echo "no" >&6; }
11304fi
11305
11306 if test "x$ac_ct_AR" = x; then
11307 AR="ar"
11308 else
11309 case $cross_compiling:$ac_tool_warned in
11310yes:)
11311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11313ac_tool_warned=yes ;;
11314esac
11315 AR=$ac_ct_AR
11316 fi
11317else
11318 AR="$ac_cv_prog_AR"
11319fi
11320
11321if test -z "$gmp_user_AR"; then
11322 eval arflags=\"\$ar${abi1}_flags\"
11323 test -n "$arflags" || eval arflags=\"\$ar${abi2}_flags\"
11324 if test -n "$arflags"; then
11325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra ar flags" >&5
11326$as_echo_n "checking for extra ar flags... " >&6; }
11327 AR="$AR $arflags"
11328 ac_cv_prog_AR="$AR $arflags"
11329 ac_cv_prog_ac_ct_AR="$AR $arflags"
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $arflags" >&5
11331$as_echo "$arflags" >&6; }
11332 fi
11333fi
11334if test -z "$AR_FLAGS"; then
11335 AR_FLAGS=cq
11336fi
11337
11338
11339gmp_user_NM=$NM
11340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
11341$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
11342if ${lt_cv_path_NM+:} false; then :
11343 $as_echo_n "(cached) " >&6
11344else
11345 if test -n "$NM"; then
11346 # Let the user override the test.
11347 lt_cv_path_NM=$NM
11348else
11349 lt_nm_to_check=${ac_tool_prefix}nm
11350 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
11351 lt_nm_to_check="$lt_nm_to_check nm"
11352 fi
11353 for lt_tmp_nm in $lt_nm_to_check; do
11354 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11355 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
11356 IFS=$lt_save_ifs
11357 test -z "$ac_dir" && ac_dir=.
11358 tmp_nm=$ac_dir/$lt_tmp_nm
11359 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
11360 # Check to see if the nm accepts a BSD-compat flag.
11361 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
11362 # nm: unknown option "B" ignored
11363 # Tru64's nm complains that /dev/null is an invalid object file
11364 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
11365 case $build_os in
11366 mingw*) lt_bad_file=conftest.nm/nofile ;;
11367 *) lt_bad_file=/dev/null ;;
11368 esac
11369 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
11370 *$lt_bad_file* | *'Invalid file or object type'*)
11371 lt_cv_path_NM="$tmp_nm -B"
11372 break 2
11373 ;;
11374 *)
11375 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
11376 */dev/null*)
11377 lt_cv_path_NM="$tmp_nm -p"
11378 break 2
11379 ;;
11380 *)
11381 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
11382 continue # so that we can try to find one that supports BSD flags
11383 ;;
11384 esac
11385 ;;
11386 esac
11387 fi
11388 done
11389 IFS=$lt_save_ifs
11390 done
11391 : ${lt_cv_path_NM=no}
11392fi
11393fi
11394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
11395$as_echo "$lt_cv_path_NM" >&6; }
11396if test no != "$lt_cv_path_NM"; then
11397 NM=$lt_cv_path_NM
11398else
11399 # Didn't find any BSD compatible name lister, look for dumpbin.
11400 if test -n "$DUMPBIN"; then :
11401 # Let the user override the test.
11402 else
11403 if test -n "$ac_tool_prefix"; then
11404 for ac_prog in dumpbin "link -dump"
11405 do
11406 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11407set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11409$as_echo_n "checking for $ac_word... " >&6; }
11410if ${ac_cv_prog_DUMPBIN+:} false; then :
11411 $as_echo_n "(cached) " >&6
11412else
11413 if test -n "$DUMPBIN"; then
11414 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
11415else
11416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11417for as_dir in $PATH
11418do
11419 IFS=$as_save_IFS
11420 test -z "$as_dir" && as_dir=.
11421 for ac_exec_ext in '' $ac_executable_extensions; do
11422 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11423 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
11424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11425 break 2
11426 fi
11427done
11428 done
11429IFS=$as_save_IFS
11430
11431fi
11432fi
11433DUMPBIN=$ac_cv_prog_DUMPBIN
11434if test -n "$DUMPBIN"; then
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
11436$as_echo "$DUMPBIN" >&6; }
11437else
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11439$as_echo "no" >&6; }
11440fi
11441
11442
11443 test -n "$DUMPBIN" && break
11444 done
11445fi
11446if test -z "$DUMPBIN"; then
11447 ac_ct_DUMPBIN=$DUMPBIN
11448 for ac_prog in dumpbin "link -dump"
11449do
11450 # Extract the first word of "$ac_prog", so it can be a program name with args.
11451set dummy $ac_prog; ac_word=$2
11452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11453$as_echo_n "checking for $ac_word... " >&6; }
11454if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
11455 $as_echo_n "(cached) " >&6
11456else
11457 if test -n "$ac_ct_DUMPBIN"; then
11458 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
11459else
11460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11461for as_dir in $PATH
11462do
11463 IFS=$as_save_IFS
11464 test -z "$as_dir" && as_dir=.
11465 for ac_exec_ext in '' $ac_executable_extensions; do
11466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11467 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
11468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11469 break 2
11470 fi
11471done
11472 done
11473IFS=$as_save_IFS
11474
11475fi
11476fi
11477ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
11478if test -n "$ac_ct_DUMPBIN"; then
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
11480$as_echo "$ac_ct_DUMPBIN" >&6; }
11481else
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
11484fi
11485
11486
11487 test -n "$ac_ct_DUMPBIN" && break
11488done
11489
11490 if test "x$ac_ct_DUMPBIN" = x; then
11491 DUMPBIN=":"
11492 else
11493 case $cross_compiling:$ac_tool_warned in
11494yes:)
11495{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11496$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11497ac_tool_warned=yes ;;
11498esac
11499 DUMPBIN=$ac_ct_DUMPBIN
11500 fi
11501fi
11502
11503 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
11504 *COFF*)
11505 DUMPBIN="$DUMPBIN -symbols -headers"
11506 ;;
11507 *)
11508 DUMPBIN=:
11509 ;;
11510 esac
11511 fi
11512
11513 if test : != "$DUMPBIN"; then
11514 NM=$DUMPBIN
11515 fi
11516fi
11517test -z "$NM" && NM=nm
11518
11519
11520
11521
11522
11523
11524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
11525$as_echo_n "checking the name lister ($NM) interface... " >&6; }
11526if ${lt_cv_nm_interface+:} false; then :
11527 $as_echo_n "(cached) " >&6
11528else
11529 lt_cv_nm_interface="BSD nm"
11530 echo "int some_variable = 0;" > conftest.$ac_ext
11531 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
11532 (eval "$ac_compile" 2>conftest.err)
11533 cat conftest.err >&5
11534 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
11535 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
11536 cat conftest.err >&5
11537 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
11538 cat conftest.out >&5
11539 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
11540 lt_cv_nm_interface="MS dumpbin"
11541 fi
11542 rm -f conftest*
11543fi
11544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
11545$as_echo "$lt_cv_nm_interface" >&6; }
11546
11547
11548# FIXME: When cross compiling (ie. $ac_tool_prefix not empty), libtool
11549# defaults to plain "nm" if a "${ac_tool_prefix}nm" is not found. In this
11550# case run it again to try the native "nm", firstly so that likely locations
11551# are searched, secondly so that -B or -p are added if necessary for BSD
11552# format. This is necessary for instance on OSF with "./configure
11553# --build=alphaev5-dec-osf --host=alphaev6-dec-osf".
11554#
11555if test -z "$gmp_user_NM" && test -n "$ac_tool_prefix" && test "$NM" = nm; then
11556 $as_unset lt_cv_path_NM
11557 gmp_save_ac_tool_prefix=$ac_tool_prefix
11558 ac_tool_prefix=
11559 NM=
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
11561$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
11562if ${lt_cv_path_NM+:} false; then :
11563 $as_echo_n "(cached) " >&6
11564else
11565 if test -n "$NM"; then
11566 # Let the user override the test.
11567 lt_cv_path_NM=$NM
11568else
11569 lt_nm_to_check=${ac_tool_prefix}nm
11570 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
11571 lt_nm_to_check="$lt_nm_to_check nm"
11572 fi
11573 for lt_tmp_nm in $lt_nm_to_check; do
11574 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
11575 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
11576 IFS=$lt_save_ifs
11577 test -z "$ac_dir" && ac_dir=.
11578 tmp_nm=$ac_dir/$lt_tmp_nm
11579 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
11580 # Check to see if the nm accepts a BSD-compat flag.
11581 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
11582 # nm: unknown option "B" ignored
11583 # Tru64's nm complains that /dev/null is an invalid object file
11584 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
11585 case $build_os in
11586 mingw*) lt_bad_file=conftest.nm/nofile ;;
11587 *) lt_bad_file=/dev/null ;;
11588 esac
11589 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
11590 *$lt_bad_file* | *'Invalid file or object type'*)
11591 lt_cv_path_NM="$tmp_nm -B"
11592 break 2
11593 ;;
11594 *)
11595 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
11596 */dev/null*)
11597 lt_cv_path_NM="$tmp_nm -p"
11598 break 2
11599 ;;
11600 *)
11601 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
11602 continue # so that we can try to find one that supports BSD flags
11603 ;;
11604 esac
11605 ;;
11606 esac
11607 fi
11608 done
11609 IFS=$lt_save_ifs
11610 done
11611 : ${lt_cv_path_NM=no}
11612fi
11613fi
11614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
11615$as_echo "$lt_cv_path_NM" >&6; }
11616if test no != "$lt_cv_path_NM"; then
11617 NM=$lt_cv_path_NM
11618else
11619 # Didn't find any BSD compatible name lister, look for dumpbin.
11620 if test -n "$DUMPBIN"; then :
11621 # Let the user override the test.
11622 else
11623 if test -n "$ac_tool_prefix"; then
11624 for ac_prog in dumpbin "link -dump"
11625 do
11626 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11627set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11629$as_echo_n "checking for $ac_word... " >&6; }
11630if ${ac_cv_prog_DUMPBIN+:} false; then :
11631 $as_echo_n "(cached) " >&6
11632else
11633 if test -n "$DUMPBIN"; then
11634 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
11635else
11636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11637for as_dir in $PATH
11638do
11639 IFS=$as_save_IFS
11640 test -z "$as_dir" && as_dir=.
11641 for ac_exec_ext in '' $ac_executable_extensions; do
11642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11643 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
11644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11645 break 2
11646 fi
11647done
11648 done
11649IFS=$as_save_IFS
11650
11651fi
11652fi
11653DUMPBIN=$ac_cv_prog_DUMPBIN
11654if test -n "$DUMPBIN"; then
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
11656$as_echo "$DUMPBIN" >&6; }
11657else
11658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
11660fi
11661
11662
11663 test -n "$DUMPBIN" && break
11664 done
11665fi
11666if test -z "$DUMPBIN"; then
11667 ac_ct_DUMPBIN=$DUMPBIN
11668 for ac_prog in dumpbin "link -dump"
11669do
11670 # Extract the first word of "$ac_prog", so it can be a program name with args.
11671set dummy $ac_prog; ac_word=$2
11672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11673$as_echo_n "checking for $ac_word... " >&6; }
11674if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
11675 $as_echo_n "(cached) " >&6
11676else
11677 if test -n "$ac_ct_DUMPBIN"; then
11678 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
11679else
11680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11681for as_dir in $PATH
11682do
11683 IFS=$as_save_IFS
11684 test -z "$as_dir" && as_dir=.
11685 for ac_exec_ext in '' $ac_executable_extensions; do
11686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11687 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
11688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11689 break 2
11690 fi
11691done
11692 done
11693IFS=$as_save_IFS
11694
11695fi
11696fi
11697ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
11698if test -n "$ac_ct_DUMPBIN"; then
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
11700$as_echo "$ac_ct_DUMPBIN" >&6; }
11701else
11702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11703$as_echo "no" >&6; }
11704fi
11705
11706
11707 test -n "$ac_ct_DUMPBIN" && break
11708done
11709
11710 if test "x$ac_ct_DUMPBIN" = x; then
11711 DUMPBIN=":"
11712 else
11713 case $cross_compiling:$ac_tool_warned in
11714yes:)
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11717ac_tool_warned=yes ;;
11718esac
11719 DUMPBIN=$ac_ct_DUMPBIN
11720 fi
11721fi
11722
11723 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
11724 *COFF*)
11725 DUMPBIN="$DUMPBIN -symbols -headers"
11726 ;;
11727 *)
11728 DUMPBIN=:
11729 ;;
11730 esac
11731 fi
11732
11733 if test : != "$DUMPBIN"; then
11734 NM=$DUMPBIN
11735 fi
11736fi
11737test -z "$NM" && NM=nm
11738
11739
11740
11741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
11742$as_echo_n "checking the name lister ($NM) interface... " >&6; }
11743if ${lt_cv_nm_interface+:} false; then :
11744 $as_echo_n "(cached) " >&6
11745else
11746 lt_cv_nm_interface="BSD nm"
11747 echo "int some_variable = 0;" > conftest.$ac_ext
11748 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
11749 (eval "$ac_compile" 2>conftest.err)
11750 cat conftest.err >&5
11751 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
11752 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
11753 cat conftest.err >&5
11754 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
11755 cat conftest.out >&5
11756 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
11757 lt_cv_nm_interface="MS dumpbin"
11758 fi
11759 rm -f conftest*
11760fi
11761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
11762$as_echo "$lt_cv_nm_interface" >&6; }
11763
11764 ac_tool_prefix=$gmp_save_ac_tool_prefix
11765fi
11766
11767if test -z "$gmp_user_NM"; then
11768 eval nmflags=\"\$nm${abi1}_flags\"
11769 test -n "$nmflags" || eval nmflags=\"\$nm${abi2}_flags\"
11770 if test -n "$nmflags"; then
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra nm flags" >&5
11772$as_echo_n "checking for extra nm flags... " >&6; }
11773 NM="$NM $nmflags"
11774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nmflags" >&5
11775$as_echo "$nmflags" >&6; }
11776 fi
11777fi
11778
11779
11780case $host in
11781 # FIXME: On AIX 3 and 4, $libname.a is included in libtool
11782 # $library_names_spec, so libgmp.a becomes a symlink to libgmp.so, making
11783 # it impossible to build shared and static libraries simultaneously.
11784 # Disable shared libraries by default, but let the user override with
11785 # --enable-shared --disable-static.
11786 #
11787 # FIXME: This $libname.a problem looks like it might apply to *-*-amigaos*
11788 # and *-*-os2* too, but wait for someone to test this before worrying
11789 # about it. If there is a problem then of course libtool is the right
11790 # place to fix it.
11791 #
11792 *-*-aix[34]*)
11793 if test -z "$enable_shared"; then enable_shared=no; fi ;;
11794esac
11795
11796
11797# Configs for Windows DLLs.
11798
11799enable_win32_dll=yes
11800
11801case $host in
11802*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
11803 if test -n "$ac_tool_prefix"; then
11804 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
11805set dummy ${ac_tool_prefix}as; ac_word=$2
11806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11807$as_echo_n "checking for $ac_word... " >&6; }
11808if ${ac_cv_prog_AS+:} false; then :
11809 $as_echo_n "(cached) " >&6
11810else
11811 if test -n "$AS"; then
11812 ac_cv_prog_AS="$AS" # Let the user override the test.
11813else
11814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11815for as_dir in $PATH
11816do
11817 IFS=$as_save_IFS
11818 test -z "$as_dir" && as_dir=.
11819 for ac_exec_ext in '' $ac_executable_extensions; do
11820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11821 ac_cv_prog_AS="${ac_tool_prefix}as"
11822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11823 break 2
11824 fi
11825done
11826 done
11827IFS=$as_save_IFS
11828
11829fi
11830fi
11831AS=$ac_cv_prog_AS
11832if test -n "$AS"; then
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
11834$as_echo "$AS" >&6; }
11835else
11836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11837$as_echo "no" >&6; }
11838fi
11839
11840
11841fi
11842if test -z "$ac_cv_prog_AS"; then
11843 ac_ct_AS=$AS
11844 # Extract the first word of "as", so it can be a program name with args.
11845set dummy as; ac_word=$2
11846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11847$as_echo_n "checking for $ac_word... " >&6; }
11848if ${ac_cv_prog_ac_ct_AS+:} false; then :
11849 $as_echo_n "(cached) " >&6
11850else
11851 if test -n "$ac_ct_AS"; then
11852 ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
11853else
11854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11855for as_dir in $PATH
11856do
11857 IFS=$as_save_IFS
11858 test -z "$as_dir" && as_dir=.
11859 for ac_exec_ext in '' $ac_executable_extensions; do
11860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11861 ac_cv_prog_ac_ct_AS="as"
11862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11863 break 2
11864 fi
11865done
11866 done
11867IFS=$as_save_IFS
11868
11869fi
11870fi
11871ac_ct_AS=$ac_cv_prog_ac_ct_AS
11872if test -n "$ac_ct_AS"; then
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
11874$as_echo "$ac_ct_AS" >&6; }
11875else
11876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11877$as_echo "no" >&6; }
11878fi
11879
11880 if test "x$ac_ct_AS" = x; then
11881 AS="false"
11882 else
11883 case $cross_compiling:$ac_tool_warned in
11884yes:)
11885{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11886$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11887ac_tool_warned=yes ;;
11888esac
11889 AS=$ac_ct_AS
11890 fi
11891else
11892 AS="$ac_cv_prog_AS"
11893fi
11894
11895 if test -n "$ac_tool_prefix"; then
11896 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
11897set dummy ${ac_tool_prefix}dlltool; ac_word=$2
11898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11899$as_echo_n "checking for $ac_word... " >&6; }
11900if ${ac_cv_prog_DLLTOOL+:} false; then :
11901 $as_echo_n "(cached) " >&6
11902else
11903 if test -n "$DLLTOOL"; then
11904 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
11905else
11906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH
11908do
11909 IFS=$as_save_IFS
11910 test -z "$as_dir" && as_dir=.
11911 for ac_exec_ext in '' $ac_executable_extensions; do
11912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11913 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
11914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11915 break 2
11916 fi
11917done
11918 done
11919IFS=$as_save_IFS
11920
11921fi
11922fi
11923DLLTOOL=$ac_cv_prog_DLLTOOL
11924if test -n "$DLLTOOL"; then
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
11926$as_echo "$DLLTOOL" >&6; }
11927else
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11929$as_echo "no" >&6; }
11930fi
11931
11932
11933fi
11934if test -z "$ac_cv_prog_DLLTOOL"; then
11935 ac_ct_DLLTOOL=$DLLTOOL
11936 # Extract the first word of "dlltool", so it can be a program name with args.
11937set dummy dlltool; ac_word=$2
11938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11939$as_echo_n "checking for $ac_word... " >&6; }
11940if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
11941 $as_echo_n "(cached) " >&6
11942else
11943 if test -n "$ac_ct_DLLTOOL"; then
11944 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
11945else
11946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11947for as_dir in $PATH
11948do
11949 IFS=$as_save_IFS
11950 test -z "$as_dir" && as_dir=.
11951 for ac_exec_ext in '' $ac_executable_extensions; do
11952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11953 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
11954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11955 break 2
11956 fi
11957done
11958 done
11959IFS=$as_save_IFS
11960
11961fi
11962fi
11963ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
11964if test -n "$ac_ct_DLLTOOL"; then
11965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
11966$as_echo "$ac_ct_DLLTOOL" >&6; }
11967else
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11969$as_echo "no" >&6; }
11970fi
11971
11972 if test "x$ac_ct_DLLTOOL" = x; then
11973 DLLTOOL="false"
11974 else
11975 case $cross_compiling:$ac_tool_warned in
11976yes:)
11977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11979ac_tool_warned=yes ;;
11980esac
11981 DLLTOOL=$ac_ct_DLLTOOL
11982 fi
11983else
11984 DLLTOOL="$ac_cv_prog_DLLTOOL"
11985fi
11986
11987 if test -n "$ac_tool_prefix"; then
11988 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
11989set dummy ${ac_tool_prefix}objdump; ac_word=$2
11990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11991$as_echo_n "checking for $ac_word... " >&6; }
11992if ${ac_cv_prog_OBJDUMP+:} false; then :
11993 $as_echo_n "(cached) " >&6
11994else
11995 if test -n "$OBJDUMP"; then
11996 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
11997else
11998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11999for as_dir in $PATH
12000do
12001 IFS=$as_save_IFS
12002 test -z "$as_dir" && as_dir=.
12003 for ac_exec_ext in '' $ac_executable_extensions; do
12004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12005 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
12006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12007 break 2
12008 fi
12009done
12010 done
12011IFS=$as_save_IFS
12012
12013fi
12014fi
12015OBJDUMP=$ac_cv_prog_OBJDUMP
12016if test -n "$OBJDUMP"; then
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
12018$as_echo "$OBJDUMP" >&6; }
12019else
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12021$as_echo "no" >&6; }
12022fi
12023
12024
12025fi
12026if test -z "$ac_cv_prog_OBJDUMP"; then
12027 ac_ct_OBJDUMP=$OBJDUMP
12028 # Extract the first word of "objdump", so it can be a program name with args.
12029set dummy objdump; ac_word=$2
12030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12031$as_echo_n "checking for $ac_word... " >&6; }
12032if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
12033 $as_echo_n "(cached) " >&6
12034else
12035 if test -n "$ac_ct_OBJDUMP"; then
12036 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
12037else
12038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12039for as_dir in $PATH
12040do
12041 IFS=$as_save_IFS
12042 test -z "$as_dir" && as_dir=.
12043 for ac_exec_ext in '' $ac_executable_extensions; do
12044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12045 ac_cv_prog_ac_ct_OBJDUMP="objdump"
12046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12047 break 2
12048 fi
12049done
12050 done
12051IFS=$as_save_IFS
12052
12053fi
12054fi
12055ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
12056if test -n "$ac_ct_OBJDUMP"; then
12057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
12058$as_echo "$ac_ct_OBJDUMP" >&6; }
12059else
12060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12061$as_echo "no" >&6; }
12062fi
12063
12064 if test "x$ac_ct_OBJDUMP" = x; then
12065 OBJDUMP="false"
12066 else
12067 case $cross_compiling:$ac_tool_warned in
12068yes:)
12069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12071ac_tool_warned=yes ;;
12072esac
12073 OBJDUMP=$ac_ct_OBJDUMP
12074 fi
12075else
12076 OBJDUMP="$ac_cv_prog_OBJDUMP"
12077fi
12078
12079 ;;
12080esac
12081
12082test -z "$AS" && AS=as
12083
12084
12085
12086
12087
12088test -z "$DLLTOOL" && DLLTOOL=dlltool
12089
12090
12091
12092
12093
12094test -z "$OBJDUMP" && OBJDUMP=objdump
12095
12096
12097
12098
12099
12100
12101
12102
12103LIBGMP_DLL=0
12104
12105case $host in
12106 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
12107 # By default, build only static.
12108 if test -z "$enable_shared"; then
12109 enable_shared=no
12110 fi
12111 # Don't allow both static and DLL.
12112 if test "$enable_shared" != no && test "$enable_static" != no; then
12113 as_fn_error $? "cannot build both static and DLL, since gmp.h is different for each.
12114Use \"--disable-static --enable-shared\" to build just a DLL." "$LINENO" 5
12115 fi
12116
12117 # "-no-undefined" is required when building a DLL, see documentation on
12118 # AC_LIBTOOL_WIN32_DLL.
12119 #
12120 # "-Wl,--export-all-symbols" is a bit of a hack, it gets all libgmp and
12121 # libgmpxx functions and variables exported. This is what libtool did
12122 # in the past, and it's convenient for us in the test programs.
12123 #
12124 # Maybe it'd be prudent to check for --export-all-symbols before using
12125 # it, but it seems to have been in ld since at least 2000, and there's
12126 # not really any alternative we want to take up at the moment.
12127 #
12128 # "-Wl,output-def" is used to get a .def file for use by MS lib to make
12129 # a .lib import library, described in the manual. libgmp-3.dll.def
12130 # corresponds to the libmp-3.dll.def generated by libtool (as a result
12131 # of -export-symbols on that library).
12132 #
12133 # Incidentally, libtool does generate an import library libgmp.dll.a,
12134 # but it's "ar" format and cannot be used by the MS linker. There
12135 # doesn't seem to be any GNU tool for generating or converting to .lib.
12136 #
12137 # FIXME: The .def files produced by -Wl,output-def include isascii,
12138 # iscsym, iscsymf and toascii, apparently because mingw ctype.h doesn't
12139 # inline isascii (used in gmp). It gives an extern inline for
12140 # __isascii, but for some reason not the plain isascii.
12141 #
12142 if test "$enable_shared" = yes; then
12143 GMP_LDFLAGS="$GMP_LDFLAGS -no-undefined -Wl,--export-all-symbols"
12144 LIBGMP_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmp-3.dll.def"
12145 LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmpxx-3.dll.def"
12146 LIBGMP_DLL=1
12147 fi
12148 ;;
12149esac
12150
12151
12152# Ensure that $CONFIG_SHELL is available for AC_LIBTOOL_SYS_MAX_CMD_LEN.
12153# It's often set already by _LT_AC_PROG_ECHO_BACKSLASH or
12154# _AS_LINENO_PREPARE, but not always.
12155#
12156# The symptom of CONFIG_SHELL unset is some "expr" errors during the test,
12157# and an empty result. This only happens when invoked as "sh configure",
12158# ie. no path, and can be seen for instance on ia64-*-hpux*.
12159#
12160# FIXME: Newer libtool should have it's own fix for this.
12161#
12162if test -z "$CONFIG_SHELL"; then
12163 CONFIG_SHELL=$SHELL
12164fi
12165
12166# Enable CXX in libtool only if we want it, and never enable GCJ, nor RC on
12167# mingw and cygwin. Under --disable-cxx this avoids some error messages
12168# from libtool arising from the fact we didn't actually run AC_PROG_CXX.
12169# Notice that any user-supplied --with-tags setting takes precedence.
12170#
12171# FIXME: Is this the right way to get this effect? Very possibly not, but
12172# the current _LT_AC_TAGCONFIG doesn't really suggest an alternative.
12173#
12174if test "${with_tags+set}" != set; then
12175 if test $want_cxx = yes; then
12176 with_tags=CXX
12177 else
12178 with_tags=
12179 fi
12180fi
12181
12182# The dead hand of AC_REQUIRE makes AC_PROG_LIBTOOL expand and execute
12183# AC_PROG_F77, even when F77 is not in the selected with_tags. This is
12184# probably harmless, but it's unsightly and bloats our configure, so pretend
12185# AC_PROG_F77 has been expanded already.
12186#
12187# FIXME: Rumour has it libtool will one day provide a way for a configure.in
12188# to say what it wants from among supported languages etc.
12189#
12190#AC_PROVIDE([AC_PROG_F77])
12191
12192case `pwd` in
12193 *\ * | *\ *)
12194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
12195$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
12196esac
12197
12198
12199
12200macro_version='2.4.6'
12201macro_revision='2.4.6'
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215ltmain=$ac_aux_dir/ltmain.sh
12216
12217# Backslashify metacharacters that are still active within
12218# double-quoted strings.
12219sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
12220
12221# Same as above, but do not quote variable references.
12222double_quote_subst='s/\(["`\\]\)/\\\1/g'
12223
12224# Sed substitution to delay expansion of an escaped shell variable in a
12225# double_quote_subst'ed string.
12226delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
12227
12228# Sed substitution to delay expansion of an escaped single quote.
12229delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
12230
12231# Sed substitution to avoid accidental globbing in evaled expressions
12232no_glob_subst='s/\*/\\\*/g'
12233
12234ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12235ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
12236ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
12237
12238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
12239$as_echo_n "checking how to print strings... " >&6; }
12240# Test print first, because it will be a builtin if present.
12241if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
12242 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
12243 ECHO='print -r --'
12244elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
12245 ECHO='printf %s\n'
12246else
12247 # Use this function as a fallback that always works.
12248 func_fallback_echo ()
12249 {
12250 eval 'cat <<_LTECHO_EOF
12251$1
12252_LTECHO_EOF'
12253 }
12254 ECHO='func_fallback_echo'
12255fi
12256
12257# func_echo_all arg...
12258# Invoke $ECHO with all args, space-separated.
12259func_echo_all ()
12260{
12261 $ECHO ""
12262}
12263
12264case $ECHO in
12265 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
12266$as_echo "printf" >&6; } ;;
12267 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
12268$as_echo "print -r" >&6; } ;;
12269 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
12270$as_echo "cat" >&6; } ;;
12271esac
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12287$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12288if ${ac_cv_path_SED+:} false; then :
12289 $as_echo_n "(cached) " >&6
12290else
12291 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12292 for ac_i in 1 2 3 4 5 6 7; do
12293 ac_script="$ac_script$as_nl$ac_script"
12294 done
12295 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12296 { ac_script=; unset ac_script;}
12297 if test -z "$SED"; then
12298 ac_path_SED_found=false
12299 # Loop through the user's path and test for each of PROGNAME-LIST
12300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12301for as_dir in $PATH
12302do
12303 IFS=$as_save_IFS
12304 test -z "$as_dir" && as_dir=.
12305 for ac_prog in sed gsed; do
12306 for ac_exec_ext in '' $ac_executable_extensions; do
12307 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12308 as_fn_executable_p "$ac_path_SED" || continue
12309# Check for GNU ac_path_SED and select it if it is found.
12310 # Check for GNU $ac_path_SED
12311case `"$ac_path_SED" --version 2>&1` in
12312*GNU*)
12313 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12314*)
12315 ac_count=0
12316 $as_echo_n 0123456789 >"conftest.in"
12317 while :
12318 do
12319 cat "conftest.in" "conftest.in" >"conftest.tmp"
12320 mv "conftest.tmp" "conftest.in"
12321 cp "conftest.in" "conftest.nl"
12322 $as_echo '' >> "conftest.nl"
12323 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12324 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12325 as_fn_arith $ac_count + 1 && ac_count=$as_val
12326 if test $ac_count -gt ${ac_path_SED_max-0}; then
12327 # Best one so far, save it but keep looking for a better one
12328 ac_cv_path_SED="$ac_path_SED"
12329 ac_path_SED_max=$ac_count
12330 fi
12331 # 10*(2^10) chars as input seems more than enough
12332 test $ac_count -gt 10 && break
12333 done
12334 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12335esac
12336
12337 $ac_path_SED_found && break 3
12338 done
12339 done
12340 done
12341IFS=$as_save_IFS
12342 if test -z "$ac_cv_path_SED"; then
12343 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12344 fi
12345else
12346 ac_cv_path_SED=$SED
12347fi
12348
12349fi
12350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12351$as_echo "$ac_cv_path_SED" >&6; }
12352 SED="$ac_cv_path_SED"
12353 rm -f conftest.sed
12354
12355test -z "$SED" && SED=sed
12356Xsed="$SED -e 1s/^X//"
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12369$as_echo_n "checking for fgrep... " >&6; }
12370if ${ac_cv_path_FGREP+:} false; then :
12371 $as_echo_n "(cached) " >&6
12372else
12373 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12374 then ac_cv_path_FGREP="$GREP -F"
12375 else
12376 if test -z "$FGREP"; then
12377 ac_path_FGREP_found=false
12378 # Loop through the user's path and test for each of PROGNAME-LIST
12379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12380for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12381do
12382 IFS=$as_save_IFS
12383 test -z "$as_dir" && as_dir=.
12384 for ac_prog in fgrep; do
12385 for ac_exec_ext in '' $ac_executable_extensions; do
12386 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12387 as_fn_executable_p "$ac_path_FGREP" || continue
12388# Check for GNU ac_path_FGREP and select it if it is found.
12389 # Check for GNU $ac_path_FGREP
12390case `"$ac_path_FGREP" --version 2>&1` in
12391*GNU*)
12392 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12393*)
12394 ac_count=0
12395 $as_echo_n 0123456789 >"conftest.in"
12396 while :
12397 do
12398 cat "conftest.in" "conftest.in" >"conftest.tmp"
12399 mv "conftest.tmp" "conftest.in"
12400 cp "conftest.in" "conftest.nl"
12401 $as_echo 'FGREP' >> "conftest.nl"
12402 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12403 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12404 as_fn_arith $ac_count + 1 && ac_count=$as_val
12405 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12406 # Best one so far, save it but keep looking for a better one
12407 ac_cv_path_FGREP="$ac_path_FGREP"
12408 ac_path_FGREP_max=$ac_count
12409 fi
12410 # 10*(2^10) chars as input seems more than enough
12411 test $ac_count -gt 10 && break
12412 done
12413 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12414esac
12415
12416 $ac_path_FGREP_found && break 3
12417 done
12418 done
12419 done
12420IFS=$as_save_IFS
12421 if test -z "$ac_cv_path_FGREP"; then
12422 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12423 fi
12424else
12425 ac_cv_path_FGREP=$FGREP
12426fi
12427
12428 fi
12429fi
12430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12431$as_echo "$ac_cv_path_FGREP" >&6; }
12432 FGREP="$ac_cv_path_FGREP"
12433
12434
12435test -z "$GREP" && GREP=grep
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455# Check whether --with-gnu-ld was given.
12456if test "${with_gnu_ld+set}" = set; then :
12457 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
12458else
12459 with_gnu_ld=no
12460fi
12461
12462ac_prog=ld
12463if test yes = "$GCC"; then
12464 # Check if gcc -print-prog-name=ld gives a path.
12465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12466$as_echo_n "checking for ld used by $CC... " >&6; }
12467 case $host in
12468 *-*-mingw*)
12469 # gcc leaves a trailing carriage return, which upsets mingw
12470 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12471 *)
12472 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12473 esac
12474 case $ac_prog in
12475 # Accept absolute paths.
12476 [\\/]* | ?:[\\/]*)
12477 re_direlt='/[^/][^/]*/\.\./'
12478 # Canonicalize the pathname of ld
12479 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
12480 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
12481 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
12482 done
12483 test -z "$LD" && LD=$ac_prog
12484 ;;
12485 "")
12486 # If it fails, then pretend we aren't using GCC.
12487 ac_prog=ld
12488 ;;
12489 *)
12490 # If it is relative, then search for the first ld in PATH.
12491 with_gnu_ld=unknown
12492 ;;
12493 esac
12494elif test yes = "$with_gnu_ld"; then
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
12496$as_echo_n "checking for GNU ld... " >&6; }
12497else
12498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
12499$as_echo_n "checking for non-GNU ld... " >&6; }
12500fi
12501if ${lt_cv_path_LD+:} false; then :
12502 $as_echo_n "(cached) " >&6
12503else
12504 if test -z "$LD"; then
12505 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
12506 for ac_dir in $PATH; do
12507 IFS=$lt_save_ifs
12508 test -z "$ac_dir" && ac_dir=.
12509 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12510 lt_cv_path_LD=$ac_dir/$ac_prog
12511 # Check to see if the program is GNU ld. I'd rather use --version,
12512 # but apparently some variants of GNU ld only accept -v.
12513 # Break only if it was the GNU/non-GNU ld that we prefer.
12514 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
12515 *GNU* | *'with BFD'*)
12516 test no != "$with_gnu_ld" && break
12517 ;;
12518 *)
12519 test yes != "$with_gnu_ld" && break
12520 ;;
12521 esac
12522 fi
12523 done
12524 IFS=$lt_save_ifs
12525else
12526 lt_cv_path_LD=$LD # Let the user override the test with a path.
12527fi
12528fi
12529
12530LD=$lt_cv_path_LD
12531if test -n "$LD"; then
12532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
12533$as_echo "$LD" >&6; }
12534else
12535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12536$as_echo "no" >&6; }
12537fi
12538test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
12539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
12540$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
12541if ${lt_cv_prog_gnu_ld+:} false; then :
12542 $as_echo_n "(cached) " >&6
12543else
12544 # I'd rather use --version here, but apparently some GNU lds only accept -v.
12545case `$LD -v 2>&1 </dev/null` in
12546*GNU* | *'with BFD'*)
12547 lt_cv_prog_gnu_ld=yes
12548 ;;
12549*)
12550 lt_cv_prog_gnu_ld=no
12551 ;;
12552esac
12553fi
12554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
12555$as_echo "$lt_cv_prog_gnu_ld" >&6; }
12556with_gnu_ld=$lt_cv_prog_gnu_ld
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
12567$as_echo_n "checking whether ln -s works... " >&6; }
12568LN_S=$as_ln_s
12569if test "$LN_S" = "ln -s"; then
12570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12571$as_echo "yes" >&6; }
12572else
12573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
12574$as_echo "no, using $LN_S" >&6; }
12575fi
12576
12577# find the maximum length of command line arguments
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
12579$as_echo_n "checking the maximum length of command line arguments... " >&6; }
12580if ${lt_cv_sys_max_cmd_len+:} false; then :
12581 $as_echo_n "(cached) " >&6
12582else
12583 i=0
12584 teststring=ABCD
12585
12586 case $build_os in
12587 msdosdjgpp*)
12588 # On DJGPP, this test can blow up pretty badly due to problems in libc
12589 # (any single argument exceeding 2000 bytes causes a buffer overrun
12590 # during glob expansion). Even if it were fixed, the result of this
12591 # check would be larger than it should be.
12592 lt_cv_sys_max_cmd_len=12288; # 12K is about right
12593 ;;
12594
12595 gnu*)
12596 # Under GNU Hurd, this test is not required because there is
12597 # no limit to the length of command line arguments.
12598 # Libtool will interpret -1 as no limit whatsoever
12599 lt_cv_sys_max_cmd_len=-1;
12600 ;;
12601
12602 cygwin* | mingw* | cegcc*)
12603 # On Win9x/ME, this test blows up -- it succeeds, but takes
12604 # about 5 minutes as the teststring grows exponentially.
12605 # Worse, since 9x/ME are not pre-emptively multitasking,
12606 # you end up with a "frozen" computer, even though with patience
12607 # the test eventually succeeds (with a max line length of 256k).
12608 # Instead, let's just punt: use the minimum linelength reported by
12609 # all of the supported platforms: 8192 (on NT/2K/XP).
12610 lt_cv_sys_max_cmd_len=8192;
12611 ;;
12612
12613 mint*)
12614 # On MiNT this can take a long time and run out of memory.
12615 lt_cv_sys_max_cmd_len=8192;
12616 ;;
12617
12618 amigaos*)
12619 # On AmigaOS with pdksh, this test takes hours, literally.
12620 # So we just punt and use a minimum line length of 8192.
12621 lt_cv_sys_max_cmd_len=8192;
12622 ;;
12623
12624 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
12625 # This has been around since 386BSD, at least. Likely further.
12626 if test -x /sbin/sysctl; then
12627 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
12628 elif test -x /usr/sbin/sysctl; then
12629 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
12630 else
12631 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
12632 fi
12633 # And add a safety zone
12634 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
12635 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
12636 ;;
12637
12638 interix*)
12639 # We know the value 262144 and hardcode it with a safety zone (like BSD)
12640 lt_cv_sys_max_cmd_len=196608
12641 ;;
12642
12643 os2*)
12644 # The test takes a long time on OS/2.
12645 lt_cv_sys_max_cmd_len=8192
12646 ;;
12647
12648 osf*)
12649 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
12650 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
12651 # nice to cause kernel panics so lets avoid the loop below.
12652 # First set a reasonable default.
12653 lt_cv_sys_max_cmd_len=16384
12654 #
12655 if test -x /sbin/sysconfig; then
12656 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
12657 *1*) lt_cv_sys_max_cmd_len=-1 ;;
12658 esac
12659 fi
12660 ;;
12661 sco3.2v5*)
12662 lt_cv_sys_max_cmd_len=102400
12663 ;;
12664 sysv5* | sco5v6* | sysv4.2uw2*)
12665 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
12666 if test -n "$kargmax"; then
12667 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
12668 else
12669 lt_cv_sys_max_cmd_len=32768
12670 fi
12671 ;;
12672 *)
12673 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
12674 if test -n "$lt_cv_sys_max_cmd_len" && \
12675 test undefined != "$lt_cv_sys_max_cmd_len"; then
12676 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
12677 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
12678 else
12679 # Make teststring a little bigger before we do anything with it.
12680 # a 1K string should be a reasonable start.
12681 for i in 1 2 3 4 5 6 7 8; do
12682 teststring=$teststring$teststring
12683 done
12684 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
12685 # If test is not a shell built-in, we'll probably end up computing a
12686 # maximum length that is only half of the actual maximum length, but
12687 # we can't tell.
12688 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
12689 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
12690 test 17 != "$i" # 1/2 MB should be enough
12691 do
12692 i=`expr $i + 1`
12693 teststring=$teststring$teststring
12694 done
12695 # Only check the string length outside the loop.
12696 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
12697 teststring=
12698 # Add a significant safety factor because C++ compilers can tack on
12699 # massive amounts of additional arguments before passing them to the
12700 # linker. It appears as though 1/2 is a usable value.
12701 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
12702 fi
12703 ;;
12704 esac
12705
12706fi
12707
12708if test -n "$lt_cv_sys_max_cmd_len"; then
12709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
12710$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
12711else
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12713$as_echo "none" >&6; }
12714fi
12715max_cmd_len=$lt_cv_sys_max_cmd_len
12716
12717
12718
12719
12720
12721
12722: ${CP="cp -f"}
12723: ${MV="mv -f"}
12724: ${RM="rm -f"}
12725
12726if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
12727 lt_unset=unset
12728else
12729 lt_unset=false
12730fi
12731
12732
12733
12734
12735
12736# test EBCDIC or ASCII
12737case `echo X|tr X '\101'` in
12738 A) # ASCII based system
12739 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
12740 lt_SP2NL='tr \040 \012'
12741 lt_NL2SP='tr \015\012 \040\040'
12742 ;;
12743 *) # EBCDIC based system
12744 lt_SP2NL='tr \100 \n'
12745 lt_NL2SP='tr \r\n \100\100'
12746 ;;
12747esac
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
12758$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
12759if ${lt_cv_to_host_file_cmd+:} false; then :
12760 $as_echo_n "(cached) " >&6
12761else
12762 case $host in
12763 *-*-mingw* )
12764 case $build in
12765 *-*-mingw* ) # actually msys
12766 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
12767 ;;
12768 *-*-cygwin* )
12769 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
12770 ;;
12771 * ) # otherwise, assume *nix
12772 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
12773 ;;
12774 esac
12775 ;;
12776 *-*-cygwin* )
12777 case $build in
12778 *-*-mingw* ) # actually msys
12779 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
12780 ;;
12781 *-*-cygwin* )
12782 lt_cv_to_host_file_cmd=func_convert_file_noop
12783 ;;
12784 * ) # otherwise, assume *nix
12785 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
12786 ;;
12787 esac
12788 ;;
12789 * ) # unhandled hosts (and "normal" native builds)
12790 lt_cv_to_host_file_cmd=func_convert_file_noop
12791 ;;
12792esac
12793
12794fi
12795
12796to_host_file_cmd=$lt_cv_to_host_file_cmd
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
12798$as_echo "$lt_cv_to_host_file_cmd" >&6; }
12799
12800
12801
12802
12803
12804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
12805$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
12806if ${lt_cv_to_tool_file_cmd+:} false; then :
12807 $as_echo_n "(cached) " >&6
12808else
12809 #assume ordinary cross tools, or native build.
12810lt_cv_to_tool_file_cmd=func_convert_file_noop
12811case $host in
12812 *-*-mingw* )
12813 case $build in
12814 *-*-mingw* ) # actually msys
12815 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
12816 ;;
12817 esac
12818 ;;
12819esac
12820
12821fi
12822
12823to_tool_file_cmd=$lt_cv_to_tool_file_cmd
12824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
12825$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
12826
12827
12828
12829
12830
12831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
12832$as_echo_n "checking for $LD option to reload object files... " >&6; }
12833if ${lt_cv_ld_reload_flag+:} false; then :
12834 $as_echo_n "(cached) " >&6
12835else
12836 lt_cv_ld_reload_flag='-r'
12837fi
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
12839$as_echo "$lt_cv_ld_reload_flag" >&6; }
12840reload_flag=$lt_cv_ld_reload_flag
12841case $reload_flag in
12842"" | " "*) ;;
12843*) reload_flag=" $reload_flag" ;;
12844esac
12845reload_cmds='$LD$reload_flag -o $output$reload_objs'
12846case $host_os in
12847 cygwin* | mingw* | pw32* | cegcc*)
12848 if test yes != "$GCC"; then
12849 reload_cmds=false
12850 fi
12851 ;;
12852 darwin*)
12853 if test yes = "$GCC"; then
12854 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
12855 else
12856 reload_cmds='$LD$reload_flag -o $output$reload_objs'
12857 fi
12858 ;;
12859esac
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869if test -n "$ac_tool_prefix"; then
12870 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
12871set dummy ${ac_tool_prefix}objdump; ac_word=$2
12872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12873$as_echo_n "checking for $ac_word... " >&6; }
12874if ${ac_cv_prog_OBJDUMP+:} false; then :
12875 $as_echo_n "(cached) " >&6
12876else
12877 if test -n "$OBJDUMP"; then
12878 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
12879else
12880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12881for as_dir in $PATH
12882do
12883 IFS=$as_save_IFS
12884 test -z "$as_dir" && as_dir=.
12885 for ac_exec_ext in '' $ac_executable_extensions; do
12886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12887 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
12888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12889 break 2
12890 fi
12891done
12892 done
12893IFS=$as_save_IFS
12894
12895fi
12896fi
12897OBJDUMP=$ac_cv_prog_OBJDUMP
12898if test -n "$OBJDUMP"; then
12899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
12900$as_echo "$OBJDUMP" >&6; }
12901else
12902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12903$as_echo "no" >&6; }
12904fi
12905
12906
12907fi
12908if test -z "$ac_cv_prog_OBJDUMP"; then
12909 ac_ct_OBJDUMP=$OBJDUMP
12910 # Extract the first word of "objdump", so it can be a program name with args.
12911set dummy objdump; ac_word=$2
12912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12913$as_echo_n "checking for $ac_word... " >&6; }
12914if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
12915 $as_echo_n "(cached) " >&6
12916else
12917 if test -n "$ac_ct_OBJDUMP"; then
12918 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
12919else
12920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12921for as_dir in $PATH
12922do
12923 IFS=$as_save_IFS
12924 test -z "$as_dir" && as_dir=.
12925 for ac_exec_ext in '' $ac_executable_extensions; do
12926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12927 ac_cv_prog_ac_ct_OBJDUMP="objdump"
12928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12929 break 2
12930 fi
12931done
12932 done
12933IFS=$as_save_IFS
12934
12935fi
12936fi
12937ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
12938if test -n "$ac_ct_OBJDUMP"; then
12939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
12940$as_echo "$ac_ct_OBJDUMP" >&6; }
12941else
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12943$as_echo "no" >&6; }
12944fi
12945
12946 if test "x$ac_ct_OBJDUMP" = x; then
12947 OBJDUMP="false"
12948 else
12949 case $cross_compiling:$ac_tool_warned in
12950yes:)
12951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12953ac_tool_warned=yes ;;
12954esac
12955 OBJDUMP=$ac_ct_OBJDUMP
12956 fi
12957else
12958 OBJDUMP="$ac_cv_prog_OBJDUMP"
12959fi
12960
12961test -z "$OBJDUMP" && OBJDUMP=objdump
12962
12963
12964
12965
12966
12967
12968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
12969$as_echo_n "checking how to recognize dependent libraries... " >&6; }
12970if ${lt_cv_deplibs_check_method+:} false; then :
12971 $as_echo_n "(cached) " >&6
12972else
12973 lt_cv_file_magic_cmd='$MAGIC_CMD'
12974lt_cv_file_magic_test_file=
12975lt_cv_deplibs_check_method='unknown'
12976# Need to set the preceding variable on all platforms that support
12977# interlibrary dependencies.
12978# 'none' -- dependencies not supported.
12979# 'unknown' -- same as none, but documents that we really don't know.
12980# 'pass_all' -- all dependencies passed with no checks.
12981# 'test_compile' -- check by making test program.
12982# 'file_magic [[regex]]' -- check by looking for files in library path
12983# that responds to the $file_magic_cmd with a given extended regex.
12984# If you have 'file' or equivalent on your system and you're not sure
12985# whether 'pass_all' will *always* work, you probably want this one.
12986
12987case $host_os in
12988aix[4-9]*)
12989 lt_cv_deplibs_check_method=pass_all
12990 ;;
12991
12992beos*)
12993 lt_cv_deplibs_check_method=pass_all
12994 ;;
12995
12996bsdi[45]*)
12997 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
12998 lt_cv_file_magic_cmd='/usr/bin/file -L'
12999 lt_cv_file_magic_test_file=/shlib/libc.so
13000 ;;
13001
13002cygwin*)
13003 # func_win32_libid is a shell function defined in ltmain.sh
13004 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
13005 lt_cv_file_magic_cmd='func_win32_libid'
13006 ;;
13007
13008mingw* | pw32*)
13009 # Base MSYS/MinGW do not provide the 'file' command needed by
13010 # func_win32_libid shell function, so use a weaker test based on 'objdump',
13011 # unless we find 'file', for example because we are cross-compiling.
13012 if ( file / ) >/dev/null 2>&1; then
13013 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
13014 lt_cv_file_magic_cmd='func_win32_libid'
13015 else
13016 # Keep this pattern in sync with the one in func_win32_libid.
13017 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
13018 lt_cv_file_magic_cmd='$OBJDUMP -f'
13019 fi
13020 ;;
13021
13022cegcc*)
13023 # use the weaker test based on 'objdump'. See mingw*.
13024 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
13025 lt_cv_file_magic_cmd='$OBJDUMP -f'
13026 ;;
13027
13028darwin* | rhapsody*)
13029 lt_cv_deplibs_check_method=pass_all
13030 ;;
13031
13032freebsd* | dragonfly*)
13033 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
13034 case $host_cpu in
13035 i*86 )
13036 # Not sure whether the presence of OpenBSD here was a mistake.
13037 # Let's accept both of them until this is cleared up.
13038 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
13039 lt_cv_file_magic_cmd=/usr/bin/file
13040 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
13041 ;;
13042 esac
13043 else
13044 lt_cv_deplibs_check_method=pass_all
13045 fi
13046 ;;
13047
13048haiku*)
13049 lt_cv_deplibs_check_method=pass_all
13050 ;;
13051
13052hpux10.20* | hpux11*)
13053 lt_cv_file_magic_cmd=/usr/bin/file
13054 case $host_cpu in
13055 ia64*)
13056 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
13057 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
13058 ;;
13059 hppa*64*)
13060 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
13061 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
13062 ;;
13063 *)
13064 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
13065 lt_cv_file_magic_test_file=/usr/lib/libc.sl
13066 ;;
13067 esac
13068 ;;
13069
13070interix[3-9]*)
13071 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
13072 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
13073 ;;
13074
13075irix5* | irix6* | nonstopux*)
13076 case $LD in
13077 *-32|*"-32 ") libmagic=32-bit;;
13078 *-n32|*"-n32 ") libmagic=N32;;
13079 *-64|*"-64 ") libmagic=64-bit;;
13080 *) libmagic=never-match;;
13081 esac
13082 lt_cv_deplibs_check_method=pass_all
13083 ;;
13084
13085# This must be glibc/ELF.
13086linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13087 lt_cv_deplibs_check_method=pass_all
13088 ;;
13089
13090netbsd*)
13091 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
13092 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
13093 else
13094 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
13095 fi
13096 ;;
13097
13098newos6*)
13099 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
13100 lt_cv_file_magic_cmd=/usr/bin/file
13101 lt_cv_file_magic_test_file=/usr/lib/libnls.so
13102 ;;
13103
13104*nto* | *qnx*)
13105 lt_cv_deplibs_check_method=pass_all
13106 ;;
13107
13108openbsd* | bitrig*)
13109 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13110 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
13111 else
13112 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
13113 fi
13114 ;;
13115
13116osf3* | osf4* | osf5*)
13117 lt_cv_deplibs_check_method=pass_all
13118 ;;
13119
13120rdos*)
13121 lt_cv_deplibs_check_method=pass_all
13122 ;;
13123
13124solaris*)
13125 lt_cv_deplibs_check_method=pass_all
13126 ;;
13127
13128sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13129 lt_cv_deplibs_check_method=pass_all
13130 ;;
13131
13132sysv4 | sysv4.3*)
13133 case $host_vendor in
13134 motorola)
13135 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
13136 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
13137 ;;
13138 ncr)
13139 lt_cv_deplibs_check_method=pass_all
13140 ;;
13141 sequent)
13142 lt_cv_file_magic_cmd='/bin/file'
13143 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
13144 ;;
13145 sni)
13146 lt_cv_file_magic_cmd='/bin/file'
13147 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
13148 lt_cv_file_magic_test_file=/lib/libc.so
13149 ;;
13150 siemens)
13151 lt_cv_deplibs_check_method=pass_all
13152 ;;
13153 pc)
13154 lt_cv_deplibs_check_method=pass_all
13155 ;;
13156 esac
13157 ;;
13158
13159tpf*)
13160 lt_cv_deplibs_check_method=pass_all
13161 ;;
13162os2*)
13163 lt_cv_deplibs_check_method=pass_all
13164 ;;
13165esac
13166
13167fi
13168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
13169$as_echo "$lt_cv_deplibs_check_method" >&6; }
13170
13171file_magic_glob=
13172want_nocaseglob=no
13173if test "$build" = "$host"; then
13174 case $host_os in
13175 mingw* | pw32*)
13176 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
13177 want_nocaseglob=yes
13178 else
13179 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
13180 fi
13181 ;;
13182 esac
13183fi
13184
13185file_magic_cmd=$lt_cv_file_magic_cmd
13186deplibs_check_method=$lt_cv_deplibs_check_method
13187test -z "$deplibs_check_method" && deplibs_check_method=unknown
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210if test -n "$ac_tool_prefix"; then
13211 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
13212set dummy ${ac_tool_prefix}dlltool; ac_word=$2
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13214$as_echo_n "checking for $ac_word... " >&6; }
13215if ${ac_cv_prog_DLLTOOL+:} false; then :
13216 $as_echo_n "(cached) " >&6
13217else
13218 if test -n "$DLLTOOL"; then
13219 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
13220else
13221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13222for as_dir in $PATH
13223do
13224 IFS=$as_save_IFS
13225 test -z "$as_dir" && as_dir=.
13226 for ac_exec_ext in '' $ac_executable_extensions; do
13227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13228 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
13229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13230 break 2
13231 fi
13232done
13233 done
13234IFS=$as_save_IFS
13235
13236fi
13237fi
13238DLLTOOL=$ac_cv_prog_DLLTOOL
13239if test -n "$DLLTOOL"; then
13240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
13241$as_echo "$DLLTOOL" >&6; }
13242else
13243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13244$as_echo "no" >&6; }
13245fi
13246
13247
13248fi
13249if test -z "$ac_cv_prog_DLLTOOL"; then
13250 ac_ct_DLLTOOL=$DLLTOOL
13251 # Extract the first word of "dlltool", so it can be a program name with args.
13252set dummy dlltool; ac_word=$2
13253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13254$as_echo_n "checking for $ac_word... " >&6; }
13255if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
13256 $as_echo_n "(cached) " >&6
13257else
13258 if test -n "$ac_ct_DLLTOOL"; then
13259 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
13260else
13261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13262for as_dir in $PATH
13263do
13264 IFS=$as_save_IFS
13265 test -z "$as_dir" && as_dir=.
13266 for ac_exec_ext in '' $ac_executable_extensions; do
13267 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13268 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
13269 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13270 break 2
13271 fi
13272done
13273 done
13274IFS=$as_save_IFS
13275
13276fi
13277fi
13278ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
13279if test -n "$ac_ct_DLLTOOL"; then
13280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
13281$as_echo "$ac_ct_DLLTOOL" >&6; }
13282else
13283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13284$as_echo "no" >&6; }
13285fi
13286
13287 if test "x$ac_ct_DLLTOOL" = x; then
13288 DLLTOOL="false"
13289 else
13290 case $cross_compiling:$ac_tool_warned in
13291yes:)
13292{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13293$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13294ac_tool_warned=yes ;;
13295esac
13296 DLLTOOL=$ac_ct_DLLTOOL
13297 fi
13298else
13299 DLLTOOL="$ac_cv_prog_DLLTOOL"
13300fi
13301
13302test -z "$DLLTOOL" && DLLTOOL=dlltool
13303
13304
13305
13306
13307
13308
13309
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
13311$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
13312if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
13313 $as_echo_n "(cached) " >&6
13314else
13315 lt_cv_sharedlib_from_linklib_cmd='unknown'
13316
13317case $host_os in
13318cygwin* | mingw* | pw32* | cegcc*)
13319 # two different shell functions defined in ltmain.sh;
13320 # decide which one to use based on capabilities of $DLLTOOL
13321 case `$DLLTOOL --help 2>&1` in
13322 *--identify-strict*)
13323 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
13324 ;;
13325 *)
13326 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
13327 ;;
13328 esac
13329 ;;
13330*)
13331 # fallback: assume linklib IS sharedlib
13332 lt_cv_sharedlib_from_linklib_cmd=$ECHO
13333 ;;
13334esac
13335
13336fi
13337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
13338$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
13339sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
13340test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
13341
13342
13343
13344
13345
13346
13347
13348if test -n "$ac_tool_prefix"; then
13349 for ac_prog in ar
13350 do
13351 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13352set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13354$as_echo_n "checking for $ac_word... " >&6; }
13355if ${ac_cv_prog_AR+:} false; then :
13356 $as_echo_n "(cached) " >&6
13357else
13358 if test -n "$AR"; then
13359 ac_cv_prog_AR="$AR" # Let the user override the test.
13360else
13361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13362for as_dir in $PATH
13363do
13364 IFS=$as_save_IFS
13365 test -z "$as_dir" && as_dir=.
13366 for ac_exec_ext in '' $ac_executable_extensions; do
13367 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13368 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
13369 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13370 break 2
13371 fi
13372done
13373 done
13374IFS=$as_save_IFS
13375
13376fi
13377fi
13378AR=$ac_cv_prog_AR
13379if test -n "$AR"; then
13380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
13381$as_echo "$AR" >&6; }
13382else
13383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13384$as_echo "no" >&6; }
13385fi
13386
13387
13388 test -n "$AR" && break
13389 done
13390fi
13391if test -z "$AR"; then
13392 ac_ct_AR=$AR
13393 for ac_prog in ar
13394do
13395 # Extract the first word of "$ac_prog", so it can be a program name with args.
13396set dummy $ac_prog; ac_word=$2
13397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13398$as_echo_n "checking for $ac_word... " >&6; }
13399if ${ac_cv_prog_ac_ct_AR+:} false; then :
13400 $as_echo_n "(cached) " >&6
13401else
13402 if test -n "$ac_ct_AR"; then
13403 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
13404else
13405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13406for as_dir in $PATH
13407do
13408 IFS=$as_save_IFS
13409 test -z "$as_dir" && as_dir=.
13410 for ac_exec_ext in '' $ac_executable_extensions; do
13411 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13412 ac_cv_prog_ac_ct_AR="$ac_prog"
13413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13414 break 2
13415 fi
13416done
13417 done
13418IFS=$as_save_IFS
13419
13420fi
13421fi
13422ac_ct_AR=$ac_cv_prog_ac_ct_AR
13423if test -n "$ac_ct_AR"; then
13424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
13425$as_echo "$ac_ct_AR" >&6; }
13426else
13427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13428$as_echo "no" >&6; }
13429fi
13430
13431
13432 test -n "$ac_ct_AR" && break
13433done
13434
13435 if test "x$ac_ct_AR" = x; then
13436 AR="false"
13437 else
13438 case $cross_compiling:$ac_tool_warned in
13439yes:)
13440{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13441$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13442ac_tool_warned=yes ;;
13443esac
13444 AR=$ac_ct_AR
13445 fi
13446fi
13447
13448: ${AR=ar}
13449: ${AR_FLAGS=cru}
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
13462$as_echo_n "checking for archiver @FILE support... " >&6; }
13463if ${lt_cv_ar_at_file+:} false; then :
13464 $as_echo_n "(cached) " >&6
13465else
13466 lt_cv_ar_at_file=no
13467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13468/* end confdefs.h. */
13469
13470int
13471main ()
13472{
13473
13474 ;
13475 return 0;
13476}
13477_ACEOF
13478if ac_fn_c_try_compile "$LINENO"; then :
13479 echo conftest.$ac_objext > conftest.lst
13480 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
13481 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
13482 (eval $lt_ar_try) 2>&5
13483 ac_status=$?
13484 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13485 test $ac_status = 0; }
13486 if test 0 -eq "$ac_status"; then
13487 # Ensure the archiver fails upon bogus file names.
13488 rm -f conftest.$ac_objext libconftest.a
13489 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
13490 (eval $lt_ar_try) 2>&5
13491 ac_status=$?
13492 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13493 test $ac_status = 0; }
13494 if test 0 -ne "$ac_status"; then
13495 lt_cv_ar_at_file=@
13496 fi
13497 fi
13498 rm -f conftest.* libconftest.a
13499
13500fi
13501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13502
13503fi
13504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
13505$as_echo "$lt_cv_ar_at_file" >&6; }
13506
13507if test no = "$lt_cv_ar_at_file"; then
13508 archiver_list_spec=
13509else
13510 archiver_list_spec=$lt_cv_ar_at_file
13511fi
13512
13513
13514
13515
13516
13517
13518
13519if test -n "$ac_tool_prefix"; then
13520 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
13521set dummy ${ac_tool_prefix}strip; ac_word=$2
13522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13523$as_echo_n "checking for $ac_word... " >&6; }
13524if ${ac_cv_prog_STRIP+:} false; then :
13525 $as_echo_n "(cached) " >&6
13526else
13527 if test -n "$STRIP"; then
13528 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
13529else
13530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13531for as_dir in $PATH
13532do
13533 IFS=$as_save_IFS
13534 test -z "$as_dir" && as_dir=.
13535 for ac_exec_ext in '' $ac_executable_extensions; do
13536 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13537 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
13538 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13539 break 2
13540 fi
13541done
13542 done
13543IFS=$as_save_IFS
13544
13545fi
13546fi
13547STRIP=$ac_cv_prog_STRIP
13548if test -n "$STRIP"; then
13549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
13550$as_echo "$STRIP" >&6; }
13551else
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13553$as_echo "no" >&6; }
13554fi
13555
13556
13557fi
13558if test -z "$ac_cv_prog_STRIP"; then
13559 ac_ct_STRIP=$STRIP
13560 # Extract the first word of "strip", so it can be a program name with args.
13561set dummy strip; ac_word=$2
13562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13563$as_echo_n "checking for $ac_word... " >&6; }
13564if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
13565 $as_echo_n "(cached) " >&6
13566else
13567 if test -n "$ac_ct_STRIP"; then
13568 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
13569else
13570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13571for as_dir in $PATH
13572do
13573 IFS=$as_save_IFS
13574 test -z "$as_dir" && as_dir=.
13575 for ac_exec_ext in '' $ac_executable_extensions; do
13576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13577 ac_cv_prog_ac_ct_STRIP="strip"
13578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13579 break 2
13580 fi
13581done
13582 done
13583IFS=$as_save_IFS
13584
13585fi
13586fi
13587ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
13588if test -n "$ac_ct_STRIP"; then
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
13590$as_echo "$ac_ct_STRIP" >&6; }
13591else
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13593$as_echo "no" >&6; }
13594fi
13595
13596 if test "x$ac_ct_STRIP" = x; then
13597 STRIP=":"
13598 else
13599 case $cross_compiling:$ac_tool_warned in
13600yes:)
13601{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13602$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13603ac_tool_warned=yes ;;
13604esac
13605 STRIP=$ac_ct_STRIP
13606 fi
13607else
13608 STRIP="$ac_cv_prog_STRIP"
13609fi
13610
13611test -z "$STRIP" && STRIP=:
13612
13613
13614
13615
13616
13617
13618if test -n "$ac_tool_prefix"; then
13619 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
13620set dummy ${ac_tool_prefix}ranlib; ac_word=$2
13621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13622$as_echo_n "checking for $ac_word... " >&6; }
13623if ${ac_cv_prog_RANLIB+:} false; then :
13624 $as_echo_n "(cached) " >&6
13625else
13626 if test -n "$RANLIB"; then
13627 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
13628else
13629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13630for as_dir in $PATH
13631do
13632 IFS=$as_save_IFS
13633 test -z "$as_dir" && as_dir=.
13634 for ac_exec_ext in '' $ac_executable_extensions; do
13635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13636 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
13637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13638 break 2
13639 fi
13640done
13641 done
13642IFS=$as_save_IFS
13643
13644fi
13645fi
13646RANLIB=$ac_cv_prog_RANLIB
13647if test -n "$RANLIB"; then
13648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
13649$as_echo "$RANLIB" >&6; }
13650else
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13652$as_echo "no" >&6; }
13653fi
13654
13655
13656fi
13657if test -z "$ac_cv_prog_RANLIB"; then
13658 ac_ct_RANLIB=$RANLIB
13659 # Extract the first word of "ranlib", so it can be a program name with args.
13660set dummy ranlib; ac_word=$2
13661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13662$as_echo_n "checking for $ac_word... " >&6; }
13663if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
13664 $as_echo_n "(cached) " >&6
13665else
13666 if test -n "$ac_ct_RANLIB"; then
13667 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
13668else
13669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13670for as_dir in $PATH
13671do
13672 IFS=$as_save_IFS
13673 test -z "$as_dir" && as_dir=.
13674 for ac_exec_ext in '' $ac_executable_extensions; do
13675 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13676 ac_cv_prog_ac_ct_RANLIB="ranlib"
13677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13678 break 2
13679 fi
13680done
13681 done
13682IFS=$as_save_IFS
13683
13684fi
13685fi
13686ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
13687if test -n "$ac_ct_RANLIB"; then
13688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
13689$as_echo "$ac_ct_RANLIB" >&6; }
13690else
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13692$as_echo "no" >&6; }
13693fi
13694
13695 if test "x$ac_ct_RANLIB" = x; then
13696 RANLIB=":"
13697 else
13698 case $cross_compiling:$ac_tool_warned in
13699yes:)
13700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13702ac_tool_warned=yes ;;
13703esac
13704 RANLIB=$ac_ct_RANLIB
13705 fi
13706else
13707 RANLIB="$ac_cv_prog_RANLIB"
13708fi
13709
13710test -z "$RANLIB" && RANLIB=:
13711
13712
13713
13714
13715
13716
13717# Determine commands to create old-style static archives.
13718old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
13719old_postinstall_cmds='chmod 644 $oldlib'
13720old_postuninstall_cmds=
13721
13722if test -n "$RANLIB"; then
13723 case $host_os in
13724 bitrig* | openbsd*)
13725 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
13726 ;;
13727 *)
13728 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
13729 ;;
13730 esac
13731 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
13732fi
13733
13734case $host_os in
13735 darwin*)
13736 lock_old_archive_extraction=yes ;;
13737 *)
13738 lock_old_archive_extraction=no ;;
13739esac
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779# If no C compiler was specified, use CC.
13780LTCC=${LTCC-"$CC"}
13781
13782# If no C compiler flags were specified, use CFLAGS.
13783LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
13784
13785# Allow CC to be a program name with arguments.
13786compiler=$CC
13787
13788
13789# Check for command to grab the raw symbol name followed by C symbol from nm.
13790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
13791$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
13792if ${lt_cv_sys_global_symbol_pipe+:} false; then :
13793 $as_echo_n "(cached) " >&6
13794else
13795
13796# These are sane defaults that work on at least a few old systems.
13797# [They come from Ultrix. What could be older than Ultrix?!! ;)]
13798
13799# Character class describing NM global symbol codes.
13800symcode='[BCDEGRST]'
13801
13802# Regexp to match symbols that can be accessed directly from C.
13803sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
13804
13805# Define system-specific variables.
13806case $host_os in
13807aix*)
13808 symcode='[BCDT]'
13809 ;;
13810cygwin* | mingw* | pw32* | cegcc*)
13811 symcode='[ABCDGISTW]'
13812 ;;
13813hpux*)
13814 if test ia64 = "$host_cpu"; then
13815 symcode='[ABCDEGRST]'
13816 fi
13817 ;;
13818irix* | nonstopux*)
13819 symcode='[BCDEGRST]'
13820 ;;
13821osf*)
13822 symcode='[BCDEGQRST]'
13823 ;;
13824solaris*)
13825 symcode='[BDRT]'
13826 ;;
13827sco3.2v5*)
13828 symcode='[DT]'
13829 ;;
13830sysv4.2uw2*)
13831 symcode='[DT]'
13832 ;;
13833sysv5* | sco5v6* | unixware* | OpenUNIX*)
13834 symcode='[ABDT]'
13835 ;;
13836sysv4)
13837 symcode='[DFNSTU]'
13838 ;;
13839esac
13840
13841# If we're using GNU nm, then use its standard symbol codes.
13842case `$NM -V 2>&1` in
13843*GNU* | *'with BFD'*)
13844 symcode='[ABCDGIRSTW]' ;;
13845esac
13846
13847if test "$lt_cv_nm_interface" = "MS dumpbin"; then
13848 # Gets list of data symbols to import.
13849 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
13850 # Adjust the below global symbol transforms to fixup imported variables.
13851 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
13852 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
13853 lt_c_name_lib_hook="\
13854 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
13855 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
13856else
13857 # Disable hooks by default.
13858 lt_cv_sys_global_symbol_to_import=
13859 lt_cdecl_hook=
13860 lt_c_name_hook=
13861 lt_c_name_lib_hook=
13862fi
13863
13864# Transform an extracted symbol line into a proper C declaration.
13865# Some systems (esp. on ia64) link data and code symbols differently,
13866# so use this general approach.
13867lt_cv_sys_global_symbol_to_cdecl="sed -n"\
13868$lt_cdecl_hook\
13869" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
13870" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
13871
13872# Transform an extracted symbol line into symbol name and symbol address
13873lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
13874$lt_c_name_hook\
13875" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
13876" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
13877
13878# Transform an extracted symbol line into symbol name with lib prefix and
13879# symbol address.
13880lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
13881$lt_c_name_lib_hook\
13882" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
13883" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
13884" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
13885
13886# Handle CRLF in mingw tool chain
13887opt_cr=
13888case $build_os in
13889mingw*)
13890 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
13891 ;;
13892esac
13893
13894# Try without a prefix underscore, then with it.
13895for ac_symprfx in "" "_"; do
13896
13897 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
13898 symxfrm="\\1 $ac_symprfx\\2 \\2"
13899
13900 # Write the raw and C identifiers.
13901 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
13902 # Fake it for dumpbin and say T for any non-static function,
13903 # D for any global variable and I for any imported variable.
13904 # Also find C++ and __fastcall symbols from MSVC++,
13905 # which start with @ or ?.
13906 lt_cv_sys_global_symbol_pipe="$AWK '"\
13907" {last_section=section; section=\$ 3};"\
13908" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
13909" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
13910" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
13911" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
13912" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
13913" \$ 0!~/External *\|/{next};"\
13914" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
13915" {if(hide[section]) next};"\
13916" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
13917" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
13918" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
13919" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
13920" ' prfx=^$ac_symprfx"
13921 else
13922 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
13923 fi
13924 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
13925
13926 # Check to see that the pipe works correctly.
13927 pipe_works=no
13928
13929 rm -f conftest*
13930 cat > conftest.$ac_ext <<_LT_EOF
13931#ifdef __cplusplus
13932extern "C" {
13933#endif
13934char nm_test_var;
13935void nm_test_func(void);
13936void nm_test_func(void){}
13937#ifdef __cplusplus
13938}
13939#endif
13940int main(){nm_test_var='a';nm_test_func();return(0);}
13941_LT_EOF
13942
13943 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13944 (eval $ac_compile) 2>&5
13945 ac_status=$?
13946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13947 test $ac_status = 0; }; then
13948 # Now try to grab the symbols.
13949 nlist=conftest.nm
13950 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
13951 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
13952 ac_status=$?
13953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13954 test $ac_status = 0; } && test -s "$nlist"; then
13955 # Try sorting and uniquifying the output.
13956 if sort "$nlist" | uniq > "$nlist"T; then
13957 mv -f "$nlist"T "$nlist"
13958 else
13959 rm -f "$nlist"T
13960 fi
13961
13962 # Make sure that we snagged all the symbols we need.
13963 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
13964 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
13965 cat <<_LT_EOF > conftest.$ac_ext
13966/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
13967#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
13968/* DATA imports from DLLs on WIN32 can't be const, because runtime
13969 relocations are performed -- see ld's documentation on pseudo-relocs. */
13970# define LT_DLSYM_CONST
13971#elif defined __osf__
13972/* This system does not cope well with relocations in const data. */
13973# define LT_DLSYM_CONST
13974#else
13975# define LT_DLSYM_CONST const
13976#endif
13977
13978#ifdef __cplusplus
13979extern "C" {
13980#endif
13981
13982_LT_EOF
13983 # Now generate the symbol file.
13984 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
13985
13986 cat <<_LT_EOF >> conftest.$ac_ext
13987
13988/* The mapping between symbol names and symbols. */
13989LT_DLSYM_CONST struct {
13990 const char *name;
13991 void *address;
13992}
13993lt__PROGRAM__LTX_preloaded_symbols[] =
13994{
13995 { "@PROGRAM@", (void *) 0 },
13996_LT_EOF
13997 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
13998 cat <<\_LT_EOF >> conftest.$ac_ext
13999 {0, (void *) 0}
14000};
14001
14002/* This works around a problem in FreeBSD linker */
14003#ifdef FREEBSD_WORKAROUND
14004static const void *lt_preloaded_setup() {
14005 return lt__PROGRAM__LTX_preloaded_symbols;
14006}
14007#endif
14008
14009#ifdef __cplusplus
14010}
14011#endif
14012_LT_EOF
14013 # Now try linking the two files.
14014 mv conftest.$ac_objext conftstm.$ac_objext
14015 lt_globsym_save_LIBS=$LIBS
14016 lt_globsym_save_CFLAGS=$CFLAGS
14017 LIBS=conftstm.$ac_objext
14018 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
14019 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14020 (eval $ac_link) 2>&5
14021 ac_status=$?
14022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14023 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14024 pipe_works=yes
14025 fi
14026 LIBS=$lt_globsym_save_LIBS
14027 CFLAGS=$lt_globsym_save_CFLAGS
14028 else
14029 echo "cannot find nm_test_func in $nlist" >&5
14030 fi
14031 else
14032 echo "cannot find nm_test_var in $nlist" >&5
14033 fi
14034 else
14035 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
14036 fi
14037 else
14038 echo "$progname: failed program was:" >&5
14039 cat conftest.$ac_ext >&5
14040 fi
14041 rm -rf conftest* conftst*
14042
14043 # Do not use the global_symbol_pipe unless it works.
14044 if test yes = "$pipe_works"; then
14045 break
14046 else
14047 lt_cv_sys_global_symbol_pipe=
14048 fi
14049done
14050
14051fi
14052
14053if test -z "$lt_cv_sys_global_symbol_pipe"; then
14054 lt_cv_sys_global_symbol_to_cdecl=
14055fi
14056if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
14057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
14058$as_echo "failed" >&6; }
14059else
14060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14061$as_echo "ok" >&6; }
14062fi
14063
14064# Response file support.
14065if test "$lt_cv_nm_interface" = "MS dumpbin"; then
14066 nm_file_list_spec='@'
14067elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
14068 nm_file_list_spec='@'
14069fi
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14108$as_echo_n "checking for sysroot... " >&6; }
14109
14110# Check whether --with-sysroot was given.
14111if test "${with_sysroot+set}" = set; then :
14112 withval=$with_sysroot;
14113else
14114 with_sysroot=no
14115fi
14116
14117
14118lt_sysroot=
14119case $with_sysroot in #(
14120 yes)
14121 if test yes = "$GCC"; then
14122 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
14123 fi
14124 ;; #(
14125 /*)
14126 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
14127 ;; #(
14128 no|'')
14129 ;; #(
14130 *)
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
14132$as_echo "$with_sysroot" >&6; }
14133 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
14134 ;;
14135esac
14136
14137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
14138$as_echo "${lt_sysroot:-no}" >&6; }
14139
14140
14141
14142
14143
14144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
14145$as_echo_n "checking for a working dd... " >&6; }
14146if ${ac_cv_path_lt_DD+:} false; then :
14147 $as_echo_n "(cached) " >&6
14148else
14149 printf 0123456789abcdef0123456789abcdef >conftest.i
14150cat conftest.i conftest.i >conftest2.i
14151: ${lt_DD:=$DD}
14152if test -z "$lt_DD"; then
14153 ac_path_lt_DD_found=false
14154 # Loop through the user's path and test for each of PROGNAME-LIST
14155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14156for as_dir in $PATH
14157do
14158 IFS=$as_save_IFS
14159 test -z "$as_dir" && as_dir=.
14160 for ac_prog in dd; do
14161 for ac_exec_ext in '' $ac_executable_extensions; do
14162 ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
14163 as_fn_executable_p "$ac_path_lt_DD" || continue
14164if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
14165 cmp -s conftest.i conftest.out \
14166 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
14167fi
14168 $ac_path_lt_DD_found && break 3
14169 done
14170 done
14171 done
14172IFS=$as_save_IFS
14173 if test -z "$ac_cv_path_lt_DD"; then
14174 :
14175 fi
14176else
14177 ac_cv_path_lt_DD=$lt_DD
14178fi
14179
14180rm -f conftest.i conftest2.i conftest.out
14181fi
14182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
14183$as_echo "$ac_cv_path_lt_DD" >&6; }
14184
14185
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
14187$as_echo_n "checking how to truncate binary pipes... " >&6; }
14188if ${lt_cv_truncate_bin+:} false; then :
14189 $as_echo_n "(cached) " >&6
14190else
14191 printf 0123456789abcdef0123456789abcdef >conftest.i
14192cat conftest.i conftest.i >conftest2.i
14193lt_cv_truncate_bin=
14194if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
14195 cmp -s conftest.i conftest.out \
14196 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
14197fi
14198rm -f conftest.i conftest2.i conftest.out
14199test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
14200fi
14201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
14202$as_echo "$lt_cv_truncate_bin" >&6; }
14203
14204
14205
14206
14207
14208
14209
14210# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
14211func_cc_basename ()
14212{
14213 for cc_temp in $*""; do
14214 case $cc_temp in
14215 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
14216 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
14217 \-*) ;;
14218 *) break;;
14219 esac
14220 done
14221 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
14222}
14223
14224# Check whether --enable-libtool-lock was given.
14225if test "${enable_libtool_lock+set}" = set; then :
14226 enableval=$enable_libtool_lock;
14227fi
14228
14229test no = "$enable_libtool_lock" || enable_libtool_lock=yes
14230
14231# Some flags need to be propagated to the compiler or linker for good
14232# libtool support.
14233case $host in
14234ia64-*-hpux*)
14235 # Find out what ABI is being produced by ac_compile, and set mode
14236 # options accordingly.
14237 echo 'int i;' > conftest.$ac_ext
14238 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14239 (eval $ac_compile) 2>&5
14240 ac_status=$?
14241 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14242 test $ac_status = 0; }; then
14243 case `/usr/bin/file conftest.$ac_objext` in
14244 *ELF-32*)
14245 HPUX_IA64_MODE=32
14246 ;;
14247 *ELF-64*)
14248 HPUX_IA64_MODE=64
14249 ;;
14250 esac
14251 fi
14252 rm -rf conftest*
14253 ;;
14254*-*-irix6*)
14255 # Find out what ABI is being produced by ac_compile, and set linker
14256 # options accordingly.
14257 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
14258 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14259 (eval $ac_compile) 2>&5
14260 ac_status=$?
14261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14262 test $ac_status = 0; }; then
14263 if test yes = "$lt_cv_prog_gnu_ld"; then
14264 case `/usr/bin/file conftest.$ac_objext` in
14265 *32-bit*)
14266 LD="${LD-ld} -melf32bsmip"
14267 ;;
14268 *N32*)
14269 LD="${LD-ld} -melf32bmipn32"
14270 ;;
14271 *64-bit*)
14272 LD="${LD-ld} -melf64bmip"
14273 ;;
14274 esac
14275 else
14276 case `/usr/bin/file conftest.$ac_objext` in
14277 *32-bit*)
14278 LD="${LD-ld} -32"
14279 ;;
14280 *N32*)
14281 LD="${LD-ld} -n32"
14282 ;;
14283 *64-bit*)
14284 LD="${LD-ld} -64"
14285 ;;
14286 esac
14287 fi
14288 fi
14289 rm -rf conftest*
14290 ;;
14291
14292mips64*-*linux*)
14293 # Find out what ABI is being produced by ac_compile, and set linker
14294 # options accordingly.
14295 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
14296 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14297 (eval $ac_compile) 2>&5
14298 ac_status=$?
14299 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14300 test $ac_status = 0; }; then
14301 emul=elf
14302 case `/usr/bin/file conftest.$ac_objext` in
14303 *32-bit*)
14304 emul="${emul}32"
14305 ;;
14306 *64-bit*)
14307 emul="${emul}64"
14308 ;;
14309 esac
14310 case `/usr/bin/file conftest.$ac_objext` in
14311 *MSB*)
14312 emul="${emul}btsmip"
14313 ;;
14314 *LSB*)
14315 emul="${emul}ltsmip"
14316 ;;
14317 esac
14318 case `/usr/bin/file conftest.$ac_objext` in
14319 *N32*)
14320 emul="${emul}n32"
14321 ;;
14322 esac
14323 LD="${LD-ld} -m $emul"
14324 fi
14325 rm -rf conftest*
14326 ;;
14327
14328x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
14329s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
14330 # Find out what ABI is being produced by ac_compile, and set linker
14331 # options accordingly. Note that the listed cases only cover the
14332 # situations where additional linker options are needed (such as when
14333 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
14334 # vice versa); the common cases where no linker options are needed do
14335 # not appear in the list.
14336 echo 'int i;' > conftest.$ac_ext
14337 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14338 (eval $ac_compile) 2>&5
14339 ac_status=$?
14340 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14341 test $ac_status = 0; }; then
14342 case `/usr/bin/file conftest.o` in
14343 *32-bit*)
14344 case $host in
14345 x86_64-*kfreebsd*-gnu)
14346 LD="${LD-ld} -m elf_i386_fbsd"
14347 ;;
14348 x86_64-*linux*)
14349 case `/usr/bin/file conftest.o` in
14350 *x86-64*)
14351 LD="${LD-ld} -m elf32_x86_64"
14352 ;;
14353 *)
14354 LD="${LD-ld} -m elf_i386"
14355 ;;
14356 esac
14357 ;;
14358 powerpc64le-*linux*)
14359 LD="${LD-ld} -m elf32lppclinux"
14360 ;;
14361 powerpc64-*linux*)
14362 LD="${LD-ld} -m elf32ppclinux"
14363 ;;
14364 s390x-*linux*)
14365 LD="${LD-ld} -m elf_s390"
14366 ;;
14367 sparc64-*linux*)
14368 LD="${LD-ld} -m elf32_sparc"
14369 ;;
14370 esac
14371 ;;
14372 *64-bit*)
14373 case $host in
14374 x86_64-*kfreebsd*-gnu)
14375 LD="${LD-ld} -m elf_x86_64_fbsd"
14376 ;;
14377 x86_64-*linux*)
14378 LD="${LD-ld} -m elf_x86_64"
14379 ;;
14380 powerpcle-*linux*)
14381 LD="${LD-ld} -m elf64lppc"
14382 ;;
14383 powerpc-*linux*)
14384 LD="${LD-ld} -m elf64ppc"
14385 ;;
14386 s390*-*linux*|s390*-*tpf*)
14387 LD="${LD-ld} -m elf64_s390"
14388 ;;
14389 sparc*-*linux*)
14390 LD="${LD-ld} -m elf64_sparc"
14391 ;;
14392 esac
14393 ;;
14394 esac
14395 fi
14396 rm -rf conftest*
14397 ;;
14398
14399*-*-sco3.2v5*)
14400 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
14401 SAVE_CFLAGS=$CFLAGS
14402 CFLAGS="$CFLAGS -belf"
14403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
14404$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
14405if ${lt_cv_cc_needs_belf+:} false; then :
14406 $as_echo_n "(cached) " >&6
14407else
14408 ac_ext=c
14409ac_cpp='$CPP $CPPFLAGS'
14410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14412ac_compiler_gnu=$ac_cv_c_compiler_gnu
14413
14414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415/* end confdefs.h. */
14416
14417int
14418main ()
14419{
14420
14421 ;
14422 return 0;
14423}
14424_ACEOF
14425if ac_fn_c_try_link "$LINENO"; then :
14426 lt_cv_cc_needs_belf=yes
14427else
14428 lt_cv_cc_needs_belf=no
14429fi
14430rm -f core conftest.err conftest.$ac_objext \
14431 conftest$ac_exeext conftest.$ac_ext
14432 ac_ext=c
14433ac_cpp='$CPP $CPPFLAGS'
14434ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14435ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14436ac_compiler_gnu=$ac_cv_c_compiler_gnu
14437
14438fi
14439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
14440$as_echo "$lt_cv_cc_needs_belf" >&6; }
14441 if test yes != "$lt_cv_cc_needs_belf"; then
14442 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
14443 CFLAGS=$SAVE_CFLAGS
14444 fi
14445 ;;
14446*-*solaris*)
14447 # Find out what ABI is being produced by ac_compile, and set linker
14448 # options accordingly.
14449 echo 'int i;' > conftest.$ac_ext
14450 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14451 (eval $ac_compile) 2>&5
14452 ac_status=$?
14453 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14454 test $ac_status = 0; }; then
14455 case `/usr/bin/file conftest.o` in
14456 *64-bit*)
14457 case $lt_cv_prog_gnu_ld in
14458 yes*)
14459 case $host in
14460 i?86-*-solaris*|x86_64-*-solaris*)
14461 LD="${LD-ld} -m elf_x86_64"
14462 ;;
14463 sparc*-*-solaris*)
14464 LD="${LD-ld} -m elf64_sparc"
14465 ;;
14466 esac
14467 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
14468 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14469 LD=${LD-ld}_sol2
14470 fi
14471 ;;
14472 *)
14473 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
14474 LD="${LD-ld} -64"
14475 fi
14476 ;;
14477 esac
14478 ;;
14479 esac
14480 fi
14481 rm -rf conftest*
14482 ;;
14483esac
14484
14485need_locks=$enable_libtool_lock
14486
14487if test -n "$ac_tool_prefix"; then
14488 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
14489set dummy ${ac_tool_prefix}mt; ac_word=$2
14490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14491$as_echo_n "checking for $ac_word... " >&6; }
14492if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
14493 $as_echo_n "(cached) " >&6
14494else
14495 if test -n "$MANIFEST_TOOL"; then
14496 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
14497else
14498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14499for as_dir in $PATH
14500do
14501 IFS=$as_save_IFS
14502 test -z "$as_dir" && as_dir=.
14503 for ac_exec_ext in '' $ac_executable_extensions; do
14504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14505 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
14506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14507 break 2
14508 fi
14509done
14510 done
14511IFS=$as_save_IFS
14512
14513fi
14514fi
14515MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
14516if test -n "$MANIFEST_TOOL"; then
14517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
14518$as_echo "$MANIFEST_TOOL" >&6; }
14519else
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14521$as_echo "no" >&6; }
14522fi
14523
14524
14525fi
14526if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
14527 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
14528 # Extract the first word of "mt", so it can be a program name with args.
14529set dummy mt; ac_word=$2
14530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14531$as_echo_n "checking for $ac_word... " >&6; }
14532if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
14533 $as_echo_n "(cached) " >&6
14534else
14535 if test -n "$ac_ct_MANIFEST_TOOL"; then
14536 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
14537else
14538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14539for as_dir in $PATH
14540do
14541 IFS=$as_save_IFS
14542 test -z "$as_dir" && as_dir=.
14543 for ac_exec_ext in '' $ac_executable_extensions; do
14544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14545 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
14546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14547 break 2
14548 fi
14549done
14550 done
14551IFS=$as_save_IFS
14552
14553fi
14554fi
14555ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
14556if test -n "$ac_ct_MANIFEST_TOOL"; then
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
14558$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
14559else
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14561$as_echo "no" >&6; }
14562fi
14563
14564 if test "x$ac_ct_MANIFEST_TOOL" = x; then
14565 MANIFEST_TOOL=":"
14566 else
14567 case $cross_compiling:$ac_tool_warned in
14568yes:)
14569{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14570$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14571ac_tool_warned=yes ;;
14572esac
14573 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
14574 fi
14575else
14576 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
14577fi
14578
14579test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
14580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
14581$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
14582if ${lt_cv_path_mainfest_tool+:} false; then :
14583 $as_echo_n "(cached) " >&6
14584else
14585 lt_cv_path_mainfest_tool=no
14586 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
14587 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
14588 cat conftest.err >&5
14589 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
14590 lt_cv_path_mainfest_tool=yes
14591 fi
14592 rm -f conftest*
14593fi
14594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
14595$as_echo "$lt_cv_path_mainfest_tool" >&6; }
14596if test yes != "$lt_cv_path_mainfest_tool"; then
14597 MANIFEST_TOOL=:
14598fi
14599
14600
14601
14602
14603
14604
14605 case $host_os in
14606 rhapsody* | darwin*)
14607 if test -n "$ac_tool_prefix"; then
14608 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
14609set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
14610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14611$as_echo_n "checking for $ac_word... " >&6; }
14612if ${ac_cv_prog_DSYMUTIL+:} false; then :
14613 $as_echo_n "(cached) " >&6
14614else
14615 if test -n "$DSYMUTIL"; then
14616 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
14617else
14618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14619for as_dir in $PATH
14620do
14621 IFS=$as_save_IFS
14622 test -z "$as_dir" && as_dir=.
14623 for ac_exec_ext in '' $ac_executable_extensions; do
14624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14625 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
14626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14627 break 2
14628 fi
14629done
14630 done
14631IFS=$as_save_IFS
14632
14633fi
14634fi
14635DSYMUTIL=$ac_cv_prog_DSYMUTIL
14636if test -n "$DSYMUTIL"; then
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
14638$as_echo "$DSYMUTIL" >&6; }
14639else
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14641$as_echo "no" >&6; }
14642fi
14643
14644
14645fi
14646if test -z "$ac_cv_prog_DSYMUTIL"; then
14647 ac_ct_DSYMUTIL=$DSYMUTIL
14648 # Extract the first word of "dsymutil", so it can be a program name with args.
14649set dummy dsymutil; ac_word=$2
14650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14651$as_echo_n "checking for $ac_word... " >&6; }
14652if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
14653 $as_echo_n "(cached) " >&6
14654else
14655 if test -n "$ac_ct_DSYMUTIL"; then
14656 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
14657else
14658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14659for as_dir in $PATH
14660do
14661 IFS=$as_save_IFS
14662 test -z "$as_dir" && as_dir=.
14663 for ac_exec_ext in '' $ac_executable_extensions; do
14664 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14665 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
14666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14667 break 2
14668 fi
14669done
14670 done
14671IFS=$as_save_IFS
14672
14673fi
14674fi
14675ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
14676if test -n "$ac_ct_DSYMUTIL"; then
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
14678$as_echo "$ac_ct_DSYMUTIL" >&6; }
14679else
14680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14681$as_echo "no" >&6; }
14682fi
14683
14684 if test "x$ac_ct_DSYMUTIL" = x; then
14685 DSYMUTIL=":"
14686 else
14687 case $cross_compiling:$ac_tool_warned in
14688yes:)
14689{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14691ac_tool_warned=yes ;;
14692esac
14693 DSYMUTIL=$ac_ct_DSYMUTIL
14694 fi
14695else
14696 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
14697fi
14698
14699 if test -n "$ac_tool_prefix"; then
14700 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
14701set dummy ${ac_tool_prefix}nmedit; ac_word=$2
14702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14703$as_echo_n "checking for $ac_word... " >&6; }
14704if ${ac_cv_prog_NMEDIT+:} false; then :
14705 $as_echo_n "(cached) " >&6
14706else
14707 if test -n "$NMEDIT"; then
14708 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
14709else
14710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14711for as_dir in $PATH
14712do
14713 IFS=$as_save_IFS
14714 test -z "$as_dir" && as_dir=.
14715 for ac_exec_ext in '' $ac_executable_extensions; do
14716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14717 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
14718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14719 break 2
14720 fi
14721done
14722 done
14723IFS=$as_save_IFS
14724
14725fi
14726fi
14727NMEDIT=$ac_cv_prog_NMEDIT
14728if test -n "$NMEDIT"; then
14729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
14730$as_echo "$NMEDIT" >&6; }
14731else
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14733$as_echo "no" >&6; }
14734fi
14735
14736
14737fi
14738if test -z "$ac_cv_prog_NMEDIT"; then
14739 ac_ct_NMEDIT=$NMEDIT
14740 # Extract the first word of "nmedit", so it can be a program name with args.
14741set dummy nmedit; ac_word=$2
14742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14743$as_echo_n "checking for $ac_word... " >&6; }
14744if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
14745 $as_echo_n "(cached) " >&6
14746else
14747 if test -n "$ac_ct_NMEDIT"; then
14748 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
14749else
14750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14751for as_dir in $PATH
14752do
14753 IFS=$as_save_IFS
14754 test -z "$as_dir" && as_dir=.
14755 for ac_exec_ext in '' $ac_executable_extensions; do
14756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14757 ac_cv_prog_ac_ct_NMEDIT="nmedit"
14758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14759 break 2
14760 fi
14761done
14762 done
14763IFS=$as_save_IFS
14764
14765fi
14766fi
14767ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
14768if test -n "$ac_ct_NMEDIT"; then
14769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
14770$as_echo "$ac_ct_NMEDIT" >&6; }
14771else
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14773$as_echo "no" >&6; }
14774fi
14775
14776 if test "x$ac_ct_NMEDIT" = x; then
14777 NMEDIT=":"
14778 else
14779 case $cross_compiling:$ac_tool_warned in
14780yes:)
14781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14783ac_tool_warned=yes ;;
14784esac
14785 NMEDIT=$ac_ct_NMEDIT
14786 fi
14787else
14788 NMEDIT="$ac_cv_prog_NMEDIT"
14789fi
14790
14791 if test -n "$ac_tool_prefix"; then
14792 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
14793set dummy ${ac_tool_prefix}lipo; ac_word=$2
14794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14795$as_echo_n "checking for $ac_word... " >&6; }
14796if ${ac_cv_prog_LIPO+:} false; then :
14797 $as_echo_n "(cached) " >&6
14798else
14799 if test -n "$LIPO"; then
14800 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
14801else
14802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14803for as_dir in $PATH
14804do
14805 IFS=$as_save_IFS
14806 test -z "$as_dir" && as_dir=.
14807 for ac_exec_ext in '' $ac_executable_extensions; do
14808 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14809 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
14810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14811 break 2
14812 fi
14813done
14814 done
14815IFS=$as_save_IFS
14816
14817fi
14818fi
14819LIPO=$ac_cv_prog_LIPO
14820if test -n "$LIPO"; then
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
14822$as_echo "$LIPO" >&6; }
14823else
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14825$as_echo "no" >&6; }
14826fi
14827
14828
14829fi
14830if test -z "$ac_cv_prog_LIPO"; then
14831 ac_ct_LIPO=$LIPO
14832 # Extract the first word of "lipo", so it can be a program name with args.
14833set dummy lipo; ac_word=$2
14834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14835$as_echo_n "checking for $ac_word... " >&6; }
14836if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
14837 $as_echo_n "(cached) " >&6
14838else
14839 if test -n "$ac_ct_LIPO"; then
14840 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
14841else
14842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14843for as_dir in $PATH
14844do
14845 IFS=$as_save_IFS
14846 test -z "$as_dir" && as_dir=.
14847 for ac_exec_ext in '' $ac_executable_extensions; do
14848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14849 ac_cv_prog_ac_ct_LIPO="lipo"
14850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14851 break 2
14852 fi
14853done
14854 done
14855IFS=$as_save_IFS
14856
14857fi
14858fi
14859ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
14860if test -n "$ac_ct_LIPO"; then
14861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
14862$as_echo "$ac_ct_LIPO" >&6; }
14863else
14864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14865$as_echo "no" >&6; }
14866fi
14867
14868 if test "x$ac_ct_LIPO" = x; then
14869 LIPO=":"
14870 else
14871 case $cross_compiling:$ac_tool_warned in
14872yes:)
14873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14875ac_tool_warned=yes ;;
14876esac
14877 LIPO=$ac_ct_LIPO
14878 fi
14879else
14880 LIPO="$ac_cv_prog_LIPO"
14881fi
14882
14883 if test -n "$ac_tool_prefix"; then
14884 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
14885set dummy ${ac_tool_prefix}otool; ac_word=$2
14886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14887$as_echo_n "checking for $ac_word... " >&6; }
14888if ${ac_cv_prog_OTOOL+:} false; then :
14889 $as_echo_n "(cached) " >&6
14890else
14891 if test -n "$OTOOL"; then
14892 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
14893else
14894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14895for as_dir in $PATH
14896do
14897 IFS=$as_save_IFS
14898 test -z "$as_dir" && as_dir=.
14899 for ac_exec_ext in '' $ac_executable_extensions; do
14900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14901 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
14902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14903 break 2
14904 fi
14905done
14906 done
14907IFS=$as_save_IFS
14908
14909fi
14910fi
14911OTOOL=$ac_cv_prog_OTOOL
14912if test -n "$OTOOL"; then
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
14914$as_echo "$OTOOL" >&6; }
14915else
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14917$as_echo "no" >&6; }
14918fi
14919
14920
14921fi
14922if test -z "$ac_cv_prog_OTOOL"; then
14923 ac_ct_OTOOL=$OTOOL
14924 # Extract the first word of "otool", so it can be a program name with args.
14925set dummy otool; ac_word=$2
14926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14927$as_echo_n "checking for $ac_word... " >&6; }
14928if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
14929 $as_echo_n "(cached) " >&6
14930else
14931 if test -n "$ac_ct_OTOOL"; then
14932 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
14933else
14934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14935for as_dir in $PATH
14936do
14937 IFS=$as_save_IFS
14938 test -z "$as_dir" && as_dir=.
14939 for ac_exec_ext in '' $ac_executable_extensions; do
14940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14941 ac_cv_prog_ac_ct_OTOOL="otool"
14942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14943 break 2
14944 fi
14945done
14946 done
14947IFS=$as_save_IFS
14948
14949fi
14950fi
14951ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
14952if test -n "$ac_ct_OTOOL"; then
14953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
14954$as_echo "$ac_ct_OTOOL" >&6; }
14955else
14956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14957$as_echo "no" >&6; }
14958fi
14959
14960 if test "x$ac_ct_OTOOL" = x; then
14961 OTOOL=":"
14962 else
14963 case $cross_compiling:$ac_tool_warned in
14964yes:)
14965{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14966$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14967ac_tool_warned=yes ;;
14968esac
14969 OTOOL=$ac_ct_OTOOL
14970 fi
14971else
14972 OTOOL="$ac_cv_prog_OTOOL"
14973fi
14974
14975 if test -n "$ac_tool_prefix"; then
14976 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
14977set dummy ${ac_tool_prefix}otool64; ac_word=$2
14978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14979$as_echo_n "checking for $ac_word... " >&6; }
14980if ${ac_cv_prog_OTOOL64+:} false; then :
14981 $as_echo_n "(cached) " >&6
14982else
14983 if test -n "$OTOOL64"; then
14984 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
14985else
14986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14987for as_dir in $PATH
14988do
14989 IFS=$as_save_IFS
14990 test -z "$as_dir" && as_dir=.
14991 for ac_exec_ext in '' $ac_executable_extensions; do
14992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14993 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
14994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14995 break 2
14996 fi
14997done
14998 done
14999IFS=$as_save_IFS
15000
15001fi
15002fi
15003OTOOL64=$ac_cv_prog_OTOOL64
15004if test -n "$OTOOL64"; then
15005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
15006$as_echo "$OTOOL64" >&6; }
15007else
15008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15009$as_echo "no" >&6; }
15010fi
15011
15012
15013fi
15014if test -z "$ac_cv_prog_OTOOL64"; then
15015 ac_ct_OTOOL64=$OTOOL64
15016 # Extract the first word of "otool64", so it can be a program name with args.
15017set dummy otool64; ac_word=$2
15018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15019$as_echo_n "checking for $ac_word... " >&6; }
15020if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
15021 $as_echo_n "(cached) " >&6
15022else
15023 if test -n "$ac_ct_OTOOL64"; then
15024 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
15025else
15026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15027for as_dir in $PATH
15028do
15029 IFS=$as_save_IFS
15030 test -z "$as_dir" && as_dir=.
15031 for ac_exec_ext in '' $ac_executable_extensions; do
15032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15033 ac_cv_prog_ac_ct_OTOOL64="otool64"
15034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15035 break 2
15036 fi
15037done
15038 done
15039IFS=$as_save_IFS
15040
15041fi
15042fi
15043ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
15044if test -n "$ac_ct_OTOOL64"; then
15045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
15046$as_echo "$ac_ct_OTOOL64" >&6; }
15047else
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15049$as_echo "no" >&6; }
15050fi
15051
15052 if test "x$ac_ct_OTOOL64" = x; then
15053 OTOOL64=":"
15054 else
15055 case $cross_compiling:$ac_tool_warned in
15056yes:)
15057{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15058$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15059ac_tool_warned=yes ;;
15060esac
15061 OTOOL64=$ac_ct_OTOOL64
15062 fi
15063else
15064 OTOOL64="$ac_cv_prog_OTOOL64"
15065fi
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
15094$as_echo_n "checking for -single_module linker flag... " >&6; }
15095if ${lt_cv_apple_cc_single_mod+:} false; then :
15096 $as_echo_n "(cached) " >&6
15097else
15098 lt_cv_apple_cc_single_mod=no
15099 if test -z "$LT_MULTI_MODULE"; then
15100 # By default we will add the -single_module flag. You can override
15101 # by either setting the environment variable LT_MULTI_MODULE
15102 # non-empty at configure time, or by adding -multi_module to the
15103 # link flags.
15104 rm -rf libconftest.dylib*
15105 echo "int foo(void){return 1;}" > conftest.c
15106 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
15107-dynamiclib -Wl,-single_module conftest.c" >&5
15108 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
15109 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
15110 _lt_result=$?
15111 # If there is a non-empty error log, and "single_module"
15112 # appears in it, assume the flag caused a linker warning
15113 if test -s conftest.err && $GREP single_module conftest.err; then
15114 cat conftest.err >&5
15115 # Otherwise, if the output was created with a 0 exit code from
15116 # the compiler, it worked.
15117 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
15118 lt_cv_apple_cc_single_mod=yes
15119 else
15120 cat conftest.err >&5
15121 fi
15122 rm -rf libconftest.dylib*
15123 rm -f conftest.*
15124 fi
15125fi
15126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
15127$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
15128
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
15130$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
15131if ${lt_cv_ld_exported_symbols_list+:} false; then :
15132 $as_echo_n "(cached) " >&6
15133else
15134 lt_cv_ld_exported_symbols_list=no
15135 save_LDFLAGS=$LDFLAGS
15136 echo "_main" > conftest.sym
15137 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
15138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15139/* end confdefs.h. */
15140
15141int
15142main ()
15143{
15144
15145 ;
15146 return 0;
15147}
15148_ACEOF
15149if ac_fn_c_try_link "$LINENO"; then :
15150 lt_cv_ld_exported_symbols_list=yes
15151else
15152 lt_cv_ld_exported_symbols_list=no
15153fi
15154rm -f core conftest.err conftest.$ac_objext \
15155 conftest$ac_exeext conftest.$ac_ext
15156 LDFLAGS=$save_LDFLAGS
15157
15158fi
15159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
15160$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
15161
15162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
15163$as_echo_n "checking for -force_load linker flag... " >&6; }
15164if ${lt_cv_ld_force_load+:} false; then :
15165 $as_echo_n "(cached) " >&6
15166else
15167 lt_cv_ld_force_load=no
15168 cat > conftest.c << _LT_EOF
15169int forced_loaded() { return 2;}
15170_LT_EOF
15171 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
15172 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
15173 echo "$AR cru libconftest.a conftest.o" >&5
15174 $AR cru libconftest.a conftest.o 2>&5
15175 echo "$RANLIB libconftest.a" >&5
15176 $RANLIB libconftest.a 2>&5
15177 cat > conftest.c << _LT_EOF
15178int main() { return 0;}
15179_LT_EOF
15180 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
15181 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
15182 _lt_result=$?
15183 if test -s conftest.err && $GREP force_load conftest.err; then
15184 cat conftest.err >&5
15185 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
15186 lt_cv_ld_force_load=yes
15187 else
15188 cat conftest.err >&5
15189 fi
15190 rm -f conftest.err libconftest.a conftest conftest.c
15191 rm -rf conftest.dSYM
15192
15193fi
15194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
15195$as_echo "$lt_cv_ld_force_load" >&6; }
15196 case $host_os in
15197 rhapsody* | darwin1.[012])
15198 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
15199 darwin1.*)
15200 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
15201 darwin*) # darwin 5.x on
15202 # if running on 10.5 or later, the deployment target defaults
15203 # to the OS version, if on x86, and 10.4, the deployment
15204 # target defaults to 10.4. Don't you love it?
15205 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
15206 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
15207 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
15208 10.[012][,.]*)
15209 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
15210 10.*)
15211 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
15212 esac
15213 ;;
15214 esac
15215 if test yes = "$lt_cv_apple_cc_single_mod"; then
15216 _lt_dar_single_mod='$single_module'
15217 fi
15218 if test yes = "$lt_cv_ld_exported_symbols_list"; then
15219 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
15220 else
15221 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
15222 fi
15223 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
15224 _lt_dsymutil='~$DSYMUTIL $lib || :'
15225 else
15226 _lt_dsymutil=
15227 fi
15228 ;;
15229 esac
15230
15231# func_munge_path_list VARIABLE PATH
15232# -----------------------------------
15233# VARIABLE is name of variable containing _space_ separated list of
15234# directories to be munged by the contents of PATH, which is string
15235# having a format:
15236# "DIR[:DIR]:"
15237# string "DIR[ DIR]" will be prepended to VARIABLE
15238# ":DIR[:DIR]"
15239# string "DIR[ DIR]" will be appended to VARIABLE
15240# "DIRP[:DIRP]::[DIRA:]DIRA"
15241# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
15242# "DIRA[ DIRA]" will be appended to VARIABLE
15243# "DIR[:DIR]"
15244# VARIABLE will be replaced by "DIR[ DIR]"
15245func_munge_path_list ()
15246{
15247 case x$2 in
15248 x)
15249 ;;
15250 *:)
15251 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
15252 ;;
15253 x:*)
15254 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
15255 ;;
15256 *::*)
15257 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
15258 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
15259 ;;
15260 *)
15261 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
15262 ;;
15263 esac
15264}
15265
15266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
15267$as_echo_n "checking for ANSI C header files... " >&6; }
15268if ${ac_cv_header_stdc+:} false; then :
15269 $as_echo_n "(cached) " >&6
15270else
15271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15272/* end confdefs.h. */
15273#include <stdlib.h>
15274#include <stdarg.h>
15275#include <string.h>
15276#include <float.h>
15277
15278int
15279main ()
15280{
15281
15282 ;
15283 return 0;
15284}
15285_ACEOF
15286if ac_fn_c_try_compile "$LINENO"; then :
15287 ac_cv_header_stdc=yes
15288else
15289 ac_cv_header_stdc=no
15290fi
15291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15292
15293if test $ac_cv_header_stdc = yes; then
15294 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15296/* end confdefs.h. */
15297#include <string.h>
15298
15299_ACEOF
15300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15301 $EGREP "memchr" >/dev/null 2>&1; then :
15302
15303else
15304 ac_cv_header_stdc=no
15305fi
15306rm -f conftest*
15307
15308fi
15309
15310if test $ac_cv_header_stdc = yes; then
15311 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15313/* end confdefs.h. */
15314#include <stdlib.h>
15315
15316_ACEOF
15317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15318 $EGREP "free" >/dev/null 2>&1; then :
15319
15320else
15321 ac_cv_header_stdc=no
15322fi
15323rm -f conftest*
15324
15325fi
15326
15327if test $ac_cv_header_stdc = yes; then
15328 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15329 if test "$cross_compiling" = yes; then :
15330 :
15331else
15332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15333/* end confdefs.h. */
15334#include <ctype.h>
15335#include <stdlib.h>
15336#if ((' ' & 0x0FF) == 0x020)
15337# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15338# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15339#else
15340# define ISLOWER(c) \
15341 (('a' <= (c) && (c) <= 'i') \
15342 || ('j' <= (c) && (c) <= 'r') \
15343 || ('s' <= (c) && (c) <= 'z'))
15344# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15345#endif
15346
15347#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15348int
15349main ()
15350{
15351 int i;
15352 for (i = 0; i < 256; i++)
15353 if (XOR (islower (i), ISLOWER (i))
15354 || toupper (i) != TOUPPER (i))
15355 return 2;
15356 return 0;
15357}
15358_ACEOF
15359if ac_fn_c_try_run "$LINENO"; then :
15360
15361else
15362 ac_cv_header_stdc=no
15363fi
15364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15365 conftest.$ac_objext conftest.beam conftest.$ac_ext
15366fi
15367
15368fi
15369fi
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
15371$as_echo "$ac_cv_header_stdc" >&6; }
15372if test $ac_cv_header_stdc = yes; then
15373
15374$as_echo "#define STDC_HEADERS 1" >>confdefs.h
15375
15376fi
15377
15378# On IRIX 5.3, sys/types and inttypes.h are conflicting.
15379for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15380 inttypes.h stdint.h unistd.h
15381do :
15382 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15383ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
15384"
15385if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15386 cat >>confdefs.h <<_ACEOF
15387#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15388_ACEOF
15389
15390fi
15391
15392done
15393
15394
15395for ac_header in dlfcn.h
15396do :
15397 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
15398"
15399if test "x$ac_cv_header_dlfcn_h" = xyes; then :
15400 cat >>confdefs.h <<_ACEOF
15401#define HAVE_DLFCN_H 1
15402_ACEOF
15403
15404fi
15405
15406done
15407
15408
15409
15410
15411func_stripname_cnf ()
15412{
15413 case $2 in
15414 .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
15415 *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
15416 esac
15417} # func_stripname_cnf
15418
15419
15420
15421
15422
15423# Set options
15424
15425
15426
15427 enable_dlopen=no
15428
15429
15430
15431 # Check whether --enable-shared was given.
15432if test "${enable_shared+set}" = set; then :
15433 enableval=$enable_shared; p=${PACKAGE-default}
15434 case $enableval in
15435 yes) enable_shared=yes ;;
15436 no) enable_shared=no ;;
15437 *)
15438 enable_shared=no
15439 # Look at the argument we got. We use all the common list separators.
15440 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
15441 for pkg in $enableval; do
15442 IFS=$lt_save_ifs
15443 if test "X$pkg" = "X$p"; then
15444 enable_shared=yes
15445 fi
15446 done
15447 IFS=$lt_save_ifs
15448 ;;
15449 esac
15450else
15451 enable_shared=yes
15452fi
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462 # Check whether --enable-static was given.
15463if test "${enable_static+set}" = set; then :
15464 enableval=$enable_static; p=${PACKAGE-default}
15465 case $enableval in
15466 yes) enable_static=yes ;;
15467 no) enable_static=no ;;
15468 *)
15469 enable_static=no
15470 # Look at the argument we got. We use all the common list separators.
15471 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
15472 for pkg in $enableval; do
15473 IFS=$lt_save_ifs
15474 if test "X$pkg" = "X$p"; then
15475 enable_static=yes
15476 fi
15477 done
15478 IFS=$lt_save_ifs
15479 ;;
15480 esac
15481else
15482 enable_static=yes
15483fi
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494# Check whether --with-pic was given.
15495if test "${with_pic+set}" = set; then :
15496 withval=$with_pic; lt_p=${PACKAGE-default}
15497 case $withval in
15498 yes|no) pic_mode=$withval ;;
15499 *)
15500 pic_mode=default
15501 # Look at the argument we got. We use all the common list separators.
15502 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
15503 for lt_pkg in $withval; do
15504 IFS=$lt_save_ifs
15505 if test "X$lt_pkg" = "X$lt_p"; then
15506 pic_mode=yes
15507 fi
15508 done
15509 IFS=$lt_save_ifs
15510 ;;
15511 esac
15512else
15513 pic_mode=default
15514fi
15515
15516
15517
15518
15519
15520
15521
15522
15523 # Check whether --enable-fast-install was given.
15524if test "${enable_fast_install+set}" = set; then :
15525 enableval=$enable_fast_install; p=${PACKAGE-default}
15526 case $enableval in
15527 yes) enable_fast_install=yes ;;
15528 no) enable_fast_install=no ;;
15529 *)
15530 enable_fast_install=no
15531 # Look at the argument we got. We use all the common list separators.
15532 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
15533 for pkg in $enableval; do
15534 IFS=$lt_save_ifs
15535 if test "X$pkg" = "X$p"; then
15536 enable_fast_install=yes
15537 fi
15538 done
15539 IFS=$lt_save_ifs
15540 ;;
15541 esac
15542else
15543 enable_fast_install=yes
15544fi
15545
15546
15547
15548
15549
15550
15551
15552
15553 shared_archive_member_spec=
15554case $host,$enable_shared in
15555power*-*-aix[5-9]*,yes)
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
15557$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
15558
15559# Check whether --with-aix-soname was given.
15560if test "${with_aix_soname+set}" = set; then :
15561 withval=$with_aix_soname; case $withval in
15562 aix|svr4|both)
15563 ;;
15564 *)
15565 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
15566 ;;
15567 esac
15568 lt_cv_with_aix_soname=$with_aix_soname
15569else
15570 if ${lt_cv_with_aix_soname+:} false; then :
15571 $as_echo_n "(cached) " >&6
15572else
15573 lt_cv_with_aix_soname=aix
15574fi
15575
15576 with_aix_soname=$lt_cv_with_aix_soname
15577fi
15578
15579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
15580$as_echo "$with_aix_soname" >&6; }
15581 if test aix != "$with_aix_soname"; then
15582 # For the AIX way of multilib, we name the shared archive member
15583 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
15584 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
15585 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
15586 # the AIX toolchain works better with OBJECT_MODE set (default 32).
15587 if test 64 = "${OBJECT_MODE-32}"; then
15588 shared_archive_member_spec=shr_64
15589 else
15590 shared_archive_member_spec=shr
15591 fi
15592 fi
15593 ;;
15594*)
15595 with_aix_soname=aix
15596 ;;
15597esac
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608# This can be used to rebuild libtool when needed
15609LIBTOOL_DEPS=$ltmain
15610
15611# Always use our own libtool.
15612LIBTOOL='$(SHELL) $(top_builddir)/libtool'
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643test -z "$LN_S" && LN_S="ln -s"
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658if test -n "${ZSH_VERSION+set}"; then
15659 setopt NO_GLOB_SUBST
15660fi
15661
15662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
15663$as_echo_n "checking for objdir... " >&6; }
15664if ${lt_cv_objdir+:} false; then :
15665 $as_echo_n "(cached) " >&6
15666else
15667 rm -f .libs 2>/dev/null
15668mkdir .libs 2>/dev/null
15669if test -d .libs; then
15670 lt_cv_objdir=.libs
15671else
15672 # MS-DOS does not allow filenames that begin with a dot.
15673 lt_cv_objdir=_libs
15674fi
15675rmdir .libs 2>/dev/null
15676fi
15677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
15678$as_echo "$lt_cv_objdir" >&6; }
15679objdir=$lt_cv_objdir
15680
15681
15682
15683
15684
15685cat >>confdefs.h <<_ACEOF
15686#define LT_OBJDIR "$lt_cv_objdir/"
15687_ACEOF
15688
15689
15690
15691
15692case $host_os in
15693aix3*)
15694 # AIX sometimes has problems with the GCC collect2 program. For some
15695 # reason, if we set the COLLECT_NAMES environment variable, the problems
15696 # vanish in a puff of smoke.
15697 if test set != "${COLLECT_NAMES+set}"; then
15698 COLLECT_NAMES=
15699 export COLLECT_NAMES
15700 fi
15701 ;;
15702esac
15703
15704# Global variables:
15705ofile=libtool
15706can_build_shared=yes
15707
15708# All known linkers require a '.a' archive for static linking (except MSVC,
15709# which needs '.lib').
15710libext=a
15711
15712with_gnu_ld=$lt_cv_prog_gnu_ld
15713
15714old_CC=$CC
15715old_CFLAGS=$CFLAGS
15716
15717# Set sane defaults for various variables
15718test -z "$CC" && CC=cc
15719test -z "$LTCC" && LTCC=$CC
15720test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
15721test -z "$LD" && LD=ld
15722test -z "$ac_objext" && ac_objext=o
15723
15724func_cc_basename $compiler
15725cc_basename=$func_cc_basename_result
15726
15727
15728# Only perform the check for file, if the check method requires it
15729test -z "$MAGIC_CMD" && MAGIC_CMD=file
15730case $deplibs_check_method in
15731file_magic*)
15732 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
15733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
15734$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
15735if ${lt_cv_path_MAGIC_CMD+:} false; then :
15736 $as_echo_n "(cached) " >&6
15737else
15738 case $MAGIC_CMD in
15739[\\/*] | ?:[\\/]*)
15740 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
15741 ;;
15742*)
15743 lt_save_MAGIC_CMD=$MAGIC_CMD
15744 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
15745 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
15746 for ac_dir in $ac_dummy; do
15747 IFS=$lt_save_ifs
15748 test -z "$ac_dir" && ac_dir=.
15749 if test -f "$ac_dir/${ac_tool_prefix}file"; then
15750 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
15751 if test -n "$file_magic_test_file"; then
15752 case $deplibs_check_method in
15753 "file_magic "*)
15754 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
15755 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
15756 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
15757 $EGREP "$file_magic_regex" > /dev/null; then
15758 :
15759 else
15760 cat <<_LT_EOF 1>&2
15761
15762*** Warning: the command libtool uses to detect shared libraries,
15763*** $file_magic_cmd, produces output that libtool cannot recognize.
15764*** The result is that libtool may fail to recognize shared libraries
15765*** as such. This will affect the creation of libtool libraries that
15766*** depend on shared libraries, but programs linked with such libtool
15767*** libraries will work regardless of this problem. Nevertheless, you
15768*** may want to report the problem to your system manager and/or to
15769*** bug-libtool@gnu.org
15770
15771_LT_EOF
15772 fi ;;
15773 esac
15774 fi
15775 break
15776 fi
15777 done
15778 IFS=$lt_save_ifs
15779 MAGIC_CMD=$lt_save_MAGIC_CMD
15780 ;;
15781esac
15782fi
15783
15784MAGIC_CMD=$lt_cv_path_MAGIC_CMD
15785if test -n "$MAGIC_CMD"; then
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
15787$as_echo "$MAGIC_CMD" >&6; }
15788else
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15790$as_echo "no" >&6; }
15791fi
15792
15793
15794
15795
15796
15797if test -z "$lt_cv_path_MAGIC_CMD"; then
15798 if test -n "$ac_tool_prefix"; then
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
15800$as_echo_n "checking for file... " >&6; }
15801if ${lt_cv_path_MAGIC_CMD+:} false; then :
15802 $as_echo_n "(cached) " >&6
15803else
15804 case $MAGIC_CMD in
15805[\\/*] | ?:[\\/]*)
15806 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
15807 ;;
15808*)
15809 lt_save_MAGIC_CMD=$MAGIC_CMD
15810 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
15811 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
15812 for ac_dir in $ac_dummy; do
15813 IFS=$lt_save_ifs
15814 test -z "$ac_dir" && ac_dir=.
15815 if test -f "$ac_dir/file"; then
15816 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
15817 if test -n "$file_magic_test_file"; then
15818 case $deplibs_check_method in
15819 "file_magic "*)
15820 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
15821 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
15822 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
15823 $EGREP "$file_magic_regex" > /dev/null; then
15824 :
15825 else
15826 cat <<_LT_EOF 1>&2
15827
15828*** Warning: the command libtool uses to detect shared libraries,
15829*** $file_magic_cmd, produces output that libtool cannot recognize.
15830*** The result is that libtool may fail to recognize shared libraries
15831*** as such. This will affect the creation of libtool libraries that
15832*** depend on shared libraries, but programs linked with such libtool
15833*** libraries will work regardless of this problem. Nevertheless, you
15834*** may want to report the problem to your system manager and/or to
15835*** bug-libtool@gnu.org
15836
15837_LT_EOF
15838 fi ;;
15839 esac
15840 fi
15841 break
15842 fi
15843 done
15844 IFS=$lt_save_ifs
15845 MAGIC_CMD=$lt_save_MAGIC_CMD
15846 ;;
15847esac
15848fi
15849
15850MAGIC_CMD=$lt_cv_path_MAGIC_CMD
15851if test -n "$MAGIC_CMD"; then
15852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
15853$as_echo "$MAGIC_CMD" >&6; }
15854else
15855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15856$as_echo "no" >&6; }
15857fi
15858
15859
15860 else
15861 MAGIC_CMD=:
15862 fi
15863fi
15864
15865 fi
15866 ;;
15867esac
15868
15869# Use C for the default configuration in the libtool script
15870
15871lt_save_CC=$CC
15872ac_ext=c
15873ac_cpp='$CPP $CPPFLAGS'
15874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15876ac_compiler_gnu=$ac_cv_c_compiler_gnu
15877
15878
15879# Source file extension for C test sources.
15880ac_ext=c
15881
15882# Object file extension for compiled C test sources.
15883objext=o
15884objext=$objext
15885
15886# Code to be used in simple compile tests
15887lt_simple_compile_test_code="int some_variable = 0;"
15888
15889# Code to be used in simple link tests
15890lt_simple_link_test_code='int main(){return(0);}'
15891
15892
15893
15894
15895
15896
15897
15898# If no C compiler was specified, use CC.
15899LTCC=${LTCC-"$CC"}
15900
15901# If no C compiler flags were specified, use CFLAGS.
15902LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
15903
15904# Allow CC to be a program name with arguments.
15905compiler=$CC
15906
15907# Save the default compiler, since it gets overwritten when the other
15908# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
15909compiler_DEFAULT=$CC
15910
15911# save warnings/boilerplate of simple test code
15912ac_outfile=conftest.$ac_objext
15913echo "$lt_simple_compile_test_code" >conftest.$ac_ext
15914eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
15915_lt_compiler_boilerplate=`cat conftest.err`
15916$RM conftest*
15917
15918ac_outfile=conftest.$ac_objext
15919echo "$lt_simple_link_test_code" >conftest.$ac_ext
15920eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
15921_lt_linker_boilerplate=`cat conftest.err`
15922$RM -r conftest*
15923
15924
15925if test -n "$compiler"; then
15926
15927lt_prog_compiler_no_builtin_flag=
15928
15929if test yes = "$GCC"; then
15930 case $cc_basename in
15931 nvcc*)
15932 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
15933 *)
15934 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
15935 esac
15936
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
15938$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
15939if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
15940 $as_echo_n "(cached) " >&6
15941else
15942 lt_cv_prog_compiler_rtti_exceptions=no
15943 ac_outfile=conftest.$ac_objext
15944 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15945 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
15946 # Insert the option either (1) after the last *FLAGS variable, or
15947 # (2) before a word containing "conftest.", or (3) at the end.
15948 # Note that $ac_compile itself does not contain backslashes and begins
15949 # with a dollar sign (not a hyphen), so the echo should work correctly.
15950 # The option is referenced via a variable to avoid confusing sed.
15951 lt_compile=`echo "$ac_compile" | $SED \
15952 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15953 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15954 -e 's:$: $lt_compiler_flag:'`
15955 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15956 (eval "$lt_compile" 2>conftest.err)
15957 ac_status=$?
15958 cat conftest.err >&5
15959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15960 if (exit $ac_status) && test -s "$ac_outfile"; then
15961 # The compiler can only warn and ignore the option if not recognized
15962 # So say no if there are warnings other than the usual output.
15963 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
15964 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15965 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
15966 lt_cv_prog_compiler_rtti_exceptions=yes
15967 fi
15968 fi
15969 $RM conftest*
15970
15971fi
15972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
15973$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
15974
15975if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
15976 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
15977else
15978 :
15979fi
15980
15981fi
15982
15983
15984
15985
15986
15987
15988 lt_prog_compiler_wl=
15989lt_prog_compiler_pic=
15990lt_prog_compiler_static=
15991
15992
15993 if test yes = "$GCC"; then
15994 lt_prog_compiler_wl='-Wl,'
15995 lt_prog_compiler_static='-static'
15996
15997 case $host_os in
15998 aix*)
15999 # All AIX code is PIC.
16000 if test ia64 = "$host_cpu"; then
16001 # AIX 5 now supports IA64 processor
16002 lt_prog_compiler_static='-Bstatic'
16003 fi
16004 lt_prog_compiler_pic='-fPIC'
16005 ;;
16006
16007 amigaos*)
16008 case $host_cpu in
16009 powerpc)
16010 # see comment about AmigaOS4 .so support
16011 lt_prog_compiler_pic='-fPIC'
16012 ;;
16013 m68k)
16014 # FIXME: we need at least 68020 code to build shared libraries, but
16015 # adding the '-m68020' flag to GCC prevents building anything better,
16016 # like '-m68040'.
16017 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
16018 ;;
16019 esac
16020 ;;
16021
16022 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16023 # PIC is the default for these OSes.
16024 ;;
16025
16026 mingw* | cygwin* | pw32* | os2* | cegcc*)
16027 # This hack is so that the source file can tell whether it is being
16028 # built for inclusion in a dll (and should export symbols for example).
16029 # Although the cygwin gcc ignores -fPIC, still need this for old-style
16030 # (--disable-auto-import) libraries
16031 lt_prog_compiler_pic='-DDLL_EXPORT'
16032 case $host_os in
16033 os2*)
16034 lt_prog_compiler_static='$wl-static'
16035 ;;
16036 esac
16037 ;;
16038
16039 darwin* | rhapsody*)
16040 # PIC is the default on this platform
16041 # Common symbols not allowed in MH_DYLIB files
16042 lt_prog_compiler_pic='-fno-common'
16043 ;;
16044
16045 haiku*)
16046 # PIC is the default for Haiku.
16047 # The "-static" flag exists, but is broken.
16048 lt_prog_compiler_static=
16049 ;;
16050
16051 hpux*)
16052 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
16053 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
16054 # sets the default TLS model and affects inlining.
16055 case $host_cpu in
16056 hppa*64*)
16057 # +Z the default
16058 ;;
16059 *)
16060 lt_prog_compiler_pic='-fPIC'
16061 ;;
16062 esac
16063 ;;
16064
16065 interix[3-9]*)
16066 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
16067 # Instead, we relocate shared libraries at runtime.
16068 ;;
16069
16070 msdosdjgpp*)
16071 # Just because we use GCC doesn't mean we suddenly get shared libraries
16072 # on systems that don't support them.
16073 lt_prog_compiler_can_build_shared=no
16074 enable_shared=no
16075 ;;
16076
16077 *nto* | *qnx*)
16078 # QNX uses GNU C++, but need to define -shared option too, otherwise
16079 # it will coredump.
16080 lt_prog_compiler_pic='-fPIC -shared'
16081 ;;
16082
16083 sysv4*MP*)
16084 if test -d /usr/nec; then
16085 lt_prog_compiler_pic=-Kconform_pic
16086 fi
16087 ;;
16088
16089 *)
16090 lt_prog_compiler_pic='-fPIC'
16091 ;;
16092 esac
16093
16094 case $cc_basename in
16095 nvcc*) # Cuda Compiler Driver 2.2
16096 lt_prog_compiler_wl='-Xlinker '
16097 if test -n "$lt_prog_compiler_pic"; then
16098 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
16099 fi
16100 ;;
16101 esac
16102 else
16103 # PORTME Check for flag to pass linker flags through the system compiler.
16104 case $host_os in
16105 aix*)
16106 lt_prog_compiler_wl='-Wl,'
16107 if test ia64 = "$host_cpu"; then
16108 # AIX 5 now supports IA64 processor
16109 lt_prog_compiler_static='-Bstatic'
16110 else
16111 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
16112 fi
16113 ;;
16114
16115 darwin* | rhapsody*)
16116 # PIC is the default on this platform
16117 # Common symbols not allowed in MH_DYLIB files
16118 lt_prog_compiler_pic='-fno-common'
16119 case $cc_basename in
16120 nagfor*)
16121 # NAG Fortran compiler
16122 lt_prog_compiler_wl='-Wl,-Wl,,'
16123 lt_prog_compiler_pic='-PIC'
16124 lt_prog_compiler_static='-Bstatic'
16125 ;;
16126 esac
16127 ;;
16128
16129 mingw* | cygwin* | pw32* | os2* | cegcc*)
16130 # This hack is so that the source file can tell whether it is being
16131 # built for inclusion in a dll (and should export symbols for example).
16132 lt_prog_compiler_pic='-DDLL_EXPORT'
16133 case $host_os in
16134 os2*)
16135 lt_prog_compiler_static='$wl-static'
16136 ;;
16137 esac
16138 ;;
16139
16140 hpux9* | hpux10* | hpux11*)
16141 lt_prog_compiler_wl='-Wl,'
16142 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16143 # not for PA HP-UX.
16144 case $host_cpu in
16145 hppa*64*|ia64*)
16146 # +Z the default
16147 ;;
16148 *)
16149 lt_prog_compiler_pic='+Z'
16150 ;;
16151 esac
16152 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16153 lt_prog_compiler_static='$wl-a ${wl}archive'
16154 ;;
16155
16156 irix5* | irix6* | nonstopux*)
16157 lt_prog_compiler_wl='-Wl,'
16158 # PIC (with -KPIC) is the default.
16159 lt_prog_compiler_static='-non_shared'
16160 ;;
16161
16162 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
16163 case $cc_basename in
16164 # old Intel for x86_64, which still supported -KPIC.
16165 ecc*)
16166 lt_prog_compiler_wl='-Wl,'
16167 lt_prog_compiler_pic='-KPIC'
16168 lt_prog_compiler_static='-static'
16169 ;;
16170 # icc used to be incompatible with GCC.
16171 # ICC 10 doesn't accept -KPIC any more.
16172 icc* | ifort*)
16173 lt_prog_compiler_wl='-Wl,'
16174 lt_prog_compiler_pic='-fPIC'
16175 lt_prog_compiler_static='-static'
16176 ;;
16177 # Lahey Fortran 8.1.
16178 lf95*)
16179 lt_prog_compiler_wl='-Wl,'
16180 lt_prog_compiler_pic='--shared'
16181 lt_prog_compiler_static='--static'
16182 ;;
16183 nagfor*)
16184 # NAG Fortran compiler
16185 lt_prog_compiler_wl='-Wl,-Wl,,'
16186 lt_prog_compiler_pic='-PIC'
16187 lt_prog_compiler_static='-Bstatic'
16188 ;;
16189 tcc*)
16190 # Fabrice Bellard et al's Tiny C Compiler
16191 lt_prog_compiler_wl='-Wl,'
16192 lt_prog_compiler_pic='-fPIC'
16193 lt_prog_compiler_static='-static'
16194 ;;
16195 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
16196 # Portland Group compilers (*not* the Pentium gcc compiler,
16197 # which looks to be a dead project)
16198 lt_prog_compiler_wl='-Wl,'
16199 lt_prog_compiler_pic='-fpic'
16200 lt_prog_compiler_static='-Bstatic'
16201 ;;
16202 ccc*)
16203 lt_prog_compiler_wl='-Wl,'
16204 # All Alpha code is PIC.
16205 lt_prog_compiler_static='-non_shared'
16206 ;;
16207 xl* | bgxl* | bgf* | mpixl*)
16208 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
16209 lt_prog_compiler_wl='-Wl,'
16210 lt_prog_compiler_pic='-qpic'
16211 lt_prog_compiler_static='-qstaticlink'
16212 ;;
16213 *)
16214 case `$CC -V 2>&1 | sed 5q` in
16215 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
16216 # Sun Fortran 8.3 passes all unrecognized flags to the linker
16217 lt_prog_compiler_pic='-KPIC'
16218 lt_prog_compiler_static='-Bstatic'
16219 lt_prog_compiler_wl=''
16220 ;;
16221 *Sun\ F* | *Sun*Fortran*)
16222 lt_prog_compiler_pic='-KPIC'
16223 lt_prog_compiler_static='-Bstatic'
16224 lt_prog_compiler_wl='-Qoption ld '
16225 ;;
16226 *Sun\ C*)
16227 # Sun C 5.9
16228 lt_prog_compiler_pic='-KPIC'
16229 lt_prog_compiler_static='-Bstatic'
16230 lt_prog_compiler_wl='-Wl,'
16231 ;;
16232 *Intel*\ [CF]*Compiler*)
16233 lt_prog_compiler_wl='-Wl,'
16234 lt_prog_compiler_pic='-fPIC'
16235 lt_prog_compiler_static='-static'
16236 ;;
16237 *Portland\ Group*)
16238 lt_prog_compiler_wl='-Wl,'
16239 lt_prog_compiler_pic='-fpic'
16240 lt_prog_compiler_static='-Bstatic'
16241 ;;
16242 esac
16243 ;;
16244 esac
16245 ;;
16246
16247 newsos6)
16248 lt_prog_compiler_pic='-KPIC'
16249 lt_prog_compiler_static='-Bstatic'
16250 ;;
16251
16252 *nto* | *qnx*)
16253 # QNX uses GNU C++, but need to define -shared option too, otherwise
16254 # it will coredump.
16255 lt_prog_compiler_pic='-fPIC -shared'
16256 ;;
16257
16258 osf3* | osf4* | osf5*)
16259 lt_prog_compiler_wl='-Wl,'
16260 # All OSF/1 code is PIC.
16261 lt_prog_compiler_static='-non_shared'
16262 ;;
16263
16264 rdos*)
16265 lt_prog_compiler_static='-non_shared'
16266 ;;
16267
16268 solaris*)
16269 lt_prog_compiler_pic='-KPIC'
16270 lt_prog_compiler_static='-Bstatic'
16271 case $cc_basename in
16272 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
16273 lt_prog_compiler_wl='-Qoption ld ';;
16274 *)
16275 lt_prog_compiler_wl='-Wl,';;
16276 esac
16277 ;;
16278
16279 sunos4*)
16280 lt_prog_compiler_wl='-Qoption ld '
16281 lt_prog_compiler_pic='-PIC'
16282 lt_prog_compiler_static='-Bstatic'
16283 ;;
16284
16285 sysv4 | sysv4.2uw2* | sysv4.3*)
16286 lt_prog_compiler_wl='-Wl,'
16287 lt_prog_compiler_pic='-KPIC'
16288 lt_prog_compiler_static='-Bstatic'
16289 ;;
16290
16291 sysv4*MP*)
16292 if test -d /usr/nec; then
16293 lt_prog_compiler_pic='-Kconform_pic'
16294 lt_prog_compiler_static='-Bstatic'
16295 fi
16296 ;;
16297
16298 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
16299 lt_prog_compiler_wl='-Wl,'
16300 lt_prog_compiler_pic='-KPIC'
16301 lt_prog_compiler_static='-Bstatic'
16302 ;;
16303
16304 unicos*)
16305 lt_prog_compiler_wl='-Wl,'
16306 lt_prog_compiler_can_build_shared=no
16307 ;;
16308
16309 uts4*)
16310 lt_prog_compiler_pic='-pic'
16311 lt_prog_compiler_static='-Bstatic'
16312 ;;
16313
16314 *)
16315 lt_prog_compiler_can_build_shared=no
16316 ;;
16317 esac
16318 fi
16319
16320case $host_os in
16321 # For platforms that do not support PIC, -DPIC is meaningless:
16322 *djgpp*)
16323 lt_prog_compiler_pic=
16324 ;;
16325 *)
16326 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
16327 ;;
16328esac
16329
16330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
16331$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
16332if ${lt_cv_prog_compiler_pic+:} false; then :
16333 $as_echo_n "(cached) " >&6
16334else
16335 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
16336fi
16337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
16338$as_echo "$lt_cv_prog_compiler_pic" >&6; }
16339lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
16340
16341#
16342# Check to make sure the PIC flag actually works.
16343#
16344if test -n "$lt_prog_compiler_pic"; then
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
16346$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
16347if ${lt_cv_prog_compiler_pic_works+:} false; then :
16348 $as_echo_n "(cached) " >&6
16349else
16350 lt_cv_prog_compiler_pic_works=no
16351 ac_outfile=conftest.$ac_objext
16352 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16353 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
16354 # Insert the option either (1) after the last *FLAGS variable, or
16355 # (2) before a word containing "conftest.", or (3) at the end.
16356 # Note that $ac_compile itself does not contain backslashes and begins
16357 # with a dollar sign (not a hyphen), so the echo should work correctly.
16358 # The option is referenced via a variable to avoid confusing sed.
16359 lt_compile=`echo "$ac_compile" | $SED \
16360 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16361 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16362 -e 's:$: $lt_compiler_flag:'`
16363 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
16364 (eval "$lt_compile" 2>conftest.err)
16365 ac_status=$?
16366 cat conftest.err >&5
16367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16368 if (exit $ac_status) && test -s "$ac_outfile"; then
16369 # The compiler can only warn and ignore the option if not recognized
16370 # So say no if there are warnings other than the usual output.
16371 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
16372 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16373 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16374 lt_cv_prog_compiler_pic_works=yes
16375 fi
16376 fi
16377 $RM conftest*
16378
16379fi
16380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
16381$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
16382
16383if test yes = "$lt_cv_prog_compiler_pic_works"; then
16384 case $lt_prog_compiler_pic in
16385 "" | " "*) ;;
16386 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
16387 esac
16388else
16389 lt_prog_compiler_pic=
16390 lt_prog_compiler_can_build_shared=no
16391fi
16392
16393fi
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405#
16406# Check to make sure the static flag actually works.
16407#
16408wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
16409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
16410$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
16411if ${lt_cv_prog_compiler_static_works+:} false; then :
16412 $as_echo_n "(cached) " >&6
16413else
16414 lt_cv_prog_compiler_static_works=no
16415 save_LDFLAGS=$LDFLAGS
16416 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
16417 echo "$lt_simple_link_test_code" > conftest.$ac_ext
16418 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16419 # The linker can only warn and ignore the option if not recognized
16420 # So say no if there are warnings
16421 if test -s conftest.err; then
16422 # Append any errors to the config.log.
16423 cat conftest.err 1>&5
16424 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
16425 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16426 if diff conftest.exp conftest.er2 >/dev/null; then
16427 lt_cv_prog_compiler_static_works=yes
16428 fi
16429 else
16430 lt_cv_prog_compiler_static_works=yes
16431 fi
16432 fi
16433 $RM -r conftest*
16434 LDFLAGS=$save_LDFLAGS
16435
16436fi
16437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
16438$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
16439
16440if test yes = "$lt_cv_prog_compiler_static_works"; then
16441 :
16442else
16443 lt_prog_compiler_static=
16444fi
16445
16446
16447
16448
16449
16450
16451
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
16453$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
16454if ${lt_cv_prog_compiler_c_o+:} false; then :
16455 $as_echo_n "(cached) " >&6
16456else
16457 lt_cv_prog_compiler_c_o=no
16458 $RM -r conftest 2>/dev/null
16459 mkdir conftest
16460 cd conftest
16461 mkdir out
16462 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16463
16464 lt_compiler_flag="-o out/conftest2.$ac_objext"
16465 # Insert the option either (1) after the last *FLAGS variable, or
16466 # (2) before a word containing "conftest.", or (3) at the end.
16467 # Note that $ac_compile itself does not contain backslashes and begins
16468 # with a dollar sign (not a hyphen), so the echo should work correctly.
16469 lt_compile=`echo "$ac_compile" | $SED \
16470 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16471 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16472 -e 's:$: $lt_compiler_flag:'`
16473 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
16474 (eval "$lt_compile" 2>out/conftest.err)
16475 ac_status=$?
16476 cat out/conftest.err >&5
16477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16478 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16479 then
16480 # The compiler can only warn and ignore the option if not recognized
16481 # So say no if there are warnings
16482 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
16483 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16484 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16485 lt_cv_prog_compiler_c_o=yes
16486 fi
16487 fi
16488 chmod u+w . 2>&5
16489 $RM conftest*
16490 # SGI C++ compiler will create directory out/ii_files/ for
16491 # template instantiation
16492 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
16493 $RM out/* && rmdir out
16494 cd ..
16495 $RM -r conftest
16496 $RM conftest*
16497
16498fi
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
16500$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
16501
16502
16503
16504
16505
16506
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
16508$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
16509if ${lt_cv_prog_compiler_c_o+:} false; then :
16510 $as_echo_n "(cached) " >&6
16511else
16512 lt_cv_prog_compiler_c_o=no
16513 $RM -r conftest 2>/dev/null
16514 mkdir conftest
16515 cd conftest
16516 mkdir out
16517 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16518
16519 lt_compiler_flag="-o out/conftest2.$ac_objext"
16520 # Insert the option either (1) after the last *FLAGS variable, or
16521 # (2) before a word containing "conftest.", or (3) at the end.
16522 # Note that $ac_compile itself does not contain backslashes and begins
16523 # with a dollar sign (not a hyphen), so the echo should work correctly.
16524 lt_compile=`echo "$ac_compile" | $SED \
16525 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16526 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16527 -e 's:$: $lt_compiler_flag:'`
16528 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
16529 (eval "$lt_compile" 2>out/conftest.err)
16530 ac_status=$?
16531 cat out/conftest.err >&5
16532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16533 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16534 then
16535 # The compiler can only warn and ignore the option if not recognized
16536 # So say no if there are warnings
16537 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
16538 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16539 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16540 lt_cv_prog_compiler_c_o=yes
16541 fi
16542 fi
16543 chmod u+w . 2>&5
16544 $RM conftest*
16545 # SGI C++ compiler will create directory out/ii_files/ for
16546 # template instantiation
16547 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
16548 $RM out/* && rmdir out
16549 cd ..
16550 $RM -r conftest
16551 $RM conftest*
16552
16553fi
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
16555$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
16556
16557
16558
16559
16560hard_links=nottested
16561if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
16562 # do not overwrite the value of need_locks provided by the user
16563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
16564$as_echo_n "checking if we can lock with hard links... " >&6; }
16565 hard_links=yes
16566 $RM conftest*
16567 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16568 touch conftest.a
16569 ln conftest.a conftest.b 2>&5 || hard_links=no
16570 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
16572$as_echo "$hard_links" >&6; }
16573 if test no = "$hard_links"; then
16574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
16575$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
16576 need_locks=warn
16577 fi
16578else
16579 need_locks=no
16580fi
16581
16582
16583
16584
16585
16586
16587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
16588$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
16589
16590 runpath_var=
16591 allow_undefined_flag=
16592 always_export_symbols=no
16593 archive_cmds=
16594 archive_expsym_cmds=
16595 compiler_needs_object=no
16596 enable_shared_with_static_runtimes=no
16597 export_dynamic_flag_spec=
16598 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
16599 hardcode_automatic=no
16600 hardcode_direct=no
16601 hardcode_direct_absolute=no
16602 hardcode_libdir_flag_spec=
16603 hardcode_libdir_separator=
16604 hardcode_minus_L=no
16605 hardcode_shlibpath_var=unsupported
16606 inherit_rpath=no
16607 link_all_deplibs=unknown
16608 module_cmds=
16609 module_expsym_cmds=
16610 old_archive_from_new_cmds=
16611 old_archive_from_expsyms_cmds=
16612 thread_safe_flag_spec=
16613 whole_archive_flag_spec=
16614 # include_expsyms should be a list of space-separated symbols to be *always*
16615 # included in the symbol list
16616 include_expsyms=
16617 # exclude_expsyms can be an extended regexp of symbols to exclude
16618 # it will be wrapped by ' (' and ')$', so one must not match beginning or
16619 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
16620 # as well as any symbol that contains 'd'.
16621 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
16622 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
16623 # platforms (ab)use it in PIC code, but their linkers get confused if
16624 # the symbol is explicitly referenced. Since portable code cannot
16625 # rely on this symbol name, it's probably fine to never include it in
16626 # preloaded symbol tables.
16627 # Exclude shared library initialization/finalization symbols.
16628 extract_expsyms_cmds=
16629
16630 case $host_os in
16631 cygwin* | mingw* | pw32* | cegcc*)
16632 # FIXME: the MSVC++ port hasn't been tested in a loooong time
16633 # When not using gcc, we currently assume that we are using
16634 # Microsoft Visual C++.
16635 if test yes != "$GCC"; then
16636 with_gnu_ld=no
16637 fi
16638 ;;
16639 interix*)
16640 # we just hope/assume this is gcc and not c89 (= MSVC++)
16641 with_gnu_ld=yes
16642 ;;
16643 openbsd* | bitrig*)
16644 with_gnu_ld=no
16645 ;;
16646 esac
16647
16648 ld_shlibs=yes
16649
16650 # On some targets, GNU ld is compatible enough with the native linker
16651 # that we're better off using the native interface for both.
16652 lt_use_gnu_ld_interface=no
16653 if test yes = "$with_gnu_ld"; then
16654 case $host_os in
16655 aix*)
16656 # The AIX port of GNU ld has always aspired to compatibility
16657 # with the native linker. However, as the warning in the GNU ld
16658 # block says, versions before 2.19.5* couldn't really create working
16659 # shared libraries, regardless of the interface used.
16660 case `$LD -v 2>&1` in
16661 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
16662 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
16663 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
16664 *)
16665 lt_use_gnu_ld_interface=yes
16666 ;;
16667 esac
16668 ;;
16669 *)
16670 lt_use_gnu_ld_interface=yes
16671 ;;
16672 esac
16673 fi
16674
16675 if test yes = "$lt_use_gnu_ld_interface"; then
16676 # If archive_cmds runs LD, not CC, wlarc should be empty
16677 wlarc='$wl'
16678
16679 # Set some defaults for GNU ld with shared library support. These
16680 # are reset later if shared libraries are not supported. Putting them
16681 # here allows them to be overridden if necessary.
16682 runpath_var=LD_RUN_PATH
16683 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
16684 export_dynamic_flag_spec='$wl--export-dynamic'
16685 # ancient GNU ld didn't support --whole-archive et. al.
16686 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
16687 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
16688 else
16689 whole_archive_flag_spec=
16690 fi
16691 supports_anon_versioning=no
16692 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
16693 *GNU\ gold*) supports_anon_versioning=yes ;;
16694 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
16695 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
16696 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
16697 *\ 2.11.*) ;; # other 2.11 versions
16698 *) supports_anon_versioning=yes ;;
16699 esac
16700
16701 # See if GNU ld supports shared libraries.
16702 case $host_os in
16703 aix[3-9]*)
16704 # On AIX/PPC, the GNU linker is very broken
16705 if test ia64 != "$host_cpu"; then
16706 ld_shlibs=no
16707 cat <<_LT_EOF 1>&2
16708
16709*** Warning: the GNU linker, at least up to release 2.19, is reported
16710*** to be unable to reliably create shared libraries on AIX.
16711*** Therefore, libtool is disabling shared libraries support. If you
16712*** really care for shared libraries, you may want to install binutils
16713*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
16714*** You will then need to restart the configuration process.
16715
16716_LT_EOF
16717 fi
16718 ;;
16719
16720 amigaos*)
16721 case $host_cpu in
16722 powerpc)
16723 # see comment about AmigaOS4 .so support
16724 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16725 archive_expsym_cmds=''
16726 ;;
16727 m68k)
16728 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
16729 hardcode_libdir_flag_spec='-L$libdir'
16730 hardcode_minus_L=yes
16731 ;;
16732 esac
16733 ;;
16734
16735 beos*)
16736 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
16737 allow_undefined_flag=unsupported
16738 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
16739 # support --undefined. This deserves some investigation. FIXME
16740 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16741 else
16742 ld_shlibs=no
16743 fi
16744 ;;
16745
16746 cygwin* | mingw* | pw32* | cegcc*)
16747 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
16748 # as there is no search path for DLLs.
16749 hardcode_libdir_flag_spec='-L$libdir'
16750 export_dynamic_flag_spec='$wl--export-all-symbols'
16751 allow_undefined_flag=unsupported
16752 always_export_symbols=no
16753 enable_shared_with_static_runtimes=yes
16754 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
16755 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
16756
16757 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
16758 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
16759 # If the export-symbols file already is a .def file, use it as
16760 # is; otherwise, prepend EXPORTS...
16761 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
16762 cp $export_symbols $output_objdir/$soname.def;
16763 else
16764 echo EXPORTS > $output_objdir/$soname.def;
16765 cat $export_symbols >> $output_objdir/$soname.def;
16766 fi~
16767 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
16768 else
16769 ld_shlibs=no
16770 fi
16771 ;;
16772
16773 haiku*)
16774 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16775 link_all_deplibs=yes
16776 ;;
16777
16778 os2*)
16779 hardcode_libdir_flag_spec='-L$libdir'
16780 hardcode_minus_L=yes
16781 allow_undefined_flag=unsupported
16782 shrext_cmds=.dll
16783 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
16784 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
16785 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
16786 $ECHO EXPORTS >> $output_objdir/$libname.def~
16787 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
16788 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
16789 emximp -o $lib $output_objdir/$libname.def'
16790 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
16791 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
16792 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
16793 $ECHO EXPORTS >> $output_objdir/$libname.def~
16794 prefix_cmds="$SED"~
16795 if test EXPORTS = "`$SED 1q $export_symbols`"; then
16796 prefix_cmds="$prefix_cmds -e 1d";
16797 fi~
16798 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
16799 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
16800 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
16801 emximp -o $lib $output_objdir/$libname.def'
16802 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
16803 enable_shared_with_static_runtimes=yes
16804 ;;
16805
16806 interix[3-9]*)
16807 hardcode_direct=no
16808 hardcode_shlibpath_var=no
16809 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
16810 export_dynamic_flag_spec='$wl-E'
16811 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
16812 # Instead, shared libraries are loaded at an image base (0x10000000 by
16813 # default) and relocated if they conflict, which is a slow very memory
16814 # consuming and fragmenting process. To avoid this, we pick a random,
16815 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
16816 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
16817 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
16818 archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
16819 ;;
16820
16821 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
16822 tmp_diet=no
16823 if test linux-dietlibc = "$host_os"; then
16824 case $cc_basename in
16825 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
16826 esac
16827 fi
16828 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
16829 && test no = "$tmp_diet"
16830 then
16831 tmp_addflag=' $pic_flag'
16832 tmp_sharedflag='-shared'
16833 case $cc_basename,$host_cpu in
16834 pgcc*) # Portland Group C compiler
16835 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
16836 tmp_addflag=' $pic_flag'
16837 ;;
16838 pgf77* | pgf90* | pgf95* | pgfortran*)
16839 # Portland Group f77 and f90 compilers
16840 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
16841 tmp_addflag=' $pic_flag -Mnomain' ;;
16842 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
16843 tmp_addflag=' -i_dynamic' ;;
16844 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
16845 tmp_addflag=' -i_dynamic -nofor_main' ;;
16846 ifc* | ifort*) # Intel Fortran compiler
16847 tmp_addflag=' -nofor_main' ;;
16848 lf95*) # Lahey Fortran 8.1
16849 whole_archive_flag_spec=
16850 tmp_sharedflag='--shared' ;;
16851 nagfor*) # NAGFOR 5.3
16852 tmp_sharedflag='-Wl,-shared' ;;
16853 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
16854 tmp_sharedflag='-qmkshrobj'
16855 tmp_addflag= ;;
16856 nvcc*) # Cuda Compiler Driver 2.2
16857 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
16858 compiler_needs_object=yes
16859 ;;
16860 esac
16861 case `$CC -V 2>&1 | sed 5q` in
16862 *Sun\ C*) # Sun C 5.9
16863 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
16864 compiler_needs_object=yes
16865 tmp_sharedflag='-G' ;;
16866 *Sun\ F*) # Sun Fortran 8.3
16867 tmp_sharedflag='-G' ;;
16868 esac
16869 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16870
16871 if test yes = "$supports_anon_versioning"; then
16872 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
16873 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
16874 echo "local: *; };" >> $output_objdir/$libname.ver~
16875 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
16876 fi
16877
16878 case $cc_basename in
16879 tcc*)
16880 export_dynamic_flag_spec='-rdynamic'
16881 ;;
16882 xlf* | bgf* | bgxlf* | mpixlf*)
16883 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
16884 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
16885 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
16886 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
16887 if test yes = "$supports_anon_versioning"; then
16888 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
16889 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
16890 echo "local: *; };" >> $output_objdir/$libname.ver~
16891 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
16892 fi
16893 ;;
16894 esac
16895 else
16896 ld_shlibs=no
16897 fi
16898 ;;
16899
16900 netbsd*)
16901 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
16902 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
16903 wlarc=
16904 else
16905 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16906 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16907 fi
16908 ;;
16909
16910 solaris*)
16911 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
16912 ld_shlibs=no
16913 cat <<_LT_EOF 1>&2
16914
16915*** Warning: The releases 2.8.* of the GNU linker cannot reliably
16916*** create shared libraries on Solaris systems. Therefore, libtool
16917*** is disabling shared libraries support. We urge you to upgrade GNU
16918*** binutils to release 2.9.1 or newer. Another option is to modify
16919*** your PATH or compiler configuration so that the native linker is
16920*** used, and then restart.
16921
16922_LT_EOF
16923 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
16924 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16925 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16926 else
16927 ld_shlibs=no
16928 fi
16929 ;;
16930
16931 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
16932 case `$LD -v 2>&1` in
16933 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
16934 ld_shlibs=no
16935 cat <<_LT_EOF 1>&2
16936
16937*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
16938*** reliably create shared libraries on SCO systems. Therefore, libtool
16939*** is disabling shared libraries support. We urge you to upgrade GNU
16940*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
16941*** your PATH or compiler configuration so that the native linker is
16942*** used, and then restart.
16943
16944_LT_EOF
16945 ;;
16946 *)
16947 # For security reasons, it is highly recommended that you always
16948 # use absolute paths for naming shared libraries, and exclude the
16949 # DT_RUNPATH tag from executables and libraries. But doing so
16950 # requires that you compile everything twice, which is a pain.
16951 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
16952 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
16953 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16954 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16955 else
16956 ld_shlibs=no
16957 fi
16958 ;;
16959 esac
16960 ;;
16961
16962 sunos4*)
16963 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
16964 wlarc=
16965 hardcode_direct=yes
16966 hardcode_shlibpath_var=no
16967 ;;
16968
16969 *)
16970 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
16971 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16972 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16973 else
16974 ld_shlibs=no
16975 fi
16976 ;;
16977 esac
16978
16979 if test no = "$ld_shlibs"; then
16980 runpath_var=
16981 hardcode_libdir_flag_spec=
16982 export_dynamic_flag_spec=
16983 whole_archive_flag_spec=
16984 fi
16985 else
16986 # PORTME fill in a description of your system's linker (not GNU ld)
16987 case $host_os in
16988 aix3*)
16989 allow_undefined_flag=unsupported
16990 always_export_symbols=yes
16991 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
16992 # Note: this linker hardcodes the directories in LIBPATH if there
16993 # are no directories specified by -L.
16994 hardcode_minus_L=yes
16995 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
16996 # Neither direct hardcoding nor static linking is supported with a
16997 # broken collect2.
16998 hardcode_direct=unsupported
16999 fi
17000 ;;
17001
17002 aix[4-9]*)
17003 if test ia64 = "$host_cpu"; then
17004 # On IA64, the linker does run time linking by default, so we don't
17005 # have to do anything special.
17006 aix_use_runtimelinking=no
17007 exp_sym_flag='-Bexport'
17008 no_entry_flag=
17009 else
17010 # If we're using GNU nm, then we don't want the "-C" option.
17011 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
17012 # Without the "-l" option, or with the "-B" option, AIX nm treats
17013 # weak defined symbols like other global defined symbols, whereas
17014 # GNU nm marks them as "W".
17015 # While the 'weak' keyword is ignored in the Export File, we need
17016 # it in the Import File for the 'aix-soname' feature, so we have
17017 # to replace the "-B" option with "-P" for AIX nm.
17018 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
17019 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
17020 else
17021 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
17022 fi
17023 aix_use_runtimelinking=no
17024
17025 # Test if we are trying to use run time linking or normal
17026 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17027 # have runtime linking enabled, and use it for executables.
17028 # For shared libraries, we enable/disable runtime linking
17029 # depending on the kind of the shared library created -
17030 # when "with_aix_soname,aix_use_runtimelinking" is:
17031 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
17032 # "aix,yes" lib.so shared, rtl:yes, for executables
17033 # lib.a static archive
17034 # "both,no" lib.so.V(shr.o) shared, rtl:yes
17035 # lib.a(lib.so.V) shared, rtl:no, for executables
17036 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
17037 # lib.a(lib.so.V) shared, rtl:no
17038 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
17039 # lib.a static archive
17040 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17041 for ld_flag in $LDFLAGS; do
17042 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
17043 aix_use_runtimelinking=yes
17044 break
17045 fi
17046 done
17047 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
17048 # With aix-soname=svr4, we create the lib.so.V shared archives only,
17049 # so we don't have lib.a shared libs to link our executables.
17050 # We have to force runtime linking in this case.
17051 aix_use_runtimelinking=yes
17052 LDFLAGS="$LDFLAGS -Wl,-brtl"
17053 fi
17054 ;;
17055 esac
17056
17057 exp_sym_flag='-bexport'
17058 no_entry_flag='-bnoentry'
17059 fi
17060
17061 # When large executables or shared objects are built, AIX ld can
17062 # have problems creating the table of contents. If linking a library
17063 # or program results in "error TOC overflow" add -mminimal-toc to
17064 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17065 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17066
17067 archive_cmds=''
17068 hardcode_direct=yes
17069 hardcode_direct_absolute=yes
17070 hardcode_libdir_separator=':'
17071 link_all_deplibs=yes
17072 file_list_spec='$wl-f,'
17073 case $with_aix_soname,$aix_use_runtimelinking in
17074 aix,*) ;; # traditional, no import file
17075 svr4,* | *,yes) # use import file
17076 # The Import File defines what to hardcode.
17077 hardcode_direct=no
17078 hardcode_direct_absolute=no
17079 ;;
17080 esac
17081
17082 if test yes = "$GCC"; then
17083 case $host_os in aix4.[012]|aix4.[012].*)
17084 # We only want to do this on AIX 4.2 and lower, the check
17085 # below for broken collect2 doesn't work under 4.3+
17086 collect2name=`$CC -print-prog-name=collect2`
17087 if test -f "$collect2name" &&
17088 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
17089 then
17090 # We have reworked collect2
17091 :
17092 else
17093 # We have old collect2
17094 hardcode_direct=unsupported
17095 # It fails to find uninstalled libraries when the uninstalled
17096 # path is not listed in the libpath. Setting hardcode_minus_L
17097 # to unsupported forces relinking
17098 hardcode_minus_L=yes
17099 hardcode_libdir_flag_spec='-L$libdir'
17100 hardcode_libdir_separator=
17101 fi
17102 ;;
17103 esac
17104 shared_flag='-shared'
17105 if test yes = "$aix_use_runtimelinking"; then
17106 shared_flag="$shared_flag "'$wl-G'
17107 fi
17108 # Need to ensure runtime linking is disabled for the traditional
17109 # shared library, or the linker may eventually find shared libraries
17110 # /with/ Import File - we do not want to mix them.
17111 shared_flag_aix='-shared'
17112 shared_flag_svr4='-shared $wl-G'
17113 else
17114 # not using gcc
17115 if test ia64 = "$host_cpu"; then
17116 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17117 # chokes on -Wl,-G. The following line is correct:
17118 shared_flag='-G'
17119 else
17120 if test yes = "$aix_use_runtimelinking"; then
17121 shared_flag='$wl-G'
17122 else
17123 shared_flag='$wl-bM:SRE'
17124 fi
17125 shared_flag_aix='$wl-bM:SRE'
17126 shared_flag_svr4='$wl-G'
17127 fi
17128 fi
17129
17130 export_dynamic_flag_spec='$wl-bexpall'
17131 # It seems that -bexpall does not export symbols beginning with
17132 # underscore (_), so it is better to generate a list of symbols to export.
17133 always_export_symbols=yes
17134 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
17135 # Warning - without using the other runtime loading flags (-brtl),
17136 # -berok will link without error, but may produce a broken library.
17137 allow_undefined_flag='-berok'
17138 # Determine the default libpath from the value encoded in an
17139 # empty executable.
17140 if test set = "${lt_cv_aix_libpath+set}"; then
17141 aix_libpath=$lt_cv_aix_libpath
17142else
17143 if ${lt_cv_aix_libpath_+:} false; then :
17144 $as_echo_n "(cached) " >&6
17145else
17146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17147/* end confdefs.h. */
17148
17149int
17150main ()
17151{
17152
17153 ;
17154 return 0;
17155}
17156_ACEOF
17157if ac_fn_c_try_link "$LINENO"; then :
17158
17159 lt_aix_libpath_sed='
17160 /Import File Strings/,/^$/ {
17161 /^0/ {
17162 s/^0 *\([^ ]*\) *$/\1/
17163 p
17164 }
17165 }'
17166 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17167 # Check for a 64-bit object if we didn't find anything.
17168 if test -z "$lt_cv_aix_libpath_"; then
17169 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17170 fi
17171fi
17172rm -f core conftest.err conftest.$ac_objext \
17173 conftest$ac_exeext conftest.$ac_ext
17174 if test -z "$lt_cv_aix_libpath_"; then
17175 lt_cv_aix_libpath_=/usr/lib:/lib
17176 fi
17177
17178fi
17179
17180 aix_libpath=$lt_cv_aix_libpath_
17181fi
17182
17183 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
17184 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
17185 else
17186 if test ia64 = "$host_cpu"; then
17187 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
17188 allow_undefined_flag="-z nodefs"
17189 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
17190 else
17191 # Determine the default libpath from the value encoded in an
17192 # empty executable.
17193 if test set = "${lt_cv_aix_libpath+set}"; then
17194 aix_libpath=$lt_cv_aix_libpath
17195else
17196 if ${lt_cv_aix_libpath_+:} false; then :
17197 $as_echo_n "(cached) " >&6
17198else
17199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17200/* end confdefs.h. */
17201
17202int
17203main ()
17204{
17205
17206 ;
17207 return 0;
17208}
17209_ACEOF
17210if ac_fn_c_try_link "$LINENO"; then :
17211
17212 lt_aix_libpath_sed='
17213 /Import File Strings/,/^$/ {
17214 /^0/ {
17215 s/^0 *\([^ ]*\) *$/\1/
17216 p
17217 }
17218 }'
17219 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17220 # Check for a 64-bit object if we didn't find anything.
17221 if test -z "$lt_cv_aix_libpath_"; then
17222 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17223 fi
17224fi
17225rm -f core conftest.err conftest.$ac_objext \
17226 conftest$ac_exeext conftest.$ac_ext
17227 if test -z "$lt_cv_aix_libpath_"; then
17228 lt_cv_aix_libpath_=/usr/lib:/lib
17229 fi
17230
17231fi
17232
17233 aix_libpath=$lt_cv_aix_libpath_
17234fi
17235
17236 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
17237 # Warning - without using the other run time loading flags,
17238 # -berok will link without error, but may produce a broken library.
17239 no_undefined_flag=' $wl-bernotok'
17240 allow_undefined_flag=' $wl-berok'
17241 if test yes = "$with_gnu_ld"; then
17242 # We only use this code for GNU lds that support --whole-archive.
17243 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
17244 else
17245 # Exported symbols can be pulled into shared objects from archives
17246 whole_archive_flag_spec='$convenience'
17247 fi
17248 archive_cmds_need_lc=yes
17249 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
17250 # -brtl affects multiple linker settings, -berok does not and is overridden later
17251 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
17252 if test svr4 != "$with_aix_soname"; then
17253 # This is similar to how AIX traditionally builds its shared libraries.
17254 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
17255 fi
17256 if test aix != "$with_aix_soname"; then
17257 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
17258 else
17259 # used by -dlpreopen to get the symbols
17260 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
17261 fi
17262 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
17263 fi
17264 fi
17265 ;;
17266
17267 amigaos*)
17268 case $host_cpu in
17269 powerpc)
17270 # see comment about AmigaOS4 .so support
17271 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
17272 archive_expsym_cmds=''
17273 ;;
17274 m68k)
17275 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
17276 hardcode_libdir_flag_spec='-L$libdir'
17277 hardcode_minus_L=yes
17278 ;;
17279 esac
17280 ;;
17281
17282 bsdi[45]*)
17283 export_dynamic_flag_spec=-rdynamic
17284 ;;
17285
17286 cygwin* | mingw* | pw32* | cegcc*)
17287 # When not using gcc, we currently assume that we are using
17288 # Microsoft Visual C++.
17289 # hardcode_libdir_flag_spec is actually meaningless, as there is
17290 # no search path for DLLs.
17291 case $cc_basename in
17292 cl*)
17293 # Native MSVC
17294 hardcode_libdir_flag_spec=' '
17295 allow_undefined_flag=unsupported
17296 always_export_symbols=yes
17297 file_list_spec='@'
17298 # Tell ltmain to make .lib files, not .a files.
17299 libext=lib
17300 # Tell ltmain to make .dll files, not .so files.
17301 shrext_cmds=.dll
17302 # FIXME: Setting linknames here is a bad hack.
17303 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
17304 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
17305 cp "$export_symbols" "$output_objdir/$soname.def";
17306 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
17307 else
17308 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
17309 fi~
17310 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
17311 linknames='
17312 # The linker will not automatically build a static lib if we build a DLL.
17313 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
17314 enable_shared_with_static_runtimes=yes
17315 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
17316 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17317 # Don't use ranlib
17318 old_postinstall_cmds='chmod 644 $oldlib'
17319 postlink_cmds='lt_outputfile="@OUTPUT@"~
17320 lt_tool_outputfile="@TOOL_OUTPUT@"~
17321 case $lt_outputfile in
17322 *.exe|*.EXE) ;;
17323 *)
17324 lt_outputfile=$lt_outputfile.exe
17325 lt_tool_outputfile=$lt_tool_outputfile.exe
17326 ;;
17327 esac~
17328 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
17329 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
17330 $RM "$lt_outputfile.manifest";
17331 fi'
17332 ;;
17333 *)
17334 # Assume MSVC wrapper
17335 hardcode_libdir_flag_spec=' '
17336 allow_undefined_flag=unsupported
17337 # Tell ltmain to make .lib files, not .a files.
17338 libext=lib
17339 # Tell ltmain to make .dll files, not .so files.
17340 shrext_cmds=.dll
17341 # FIXME: Setting linknames here is a bad hack.
17342 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
17343 # The linker will automatically build a .lib file if we build a DLL.
17344 old_archive_from_new_cmds='true'
17345 # FIXME: Should let the user specify the lib program.
17346 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
17347 enable_shared_with_static_runtimes=yes
17348 ;;
17349 esac
17350 ;;
17351
17352 darwin* | rhapsody*)
17353
17354
17355 archive_cmds_need_lc=no
17356 hardcode_direct=no
17357 hardcode_automatic=yes
17358 hardcode_shlibpath_var=unsupported
17359 if test yes = "$lt_cv_ld_force_load"; then
17360 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
17361
17362 else
17363 whole_archive_flag_spec=''
17364 fi
17365 link_all_deplibs=yes
17366 allow_undefined_flag=$_lt_dar_allow_undefined
17367 case $cc_basename in
17368 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
17369 *) _lt_dar_can_shared=$GCC ;;
17370 esac
17371 if test yes = "$_lt_dar_can_shared"; then
17372 output_verbose_link_cmd=func_echo_all
17373 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
17374 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
17375 archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
17376 module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
17377
17378 else
17379 ld_shlibs=no
17380 fi
17381
17382 ;;
17383
17384 dgux*)
17385 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17386 hardcode_libdir_flag_spec='-L$libdir'
17387 hardcode_shlibpath_var=no
17388 ;;
17389
17390 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17391 # support. Future versions do this automatically, but an explicit c++rt0.o
17392 # does not break anything, and helps significantly (at the cost of a little
17393 # extra space).
17394 freebsd2.2*)
17395 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
17396 hardcode_libdir_flag_spec='-R$libdir'
17397 hardcode_direct=yes
17398 hardcode_shlibpath_var=no
17399 ;;
17400
17401 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
17402 freebsd2.*)
17403 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17404 hardcode_direct=yes
17405 hardcode_minus_L=yes
17406 hardcode_shlibpath_var=no
17407 ;;
17408
17409 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17410 freebsd* | dragonfly*)
17411 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17412 hardcode_libdir_flag_spec='-R$libdir'
17413 hardcode_direct=yes
17414 hardcode_shlibpath_var=no
17415 ;;
17416
17417 hpux9*)
17418 if test yes = "$GCC"; then
17419 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
17420 else
17421 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
17422 fi
17423 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
17424 hardcode_libdir_separator=:
17425 hardcode_direct=yes
17426
17427 # hardcode_minus_L: Not really in the search PATH,
17428 # but as the default location of the library.
17429 hardcode_minus_L=yes
17430 export_dynamic_flag_spec='$wl-E'
17431 ;;
17432
17433 hpux10*)
17434 if test yes,no = "$GCC,$with_gnu_ld"; then
17435 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17436 else
17437 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17438 fi
17439 if test no = "$with_gnu_ld"; then
17440 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
17441 hardcode_libdir_separator=:
17442 hardcode_direct=yes
17443 hardcode_direct_absolute=yes
17444 export_dynamic_flag_spec='$wl-E'
17445 # hardcode_minus_L: Not really in the search PATH,
17446 # but as the default location of the library.
17447 hardcode_minus_L=yes
17448 fi
17449 ;;
17450
17451 hpux11*)
17452 if test yes,no = "$GCC,$with_gnu_ld"; then
17453 case $host_cpu in
17454 hppa*64*)
17455 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
17456 ;;
17457 ia64*)
17458 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17459 ;;
17460 *)
17461 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17462 ;;
17463 esac
17464 else
17465 case $host_cpu in
17466 hppa*64*)
17467 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
17468 ;;
17469 ia64*)
17470 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17471 ;;
17472 *)
17473
17474 # Older versions of the 11.00 compiler do not understand -b yet
17475 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
17477$as_echo_n "checking if $CC understands -b... " >&6; }
17478if ${lt_cv_prog_compiler__b+:} false; then :
17479 $as_echo_n "(cached) " >&6
17480else
17481 lt_cv_prog_compiler__b=no
17482 save_LDFLAGS=$LDFLAGS
17483 LDFLAGS="$LDFLAGS -b"
17484 echo "$lt_simple_link_test_code" > conftest.$ac_ext
17485 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
17486 # The linker can only warn and ignore the option if not recognized
17487 # So say no if there are warnings
17488 if test -s conftest.err; then
17489 # Append any errors to the config.log.
17490 cat conftest.err 1>&5
17491 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
17492 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
17493 if diff conftest.exp conftest.er2 >/dev/null; then
17494 lt_cv_prog_compiler__b=yes
17495 fi
17496 else
17497 lt_cv_prog_compiler__b=yes
17498 fi
17499 fi
17500 $RM -r conftest*
17501 LDFLAGS=$save_LDFLAGS
17502
17503fi
17504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
17505$as_echo "$lt_cv_prog_compiler__b" >&6; }
17506
17507if test yes = "$lt_cv_prog_compiler__b"; then
17508 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17509else
17510 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17511fi
17512
17513 ;;
17514 esac
17515 fi
17516 if test no = "$with_gnu_ld"; then
17517 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
17518 hardcode_libdir_separator=:
17519
17520 case $host_cpu in
17521 hppa*64*|ia64*)
17522 hardcode_direct=no
17523 hardcode_shlibpath_var=no
17524 ;;
17525 *)
17526 hardcode_direct=yes
17527 hardcode_direct_absolute=yes
17528 export_dynamic_flag_spec='$wl-E'
17529
17530 # hardcode_minus_L: Not really in the search PATH,
17531 # but as the default location of the library.
17532 hardcode_minus_L=yes
17533 ;;
17534 esac
17535 fi
17536 ;;
17537
17538 irix5* | irix6* | nonstopux*)
17539 if test yes = "$GCC"; then
17540 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17541 # Try to use the -exported_symbol ld option, if it does not
17542 # work, assume that -exports_file does not work either and
17543 # implicitly export all symbols.
17544 # This should be the same for all languages, so no per-tag cache variable.
17545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
17546$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
17547if ${lt_cv_irix_exported_symbol+:} false; then :
17548 $as_echo_n "(cached) " >&6
17549else
17550 save_LDFLAGS=$LDFLAGS
17551 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
17552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17553/* end confdefs.h. */
17554int foo (void) { return 0; }
17555_ACEOF
17556if ac_fn_c_try_link "$LINENO"; then :
17557 lt_cv_irix_exported_symbol=yes
17558else
17559 lt_cv_irix_exported_symbol=no
17560fi
17561rm -f core conftest.err conftest.$ac_objext \
17562 conftest$ac_exeext conftest.$ac_ext
17563 LDFLAGS=$save_LDFLAGS
17564fi
17565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
17566$as_echo "$lt_cv_irix_exported_symbol" >&6; }
17567 if test yes = "$lt_cv_irix_exported_symbol"; then
17568 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
17569 fi
17570 else
17571 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17572 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
17573 fi
17574 archive_cmds_need_lc='no'
17575 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
17576 hardcode_libdir_separator=:
17577 inherit_rpath=yes
17578 link_all_deplibs=yes
17579 ;;
17580
17581 linux*)
17582 case $cc_basename in
17583 tcc*)
17584 # Fabrice Bellard et al's Tiny C Compiler
17585 ld_shlibs=yes
17586 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17587 ;;
17588 esac
17589 ;;
17590
17591 netbsd*)
17592 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
17593 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
17594 else
17595 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
17596 fi
17597 hardcode_libdir_flag_spec='-R$libdir'
17598 hardcode_direct=yes
17599 hardcode_shlibpath_var=no
17600 ;;
17601
17602 newsos6)
17603 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17604 hardcode_direct=yes
17605 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
17606 hardcode_libdir_separator=:
17607 hardcode_shlibpath_var=no
17608 ;;
17609
17610 *nto* | *qnx*)
17611 ;;
17612
17613 openbsd* | bitrig*)
17614 if test -f /usr/libexec/ld.so; then
17615 hardcode_direct=yes
17616 hardcode_shlibpath_var=no
17617 hardcode_direct_absolute=yes
17618 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
17619 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17620 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
17621 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
17622 export_dynamic_flag_spec='$wl-E'
17623 else
17624 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17625 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
17626 fi
17627 else
17628 ld_shlibs=no
17629 fi
17630 ;;
17631
17632 os2*)
17633 hardcode_libdir_flag_spec='-L$libdir'
17634 hardcode_minus_L=yes
17635 allow_undefined_flag=unsupported
17636 shrext_cmds=.dll
17637 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
17638 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
17639 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
17640 $ECHO EXPORTS >> $output_objdir/$libname.def~
17641 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
17642 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
17643 emximp -o $lib $output_objdir/$libname.def'
17644 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
17645 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
17646 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
17647 $ECHO EXPORTS >> $output_objdir/$libname.def~
17648 prefix_cmds="$SED"~
17649 if test EXPORTS = "`$SED 1q $export_symbols`"; then
17650 prefix_cmds="$prefix_cmds -e 1d";
17651 fi~
17652 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
17653 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
17654 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
17655 emximp -o $lib $output_objdir/$libname.def'
17656 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
17657 enable_shared_with_static_runtimes=yes
17658 ;;
17659
17660 osf3*)
17661 if test yes = "$GCC"; then
17662 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
17663 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17664 else
17665 allow_undefined_flag=' -expect_unresolved \*'
17666 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17667 fi
17668 archive_cmds_need_lc='no'
17669 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
17670 hardcode_libdir_separator=:
17671 ;;
17672
17673 osf4* | osf5*) # as osf3* with the addition of -msym flag
17674 if test yes = "$GCC"; then
17675 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
17676 archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17677 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
17678 else
17679 allow_undefined_flag=' -expect_unresolved \*'
17680 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17681 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
17682 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
17683
17684 # Both c and cxx compiler support -rpath directly
17685 hardcode_libdir_flag_spec='-rpath $libdir'
17686 fi
17687 archive_cmds_need_lc='no'
17688 hardcode_libdir_separator=:
17689 ;;
17690
17691 solaris*)
17692 no_undefined_flag=' -z defs'
17693 if test yes = "$GCC"; then
17694 wlarc='$wl'
17695 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
17696 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17697 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17698 else
17699 case `$CC -V 2>&1` in
17700 *"Compilers 5.0"*)
17701 wlarc=''
17702 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
17703 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17704 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
17705 ;;
17706 *)
17707 wlarc='$wl'
17708 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
17709 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17710 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17711 ;;
17712 esac
17713 fi
17714 hardcode_libdir_flag_spec='-R$libdir'
17715 hardcode_shlibpath_var=no
17716 case $host_os in
17717 solaris2.[0-5] | solaris2.[0-5].*) ;;
17718 *)
17719 # The compiler driver will combine and reorder linker options,
17720 # but understands '-z linker_flag'. GCC discards it without '$wl',
17721 # but is careful enough not to reorder.
17722 # Supported since Solaris 2.6 (maybe 2.5.1?)
17723 if test yes = "$GCC"; then
17724 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
17725 else
17726 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
17727 fi
17728 ;;
17729 esac
17730 link_all_deplibs=yes
17731 ;;
17732
17733 sunos4*)
17734 if test sequent = "$host_vendor"; then
17735 # Use $CC to link under sequent, because it throws in some extra .o
17736 # files that make .init and .fini sections work.
17737 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
17738 else
17739 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
17740 fi
17741 hardcode_libdir_flag_spec='-L$libdir'
17742 hardcode_direct=yes
17743 hardcode_minus_L=yes
17744 hardcode_shlibpath_var=no
17745 ;;
17746
17747 sysv4)
17748 case $host_vendor in
17749 sni)
17750 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17751 hardcode_direct=yes # is this really true???
17752 ;;
17753 siemens)
17754 ## LD is ld it makes a PLAMLIB
17755 ## CC just makes a GrossModule.
17756 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
17757 reload_cmds='$CC -r -o $output$reload_objs'
17758 hardcode_direct=no
17759 ;;
17760 motorola)
17761 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17762 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
17763 ;;
17764 esac
17765 runpath_var='LD_RUN_PATH'
17766 hardcode_shlibpath_var=no
17767 ;;
17768
17769 sysv4.3*)
17770 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17771 hardcode_shlibpath_var=no
17772 export_dynamic_flag_spec='-Bexport'
17773 ;;
17774
17775 sysv4*MP*)
17776 if test -d /usr/nec; then
17777 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17778 hardcode_shlibpath_var=no
17779 runpath_var=LD_RUN_PATH
17780 hardcode_runpath_var=yes
17781 ld_shlibs=yes
17782 fi
17783 ;;
17784
17785 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
17786 no_undefined_flag='$wl-z,text'
17787 archive_cmds_need_lc=no
17788 hardcode_shlibpath_var=no
17789 runpath_var='LD_RUN_PATH'
17790
17791 if test yes = "$GCC"; then
17792 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17793 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17794 else
17795 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17796 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17797 fi
17798 ;;
17799
17800 sysv5* | sco3.2v5* | sco5v6*)
17801 # Note: We CANNOT use -z defs as we might desire, because we do not
17802 # link with -lc, and that would cause any symbols used from libc to
17803 # always be unresolved, which means just about no library would
17804 # ever link correctly. If we're not using GNU ld we use -z text
17805 # though, which does catch some bad symbols but isn't as heavy-handed
17806 # as -z defs.
17807 no_undefined_flag='$wl-z,text'
17808 allow_undefined_flag='$wl-z,nodefs'
17809 archive_cmds_need_lc=no
17810 hardcode_shlibpath_var=no
17811 hardcode_libdir_flag_spec='$wl-R,$libdir'
17812 hardcode_libdir_separator=':'
17813 link_all_deplibs=yes
17814 export_dynamic_flag_spec='$wl-Bexport'
17815 runpath_var='LD_RUN_PATH'
17816
17817 if test yes = "$GCC"; then
17818 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17819 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17820 else
17821 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17822 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17823 fi
17824 ;;
17825
17826 uts4*)
17827 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17828 hardcode_libdir_flag_spec='-L$libdir'
17829 hardcode_shlibpath_var=no
17830 ;;
17831
17832 *)
17833 ld_shlibs=no
17834 ;;
17835 esac
17836
17837 if test sni = "$host_vendor"; then
17838 case $host in
17839 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
17840 export_dynamic_flag_spec='$wl-Blargedynsym'
17841 ;;
17842 esac
17843 fi
17844 fi
17845
17846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
17847$as_echo "$ld_shlibs" >&6; }
17848test no = "$ld_shlibs" && can_build_shared=no
17849
17850with_gnu_ld=$with_gnu_ld
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866#
17867# Do we need to explicitly link libc?
17868#
17869case "x$archive_cmds_need_lc" in
17870x|xyes)
17871 # Assume -lc should be added
17872 archive_cmds_need_lc=yes
17873
17874 if test yes,yes = "$GCC,$enable_shared"; then
17875 case $archive_cmds in
17876 *'~'*)
17877 # FIXME: we may have to deal with multi-command sequences.
17878 ;;
17879 '$CC '*)
17880 # Test whether the compiler implicitly links with -lc since on some
17881 # systems, -lgcc has to come before -lc. If gcc already passes -lc
17882 # to ld, don't add -lc before -lgcc.
17883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
17884$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
17885if ${lt_cv_archive_cmds_need_lc+:} false; then :
17886 $as_echo_n "(cached) " >&6
17887else
17888 $RM conftest*
17889 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17890
17891 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17892 (eval $ac_compile) 2>&5
17893 ac_status=$?
17894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17895 test $ac_status = 0; } 2>conftest.err; then
17896 soname=conftest
17897 lib=conftest
17898 libobjs=conftest.$ac_objext
17899 deplibs=
17900 wl=$lt_prog_compiler_wl
17901 pic_flag=$lt_prog_compiler_pic
17902 compiler_flags=-v
17903 linker_flags=-v
17904 verstring=
17905 output_objdir=.
17906 libname=conftest
17907 lt_save_allow_undefined_flag=$allow_undefined_flag
17908 allow_undefined_flag=
17909 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
17910 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
17911 ac_status=$?
17912 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17913 test $ac_status = 0; }
17914 then
17915 lt_cv_archive_cmds_need_lc=no
17916 else
17917 lt_cv_archive_cmds_need_lc=yes
17918 fi
17919 allow_undefined_flag=$lt_save_allow_undefined_flag
17920 else
17921 cat conftest.err 1>&5
17922 fi
17923 $RM conftest*
17924
17925fi
17926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
17927$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
17928 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
17929 ;;
17930 esac
17931 fi
17932 ;;
17933esac
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
18087$as_echo_n "checking dynamic linker characteristics... " >&6; }
18088
18089if test yes = "$GCC"; then
18090 case $host_os in
18091 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
18092 *) lt_awk_arg='/^libraries:/' ;;
18093 esac
18094 case $host_os in
18095 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
18096 *) lt_sed_strip_eq='s|=/|/|g' ;;
18097 esac
18098 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
18099 case $lt_search_path_spec in
18100 *\;*)
18101 # if the path contains ";" then we assume it to be the separator
18102 # otherwise default to the standard path separator (i.e. ":") - it is
18103 # assumed that no part of a normal pathname contains ";" but that should
18104 # okay in the real world where ";" in dirpaths is itself problematic.
18105 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
18106 ;;
18107 *)
18108 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
18109 ;;
18110 esac
18111 # Ok, now we have the path, separated by spaces, we can step through it
18112 # and add multilib dir if necessary...
18113 lt_tmp_lt_search_path_spec=
18114 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
18115 # ...but if some path component already ends with the multilib dir we assume
18116 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
18117 case "$lt_multi_os_dir; $lt_search_path_spec " in
18118 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
18119 lt_multi_os_dir=
18120 ;;
18121 esac
18122 for lt_sys_path in $lt_search_path_spec; do
18123 if test -d "$lt_sys_path$lt_multi_os_dir"; then
18124 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
18125 elif test -n "$lt_multi_os_dir"; then
18126 test -d "$lt_sys_path" && \
18127 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
18128 fi
18129 done
18130 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
18131BEGIN {RS = " "; FS = "/|\n";} {
18132 lt_foo = "";
18133 lt_count = 0;
18134 for (lt_i = NF; lt_i > 0; lt_i--) {
18135 if ($lt_i != "" && $lt_i != ".") {
18136 if ($lt_i == "..") {
18137 lt_count++;
18138 } else {
18139 if (lt_count == 0) {
18140 lt_foo = "/" $lt_i lt_foo;
18141 } else {
18142 lt_count--;
18143 }
18144 }
18145 }
18146 }
18147 if (lt_foo != "") { lt_freq[lt_foo]++; }
18148 if (lt_freq[lt_foo] == 1) { print lt_foo; }
18149}'`
18150 # AWK program above erroneously prepends '/' to C:/dos/paths
18151 # for these hosts.
18152 case $host_os in
18153 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
18154 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
18155 esac
18156 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
18157else
18158 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
18159fi
18160library_names_spec=
18161libname_spec='lib$name'
18162soname_spec=
18163shrext_cmds=.so
18164postinstall_cmds=
18165postuninstall_cmds=
18166finish_cmds=
18167finish_eval=
18168shlibpath_var=
18169shlibpath_overrides_runpath=unknown
18170version_type=none
18171dynamic_linker="$host_os ld.so"
18172sys_lib_dlsearch_path_spec="/lib /usr/lib"
18173need_lib_prefix=unknown
18174hardcode_into_libs=no
18175
18176# when you set need_version to no, make sure it does not cause -set_version
18177# flags to be left without arguments
18178need_version=unknown
18179
18180
18181
18182case $host_os in
18183aix3*)
18184 version_type=linux # correct to gnu/linux during the next big refactor
18185 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
18186 shlibpath_var=LIBPATH
18187
18188 # AIX 3 has no versioning support, so we append a major version to the name.
18189 soname_spec='$libname$release$shared_ext$major'
18190 ;;
18191
18192aix[4-9]*)
18193 version_type=linux # correct to gnu/linux during the next big refactor
18194 need_lib_prefix=no
18195 need_version=no
18196 hardcode_into_libs=yes
18197 if test ia64 = "$host_cpu"; then
18198 # AIX 5 supports IA64
18199 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
18200 shlibpath_var=LD_LIBRARY_PATH
18201 else
18202 # With GCC up to 2.95.x, collect2 would create an import file
18203 # for dependence libraries. The import file would start with
18204 # the line '#! .'. This would cause the generated library to
18205 # depend on '.', always an invalid library. This was fixed in
18206 # development snapshots of GCC prior to 3.0.
18207 case $host_os in
18208 aix4 | aix4.[01] | aix4.[01].*)
18209 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
18210 echo ' yes '
18211 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
18212 :
18213 else
18214 can_build_shared=no
18215 fi
18216 ;;
18217 esac
18218 # Using Import Files as archive members, it is possible to support
18219 # filename-based versioning of shared library archives on AIX. While
18220 # this would work for both with and without runtime linking, it will
18221 # prevent static linking of such archives. So we do filename-based
18222 # shared library versioning with .so extension only, which is used
18223 # when both runtime linking and shared linking is enabled.
18224 # Unfortunately, runtime linking may impact performance, so we do
18225 # not want this to be the default eventually. Also, we use the
18226 # versioned .so libs for executables only if there is the -brtl
18227 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
18228 # To allow for filename-based versioning support, we need to create
18229 # libNAME.so.V as an archive file, containing:
18230 # *) an Import File, referring to the versioned filename of the
18231 # archive as well as the shared archive member, telling the
18232 # bitwidth (32 or 64) of that shared object, and providing the
18233 # list of exported symbols of that shared object, eventually
18234 # decorated with the 'weak' keyword
18235 # *) the shared object with the F_LOADONLY flag set, to really avoid
18236 # it being seen by the linker.
18237 # At run time we better use the real file rather than another symlink,
18238 # but for link time we create the symlink libNAME.so -> libNAME.so.V
18239
18240 case $with_aix_soname,$aix_use_runtimelinking in
18241 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
18242 # soname into executable. Probably we can add versioning support to
18243 # collect2, so additional links can be useful in future.
18244 aix,yes) # traditional libtool
18245 dynamic_linker='AIX unversionable lib.so'
18246 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
18247 # instead of lib<name>.a to let people know that these are not
18248 # typical AIX shared libraries.
18249 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18250 ;;
18251 aix,no) # traditional AIX only
18252 dynamic_linker='AIX lib.a(lib.so.V)'
18253 # We preserve .a as extension for shared libraries through AIX4.2
18254 # and later when we are not doing run time linking.
18255 library_names_spec='$libname$release.a $libname.a'
18256 soname_spec='$libname$release$shared_ext$major'
18257 ;;
18258 svr4,*) # full svr4 only
18259 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
18260 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
18261 # We do not specify a path in Import Files, so LIBPATH fires.
18262 shlibpath_overrides_runpath=yes
18263 ;;
18264 *,yes) # both, prefer svr4
18265 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
18266 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
18267 # unpreferred sharedlib libNAME.a needs extra handling
18268 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
18269 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
18270 # We do not specify a path in Import Files, so LIBPATH fires.
18271 shlibpath_overrides_runpath=yes
18272 ;;
18273 *,no) # both, prefer aix
18274 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
18275 library_names_spec='$libname$release.a $libname.a'
18276 soname_spec='$libname$release$shared_ext$major'
18277 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
18278 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
18279 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
18280 ;;
18281 esac
18282 shlibpath_var=LIBPATH
18283 fi
18284 ;;
18285
18286amigaos*)
18287 case $host_cpu in
18288 powerpc)
18289 # Since July 2007 AmigaOS4 officially supports .so libraries.
18290 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
18291 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18292 ;;
18293 m68k)
18294 library_names_spec='$libname.ixlibrary $libname.a'
18295 # Create ${libname}_ixlibrary.a entries in /sys/libs.
18296 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
18297 ;;
18298 esac
18299 ;;
18300
18301beos*)
18302 library_names_spec='$libname$shared_ext'
18303 dynamic_linker="$host_os ld.so"
18304 shlibpath_var=LIBRARY_PATH
18305 ;;
18306
18307bsdi[45]*)
18308 version_type=linux # correct to gnu/linux during the next big refactor
18309 need_version=no
18310 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18311 soname_spec='$libname$release$shared_ext$major'
18312 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
18313 shlibpath_var=LD_LIBRARY_PATH
18314 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
18315 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
18316 # the default ld.so.conf also contains /usr/contrib/lib and
18317 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
18318 # libtool to hard-code these into programs
18319 ;;
18320
18321cygwin* | mingw* | pw32* | cegcc*)
18322 version_type=windows
18323 shrext_cmds=.dll
18324 need_version=no
18325 need_lib_prefix=no
18326
18327 case $GCC,$cc_basename in
18328 yes,*)
18329 # gcc
18330 library_names_spec='$libname.dll.a'
18331 # DLL is installed to $(libdir)/../bin by postinstall_cmds
18332 postinstall_cmds='base_file=`basename \$file`~
18333 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
18334 dldir=$destdir/`dirname \$dlpath`~
18335 test -d \$dldir || mkdir -p \$dldir~
18336 $install_prog $dir/$dlname \$dldir/$dlname~
18337 chmod a+x \$dldir/$dlname~
18338 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
18339 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
18340 fi'
18341 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18342 dlpath=$dir/\$dldll~
18343 $RM \$dlpath'
18344 shlibpath_overrides_runpath=yes
18345
18346 case $host_os in
18347 cygwin*)
18348 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
18349 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
18350
18351 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
18352 ;;
18353 mingw* | cegcc*)
18354 # MinGW DLLs use traditional 'lib' prefix
18355 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
18356 ;;
18357 pw32*)
18358 # pw32 DLLs use 'pw' prefix rather than 'lib'
18359 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
18360 ;;
18361 esac
18362 dynamic_linker='Win32 ld.exe'
18363 ;;
18364
18365 *,cl*)
18366 # Native MSVC
18367 libname_spec='$name'
18368 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
18369 library_names_spec='$libname.dll.lib'
18370
18371 case $build_os in
18372 mingw*)
18373 sys_lib_search_path_spec=
18374 lt_save_ifs=$IFS
18375 IFS=';'
18376 for lt_path in $LIB
18377 do
18378 IFS=$lt_save_ifs
18379 # Let DOS variable expansion print the short 8.3 style file name.
18380 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
18381 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
18382 done
18383 IFS=$lt_save_ifs
18384 # Convert to MSYS style.
18385 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
18386 ;;
18387 cygwin*)
18388 # Convert to unix form, then to dos form, then back to unix form
18389 # but this time dos style (no spaces!) so that the unix form looks
18390 # like /cygdrive/c/PROGRA~1:/cygdr...
18391 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
18392 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
18393 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18394 ;;
18395 *)
18396 sys_lib_search_path_spec=$LIB
18397 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
18398 # It is most probably a Windows format PATH.
18399 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
18400 else
18401 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18402 fi
18403 # FIXME: find the short name or the path components, as spaces are
18404 # common. (e.g. "Program Files" -> "PROGRA~1")
18405 ;;
18406 esac
18407
18408 # DLL is installed to $(libdir)/../bin by postinstall_cmds
18409 postinstall_cmds='base_file=`basename \$file`~
18410 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
18411 dldir=$destdir/`dirname \$dlpath`~
18412 test -d \$dldir || mkdir -p \$dldir~
18413 $install_prog $dir/$dlname \$dldir/$dlname'
18414 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18415 dlpath=$dir/\$dldll~
18416 $RM \$dlpath'
18417 shlibpath_overrides_runpath=yes
18418 dynamic_linker='Win32 link.exe'
18419 ;;
18420
18421 *)
18422 # Assume MSVC wrapper
18423 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
18424 dynamic_linker='Win32 ld.exe'
18425 ;;
18426 esac
18427 # FIXME: first we should search . and the directory the executable is in
18428 shlibpath_var=PATH
18429 ;;
18430
18431darwin* | rhapsody*)
18432 dynamic_linker="$host_os dyld"
18433 version_type=darwin
18434 need_lib_prefix=no
18435 need_version=no
18436 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
18437 soname_spec='$libname$release$major$shared_ext'
18438 shlibpath_overrides_runpath=yes
18439 shlibpath_var=DYLD_LIBRARY_PATH
18440 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
18441
18442 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
18443 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
18444 ;;
18445
18446dgux*)
18447 version_type=linux # correct to gnu/linux during the next big refactor
18448 need_lib_prefix=no
18449 need_version=no
18450 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18451 soname_spec='$libname$release$shared_ext$major'
18452 shlibpath_var=LD_LIBRARY_PATH
18453 ;;
18454
18455freebsd* | dragonfly*)
18456 # DragonFly does not have aout. When/if they implement a new
18457 # versioning mechanism, adjust this.
18458 if test -x /usr/bin/objformat; then
18459 objformat=`/usr/bin/objformat`
18460 else
18461 case $host_os in
18462 freebsd[23].*) objformat=aout ;;
18463 *) objformat=elf ;;
18464 esac
18465 fi
18466 version_type=freebsd-$objformat
18467 case $version_type in
18468 freebsd-elf*)
18469 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18470 soname_spec='$libname$release$shared_ext$major'
18471 need_version=no
18472 need_lib_prefix=no
18473 ;;
18474 freebsd-*)
18475 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
18476 need_version=yes
18477 ;;
18478 esac
18479 shlibpath_var=LD_LIBRARY_PATH
18480 case $host_os in
18481 freebsd2.*)
18482 shlibpath_overrides_runpath=yes
18483 ;;
18484 freebsd3.[01]* | freebsdelf3.[01]*)
18485 shlibpath_overrides_runpath=yes
18486 hardcode_into_libs=yes
18487 ;;
18488 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
18489 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
18490 shlibpath_overrides_runpath=no
18491 hardcode_into_libs=yes
18492 ;;
18493 *) # from 4.6 on, and DragonFly
18494 shlibpath_overrides_runpath=yes
18495 hardcode_into_libs=yes
18496 ;;
18497 esac
18498 ;;
18499
18500haiku*)
18501 version_type=linux # correct to gnu/linux during the next big refactor
18502 need_lib_prefix=no
18503 need_version=no
18504 dynamic_linker="$host_os runtime_loader"
18505 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18506 soname_spec='$libname$release$shared_ext$major'
18507 shlibpath_var=LIBRARY_PATH
18508 shlibpath_overrides_runpath=no
18509 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
18510 hardcode_into_libs=yes
18511 ;;
18512
18513hpux9* | hpux10* | hpux11*)
18514 # Give a soname corresponding to the major version so that dld.sl refuses to
18515 # link against other versions.
18516 version_type=sunos
18517 need_lib_prefix=no
18518 need_version=no
18519 case $host_cpu in
18520 ia64*)
18521 shrext_cmds='.so'
18522 hardcode_into_libs=yes
18523 dynamic_linker="$host_os dld.so"
18524 shlibpath_var=LD_LIBRARY_PATH
18525 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18526 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18527 soname_spec='$libname$release$shared_ext$major'
18528 if test 32 = "$HPUX_IA64_MODE"; then
18529 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
18530 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
18531 else
18532 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
18533 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
18534 fi
18535 ;;
18536 hppa*64*)
18537 shrext_cmds='.sl'
18538 hardcode_into_libs=yes
18539 dynamic_linker="$host_os dld.sl"
18540 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
18541 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18542 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18543 soname_spec='$libname$release$shared_ext$major'
18544 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
18545 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18546 ;;
18547 *)
18548 shrext_cmds='.sl'
18549 dynamic_linker="$host_os dld.sl"
18550 shlibpath_var=SHLIB_PATH
18551 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
18552 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18553 soname_spec='$libname$release$shared_ext$major'
18554 ;;
18555 esac
18556 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
18557 postinstall_cmds='chmod 555 $lib'
18558 # or fails outright, so override atomically:
18559 install_override_mode=555
18560 ;;
18561
18562interix[3-9]*)
18563 version_type=linux # correct to gnu/linux during the next big refactor
18564 need_lib_prefix=no
18565 need_version=no
18566 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18567 soname_spec='$libname$release$shared_ext$major'
18568 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
18569 shlibpath_var=LD_LIBRARY_PATH
18570 shlibpath_overrides_runpath=no
18571 hardcode_into_libs=yes
18572 ;;
18573
18574irix5* | irix6* | nonstopux*)
18575 case $host_os in
18576 nonstopux*) version_type=nonstopux ;;
18577 *)
18578 if test yes = "$lt_cv_prog_gnu_ld"; then
18579 version_type=linux # correct to gnu/linux during the next big refactor
18580 else
18581 version_type=irix
18582 fi ;;
18583 esac
18584 need_lib_prefix=no
18585 need_version=no
18586 soname_spec='$libname$release$shared_ext$major'
18587 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
18588 case $host_os in
18589 irix5* | nonstopux*)
18590 libsuff= shlibsuff=
18591 ;;
18592 *)
18593 case $LD in # libtool.m4 will add one of these switches to LD
18594 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
18595 libsuff= shlibsuff= libmagic=32-bit;;
18596 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
18597 libsuff=32 shlibsuff=N32 libmagic=N32;;
18598 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
18599 libsuff=64 shlibsuff=64 libmagic=64-bit;;
18600 *) libsuff= shlibsuff= libmagic=never-match;;
18601 esac
18602 ;;
18603 esac
18604 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
18605 shlibpath_overrides_runpath=no
18606 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
18607 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
18608 hardcode_into_libs=yes
18609 ;;
18610
18611# No shared lib support for Linux oldld, aout, or coff.
18612linux*oldld* | linux*aout* | linux*coff*)
18613 dynamic_linker=no
18614 ;;
18615
18616linux*android*)
18617 version_type=none # Android doesn't support versioned libraries.
18618 need_lib_prefix=no
18619 need_version=no
18620 library_names_spec='$libname$release$shared_ext'
18621 soname_spec='$libname$release$shared_ext'
18622 finish_cmds=
18623 shlibpath_var=LD_LIBRARY_PATH
18624 shlibpath_overrides_runpath=yes
18625
18626 # This implies no fast_install, which is unacceptable.
18627 # Some rework will be needed to allow for fast_install
18628 # before this can be enabled.
18629 hardcode_into_libs=yes
18630
18631 dynamic_linker='Android linker'
18632 # Don't embed -rpath directories since the linker doesn't support them.
18633 hardcode_libdir_flag_spec='-L$libdir'
18634 ;;
18635
18636# This must be glibc/ELF.
18637linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
18638 version_type=linux # correct to gnu/linux during the next big refactor
18639 need_lib_prefix=no
18640 need_version=no
18641 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18642 soname_spec='$libname$release$shared_ext$major'
18643 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
18644 shlibpath_var=LD_LIBRARY_PATH
18645 shlibpath_overrides_runpath=no
18646
18647 # Some binutils ld are patched to set DT_RUNPATH
18648 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
18649 $as_echo_n "(cached) " >&6
18650else
18651 lt_cv_shlibpath_overrides_runpath=no
18652 save_LDFLAGS=$LDFLAGS
18653 save_libdir=$libdir
18654 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
18655 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
18656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18657/* end confdefs.h. */
18658
18659int
18660main ()
18661{
18662
18663 ;
18664 return 0;
18665}
18666_ACEOF
18667if ac_fn_c_try_link "$LINENO"; then :
18668 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
18669 lt_cv_shlibpath_overrides_runpath=yes
18670fi
18671fi
18672rm -f core conftest.err conftest.$ac_objext \
18673 conftest$ac_exeext conftest.$ac_ext
18674 LDFLAGS=$save_LDFLAGS
18675 libdir=$save_libdir
18676
18677fi
18678
18679 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
18680
18681 # This implies no fast_install, which is unacceptable.
18682 # Some rework will be needed to allow for fast_install
18683 # before this can be enabled.
18684 hardcode_into_libs=yes
18685
18686 # Ideally, we could use ldconfig to report *all* directores which are
18687 # searched for libraries, however this is still not possible. Aside from not
18688 # being certain /sbin/ldconfig is available, command
18689 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
18690 # even though it is searched at run-time. Try to do the best guess by
18691 # appending ld.so.conf contents (and includes) to the search path.
18692 if test -f /etc/ld.so.conf; then
18693 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
18694 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
18695 fi
18696
18697 # We used to test for /lib/ld.so.1 and disable shared libraries on
18698 # powerpc, because MkLinux only supported shared libraries with the
18699 # GNU dynamic linker. Since this was broken with cross compilers,
18700 # most powerpc-linux boxes support dynamic linking these days and
18701 # people can always --disable-shared, the test was removed, and we
18702 # assume the GNU/Linux dynamic linker is in use.
18703 dynamic_linker='GNU/Linux ld.so'
18704 ;;
18705
18706netbsd*)
18707 version_type=sunos
18708 need_lib_prefix=no
18709 need_version=no
18710 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18711 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
18712 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18713 dynamic_linker='NetBSD (a.out) ld.so'
18714 else
18715 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18716 soname_spec='$libname$release$shared_ext$major'
18717 dynamic_linker='NetBSD ld.elf_so'
18718 fi
18719 shlibpath_var=LD_LIBRARY_PATH
18720 shlibpath_overrides_runpath=yes
18721 hardcode_into_libs=yes
18722 ;;
18723
18724newsos6)
18725 version_type=linux # correct to gnu/linux during the next big refactor
18726 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18727 shlibpath_var=LD_LIBRARY_PATH
18728 shlibpath_overrides_runpath=yes
18729 ;;
18730
18731*nto* | *qnx*)
18732 version_type=qnx
18733 need_lib_prefix=no
18734 need_version=no
18735 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18736 soname_spec='$libname$release$shared_ext$major'
18737 shlibpath_var=LD_LIBRARY_PATH
18738 shlibpath_overrides_runpath=no
18739 hardcode_into_libs=yes
18740 dynamic_linker='ldqnx.so'
18741 ;;
18742
18743openbsd* | bitrig*)
18744 version_type=sunos
18745 sys_lib_dlsearch_path_spec=/usr/lib
18746 need_lib_prefix=no
18747 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
18748 need_version=no
18749 else
18750 need_version=yes
18751 fi
18752 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
18753 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18754 shlibpath_var=LD_LIBRARY_PATH
18755 shlibpath_overrides_runpath=yes
18756 ;;
18757
18758os2*)
18759 libname_spec='$name'
18760 version_type=windows
18761 shrext_cmds=.dll
18762 need_version=no
18763 need_lib_prefix=no
18764 # OS/2 can only load a DLL with a base name of 8 characters or less.
18765 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
18766 v=$($ECHO $release$versuffix | tr -d .-);
18767 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
18768 $ECHO $n$v`$shared_ext'
18769 library_names_spec='${libname}_dll.$libext'
18770 dynamic_linker='OS/2 ld.exe'
18771 shlibpath_var=BEGINLIBPATH
18772 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
18773 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18774 postinstall_cmds='base_file=`basename \$file`~
18775 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
18776 dldir=$destdir/`dirname \$dlpath`~
18777 test -d \$dldir || mkdir -p \$dldir~
18778 $install_prog $dir/$dlname \$dldir/$dlname~
18779 chmod a+x \$dldir/$dlname~
18780 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
18781 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
18782 fi'
18783 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
18784 dlpath=$dir/\$dldll~
18785 $RM \$dlpath'
18786 ;;
18787
18788osf3* | osf4* | osf5*)
18789 version_type=osf
18790 need_lib_prefix=no
18791 need_version=no
18792 soname_spec='$libname$release$shared_ext$major'
18793 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18794 shlibpath_var=LD_LIBRARY_PATH
18795 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18796 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18797 ;;
18798
18799rdos*)
18800 dynamic_linker=no
18801 ;;
18802
18803solaris*)
18804 version_type=linux # correct to gnu/linux during the next big refactor
18805 need_lib_prefix=no
18806 need_version=no
18807 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18808 soname_spec='$libname$release$shared_ext$major'
18809 shlibpath_var=LD_LIBRARY_PATH
18810 shlibpath_overrides_runpath=yes
18811 hardcode_into_libs=yes
18812 # ldd complains unless libraries are executable
18813 postinstall_cmds='chmod +x $lib'
18814 ;;
18815
18816sunos4*)
18817 version_type=sunos
18818 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
18819 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
18820 shlibpath_var=LD_LIBRARY_PATH
18821 shlibpath_overrides_runpath=yes
18822 if test yes = "$with_gnu_ld"; then
18823 need_lib_prefix=no
18824 fi
18825 need_version=yes
18826 ;;
18827
18828sysv4 | sysv4.3*)
18829 version_type=linux # correct to gnu/linux during the next big refactor
18830 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18831 soname_spec='$libname$release$shared_ext$major'
18832 shlibpath_var=LD_LIBRARY_PATH
18833 case $host_vendor in
18834 sni)
18835 shlibpath_overrides_runpath=no
18836 need_lib_prefix=no
18837 runpath_var=LD_RUN_PATH
18838 ;;
18839 siemens)
18840 need_lib_prefix=no
18841 ;;
18842 motorola)
18843 need_lib_prefix=no
18844 need_version=no
18845 shlibpath_overrides_runpath=no
18846 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18847 ;;
18848 esac
18849 ;;
18850
18851sysv4*MP*)
18852 if test -d /usr/nec; then
18853 version_type=linux # correct to gnu/linux during the next big refactor
18854 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
18855 soname_spec='$libname$shared_ext.$major'
18856 shlibpath_var=LD_LIBRARY_PATH
18857 fi
18858 ;;
18859
18860sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18861 version_type=sco
18862 need_lib_prefix=no
18863 need_version=no
18864 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
18865 soname_spec='$libname$release$shared_ext$major'
18866 shlibpath_var=LD_LIBRARY_PATH
18867 shlibpath_overrides_runpath=yes
18868 hardcode_into_libs=yes
18869 if test yes = "$with_gnu_ld"; then
18870 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
18871 else
18872 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
18873 case $host_os in
18874 sco3.2v5*)
18875 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18876 ;;
18877 esac
18878 fi
18879 sys_lib_dlsearch_path_spec='/usr/lib'
18880 ;;
18881
18882tpf*)
18883 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
18884 version_type=linux # correct to gnu/linux during the next big refactor
18885 need_lib_prefix=no
18886 need_version=no
18887 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18888 shlibpath_var=LD_LIBRARY_PATH
18889 shlibpath_overrides_runpath=no
18890 hardcode_into_libs=yes
18891 ;;
18892
18893uts4*)
18894 version_type=linux # correct to gnu/linux during the next big refactor
18895 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18896 soname_spec='$libname$release$shared_ext$major'
18897 shlibpath_var=LD_LIBRARY_PATH
18898 ;;
18899
18900*)
18901 dynamic_linker=no
18902 ;;
18903esac
18904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
18905$as_echo "$dynamic_linker" >&6; }
18906test no = "$dynamic_linker" && can_build_shared=no
18907
18908variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
18909if test yes = "$GCC"; then
18910 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
18911fi
18912
18913if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
18914 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
18915fi
18916
18917if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
18918 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
18919fi
18920
18921# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
18922configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
18923
18924# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
18925func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
18926
18927# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
18928configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
19027$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
19028hardcode_action=
19029if test -n "$hardcode_libdir_flag_spec" ||
19030 test -n "$runpath_var" ||
19031 test yes = "$hardcode_automatic"; then
19032
19033 # We can hardcode non-existent directories.
19034 if test no != "$hardcode_direct" &&
19035 # If the only mechanism to avoid hardcoding is shlibpath_var, we
19036 # have to relink, otherwise we might link with an installed library
19037 # when we should be linking with a yet-to-be-installed one
19038 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
19039 test no != "$hardcode_minus_L"; then
19040 # Linking always hardcodes the temporary library directory.
19041 hardcode_action=relink
19042 else
19043 # We can link without hardcoding, and we can hardcode nonexisting dirs.
19044 hardcode_action=immediate
19045 fi
19046else
19047 # We cannot hardcode anything, or else we can only hardcode existing
19048 # directories.
19049 hardcode_action=unsupported
19050fi
19051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
19052$as_echo "$hardcode_action" >&6; }
19053
19054if test relink = "$hardcode_action" ||
19055 test yes = "$inherit_rpath"; then
19056 # Fast installation is not supported
19057 enable_fast_install=no
19058elif test yes = "$shlibpath_overrides_runpath" ||
19059 test no = "$enable_shared"; then
19060 # Fast installation is not necessary
19061 enable_fast_install=needless
19062fi
19063
19064
19065
19066
19067
19068
19069 if test yes != "$enable_dlopen"; then
19070 enable_dlopen=unknown
19071 enable_dlopen_self=unknown
19072 enable_dlopen_self_static=unknown
19073else
19074 lt_cv_dlopen=no
19075 lt_cv_dlopen_libs=
19076
19077 case $host_os in
19078 beos*)
19079 lt_cv_dlopen=load_add_on
19080 lt_cv_dlopen_libs=
19081 lt_cv_dlopen_self=yes
19082 ;;
19083
19084 mingw* | pw32* | cegcc*)
19085 lt_cv_dlopen=LoadLibrary
19086 lt_cv_dlopen_libs=
19087 ;;
19088
19089 cygwin*)
19090 lt_cv_dlopen=dlopen
19091 lt_cv_dlopen_libs=
19092 ;;
19093
19094 darwin*)
19095 # if libdl is installed we need to link against it
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
19097$as_echo_n "checking for dlopen in -ldl... " >&6; }
19098if ${ac_cv_lib_dl_dlopen+:} false; then :
19099 $as_echo_n "(cached) " >&6
19100else
19101 ac_check_lib_save_LIBS=$LIBS
19102LIBS="-ldl $LIBS"
19103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19104/* end confdefs.h. */
19105
19106/* Override any GCC internal prototype to avoid an error.
19107 Use char because int might match the return type of a GCC
19108 builtin and then its argument prototype would still apply. */
19109#ifdef __cplusplus
19110extern "C"
19111#endif
19112char dlopen ();
19113int
19114main ()
19115{
19116return dlopen ();
19117 ;
19118 return 0;
19119}
19120_ACEOF
19121if ac_fn_c_try_link "$LINENO"; then :
19122 ac_cv_lib_dl_dlopen=yes
19123else
19124 ac_cv_lib_dl_dlopen=no
19125fi
19126rm -f core conftest.err conftest.$ac_objext \
19127 conftest$ac_exeext conftest.$ac_ext
19128LIBS=$ac_check_lib_save_LIBS
19129fi
19130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
19131$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
19132if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
19133 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
19134else
19135
19136 lt_cv_dlopen=dyld
19137 lt_cv_dlopen_libs=
19138 lt_cv_dlopen_self=yes
19139
19140fi
19141
19142 ;;
19143
19144 tpf*)
19145 # Don't try to run any link tests for TPF. We know it's impossible
19146 # because TPF is a cross-compiler, and we know how we open DSOs.
19147 lt_cv_dlopen=dlopen
19148 lt_cv_dlopen_libs=
19149 lt_cv_dlopen_self=no
19150 ;;
19151
19152 *)
19153 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
19154if test "x$ac_cv_func_shl_load" = xyes; then :
19155 lt_cv_dlopen=shl_load
19156else
19157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
19158$as_echo_n "checking for shl_load in -ldld... " >&6; }
19159if ${ac_cv_lib_dld_shl_load+:} false; then :
19160 $as_echo_n "(cached) " >&6
19161else
19162 ac_check_lib_save_LIBS=$LIBS
19163LIBS="-ldld $LIBS"
19164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19165/* end confdefs.h. */
19166
19167/* Override any GCC internal prototype to avoid an error.
19168 Use char because int might match the return type of a GCC
19169 builtin and then its argument prototype would still apply. */
19170#ifdef __cplusplus
19171extern "C"
19172#endif
19173char shl_load ();
19174int
19175main ()
19176{
19177return shl_load ();
19178 ;
19179 return 0;
19180}
19181_ACEOF
19182if ac_fn_c_try_link "$LINENO"; then :
19183 ac_cv_lib_dld_shl_load=yes
19184else
19185 ac_cv_lib_dld_shl_load=no
19186fi
19187rm -f core conftest.err conftest.$ac_objext \
19188 conftest$ac_exeext conftest.$ac_ext
19189LIBS=$ac_check_lib_save_LIBS
19190fi
19191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
19192$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
19193if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
19194 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
19195else
19196 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
19197if test "x$ac_cv_func_dlopen" = xyes; then :
19198 lt_cv_dlopen=dlopen
19199else
19200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
19201$as_echo_n "checking for dlopen in -ldl... " >&6; }
19202if ${ac_cv_lib_dl_dlopen+:} false; then :
19203 $as_echo_n "(cached) " >&6
19204else
19205 ac_check_lib_save_LIBS=$LIBS
19206LIBS="-ldl $LIBS"
19207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19208/* end confdefs.h. */
19209
19210/* Override any GCC internal prototype to avoid an error.
19211 Use char because int might match the return type of a GCC
19212 builtin and then its argument prototype would still apply. */
19213#ifdef __cplusplus
19214extern "C"
19215#endif
19216char dlopen ();
19217int
19218main ()
19219{
19220return dlopen ();
19221 ;
19222 return 0;
19223}
19224_ACEOF
19225if ac_fn_c_try_link "$LINENO"; then :
19226 ac_cv_lib_dl_dlopen=yes
19227else
19228 ac_cv_lib_dl_dlopen=no
19229fi
19230rm -f core conftest.err conftest.$ac_objext \
19231 conftest$ac_exeext conftest.$ac_ext
19232LIBS=$ac_check_lib_save_LIBS
19233fi
19234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
19235$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
19236if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
19237 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
19238else
19239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
19240$as_echo_n "checking for dlopen in -lsvld... " >&6; }
19241if ${ac_cv_lib_svld_dlopen+:} false; then :
19242 $as_echo_n "(cached) " >&6
19243else
19244 ac_check_lib_save_LIBS=$LIBS
19245LIBS="-lsvld $LIBS"
19246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19247/* end confdefs.h. */
19248
19249/* Override any GCC internal prototype to avoid an error.
19250 Use char because int might match the return type of a GCC
19251 builtin and then its argument prototype would still apply. */
19252#ifdef __cplusplus
19253extern "C"
19254#endif
19255char dlopen ();
19256int
19257main ()
19258{
19259return dlopen ();
19260 ;
19261 return 0;
19262}
19263_ACEOF
19264if ac_fn_c_try_link "$LINENO"; then :
19265 ac_cv_lib_svld_dlopen=yes
19266else
19267 ac_cv_lib_svld_dlopen=no
19268fi
19269rm -f core conftest.err conftest.$ac_objext \
19270 conftest$ac_exeext conftest.$ac_ext
19271LIBS=$ac_check_lib_save_LIBS
19272fi
19273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
19274$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
19275if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
19276 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
19277else
19278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
19279$as_echo_n "checking for dld_link in -ldld... " >&6; }
19280if ${ac_cv_lib_dld_dld_link+:} false; then :
19281 $as_echo_n "(cached) " >&6
19282else
19283 ac_check_lib_save_LIBS=$LIBS
19284LIBS="-ldld $LIBS"
19285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19286/* end confdefs.h. */
19287
19288/* Override any GCC internal prototype to avoid an error.
19289 Use char because int might match the return type of a GCC
19290 builtin and then its argument prototype would still apply. */
19291#ifdef __cplusplus
19292extern "C"
19293#endif
19294char dld_link ();
19295int
19296main ()
19297{
19298return dld_link ();
19299 ;
19300 return 0;
19301}
19302_ACEOF
19303if ac_fn_c_try_link "$LINENO"; then :
19304 ac_cv_lib_dld_dld_link=yes
19305else
19306 ac_cv_lib_dld_dld_link=no
19307fi
19308rm -f core conftest.err conftest.$ac_objext \
19309 conftest$ac_exeext conftest.$ac_ext
19310LIBS=$ac_check_lib_save_LIBS
19311fi
19312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
19313$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
19314if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
19315 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
19316fi
19317
19318
19319fi
19320
19321
19322fi
19323
19324
19325fi
19326
19327
19328fi
19329
19330
19331fi
19332
19333 ;;
19334 esac
19335
19336 if test no = "$lt_cv_dlopen"; then
19337 enable_dlopen=no
19338 else
19339 enable_dlopen=yes
19340 fi
19341
19342 case $lt_cv_dlopen in
19343 dlopen)
19344 save_CPPFLAGS=$CPPFLAGS
19345 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
19346
19347 save_LDFLAGS=$LDFLAGS
19348 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19349
19350 save_LIBS=$LIBS
19351 LIBS="$lt_cv_dlopen_libs $LIBS"
19352
19353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
19354$as_echo_n "checking whether a program can dlopen itself... " >&6; }
19355if ${lt_cv_dlopen_self+:} false; then :
19356 $as_echo_n "(cached) " >&6
19357else
19358 if test yes = "$cross_compiling"; then :
19359 lt_cv_dlopen_self=cross
19360else
19361 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19362 lt_status=$lt_dlunknown
19363 cat > conftest.$ac_ext <<_LT_EOF
19364#line $LINENO "configure"
19365#include "confdefs.h"
19366
19367#if HAVE_DLFCN_H
19368#include <dlfcn.h>
19369#endif
19370
19371#include <stdio.h>
19372
19373#ifdef RTLD_GLOBAL
19374# define LT_DLGLOBAL RTLD_GLOBAL
19375#else
19376# ifdef DL_GLOBAL
19377# define LT_DLGLOBAL DL_GLOBAL
19378# else
19379# define LT_DLGLOBAL 0
19380# endif
19381#endif
19382
19383/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19384 find out it does not work in some platform. */
19385#ifndef LT_DLLAZY_OR_NOW
19386# ifdef RTLD_LAZY
19387# define LT_DLLAZY_OR_NOW RTLD_LAZY
19388# else
19389# ifdef DL_LAZY
19390# define LT_DLLAZY_OR_NOW DL_LAZY
19391# else
19392# ifdef RTLD_NOW
19393# define LT_DLLAZY_OR_NOW RTLD_NOW
19394# else
19395# ifdef DL_NOW
19396# define LT_DLLAZY_OR_NOW DL_NOW
19397# else
19398# define LT_DLLAZY_OR_NOW 0
19399# endif
19400# endif
19401# endif
19402# endif
19403#endif
19404
19405/* When -fvisibility=hidden is used, assume the code has been annotated
19406 correspondingly for the symbols needed. */
19407#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
19408int fnord () __attribute__((visibility("default")));
19409#endif
19410
19411int fnord () { return 42; }
19412int main ()
19413{
19414 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19415 int status = $lt_dlunknown;
19416
19417 if (self)
19418 {
19419 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19420 else
19421 {
19422 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19423 else puts (dlerror ());
19424 }
19425 /* dlclose (self); */
19426 }
19427 else
19428 puts (dlerror ());
19429
19430 return status;
19431}
19432_LT_EOF
19433 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19434 (eval $ac_link) 2>&5
19435 ac_status=$?
19436 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19437 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
19438 (./conftest; exit; ) >&5 2>/dev/null
19439 lt_status=$?
19440 case x$lt_status in
19441 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
19442 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
19443 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
19444 esac
19445 else :
19446 # compilation failed
19447 lt_cv_dlopen_self=no
19448 fi
19449fi
19450rm -fr conftest*
19451
19452
19453fi
19454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
19455$as_echo "$lt_cv_dlopen_self" >&6; }
19456
19457 if test yes = "$lt_cv_dlopen_self"; then
19458 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
19459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
19460$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
19461if ${lt_cv_dlopen_self_static+:} false; then :
19462 $as_echo_n "(cached) " >&6
19463else
19464 if test yes = "$cross_compiling"; then :
19465 lt_cv_dlopen_self_static=cross
19466else
19467 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
19468 lt_status=$lt_dlunknown
19469 cat > conftest.$ac_ext <<_LT_EOF
19470#line $LINENO "configure"
19471#include "confdefs.h"
19472
19473#if HAVE_DLFCN_H
19474#include <dlfcn.h>
19475#endif
19476
19477#include <stdio.h>
19478
19479#ifdef RTLD_GLOBAL
19480# define LT_DLGLOBAL RTLD_GLOBAL
19481#else
19482# ifdef DL_GLOBAL
19483# define LT_DLGLOBAL DL_GLOBAL
19484# else
19485# define LT_DLGLOBAL 0
19486# endif
19487#endif
19488
19489/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
19490 find out it does not work in some platform. */
19491#ifndef LT_DLLAZY_OR_NOW
19492# ifdef RTLD_LAZY
19493# define LT_DLLAZY_OR_NOW RTLD_LAZY
19494# else
19495# ifdef DL_LAZY
19496# define LT_DLLAZY_OR_NOW DL_LAZY
19497# else
19498# ifdef RTLD_NOW
19499# define LT_DLLAZY_OR_NOW RTLD_NOW
19500# else
19501# ifdef DL_NOW
19502# define LT_DLLAZY_OR_NOW DL_NOW
19503# else
19504# define LT_DLLAZY_OR_NOW 0
19505# endif
19506# endif
19507# endif
19508# endif
19509#endif
19510
19511/* When -fvisibility=hidden is used, assume the code has been annotated
19512 correspondingly for the symbols needed. */
19513#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
19514int fnord () __attribute__((visibility("default")));
19515#endif
19516
19517int fnord () { return 42; }
19518int main ()
19519{
19520 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
19521 int status = $lt_dlunknown;
19522
19523 if (self)
19524 {
19525 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
19526 else
19527 {
19528 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
19529 else puts (dlerror ());
19530 }
19531 /* dlclose (self); */
19532 }
19533 else
19534 puts (dlerror ());
19535
19536 return status;
19537}
19538_LT_EOF
19539 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19540 (eval $ac_link) 2>&5
19541 ac_status=$?
19542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19543 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
19544 (./conftest; exit; ) >&5 2>/dev/null
19545 lt_status=$?
19546 case x$lt_status in
19547 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
19548 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
19549 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
19550 esac
19551 else :
19552 # compilation failed
19553 lt_cv_dlopen_self_static=no
19554 fi
19555fi
19556rm -fr conftest*
19557
19558
19559fi
19560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
19561$as_echo "$lt_cv_dlopen_self_static" >&6; }
19562 fi
19563
19564 CPPFLAGS=$save_CPPFLAGS
19565 LDFLAGS=$save_LDFLAGS
19566 LIBS=$save_LIBS
19567 ;;
19568 esac
19569
19570 case $lt_cv_dlopen_self in
19571 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
19572 *) enable_dlopen_self=unknown ;;
19573 esac
19574
19575 case $lt_cv_dlopen_self_static in
19576 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
19577 *) enable_dlopen_self_static=unknown ;;
19578 esac
19579fi
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597striplib=
19598old_striplib=
19599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
19600$as_echo_n "checking whether stripping libraries is possible... " >&6; }
19601if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
19602 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
19603 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
19604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19605$as_echo "yes" >&6; }
19606else
19607# FIXME - insert some real tests, host_os isn't really good enough
19608 case $host_os in
19609 darwin*)
19610 if test -n "$STRIP"; then
19611 striplib="$STRIP -x"
19612 old_striplib="$STRIP -S"
19613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19614$as_echo "yes" >&6; }
19615 else
19616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19617$as_echo "no" >&6; }
19618 fi
19619 ;;
19620 *)
19621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19622$as_echo "no" >&6; }
19623 ;;
19624 esac
19625fi
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638 # Report what library types will actually be built
19639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
19640$as_echo_n "checking if libtool supports shared libraries... " >&6; }
19641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
19642$as_echo "$can_build_shared" >&6; }
19643
19644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
19645$as_echo_n "checking whether to build shared libraries... " >&6; }
19646 test no = "$can_build_shared" && enable_shared=no
19647
19648 # On AIX, shared libraries and static libraries use the same namespace, and
19649 # are all built from PIC.
19650 case $host_os in
19651 aix3*)
19652 test yes = "$enable_shared" && enable_static=no
19653 if test -n "$RANLIB"; then
19654 archive_cmds="$archive_cmds~\$RANLIB \$lib"
19655 postinstall_cmds='$RANLIB $lib'
19656 fi
19657 ;;
19658
19659 aix[4-9]*)
19660 if test ia64 != "$host_cpu"; then
19661 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
19662 yes,aix,yes) ;; # shared object as lib.so file only
19663 yes,svr4,*) ;; # shared object as lib.so archive member only
19664 yes,*) enable_static=no ;; # shared object in lib.a archive as well
19665 esac
19666 fi
19667 ;;
19668 esac
19669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
19670$as_echo "$enable_shared" >&6; }
19671
19672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
19673$as_echo_n "checking whether to build static libraries... " >&6; }
19674 # Make sure either enable_shared or enable_static is yes.
19675 test yes = "$enable_shared" || enable_static=yes
19676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
19677$as_echo "$enable_static" >&6; }
19678
19679
19680
19681
19682fi
19683ac_ext=c
19684ac_cpp='$CPP $CPPFLAGS'
19685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19687ac_compiler_gnu=$ac_cv_c_compiler_gnu
19688
19689CC=$lt_save_CC
19690
19691 if test -n "$CXX" && ( test no != "$CXX" &&
19692 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
19693 (test g++ != "$CXX"))); then
19694 ac_ext=cpp
19695ac_cpp='$CXXCPP $CPPFLAGS'
19696ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19697ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19698ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
19700$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
19701if test -z "$CXXCPP"; then
19702 if ${ac_cv_prog_CXXCPP+:} false; then :
19703 $as_echo_n "(cached) " >&6
19704else
19705 # Double quotes because CXXCPP needs to be expanded
19706 for CXXCPP in "$CXX -E" "/lib/cpp"
19707 do
19708 ac_preproc_ok=false
19709for ac_cxx_preproc_warn_flag in '' yes
19710do
19711 # Use a header file that comes with gcc, so configuring glibc
19712 # with a fresh cross-compiler works.
19713 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19714 # <limits.h> exists even on freestanding compilers.
19715 # On the NeXT, cc -E runs the code through the compiler's parser,
19716 # not just through cpp. "Syntax error" is here to catch this case.
19717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19718/* end confdefs.h. */
19719#ifdef __STDC__
19720# include <limits.h>
19721#else
19722# include <assert.h>
19723#endif
19724 Syntax error
19725_ACEOF
19726if ac_fn_cxx_try_cpp "$LINENO"; then :
19727
19728else
19729 # Broken: fails on valid input.
19730continue
19731fi
19732rm -f conftest.err conftest.i conftest.$ac_ext
19733
19734 # OK, works on sane cases. Now check whether nonexistent headers
19735 # can be detected and how.
19736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19737/* end confdefs.h. */
19738#include <ac_nonexistent.h>
19739_ACEOF
19740if ac_fn_cxx_try_cpp "$LINENO"; then :
19741 # Broken: success on invalid input.
19742continue
19743else
19744 # Passes both tests.
19745ac_preproc_ok=:
19746break
19747fi
19748rm -f conftest.err conftest.i conftest.$ac_ext
19749
19750done
19751# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19752rm -f conftest.i conftest.err conftest.$ac_ext
19753if $ac_preproc_ok; then :
19754 break
19755fi
19756
19757 done
19758 ac_cv_prog_CXXCPP=$CXXCPP
19759
19760fi
19761 CXXCPP=$ac_cv_prog_CXXCPP
19762else
19763 ac_cv_prog_CXXCPP=$CXXCPP
19764fi
19765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
19766$as_echo "$CXXCPP" >&6; }
19767ac_preproc_ok=false
19768for ac_cxx_preproc_warn_flag in '' yes
19769do
19770 # Use a header file that comes with gcc, so configuring glibc
19771 # with a fresh cross-compiler works.
19772 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19773 # <limits.h> exists even on freestanding compilers.
19774 # On the NeXT, cc -E runs the code through the compiler's parser,
19775 # not just through cpp. "Syntax error" is here to catch this case.
19776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19777/* end confdefs.h. */
19778#ifdef __STDC__
19779# include <limits.h>
19780#else
19781# include <assert.h>
19782#endif
19783 Syntax error
19784_ACEOF
19785if ac_fn_cxx_try_cpp "$LINENO"; then :
19786
19787else
19788 # Broken: fails on valid input.
19789continue
19790fi
19791rm -f conftest.err conftest.i conftest.$ac_ext
19792
19793 # OK, works on sane cases. Now check whether nonexistent headers
19794 # can be detected and how.
19795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19796/* end confdefs.h. */
19797#include <ac_nonexistent.h>
19798_ACEOF
19799if ac_fn_cxx_try_cpp "$LINENO"; then :
19800 # Broken: success on invalid input.
19801continue
19802else
19803 # Passes both tests.
19804ac_preproc_ok=:
19805break
19806fi
19807rm -f conftest.err conftest.i conftest.$ac_ext
19808
19809done
19810# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19811rm -f conftest.i conftest.err conftest.$ac_ext
19812if $ac_preproc_ok; then :
19813
19814else
19815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19817as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
19818See \`config.log' for more details" "$LINENO" 5; }
19819fi
19820
19821ac_ext=c
19822ac_cpp='$CPP $CPPFLAGS'
19823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19825ac_compiler_gnu=$ac_cv_c_compiler_gnu
19826
19827else
19828 _lt_caught_CXX_error=yes
19829fi
19830
19831ac_ext=cpp
19832ac_cpp='$CXXCPP $CPPFLAGS'
19833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19836
19837archive_cmds_need_lc_CXX=no
19838allow_undefined_flag_CXX=
19839always_export_symbols_CXX=no
19840archive_expsym_cmds_CXX=
19841compiler_needs_object_CXX=no
19842export_dynamic_flag_spec_CXX=
19843hardcode_direct_CXX=no
19844hardcode_direct_absolute_CXX=no
19845hardcode_libdir_flag_spec_CXX=
19846hardcode_libdir_separator_CXX=
19847hardcode_minus_L_CXX=no
19848hardcode_shlibpath_var_CXX=unsupported
19849hardcode_automatic_CXX=no
19850inherit_rpath_CXX=no
19851module_cmds_CXX=
19852module_expsym_cmds_CXX=
19853link_all_deplibs_CXX=unknown
19854old_archive_cmds_CXX=$old_archive_cmds
19855reload_flag_CXX=$reload_flag
19856reload_cmds_CXX=$reload_cmds
19857no_undefined_flag_CXX=
19858whole_archive_flag_spec_CXX=
19859enable_shared_with_static_runtimes_CXX=no
19860
19861# Source file extension for C++ test sources.
19862ac_ext=cpp
19863
19864# Object file extension for compiled C++ test sources.
19865objext=o
19866objext_CXX=$objext
19867
19868# No sense in running all these tests if we already determined that
19869# the CXX compiler isn't working. Some variables (like enable_shared)
19870# are currently assumed to apply to all compilers on this platform,
19871# and will be corrupted by setting them based on a non-working compiler.
19872if test yes != "$_lt_caught_CXX_error"; then
19873 # Code to be used in simple compile tests
19874 lt_simple_compile_test_code="int some_variable = 0;"
19875
19876 # Code to be used in simple link tests
19877 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
19878
19879 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
19880
19881
19882
19883
19884
19885
19886# If no C compiler was specified, use CC.
19887LTCC=${LTCC-"$CC"}
19888
19889# If no C compiler flags were specified, use CFLAGS.
19890LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19891
19892# Allow CC to be a program name with arguments.
19893compiler=$CC
19894
19895
19896 # save warnings/boilerplate of simple test code
19897 ac_outfile=conftest.$ac_objext
19898echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19899eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19900_lt_compiler_boilerplate=`cat conftest.err`
19901$RM conftest*
19902
19903 ac_outfile=conftest.$ac_objext
19904echo "$lt_simple_link_test_code" >conftest.$ac_ext
19905eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19906_lt_linker_boilerplate=`cat conftest.err`
19907$RM -r conftest*
19908
19909
19910 # Allow CC to be a program name with arguments.
19911 lt_save_CC=$CC
19912 lt_save_CFLAGS=$CFLAGS
19913 lt_save_LD=$LD
19914 lt_save_GCC=$GCC
19915 GCC=$GXX
19916 lt_save_with_gnu_ld=$with_gnu_ld
19917 lt_save_path_LD=$lt_cv_path_LD
19918 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
19919 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
19920 else
19921 $as_unset lt_cv_prog_gnu_ld
19922 fi
19923 if test -n "${lt_cv_path_LDCXX+set}"; then
19924 lt_cv_path_LD=$lt_cv_path_LDCXX
19925 else
19926 $as_unset lt_cv_path_LD
19927 fi
19928 test -z "${LDCXX+set}" || LD=$LDCXX
19929 CC=${CXX-"c++"}
19930 CFLAGS=$CXXFLAGS
19931 compiler=$CC
19932 compiler_CXX=$CC
19933 func_cc_basename $compiler
19934cc_basename=$func_cc_basename_result
19935
19936
19937 if test -n "$compiler"; then
19938 # We don't want -fno-exception when compiling C++ code, so set the
19939 # no_builtin_flag separately
19940 if test yes = "$GXX"; then
19941 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
19942 else
19943 lt_prog_compiler_no_builtin_flag_CXX=
19944 fi
19945
19946 if test yes = "$GXX"; then
19947 # Set up default GNU C++ configuration
19948
19949
19950
19951# Check whether --with-gnu-ld was given.
19952if test "${with_gnu_ld+set}" = set; then :
19953 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
19954else
19955 with_gnu_ld=no
19956fi
19957
19958ac_prog=ld
19959if test yes = "$GCC"; then
19960 # Check if gcc -print-prog-name=ld gives a path.
19961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
19962$as_echo_n "checking for ld used by $CC... " >&6; }
19963 case $host in
19964 *-*-mingw*)
19965 # gcc leaves a trailing carriage return, which upsets mingw
19966 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
19967 *)
19968 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
19969 esac
19970 case $ac_prog in
19971 # Accept absolute paths.
19972 [\\/]* | ?:[\\/]*)
19973 re_direlt='/[^/][^/]*/\.\./'
19974 # Canonicalize the pathname of ld
19975 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
19976 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
19977 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
19978 done
19979 test -z "$LD" && LD=$ac_prog
19980 ;;
19981 "")
19982 # If it fails, then pretend we aren't using GCC.
19983 ac_prog=ld
19984 ;;
19985 *)
19986 # If it is relative, then search for the first ld in PATH.
19987 with_gnu_ld=unknown
19988 ;;
19989 esac
19990elif test yes = "$with_gnu_ld"; then
19991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
19992$as_echo_n "checking for GNU ld... " >&6; }
19993else
19994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
19995$as_echo_n "checking for non-GNU ld... " >&6; }
19996fi
19997if ${lt_cv_path_LD+:} false; then :
19998 $as_echo_n "(cached) " >&6
19999else
20000 if test -z "$LD"; then
20001 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
20002 for ac_dir in $PATH; do
20003 IFS=$lt_save_ifs
20004 test -z "$ac_dir" && ac_dir=.
20005 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
20006 lt_cv_path_LD=$ac_dir/$ac_prog
20007 # Check to see if the program is GNU ld. I'd rather use --version,
20008 # but apparently some variants of GNU ld only accept -v.
20009 # Break only if it was the GNU/non-GNU ld that we prefer.
20010 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
20011 *GNU* | *'with BFD'*)
20012 test no != "$with_gnu_ld" && break
20013 ;;
20014 *)
20015 test yes != "$with_gnu_ld" && break
20016 ;;
20017 esac
20018 fi
20019 done
20020 IFS=$lt_save_ifs
20021else
20022 lt_cv_path_LD=$LD # Let the user override the test with a path.
20023fi
20024fi
20025
20026LD=$lt_cv_path_LD
20027if test -n "$LD"; then
20028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
20029$as_echo "$LD" >&6; }
20030else
20031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20032$as_echo "no" >&6; }
20033fi
20034test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
20035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
20036$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
20037if ${lt_cv_prog_gnu_ld+:} false; then :
20038 $as_echo_n "(cached) " >&6
20039else
20040 # I'd rather use --version here, but apparently some GNU lds only accept -v.
20041case `$LD -v 2>&1 </dev/null` in
20042*GNU* | *'with BFD'*)
20043 lt_cv_prog_gnu_ld=yes
20044 ;;
20045*)
20046 lt_cv_prog_gnu_ld=no
20047 ;;
20048esac
20049fi
20050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
20051$as_echo "$lt_cv_prog_gnu_ld" >&6; }
20052with_gnu_ld=$lt_cv_prog_gnu_ld
20053
20054
20055
20056
20057
20058
20059
20060 # Check if GNU C++ uses GNU ld as the underlying linker, since the
20061 # archiving commands below assume that GNU ld is being used.
20062 if test yes = "$with_gnu_ld"; then
20063 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
20064 archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20065
20066 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
20067 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
20068
20069 # If archive_cmds runs LD, not CC, wlarc should be empty
20070 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
20071 # investigate it a little bit more. (MM)
20072 wlarc='$wl'
20073
20074 # ancient GNU ld didn't support --whole-archive et. al.
20075 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
20076 $GREP 'no-whole-archive' > /dev/null; then
20077 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
20078 else
20079 whole_archive_flag_spec_CXX=
20080 fi
20081 else
20082 with_gnu_ld=no
20083 wlarc=
20084
20085 # A generic and very simple default shared library creation
20086 # command for GNU C++ for the case where it uses the native
20087 # linker, instead of GNU ld. If possible, this setting should
20088 # overridden to take advantage of the native linker features on
20089 # the platform it is being used on.
20090 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
20091 fi
20092
20093 # Commands to make compiler produce verbose output that lists
20094 # what "hidden" libraries, object files and flags are used when
20095 # linking a shared library.
20096 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
20097
20098 else
20099 GXX=no
20100 with_gnu_ld=no
20101 wlarc=
20102 fi
20103
20104 # PORTME: fill in a description of your system's C++ link characteristics
20105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
20106$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
20107 ld_shlibs_CXX=yes
20108 case $host_os in
20109 aix3*)
20110 # FIXME: insert proper C++ library support
20111 ld_shlibs_CXX=no
20112 ;;
20113 aix[4-9]*)
20114 if test ia64 = "$host_cpu"; then
20115 # On IA64, the linker does run time linking by default, so we don't
20116 # have to do anything special.
20117 aix_use_runtimelinking=no
20118 exp_sym_flag='-Bexport'
20119 no_entry_flag=
20120 else
20121 aix_use_runtimelinking=no
20122
20123 # Test if we are trying to use run time linking or normal
20124 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
20125 # have runtime linking enabled, and use it for executables.
20126 # For shared libraries, we enable/disable runtime linking
20127 # depending on the kind of the shared library created -
20128 # when "with_aix_soname,aix_use_runtimelinking" is:
20129 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
20130 # "aix,yes" lib.so shared, rtl:yes, for executables
20131 # lib.a static archive
20132 # "both,no" lib.so.V(shr.o) shared, rtl:yes
20133 # lib.a(lib.so.V) shared, rtl:no, for executables
20134 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
20135 # lib.a(lib.so.V) shared, rtl:no
20136 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
20137 # lib.a static archive
20138 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
20139 for ld_flag in $LDFLAGS; do
20140 case $ld_flag in
20141 *-brtl*)
20142 aix_use_runtimelinking=yes
20143 break
20144 ;;
20145 esac
20146 done
20147 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
20148 # With aix-soname=svr4, we create the lib.so.V shared archives only,
20149 # so we don't have lib.a shared libs to link our executables.
20150 # We have to force runtime linking in this case.
20151 aix_use_runtimelinking=yes
20152 LDFLAGS="$LDFLAGS -Wl,-brtl"
20153 fi
20154 ;;
20155 esac
20156
20157 exp_sym_flag='-bexport'
20158 no_entry_flag='-bnoentry'
20159 fi
20160
20161 # When large executables or shared objects are built, AIX ld can
20162 # have problems creating the table of contents. If linking a library
20163 # or program results in "error TOC overflow" add -mminimal-toc to
20164 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
20165 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20166
20167 archive_cmds_CXX=''
20168 hardcode_direct_CXX=yes
20169 hardcode_direct_absolute_CXX=yes
20170 hardcode_libdir_separator_CXX=':'
20171 link_all_deplibs_CXX=yes
20172 file_list_spec_CXX='$wl-f,'
20173 case $with_aix_soname,$aix_use_runtimelinking in
20174 aix,*) ;; # no import file
20175 svr4,* | *,yes) # use import file
20176 # The Import File defines what to hardcode.
20177 hardcode_direct_CXX=no
20178 hardcode_direct_absolute_CXX=no
20179 ;;
20180 esac
20181
20182 if test yes = "$GXX"; then
20183 case $host_os in aix4.[012]|aix4.[012].*)
20184 # We only want to do this on AIX 4.2 and lower, the check
20185 # below for broken collect2 doesn't work under 4.3+
20186 collect2name=`$CC -print-prog-name=collect2`
20187 if test -f "$collect2name" &&
20188 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
20189 then
20190 # We have reworked collect2
20191 :
20192 else
20193 # We have old collect2
20194 hardcode_direct_CXX=unsupported
20195 # It fails to find uninstalled libraries when the uninstalled
20196 # path is not listed in the libpath. Setting hardcode_minus_L
20197 # to unsupported forces relinking
20198 hardcode_minus_L_CXX=yes
20199 hardcode_libdir_flag_spec_CXX='-L$libdir'
20200 hardcode_libdir_separator_CXX=
20201 fi
20202 esac
20203 shared_flag='-shared'
20204 if test yes = "$aix_use_runtimelinking"; then
20205 shared_flag=$shared_flag' $wl-G'
20206 fi
20207 # Need to ensure runtime linking is disabled for the traditional
20208 # shared library, or the linker may eventually find shared libraries
20209 # /with/ Import File - we do not want to mix them.
20210 shared_flag_aix='-shared'
20211 shared_flag_svr4='-shared $wl-G'
20212 else
20213 # not using gcc
20214 if test ia64 = "$host_cpu"; then
20215 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
20216 # chokes on -Wl,-G. The following line is correct:
20217 shared_flag='-G'
20218 else
20219 if test yes = "$aix_use_runtimelinking"; then
20220 shared_flag='$wl-G'
20221 else
20222 shared_flag='$wl-bM:SRE'
20223 fi
20224 shared_flag_aix='$wl-bM:SRE'
20225 shared_flag_svr4='$wl-G'
20226 fi
20227 fi
20228
20229 export_dynamic_flag_spec_CXX='$wl-bexpall'
20230 # It seems that -bexpall does not export symbols beginning with
20231 # underscore (_), so it is better to generate a list of symbols to
20232 # export.
20233 always_export_symbols_CXX=yes
20234 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
20235 # Warning - without using the other runtime loading flags (-brtl),
20236 # -berok will link without error, but may produce a broken library.
20237 # The "-G" linker flag allows undefined symbols.
20238 no_undefined_flag_CXX='-bernotok'
20239 # Determine the default libpath from the value encoded in an empty
20240 # executable.
20241 if test set = "${lt_cv_aix_libpath+set}"; then
20242 aix_libpath=$lt_cv_aix_libpath
20243else
20244 if ${lt_cv_aix_libpath__CXX+:} false; then :
20245 $as_echo_n "(cached) " >&6
20246else
20247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20248/* end confdefs.h. */
20249
20250int
20251main ()
20252{
20253
20254 ;
20255 return 0;
20256}
20257_ACEOF
20258if ac_fn_cxx_try_link "$LINENO"; then :
20259
20260 lt_aix_libpath_sed='
20261 /Import File Strings/,/^$/ {
20262 /^0/ {
20263 s/^0 *\([^ ]*\) *$/\1/
20264 p
20265 }
20266 }'
20267 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20268 # Check for a 64-bit object if we didn't find anything.
20269 if test -z "$lt_cv_aix_libpath__CXX"; then
20270 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20271 fi
20272fi
20273rm -f core conftest.err conftest.$ac_objext \
20274 conftest$ac_exeext conftest.$ac_ext
20275 if test -z "$lt_cv_aix_libpath__CXX"; then
20276 lt_cv_aix_libpath__CXX=/usr/lib:/lib
20277 fi
20278
20279fi
20280
20281 aix_libpath=$lt_cv_aix_libpath__CXX
20282fi
20283
20284 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
20285
20286 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
20287 else
20288 if test ia64 = "$host_cpu"; then
20289 hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
20290 allow_undefined_flag_CXX="-z nodefs"
20291 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
20292 else
20293 # Determine the default libpath from the value encoded in an
20294 # empty executable.
20295 if test set = "${lt_cv_aix_libpath+set}"; then
20296 aix_libpath=$lt_cv_aix_libpath
20297else
20298 if ${lt_cv_aix_libpath__CXX+:} false; then :
20299 $as_echo_n "(cached) " >&6
20300else
20301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20302/* end confdefs.h. */
20303
20304int
20305main ()
20306{
20307
20308 ;
20309 return 0;
20310}
20311_ACEOF
20312if ac_fn_cxx_try_link "$LINENO"; then :
20313
20314 lt_aix_libpath_sed='
20315 /Import File Strings/,/^$/ {
20316 /^0/ {
20317 s/^0 *\([^ ]*\) *$/\1/
20318 p
20319 }
20320 }'
20321 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20322 # Check for a 64-bit object if we didn't find anything.
20323 if test -z "$lt_cv_aix_libpath__CXX"; then
20324 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20325 fi
20326fi
20327rm -f core conftest.err conftest.$ac_objext \
20328 conftest$ac_exeext conftest.$ac_ext
20329 if test -z "$lt_cv_aix_libpath__CXX"; then
20330 lt_cv_aix_libpath__CXX=/usr/lib:/lib
20331 fi
20332
20333fi
20334
20335 aix_libpath=$lt_cv_aix_libpath__CXX
20336fi
20337
20338 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
20339 # Warning - without using the other run time loading flags,
20340 # -berok will link without error, but may produce a broken library.
20341 no_undefined_flag_CXX=' $wl-bernotok'
20342 allow_undefined_flag_CXX=' $wl-berok'
20343 if test yes = "$with_gnu_ld"; then
20344 # We only use this code for GNU lds that support --whole-archive.
20345 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
20346 else
20347 # Exported symbols can be pulled into shared objects from archives
20348 whole_archive_flag_spec_CXX='$convenience'
20349 fi
20350 archive_cmds_need_lc_CXX=yes
20351 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
20352 # -brtl affects multiple linker settings, -berok does not and is overridden later
20353 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
20354 if test svr4 != "$with_aix_soname"; then
20355 # This is similar to how AIX traditionally builds its shared
20356 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
20357 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
20358 fi
20359 if test aix != "$with_aix_soname"; then
20360 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
20361 else
20362 # used by -dlpreopen to get the symbols
20363 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
20364 fi
20365 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
20366 fi
20367 fi
20368 ;;
20369
20370 beos*)
20371 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20372 allow_undefined_flag_CXX=unsupported
20373 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
20374 # support --undefined. This deserves some investigation. FIXME
20375 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20376 else
20377 ld_shlibs_CXX=no
20378 fi
20379 ;;
20380
20381 chorus*)
20382 case $cc_basename in
20383 *)
20384 # FIXME: insert proper C++ library support
20385 ld_shlibs_CXX=no
20386 ;;
20387 esac
20388 ;;
20389
20390 cygwin* | mingw* | pw32* | cegcc*)
20391 case $GXX,$cc_basename in
20392 ,cl* | no,cl*)
20393 # Native MSVC
20394 # hardcode_libdir_flag_spec is actually meaningless, as there is
20395 # no search path for DLLs.
20396 hardcode_libdir_flag_spec_CXX=' '
20397 allow_undefined_flag_CXX=unsupported
20398 always_export_symbols_CXX=yes
20399 file_list_spec_CXX='@'
20400 # Tell ltmain to make .lib files, not .a files.
20401 libext=lib
20402 # Tell ltmain to make .dll files, not .so files.
20403 shrext_cmds=.dll
20404 # FIXME: Setting linknames here is a bad hack.
20405 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
20406 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
20407 cp "$export_symbols" "$output_objdir/$soname.def";
20408 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
20409 else
20410 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
20411 fi~
20412 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
20413 linknames='
20414 # The linker will not automatically build a static lib if we build a DLL.
20415 # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
20416 enable_shared_with_static_runtimes_CXX=yes
20417 # Don't use ranlib
20418 old_postinstall_cmds_CXX='chmod 644 $oldlib'
20419 postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
20420 lt_tool_outputfile="@TOOL_OUTPUT@"~
20421 case $lt_outputfile in
20422 *.exe|*.EXE) ;;
20423 *)
20424 lt_outputfile=$lt_outputfile.exe
20425 lt_tool_outputfile=$lt_tool_outputfile.exe
20426 ;;
20427 esac~
20428 func_to_tool_file "$lt_outputfile"~
20429 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
20430 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
20431 $RM "$lt_outputfile.manifest";
20432 fi'
20433 ;;
20434 *)
20435 # g++
20436 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
20437 # as there is no search path for DLLs.
20438 hardcode_libdir_flag_spec_CXX='-L$libdir'
20439 export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
20440 allow_undefined_flag_CXX=unsupported
20441 always_export_symbols_CXX=no
20442 enable_shared_with_static_runtimes_CXX=yes
20443
20444 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
20445 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20446 # If the export-symbols file already is a .def file, use it as
20447 # is; otherwise, prepend EXPORTS...
20448 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
20449 cp $export_symbols $output_objdir/$soname.def;
20450 else
20451 echo EXPORTS > $output_objdir/$soname.def;
20452 cat $export_symbols >> $output_objdir/$soname.def;
20453 fi~
20454 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
20455 else
20456 ld_shlibs_CXX=no
20457 fi
20458 ;;
20459 esac
20460 ;;
20461 darwin* | rhapsody*)
20462
20463
20464 archive_cmds_need_lc_CXX=no
20465 hardcode_direct_CXX=no
20466 hardcode_automatic_CXX=yes
20467 hardcode_shlibpath_var_CXX=unsupported
20468 if test yes = "$lt_cv_ld_force_load"; then
20469 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
20470
20471 else
20472 whole_archive_flag_spec_CXX=''
20473 fi
20474 link_all_deplibs_CXX=yes
20475 allow_undefined_flag_CXX=$_lt_dar_allow_undefined
20476 case $cc_basename in
20477 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
20478 *) _lt_dar_can_shared=$GCC ;;
20479 esac
20480 if test yes = "$_lt_dar_can_shared"; then
20481 output_verbose_link_cmd=func_echo_all
20482 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
20483 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
20484 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
20485 module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
20486 if test yes != "$lt_cv_apple_cc_single_mod"; then
20487 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
20488 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
20489 fi
20490
20491 else
20492 ld_shlibs_CXX=no
20493 fi
20494
20495 ;;
20496
20497 os2*)
20498 hardcode_libdir_flag_spec_CXX='-L$libdir'
20499 hardcode_minus_L_CXX=yes
20500 allow_undefined_flag_CXX=unsupported
20501 shrext_cmds=.dll
20502 archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
20503 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
20504 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
20505 $ECHO EXPORTS >> $output_objdir/$libname.def~
20506 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
20507 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
20508 emximp -o $lib $output_objdir/$libname.def'
20509 archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
20510 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
20511 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
20512 $ECHO EXPORTS >> $output_objdir/$libname.def~
20513 prefix_cmds="$SED"~
20514 if test EXPORTS = "`$SED 1q $export_symbols`"; then
20515 prefix_cmds="$prefix_cmds -e 1d";
20516 fi~
20517 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
20518 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
20519 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
20520 emximp -o $lib $output_objdir/$libname.def'
20521 old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
20522 enable_shared_with_static_runtimes_CXX=yes
20523 ;;
20524
20525 dgux*)
20526 case $cc_basename in
20527 ec++*)
20528 # FIXME: insert proper C++ library support
20529 ld_shlibs_CXX=no
20530 ;;
20531 ghcx*)
20532 # Green Hills C++ Compiler
20533 # FIXME: insert proper C++ library support
20534 ld_shlibs_CXX=no
20535 ;;
20536 *)
20537 # FIXME: insert proper C++ library support
20538 ld_shlibs_CXX=no
20539 ;;
20540 esac
20541 ;;
20542
20543 freebsd2.*)
20544 # C++ shared libraries reported to be fairly broken before
20545 # switch to ELF
20546 ld_shlibs_CXX=no
20547 ;;
20548
20549 freebsd-elf*)
20550 archive_cmds_need_lc_CXX=no
20551 ;;
20552
20553 freebsd* | dragonfly*)
20554 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
20555 # conventions
20556 ld_shlibs_CXX=yes
20557 ;;
20558
20559 haiku*)
20560 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20561 link_all_deplibs_CXX=yes
20562 ;;
20563
20564 hpux9*)
20565 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
20566 hardcode_libdir_separator_CXX=:
20567 export_dynamic_flag_spec_CXX='$wl-E'
20568 hardcode_direct_CXX=yes
20569 hardcode_minus_L_CXX=yes # Not in the search PATH,
20570 # but as the default
20571 # location of the library.
20572
20573 case $cc_basename in
20574 CC*)
20575 # FIXME: insert proper C++ library support
20576 ld_shlibs_CXX=no
20577 ;;
20578 aCC*)
20579 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
20580 # Commands to make compiler produce verbose output that lists
20581 # what "hidden" libraries, object files and flags are used when
20582 # linking a shared library.
20583 #
20584 # There doesn't appear to be a way to prevent this compiler from
20585 # explicitly linking system object files so we need to strip them
20586 # from the output so that they don't get included in the library
20587 # dependencies.
20588 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
20589 ;;
20590 *)
20591 if test yes = "$GXX"; then
20592 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
20593 else
20594 # FIXME: insert proper C++ library support
20595 ld_shlibs_CXX=no
20596 fi
20597 ;;
20598 esac
20599 ;;
20600
20601 hpux10*|hpux11*)
20602 if test no = "$with_gnu_ld"; then
20603 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
20604 hardcode_libdir_separator_CXX=:
20605
20606 case $host_cpu in
20607 hppa*64*|ia64*)
20608 ;;
20609 *)
20610 export_dynamic_flag_spec_CXX='$wl-E'
20611 ;;
20612 esac
20613 fi
20614 case $host_cpu in
20615 hppa*64*|ia64*)
20616 hardcode_direct_CXX=no
20617 hardcode_shlibpath_var_CXX=no
20618 ;;
20619 *)
20620 hardcode_direct_CXX=yes
20621 hardcode_direct_absolute_CXX=yes
20622 hardcode_minus_L_CXX=yes # Not in the search PATH,
20623 # but as the default
20624 # location of the library.
20625 ;;
20626 esac
20627
20628 case $cc_basename in
20629 CC*)
20630 # FIXME: insert proper C++ library support
20631 ld_shlibs_CXX=no
20632 ;;
20633 aCC*)
20634 case $host_cpu in
20635 hppa*64*)
20636 archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
20637 ;;
20638 ia64*)
20639 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
20640 ;;
20641 *)
20642 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
20643 ;;
20644 esac
20645 # Commands to make compiler produce verbose output that lists
20646 # what "hidden" libraries, object files and flags are used when
20647 # linking a shared library.
20648 #
20649 # There doesn't appear to be a way to prevent this compiler from
20650 # explicitly linking system object files so we need to strip them
20651 # from the output so that they don't get included in the library
20652 # dependencies.
20653 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
20654 ;;
20655 *)
20656 if test yes = "$GXX"; then
20657 if test no = "$with_gnu_ld"; then
20658 case $host_cpu in
20659 hppa*64*)
20660 archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
20661 ;;
20662 ia64*)
20663 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
20664 ;;
20665 *)
20666 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
20667 ;;
20668 esac
20669 fi
20670 else
20671 # FIXME: insert proper C++ library support
20672 ld_shlibs_CXX=no
20673 fi
20674 ;;
20675 esac
20676 ;;
20677
20678 interix[3-9]*)
20679 hardcode_direct_CXX=no
20680 hardcode_shlibpath_var_CXX=no
20681 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
20682 export_dynamic_flag_spec_CXX='$wl-E'
20683 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
20684 # Instead, shared libraries are loaded at an image base (0x10000000 by
20685 # default) and relocated if they conflict, which is a slow very memory
20686 # consuming and fragmenting process. To avoid this, we pick a random,
20687 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
20688 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
20689 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
20690 archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
20691 ;;
20692 irix5* | irix6*)
20693 case $cc_basename in
20694 CC*)
20695 # SGI C++
20696 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
20697
20698 # Archives containing C++ object files must be created using
20699 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
20700 # necessary to make sure instantiated templates are included
20701 # in the archive.
20702 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
20703 ;;
20704 *)
20705 if test yes = "$GXX"; then
20706 if test no = "$with_gnu_ld"; then
20707 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
20708 else
20709 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
20710 fi
20711 fi
20712 link_all_deplibs_CXX=yes
20713 ;;
20714 esac
20715 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
20716 hardcode_libdir_separator_CXX=:
20717 inherit_rpath_CXX=yes
20718 ;;
20719
20720 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
20721 case $cc_basename in
20722 KCC*)
20723 # Kuck and Associates, Inc. (KAI) C++ Compiler
20724
20725 # KCC will only create a shared library if the output file
20726 # ends with ".so" (or ".sl" for HP-UX), so rename the library
20727 # to its proper name (with version) after linking.
20728 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
20729 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
20730 # Commands to make compiler produce verbose output that lists
20731 # what "hidden" libraries, object files and flags are used when
20732 # linking a shared library.
20733 #
20734 # There doesn't appear to be a way to prevent this compiler from
20735 # explicitly linking system object files so we need to strip them
20736 # from the output so that they don't get included in the library
20737 # dependencies.
20738 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
20739
20740 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
20741 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
20742
20743 # Archives containing C++ object files must be created using
20744 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
20745 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
20746 ;;
20747 icpc* | ecpc* )
20748 # Intel C++
20749 with_gnu_ld=yes
20750 # version 8.0 and above of icpc choke on multiply defined symbols
20751 # if we add $predep_objects and $postdep_objects, however 7.1 and
20752 # earlier do not add the objects themselves.
20753 case `$CC -V 2>&1` in
20754 *"Version 7."*)
20755 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
20756 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20757 ;;
20758 *) # Version 8.0 or newer
20759 tmp_idyn=
20760 case $host_cpu in
20761 ia64*) tmp_idyn=' -i_dynamic';;
20762 esac
20763 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20764 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20765 ;;
20766 esac
20767 archive_cmds_need_lc_CXX=no
20768 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
20769 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
20770 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
20771 ;;
20772 pgCC* | pgcpp*)
20773 # Portland Group C++ compiler
20774 case `$CC -V` in
20775 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
20776 prelink_cmds_CXX='tpldir=Template.dir~
20777 rm -rf $tpldir~
20778 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
20779 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
20780 old_archive_cmds_CXX='tpldir=Template.dir~
20781 rm -rf $tpldir~
20782 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
20783 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
20784 $RANLIB $oldlib'
20785 archive_cmds_CXX='tpldir=Template.dir~
20786 rm -rf $tpldir~
20787 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
20788 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
20789 archive_expsym_cmds_CXX='tpldir=Template.dir~
20790 rm -rf $tpldir~
20791 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
20792 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20793 ;;
20794 *) # Version 6 and above use weak symbols
20795 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
20796 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20797 ;;
20798 esac
20799
20800 hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
20801 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
20802 whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
20803 ;;
20804 cxx*)
20805 # Compaq C++
20806 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
20807 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
20808
20809 runpath_var=LD_RUN_PATH
20810 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
20811 hardcode_libdir_separator_CXX=:
20812
20813 # Commands to make compiler produce verbose output that lists
20814 # what "hidden" libraries, object files and flags are used when
20815 # linking a shared library.
20816 #
20817 # There doesn't appear to be a way to prevent this compiler from
20818 # explicitly linking system object files so we need to strip them
20819 # from the output so that they don't get included in the library
20820 # dependencies.
20821 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
20822 ;;
20823 xl* | mpixl* | bgxl*)
20824 # IBM XL 8.0 on PPC, with GNU ld
20825 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
20826 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
20827 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20828 if test yes = "$supports_anon_versioning"; then
20829 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
20830 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20831 echo "local: *; };" >> $output_objdir/$libname.ver~
20832 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
20833 fi
20834 ;;
20835 *)
20836 case `$CC -V 2>&1 | sed 5q` in
20837 *Sun\ C*)
20838 # Sun C++ 5.9
20839 no_undefined_flag_CXX=' -zdefs'
20840 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
20841 archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
20842 hardcode_libdir_flag_spec_CXX='-R$libdir'
20843 whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
20844 compiler_needs_object_CXX=yes
20845
20846 # Not sure whether something based on
20847 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
20848 # would be better.
20849 output_verbose_link_cmd='func_echo_all'
20850
20851 # Archives containing C++ object files must be created using
20852 # "CC -xar", where "CC" is the Sun C++ compiler. This is
20853 # necessary to make sure instantiated templates are included
20854 # in the archive.
20855 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
20856 ;;
20857 esac
20858 ;;
20859 esac
20860 ;;
20861
20862 lynxos*)
20863 # FIXME: insert proper C++ library support
20864 ld_shlibs_CXX=no
20865 ;;
20866
20867 m88k*)
20868 # FIXME: insert proper C++ library support
20869 ld_shlibs_CXX=no
20870 ;;
20871
20872 mvs*)
20873 case $cc_basename in
20874 cxx*)
20875 # FIXME: insert proper C++ library support
20876 ld_shlibs_CXX=no
20877 ;;
20878 *)
20879 # FIXME: insert proper C++ library support
20880 ld_shlibs_CXX=no
20881 ;;
20882 esac
20883 ;;
20884
20885 netbsd*)
20886 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20887 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
20888 wlarc=
20889 hardcode_libdir_flag_spec_CXX='-R$libdir'
20890 hardcode_direct_CXX=yes
20891 hardcode_shlibpath_var_CXX=no
20892 fi
20893 # Workaround some broken pre-1.5 toolchains
20894 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
20895 ;;
20896
20897 *nto* | *qnx*)
20898 ld_shlibs_CXX=yes
20899 ;;
20900
20901 openbsd* | bitrig*)
20902 if test -f /usr/libexec/ld.so; then
20903 hardcode_direct_CXX=yes
20904 hardcode_shlibpath_var_CXX=no
20905 hardcode_direct_absolute_CXX=yes
20906 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
20907 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
20908 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
20909 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
20910 export_dynamic_flag_spec_CXX='$wl-E'
20911 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
20912 fi
20913 output_verbose_link_cmd=func_echo_all
20914 else
20915 ld_shlibs_CXX=no
20916 fi
20917 ;;
20918
20919 osf3* | osf4* | osf5*)
20920 case $cc_basename in
20921 KCC*)
20922 # Kuck and Associates, Inc. (KAI) C++ Compiler
20923
20924 # KCC will only create a shared library if the output file
20925 # ends with ".so" (or ".sl" for HP-UX), so rename the library
20926 # to its proper name (with version) after linking.
20927 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
20928
20929 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
20930 hardcode_libdir_separator_CXX=:
20931
20932 # Archives containing C++ object files must be created using
20933 # the KAI C++ compiler.
20934 case $host in
20935 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
20936 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
20937 esac
20938 ;;
20939 RCC*)
20940 # Rational C++ 2.4.1
20941 # FIXME: insert proper C++ library support
20942 ld_shlibs_CXX=no
20943 ;;
20944 cxx*)
20945 case $host in
20946 osf3*)
20947 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
20948 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
20949 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
20950 ;;
20951 *)
20952 allow_undefined_flag_CXX=' -expect_unresolved \*'
20953 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
20954 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
20955 echo "-hidden">> $lib.exp~
20956 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
20957 $RM $lib.exp'
20958 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
20959 ;;
20960 esac
20961
20962 hardcode_libdir_separator_CXX=:
20963
20964 # Commands to make compiler produce verbose output that lists
20965 # what "hidden" libraries, object files and flags are used when
20966 # linking a shared library.
20967 #
20968 # There doesn't appear to be a way to prevent this compiler from
20969 # explicitly linking system object files so we need to strip them
20970 # from the output so that they don't get included in the library
20971 # dependencies.
20972 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
20973 ;;
20974 *)
20975 if test yes,no = "$GXX,$with_gnu_ld"; then
20976 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
20977 case $host in
20978 osf3*)
20979 archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
20980 ;;
20981 *)
20982 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
20983 ;;
20984 esac
20985
20986 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
20987 hardcode_libdir_separator_CXX=:
20988
20989 # Commands to make compiler produce verbose output that lists
20990 # what "hidden" libraries, object files and flags are used when
20991 # linking a shared library.
20992 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
20993
20994 else
20995 # FIXME: insert proper C++ library support
20996 ld_shlibs_CXX=no
20997 fi
20998 ;;
20999 esac
21000 ;;
21001
21002 psos*)
21003 # FIXME: insert proper C++ library support
21004 ld_shlibs_CXX=no
21005 ;;
21006
21007 sunos4*)
21008 case $cc_basename in
21009 CC*)
21010 # Sun C++ 4.x
21011 # FIXME: insert proper C++ library support
21012 ld_shlibs_CXX=no
21013 ;;
21014 lcc*)
21015 # Lucid
21016 # FIXME: insert proper C++ library support
21017 ld_shlibs_CXX=no
21018 ;;
21019 *)
21020 # FIXME: insert proper C++ library support
21021 ld_shlibs_CXX=no
21022 ;;
21023 esac
21024 ;;
21025
21026 solaris*)
21027 case $cc_basename in
21028 CC* | sunCC*)
21029 # Sun C++ 4.2, 5.x and Centerline C++
21030 archive_cmds_need_lc_CXX=yes
21031 no_undefined_flag_CXX=' -zdefs'
21032 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
21033 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21034 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
21035
21036 hardcode_libdir_flag_spec_CXX='-R$libdir'
21037 hardcode_shlibpath_var_CXX=no
21038 case $host_os in
21039 solaris2.[0-5] | solaris2.[0-5].*) ;;
21040 *)
21041 # The compiler driver will combine and reorder linker options,
21042 # but understands '-z linker_flag'.
21043 # Supported since Solaris 2.6 (maybe 2.5.1?)
21044 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
21045 ;;
21046 esac
21047 link_all_deplibs_CXX=yes
21048
21049 output_verbose_link_cmd='func_echo_all'
21050
21051 # Archives containing C++ object files must be created using
21052 # "CC -xar", where "CC" is the Sun C++ compiler. This is
21053 # necessary to make sure instantiated templates are included
21054 # in the archive.
21055 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
21056 ;;
21057 gcx*)
21058 # Green Hills C++ Compiler
21059 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
21060
21061 # The C++ compiler must be used to create the archive.
21062 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
21063 ;;
21064 *)
21065 # GNU C++ compiler with Solaris linker
21066 if test yes,no = "$GXX,$with_gnu_ld"; then
21067 no_undefined_flag_CXX=' $wl-z ${wl}defs'
21068 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
21069 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
21070 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21071 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
21072
21073 # Commands to make compiler produce verbose output that lists
21074 # what "hidden" libraries, object files and flags are used when
21075 # linking a shared library.
21076 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
21077 else
21078 # g++ 2.7 appears to require '-G' NOT '-shared' on this
21079 # platform.
21080 archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
21081 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
21082 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
21083
21084 # Commands to make compiler produce verbose output that lists
21085 # what "hidden" libraries, object files and flags are used when
21086 # linking a shared library.
21087 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
21088 fi
21089
21090 hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
21091 case $host_os in
21092 solaris2.[0-5] | solaris2.[0-5].*) ;;
21093 *)
21094 whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
21095 ;;
21096 esac
21097 fi
21098 ;;
21099 esac
21100 ;;
21101
21102 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
21103 no_undefined_flag_CXX='$wl-z,text'
21104 archive_cmds_need_lc_CXX=no
21105 hardcode_shlibpath_var_CXX=no
21106 runpath_var='LD_RUN_PATH'
21107
21108 case $cc_basename in
21109 CC*)
21110 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21111 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21112 ;;
21113 *)
21114 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21115 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21116 ;;
21117 esac
21118 ;;
21119
21120 sysv5* | sco3.2v5* | sco5v6*)
21121 # Note: We CANNOT use -z defs as we might desire, because we do not
21122 # link with -lc, and that would cause any symbols used from libc to
21123 # always be unresolved, which means just about no library would
21124 # ever link correctly. If we're not using GNU ld we use -z text
21125 # though, which does catch some bad symbols but isn't as heavy-handed
21126 # as -z defs.
21127 no_undefined_flag_CXX='$wl-z,text'
21128 allow_undefined_flag_CXX='$wl-z,nodefs'
21129 archive_cmds_need_lc_CXX=no
21130 hardcode_shlibpath_var_CXX=no
21131 hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
21132 hardcode_libdir_separator_CXX=':'
21133 link_all_deplibs_CXX=yes
21134 export_dynamic_flag_spec_CXX='$wl-Bexport'
21135 runpath_var='LD_RUN_PATH'
21136
21137 case $cc_basename in
21138 CC*)
21139 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21140 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21141 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
21142 '"$old_archive_cmds_CXX"
21143 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
21144 '"$reload_cmds_CXX"
21145 ;;
21146 *)
21147 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21148 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
21149 ;;
21150 esac
21151 ;;
21152
21153 tandem*)
21154 case $cc_basename in
21155 NCC*)
21156 # NonStop-UX NCC 3.20
21157 # FIXME: insert proper C++ library support
21158 ld_shlibs_CXX=no
21159 ;;
21160 *)
21161 # FIXME: insert proper C++ library support
21162 ld_shlibs_CXX=no
21163 ;;
21164 esac
21165 ;;
21166
21167 vxworks*)
21168 # FIXME: insert proper C++ library support
21169 ld_shlibs_CXX=no
21170 ;;
21171
21172 *)
21173 # FIXME: insert proper C++ library support
21174 ld_shlibs_CXX=no
21175 ;;
21176 esac
21177
21178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
21179$as_echo "$ld_shlibs_CXX" >&6; }
21180 test no = "$ld_shlibs_CXX" && can_build_shared=no
21181
21182 GCC_CXX=$GXX
21183 LD_CXX=$LD
21184
21185 ## CAVEAT EMPTOR:
21186 ## There is no encapsulation within the following macros, do not change
21187 ## the running order or otherwise move them around unless you know exactly
21188 ## what you are doing...
21189 # Dependencies to place before and after the object being linked:
21190predep_objects_CXX=
21191postdep_objects_CXX=
21192predeps_CXX=
21193postdeps_CXX=
21194compiler_lib_search_path_CXX=
21195
21196cat > conftest.$ac_ext <<_LT_EOF
21197class Foo
21198{
21199public:
21200 Foo (void) { a = 0; }
21201private:
21202 int a;
21203};
21204_LT_EOF
21205
21206
21207_lt_libdeps_save_CFLAGS=$CFLAGS
21208case "$CC $CFLAGS " in #(
21209*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
21210*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
21211*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
21212esac
21213
21214if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21215 (eval $ac_compile) 2>&5
21216 ac_status=$?
21217 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21218 test $ac_status = 0; }; then
21219 # Parse the compiler output and extract the necessary
21220 # objects, libraries and library flags.
21221
21222 # Sentinel used to keep track of whether or not we are before
21223 # the conftest object file.
21224 pre_test_object_deps_done=no
21225
21226 for p in `eval "$output_verbose_link_cmd"`; do
21227 case $prev$p in
21228
21229 -L* | -R* | -l*)
21230 # Some compilers place space between "-{L,R}" and the path.
21231 # Remove the space.
21232 if test x-L = "$p" ||
21233 test x-R = "$p"; then
21234 prev=$p
21235 continue
21236 fi
21237
21238 # Expand the sysroot to ease extracting the directories later.
21239 if test -z "$prev"; then
21240 case $p in
21241 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
21242 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
21243 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
21244 esac
21245 fi
21246 case $p in
21247 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
21248 esac
21249 if test no = "$pre_test_object_deps_done"; then
21250 case $prev in
21251 -L | -R)
21252 # Internal compiler library paths should come after those
21253 # provided the user. The postdeps already come after the
21254 # user supplied libs so there is no need to process them.
21255 if test -z "$compiler_lib_search_path_CXX"; then
21256 compiler_lib_search_path_CXX=$prev$p
21257 else
21258 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
21259 fi
21260 ;;
21261 # The "-l" case would never come before the object being
21262 # linked, so don't bother handling this case.
21263 esac
21264 else
21265 if test -z "$postdeps_CXX"; then
21266 postdeps_CXX=$prev$p
21267 else
21268 postdeps_CXX="${postdeps_CXX} $prev$p"
21269 fi
21270 fi
21271 prev=
21272 ;;
21273
21274 *.lto.$objext) ;; # Ignore GCC LTO objects
21275 *.$objext)
21276 # This assumes that the test object file only shows up
21277 # once in the compiler output.
21278 if test "$p" = "conftest.$objext"; then
21279 pre_test_object_deps_done=yes
21280 continue
21281 fi
21282
21283 if test no = "$pre_test_object_deps_done"; then
21284 if test -z "$predep_objects_CXX"; then
21285 predep_objects_CXX=$p
21286 else
21287 predep_objects_CXX="$predep_objects_CXX $p"
21288 fi
21289 else
21290 if test -z "$postdep_objects_CXX"; then
21291 postdep_objects_CXX=$p
21292 else
21293 postdep_objects_CXX="$postdep_objects_CXX $p"
21294 fi
21295 fi
21296 ;;
21297
21298 *) ;; # Ignore the rest.
21299
21300 esac
21301 done
21302
21303 # Clean up.
21304 rm -f a.out a.exe
21305else
21306 echo "libtool.m4: error: problem compiling CXX test program"
21307fi
21308
21309$RM -f confest.$objext
21310CFLAGS=$_lt_libdeps_save_CFLAGS
21311
21312# PORTME: override above test on systems where it is broken
21313case $host_os in
21314interix[3-9]*)
21315 # Interix 3.5 installs completely hosed .la files for C++, so rather than
21316 # hack all around it, let's just trust "g++" to DTRT.
21317 predep_objects_CXX=
21318 postdep_objects_CXX=
21319 postdeps_CXX=
21320 ;;
21321esac
21322
21323
21324case " $postdeps_CXX " in
21325*" -lc "*) archive_cmds_need_lc_CXX=no ;;
21326esac
21327 compiler_lib_search_dirs_CXX=
21328if test -n "${compiler_lib_search_path_CXX}"; then
21329 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
21330fi
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362 lt_prog_compiler_wl_CXX=
21363lt_prog_compiler_pic_CXX=
21364lt_prog_compiler_static_CXX=
21365
21366
21367 # C++ specific cases for pic, static, wl, etc.
21368 if test yes = "$GXX"; then
21369 lt_prog_compiler_wl_CXX='-Wl,'
21370 lt_prog_compiler_static_CXX='-static'
21371
21372 case $host_os in
21373 aix*)
21374 # All AIX code is PIC.
21375 if test ia64 = "$host_cpu"; then
21376 # AIX 5 now supports IA64 processor
21377 lt_prog_compiler_static_CXX='-Bstatic'
21378 fi
21379 lt_prog_compiler_pic_CXX='-fPIC'
21380 ;;
21381
21382 amigaos*)
21383 case $host_cpu in
21384 powerpc)
21385 # see comment about AmigaOS4 .so support
21386 lt_prog_compiler_pic_CXX='-fPIC'
21387 ;;
21388 m68k)
21389 # FIXME: we need at least 68020 code to build shared libraries, but
21390 # adding the '-m68020' flag to GCC prevents building anything better,
21391 # like '-m68040'.
21392 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
21393 ;;
21394 esac
21395 ;;
21396
21397 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
21398 # PIC is the default for these OSes.
21399 ;;
21400 mingw* | cygwin* | os2* | pw32* | cegcc*)
21401 # This hack is so that the source file can tell whether it is being
21402 # built for inclusion in a dll (and should export symbols for example).
21403 # Although the cygwin gcc ignores -fPIC, still need this for old-style
21404 # (--disable-auto-import) libraries
21405 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
21406 case $host_os in
21407 os2*)
21408 lt_prog_compiler_static_CXX='$wl-static'
21409 ;;
21410 esac
21411 ;;
21412 darwin* | rhapsody*)
21413 # PIC is the default on this platform
21414 # Common symbols not allowed in MH_DYLIB files
21415 lt_prog_compiler_pic_CXX='-fno-common'
21416 ;;
21417 *djgpp*)
21418 # DJGPP does not support shared libraries at all
21419 lt_prog_compiler_pic_CXX=
21420 ;;
21421 haiku*)
21422 # PIC is the default for Haiku.
21423 # The "-static" flag exists, but is broken.
21424 lt_prog_compiler_static_CXX=
21425 ;;
21426 interix[3-9]*)
21427 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
21428 # Instead, we relocate shared libraries at runtime.
21429 ;;
21430 sysv4*MP*)
21431 if test -d /usr/nec; then
21432 lt_prog_compiler_pic_CXX=-Kconform_pic
21433 fi
21434 ;;
21435 hpux*)
21436 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
21437 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
21438 # sets the default TLS model and affects inlining.
21439 case $host_cpu in
21440 hppa*64*)
21441 ;;
21442 *)
21443 lt_prog_compiler_pic_CXX='-fPIC'
21444 ;;
21445 esac
21446 ;;
21447 *qnx* | *nto*)
21448 # QNX uses GNU C++, but need to define -shared option too, otherwise
21449 # it will coredump.
21450 lt_prog_compiler_pic_CXX='-fPIC -shared'
21451 ;;
21452 *)
21453 lt_prog_compiler_pic_CXX='-fPIC'
21454 ;;
21455 esac
21456 else
21457 case $host_os in
21458 aix[4-9]*)
21459 # All AIX code is PIC.
21460 if test ia64 = "$host_cpu"; then
21461 # AIX 5 now supports IA64 processor
21462 lt_prog_compiler_static_CXX='-Bstatic'
21463 else
21464 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
21465 fi
21466 ;;
21467 chorus*)
21468 case $cc_basename in
21469 cxch68*)
21470 # Green Hills C++ Compiler
21471 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
21472 ;;
21473 esac
21474 ;;
21475 mingw* | cygwin* | os2* | pw32* | cegcc*)
21476 # This hack is so that the source file can tell whether it is being
21477 # built for inclusion in a dll (and should export symbols for example).
21478 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
21479 ;;
21480 dgux*)
21481 case $cc_basename in
21482 ec++*)
21483 lt_prog_compiler_pic_CXX='-KPIC'
21484 ;;
21485 ghcx*)
21486 # Green Hills C++ Compiler
21487 lt_prog_compiler_pic_CXX='-pic'
21488 ;;
21489 *)
21490 ;;
21491 esac
21492 ;;
21493 freebsd* | dragonfly*)
21494 # FreeBSD uses GNU C++
21495 ;;
21496 hpux9* | hpux10* | hpux11*)
21497 case $cc_basename in
21498 CC*)
21499 lt_prog_compiler_wl_CXX='-Wl,'
21500 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
21501 if test ia64 != "$host_cpu"; then
21502 lt_prog_compiler_pic_CXX='+Z'
21503 fi
21504 ;;
21505 aCC*)
21506 lt_prog_compiler_wl_CXX='-Wl,'
21507 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
21508 case $host_cpu in
21509 hppa*64*|ia64*)
21510 # +Z the default
21511 ;;
21512 *)
21513 lt_prog_compiler_pic_CXX='+Z'
21514 ;;
21515 esac
21516 ;;
21517 *)
21518 ;;
21519 esac
21520 ;;
21521 interix*)
21522 # This is c89, which is MS Visual C++ (no shared libs)
21523 # Anyone wants to do a port?
21524 ;;
21525 irix5* | irix6* | nonstopux*)
21526 case $cc_basename in
21527 CC*)
21528 lt_prog_compiler_wl_CXX='-Wl,'
21529 lt_prog_compiler_static_CXX='-non_shared'
21530 # CC pic flag -KPIC is the default.
21531 ;;
21532 *)
21533 ;;
21534 esac
21535 ;;
21536 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
21537 case $cc_basename in
21538 KCC*)
21539 # KAI C++ Compiler
21540 lt_prog_compiler_wl_CXX='--backend -Wl,'
21541 lt_prog_compiler_pic_CXX='-fPIC'
21542 ;;
21543 ecpc* )
21544 # old Intel C++ for x86_64, which still supported -KPIC.
21545 lt_prog_compiler_wl_CXX='-Wl,'
21546 lt_prog_compiler_pic_CXX='-KPIC'
21547 lt_prog_compiler_static_CXX='-static'
21548 ;;
21549 icpc* )
21550 # Intel C++, used to be incompatible with GCC.
21551 # ICC 10 doesn't accept -KPIC any more.
21552 lt_prog_compiler_wl_CXX='-Wl,'
21553 lt_prog_compiler_pic_CXX='-fPIC'
21554 lt_prog_compiler_static_CXX='-static'
21555 ;;
21556 pgCC* | pgcpp*)
21557 # Portland Group C++ compiler
21558 lt_prog_compiler_wl_CXX='-Wl,'
21559 lt_prog_compiler_pic_CXX='-fpic'
21560 lt_prog_compiler_static_CXX='-Bstatic'
21561 ;;
21562 cxx*)
21563 # Compaq C++
21564 # Make sure the PIC flag is empty. It appears that all Alpha
21565 # Linux and Compaq Tru64 Unix objects are PIC.
21566 lt_prog_compiler_pic_CXX=
21567 lt_prog_compiler_static_CXX='-non_shared'
21568 ;;
21569 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
21570 # IBM XL 8.0, 9.0 on PPC and BlueGene
21571 lt_prog_compiler_wl_CXX='-Wl,'
21572 lt_prog_compiler_pic_CXX='-qpic'
21573 lt_prog_compiler_static_CXX='-qstaticlink'
21574 ;;
21575 *)
21576 case `$CC -V 2>&1 | sed 5q` in
21577 *Sun\ C*)
21578 # Sun C++ 5.9
21579 lt_prog_compiler_pic_CXX='-KPIC'
21580 lt_prog_compiler_static_CXX='-Bstatic'
21581 lt_prog_compiler_wl_CXX='-Qoption ld '
21582 ;;
21583 esac
21584 ;;
21585 esac
21586 ;;
21587 lynxos*)
21588 ;;
21589 m88k*)
21590 ;;
21591 mvs*)
21592 case $cc_basename in
21593 cxx*)
21594 lt_prog_compiler_pic_CXX='-W c,exportall'
21595 ;;
21596 *)
21597 ;;
21598 esac
21599 ;;
21600 netbsd*)
21601 ;;
21602 *qnx* | *nto*)
21603 # QNX uses GNU C++, but need to define -shared option too, otherwise
21604 # it will coredump.
21605 lt_prog_compiler_pic_CXX='-fPIC -shared'
21606 ;;
21607 osf3* | osf4* | osf5*)
21608 case $cc_basename in
21609 KCC*)
21610 lt_prog_compiler_wl_CXX='--backend -Wl,'
21611 ;;
21612 RCC*)
21613 # Rational C++ 2.4.1
21614 lt_prog_compiler_pic_CXX='-pic'
21615 ;;
21616 cxx*)
21617 # Digital/Compaq C++
21618 lt_prog_compiler_wl_CXX='-Wl,'
21619 # Make sure the PIC flag is empty. It appears that all Alpha
21620 # Linux and Compaq Tru64 Unix objects are PIC.
21621 lt_prog_compiler_pic_CXX=
21622 lt_prog_compiler_static_CXX='-non_shared'
21623 ;;
21624 *)
21625 ;;
21626 esac
21627 ;;
21628 psos*)
21629 ;;
21630 solaris*)
21631 case $cc_basename in
21632 CC* | sunCC*)
21633 # Sun C++ 4.2, 5.x and Centerline C++
21634 lt_prog_compiler_pic_CXX='-KPIC'
21635 lt_prog_compiler_static_CXX='-Bstatic'
21636 lt_prog_compiler_wl_CXX='-Qoption ld '
21637 ;;
21638 gcx*)
21639 # Green Hills C++ Compiler
21640 lt_prog_compiler_pic_CXX='-PIC'
21641 ;;
21642 *)
21643 ;;
21644 esac
21645 ;;
21646 sunos4*)
21647 case $cc_basename in
21648 CC*)
21649 # Sun C++ 4.x
21650 lt_prog_compiler_pic_CXX='-pic'
21651 lt_prog_compiler_static_CXX='-Bstatic'
21652 ;;
21653 lcc*)
21654 # Lucid
21655 lt_prog_compiler_pic_CXX='-pic'
21656 ;;
21657 *)
21658 ;;
21659 esac
21660 ;;
21661 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
21662 case $cc_basename in
21663 CC*)
21664 lt_prog_compiler_wl_CXX='-Wl,'
21665 lt_prog_compiler_pic_CXX='-KPIC'
21666 lt_prog_compiler_static_CXX='-Bstatic'
21667 ;;
21668 esac
21669 ;;
21670 tandem*)
21671 case $cc_basename in
21672 NCC*)
21673 # NonStop-UX NCC 3.20
21674 lt_prog_compiler_pic_CXX='-KPIC'
21675 ;;
21676 *)
21677 ;;
21678 esac
21679 ;;
21680 vxworks*)
21681 ;;
21682 *)
21683 lt_prog_compiler_can_build_shared_CXX=no
21684 ;;
21685 esac
21686 fi
21687
21688case $host_os in
21689 # For platforms that do not support PIC, -DPIC is meaningless:
21690 *djgpp*)
21691 lt_prog_compiler_pic_CXX=
21692 ;;
21693 *)
21694 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
21695 ;;
21696esac
21697
21698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
21699$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
21700if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
21701 $as_echo_n "(cached) " >&6
21702else
21703 lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
21704fi
21705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
21706$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
21707lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
21708
21709#
21710# Check to make sure the PIC flag actually works.
21711#
21712if test -n "$lt_prog_compiler_pic_CXX"; then
21713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
21714$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
21715if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
21716 $as_echo_n "(cached) " >&6
21717else
21718 lt_cv_prog_compiler_pic_works_CXX=no
21719 ac_outfile=conftest.$ac_objext
21720 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21721 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
21722 # Insert the option either (1) after the last *FLAGS variable, or
21723 # (2) before a word containing "conftest.", or (3) at the end.
21724 # Note that $ac_compile itself does not contain backslashes and begins
21725 # with a dollar sign (not a hyphen), so the echo should work correctly.
21726 # The option is referenced via a variable to avoid confusing sed.
21727 lt_compile=`echo "$ac_compile" | $SED \
21728 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
21729 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
21730 -e 's:$: $lt_compiler_flag:'`
21731 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
21732 (eval "$lt_compile" 2>conftest.err)
21733 ac_status=$?
21734 cat conftest.err >&5
21735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21736 if (exit $ac_status) && test -s "$ac_outfile"; then
21737 # The compiler can only warn and ignore the option if not recognized
21738 # So say no if there are warnings other than the usual output.
21739 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
21740 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21741 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
21742 lt_cv_prog_compiler_pic_works_CXX=yes
21743 fi
21744 fi
21745 $RM conftest*
21746
21747fi
21748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
21749$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
21750
21751if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
21752 case $lt_prog_compiler_pic_CXX in
21753 "" | " "*) ;;
21754 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
21755 esac
21756else
21757 lt_prog_compiler_pic_CXX=
21758 lt_prog_compiler_can_build_shared_CXX=no
21759fi
21760
21761fi
21762
21763
21764
21765
21766
21767#
21768# Check to make sure the static flag actually works.
21769#
21770wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
21771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
21772$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
21773if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
21774 $as_echo_n "(cached) " >&6
21775else
21776 lt_cv_prog_compiler_static_works_CXX=no
21777 save_LDFLAGS=$LDFLAGS
21778 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
21779 echo "$lt_simple_link_test_code" > conftest.$ac_ext
21780 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
21781 # The linker can only warn and ignore the option if not recognized
21782 # So say no if there are warnings
21783 if test -s conftest.err; then
21784 # Append any errors to the config.log.
21785 cat conftest.err 1>&5
21786 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
21787 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
21788 if diff conftest.exp conftest.er2 >/dev/null; then
21789 lt_cv_prog_compiler_static_works_CXX=yes
21790 fi
21791 else
21792 lt_cv_prog_compiler_static_works_CXX=yes
21793 fi
21794 fi
21795 $RM -r conftest*
21796 LDFLAGS=$save_LDFLAGS
21797
21798fi
21799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
21800$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
21801
21802if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
21803 :
21804else
21805 lt_prog_compiler_static_CXX=
21806fi
21807
21808
21809
21810
21811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
21812$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
21813if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
21814 $as_echo_n "(cached) " >&6
21815else
21816 lt_cv_prog_compiler_c_o_CXX=no
21817 $RM -r conftest 2>/dev/null
21818 mkdir conftest
21819 cd conftest
21820 mkdir out
21821 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21822
21823 lt_compiler_flag="-o out/conftest2.$ac_objext"
21824 # Insert the option either (1) after the last *FLAGS variable, or
21825 # (2) before a word containing "conftest.", or (3) at the end.
21826 # Note that $ac_compile itself does not contain backslashes and begins
21827 # with a dollar sign (not a hyphen), so the echo should work correctly.
21828 lt_compile=`echo "$ac_compile" | $SED \
21829 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
21830 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
21831 -e 's:$: $lt_compiler_flag:'`
21832 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
21833 (eval "$lt_compile" 2>out/conftest.err)
21834 ac_status=$?
21835 cat out/conftest.err >&5
21836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21837 if (exit $ac_status) && test -s out/conftest2.$ac_objext
21838 then
21839 # The compiler can only warn and ignore the option if not recognized
21840 # So say no if there are warnings
21841 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
21842 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
21843 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
21844 lt_cv_prog_compiler_c_o_CXX=yes
21845 fi
21846 fi
21847 chmod u+w . 2>&5
21848 $RM conftest*
21849 # SGI C++ compiler will create directory out/ii_files/ for
21850 # template instantiation
21851 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
21852 $RM out/* && rmdir out
21853 cd ..
21854 $RM -r conftest
21855 $RM conftest*
21856
21857fi
21858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
21859$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
21860
21861
21862
21863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
21864$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
21865if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
21866 $as_echo_n "(cached) " >&6
21867else
21868 lt_cv_prog_compiler_c_o_CXX=no
21869 $RM -r conftest 2>/dev/null
21870 mkdir conftest
21871 cd conftest
21872 mkdir out
21873 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21874
21875 lt_compiler_flag="-o out/conftest2.$ac_objext"
21876 # Insert the option either (1) after the last *FLAGS variable, or
21877 # (2) before a word containing "conftest.", or (3) at the end.
21878 # Note that $ac_compile itself does not contain backslashes and begins
21879 # with a dollar sign (not a hyphen), so the echo should work correctly.
21880 lt_compile=`echo "$ac_compile" | $SED \
21881 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
21882 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
21883 -e 's:$: $lt_compiler_flag:'`
21884 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
21885 (eval "$lt_compile" 2>out/conftest.err)
21886 ac_status=$?
21887 cat out/conftest.err >&5
21888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21889 if (exit $ac_status) && test -s out/conftest2.$ac_objext
21890 then
21891 # The compiler can only warn and ignore the option if not recognized
21892 # So say no if there are warnings
21893 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
21894 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
21895 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
21896 lt_cv_prog_compiler_c_o_CXX=yes
21897 fi
21898 fi
21899 chmod u+w . 2>&5
21900 $RM conftest*
21901 # SGI C++ compiler will create directory out/ii_files/ for
21902 # template instantiation
21903 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
21904 $RM out/* && rmdir out
21905 cd ..
21906 $RM -r conftest
21907 $RM conftest*
21908
21909fi
21910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
21911$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
21912
21913
21914
21915
21916hard_links=nottested
21917if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
21918 # do not overwrite the value of need_locks provided by the user
21919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
21920$as_echo_n "checking if we can lock with hard links... " >&6; }
21921 hard_links=yes
21922 $RM conftest*
21923 ln conftest.a conftest.b 2>/dev/null && hard_links=no
21924 touch conftest.a
21925 ln conftest.a conftest.b 2>&5 || hard_links=no
21926 ln conftest.a conftest.b 2>/dev/null && hard_links=no
21927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
21928$as_echo "$hard_links" >&6; }
21929 if test no = "$hard_links"; then
21930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
21931$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
21932 need_locks=warn
21933 fi
21934else
21935 need_locks=no
21936fi
21937
21938
21939
21940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
21941$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
21942
21943 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
21944 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
21945 case $host_os in
21946 aix[4-9]*)
21947 # If we're using GNU nm, then we don't want the "-C" option.
21948 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
21949 # Without the "-l" option, or with the "-B" option, AIX nm treats
21950 # weak defined symbols like other global defined symbols, whereas
21951 # GNU nm marks them as "W".
21952 # While the 'weak' keyword is ignored in the Export File, we need
21953 # it in the Import File for the 'aix-soname' feature, so we have
21954 # to replace the "-B" option with "-P" for AIX nm.
21955 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
21956 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
21957 else
21958 export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
21959 fi
21960 ;;
21961 pw32*)
21962 export_symbols_cmds_CXX=$ltdll_cmds
21963 ;;
21964 cygwin* | mingw* | cegcc*)
21965 case $cc_basename in
21966 cl*)
21967 exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
21968 ;;
21969 *)
21970 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
21971 exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
21972 ;;
21973 esac
21974 ;;
21975 *)
21976 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
21977 ;;
21978 esac
21979
21980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
21981$as_echo "$ld_shlibs_CXX" >&6; }
21982test no = "$ld_shlibs_CXX" && can_build_shared=no
21983
21984with_gnu_ld_CXX=$with_gnu_ld
21985
21986
21987
21988
21989
21990
21991#
21992# Do we need to explicitly link libc?
21993#
21994case "x$archive_cmds_need_lc_CXX" in
21995x|xyes)
21996 # Assume -lc should be added
21997 archive_cmds_need_lc_CXX=yes
21998
21999 if test yes,yes = "$GCC,$enable_shared"; then
22000 case $archive_cmds_CXX in
22001 *'~'*)
22002 # FIXME: we may have to deal with multi-command sequences.
22003 ;;
22004 '$CC '*)
22005 # Test whether the compiler implicitly links with -lc since on some
22006 # systems, -lgcc has to come before -lc. If gcc already passes -lc
22007 # to ld, don't add -lc before -lgcc.
22008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
22009$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
22010if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
22011 $as_echo_n "(cached) " >&6
22012else
22013 $RM conftest*
22014 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
22015
22016 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
22017 (eval $ac_compile) 2>&5
22018 ac_status=$?
22019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22020 test $ac_status = 0; } 2>conftest.err; then
22021 soname=conftest
22022 lib=conftest
22023 libobjs=conftest.$ac_objext
22024 deplibs=
22025 wl=$lt_prog_compiler_wl_CXX
22026 pic_flag=$lt_prog_compiler_pic_CXX
22027 compiler_flags=-v
22028 linker_flags=-v
22029 verstring=
22030 output_objdir=.
22031 libname=conftest
22032 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
22033 allow_undefined_flag_CXX=
22034 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
22035 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
22036 ac_status=$?
22037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22038 test $ac_status = 0; }
22039 then
22040 lt_cv_archive_cmds_need_lc_CXX=no
22041 else
22042 lt_cv_archive_cmds_need_lc_CXX=yes
22043 fi
22044 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
22045 else
22046 cat conftest.err 1>&5
22047 fi
22048 $RM conftest*
22049
22050fi
22051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
22052$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
22053 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
22054 ;;
22055 esac
22056 fi
22057 ;;
22058esac
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
22122$as_echo_n "checking dynamic linker characteristics... " >&6; }
22123
22124library_names_spec=
22125libname_spec='lib$name'
22126soname_spec=
22127shrext_cmds=.so
22128postinstall_cmds=
22129postuninstall_cmds=
22130finish_cmds=
22131finish_eval=
22132shlibpath_var=
22133shlibpath_overrides_runpath=unknown
22134version_type=none
22135dynamic_linker="$host_os ld.so"
22136sys_lib_dlsearch_path_spec="/lib /usr/lib"
22137need_lib_prefix=unknown
22138hardcode_into_libs=no
22139
22140# when you set need_version to no, make sure it does not cause -set_version
22141# flags to be left without arguments
22142need_version=unknown
22143
22144
22145
22146case $host_os in
22147aix3*)
22148 version_type=linux # correct to gnu/linux during the next big refactor
22149 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
22150 shlibpath_var=LIBPATH
22151
22152 # AIX 3 has no versioning support, so we append a major version to the name.
22153 soname_spec='$libname$release$shared_ext$major'
22154 ;;
22155
22156aix[4-9]*)
22157 version_type=linux # correct to gnu/linux during the next big refactor
22158 need_lib_prefix=no
22159 need_version=no
22160 hardcode_into_libs=yes
22161 if test ia64 = "$host_cpu"; then
22162 # AIX 5 supports IA64
22163 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
22164 shlibpath_var=LD_LIBRARY_PATH
22165 else
22166 # With GCC up to 2.95.x, collect2 would create an import file
22167 # for dependence libraries. The import file would start with
22168 # the line '#! .'. This would cause the generated library to
22169 # depend on '.', always an invalid library. This was fixed in
22170 # development snapshots of GCC prior to 3.0.
22171 case $host_os in
22172 aix4 | aix4.[01] | aix4.[01].*)
22173 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
22174 echo ' yes '
22175 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
22176 :
22177 else
22178 can_build_shared=no
22179 fi
22180 ;;
22181 esac
22182 # Using Import Files as archive members, it is possible to support
22183 # filename-based versioning of shared library archives on AIX. While
22184 # this would work for both with and without runtime linking, it will
22185 # prevent static linking of such archives. So we do filename-based
22186 # shared library versioning with .so extension only, which is used
22187 # when both runtime linking and shared linking is enabled.
22188 # Unfortunately, runtime linking may impact performance, so we do
22189 # not want this to be the default eventually. Also, we use the
22190 # versioned .so libs for executables only if there is the -brtl
22191 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
22192 # To allow for filename-based versioning support, we need to create
22193 # libNAME.so.V as an archive file, containing:
22194 # *) an Import File, referring to the versioned filename of the
22195 # archive as well as the shared archive member, telling the
22196 # bitwidth (32 or 64) of that shared object, and providing the
22197 # list of exported symbols of that shared object, eventually
22198 # decorated with the 'weak' keyword
22199 # *) the shared object with the F_LOADONLY flag set, to really avoid
22200 # it being seen by the linker.
22201 # At run time we better use the real file rather than another symlink,
22202 # but for link time we create the symlink libNAME.so -> libNAME.so.V
22203
22204 case $with_aix_soname,$aix_use_runtimelinking in
22205 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
22206 # soname into executable. Probably we can add versioning support to
22207 # collect2, so additional links can be useful in future.
22208 aix,yes) # traditional libtool
22209 dynamic_linker='AIX unversionable lib.so'
22210 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
22211 # instead of lib<name>.a to let people know that these are not
22212 # typical AIX shared libraries.
22213 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22214 ;;
22215 aix,no) # traditional AIX only
22216 dynamic_linker='AIX lib.a(lib.so.V)'
22217 # We preserve .a as extension for shared libraries through AIX4.2
22218 # and later when we are not doing run time linking.
22219 library_names_spec='$libname$release.a $libname.a'
22220 soname_spec='$libname$release$shared_ext$major'
22221 ;;
22222 svr4,*) # full svr4 only
22223 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
22224 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
22225 # We do not specify a path in Import Files, so LIBPATH fires.
22226 shlibpath_overrides_runpath=yes
22227 ;;
22228 *,yes) # both, prefer svr4
22229 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
22230 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
22231 # unpreferred sharedlib libNAME.a needs extra handling
22232 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
22233 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
22234 # We do not specify a path in Import Files, so LIBPATH fires.
22235 shlibpath_overrides_runpath=yes
22236 ;;
22237 *,no) # both, prefer aix
22238 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
22239 library_names_spec='$libname$release.a $libname.a'
22240 soname_spec='$libname$release$shared_ext$major'
22241 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
22242 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
22243 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
22244 ;;
22245 esac
22246 shlibpath_var=LIBPATH
22247 fi
22248 ;;
22249
22250amigaos*)
22251 case $host_cpu in
22252 powerpc)
22253 # Since July 2007 AmigaOS4 officially supports .so libraries.
22254 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
22255 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22256 ;;
22257 m68k)
22258 library_names_spec='$libname.ixlibrary $libname.a'
22259 # Create ${libname}_ixlibrary.a entries in /sys/libs.
22260 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
22261 ;;
22262 esac
22263 ;;
22264
22265beos*)
22266 library_names_spec='$libname$shared_ext'
22267 dynamic_linker="$host_os ld.so"
22268 shlibpath_var=LIBRARY_PATH
22269 ;;
22270
22271bsdi[45]*)
22272 version_type=linux # correct to gnu/linux during the next big refactor
22273 need_version=no
22274 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22275 soname_spec='$libname$release$shared_ext$major'
22276 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
22277 shlibpath_var=LD_LIBRARY_PATH
22278 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
22279 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
22280 # the default ld.so.conf also contains /usr/contrib/lib and
22281 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
22282 # libtool to hard-code these into programs
22283 ;;
22284
22285cygwin* | mingw* | pw32* | cegcc*)
22286 version_type=windows
22287 shrext_cmds=.dll
22288 need_version=no
22289 need_lib_prefix=no
22290
22291 case $GCC,$cc_basename in
22292 yes,*)
22293 # gcc
22294 library_names_spec='$libname.dll.a'
22295 # DLL is installed to $(libdir)/../bin by postinstall_cmds
22296 postinstall_cmds='base_file=`basename \$file`~
22297 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
22298 dldir=$destdir/`dirname \$dlpath`~
22299 test -d \$dldir || mkdir -p \$dldir~
22300 $install_prog $dir/$dlname \$dldir/$dlname~
22301 chmod a+x \$dldir/$dlname~
22302 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
22303 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
22304 fi'
22305 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
22306 dlpath=$dir/\$dldll~
22307 $RM \$dlpath'
22308 shlibpath_overrides_runpath=yes
22309
22310 case $host_os in
22311 cygwin*)
22312 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
22313 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
22314
22315 ;;
22316 mingw* | cegcc*)
22317 # MinGW DLLs use traditional 'lib' prefix
22318 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
22319 ;;
22320 pw32*)
22321 # pw32 DLLs use 'pw' prefix rather than 'lib'
22322 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
22323 ;;
22324 esac
22325 dynamic_linker='Win32 ld.exe'
22326 ;;
22327
22328 *,cl*)
22329 # Native MSVC
22330 libname_spec='$name'
22331 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
22332 library_names_spec='$libname.dll.lib'
22333
22334 case $build_os in
22335 mingw*)
22336 sys_lib_search_path_spec=
22337 lt_save_ifs=$IFS
22338 IFS=';'
22339 for lt_path in $LIB
22340 do
22341 IFS=$lt_save_ifs
22342 # Let DOS variable expansion print the short 8.3 style file name.
22343 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
22344 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
22345 done
22346 IFS=$lt_save_ifs
22347 # Convert to MSYS style.
22348 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
22349 ;;
22350 cygwin*)
22351 # Convert to unix form, then to dos form, then back to unix form
22352 # but this time dos style (no spaces!) so that the unix form looks
22353 # like /cygdrive/c/PROGRA~1:/cygdr...
22354 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
22355 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
22356 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
22357 ;;
22358 *)
22359 sys_lib_search_path_spec=$LIB
22360 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
22361 # It is most probably a Windows format PATH.
22362 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
22363 else
22364 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
22365 fi
22366 # FIXME: find the short name or the path components, as spaces are
22367 # common. (e.g. "Program Files" -> "PROGRA~1")
22368 ;;
22369 esac
22370
22371 # DLL is installed to $(libdir)/../bin by postinstall_cmds
22372 postinstall_cmds='base_file=`basename \$file`~
22373 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
22374 dldir=$destdir/`dirname \$dlpath`~
22375 test -d \$dldir || mkdir -p \$dldir~
22376 $install_prog $dir/$dlname \$dldir/$dlname'
22377 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
22378 dlpath=$dir/\$dldll~
22379 $RM \$dlpath'
22380 shlibpath_overrides_runpath=yes
22381 dynamic_linker='Win32 link.exe'
22382 ;;
22383
22384 *)
22385 # Assume MSVC wrapper
22386 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
22387 dynamic_linker='Win32 ld.exe'
22388 ;;
22389 esac
22390 # FIXME: first we should search . and the directory the executable is in
22391 shlibpath_var=PATH
22392 ;;
22393
22394darwin* | rhapsody*)
22395 dynamic_linker="$host_os dyld"
22396 version_type=darwin
22397 need_lib_prefix=no
22398 need_version=no
22399 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
22400 soname_spec='$libname$release$major$shared_ext'
22401 shlibpath_overrides_runpath=yes
22402 shlibpath_var=DYLD_LIBRARY_PATH
22403 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
22404
22405 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
22406 ;;
22407
22408dgux*)
22409 version_type=linux # correct to gnu/linux during the next big refactor
22410 need_lib_prefix=no
22411 need_version=no
22412 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22413 soname_spec='$libname$release$shared_ext$major'
22414 shlibpath_var=LD_LIBRARY_PATH
22415 ;;
22416
22417freebsd* | dragonfly*)
22418 # DragonFly does not have aout. When/if they implement a new
22419 # versioning mechanism, adjust this.
22420 if test -x /usr/bin/objformat; then
22421 objformat=`/usr/bin/objformat`
22422 else
22423 case $host_os in
22424 freebsd[23].*) objformat=aout ;;
22425 *) objformat=elf ;;
22426 esac
22427 fi
22428 version_type=freebsd-$objformat
22429 case $version_type in
22430 freebsd-elf*)
22431 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22432 soname_spec='$libname$release$shared_ext$major'
22433 need_version=no
22434 need_lib_prefix=no
22435 ;;
22436 freebsd-*)
22437 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
22438 need_version=yes
22439 ;;
22440 esac
22441 shlibpath_var=LD_LIBRARY_PATH
22442 case $host_os in
22443 freebsd2.*)
22444 shlibpath_overrides_runpath=yes
22445 ;;
22446 freebsd3.[01]* | freebsdelf3.[01]*)
22447 shlibpath_overrides_runpath=yes
22448 hardcode_into_libs=yes
22449 ;;
22450 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
22451 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
22452 shlibpath_overrides_runpath=no
22453 hardcode_into_libs=yes
22454 ;;
22455 *) # from 4.6 on, and DragonFly
22456 shlibpath_overrides_runpath=yes
22457 hardcode_into_libs=yes
22458 ;;
22459 esac
22460 ;;
22461
22462haiku*)
22463 version_type=linux # correct to gnu/linux during the next big refactor
22464 need_lib_prefix=no
22465 need_version=no
22466 dynamic_linker="$host_os runtime_loader"
22467 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22468 soname_spec='$libname$release$shared_ext$major'
22469 shlibpath_var=LIBRARY_PATH
22470 shlibpath_overrides_runpath=no
22471 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
22472 hardcode_into_libs=yes
22473 ;;
22474
22475hpux9* | hpux10* | hpux11*)
22476 # Give a soname corresponding to the major version so that dld.sl refuses to
22477 # link against other versions.
22478 version_type=sunos
22479 need_lib_prefix=no
22480 need_version=no
22481 case $host_cpu in
22482 ia64*)
22483 shrext_cmds='.so'
22484 hardcode_into_libs=yes
22485 dynamic_linker="$host_os dld.so"
22486 shlibpath_var=LD_LIBRARY_PATH
22487 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22488 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22489 soname_spec='$libname$release$shared_ext$major'
22490 if test 32 = "$HPUX_IA64_MODE"; then
22491 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
22492 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
22493 else
22494 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
22495 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
22496 fi
22497 ;;
22498 hppa*64*)
22499 shrext_cmds='.sl'
22500 hardcode_into_libs=yes
22501 dynamic_linker="$host_os dld.sl"
22502 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
22503 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
22504 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22505 soname_spec='$libname$release$shared_ext$major'
22506 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
22507 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22508 ;;
22509 *)
22510 shrext_cmds='.sl'
22511 dynamic_linker="$host_os dld.sl"
22512 shlibpath_var=SHLIB_PATH
22513 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
22514 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22515 soname_spec='$libname$release$shared_ext$major'
22516 ;;
22517 esac
22518 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
22519 postinstall_cmds='chmod 555 $lib'
22520 # or fails outright, so override atomically:
22521 install_override_mode=555
22522 ;;
22523
22524interix[3-9]*)
22525 version_type=linux # correct to gnu/linux during the next big refactor
22526 need_lib_prefix=no
22527 need_version=no
22528 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22529 soname_spec='$libname$release$shared_ext$major'
22530 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
22531 shlibpath_var=LD_LIBRARY_PATH
22532 shlibpath_overrides_runpath=no
22533 hardcode_into_libs=yes
22534 ;;
22535
22536irix5* | irix6* | nonstopux*)
22537 case $host_os in
22538 nonstopux*) version_type=nonstopux ;;
22539 *)
22540 if test yes = "$lt_cv_prog_gnu_ld"; then
22541 version_type=linux # correct to gnu/linux during the next big refactor
22542 else
22543 version_type=irix
22544 fi ;;
22545 esac
22546 need_lib_prefix=no
22547 need_version=no
22548 soname_spec='$libname$release$shared_ext$major'
22549 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
22550 case $host_os in
22551 irix5* | nonstopux*)
22552 libsuff= shlibsuff=
22553 ;;
22554 *)
22555 case $LD in # libtool.m4 will add one of these switches to LD
22556 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
22557 libsuff= shlibsuff= libmagic=32-bit;;
22558 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
22559 libsuff=32 shlibsuff=N32 libmagic=N32;;
22560 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
22561 libsuff=64 shlibsuff=64 libmagic=64-bit;;
22562 *) libsuff= shlibsuff= libmagic=never-match;;
22563 esac
22564 ;;
22565 esac
22566 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
22567 shlibpath_overrides_runpath=no
22568 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
22569 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
22570 hardcode_into_libs=yes
22571 ;;
22572
22573# No shared lib support for Linux oldld, aout, or coff.
22574linux*oldld* | linux*aout* | linux*coff*)
22575 dynamic_linker=no
22576 ;;
22577
22578linux*android*)
22579 version_type=none # Android doesn't support versioned libraries.
22580 need_lib_prefix=no
22581 need_version=no
22582 library_names_spec='$libname$release$shared_ext'
22583 soname_spec='$libname$release$shared_ext'
22584 finish_cmds=
22585 shlibpath_var=LD_LIBRARY_PATH
22586 shlibpath_overrides_runpath=yes
22587
22588 # This implies no fast_install, which is unacceptable.
22589 # Some rework will be needed to allow for fast_install
22590 # before this can be enabled.
22591 hardcode_into_libs=yes
22592
22593 dynamic_linker='Android linker'
22594 # Don't embed -rpath directories since the linker doesn't support them.
22595 hardcode_libdir_flag_spec_CXX='-L$libdir'
22596 ;;
22597
22598# This must be glibc/ELF.
22599linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
22600 version_type=linux # correct to gnu/linux during the next big refactor
22601 need_lib_prefix=no
22602 need_version=no
22603 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22604 soname_spec='$libname$release$shared_ext$major'
22605 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
22606 shlibpath_var=LD_LIBRARY_PATH
22607 shlibpath_overrides_runpath=no
22608
22609 # Some binutils ld are patched to set DT_RUNPATH
22610 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
22611 $as_echo_n "(cached) " >&6
22612else
22613 lt_cv_shlibpath_overrides_runpath=no
22614 save_LDFLAGS=$LDFLAGS
22615 save_libdir=$libdir
22616 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
22617 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
22618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22619/* end confdefs.h. */
22620
22621int
22622main ()
22623{
22624
22625 ;
22626 return 0;
22627}
22628_ACEOF
22629if ac_fn_cxx_try_link "$LINENO"; then :
22630 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
22631 lt_cv_shlibpath_overrides_runpath=yes
22632fi
22633fi
22634rm -f core conftest.err conftest.$ac_objext \
22635 conftest$ac_exeext conftest.$ac_ext
22636 LDFLAGS=$save_LDFLAGS
22637 libdir=$save_libdir
22638
22639fi
22640
22641 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
22642
22643 # This implies no fast_install, which is unacceptable.
22644 # Some rework will be needed to allow for fast_install
22645 # before this can be enabled.
22646 hardcode_into_libs=yes
22647
22648 # Ideally, we could use ldconfig to report *all* directores which are
22649 # searched for libraries, however this is still not possible. Aside from not
22650 # being certain /sbin/ldconfig is available, command
22651 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
22652 # even though it is searched at run-time. Try to do the best guess by
22653 # appending ld.so.conf contents (and includes) to the search path.
22654 if test -f /etc/ld.so.conf; then
22655 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
22656 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
22657 fi
22658
22659 # We used to test for /lib/ld.so.1 and disable shared libraries on
22660 # powerpc, because MkLinux only supported shared libraries with the
22661 # GNU dynamic linker. Since this was broken with cross compilers,
22662 # most powerpc-linux boxes support dynamic linking these days and
22663 # people can always --disable-shared, the test was removed, and we
22664 # assume the GNU/Linux dynamic linker is in use.
22665 dynamic_linker='GNU/Linux ld.so'
22666 ;;
22667
22668netbsd*)
22669 version_type=sunos
22670 need_lib_prefix=no
22671 need_version=no
22672 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
22673 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
22674 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22675 dynamic_linker='NetBSD (a.out) ld.so'
22676 else
22677 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22678 soname_spec='$libname$release$shared_ext$major'
22679 dynamic_linker='NetBSD ld.elf_so'
22680 fi
22681 shlibpath_var=LD_LIBRARY_PATH
22682 shlibpath_overrides_runpath=yes
22683 hardcode_into_libs=yes
22684 ;;
22685
22686newsos6)
22687 version_type=linux # correct to gnu/linux during the next big refactor
22688 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22689 shlibpath_var=LD_LIBRARY_PATH
22690 shlibpath_overrides_runpath=yes
22691 ;;
22692
22693*nto* | *qnx*)
22694 version_type=qnx
22695 need_lib_prefix=no
22696 need_version=no
22697 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22698 soname_spec='$libname$release$shared_ext$major'
22699 shlibpath_var=LD_LIBRARY_PATH
22700 shlibpath_overrides_runpath=no
22701 hardcode_into_libs=yes
22702 dynamic_linker='ldqnx.so'
22703 ;;
22704
22705openbsd* | bitrig*)
22706 version_type=sunos
22707 sys_lib_dlsearch_path_spec=/usr/lib
22708 need_lib_prefix=no
22709 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
22710 need_version=no
22711 else
22712 need_version=yes
22713 fi
22714 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
22715 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
22716 shlibpath_var=LD_LIBRARY_PATH
22717 shlibpath_overrides_runpath=yes
22718 ;;
22719
22720os2*)
22721 libname_spec='$name'
22722 version_type=windows
22723 shrext_cmds=.dll
22724 need_version=no
22725 need_lib_prefix=no
22726 # OS/2 can only load a DLL with a base name of 8 characters or less.
22727 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
22728 v=$($ECHO $release$versuffix | tr -d .-);
22729 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
22730 $ECHO $n$v`$shared_ext'
22731 library_names_spec='${libname}_dll.$libext'
22732 dynamic_linker='OS/2 ld.exe'
22733 shlibpath_var=BEGINLIBPATH
22734 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
22735 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22736 postinstall_cmds='base_file=`basename \$file`~
22737 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
22738 dldir=$destdir/`dirname \$dlpath`~
22739 test -d \$dldir || mkdir -p \$dldir~
22740 $install_prog $dir/$dlname \$dldir/$dlname~
22741 chmod a+x \$dldir/$dlname~
22742 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
22743 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
22744 fi'
22745 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
22746 dlpath=$dir/\$dldll~
22747 $RM \$dlpath'
22748 ;;
22749
22750osf3* | osf4* | osf5*)
22751 version_type=osf
22752 need_lib_prefix=no
22753 need_version=no
22754 soname_spec='$libname$release$shared_ext$major'
22755 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22756 shlibpath_var=LD_LIBRARY_PATH
22757 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
22758 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
22759 ;;
22760
22761rdos*)
22762 dynamic_linker=no
22763 ;;
22764
22765solaris*)
22766 version_type=linux # correct to gnu/linux during the next big refactor
22767 need_lib_prefix=no
22768 need_version=no
22769 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22770 soname_spec='$libname$release$shared_ext$major'
22771 shlibpath_var=LD_LIBRARY_PATH
22772 shlibpath_overrides_runpath=yes
22773 hardcode_into_libs=yes
22774 # ldd complains unless libraries are executable
22775 postinstall_cmds='chmod +x $lib'
22776 ;;
22777
22778sunos4*)
22779 version_type=sunos
22780 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
22781 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
22782 shlibpath_var=LD_LIBRARY_PATH
22783 shlibpath_overrides_runpath=yes
22784 if test yes = "$with_gnu_ld"; then
22785 need_lib_prefix=no
22786 fi
22787 need_version=yes
22788 ;;
22789
22790sysv4 | sysv4.3*)
22791 version_type=linux # correct to gnu/linux during the next big refactor
22792 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22793 soname_spec='$libname$release$shared_ext$major'
22794 shlibpath_var=LD_LIBRARY_PATH
22795 case $host_vendor in
22796 sni)
22797 shlibpath_overrides_runpath=no
22798 need_lib_prefix=no
22799 runpath_var=LD_RUN_PATH
22800 ;;
22801 siemens)
22802 need_lib_prefix=no
22803 ;;
22804 motorola)
22805 need_lib_prefix=no
22806 need_version=no
22807 shlibpath_overrides_runpath=no
22808 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
22809 ;;
22810 esac
22811 ;;
22812
22813sysv4*MP*)
22814 if test -d /usr/nec; then
22815 version_type=linux # correct to gnu/linux during the next big refactor
22816 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
22817 soname_spec='$libname$shared_ext.$major'
22818 shlibpath_var=LD_LIBRARY_PATH
22819 fi
22820 ;;
22821
22822sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
22823 version_type=sco
22824 need_lib_prefix=no
22825 need_version=no
22826 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
22827 soname_spec='$libname$release$shared_ext$major'
22828 shlibpath_var=LD_LIBRARY_PATH
22829 shlibpath_overrides_runpath=yes
22830 hardcode_into_libs=yes
22831 if test yes = "$with_gnu_ld"; then
22832 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
22833 else
22834 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
22835 case $host_os in
22836 sco3.2v5*)
22837 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
22838 ;;
22839 esac
22840 fi
22841 sys_lib_dlsearch_path_spec='/usr/lib'
22842 ;;
22843
22844tpf*)
22845 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
22846 version_type=linux # correct to gnu/linux during the next big refactor
22847 need_lib_prefix=no
22848 need_version=no
22849 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22850 shlibpath_var=LD_LIBRARY_PATH
22851 shlibpath_overrides_runpath=no
22852 hardcode_into_libs=yes
22853 ;;
22854
22855uts4*)
22856 version_type=linux # correct to gnu/linux during the next big refactor
22857 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22858 soname_spec='$libname$release$shared_ext$major'
22859 shlibpath_var=LD_LIBRARY_PATH
22860 ;;
22861
22862*)
22863 dynamic_linker=no
22864 ;;
22865esac
22866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
22867$as_echo "$dynamic_linker" >&6; }
22868test no = "$dynamic_linker" && can_build_shared=no
22869
22870variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
22871if test yes = "$GCC"; then
22872 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
22873fi
22874
22875if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
22876 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
22877fi
22878
22879if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
22880 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
22881fi
22882
22883# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
22884configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
22885
22886# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
22887func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
22888
22889# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
22890configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
22932$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
22933hardcode_action_CXX=
22934if test -n "$hardcode_libdir_flag_spec_CXX" ||
22935 test -n "$runpath_var_CXX" ||
22936 test yes = "$hardcode_automatic_CXX"; then
22937
22938 # We can hardcode non-existent directories.
22939 if test no != "$hardcode_direct_CXX" &&
22940 # If the only mechanism to avoid hardcoding is shlibpath_var, we
22941 # have to relink, otherwise we might link with an installed library
22942 # when we should be linking with a yet-to-be-installed one
22943 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
22944 test no != "$hardcode_minus_L_CXX"; then
22945 # Linking always hardcodes the temporary library directory.
22946 hardcode_action_CXX=relink
22947 else
22948 # We can link without hardcoding, and we can hardcode nonexisting dirs.
22949 hardcode_action_CXX=immediate
22950 fi
22951else
22952 # We cannot hardcode anything, or else we can only hardcode existing
22953 # directories.
22954 hardcode_action_CXX=unsupported
22955fi
22956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
22957$as_echo "$hardcode_action_CXX" >&6; }
22958
22959if test relink = "$hardcode_action_CXX" ||
22960 test yes = "$inherit_rpath_CXX"; then
22961 # Fast installation is not supported
22962 enable_fast_install=no
22963elif test yes = "$shlibpath_overrides_runpath" ||
22964 test no = "$enable_shared"; then
22965 # Fast installation is not necessary
22966 enable_fast_install=needless
22967fi
22968
22969
22970
22971
22972
22973
22974
22975 fi # test -n "$compiler"
22976
22977 CC=$lt_save_CC
22978 CFLAGS=$lt_save_CFLAGS
22979 LDCXX=$LD
22980 LD=$lt_save_LD
22981 GCC=$lt_save_GCC
22982 with_gnu_ld=$lt_save_with_gnu_ld
22983 lt_cv_path_LDCXX=$lt_cv_path_LD
22984 lt_cv_path_LD=$lt_save_path_LD
22985 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
22986 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
22987fi # test yes != "$_lt_caught_CXX_error"
22988
22989ac_ext=c
22990ac_cpp='$CPP $CPPFLAGS'
22991ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22992ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22993ac_compiler_gnu=$ac_cv_c_compiler_gnu
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009 ac_config_commands="$ac_config_commands libtool"
23010
23011
23012
23013
23014# Only expand once:
23015
23016
23017
23018# Generate an error here if attempting to build both shared and static when
23019# $libname.a is in $library_names_spec (as mentioned above), rather than
23020# wait for ar or ld to fail.
23021#
23022if test "$enable_shared" = yes && test "$enable_static" = yes; then
23023 case $library_names_spec in
23024 *libname.a*)
23025 as_fn_error $? "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5
23026 ;;
23027 esac
23028fi
23029
23030 if test "$enable_static" = yes; then
23031 ENABLE_STATIC_TRUE=
23032 ENABLE_STATIC_FALSE='#'
23033else
23034 ENABLE_STATIC_TRUE='#'
23035 ENABLE_STATIC_FALSE=
23036fi
23037
23038
23039
23040# Many of these library and header checks are for the benefit of
23041# supplementary programs. libgmp doesn't use anything too weird.
23042
23043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
23044$as_echo_n "checking for ANSI C header files... " >&6; }
23045if ${ac_cv_header_stdc+:} false; then :
23046 $as_echo_n "(cached) " >&6
23047else
23048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23049/* end confdefs.h. */
23050#include <stdlib.h>
23051#include <stdarg.h>
23052#include <string.h>
23053#include <float.h>
23054
23055int
23056main ()
23057{
23058
23059 ;
23060 return 0;
23061}
23062_ACEOF
23063if ac_fn_c_try_compile "$LINENO"; then :
23064 ac_cv_header_stdc=yes
23065else
23066 ac_cv_header_stdc=no
23067fi
23068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23069
23070if test $ac_cv_header_stdc = yes; then
23071 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
23072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23073/* end confdefs.h. */
23074#include <string.h>
23075
23076_ACEOF
23077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23078 $EGREP "memchr" >/dev/null 2>&1; then :
23079
23080else
23081 ac_cv_header_stdc=no
23082fi
23083rm -f conftest*
23084
23085fi
23086
23087if test $ac_cv_header_stdc = yes; then
23088 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
23089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23090/* end confdefs.h. */
23091#include <stdlib.h>
23092
23093_ACEOF
23094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23095 $EGREP "free" >/dev/null 2>&1; then :
23096
23097else
23098 ac_cv_header_stdc=no
23099fi
23100rm -f conftest*
23101
23102fi
23103
23104if test $ac_cv_header_stdc = yes; then
23105 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
23106 if test "$cross_compiling" = yes; then :
23107 :
23108else
23109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23110/* end confdefs.h. */
23111#include <ctype.h>
23112#include <stdlib.h>
23113#if ((' ' & 0x0FF) == 0x020)
23114# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
23115# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
23116#else
23117# define ISLOWER(c) \
23118 (('a' <= (c) && (c) <= 'i') \
23119 || ('j' <= (c) && (c) <= 'r') \
23120 || ('s' <= (c) && (c) <= 'z'))
23121# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
23122#endif
23123
23124#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
23125int
23126main ()
23127{
23128 int i;
23129 for (i = 0; i < 256; i++)
23130 if (XOR (islower (i), ISLOWER (i))
23131 || toupper (i) != TOUPPER (i))
23132 return 2;
23133 return 0;
23134}
23135_ACEOF
23136if ac_fn_c_try_run "$LINENO"; then :
23137
23138else
23139 ac_cv_header_stdc=no
23140fi
23141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23142 conftest.$ac_objext conftest.beam conftest.$ac_ext
23143fi
23144
23145fi
23146fi
23147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
23148$as_echo "$ac_cv_header_stdc" >&6; }
23149if test $ac_cv_header_stdc = yes; then
23150
23151$as_echo "#define STDC_HEADERS 1" >>confdefs.h
23152
23153fi
23154
23155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
23156$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
23157if ${ac_cv_header_time+:} false; then :
23158 $as_echo_n "(cached) " >&6
23159else
23160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23161/* end confdefs.h. */
23162#include <sys/types.h>
23163#include <sys/time.h>
23164#include <time.h>
23165
23166int
23167main ()
23168{
23169if ((struct tm *) 0)
23170return 0;
23171 ;
23172 return 0;
23173}
23174_ACEOF
23175if ac_fn_c_try_compile "$LINENO"; then :
23176 ac_cv_header_time=yes
23177else
23178 ac_cv_header_time=no
23179fi
23180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23181fi
23182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
23183$as_echo "$ac_cv_header_time" >&6; }
23184if test $ac_cv_header_time = yes; then
23185
23186$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
23187
23188fi
23189
23190
23191# Reasons for testing:
23192# float.h - not in SunOS bundled cc
23193# invent.h - IRIX specific
23194# langinfo.h - X/Open standard only, not in djgpp for instance
23195# locale.h - old systems won't have this
23196# nl_types.h - X/Open standard only, not in djgpp for instance
23197# (usually langinfo.h gives nl_item etc, but not on netbsd 1.4.1)
23198# sys/attributes.h - IRIX specific
23199# sys/iograph.h - IRIX specific
23200# sys/mman.h - not in Cray Unicos
23201# sys/param.h - not in mingw
23202# sys/processor.h - solaris specific, though also present in macos
23203# sys/pstat.h - HPUX specific
23204# sys/resource.h - not in mingw
23205# sys/sysctl.h - not in mingw
23206# sys/sysinfo.h - OSF specific
23207# sys/syssgi.h - IRIX specific
23208# sys/systemcfg.h - AIX specific
23209# sys/time.h - autoconf suggests testing, don't know anywhere without it
23210# sys/times.h - not in mingw
23211# machine/hal_sysinfo.h - OSF specific
23212#
23213# inttypes.h, stdint.h, unistd.h and sys/types.h are already in the autoconf
23214# default tests
23215#
23216for ac_header in fcntl.h float.h invent.h langinfo.h locale.h nl_types.h sys/attributes.h sys/iograph.h sys/mman.h sys/param.h sys/processor.h sys/pstat.h sys/sysinfo.h sys/syssgi.h sys/systemcfg.h sys/time.h sys/times.h
23217do :
23218 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23219ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23220if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23221 cat >>confdefs.h <<_ACEOF
23222#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23223_ACEOF
23224
23225fi
23226
23227done
23228
23229
23230# On SunOS, sys/resource.h needs sys/time.h (for struct timeval)
23231for ac_header in sys/resource.h
23232do :
23233 ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "#if TIME_WITH_SYS_TIME
23234# include <sys/time.h>
23235# include <time.h>
23236#else
23237# if HAVE_SYS_TIME_H
23238# include <sys/time.h>
23239# else
23240# include <time.h>
23241# endif
23242#endif
23243"
23244if test "x$ac_cv_header_sys_resource_h" = xyes; then :
23245 cat >>confdefs.h <<_ACEOF
23246#define HAVE_SYS_RESOURCE_H 1
23247_ACEOF
23248
23249fi
23250
23251done
23252
23253
23254# On NetBSD and OpenBSD, sys/sysctl.h needs sys/param.h for various constants
23255for ac_header in sys/sysctl.h
23256do :
23257 ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if HAVE_SYS_PARAM_H
23258# include <sys/param.h>
23259#endif
23260"
23261if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
23262 cat >>confdefs.h <<_ACEOF
23263#define HAVE_SYS_SYSCTL_H 1
23264_ACEOF
23265
23266fi
23267
23268done
23269
23270
23271# On OSF 4.0, <machine/hal_sysinfo.h> must have <sys/sysinfo.h> for ulong_t
23272for ac_header in machine/hal_sysinfo.h
23273do :
23274 ac_fn_c_check_header_compile "$LINENO" "machine/hal_sysinfo.h" "ac_cv_header_machine_hal_sysinfo_h" "#if HAVE_SYS_SYSINFO_H
23275# include <sys/sysinfo.h>
23276#endif
23277"
23278if test "x$ac_cv_header_machine_hal_sysinfo_h" = xyes; then :
23279 cat >>confdefs.h <<_ACEOF
23280#define HAVE_MACHINE_HAL_SYSINFO_H 1
23281_ACEOF
23282
23283fi
23284
23285done
23286
23287
23288# Reasons for testing:
23289# optarg - not declared in mingw
23290# fgetc, fscanf, ungetc, vfprintf - not declared in SunOS 4
23291# sys_errlist, sys_nerr - not declared in SunOS 4
23292#
23293# optarg should be in unistd.h and the rest in stdio.h, both of which are
23294# in the autoconf default includes.
23295#
23296# sys_errlist and sys_nerr are supposed to be in <errno.h> on SunOS according
23297# to the man page (but aren't), in glibc they're in stdio.h.
23298#
23299ac_fn_c_check_decl "$LINENO" "fgetc" "ac_cv_have_decl_fgetc" "$ac_includes_default"
23300if test "x$ac_cv_have_decl_fgetc" = xyes; then :
23301 ac_have_decl=1
23302else
23303 ac_have_decl=0
23304fi
23305
23306cat >>confdefs.h <<_ACEOF
23307#define HAVE_DECL_FGETC $ac_have_decl
23308_ACEOF
23309ac_fn_c_check_decl "$LINENO" "fscanf" "ac_cv_have_decl_fscanf" "$ac_includes_default"
23310if test "x$ac_cv_have_decl_fscanf" = xyes; then :
23311 ac_have_decl=1
23312else
23313 ac_have_decl=0
23314fi
23315
23316cat >>confdefs.h <<_ACEOF
23317#define HAVE_DECL_FSCANF $ac_have_decl
23318_ACEOF
23319ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default"
23320if test "x$ac_cv_have_decl_optarg" = xyes; then :
23321 ac_have_decl=1
23322else
23323 ac_have_decl=0
23324fi
23325
23326cat >>confdefs.h <<_ACEOF
23327#define HAVE_DECL_OPTARG $ac_have_decl
23328_ACEOF
23329ac_fn_c_check_decl "$LINENO" "ungetc" "ac_cv_have_decl_ungetc" "$ac_includes_default"
23330if test "x$ac_cv_have_decl_ungetc" = xyes; then :
23331 ac_have_decl=1
23332else
23333 ac_have_decl=0
23334fi
23335
23336cat >>confdefs.h <<_ACEOF
23337#define HAVE_DECL_UNGETC $ac_have_decl
23338_ACEOF
23339ac_fn_c_check_decl "$LINENO" "vfprintf" "ac_cv_have_decl_vfprintf" "$ac_includes_default"
23340if test "x$ac_cv_have_decl_vfprintf" = xyes; then :
23341 ac_have_decl=1
23342else
23343 ac_have_decl=0
23344fi
23345
23346cat >>confdefs.h <<_ACEOF
23347#define HAVE_DECL_VFPRINTF $ac_have_decl
23348_ACEOF
23349
23350ac_fn_c_check_decl "$LINENO" "sys_errlist" "ac_cv_have_decl_sys_errlist" "#include <stdio.h>
23351#include <errno.h>
23352"
23353if test "x$ac_cv_have_decl_sys_errlist" = xyes; then :
23354 ac_have_decl=1
23355else
23356 ac_have_decl=0
23357fi
23358
23359cat >>confdefs.h <<_ACEOF
23360#define HAVE_DECL_SYS_ERRLIST $ac_have_decl
23361_ACEOF
23362ac_fn_c_check_decl "$LINENO" "sys_nerr" "ac_cv_have_decl_sys_nerr" "#include <stdio.h>
23363#include <errno.h>
23364"
23365if test "x$ac_cv_have_decl_sys_nerr" = xyes; then :
23366 ac_have_decl=1
23367else
23368 ac_have_decl=0
23369fi
23370
23371cat >>confdefs.h <<_ACEOF
23372#define HAVE_DECL_SYS_NERR $ac_have_decl
23373_ACEOF
23374
23375
23376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
23377$as_echo_n "checking return type of signal handlers... " >&6; }
23378if ${ac_cv_type_signal+:} false; then :
23379 $as_echo_n "(cached) " >&6
23380else
23381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23382/* end confdefs.h. */
23383#include <sys/types.h>
23384#include <signal.h>
23385
23386int
23387main ()
23388{
23389return *(signal (0, 0)) (0) == 1;
23390 ;
23391 return 0;
23392}
23393_ACEOF
23394if ac_fn_c_try_compile "$LINENO"; then :
23395 ac_cv_type_signal=int
23396else
23397 ac_cv_type_signal=void
23398fi
23399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23400fi
23401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
23402$as_echo "$ac_cv_type_signal" >&6; }
23403
23404cat >>confdefs.h <<_ACEOF
23405#define RETSIGTYPE $ac_cv_type_signal
23406_ACEOF
23407
23408
23409
23410# Reasons for testing:
23411# intmax_t - C99
23412# long double - not in the HP bundled K&R cc
23413# long long - only in reasonably recent compilers
23414# ptrdiff_t - seems to be everywhere, maybe don't need to check this
23415# quad_t - BSD specific
23416# uint_least32_t - C99
23417#
23418# the default includes are sufficient for all these types
23419#
23420ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
23421if test "x$ac_cv_type_intmax_t" = xyes; then :
23422
23423cat >>confdefs.h <<_ACEOF
23424#define HAVE_INTMAX_T 1
23425_ACEOF
23426
23427
23428fi
23429ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
23430if test "x$ac_cv_type_long_double" = xyes; then :
23431
23432cat >>confdefs.h <<_ACEOF
23433#define HAVE_LONG_DOUBLE 1
23434_ACEOF
23435
23436
23437fi
23438ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
23439if test "x$ac_cv_type_long_long" = xyes; then :
23440
23441cat >>confdefs.h <<_ACEOF
23442#define HAVE_LONG_LONG 1
23443_ACEOF
23444
23445
23446fi
23447ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23448if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23449
23450cat >>confdefs.h <<_ACEOF
23451#define HAVE_PTRDIFF_T 1
23452_ACEOF
23453
23454
23455fi
23456ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default"
23457if test "x$ac_cv_type_quad_t" = xyes; then :
23458
23459cat >>confdefs.h <<_ACEOF
23460#define HAVE_QUAD_T 1
23461_ACEOF
23462
23463
23464fi
23465ac_fn_c_check_type "$LINENO" "uint_least32_t" "ac_cv_type_uint_least32_t" "$ac_includes_default"
23466if test "x$ac_cv_type_uint_least32_t" = xyes; then :
23467
23468cat >>confdefs.h <<_ACEOF
23469#define HAVE_UINT_LEAST32_T 1
23470_ACEOF
23471
23472
23473fi
23474ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
23475if test "x$ac_cv_type_intptr_t" = xyes; then :
23476
23477cat >>confdefs.h <<_ACEOF
23478#define HAVE_INTPTR_T 1
23479_ACEOF
23480
23481
23482fi
23483
23484
23485# FIXME: Really want #ifndef __cplusplus around the #define volatile
23486# replacement autoconf gives, since volatile is always available in C++.
23487# But we don't use it in C++ currently.
23488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
23489$as_echo_n "checking for working volatile... " >&6; }
23490if ${ac_cv_c_volatile+:} false; then :
23491 $as_echo_n "(cached) " >&6
23492else
23493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23494/* end confdefs.h. */
23495
23496int
23497main ()
23498{
23499
23500volatile int x;
23501int * volatile y = (int *) 0;
23502return !x && !y;
23503 ;
23504 return 0;
23505}
23506_ACEOF
23507if ac_fn_c_try_compile "$LINENO"; then :
23508 ac_cv_c_volatile=yes
23509else
23510 ac_cv_c_volatile=no
23511fi
23512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23513fi
23514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
23515$as_echo "$ac_cv_c_volatile" >&6; }
23516if test $ac_cv_c_volatile = no; then
23517
23518$as_echo "#define volatile /**/" >>confdefs.h
23519
23520fi
23521
23522
23523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
23524$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
23525if ${ac_cv_c_restrict+:} false; then :
23526 $as_echo_n "(cached) " >&6
23527else
23528 ac_cv_c_restrict=no
23529 # The order here caters to the fact that C++ does not require restrict.
23530 for ac_kw in __restrict __restrict__ _Restrict restrict; do
23531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23532/* end confdefs.h. */
23533typedef int * int_ptr;
23534 int foo (int_ptr $ac_kw ip) {
23535 return ip[0];
23536 }
23537int
23538main ()
23539{
23540int s[1];
23541 int * $ac_kw t = s;
23542 t[0] = 0;
23543 return foo(t)
23544 ;
23545 return 0;
23546}
23547_ACEOF
23548if ac_fn_c_try_compile "$LINENO"; then :
23549 ac_cv_c_restrict=$ac_kw
23550fi
23551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23552 test "$ac_cv_c_restrict" != no && break
23553 done
23554
23555fi
23556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
23557$as_echo "$ac_cv_c_restrict" >&6; }
23558
23559 case $ac_cv_c_restrict in
23560 restrict) ;;
23561 no) $as_echo "#define restrict /**/" >>confdefs.h
23562 ;;
23563 *) cat >>confdefs.h <<_ACEOF
23564#define restrict $ac_cv_c_restrict
23565_ACEOF
23566 ;;
23567 esac
23568
23569
23570# GMP_C_STDARG
23571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((const)) works" >&5
23572$as_echo_n "checking whether gcc __attribute__ ((const)) works... " >&6; }
23573if ${gmp_cv_c_attribute_const+:} false; then :
23574 $as_echo_n "(cached) " >&6
23575else
23576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23577/* end confdefs.h. */
23578int foo (int x) __attribute__ ((const));
23579int
23580main ()
23581{
23582
23583 ;
23584 return 0;
23585}
23586_ACEOF
23587if ac_fn_c_try_compile "$LINENO"; then :
23588 gmp_cv_c_attribute_const=yes
23589else
23590 gmp_cv_c_attribute_const=no
23591fi
23592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23593
23594fi
23595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_const" >&5
23596$as_echo "$gmp_cv_c_attribute_const" >&6; }
23597if test $gmp_cv_c_attribute_const = yes; then
23598
23599$as_echo "#define HAVE_ATTRIBUTE_CONST 1" >>confdefs.h
23600
23601fi
23602
23603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((malloc)) works" >&5
23604$as_echo_n "checking whether gcc __attribute__ ((malloc)) works... " >&6; }
23605if ${gmp_cv_c_attribute_malloc+:} false; then :
23606 $as_echo_n "(cached) " >&6
23607else
23608 cat >conftest.c <<EOF
23609void *foo (int x) __attribute__ ((malloc));
23610EOF
23611gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1"
23612if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
23613 (eval $gmp_compile) 2>&5
23614 ac_status=$?
23615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23616 test $ac_status = 0; }; then
23617 if grep "attribute directive ignored" conftest.out >/dev/null; then
23618 gmp_cv_c_attribute_malloc=no
23619 else
23620 gmp_cv_c_attribute_malloc=yes
23621 fi
23622else
23623 gmp_cv_c_attribute_malloc=no
23624fi
23625cat conftest.out >&5
23626rm -f conftest*
23627
23628fi
23629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_malloc" >&5
23630$as_echo "$gmp_cv_c_attribute_malloc" >&6; }
23631if test $gmp_cv_c_attribute_malloc = yes; then
23632
23633$as_echo "#define HAVE_ATTRIBUTE_MALLOC 1" >>confdefs.h
23634
23635fi
23636
23637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((mode (XX))) works" >&5
23638$as_echo_n "checking whether gcc __attribute__ ((mode (XX))) works... " >&6; }
23639if ${gmp_cv_c_attribute_mode+:} false; then :
23640 $as_echo_n "(cached) " >&6
23641else
23642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23643/* end confdefs.h. */
23644typedef int SItype __attribute__ ((mode (SI)));
23645int
23646main ()
23647{
23648
23649 ;
23650 return 0;
23651}
23652_ACEOF
23653if ac_fn_c_try_compile "$LINENO"; then :
23654 gmp_cv_c_attribute_mode=yes
23655else
23656 gmp_cv_c_attribute_mode=no
23657fi
23658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23659
23660fi
23661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_mode" >&5
23662$as_echo "$gmp_cv_c_attribute_mode" >&6; }
23663if test $gmp_cv_c_attribute_mode = yes; then
23664
23665$as_echo "#define HAVE_ATTRIBUTE_MODE 1" >>confdefs.h
23666
23667fi
23668
23669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((noreturn)) works" >&5
23670$as_echo_n "checking whether gcc __attribute__ ((noreturn)) works... " >&6; }
23671if ${gmp_cv_c_attribute_noreturn+:} false; then :
23672 $as_echo_n "(cached) " >&6
23673else
23674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23675/* end confdefs.h. */
23676void foo (int x) __attribute__ ((noreturn));
23677int
23678main ()
23679{
23680
23681 ;
23682 return 0;
23683}
23684_ACEOF
23685if ac_fn_c_try_compile "$LINENO"; then :
23686 gmp_cv_c_attribute_noreturn=yes
23687else
23688 gmp_cv_c_attribute_noreturn=no
23689fi
23690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23691
23692fi
23693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_attribute_noreturn" >&5
23694$as_echo "$gmp_cv_c_attribute_noreturn" >&6; }
23695if test $gmp_cv_c_attribute_noreturn = yes; then
23696
23697$as_echo "#define HAVE_ATTRIBUTE_NORETURN 1" >>confdefs.h
23698
23699fi
23700
23701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc hidden aliases work" >&5
23702$as_echo_n "checking whether gcc hidden aliases work... " >&6; }
23703if ${gmp_cv_c_hidden_alias+:} false; then :
23704 $as_echo_n "(cached) " >&6
23705else
23706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23707/* end confdefs.h. */
23708void hid() __attribute__ ((visibility("hidden")));
23709void hid() {}
23710void pub() __attribute__ ((alias("hid")));
23711int
23712main ()
23713{
23714
23715 ;
23716 return 0;
23717}
23718_ACEOF
23719if ac_fn_c_try_compile "$LINENO"; then :
23720 gmp_cv_c_hidden_alias=yes
23721else
23722 gmp_cv_c_hidden_alias=no
23723fi
23724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23725
23726fi
23727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_hidden_alias" >&5
23728$as_echo "$gmp_cv_c_hidden_alias" >&6; }
23729if test $gmp_cv_c_hidden_alias = yes; then
23730
23731$as_echo "#define HAVE_HIDDEN_ALIAS 1" >>confdefs.h
23732
23733fi
23734
23735
23736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
23737$as_echo_n "checking for inline... " >&6; }
23738if ${ac_cv_c_inline+:} false; then :
23739 $as_echo_n "(cached) " >&6
23740else
23741 ac_cv_c_inline=no
23742for ac_kw in inline __inline__ __inline; do
23743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23744/* end confdefs.h. */
23745#ifndef __cplusplus
23746typedef int foo_t;
23747static $ac_kw foo_t static_foo () {return 0; }
23748$ac_kw foo_t foo () {return 0; }
23749#endif
23750
23751_ACEOF
23752if ac_fn_c_try_compile "$LINENO"; then :
23753 ac_cv_c_inline=$ac_kw
23754fi
23755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23756 test "$ac_cv_c_inline" != no && break
23757done
23758
23759fi
23760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
23761$as_echo "$ac_cv_c_inline" >&6; }
23762
23763case $ac_cv_c_inline in
23764 inline | yes) ;;
23765 *)
23766 case $ac_cv_c_inline in
23767 no) ac_val=;;
23768 *) ac_val=$ac_cv_c_inline;;
23769 esac
23770 cat >>confdefs.h <<_ACEOF
23771#ifndef __cplusplus
23772#define inline $ac_val
23773#endif
23774_ACEOF
23775 ;;
23776esac
23777
23778
23779case $ac_cv_c_inline in
23780no) ;;
23781*)
23782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23783/* end confdefs.h. */
23784#define __GMP_WITHIN_CONFIGURE_INLINE 1
23785#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
23786#define GMP_NAIL_BITS $GMP_NAIL_BITS
23787#define GMP_LIMB_BITS 123
23788$DEFN_LONG_LONG_LIMB
23789#include "$srcdir/gmp-h.in"
23790
23791#ifndef __GMP_EXTERN_INLINE
23792die die die
23793#endif
23794
23795int
23796main ()
23797{
23798
23799 ;
23800 return 0;
23801}
23802_ACEOF
23803if ac_fn_c_try_compile "$LINENO"; then :
23804
23805else
23806 case $ac_cv_c_inline in
23807 yes) tmp_inline=inline ;;
23808 *) tmp_inline=$ac_cv_c_inline ;;
23809 esac
23810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp.h doesnt recognise compiler \"$tmp_inline\", inlines will be unavailable" >&5
23811$as_echo "$as_me: WARNING: gmp.h doesnt recognise compiler \"$tmp_inline\", inlines will be unavailable" >&2;}
23812fi
23813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23814 ;;
23815esac
23816
23817
23818# from libtool
23819LIBM=
23820case $host in
23821*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
23822 # These system don't have libm, or don't need it
23823 ;;
23824*-ncr-sysv4.3*)
23825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
23826$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
23827if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then :
23828 $as_echo_n "(cached) " >&6
23829else
23830 ac_check_lib_save_LIBS=$LIBS
23831LIBS="-lmw $LIBS"
23832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23833/* end confdefs.h. */
23834
23835/* Override any GCC internal prototype to avoid an error.
23836 Use char because int might match the return type of a GCC
23837 builtin and then its argument prototype would still apply. */
23838#ifdef __cplusplus
23839extern "C"
23840#endif
23841char _mwvalidcheckl ();
23842int
23843main ()
23844{
23845return _mwvalidcheckl ();
23846 ;
23847 return 0;
23848}
23849_ACEOF
23850if ac_fn_c_try_link "$LINENO"; then :
23851 ac_cv_lib_mw__mwvalidcheckl=yes
23852else
23853 ac_cv_lib_mw__mwvalidcheckl=no
23854fi
23855rm -f core conftest.err conftest.$ac_objext \
23856 conftest$ac_exeext conftest.$ac_ext
23857LIBS=$ac_check_lib_save_LIBS
23858fi
23859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
23860$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
23861if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then :
23862 LIBM=-lmw
23863fi
23864
23865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
23866$as_echo_n "checking for cos in -lm... " >&6; }
23867if ${ac_cv_lib_m_cos+:} false; then :
23868 $as_echo_n "(cached) " >&6
23869else
23870 ac_check_lib_save_LIBS=$LIBS
23871LIBS="-lm $LIBS"
23872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23873/* end confdefs.h. */
23874
23875/* Override any GCC internal prototype to avoid an error.
23876 Use char because int might match the return type of a GCC
23877 builtin and then its argument prototype would still apply. */
23878#ifdef __cplusplus
23879extern "C"
23880#endif
23881char cos ();
23882int
23883main ()
23884{
23885return cos ();
23886 ;
23887 return 0;
23888}
23889_ACEOF
23890if ac_fn_c_try_link "$LINENO"; then :
23891 ac_cv_lib_m_cos=yes
23892else
23893 ac_cv_lib_m_cos=no
23894fi
23895rm -f core conftest.err conftest.$ac_objext \
23896 conftest$ac_exeext conftest.$ac_ext
23897LIBS=$ac_check_lib_save_LIBS
23898fi
23899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
23900$as_echo "$ac_cv_lib_m_cos" >&6; }
23901if test "x$ac_cv_lib_m_cos" = xyes; then :
23902 LIBM="$LIBM -lm"
23903fi
23904
23905 ;;
23906*)
23907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
23908$as_echo_n "checking for cos in -lm... " >&6; }
23909if ${ac_cv_lib_m_cos+:} false; then :
23910 $as_echo_n "(cached) " >&6
23911else
23912 ac_check_lib_save_LIBS=$LIBS
23913LIBS="-lm $LIBS"
23914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23915/* end confdefs.h. */
23916
23917/* Override any GCC internal prototype to avoid an error.
23918 Use char because int might match the return type of a GCC
23919 builtin and then its argument prototype would still apply. */
23920#ifdef __cplusplus
23921extern "C"
23922#endif
23923char cos ();
23924int
23925main ()
23926{
23927return cos ();
23928 ;
23929 return 0;
23930}
23931_ACEOF
23932if ac_fn_c_try_link "$LINENO"; then :
23933 ac_cv_lib_m_cos=yes
23934else
23935 ac_cv_lib_m_cos=no
23936fi
23937rm -f core conftest.err conftest.$ac_objext \
23938 conftest$ac_exeext conftest.$ac_ext
23939LIBS=$ac_check_lib_save_LIBS
23940fi
23941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
23942$as_echo "$ac_cv_lib_m_cos" >&6; }
23943if test "x$ac_cv_lib_m_cos" = xyes; then :
23944 LIBM=-lm
23945fi
23946
23947 ;;
23948esac
23949
23950
23951
23952
23953# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
23954# for constant arguments. Useless!
23955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
23956$as_echo_n "checking for working alloca.h... " >&6; }
23957if ${gmp_cv_header_alloca+:} false; then :
23958 $as_echo_n "(cached) " >&6
23959else
23960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23961/* end confdefs.h. */
23962#include <alloca.h>
23963int
23964main ()
23965{
23966char *p = (char *) alloca (2 * sizeof (int));
23967 ;
23968 return 0;
23969}
23970_ACEOF
23971if ac_fn_c_try_link "$LINENO"; then :
23972 gmp_cv_header_alloca=yes
23973else
23974 gmp_cv_header_alloca=no
23975fi
23976rm -f core conftest.err conftest.$ac_objext \
23977 conftest$ac_exeext conftest.$ac_ext
23978fi
23979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_header_alloca" >&5
23980$as_echo "$gmp_cv_header_alloca" >&6; }
23981if test $gmp_cv_header_alloca = yes; then
23982
23983$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
23984
23985fi
23986
23987
23988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca (via gmp-impl.h)" >&5
23989$as_echo_n "checking for alloca (via gmp-impl.h)... " >&6; }
23990if ${gmp_cv_func_alloca+:} false; then :
23991 $as_echo_n "(cached) " >&6
23992else
23993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23994/* end confdefs.h. */
23995#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
23996#define GMP_NAIL_BITS $GMP_NAIL_BITS
23997#define GMP_LIMB_BITS 123
23998$DEFN_LONG_LONG_LIMB
23999#include "$srcdir/gmp-h.in"
24000
24001#include "$srcdir/gmp-impl.h"
24002
24003int
24004main ()
24005{
24006char *p = (char *) alloca (1);
24007 ;
24008 return 0;
24009}
24010_ACEOF
24011if ac_fn_c_try_link "$LINENO"; then :
24012 gmp_cv_func_alloca=yes
24013else
24014 gmp_cv_func_alloca=no
24015fi
24016rm -f core conftest.err conftest.$ac_objext \
24017 conftest$ac_exeext conftest.$ac_ext
24018fi
24019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_alloca" >&5
24020$as_echo "$gmp_cv_func_alloca" >&6; }
24021if test $gmp_cv_func_alloca = yes; then
24022
24023$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
24024
24025fi
24026
24027
24028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to allocate temporary memory" >&5
24029$as_echo_n "checking how to allocate temporary memory... " >&6; }
24030if ${gmp_cv_option_alloca+:} false; then :
24031 $as_echo_n "(cached) " >&6
24032else
24033 case $enable_alloca in
24034 yes)
24035 gmp_cv_option_alloca=alloca
24036 ;;
24037 no)
24038 gmp_cv_option_alloca=malloc-reentrant
24039 ;;
24040 reentrant | notreentrant)
24041 case $gmp_cv_func_alloca in
24042 yes) gmp_cv_option_alloca=alloca ;;
24043 *) gmp_cv_option_alloca=malloc-$enable_alloca ;;
24044 esac
24045 ;;
24046 *)
24047 gmp_cv_option_alloca=$enable_alloca
24048 ;;
24049esac
24050
24051fi
24052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_option_alloca" >&5
24053$as_echo "$gmp_cv_option_alloca" >&6; }
24054
24055
24056
24057case $gmp_cv_option_alloca in
24058 alloca)
24059 if test $gmp_cv_func_alloca = no; then
24060 as_fn_error $? "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5
24061 fi
24062 $as_echo "#define WANT_TMP_ALLOCA 1" >>confdefs.h
24063
24064 TAL_OBJECT=tal-reent$U.lo
24065 ;;
24066 malloc-reentrant)
24067 $as_echo "#define WANT_TMP_REENTRANT 1" >>confdefs.h
24068
24069 TAL_OBJECT=tal-reent$U.lo
24070 ;;
24071 malloc-notreentrant)
24072 $as_echo "#define WANT_TMP_NOTREENTRANT 1" >>confdefs.h
24073
24074 TAL_OBJECT=tal-notreent$U.lo
24075 ;;
24076 debug)
24077 $as_echo "#define WANT_TMP_DEBUG 1" >>confdefs.h
24078
24079 TAL_OBJECT=tal-debug$U.lo
24080 ;;
24081 *)
24082 # checks at the start of configure.in should protect us
24083 as_fn_error $? "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5
24084 ;;
24085esac
24086
24087
24088
24089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24090/* end confdefs.h. */
24091#include <stdio.h>
24092#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
24093#define GMP_NAIL_BITS $GMP_NAIL_BITS
24094#define GMP_LIMB_BITS 123
24095$DEFN_LONG_LONG_LIMB
24096#include "$srcdir/gmp-h.in"
24097
24098#if ! _GMP_H_HAVE_FILE
24099die die die
24100#endif
24101
24102int
24103main ()
24104{
24105
24106 ;
24107 return 0;
24108}
24109_ACEOF
24110if ac_fn_c_try_compile "$LINENO"; then :
24111
24112else
24113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp.h doesnt recognise <stdio.h>, FILE prototypes will be unavailable" >&5
24114$as_echo "$as_me: WARNING: gmp.h doesnt recognise <stdio.h>, FILE prototypes will be unavailable" >&2;}
24115fi
24116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24117
24118
24119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
24120$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
24121if ${ac_cv_c_bigendian+:} false; then :
24122 $as_echo_n "(cached) " >&6
24123else
24124 ac_cv_c_bigendian=unknown
24125 # See if we're dealing with a universal compiler.
24126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24127/* end confdefs.h. */
24128#ifndef __APPLE_CC__
24129 not a universal capable compiler
24130 #endif
24131 typedef int dummy;
24132
24133_ACEOF
24134if ac_fn_c_try_compile "$LINENO"; then :
24135
24136 # Check for potential -arch flags. It is not universal unless
24137 # there are at least two -arch flags with different values.
24138 ac_arch=
24139 ac_prev=
24140 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
24141 if test -n "$ac_prev"; then
24142 case $ac_word in
24143 i?86 | x86_64 | ppc | ppc64)
24144 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
24145 ac_arch=$ac_word
24146 else
24147 ac_cv_c_bigendian=universal
24148 break
24149 fi
24150 ;;
24151 esac
24152 ac_prev=
24153 elif test "x$ac_word" = "x-arch"; then
24154 ac_prev=arch
24155 fi
24156 done
24157fi
24158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24159 if test $ac_cv_c_bigendian = unknown; then
24160 # See if sys/param.h defines the BYTE_ORDER macro.
24161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24162/* end confdefs.h. */
24163#include <sys/types.h>
24164 #include <sys/param.h>
24165
24166int
24167main ()
24168{
24169#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
24170 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
24171 && LITTLE_ENDIAN)
24172 bogus endian macros
24173 #endif
24174
24175 ;
24176 return 0;
24177}
24178_ACEOF
24179if ac_fn_c_try_compile "$LINENO"; then :
24180 # It does; now see whether it defined to BIG_ENDIAN or not.
24181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24182/* end confdefs.h. */
24183#include <sys/types.h>
24184 #include <sys/param.h>
24185
24186int
24187main ()
24188{
24189#if BYTE_ORDER != BIG_ENDIAN
24190 not big endian
24191 #endif
24192
24193 ;
24194 return 0;
24195}
24196_ACEOF
24197if ac_fn_c_try_compile "$LINENO"; then :
24198 ac_cv_c_bigendian=yes
24199else
24200 ac_cv_c_bigendian=no
24201fi
24202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24203fi
24204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24205 fi
24206 if test $ac_cv_c_bigendian = unknown; then
24207 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
24208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24209/* end confdefs.h. */
24210#include <limits.h>
24211
24212int
24213main ()
24214{
24215#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
24216 bogus endian macros
24217 #endif
24218
24219 ;
24220 return 0;
24221}
24222_ACEOF
24223if ac_fn_c_try_compile "$LINENO"; then :
24224 # It does; now see whether it defined to _BIG_ENDIAN or not.
24225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24226/* end confdefs.h. */
24227#include <limits.h>
24228
24229int
24230main ()
24231{
24232#ifndef _BIG_ENDIAN
24233 not big endian
24234 #endif
24235
24236 ;
24237 return 0;
24238}
24239_ACEOF
24240if ac_fn_c_try_compile "$LINENO"; then :
24241 ac_cv_c_bigendian=yes
24242else
24243 ac_cv_c_bigendian=no
24244fi
24245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24246fi
24247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24248 fi
24249 if test $ac_cv_c_bigendian = unknown; then
24250 # Compile a test program.
24251 if test "$cross_compiling" = yes; then :
24252 # Try to guess by grepping values from an object file.
24253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24254/* end confdefs.h. */
24255short int ascii_mm[] =
24256 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24257 short int ascii_ii[] =
24258 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24259 int use_ascii (int i) {
24260 return ascii_mm[i] + ascii_ii[i];
24261 }
24262 short int ebcdic_ii[] =
24263 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24264 short int ebcdic_mm[] =
24265 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24266 int use_ebcdic (int i) {
24267 return ebcdic_mm[i] + ebcdic_ii[i];
24268 }
24269 extern int foo;
24270
24271int
24272main ()
24273{
24274return use_ascii (foo) == use_ebcdic (foo);
24275 ;
24276 return 0;
24277}
24278_ACEOF
24279if ac_fn_c_try_compile "$LINENO"; then :
24280 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
24281 ac_cv_c_bigendian=yes
24282 fi
24283 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24284 if test "$ac_cv_c_bigendian" = unknown; then
24285 ac_cv_c_bigendian=no
24286 else
24287 # finding both strings is unlikely to happen, but who knows?
24288 ac_cv_c_bigendian=unknown
24289 fi
24290 fi
24291fi
24292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24293else
24294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24295/* end confdefs.h. */
24296$ac_includes_default
24297int
24298main ()
24299{
24300
24301 /* Are we little or big endian? From Harbison&Steele. */
24302 union
24303 {
24304 long int l;
24305 char c[sizeof (long int)];
24306 } u;
24307 u.l = 1;
24308 return u.c[sizeof (long int) - 1] == 1;
24309
24310 ;
24311 return 0;
24312}
24313_ACEOF
24314if ac_fn_c_try_run "$LINENO"; then :
24315 ac_cv_c_bigendian=no
24316else
24317 ac_cv_c_bigendian=yes
24318fi
24319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24320 conftest.$ac_objext conftest.beam conftest.$ac_ext
24321fi
24322
24323 fi
24324fi
24325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
24326$as_echo "$ac_cv_c_bigendian" >&6; }
24327 case $ac_cv_c_bigendian in #(
24328 yes)
24329 $as_echo "#define HAVE_LIMB_BIG_ENDIAN 1" >>confdefs.h
24330
24331
24332echo "define_not_for_expansion(\`HAVE_LIMB_BIG_ENDIAN')" >> $gmp_tmpconfigm4p
24333;; #(
24334 no)
24335 $as_echo "#define HAVE_LIMB_LITTLE_ENDIAN 1" >>confdefs.h
24336
24337
24338echo "define_not_for_expansion(\`HAVE_LIMB_LITTLE_ENDIAN')" >> $gmp_tmpconfigm4p
24339
24340 ;; #(
24341 universal)
24342
24343$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
24344
24345 ;; #(
24346 *)
24347 : ;;
24348 esac
24349
24350
24351
24352
24353
24354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking format of \`double' floating point" >&5
24355$as_echo_n "checking format of \`double' floating point... " >&6; }
24356if ${gmp_cv_c_double_format+:} false; then :
24357 $as_echo_n "(cached) " >&6
24358else
24359 gmp_cv_c_double_format=unknown
24360cat >conftest.c <<\EOF
24361#include <stdio.h>
24362struct foo {
24363 char before[8];
24364 double x;
24365 char after[8];
24366};
24367extern struct foo foo;
24368struct foo foo = {
24369 { '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' },
24370 -123456789.0,
24371 { '\376', '\334', '\272', '\230', '\166', '\124', '\062', '\020' },
24372};
24373int main(){
24374 int i;
24375 for (i = 0; i < 8; i++) {
24376 printf ("%d %f\n", foo.before[i] + foo.after[i], foo.x);
24377 }
24378 return 0;
24379}
24380EOF
24381gmp_compile="$CC $CFLAGS $CPPFLAGS conftest.c -o conftest$EXEEXT >&5 2>&1"
24382if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
24383 (eval $gmp_compile) 2>&5
24384 ac_status=$?
24385 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24386 test $ac_status = 0; }; then
24387cat >conftest.awk <<\EOF
24388
24389BEGIN {
24390 found = 0
24391}
24392
24393{
24394 for (f = 2; f <= NF; f++)
24395 {
24396 for (i = 0; i < 23; i++)
24397 got[i] = got[i+1];
24398 got[23] = $f;
24399
24400 # match the special begin and end sequences
24401 if (got[0] != "001") continue
24402 if (got[1] != "043") continue
24403 if (got[2] != "105") continue
24404 if (got[3] != "147") continue
24405 if (got[4] != "211") continue
24406 if (got[5] != "253") continue
24407 if (got[6] != "315") continue
24408 if (got[7] != "357") continue
24409 if (got[16] != "376") continue
24410 if (got[17] != "334") continue
24411 if (got[18] != "272") continue
24412 if (got[19] != "230") continue
24413 if (got[20] != "166") continue
24414 if (got[21] != "124") continue
24415 if (got[22] != "062") continue
24416 if (got[23] != "020") continue
24417
24418 saw = " (" got[8] " " got[9] " " got[10] " " got[11] " " got[12] " " got[13] " " got[14] " " got[15] ")"
24419
24420 if (got[8] == "000" && \
24421 got[9] == "000" && \
24422 got[10] == "000" && \
24423 got[11] == "124" && \
24424 got[12] == "064" && \
24425 got[13] == "157" && \
24426 got[14] == "235" && \
24427 got[15] == "301")
24428 {
24429 print "IEEE little endian"
24430 found = 1
24431 exit
24432 }
24433
24434 # Little endian with the two 4-byte halves swapped, as used by ARM
24435 # when the chip is in little endian mode.
24436 #
24437 if (got[8] == "064" && \
24438 got[9] == "157" && \
24439 got[10] == "235" && \
24440 got[11] == "301" && \
24441 got[12] == "000" && \
24442 got[13] == "000" && \
24443 got[14] == "000" && \
24444 got[15] == "124")
24445 {
24446 print "IEEE little endian, swapped halves"
24447 found = 1
24448 exit
24449 }
24450
24451 # gcc 2.95.4 on one GNU/Linux ARM system was seen generating 000 in
24452 # the last byte, whereas 124 is correct. Not sure where the bug
24453 # actually lies, but a running program didn't seem to get a full
24454 # mantissa worth of working bits.
24455 #
24456 # We match this case explicitly so we can give a nice result message,
24457 # but we deliberately exclude it from the normal IEEE double setups
24458 # since it's too broken.
24459 #
24460 if (got[8] == "064" && \
24461 got[9] == "157" && \
24462 got[10] == "235" && \
24463 got[11] == "301" && \
24464 got[12] == "000" && \
24465 got[13] == "000" && \
24466 got[14] == "000" && \
24467 got[15] == "000")
24468 {
24469 print "bad ARM software floats"
24470 found = 1
24471 exit
24472 }
24473
24474 if (got[8] == "301" && \
24475 got[9] == "235" && \
24476 got[10] == "157" && \
24477 got[11] == "064" && \
24478 got[12] == "124" && \
24479 got[13] == "000" && \
24480 got[14] == "000" && \
24481 got[15] == "000")
24482 {
24483 print "IEEE big endian"
24484 found = 1
24485 exit
24486 }
24487
24488 if (got[8] == "353" && \
24489 got[9] == "315" && \
24490 got[10] == "242" && \
24491 got[11] == "171" && \
24492 got[12] == "000" && \
24493 got[13] == "240" && \
24494 got[14] == "000" && \
24495 got[15] == "000")
24496 {
24497 print "VAX D"
24498 found = 1
24499 exit
24500 }
24501
24502 if (got[8] == "275" && \
24503 got[9] == "301" && \
24504 got[10] == "064" && \
24505 got[11] == "157" && \
24506 got[12] == "000" && \
24507 got[13] == "124" && \
24508 got[14] == "000" && \
24509 got[15] == "000")
24510 {
24511 print "VAX G"
24512 found = 1
24513 exit
24514 }
24515
24516 if (got[8] == "300" && \
24517 got[9] == "033" && \
24518 got[10] == "353" && \
24519 got[11] == "171" && \
24520 got[12] == "242" && \
24521 got[13] == "240" && \
24522 got[14] == "000" && \
24523 got[15] == "000")
24524 {
24525 print "Cray CFP"
24526 found = 1
24527 exit
24528 }
24529 }
24530}
24531
24532END {
24533 if (! found)
24534 print "unknown", saw
24535}
24536
24537EOF
24538 gmp_cv_c_double_format=`od -b conftest$EXEEXT | $AWK -f conftest.awk`
24539 case $gmp_cv_c_double_format in
24540 unknown*)
24541 echo "cannot match anything, conftest$EXEEXT contains" >&5
24542 od -b conftest$EXEEXT >&5
24543 ;;
24544 esac
24545else
24546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, cannot compile test program" >&5
24547$as_echo "$as_me: WARNING: oops, cannot compile test program" >&2;}
24548fi
24549rm -f conftest*
24550
24551fi
24552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_c_double_format" >&5
24553$as_echo "$gmp_cv_c_double_format" >&6; }
24554
24555
24556
24557case $gmp_cv_c_double_format in
24558 "IEEE big endian")
24559 $as_echo "#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1" >>confdefs.h
24560
24561
24562echo "define_not_for_expansion(\`HAVE_DOUBLE_IEEE_BIG_ENDIAN')" >> $gmp_tmpconfigm4p
24563
24564 ;;
24565 "IEEE little endian")
24566 $as_echo "#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1" >>confdefs.h
24567
24568
24569echo "define_not_for_expansion(\`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')" >> $gmp_tmpconfigm4p
24570
24571 ;;
24572 "IEEE little endian, swapped halves")
24573 $as_echo "#define HAVE_DOUBLE_IEEE_LITTLE_SWAPPED 1" >>confdefs.h
24574 ;;
24575 "VAX D")
24576 $as_echo "#define HAVE_DOUBLE_VAX_D 1" >>confdefs.h
24577 ;;
24578 "VAX G")
24579 $as_echo "#define HAVE_DOUBLE_VAX_G 1" >>confdefs.h
24580 ;;
24581 "Cray CFP")
24582 $as_echo "#define HAVE_DOUBLE_CRAY_CFP 1" >>confdefs.h
24583 ;;
24584 "bad ARM software floats")
24585 ;;
24586 unknown*)
24587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not determine float format." >&5
24588$as_echo "$as_me: WARNING: Could not determine float format." >&2;}
24589 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Conversions to and from \"double\" may be slow." >&5
24590$as_echo "$as_me: WARNING: Conversions to and from \"double\" may be slow." >&2;}
24591 ;;
24592 *)
24593 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, unrecognised float format: $gmp_cv_c_double_format" >&5
24594$as_echo "$as_me: WARNING: oops, unrecognised float format: $gmp_cv_c_double_format" >&2;}
24595 ;;
24596esac
24597
24598
24599
24600# Reasons for testing:
24601# alarm - not in mingw
24602# attr_get - IRIX specific
24603# clock_gettime - not in glibc 2.2.4, only very recent systems
24604# cputime - not in glibc
24605# getsysinfo - OSF specific
24606# getrusage - not in mingw
24607# gettimeofday - not in mingw
24608# mmap - not in mingw, djgpp
24609# nl_langinfo - X/Open standard only, not in djgpp for instance
24610# obstack_vprintf - glibc specific
24611# processor_info - solaris specific
24612# pstat_getprocessor - HPUX specific (10.x and up)
24613# raise - an ANSI-ism, though probably almost universal by now
24614# read_real_time - AIX specific
24615# sigaction - not in mingw
24616# sigaltstack - not in mingw, or old AIX (reputedly)
24617# sigstack - not in mingw
24618# strerror - not in SunOS
24619# strnlen - glibc extension (some other systems too)
24620# syssgi - IRIX specific
24621# times - not in mingw
24622#
24623# AC_FUNC_STRNLEN is not used because we don't want the AC_LIBOBJ
24624# replacement setups it gives. It detects a faulty strnlen on AIX, but
24625# missing out on that test is ok since our only use of strnlen is in
24626# __gmp_replacement_vsnprintf which is not required on AIX since it has a
24627# vsnprintf.
24628#
24629for ac_func in alarm attr_get clock cputime getpagesize getrusage gettimeofday getsysinfo localeconv memset mmap mprotect nl_langinfo obstack_vprintf popen processor_info pstat_getprocessor raise read_real_time sigaction sigaltstack sigstack syssgi strchr strerror strnlen strtol strtoul sysconf sysctl sysctlbyname times
24630do :
24631 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24632ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24633if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24634 cat >>confdefs.h <<_ACEOF
24635#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24636_ACEOF
24637
24638fi
24639done
24640
24641
24642# clock_gettime is in librt on *-*-osf5.1 and on glibc, so att -lrt to
24643# TUNE_LIBS if needed. On linux (tested on x86_32, 2.6.26),
24644# clock_getres reports ns accuracy, while in a quick test on osf
24645# clock_getres said only 1 millisecond.
24646
24647old_LIBS="$LIBS"
24648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24649$as_echo_n "checking for library containing clock_gettime... " >&6; }
24650if ${ac_cv_search_clock_gettime+:} false; then :
24651 $as_echo_n "(cached) " >&6
24652else
24653 ac_func_search_save_LIBS=$LIBS
24654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24655/* end confdefs.h. */
24656
24657/* Override any GCC internal prototype to avoid an error.
24658 Use char because int might match the return type of a GCC
24659 builtin and then its argument prototype would still apply. */
24660#ifdef __cplusplus
24661extern "C"
24662#endif
24663char clock_gettime ();
24664int
24665main ()
24666{
24667return clock_gettime ();
24668 ;
24669 return 0;
24670}
24671_ACEOF
24672for ac_lib in '' rt; do
24673 if test -z "$ac_lib"; then
24674 ac_res="none required"
24675 else
24676 ac_res=-l$ac_lib
24677 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24678 fi
24679 if ac_fn_c_try_link "$LINENO"; then :
24680 ac_cv_search_clock_gettime=$ac_res
24681fi
24682rm -f core conftest.err conftest.$ac_objext \
24683 conftest$ac_exeext
24684 if ${ac_cv_search_clock_gettime+:} false; then :
24685 break
24686fi
24687done
24688if ${ac_cv_search_clock_gettime+:} false; then :
24689
24690else
24691 ac_cv_search_clock_gettime=no
24692fi
24693rm conftest.$ac_ext
24694LIBS=$ac_func_search_save_LIBS
24695fi
24696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24697$as_echo "$ac_cv_search_clock_gettime" >&6; }
24698ac_res=$ac_cv_search_clock_gettime
24699if test "$ac_res" != no; then :
24700 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24701
24702
24703$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
24704
24705fi
24706
24707TUNE_LIBS="$LIBS"
24708LIBS="$old_LIBS"
24709
24710
24711
24712ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
24713if test "x$ac_cv_func_vsnprintf" = xyes; then :
24714 gmp_vsnprintf_exists=yes
24715else
24716 gmp_vsnprintf_exists=no
24717fi
24718
24719if test "$gmp_vsnprintf_exists" = no; then
24720 gmp_cv_func_vsnprintf=no
24721else
24722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf works" >&5
24723$as_echo_n "checking whether vsnprintf works... " >&6; }
24724if ${gmp_cv_func_vsnprintf+:} false; then :
24725 $as_echo_n "(cached) " >&6
24726else
24727 gmp_cv_func_vsnprintf=yes
24728 for i in 'return check ("hello world");' 'int n; return check ("%nhello world", &n);'; do
24729 if test "$cross_compiling" = yes; then :
24730 gmp_cv_func_vsnprintf=probably; break
24731else
24732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24733/* end confdefs.h. */
24734
24735#include <string.h> /* for strcmp */
24736#include <stdio.h> /* for vsnprintf */
24737
24738#include <stdarg.h>
24739
24740int
24741check (const char *fmt, ...)
24742{
24743 static char buf[128];
24744 va_list ap;
24745 int ret;
24746
24747 va_start (ap, fmt);
24748
24749 ret = vsnprintf (buf, 4, fmt, ap);
24750
24751 if (ret == -1 || strcmp (buf, "hel") != 0)
24752 return 1;
24753
24754 /* allowed return values */
24755 if (ret != 3 && ret != 11)
24756 return 2;
24757
24758 return 0;
24759}
24760
24761int
24762main ()
24763{
24764$i
24765}
24766
24767_ACEOF
24768if ac_fn_c_try_run "$LINENO"; then :
24769 :
24770else
24771 gmp_cv_func_vsnprintf=no; break
24772fi
24773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24774 conftest.$ac_objext conftest.beam conftest.$ac_ext
24775fi
24776
24777 done
24778
24779fi
24780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_vsnprintf" >&5
24781$as_echo "$gmp_cv_func_vsnprintf" >&6; }
24782 if test "$gmp_cv_func_vsnprintf" = probably; then
24783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok" >&5
24784$as_echo "$as_me: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok" >&2;}
24785 fi
24786 if test "$gmp_cv_func_vsnprintf" != no; then
24787
24788$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
24789
24790 fi
24791fi
24792
24793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sscanf needs writable input" >&5
24794$as_echo_n "checking whether sscanf needs writable input... " >&6; }
24795if ${gmp_cv_func_sscanf_writable_input+:} false; then :
24796 $as_echo_n "(cached) " >&6
24797else
24798 case $host in
24799 *-*-hpux9 | *-*-hpux9.*)
24800 gmp_cv_func_sscanf_writable_input=yes ;;
24801 *) gmp_cv_func_sscanf_writable_input=no ;;
24802esac
24803
24804fi
24805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_func_sscanf_writable_input" >&5
24806$as_echo "$gmp_cv_func_sscanf_writable_input" >&6; }
24807case $gmp_cv_func_sscanf_writable_input in
24808 yes)
24809$as_echo "#define SSCANF_WRITABLE_INPUT 1" >>confdefs.h
24810 ;;
24811 no) ;;
24812 *) as_fn_error $? "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;;
24813esac
24814
24815
24816# Reasons for checking:
24817# pst_processor psp_iticksperclktick - not in hpux 9
24818#
24819ac_fn_c_check_member "$LINENO" "struct pst_processor" "psp_iticksperclktick" "ac_cv_member_struct_pst_processor_psp_iticksperclktick" "#include <sys/pstat.h>
24820"
24821if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = xyes; then :
24822
24823$as_echo "#define HAVE_PSP_ITICKSPERCLKTICK 1" >>confdefs.h
24824
24825fi
24826
24827
24828# C++ tests, when required
24829#
24830if test $enable_cxx = yes; then
24831 ac_ext=cpp
24832ac_cpp='$CXXCPP $CPPFLAGS'
24833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24836
24837
24838 # Reasons for testing:
24839 # <sstream> - not in g++ 2.95.2
24840 # std::locale - not in g++ 2.95.4
24841 #
24842
24843for ac_header in sstream
24844do :
24845 ac_fn_cxx_check_header_mongrel "$LINENO" "sstream" "ac_cv_header_sstream" "$ac_includes_default"
24846if test "x$ac_cv_header_sstream" = xyes; then :
24847 cat >>confdefs.h <<_ACEOF
24848#define HAVE_SSTREAM 1
24849_ACEOF
24850
24851fi
24852
24853done
24854
24855 ac_fn_cxx_check_type "$LINENO" "std::locale" "ac_cv_type_std__locale" "#include <locale>
24856"
24857if test "x$ac_cv_type_std__locale" = xyes; then :
24858
24859cat >>confdefs.h <<_ACEOF
24860#define HAVE_STD__LOCALE 1
24861_ACEOF
24862
24863
24864fi
24865
24866
24867 ac_ext=c
24868ac_cpp='$CPP $CPPFLAGS'
24869ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24870ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24871ac_compiler_gnu=$ac_cv_c_compiler_gnu
24872
24873fi
24874
24875
24876# Pick the correct source files in $path and link them to mpn/.
24877# $gmp_mpn_functions lists all functions we need.
24878#
24879# The rule is to find a file with the function name and a .asm, .S,
24880# .s, or .c extension. Certain multi-function files with special names
24881# can provide some functions too. (mpn/Makefile.am passes
24882# -DOPERATION_<func> to get them to generate the right code.)
24883
24884# Note: $gmp_mpn_functions must have mod_1 before pre_mod_1 so the former
24885# can optionally provide the latter as an extra entrypoint. Likewise
24886# divrem_1 and pre_divrem_1.
24887
24888gmp_mpn_functions_optional="umul udiv \
24889 invert_limb sqr_diagonal sqr_diag_addlsh1 \
24890 mul_2 mul_3 mul_4 mul_5 mul_6 \
24891 addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8 \
24892 addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n \
24893 addlsh2_n sublsh2_n rsblsh2_n \
24894 addlsh_n sublsh_n rsblsh_n \
24895 add_n_sub_n addaddmul_1msb0"
24896
24897gmp_mpn_functions="$extra_functions \
24898 add add_1 add_n sub sub_1 sub_n cnd_add_n cnd_sub_n cnd_swap neg com \
24899 mul_1 addmul_1 submul_1 \
24900 add_err1_n add_err2_n add_err3_n sub_err1_n sub_err2_n sub_err3_n \
24901 lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2 \
24902 fib2_ui fib2m mod_1 mod_34lsub1 mode1o pre_divrem_1 pre_mod_1 dump \
24903 mod_1_1 mod_1_2 mod_1_3 mod_1_4 lshiftc \
24904 mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \
24905 mulmid_basecase toom42_mulmid mulmid_n mulmid \
24906 random random2 pow_1 \
24907 rootrem sqrtrem sizeinbase get_str set_str compute_powtab \
24908 scan0 scan1 popcount hamdist cmp zero_p \
24909 perfsqr perfpow strongfibo \
24910 gcd_11 gcd_22 gcd_1 gcd gcdext_1 gcdext gcd_subdiv_step \
24911 gcdext_lehmer \
24912 div_q tdiv_qr jacbase jacobi_2 jacobi get_d \
24913 matrix22_mul matrix22_mul1_inverse_vector \
24914 hgcd_matrix hgcd2 hgcd_step hgcd_reduce hgcd hgcd_appr \
24915 hgcd2_jacobi hgcd_jacobi \
24916 mullo_n mullo_basecase sqrlo sqrlo_basecase \
24917 toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \
24918 toom33_mul toom43_mul toom53_mul toom54_mul toom63_mul \
24919 toom44_mul \
24920 toom6h_mul toom6_sqr toom8h_mul toom8_sqr \
24921 toom_couple_handling \
24922 toom2_sqr toom3_sqr toom4_sqr \
24923 toom_eval_dgr3_pm1 toom_eval_dgr3_pm2 \
24924 toom_eval_pm1 toom_eval_pm2 toom_eval_pm2exp toom_eval_pm2rexp \
24925 toom_interpolate_5pts toom_interpolate_6pts toom_interpolate_7pts \
24926 toom_interpolate_8pts toom_interpolate_12pts toom_interpolate_16pts \
24927 invertappr invert binvert mulmod_bnm1 sqrmod_bnm1 \
24928 div_qr_1 div_qr_1n_pi1 \
24929 div_qr_2 div_qr_2n_pi1 div_qr_2u_pi1 \
24930 sbpi1_div_q sbpi1_div_qr sbpi1_divappr_q \
24931 dcpi1_div_q dcpi1_div_qr dcpi1_divappr_q \
24932 mu_div_qr mu_divappr_q mu_div_q \
24933 bdiv_q_1 \
24934 sbpi1_bdiv_q sbpi1_bdiv_qr sbpi1_bdiv_r \
24935 dcpi1_bdiv_q dcpi1_bdiv_qr \
24936 mu_bdiv_q mu_bdiv_qr \
24937 bdiv_q bdiv_qr broot brootinv bsqrt bsqrtinv \
24938 divexact bdiv_dbm1c redc_1 redc_2 redc_n powm powlo sec_powm \
24939 sec_mul sec_sqr sec_div_qr sec_div_r sec_pi1_div_qr sec_pi1_div_r \
24940 sec_add_1 sec_sub_1 sec_invert \
24941 trialdiv remove \
24942 and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \
24943 copyi copyd zero sec_tabselect \
24944 comb_tables \
24945 $gmp_mpn_functions_optional"
24946
24947
24948
24949# the list of all object files used by mpn/Makefile.in and the
24950# top-level Makefile.in, respectively
24951mpn_objects=
24952mpn_objs_in_libgmp=
24953
24954# links from the sources, to be removed by "make distclean"
24955gmp_srclinks=
24956
24957
24958# mpn_relative_top_srcdir is $top_srcdir, but for use from within the mpn
24959# build directory. If $srcdir is relative then we use a relative path too,
24960# so the two trees can be moved together.
24961case $srcdir in
24962 [\\/]* | ?:[\\/]*) # absolute, as per autoconf
24963 mpn_relative_top_srcdir=$srcdir ;;
24964 *) # relative
24965 mpn_relative_top_srcdir=../$srcdir ;;
24966esac
24967
24968
24969
24970
24971
24972
24973# Fat binary setups.
24974#
24975# We proceed through each $fat_path directory, and look for $fat_function
24976# routines there. Those found are incorporated in the build by generating a
24977# little mpn/<foo>.asm or mpn/<foo>.c file in the build directory, with
24978# suitable function renaming, and adding that to $mpn_objects (the same as a
24979# normal mpn file).
24980#
24981# fat.h is generated with macros to let internal calls to each $fat_function
24982# go directly through __gmpn_cpuvec, plus macros and declarations helping to
24983# setup that structure, on a per-directory basis ready for
24984# mpn/<cpu>/fat/fat.c.
24985#
24986# fat.h includes thresholds listed in $fat_thresholds, extracted from
24987# gmp-mparam.h in each directory. An overall maximum for each threshold is
24988# established, for use in making fixed size arrays of temporary space.
24989# (Eg. MUL_TOOM33_THRESHOLD_LIMIT used by mpn/generic/mul.c.)
24990#
24991# It'd be possible to do some of this manually, but when there's more than a
24992# few functions and a few directories it becomes very tedious, and very
24993# prone to having some routine accidentally omitted. On that basis it seems
24994# best to automate as much as possible, even if the code to do so is a bit
24995# ugly.
24996#
24997
24998if test -n "$fat_path"; then
24999 # Usually the mpn build directory is created with mpn/Makefile
25000 # instantiation, but we want to write to it sooner.
25001 mkdir mpn 2>/dev/null
25002
25003 echo "/* fat.h - setups for fat binaries." >fat.h
25004 echo " Generated by configure - DO NOT EDIT. */" >>fat.h
25005
25006
25007$as_echo "#define WANT_FAT_BINARY 1" >>confdefs.h
25008
25009
25010echo 'define(<WANT_FAT_BINARY>, <yes>)' >>$gmp_tmpconfigm4
25011
25012
25013 # Don't want normal copies of fat functions
25014 for tmp_fn in $fat_functions; do
25015 remove_from_list_tmp=
25016for remove_from_list_i in $gmp_mpn_functions; do
25017 if test $remove_from_list_i = $tmp_fn; then :;
25018 else
25019 remove_from_list_tmp="$remove_from_list_tmp $remove_from_list_i"
25020 fi
25021done
25022gmp_mpn_functions=$remove_from_list_tmp
25023
25024 remove_from_list_tmp=
25025for remove_from_list_i in $gmp_mpn_functions_optional; do
25026 if test $remove_from_list_i = $tmp_fn; then :;
25027 else
25028 remove_from_list_tmp="$remove_from_list_tmp $remove_from_list_i"
25029 fi
25030done
25031gmp_mpn_functions_optional=$remove_from_list_tmp
25032
25033 done
25034
25035 for tmp_fn in $fat_functions; do
25036 case $tmp_fn in
25037 dive_1) tmp_fbase=divexact_1 ;;
25038 diveby3) tmp_fbase=divexact_by3c ;;
25039 pre_divrem_1) tmp_fbase=preinv_divrem_1 ;;
25040 mode1o) tmp_fbase=modexact_1c_odd ;;
25041 pre_mod_1) tmp_fbase=preinv_mod_1 ;;
25042 mod_1_1) tmp_fbase=mod_1_1p ;;
25043 mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;;
25044 mod_1_2) tmp_fbase=mod_1s_2p ;;
25045 mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;;
25046 mod_1_3) tmp_fbase=mod_1s_3p ;;
25047 mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;;
25048 mod_1_4) tmp_fbase=mod_1s_4p ;;
25049 mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;;
25050 *) tmp_fbase=$tmp_fn ;;
25051esac
25052
25053 echo "
25054#ifndef OPERATION_$tmp_fn
25055#undef mpn_$tmp_fbase
25056#define mpn_$tmp_fbase (*__gmpn_cpuvec.$tmp_fbase)
25057#endif
25058DECL_$tmp_fbase (__MPN(${tmp_fbase}_init));" >>fat.h
25059 # encourage various macros to use fat functions
25060 cat >>confdefs.h <<_ACEOF
25061#define HAVE_NATIVE_mpn_$tmp_fbase 1
25062_ACEOF
25063
25064 done
25065
25066 echo "" >>fat.h
25067 echo "/* variable thresholds */" >>fat.h
25068 for tmp_tn in $fat_thresholds; do
25069 echo "#undef $tmp_tn" >>fat.h
25070 echo "#define $tmp_tn CPUVEC_THRESHOLD (`echo $tmp_tn | tr [A-Z] [a-z]`)" >>fat.h
25071 done
25072
25073 echo "
25074/* Copy all fields into __gmpn_cpuvec.
25075 memcpy is not used because it might operate byte-wise (depending on its
25076 implementation), and we need the function pointer writes to be atomic.
25077 "volatile" discourages the compiler from trying to optimize this. */
25078#define CPUVEC_INSTALL(vec) \\
25079 do { \\
25080 volatile struct cpuvec_t *p = &__gmpn_cpuvec; \\" >>fat.h
25081 for tmp_fn in $fat_functions; do
25082 case $tmp_fn in
25083 dive_1) tmp_fbase=divexact_1 ;;
25084 diveby3) tmp_fbase=divexact_by3c ;;
25085 pre_divrem_1) tmp_fbase=preinv_divrem_1 ;;
25086 mode1o) tmp_fbase=modexact_1c_odd ;;
25087 pre_mod_1) tmp_fbase=preinv_mod_1 ;;
25088 mod_1_1) tmp_fbase=mod_1_1p ;;
25089 mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;;
25090 mod_1_2) tmp_fbase=mod_1s_2p ;;
25091 mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;;
25092 mod_1_3) tmp_fbase=mod_1s_3p ;;
25093 mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;;
25094 mod_1_4) tmp_fbase=mod_1s_4p ;;
25095 mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;;
25096 *) tmp_fbase=$tmp_fn ;;
25097esac
25098
25099 echo " p->$tmp_fbase = vec.$tmp_fbase; \\" >>fat.h
25100 done
25101 for tmp_tn in $fat_thresholds; do
25102 tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]`
25103 echo " p->$tmp_field_name = vec.$tmp_field_name; \\" >>fat.h
25104 done
25105 echo " } while (0)" >>fat.h
25106
25107 echo "
25108/* A helper to check all fields are filled. */
25109#define ASSERT_CPUVEC(vec) \\
25110 do { \\" >>fat.h
25111 for tmp_fn in $fat_functions; do
25112 case $tmp_fn in
25113 dive_1) tmp_fbase=divexact_1 ;;
25114 diveby3) tmp_fbase=divexact_by3c ;;
25115 pre_divrem_1) tmp_fbase=preinv_divrem_1 ;;
25116 mode1o) tmp_fbase=modexact_1c_odd ;;
25117 pre_mod_1) tmp_fbase=preinv_mod_1 ;;
25118 mod_1_1) tmp_fbase=mod_1_1p ;;
25119 mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;;
25120 mod_1_2) tmp_fbase=mod_1s_2p ;;
25121 mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;;
25122 mod_1_3) tmp_fbase=mod_1s_3p ;;
25123 mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;;
25124 mod_1_4) tmp_fbase=mod_1s_4p ;;
25125 mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;;
25126 *) tmp_fbase=$tmp_fn ;;
25127esac
25128
25129 echo " ASSERT (vec.$tmp_fbase != NULL); \\" >>fat.h
25130 done
25131 for tmp_tn in $fat_thresholds; do
25132 tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]`
25133 echo " ASSERT (vec.$tmp_field_name != 0); \\" >>fat.h
25134 done
25135 echo " } while (0)" >>fat.h
25136
25137 echo "
25138/* Call ITERATE(field) for each fat threshold field. */
25139#define ITERATE_FAT_THRESHOLDS() \\
25140 do { \\" >>fat.h
25141 for tmp_tn in $fat_thresholds; do
25142 tmp_field_name=`echo $tmp_tn | tr [A-Z] [a-z]`
25143 echo " ITERATE ($tmp_tn, $tmp_field_name); \\" >>fat.h
25144 done
25145 echo " } while (0)" >>fat.h
25146
25147 for tmp_dir in $fat_path; do
25148 CPUVEC_SETUP=
25149 THRESH_ASM_SETUP=
25150 echo "" >>fat.h
25151 tmp_suffix=`echo $tmp_dir | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`
25152
25153 # In order to keep names unique on a DOS 8.3 filesystem, use a prefix
25154 # (rather than a suffix) for the generated file names, and abbreviate.
25155 case $tmp_suffix in
25156 pentium) tmp_prefix=p ;;
25157 pentium_mmx) tmp_prefix=pm ;;
25158 p6_mmx) tmp_prefix=p2 ;;
25159 p6_p3mmx) tmp_prefix=p3 ;;
25160 pentium4) tmp_prefix=p4 ;;
25161 pentium4_mmx) tmp_prefix=p4m ;;
25162 pentium4_sse2) tmp_prefix=p4s ;;
25163 k6_mmx) tmp_prefix=k6m ;;
25164 k6_k62mmx) tmp_prefix=k62 ;;
25165 k7_mmx) tmp_prefix=k7m ;;
25166 *) tmp_prefix=$tmp_suffix ;;
25167 esac
25168
25169 # Extract desired thresholds from gmp-mparam.h file in this directory,
25170 # if present.
25171 tmp_mparam=$srcdir/mpn/$tmp_dir/gmp-mparam.h
25172 if test -f $tmp_mparam; then
25173 for tmp_tn in $fat_thresholds; do
25174 tmp_thresh=`sed -n "s/^#define $tmp_tn[ ]*\\([0-9][0-9]*\\).*$/\\1/p" $tmp_mparam`
25175 if test -n "$tmp_thresh"; then
25176 THRESH_ASM_SETUP="${THRESH_ASM_SETUP}define($tmp_tn,$tmp_thresh)
25177"
25178 CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.`echo $tmp_tn | tr [A-Z] [a-z]` = $tmp_thresh; \\
25179"
25180 eval tmp_limit=\$${tmp_tn}_LIMIT
25181 if test -z "$tmp_limit"; then
25182 tmp_limit=0
25183 fi
25184 if test $tmp_thresh -gt $tmp_limit; then
25185 eval ${tmp_tn}_LIMIT=$tmp_thresh
25186 fi
25187 fi
25188 done
25189 fi
25190
25191 for tmp_fn in $fat_functions; do
25192 # functions that can be provided by multi-function files
25193tmp_mulfunc=
25194case $tmp_fn in
25195 add_n|sub_n) tmp_mulfunc="aors_n" ;;
25196 add_err1_n|sub_err1_n)
25197 tmp_mulfunc="aors_err1_n" ;;
25198 add_err2_n|sub_err2_n)
25199 tmp_mulfunc="aors_err2_n" ;;
25200 add_err3_n|sub_err3_n)
25201 tmp_mulfunc="aors_err3_n" ;;
25202 cnd_add_n|cnd_sub_n) tmp_mulfunc="cnd_aors_n" ;;
25203 sec_add_1|sec_sub_1) tmp_mulfunc="sec_aors_1" ;;
25204 addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;;
25205 mul_2|addmul_2) tmp_mulfunc="aormul_2" ;;
25206 mul_3|addmul_3) tmp_mulfunc="aormul_3" ;;
25207 mul_4|addmul_4) tmp_mulfunc="aormul_4" ;;
25208 popcount|hamdist) tmp_mulfunc="popham" ;;
25209 and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n)
25210 tmp_mulfunc="logops_n" ;;
25211 lshift|rshift) tmp_mulfunc="lorrshift";;
25212 addlsh1_n)
25213 tmp_mulfunc="aorslsh1_n aorrlsh1_n aorsorrlsh1_n";;
25214 sublsh1_n)
25215 tmp_mulfunc="aorslsh1_n sorrlsh1_n aorsorrlsh1_n";;
25216 rsblsh1_n)
25217 tmp_mulfunc="aorrlsh1_n sorrlsh1_n aorsorrlsh1_n";;
25218 addlsh2_n)
25219 tmp_mulfunc="aorslsh2_n aorrlsh2_n aorsorrlsh2_n";;
25220 sublsh2_n)
25221 tmp_mulfunc="aorslsh2_n sorrlsh2_n aorsorrlsh2_n";;
25222 rsblsh2_n)
25223 tmp_mulfunc="aorrlsh2_n sorrlsh2_n aorsorrlsh2_n";;
25224 addlsh_n)
25225 tmp_mulfunc="aorslsh_n aorrlsh_n aorsorrlsh_n";;
25226 sublsh_n)
25227 tmp_mulfunc="aorslsh_n sorrlsh_n aorsorrlsh_n";;
25228 rsblsh_n)
25229 tmp_mulfunc="aorrlsh_n sorrlsh_n aorsorrlsh_n";;
25230 rsh1add_n|rsh1sub_n)
25231 tmp_mulfunc="rsh1aors_n";;
25232 sec_div_qr|sec_div_r)
25233 tmp_mulfunc="sec_div";;
25234 sec_pi1_div_qr|sec_pi1_div_r)
25235 tmp_mulfunc="sec_pi1_div";;
25236esac
25237
25238
25239 for tmp_base in $tmp_fn $tmp_mulfunc; do
25240 for tmp_ext in asm S s c; do
25241 tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext
25242 if test -f $tmp_file; then
25243
25244 # If the host uses a non-standard ABI, check if tmp_file supports it
25245 #
25246 if test -n "$GMP_NONSTD_ABI" && test $tmp_ext != "c"; then
25247 abi=`sed -n 's/^[ ]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file `
25248 if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then
25249 true
25250 else
25251 continue
25252 fi
25253 fi
25254
25255 mpn_objects="$mpn_objects ${tmp_prefix}_$tmp_fn.lo"
25256 mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/${tmp_prefix}_$tmp_fn.lo"
25257
25258 case $tmp_fn in
25259 dive_1) tmp_fbase=divexact_1 ;;
25260 diveby3) tmp_fbase=divexact_by3c ;;
25261 pre_divrem_1) tmp_fbase=preinv_divrem_1 ;;
25262 mode1o) tmp_fbase=modexact_1c_odd ;;
25263 pre_mod_1) tmp_fbase=preinv_mod_1 ;;
25264 mod_1_1) tmp_fbase=mod_1_1p ;;
25265 mod_1_1_cps) tmp_fbase=mod_1_1p_cps ;;
25266 mod_1_2) tmp_fbase=mod_1s_2p ;;
25267 mod_1_2_cps) tmp_fbase=mod_1s_2p_cps ;;
25268 mod_1_3) tmp_fbase=mod_1s_3p ;;
25269 mod_1_3_cps) tmp_fbase=mod_1s_3p_cps ;;
25270 mod_1_4) tmp_fbase=mod_1s_4p ;;
25271 mod_1_4_cps) tmp_fbase=mod_1s_4p_cps ;;
25272 *) tmp_fbase=$tmp_fn ;;
25273esac
25274
25275
25276 # carry-in variant, eg. divrem_1c or modexact_1c_odd
25277 case $tmp_fbase in
25278 *_1*) tmp_fbasec=`echo $tmp_fbase | sed 's/_1/_1c/'` ;;
25279 *) tmp_fbasec=${tmp_fbase}c ;;
25280 esac
25281
25282 # Create a little file doing an include from srcdir. The
25283 # OPERATION and renamings aren't all needed all the time, but
25284 # they don't hurt if unused.
25285 #
25286 # FIXME: Should generate these via config.status commands.
25287 # Would need them all in one AC_CONFIG_COMMANDS though, since
25288 # that macro doesn't accept a set of separate commands generated
25289 # by shell code.
25290 #
25291 case $tmp_ext in
25292 asm)
25293 # hide the d-n-l from autoconf's error checking
25294 tmp_d_n_l=d""nl
25295 echo "$tmp_d_n_l mpn_$tmp_fbase - from $tmp_dir directory for fat binary.
25296$tmp_d_n_l Generated by configure - DO NOT EDIT.
25297
25298define(OPERATION_$tmp_fn)
25299define(__gmpn_$tmp_fbase, __gmpn_${tmp_fbase}_$tmp_suffix)
25300define(__gmpn_$tmp_fbasec,__gmpn_${tmp_fbasec}_${tmp_suffix})
25301define(__gmpn_preinv_${tmp_fbase},__gmpn_preinv_${tmp_fbase}_${tmp_suffix})
25302define(__gmpn_${tmp_fbase}_cps,__gmpn_${tmp_fbase}_cps_${tmp_suffix})
25303
25304$tmp_d_n_l For k6 and k7 gcd_1 calling their corresponding mpn_modexact_1_odd
25305ifdef(\`__gmpn_modexact_1_odd',,
25306\`define(__gmpn_modexact_1_odd,__gmpn_modexact_1_odd_${tmp_suffix})')
25307
25308$THRESH_ASM_SETUP
25309include($mpn_relative_top_srcdir/mpn/$tmp_dir/$tmp_base.asm)
25310" >mpn/${tmp_prefix}_$tmp_fn.asm
25311 ;;
25312 c)
25313 echo "/* mpn_$tmp_fbase - from $tmp_dir directory for fat binary.
25314 Generated by configure - DO NOT EDIT. */
25315
25316#define OPERATION_$tmp_fn 1
25317#define __gmpn_$tmp_fbase __gmpn_${tmp_fbase}_$tmp_suffix
25318#define __gmpn_$tmp_fbasec __gmpn_${tmp_fbasec}_${tmp_suffix}
25319#define __gmpn_preinv_${tmp_fbase} __gmpn_preinv_${tmp_fbase}_${tmp_suffix}
25320#define __gmpn_${tmp_fbase}_cps __gmpn_${tmp_fbase}_cps_${tmp_suffix}
25321
25322#include \"$mpn_relative_top_srcdir/mpn/$tmp_dir/$tmp_base.c\"
25323" >mpn/${tmp_prefix}_$tmp_fn.c
25324 ;;
25325 esac
25326
25327 # Prototype, and append to CPUVEC_SETUP for this directory.
25328 echo "DECL_$tmp_fbase (__gmpn_${tmp_fbase}_$tmp_suffix);" >>fat.h
25329 CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.$tmp_fbase = __gmpn_${tmp_fbase}_${tmp_suffix}; \\
25330"
25331 # Ditto for any preinv variant (preinv_divrem_1, preinv_mod_1).
25332 if grep "^PROLOGUE(mpn_preinv_$tmp_fn)" $tmp_file >/dev/null; then
25333 echo "DECL_preinv_$tmp_fbase (__gmpn_preinv_${tmp_fbase}_$tmp_suffix);" >>fat.h
25334 CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.preinv_$tmp_fbase = __gmpn_preinv_${tmp_fbase}_${tmp_suffix}; \\
25335"
25336 fi
25337
25338 # Ditto for any mod_1...cps variant
25339 if grep "^PROLOGUE(mpn_${tmp_fbase}_cps)" $tmp_file >/dev/null; then
25340 echo "DECL_${tmp_fbase}_cps (__gmpn_${tmp_fbase}_cps_$tmp_suffix);" >>fat.h
25341 CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.${tmp_fbase}_cps = __gmpn_${tmp_fbase}_cps_${tmp_suffix}; \\
25342"
25343 fi
25344 fi
25345 done
25346 done
25347 done
25348
25349 # Emit CPUVEC_SETUP for this directory
25350 echo "" >>fat.h
25351 echo "#define CPUVEC_SETUP_$tmp_suffix \\" >>fat.h
25352 echo " do { \\" >>fat.h
25353 echo "$CPUVEC_SETUP } while (0)" >>fat.h
25354 done
25355
25356 # Emit threshold limits
25357 echo "" >>fat.h
25358 for tmp_tn in $fat_thresholds; do
25359 eval tmp_limit=\$${tmp_tn}_LIMIT
25360 echo "#define ${tmp_tn}_LIMIT $tmp_limit" >>fat.h
25361 done
25362fi
25363
25364
25365# Normal binary setups.
25366#
25367
25368for tmp_ext in asm S s c; do
25369 eval found_$tmp_ext=no
25370done
25371
25372for tmp_fn in $gmp_mpn_functions; do
25373 for tmp_ext in asm S s c; do
25374 test "$no_create" = yes || rm -f mpn/$tmp_fn.$tmp_ext
25375 done
25376
25377 # mpn_preinv_divrem_1 might have been provided by divrem_1.asm, likewise
25378 # mpn_preinv_mod_1 by mod_1.asm.
25379 case $tmp_fn in
25380 pre_divrem_1)
25381 if test "$HAVE_NATIVE_mpn_preinv_divrem_1" = yes; then continue; fi ;;
25382 pre_mod_1)
25383 if test "$HAVE_NATIVE_mpn_preinv_mod_1" = yes; then continue; fi ;;
25384 esac
25385
25386 # functions that can be provided by multi-function files
25387tmp_mulfunc=
25388case $tmp_fn in
25389 add_n|sub_n) tmp_mulfunc="aors_n" ;;
25390 add_err1_n|sub_err1_n)
25391 tmp_mulfunc="aors_err1_n" ;;
25392 add_err2_n|sub_err2_n)
25393 tmp_mulfunc="aors_err2_n" ;;
25394 add_err3_n|sub_err3_n)
25395 tmp_mulfunc="aors_err3_n" ;;
25396 cnd_add_n|cnd_sub_n) tmp_mulfunc="cnd_aors_n" ;;
25397 sec_add_1|sec_sub_1) tmp_mulfunc="sec_aors_1" ;;
25398 addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;;
25399 mul_2|addmul_2) tmp_mulfunc="aormul_2" ;;
25400 mul_3|addmul_3) tmp_mulfunc="aormul_3" ;;
25401 mul_4|addmul_4) tmp_mulfunc="aormul_4" ;;
25402 popcount|hamdist) tmp_mulfunc="popham" ;;
25403 and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n)
25404 tmp_mulfunc="logops_n" ;;
25405 lshift|rshift) tmp_mulfunc="lorrshift";;
25406 addlsh1_n)
25407 tmp_mulfunc="aorslsh1_n aorrlsh1_n aorsorrlsh1_n";;
25408 sublsh1_n)
25409 tmp_mulfunc="aorslsh1_n sorrlsh1_n aorsorrlsh1_n";;
25410 rsblsh1_n)
25411 tmp_mulfunc="aorrlsh1_n sorrlsh1_n aorsorrlsh1_n";;
25412 addlsh2_n)
25413 tmp_mulfunc="aorslsh2_n aorrlsh2_n aorsorrlsh2_n";;
25414 sublsh2_n)
25415 tmp_mulfunc="aorslsh2_n sorrlsh2_n aorsorrlsh2_n";;
25416 rsblsh2_n)
25417 tmp_mulfunc="aorrlsh2_n sorrlsh2_n aorsorrlsh2_n";;
25418 addlsh_n)
25419 tmp_mulfunc="aorslsh_n aorrlsh_n aorsorrlsh_n";;
25420 sublsh_n)
25421 tmp_mulfunc="aorslsh_n sorrlsh_n aorsorrlsh_n";;
25422 rsblsh_n)
25423 tmp_mulfunc="aorrlsh_n sorrlsh_n aorsorrlsh_n";;
25424 rsh1add_n|rsh1sub_n)
25425 tmp_mulfunc="rsh1aors_n";;
25426 sec_div_qr|sec_div_r)
25427 tmp_mulfunc="sec_div";;
25428 sec_pi1_div_qr|sec_pi1_div_r)
25429 tmp_mulfunc="sec_pi1_div";;
25430esac
25431
25432
25433 found=no
25434 for tmp_dir in $path; do
25435 for tmp_base in $tmp_fn $tmp_mulfunc; do
25436 for tmp_ext in asm S s c; do
25437 tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext
25438 if test -f $tmp_file; then
25439
25440 # For a nails build, check if the file supports our nail bits.
25441 # Generic code always supports all nails.
25442 #
25443 # FIXME: When a multi-function file is selected to provide one of
25444 # the nails-neutral routines, like logops_n for and_n, the
25445 # PROLOGUE grepping will create HAVE_NATIVE_mpn_<foo> defines for
25446 # all functions in that file, even if they haven't all been
25447 # nailified. Not sure what to do about this, it's only really a
25448 # problem for logops_n, and it's not too terrible to insist those
25449 # get nailified always.
25450 #
25451 if test $GMP_NAIL_BITS != 0 && test $tmp_dir != generic; then
25452 case $tmp_fn in
25453 and_n | ior_n | xor_n | andn_n | \
25454 copyi | copyd | \
25455 popcount | hamdist | \
25456 udiv | udiv_w_sdiv | umul | \
25457 cntlz | invert_limb)
25458 # these operations are either unaffected by nails or defined
25459 # to operate on full limbs
25460 ;;
25461 *)
25462 nails=`sed -n 's/^[ ]*NAILS_SUPPORT(\(.*\))/\1/p' $tmp_file `
25463 for n in $nails; do
25464 case $n in
25465 *-*)
25466 n_start=`echo "$n" | sed -n 's/\(.*\)-.*/\1/p'`
25467 n_end=`echo "$n" | sed -n 's/.*-\(.*\)/\1/p'`
25468 ;;
25469 *)
25470 n_start=$n
25471 n_end=$n
25472 ;;
25473 esac
25474 if test $GMP_NAIL_BITS -ge $n_start && test $GMP_NAIL_BITS -le $n_end; then
25475 found=yes
25476 break
25477 fi
25478 done
25479 if test $found != yes; then
25480 continue
25481 fi
25482 ;;
25483 esac
25484 fi
25485
25486 # If the host uses a non-standard ABI, check if tmp_file supports it
25487 #
25488 if test -n "$GMP_NONSTD_ABI" && test $tmp_ext != "c"; then
25489 abi=`sed -n 's/^[ ]*ABI_SUPPORT(\(.*\))/\1/p' $tmp_file `
25490 if echo "$abi" | grep -q "\\b${GMP_NONSTD_ABI}\\b"; then
25491 true
25492 else
25493 continue
25494 fi
25495 fi
25496
25497 found=yes
25498 eval found_$tmp_ext=yes
25499
25500 if test $tmp_ext = c; then
25501 tmp_u='$U'
25502 else
25503 tmp_u=
25504 fi
25505
25506 mpn_objects="$mpn_objects $tmp_fn$tmp_u.lo"
25507 mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/$tmp_fn$tmp_u.lo"
25508 ac_config_links="$ac_config_links mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext"
25509
25510 gmp_srclinks="$gmp_srclinks mpn/$tmp_fn.$tmp_ext"
25511
25512 # Duplicate AC_DEFINEs are harmless, so it doesn't matter
25513 # that multi-function files get grepped here repeatedly.
25514 # The PROLOGUE pattern excludes the optional second parameter.
25515 gmp_ep=`
25516 sed -n 's/^[ ]*MULFUNC_PROLOGUE(\(.*\))/\1/p' $tmp_file ;
25517 sed -n 's/^[ ]*PROLOGUE(\([^,]*\).*)/\1/p' $tmp_file
25518 `
25519 for gmp_tmp in $gmp_ep; do
25520 cat >>confdefs.h <<_ACEOF
25521#define HAVE_NATIVE_$gmp_tmp 1
25522_ACEOF
25523
25524 eval HAVE_NATIVE_$gmp_tmp=yes
25525 done
25526
25527 case $tmp_fn in
25528 sqr_basecase) sqr_basecase_source=$tmp_file ;;
25529 esac
25530
25531 break
25532 fi
25533 done
25534 if test $found = yes; then break ; fi
25535 done
25536 if test $found = yes; then break ; fi
25537 done
25538
25539 if test $found = no; then
25540 for tmp_optional in $gmp_mpn_functions_optional; do
25541 if test $tmp_optional = $tmp_fn; then
25542 found=yes
25543 fi
25544 done
25545 if test $found = no; then
25546 as_fn_error $? "no version of $tmp_fn found in path: $path" "$LINENO" 5
25547 fi
25548 fi
25549done
25550
25551# All cycle counters are .asm files currently
25552if test -n "$SPEED_CYCLECOUNTER_OBJ"; then
25553 found_asm=yes
25554fi
25555
25556
25557
25558
25559
25560# Don't demand an m4 unless it's actually needed.
25561if test $found_asm = yes; then
25562
25563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable m4" >&5
25564$as_echo_n "checking for suitable m4... " >&6; }
25565if ${gmp_cv_prog_m4+:} false; then :
25566 $as_echo_n "(cached) " >&6
25567else
25568 if test -n "$M4"; then
25569 gmp_cv_prog_m4="$M4"
25570else
25571 cat >conftest.m4 <<\EOF
25572define(dollarhash,``$#'')ifelse(dollarhash(x),1,`define(t1,Y)',
25573``bad: $# not supported (SunOS /usr/bin/m4)
25574'')ifelse(eval(89),89,`define(t2,Y)',
25575`bad: eval() doesnt support 8 or 9 in a constant (OpenBSD 2.6 m4)
25576')ifelse(eval(9,9),10,`define(t3,Y)',
25577`bad: eval() doesnt support radix in eval (FreeBSD 8.x,9.0,9.1,9.2 m4)
25578')ifelse(t1`'t2`'t3,YYY,`good
25579')
25580EOF
25581 echo "trying m4" >&5
25582 gmp_tmp_val=`(m4 conftest.m4) 2>&5`
25583 echo "$gmp_tmp_val" >&5
25584 if test "$gmp_tmp_val" = good; then
25585 gmp_cv_prog_m4="m4"
25586 else
25587 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
25588 ac_dummy="$PATH:/usr/5bin"
25589 for ac_dir in $ac_dummy; do
25590 test -z "$ac_dir" && ac_dir=.
25591 echo "trying $ac_dir/m4" >&5
25592 gmp_tmp_val=`($ac_dir/m4 conftest.m4) 2>&5`
25593 echo "$gmp_tmp_val" >&5
25594 if test "$gmp_tmp_val" = good; then
25595 gmp_cv_prog_m4="$ac_dir/m4"
25596 break
25597 fi
25598 done
25599 IFS="$ac_save_ifs"
25600 if test -z "$gmp_cv_prog_m4"; then
25601 as_fn_error $? "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5
25602 fi
25603 fi
25604 rm -f conftest.m4
25605fi
25606fi
25607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_prog_m4" >&5
25608$as_echo "$gmp_cv_prog_m4" >&6; }
25609M4="$gmp_cv_prog_m4"
25610
25611
25612
25613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if m4wrap produces spurious output" >&5
25614$as_echo_n "checking if m4wrap produces spurious output... " >&6; }
25615if ${gmp_cv_m4_m4wrap_spurious+:} false; then :
25616 $as_echo_n "(cached) " >&6
25617else
25618 # hide the d-n-l from autoconf's error checking
25619tmp_d_n_l=d""nl
25620cat >conftest.m4 <<EOF
25621changequote({,})define(x,)m4wrap({x})$tmp_d_n_l
25622EOF
25623echo test input is >&5
25624cat conftest.m4 >&5
25625tmp_chars=`$M4 conftest.m4 | wc -c`
25626echo produces $tmp_chars chars output >&5
25627rm -f conftest.m4
25628if test $tmp_chars = 0; then
25629 gmp_cv_m4_m4wrap_spurious=no
25630else
25631 gmp_cv_m4_m4wrap_spurious=yes
25632fi
25633
25634fi
25635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_m4_m4wrap_spurious" >&5
25636$as_echo "$gmp_cv_m4_m4wrap_spurious" >&6; }
25637
25638echo "define(<M4WRAP_SPURIOUS>,<$gmp_cv_m4_m4wrap_spurious>)" >> $gmp_tmpconfigm4
25639
25640
25641# else
25642# It's unclear why this m4-not-needed stuff was ever done.
25643# if test -z "$M4" ; then
25644# M4=m4-not-needed
25645# fi
25646fi
25647
25648# Only do the GMP_ASM checks if there's a .S or .asm wanting them.
25649if test $found_asm = no && test $found_S = no; then
25650 gmp_asm_syntax_testing=no
25651fi
25652
25653if test "$gmp_asm_syntax_testing" != no; then
25654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to text section" >&5
25655$as_echo_n "checking how to switch to text section... " >&6; }
25656if ${gmp_cv_asm_text+:} false; then :
25657 $as_echo_n "(cached) " >&6
25658else
25659 for i in ".text" ".code" ".csect .text[PR]"; do
25660 echo "trying $i" >&5
25661 cat >conftest.s <<EOF
25662 $i
25663EOF
25664gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
25665if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
25666 (eval $gmp_assemble) 2>&5
25667 ac_status=$?
25668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25669 test $ac_status = 0; }; then
25670 cat conftest.out >&5
25671 gmp_cv_asm_text=$i
25672 rm -f conftest*
25673 break
25674else
25675 cat conftest.out >&5
25676 echo "configure: failed program was:" >&5
25677 cat conftest.s >&5
25678 :
25679fi
25680rm -f conftest*
25681
25682done
25683if test -z "$gmp_cv_asm_text"; then
25684 as_fn_error $? "Cannot determine text section directive" "$LINENO" 5
25685fi
25686
25687fi
25688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_text" >&5
25689$as_echo "$gmp_cv_asm_text" >&6; }
25690echo "define(<TEXT>, <$gmp_cv_asm_text>)" >> $gmp_tmpconfigm4
25691
25692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to data section" >&5
25693$as_echo_n "checking how to switch to data section... " >&6; }
25694if ${gmp_cv_asm_data+:} false; then :
25695 $as_echo_n "(cached) " >&6
25696else
25697 case $host in
25698 *-*-aix*) gmp_cv_asm_data=".csect .data[RW]" ;;
25699 *) gmp_cv_asm_data=".data" ;;
25700esac
25701
25702fi
25703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_data" >&5
25704$as_echo "$gmp_cv_asm_data" >&6; }
25705echo "define(<DATA>, <$gmp_cv_asm_data>)" >> $gmp_tmpconfigm4
25706
25707
25708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler label suffix" >&5
25709$as_echo_n "checking for assembler label suffix... " >&6; }
25710if ${gmp_cv_asm_label_suffix+:} false; then :
25711 $as_echo_n "(cached) " >&6
25712else
25713 gmp_cv_asm_label_suffix=unknown
25714for i in "" ":"; do
25715 echo "trying $i" >&5
25716 cat >conftest.s <<EOF
25717 $gmp_cv_asm_text
25718somelabel$i
25719EOF
25720gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
25721if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
25722 (eval $gmp_assemble) 2>&5
25723 ac_status=$?
25724 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25725 test $ac_status = 0; }; then
25726 cat conftest.out >&5
25727 gmp_cv_asm_label_suffix=$i
25728 rm -f conftest*
25729 break
25730else
25731 cat conftest.out >&5
25732 echo "configure: failed program was:" >&5
25733 cat conftest.s >&5
25734 cat conftest.out >&5
25735fi
25736rm -f conftest*
25737
25738done
25739if test "$gmp_cv_asm_label_suffix" = "unknown"; then
25740 as_fn_error $? "Cannot determine label suffix" "$LINENO" 5
25741fi
25742
25743fi
25744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_label_suffix" >&5
25745$as_echo "$gmp_cv_asm_label_suffix" >&6; }
25746echo "define(<LABEL_SUFFIX>, <$gmp_cv_asm_label_suffix>)" >> $gmp_tmpconfigm4
25747
25748
25749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive" >&5
25750$as_echo_n "checking for assembler global directive... " >&6; }
25751if ${gmp_cv_asm_globl+:} false; then :
25752 $as_echo_n "(cached) " >&6
25753else
25754 case $host in
25755 hppa*-*-*) gmp_cv_asm_globl=.export ;;
25756 ia64*-*-* | itanium-*-* | itanium2-*-*) gmp_cv_asm_globl=.global ;;
25757 *) gmp_cv_asm_globl=.globl ;;
25758esac
25759
25760fi
25761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_globl" >&5
25762$as_echo "$gmp_cv_asm_globl" >&6; }
25763echo "define(<GLOBL>, <$gmp_cv_asm_globl>)" >> $gmp_tmpconfigm4
25764
25765
25766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive attribute" >&5
25767$as_echo_n "checking for assembler global directive attribute... " >&6; }
25768if ${gmp_cv_asm_globl_attr+:} false; then :
25769 $as_echo_n "(cached) " >&6
25770else
25771 case $gmp_cv_asm_globl in
25772 .export) gmp_cv_asm_globl_attr=",entry" ;;
25773 *) gmp_cv_asm_globl_attr="" ;;
25774esac
25775
25776fi
25777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_globl_attr" >&5
25778$as_echo "$gmp_cv_asm_globl_attr" >&6; }
25779echo "define(<GLOBL_ATTR>, <$gmp_cv_asm_globl_attr>)" >> $gmp_tmpconfigm4
25780
25781
25782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if globals are prefixed by underscore" >&5
25783$as_echo_n "checking if globals are prefixed by underscore... " >&6; }
25784if ${gmp_cv_asm_underscore+:} false; then :
25785 $as_echo_n "(cached) " >&6
25786else
25787 gmp_cv_asm_underscore="unknown"
25788cat >conftest.c <<EOF
25789int gurkmacka;
25790EOF
25791gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&5"
25792if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
25793 (eval $gmp_compile) 2>&5
25794 ac_status=$?
25795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25796 test $ac_status = 0; }; then
25797 $NM conftest.$OBJEXT >conftest.out
25798 if grep "[ ]_gurkmacka" conftest.out >/dev/null; then
25799 gmp_cv_asm_underscore=yes
25800 elif grep "[ ]gurkmacka" conftest.out >/dev/null; then
25801 gmp_cv_asm_underscore=no
25802 else
25803 echo "configure: $NM doesn't have gurkmacka:" >&5
25804 cat conftest.out >&5
25805 fi
25806else
25807 echo "configure: failed program was:" >&5
25808 cat conftest.c >&5
25809fi
25810rm -f conftest*
25811
25812fi
25813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_underscore" >&5
25814$as_echo "$gmp_cv_asm_underscore" >&6; }
25815case $gmp_cv_asm_underscore in
25816 yes)
25817
25818echo 'define(<GSYM_PREFIX>, <_>)' >>$gmp_tmpconfigm4
25819 ;;
25820 no)
25821
25822echo 'define(<GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4
25823 ;;
25824 *)
25825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
25826$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
25827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Cannot determine global symbol prefix." >&5
25828$as_echo "$as_me: WARNING: | Cannot determine global symbol prefix." >&2;}
25829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $NM output doesn't contain a global data symbol." >&5
25830$as_echo "$as_me: WARNING: | $NM output doesn't contain a global data symbol." >&2;}
25831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Will proceed with no underscore." >&5
25832$as_echo "$as_me: WARNING: | Will proceed with no underscore." >&2;}
25833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | If this is wrong then you'll get link errors referring" >&5
25834$as_echo "$as_me: WARNING: | If this is wrong then you'll get link errors referring" >&2;}
25835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | to ___gmpn_add_n (note three underscores)." >&5
25836$as_echo "$as_me: WARNING: | to ___gmpn_add_n (note three underscores)." >&2;}
25837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | In this case do a fresh build with an override," >&5
25838$as_echo "$as_me: WARNING: | In this case do a fresh build with an override," >&2;}
25839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | ./configure gmp_cv_asm_underscore=yes" >&5
25840$as_echo "$as_me: WARNING: | ./configure gmp_cv_asm_underscore=yes" >&2;}
25841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
25842$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
25843
25844echo 'define(<GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4
25845
25846 ;;
25847esac
25848
25849
25850
25851
25852
25853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to read-only data section" >&5
25854$as_echo_n "checking how to switch to read-only data section... " >&6; }
25855if ${gmp_cv_asm_rodata+:} false; then :
25856 $as_echo_n "(cached) " >&6
25857else
25858
25859case $host in
25860i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | x86_64-*-*)
25861 gmp_cv_asm_rodata="$gmp_cv_asm_data" ;;
25862*)
25863 gmp_cv_asm_rodata="$gmp_cv_asm_text" ;;
25864esac
25865
25866cat >conftest.c <<EOF
25867extern const int foo[]; /* Suppresses C++'s suppression of foo */
25868const int foo[] = {1,2,3};
25869EOF
25870echo "Test program:" >&5
25871cat conftest.c >&5
25872gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&5"
25873if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
25874 (eval $gmp_compile) 2>&5
25875 ac_status=$?
25876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25877 test $ac_status = 0; }; then
25878 echo "Compiler output:" >&5
25879 cat conftest.s >&5
25880 if test $gmp_cv_asm_underscore = yes; then
25881 tmp_gsym_prefix=_
25882 else
25883 tmp_gsym_prefix=
25884 fi
25885 # must see our label
25886 if grep "^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" conftest.s >/dev/null 2>&5; then
25887 # take the last directive before our label (hence skipping segments
25888 # getting debugging info etc)
25889 tmp_match=`sed -n "/^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix/q
25890 /^[. ]*data/p
25891 /^[. ]*rdata/p
25892 /^[. ]*text/p
25893 /^[. ]*section/p
25894 /^[. ]*csect/p
25895 /^[. ]*CSECT/p" conftest.s | sed -n '$p'`
25896 echo "Match: $tmp_match" >&5
25897 if test -n "$tmp_match"; then
25898 gmp_cv_asm_rodata=$tmp_match
25899 fi
25900 else
25901 echo "Couldn't find label: ^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" >&5
25902 fi
25903fi
25904rm -f conftest*
25905
25906fi
25907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_rodata" >&5
25908$as_echo "$gmp_cv_asm_rodata" >&6; }
25909echo "define(<RODATA>, <$gmp_cv_asm_rodata>)" >> $gmp_tmpconfigm4
25910
25911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .type directive" >&5
25912$as_echo_n "checking for assembler .type directive... " >&6; }
25913if ${gmp_cv_asm_type+:} false; then :
25914 $as_echo_n "(cached) " >&6
25915else
25916 gmp_cv_asm_type=
25917for gmp_tmp_prefix in @ \# %; do
25918 cat >conftest.s <<EOF
25919 .type sym,${gmp_tmp_prefix}function
25920EOF
25921gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
25922if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
25923 (eval $gmp_assemble) 2>&5
25924 ac_status=$?
25925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25926 test $ac_status = 0; }; then
25927 cat conftest.out >&5
25928 if grep "\.type pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ;
25929 else
25930 gmp_cv_asm_type=".type \$1,${gmp_tmp_prefix}\$2"
25931 break
25932 fi
25933else
25934 cat conftest.out >&5
25935 echo "configure: failed program was:" >&5
25936 cat conftest.s >&5
25937 :
25938fi
25939rm -f conftest*
25940
25941done
25942rm -f conftest*
25943
25944fi
25945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_type" >&5
25946$as_echo "$gmp_cv_asm_type" >&6; }
25947echo "define(<TYPE>, <$gmp_cv_asm_type>)" >> $gmp_tmpconfigm4
25948
25949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .size directive" >&5
25950$as_echo_n "checking for assembler .size directive... " >&6; }
25951if ${gmp_cv_asm_size+:} false; then :
25952 $as_echo_n "(cached) " >&6
25953else
25954 gmp_cv_asm_size=
25955cat >conftest.s <<EOF
25956 .size sym,1
25957EOF
25958gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
25959if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
25960 (eval $gmp_assemble) 2>&5
25961 ac_status=$?
25962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25963 test $ac_status = 0; }; then
25964 cat conftest.out >&5
25965 if grep "\.size pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ;
25966 else
25967 gmp_cv_asm_size=".size \$1,\$2"
25968 fi
25969else
25970 cat conftest.out >&5
25971 echo "configure: failed program was:" >&5
25972 cat conftest.s >&5
25973 :
25974fi
25975rm -f conftest*
25976
25977
25978fi
25979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_size" >&5
25980$as_echo "$gmp_cv_asm_size" >&6; }
25981echo "define(<SIZE>, <$gmp_cv_asm_size>)" >> $gmp_tmpconfigm4
25982
25983
25984
25985
25986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler local label prefix" >&5
25987$as_echo_n "checking for assembler local label prefix... " >&6; }
25988if ${gmp_cv_asm_lsym_prefix+:} false; then :
25989 $as_echo_n "(cached) " >&6
25990else
25991 gmp_tmp_pre_appears=yes
25992for gmp_tmp_pre in L .L $L $ L$; do
25993 echo "Trying $gmp_tmp_pre" >&5
25994 cat >conftest.s <<EOF
25995 $gmp_cv_asm_text
25996dummy${gmp_cv_asm_label_suffix}
25997${gmp_tmp_pre}gurkmacka${gmp_cv_asm_label_suffix}
25998EOF
25999gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26000if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26001 (eval $gmp_assemble) 2>&5
26002 ac_status=$?
26003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26004 test $ac_status = 0; }; then
26005 cat conftest.out >&5
26006 if $NM conftest.$OBJEXT >conftest.nm 2>&5; then : ; else
26007 cat conftest.nm >&5
26008 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"$NM\" failure" >&5
26009$as_echo "$as_me: WARNING: \"$NM\" failure" >&2;}
26010 break
26011 fi
26012 cat conftest.nm >&5
26013 if grep gurkmacka conftest.nm >/dev/null; then : ; else
26014 # no mention of the symbol, this is good
26015 echo "$gmp_tmp_pre label doesn't appear in object file at all (good)" >&5
26016 gmp_cv_asm_lsym_prefix="$gmp_tmp_pre"
26017 gmp_tmp_pre_appears=no
26018 break
26019 fi
26020 if grep ' [a-zN] .*gurkmacka' conftest.nm >/dev/null; then
26021 # symbol mentioned as a local, use this if nothing better
26022 echo "$gmp_tmp_pre label is local but still in object file" >&5
26023 if test -z "$gmp_cv_asm_lsym_prefix"; then
26024 gmp_cv_asm_lsym_prefix="$gmp_tmp_pre"
26025 fi
26026 else
26027 echo "$gmp_tmp_pre label is something unknown" >&5
26028 fi
26029
26030else
26031 cat conftest.out >&5
26032 echo "configure: failed program was:" >&5
26033 cat conftest.s >&5
26034 :
26035fi
26036rm -f conftest*
26037
26038done
26039rm -f conftest*
26040if test -z "$gmp_cv_asm_lsym_prefix"; then
26041 gmp_cv_asm_lsym_prefix=L
26042 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine local label, using default $gmp_cv_asm_lsym_prefix" >&5
26043$as_echo "$as_me: WARNING: cannot determine local label, using default $gmp_cv_asm_lsym_prefix" >&2;}
26044fi
26045# for development purposes, note whether we got a purely temporary local label
26046echo "Local label appears in object files: $gmp_tmp_pre_appears" >&5
26047
26048fi
26049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_lsym_prefix" >&5
26050$as_echo "$gmp_cv_asm_lsym_prefix" >&6; }
26051echo "define(<LSYM_PREFIX>, <${gmp_cv_asm_lsym_prefix}>)" >> $gmp_tmpconfigm4
26052
26053cat >>confdefs.h <<_ACEOF
26054#define LSYM_PREFIX "$gmp_cv_asm_lsym_prefix"
26055_ACEOF
26056
26057
26058
26059
26060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler byte directive" >&5
26061$as_echo_n "checking for assembler byte directive... " >&6; }
26062if ${gmp_cv_asm_byte+:} false; then :
26063 $as_echo_n "(cached) " >&6
26064else
26065 for i in .byte data1; do
26066 echo "trying $i" >&5
26067 cat >conftest.s <<EOF
26068 $gmp_cv_asm_data
26069 $i 0
26070
26071EOF
26072gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26073if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26074 (eval $gmp_assemble) 2>&5
26075 ac_status=$?
26076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26077 test $ac_status = 0; }; then
26078 cat conftest.out >&5
26079 gmp_cv_asm_byte=$i
26080 rm -f conftest*
26081 break
26082else
26083 cat conftest.out >&5
26084 echo "configure: failed program was:" >&5
26085 cat conftest.s >&5
26086 cat conftest.out >&5
26087fi
26088rm -f conftest*
26089
26090done
26091if test -z "$gmp_cv_asm_byte"; then
26092 as_fn_error $? "Cannot determine how to emit a data byte" "$LINENO" 5
26093fi
26094
26095fi
26096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_byte" >&5
26097$as_echo "$gmp_cv_asm_byte" >&6; }
26098
26099
26100
26101
26102
26103
26104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to define a 32-bit word" >&5
26105$as_echo_n "checking how to define a 32-bit word... " >&6; }
26106if ${gmp_cv_asm_w32+:} false; then :
26107 $as_echo_n "(cached) " >&6
26108else
26109 case $host in
26110 *-*-hpux*)
26111 # FIXME: HPUX puts first symbol at 0x40000000, breaking our assumption
26112 # that it's at 0x0. We'll have to declare another symbol before the
26113 # .long/.word and look at the distance between the two symbols. The
26114 # only problem is that the sed expression(s) barfs (on Solaris, for
26115 # example) for the symbol with value 0. For now, HPUX uses .word.
26116 gmp_cv_asm_w32=".word"
26117 ;;
26118 *-*-*)
26119 gmp_tmp_val=
26120 for gmp_tmp_op in .long .word data4; do
26121 cat >conftest.s <<EOF
26122 $gmp_cv_asm_data
26123 $gmp_cv_asm_globl foo
26124 $gmp_tmp_op 0
26125foo$gmp_cv_asm_label_suffix
26126 $gmp_cv_asm_byte 0
26127EOF
26128gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26129if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26130 (eval $gmp_assemble) 2>&5
26131 ac_status=$?
26132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26133 test $ac_status = 0; }; then
26134 cat conftest.out >&5
26135 gmp_tmp_val=`$NM conftest.$OBJEXT | grep foo | \
26136 sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'`
26137 if test "$gmp_tmp_val" = 4; then
26138 gmp_cv_asm_w32="$gmp_tmp_op"
26139 break
26140 fi
26141else
26142 cat conftest.out >&5
26143 echo "configure: failed program was:" >&5
26144 cat conftest.s >&5
26145 :
26146fi
26147rm -f conftest*
26148
26149 done
26150 rm -f conftest*
26151 ;;
26152esac
26153if test -z "$gmp_cv_asm_w32"; then
26154 as_fn_error $? "cannot determine how to define a 32-bit word" "$LINENO" 5
26155fi
26156
26157fi
26158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_w32" >&5
26159$as_echo "$gmp_cv_asm_w32" >&6; }
26160echo "define(<W32>, <$gmp_cv_asm_w32>)" >> $gmp_tmpconfigm4
26161
26162
26163
26164
26165
26166
26167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align assembly directive is logarithmic" >&5
26168$as_echo_n "checking if .align assembly directive is logarithmic... " >&6; }
26169if ${gmp_cv_asm_align_log+:} false; then :
26170 $as_echo_n "(cached) " >&6
26171else
26172 cat >conftest.s <<EOF
26173 $gmp_cv_asm_data
26174 .align 4
26175 $gmp_cv_asm_globl foo
26176 $gmp_cv_asm_byte 1
26177 .align 4
26178foo$gmp_cv_asm_label_suffix
26179 $gmp_cv_asm_byte 2
26180EOF
26181gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26182if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26183 (eval $gmp_assemble) 2>&5
26184 ac_status=$?
26185 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26186 test $ac_status = 0; }; then
26187 cat conftest.out >&5
26188 gmp_tmp_val=`$NM conftest.$OBJEXT | grep foo | \
26189 sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'`
26190 if test "$gmp_tmp_val" = "10" || test "$gmp_tmp_val" = "16"; then
26191 gmp_cv_asm_align_log=yes
26192 else
26193 gmp_cv_asm_align_log=no
26194 fi
26195else
26196 cat conftest.out >&5
26197 echo "configure: failed program was:" >&5
26198 cat conftest.s >&5
26199 as_fn_error $? "cannot assemble alignment test" "$LINENO" 5
26200fi
26201rm -f conftest*
26202
26203fi
26204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_align_log" >&5
26205$as_echo "$gmp_cv_asm_align_log" >&6; }
26206
26207
26208echo "define(<ALIGN_LOGARITHMIC>,<$gmp_cv_asm_align_log>)" >> $gmp_tmpconfigm4
26209
26210
26211
26212 case $host in
26213 arm*-*-* | aarch64*-*-*)
26214 case $ABI in
26215 32)
26216
26217echo "include_mpn(\`arm/arm-defs.m4')" >> $gmp_tmpconfigm4i
26218 ;;
26219 esac
26220 ;;
26221 hppa*-*-*)
26222 # for both pa32 and pa64
26223
26224echo "include_mpn(\`pa32/pa-defs.m4')" >> $gmp_tmpconfigm4i
26225
26226 ;;
26227 ia64*-*-* | itanium-*-* | itanium2-*-*)
26228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler .align padding is good" >&5
26229$as_echo_n "checking whether assembler .align padding is good... " >&6; }
26230if ${gmp_cv_asm_ia64_align_ok+:} false; then :
26231 $as_echo_n "(cached) " >&6
26232else
26233 cat >conftest.awk <<\EOF
26234BEGIN {
26235 want[0] = "011"
26236 want[1] = "160"
26237 want[2] = "074"
26238 want[3] = "040"
26239 want[4] = "000"
26240 want[5] = "040"
26241 want[6] = "020"
26242 want[7] = "221"
26243 want[8] = "114"
26244 want[9] = "000"
26245 want[10] = "100"
26246 want[11] = "200"
26247 want[12] = "122"
26248 want[13] = "261"
26249 want[14] = "000"
26250 want[15] = "200"
26251
26252 want[16] = "000"
26253 want[17] = "004"
26254 want[18] = "000"
26255 want[19] = "000"
26256 want[20] = "000"
26257 want[21] = "000"
26258 want[22] = "002"
26259 want[23] = "000"
26260 want[24] = "000"
26261 want[25] = "000"
26262 want[26] = "000"
26263 want[27] = "001"
26264 want[28] = "000"
26265 want[29] = "000"
26266 want[30] = "000"
26267 want[31] = "014"
26268
26269 want[32] = "011"
26270 want[33] = "270"
26271 want[34] = "140"
26272 want[35] = "062"
26273 want[36] = "000"
26274 want[37] = "040"
26275 want[38] = "240"
26276 want[39] = "331"
26277 want[40] = "160"
26278 want[41] = "000"
26279 want[42] = "100"
26280 want[43] = "240"
26281 want[44] = "343"
26282 want[45] = "371"
26283 want[46] = "000"
26284 want[47] = "200"
26285
26286 result = "yes"
26287}
26288{
26289 for (f = 2; f <= NF; f++)
26290 {
26291 for (i = 0; i < 47; i++)
26292 got[i] = got[i+1];
26293 got[47] = $f;
26294
26295 found = 1
26296 for (i = 0; i < 48; i++)
26297 if (got[i] != want[i])
26298 {
26299 found = 0
26300 break
26301 }
26302 if (found)
26303 {
26304 result = "no"
26305 exit
26306 }
26307 }
26308}
26309END {
26310 print result
26311}
26312EOF
26313cat >conftest.s <<EOF
26314 .text
26315 .align 32
26316{ .mmi; add r14 = r15, r16
26317 add r17 = r18, r19
26318 add r20 = r21, r22 ;; }
26319 .align 32
26320{ .mmi; add r23 = r24, r25
26321 add r26 = r27, r28
26322 add r29 = r30, r31 ;; }
26323
26324EOF
26325gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26326if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26327 (eval $gmp_assemble) 2>&5
26328 ac_status=$?
26329 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26330 test $ac_status = 0; }; then
26331 cat conftest.out >&5
26332 gmp_cv_asm_ia64_align_ok=`od -b conftest.$OBJEXT | $AWK -f conftest.awk`
26333else
26334 cat conftest.out >&5
26335 echo "configure: failed program was:" >&5
26336 cat conftest.s >&5
26337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oops, cannot compile test program" >&5
26338$as_echo "$as_me: WARNING: oops, cannot compile test program" >&2;}
26339 gmp_cv_asm_ia64_align_ok=yes
26340fi
26341rm -f conftest*
26342
26343
26344fi
26345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_ia64_align_ok" >&5
26346$as_echo "$gmp_cv_asm_ia64_align_ok" >&6; }
26347
26348echo "define(<IA64_ALIGN_OK>, <\`$gmp_cv_asm_ia64_align_ok'>)" >> $gmp_tmpconfigm4
26349
26350
26351 ;;
26352 m68k-*-* | m68[0-9][0-9][0-9]-*-*)
26353
26354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler instruction and register style" >&5
26355$as_echo_n "checking assembler instruction and register style... " >&6; }
26356if ${gmp_cv_asm_m68k_instruction+:} false; then :
26357 $as_echo_n "(cached) " >&6
26358else
26359 for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do
26360 cat >conftest.s <<EOF
26361 $gmp_cv_asm_text
26362 $i
26363EOF
26364gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26365if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26366 (eval $gmp_assemble) 2>&5
26367 ac_status=$?
26368 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26369 test $ac_status = 0; }; then
26370 cat conftest.out >&5
26371 gmp_cv_asm_m68k_instruction=$i
26372 rm -f conftest*
26373 break
26374else
26375 cat conftest.out >&5
26376 echo "configure: failed program was:" >&5
26377 cat conftest.s >&5
26378 :
26379fi
26380rm -f conftest*
26381
26382done
26383if test -z "$gmp_cv_asm_m68k_instruction"; then
26384 as_fn_error $? "cannot determine assembler instruction and register style" "$LINENO" 5
26385fi
26386
26387fi
26388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_instruction" >&5
26389$as_echo "$gmp_cv_asm_m68k_instruction" >&6; }
26390case $gmp_cv_asm_m68k_instruction in
26391"addl d0,d1") want_dot_size=no; want_register_percent=no ;;
26392"addl %d0,%d1") want_dot_size=no; want_register_percent=yes ;;
26393"add.l d0,d1") want_dot_size=yes; want_register_percent=no ;;
26394"add.l %d0,%d1") want_dot_size=yes; want_register_percent=yes ;;
26395*) as_fn_error $? "oops, unrecognised instruction and register style" "$LINENO" 5 ;;
26396esac
26397
26398echo "define(<WANT_REGISTER_PERCENT>, <\`$want_register_percent'>)" >> $gmp_tmpconfigm4
26399
26400
26401echo "define(<WANT_DOT_SIZE>, <\`$want_dot_size'>)" >> $gmp_tmpconfigm4
26402
26403
26404
26405
26406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler addressing style" >&5
26407$as_echo_n "checking assembler addressing style... " >&6; }
26408if ${gmp_cv_asm_m68k_addressing+:} false; then :
26409 $as_echo_n "(cached) " >&6
26410else
26411 case $gmp_cv_asm_m68k_instruction in
26412addl*) movel=movel ;;
26413add.l*) movel=move.l ;;
26414*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;;
26415esac
26416case $gmp_cv_asm_m68k_instruction in
26417*"%d0,%d1") dreg=%d0; areg=%a0 ;;
26418*"d0,d1") dreg=d0; areg=a0 ;;
26419*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;;
26420esac
26421cat >conftest.s <<EOF
26422 $gmp_cv_asm_text
26423 $movel $dreg, $areg@-
26424EOF
26425gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26426if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26427 (eval $gmp_assemble) 2>&5
26428 ac_status=$?
26429 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26430 test $ac_status = 0; }; then
26431 cat conftest.out >&5
26432 gmp_cv_asm_m68k_addressing=mit
26433else
26434 cat conftest.out >&5
26435 echo "configure: failed program was:" >&5
26436 cat conftest.s >&5
26437 cat >conftest.s <<EOF
26438 $gmp_cv_asm_text
26439 $movel $dreg, -($areg)
26440EOF
26441gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26442if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26443 (eval $gmp_assemble) 2>&5
26444 ac_status=$?
26445 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26446 test $ac_status = 0; }; then
26447 cat conftest.out >&5
26448 gmp_cv_asm_m68k_addressing=motorola
26449else
26450 cat conftest.out >&5
26451 echo "configure: failed program was:" >&5
26452 cat conftest.s >&5
26453 as_fn_error $? "cannot determine assembler addressing style" "$LINENO" 5
26454fi
26455rm -f conftest*
26456
26457fi
26458rm -f conftest*
26459
26460
26461fi
26462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_addressing" >&5
26463$as_echo "$gmp_cv_asm_m68k_addressing" >&6; }
26464
26465echo "define(<WANT_ADDRESSING>, <\`$gmp_cv_asm_m68k_addressing'>)" >> $gmp_tmpconfigm4
26466
26467
26468
26469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler shortest branches" >&5
26470$as_echo_n "checking assembler shortest branches... " >&6; }
26471if ${gmp_cv_asm_m68k_branches+:} false; then :
26472 $as_echo_n "(cached) " >&6
26473else
26474 for i in jra jbra bra; do
26475 cat >conftest.s <<EOF
26476 $gmp_cv_asm_text
26477foo$gmp_cv_asm_label_suffix
26478 $i foo
26479EOF
26480gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26481if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26482 (eval $gmp_assemble) 2>&5
26483 ac_status=$?
26484 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26485 test $ac_status = 0; }; then
26486 cat conftest.out >&5
26487 gmp_cv_asm_m68k_branches=$i
26488 rm -f conftest*
26489 break
26490else
26491 cat conftest.out >&5
26492 echo "configure: failed program was:" >&5
26493 cat conftest.s >&5
26494 :
26495fi
26496rm -f conftest*
26497
26498done
26499if test -z "$gmp_cv_asm_m68k_branches"; then
26500 as_fn_error $? "cannot determine assembler branching style" "$LINENO" 5
26501fi
26502
26503fi
26504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_m68k_branches" >&5
26505$as_echo "$gmp_cv_asm_m68k_branches" >&6; }
26506
26507echo "define(<WANT_BRANCHES>, <\`$gmp_cv_asm_m68k_branches'>)" >> $gmp_tmpconfigm4
26508
26509
26510 ;;
26511 powerpc*-*-* | power[3-9]-*-*)
26512
26513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler output is PIC by default" >&5
26514$as_echo_n "checking whether compiler output is PIC by default... " >&6; }
26515if ${gmp_cv_asm_powerpc_pic+:} false; then :
26516 $as_echo_n "(cached) " >&6
26517else
26518 gmp_cv_asm_powerpc_pic=yes
26519cat >conftest.c <<EOF
26520int foo;
26521int *bar() { return &foo; }
26522EOF
26523echo "Test program:" >&5
26524cat conftest.c >&5
26525gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&5"
26526if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
26527 (eval $gmp_compile) 2>&5
26528 ac_status=$?
26529 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26530 test $ac_status = 0; }; then
26531 echo "Compiler output:" >&5
26532 cat conftest.s >&5
26533 if grep 'foo@ha' conftest.s >/dev/null 2>&5; then
26534 gmp_cv_asm_powerpc_pic=no
26535 fi
26536 if grep 'ha16(_foo)' conftest.s >/dev/null 2>&5; then
26537 gmp_cv_asm_powerpc_pic=no
26538 fi
26539fi
26540rm -f conftest*
26541
26542fi
26543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_powerpc_pic" >&5
26544$as_echo "$gmp_cv_asm_powerpc_pic" >&6; }
26545
26546echo "define(<PIC_ALWAYS>,<$gmp_cv_asm_powerpc_pic>)" >> $gmp_tmpconfigm4
26547
26548
26549
26550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler needs r on registers" >&5
26551$as_echo_n "checking if the assembler needs r on registers... " >&6; }
26552if ${gmp_cv_asm_powerpc_r_registers+:} false; then :
26553 $as_echo_n "(cached) " >&6
26554else
26555 cat >conftest.s <<EOF
26556 $gmp_cv_asm_text
26557 mtctr 6
26558EOF
26559gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26560if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26561 (eval $gmp_assemble) 2>&5
26562 ac_status=$?
26563 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26564 test $ac_status = 0; }; then
26565 cat conftest.out >&5
26566 gmp_cv_asm_powerpc_r_registers=no
26567else
26568 cat conftest.out >&5
26569 echo "configure: failed program was:" >&5
26570 cat conftest.s >&5
26571 cat >conftest.s <<EOF
26572 $gmp_cv_asm_text
26573 mtctr r6
26574EOF
26575gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26576if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26577 (eval $gmp_assemble) 2>&5
26578 ac_status=$?
26579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26580 test $ac_status = 0; }; then
26581 cat conftest.out >&5
26582 gmp_cv_asm_powerpc_r_registers=yes
26583else
26584 cat conftest.out >&5
26585 echo "configure: failed program was:" >&5
26586 cat conftest.s >&5
26587 as_fn_error $? "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5
26588fi
26589rm -f conftest*
26590
26591fi
26592rm -f conftest*
26593
26594fi
26595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_powerpc_r_registers" >&5
26596$as_echo "$gmp_cv_asm_powerpc_r_registers" >&6; }
26597
26598
26599echo "define(<WANT_R_REGISTERS>,<$gmp_cv_asm_powerpc_r_registers>)" >> $gmp_tmpconfigm4
26600
26601
26602
26603echo "include_mpn(\`powerpc32/powerpc-defs.m4')" >> $gmp_tmpconfigm4i
26604
26605
26606 # Check for Linux ELFv1 ABI
26607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26608/* end confdefs.h. */
26609#if _CALL_ELF == 1
26610yes
26611#endif
26612_ACEOF
26613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26614 $EGREP "yes" >/dev/null 2>&1; then :
26615
26616echo "define(<ELFv1_ABI>)" >> $gmp_tmpconfigm4
26617
26618fi
26619rm -f conftest*
26620
26621
26622 # Check for Linux ELFv2 ABI
26623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26624/* end confdefs.h. */
26625#if _CALL_ELF == 2
26626yes
26627#endif
26628_ACEOF
26629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26630 $EGREP "yes" >/dev/null 2>&1; then :
26631
26632echo "define(<ELFv2_ABI>)" >> $gmp_tmpconfigm4
26633
26634fi
26635rm -f conftest*
26636
26637
26638 case $host in
26639 *-*-aix*)
26640 case $ABI in
26641 mode64)
26642echo "include_mpn(\`powerpc64/aix.m4')" >> $gmp_tmpconfigm4i
26643 ;;
26644 *)
26645echo "include_mpn(\`powerpc32/aix.m4')" >> $gmp_tmpconfigm4i
26646 ;;
26647 esac
26648 ;;
26649 *-*-linux* | *-*-*bsd*)
26650 case $ABI in
26651 mode64)
26652echo "include_mpn(\`powerpc64/elf.m4')" >> $gmp_tmpconfigm4i
26653 ;;
26654 mode32 | 32)
26655echo "include_mpn(\`powerpc32/elf.m4')" >> $gmp_tmpconfigm4i
26656 ;;
26657 esac
26658 ;;
26659 *-*-darwin*)
26660 case $ABI in
26661 mode64)
26662echo "include_mpn(\`powerpc64/darwin.m4')" >> $gmp_tmpconfigm4i
26663 ;;
26664 mode32 | 32)
26665echo "include_mpn(\`powerpc32/darwin.m4')" >> $gmp_tmpconfigm4i
26666 ;;
26667 esac
26668 ;;
26669 *)
26670 # Assume unrecognized operating system is the powerpc eABI
26671
26672echo "include_mpn(\`powerpc32/eabi.m4')" >> $gmp_tmpconfigm4i
26673
26674 ;;
26675 esac
26676 ;;
26677 power*-*-aix*)
26678
26679echo "include_mpn(\`powerpc32/aix.m4')" >> $gmp_tmpconfigm4i
26680
26681 ;;
26682 *sparc*-*-*)
26683 case $ABI in
26684 64)
26685
26686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts \".register\"" >&5
26687$as_echo_n "checking if the assembler accepts \".register\"... " >&6; }
26688if ${gmp_cv_asm_sparc_register+:} false; then :
26689 $as_echo_n "(cached) " >&6
26690else
26691 cat >conftest.s <<EOF
26692 $gmp_cv_asm_text
26693 .register %g2,#scratch
26694
26695EOF
26696gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26697if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26698 (eval $gmp_assemble) 2>&5
26699 ac_status=$?
26700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26701 test $ac_status = 0; }; then
26702 cat conftest.out >&5
26703 gmp_cv_asm_sparc_register=yes
26704else
26705 cat conftest.out >&5
26706 echo "configure: failed program was:" >&5
26707 cat conftest.s >&5
26708 gmp_cv_asm_sparc_register=no
26709fi
26710rm -f conftest*
26711
26712fi
26713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_register" >&5
26714$as_echo "$gmp_cv_asm_sparc_register" >&6; }
26715
26716
26717echo "define(<HAVE_REGISTER>,<$gmp_cv_asm_sparc_register>)" >> $gmp_tmpconfigm4
26718
26719
26720 ;;
26721 esac
26722
26723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts gotdata relocations" >&5
26724$as_echo_n "checking if the assembler accepts gotdata relocations... " >&6; }
26725if ${gmp_cv_asm_sparc_gotdata+:} false; then :
26726 $as_echo_n "(cached) " >&6
26727else
26728 cat >conftest.s <<EOF
26729 $gmp_cv_asm_text
26730 .text
26731 sethi %gdop_hix22(symbol), %g1
26732 or %g1, %gdop_lox10(symbol), %g1
26733
26734EOF
26735gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26736if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26737 (eval $gmp_assemble) 2>&5
26738 ac_status=$?
26739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26740 test $ac_status = 0; }; then
26741 cat conftest.out >&5
26742 gmp_cv_asm_sparc_gotdata=yes
26743else
26744 cat conftest.out >&5
26745 echo "configure: failed program was:" >&5
26746 cat conftest.s >&5
26747 gmp_cv_asm_sparc_gotdata=no
26748fi
26749rm -f conftest*
26750
26751fi
26752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_gotdata" >&5
26753$as_echo "$gmp_cv_asm_sparc_gotdata" >&6; }
26754
26755
26756echo "define(<HAVE_GOTDATA>,<$gmp_cv_asm_sparc_gotdata>)" >> $gmp_tmpconfigm4
26757
26758
26759
26760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler can support shared PIC thunks" >&5
26761$as_echo_n "checking if the assembler can support shared PIC thunks... " >&6; }
26762if ${gmp_cv_asm_sparc_shared_thunks+:} false; then :
26763 $as_echo_n "(cached) " >&6
26764else
26765 cat >conftest.s <<EOF
26766 $gmp_cv_asm_text
26767 .section .text.__sparc_get_pc_thunk.l7,"axG",@progbits,__sparc_get_pc_thunk.l7,comdat
26768 .weak __sparc_get_pc_thunk.l7
26769 .hidden __sparc_get_pc_thunk.l7
26770 .type __sparc_get_pc_thunk.l7, #function
26771__sparc_get_pc_thunk.l7:
26772 jmp %o7+8
26773 add %o7, %l7, %l7
26774
26775EOF
26776gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26777if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26778 (eval $gmp_assemble) 2>&5
26779 ac_status=$?
26780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26781 test $ac_status = 0; }; then
26782 cat conftest.out >&5
26783 gmp_cv_asm_sparc_shared_thunks=yes
26784else
26785 cat conftest.out >&5
26786 echo "configure: failed program was:" >&5
26787 cat conftest.s >&5
26788 gmp_cv_asm_sparc_shared_thunks=no
26789fi
26790rm -f conftest*
26791
26792fi
26793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_sparc_shared_thunks" >&5
26794$as_echo "$gmp_cv_asm_sparc_shared_thunks" >&6; }
26795
26796
26797echo "define(<HAVE_SHARED_THUNKS>,<$gmp_cv_asm_sparc_shared_thunks>)" >> $gmp_tmpconfigm4
26798
26799
26800 ;;
26801 i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar*-*-* | bulldozer*-*-* | piledriver*-*-* | steamroller*-*-* | excavator*-*-* | zen*-*-* | pentium4-*-* | atom-*-* | silvermont-*-* | goldmont-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-* | nehalem*-*-* | westmere*-*-* | sandybridge*-*-* | ivybridge*-*-* | haswell*-*-* | broadwell*-*-* | skylake*-*-* | kabylake*-*-*)
26802
26803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the .align directive accepts an 0x90 fill in .text" >&5
26804$as_echo_n "checking if the .align directive accepts an 0x90 fill in .text... " >&6; }
26805if ${gmp_cv_asm_align_fill_0x90+:} false; then :
26806 $as_echo_n "(cached) " >&6
26807else
26808 cat >conftest.s <<EOF
26809 $gmp_cv_asm_text
26810 .align 4, 0x90
26811 .byte 0
26812 .align 4, 0x90
26813EOF
26814gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26815if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26816 (eval $gmp_assemble) 2>&5
26817 ac_status=$?
26818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26819 test $ac_status = 0; }; then
26820 cat conftest.out >&5
26821 if grep "Warning: Fill parameter ignored for executable section" conftest.out >/dev/null; then
26822 echo "Suppressing this warning by omitting 0x90" 1>&5
26823 gmp_cv_asm_align_fill_0x90=no
26824else
26825 gmp_cv_asm_align_fill_0x90=yes
26826fi
26827else
26828 cat conftest.out >&5
26829 echo "configure: failed program was:" >&5
26830 cat conftest.s >&5
26831 gmp_cv_asm_align_fill_0x90=no
26832fi
26833rm -f conftest*
26834
26835fi
26836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_align_fill_0x90" >&5
26837$as_echo "$gmp_cv_asm_align_fill_0x90" >&6; }
26838
26839
26840echo "define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)" >> $gmp_tmpconfigm4
26841
26842
26843 if test "$x86_have_mulx" = yes; then
26844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about the mulx instruction" >&5
26845$as_echo_n "checking if the assembler knows about the mulx instruction... " >&6; }
26846if ${gmp_cv_asm_x86_mulx+:} false; then :
26847 $as_echo_n "(cached) " >&6
26848else
26849 cat >conftest.s <<EOF
26850 .text
26851 mulx %r8, %r9, %r10
26852EOF
26853gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26854if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26855 (eval $gmp_assemble) 2>&5
26856 ac_status=$?
26857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26858 test $ac_status = 0; }; then
26859 cat conftest.out >&5
26860 gmp_cv_asm_x86_mulx=yes
26861else
26862 cat conftest.out >&5
26863 echo "configure: failed program was:" >&5
26864 cat conftest.s >&5
26865 gmp_cv_asm_x86_mulx=no
26866fi
26867rm -f conftest*
26868
26869
26870fi
26871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_mulx" >&5
26872$as_echo "$gmp_cv_asm_x86_mulx" >&6; }
26873case $gmp_cv_asm_x86_mulx in
26874yes)
26875
26876$as_echo "#define X86_ASM_MULX 1" >>confdefs.h
26877
26878 :
26879 ;;
26880*)
26881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
26882$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
26883 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | WARNING WARNING WARNING" >&5
26884$as_echo "$as_me: WARNING: | WARNING WARNING WARNING" >&2;}
26885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Host CPU has the mulx instruction, but it can't be" >&5
26886$as_echo "$as_me: WARNING: | Host CPU has the mulx instruction, but it can't be" >&2;}
26887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | assembled by" >&5
26888$as_echo "$as_me: WARNING: | assembled by" >&2;}
26889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&5
26890$as_echo "$as_me: WARNING: | $CCAS $CFLAGS $CPPFLAGS" >&2;}
26891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | Older x86 instructions will be used." >&5
26892$as_echo "$as_me: WARNING: | Older x86 instructions will be used." >&2;}
26893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | This will be an inferior build." >&5
26894$as_echo "$as_me: WARNING: | This will be an inferior build." >&2;}
26895 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +----------------------------------------------------------" >&5
26896$as_echo "$as_me: WARNING: +----------------------------------------------------------" >&2;}
26897 :
26898 ;;
26899esac
26900
26901 fi
26902 case $ABI in
26903 32)
26904
26905echo "include_mpn(\`x86/x86-defs.m4')" >> $gmp_tmpconfigm4i
26906
26907 $as_echo "#define HAVE_HOST_CPU_FAMILY_x86 1" >>confdefs.h
26908
26909
26910
26911
26912
26913
26914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler COFF type directives" >&5
26915$as_echo_n "checking for assembler COFF type directives... " >&6; }
26916if ${gmp_cv_asm_x86_coff_type+:} false; then :
26917 $as_echo_n "(cached) " >&6
26918else
26919 cat >conftest.s <<EOF
26920 $gmp_cv_asm_text
26921 $gmp_cv_asm_globl ${tmp_gsym_prefix}foo$gmp_cv_asm_globl_attr
26922 .def ${tmp_gsym_prefix}foo
26923 .scl 2
26924 .type 32
26925 .endef
26926${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix
26927
26928EOF
26929gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
26930if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
26931 (eval $gmp_assemble) 2>&5
26932 ac_status=$?
26933 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26934 test $ac_status = 0; }; then
26935 cat conftest.out >&5
26936 gmp_cv_asm_x86_coff_type=yes
26937else
26938 cat conftest.out >&5
26939 echo "configure: failed program was:" >&5
26940 cat conftest.s >&5
26941 gmp_cv_asm_x86_coff_type=no
26942fi
26943rm -f conftest*
26944
26945
26946fi
26947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_coff_type" >&5
26948$as_echo "$gmp_cv_asm_x86_coff_type" >&6; }
26949echo "define(<HAVE_COFF_TYPE>, <$gmp_cv_asm_x86_coff_type>)" >> $gmp_tmpconfigm4
26950
26951
26952
26953
26954
26955
26956
26957
26958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore" >&5
26959$as_echo_n "checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore... " >&6; }
26960if ${gmp_cv_asm_x86_got_underscore+:} false; then :
26961 $as_echo_n "(cached) " >&6
26962else
26963 gmp_cv_asm_x86_got_underscore="not applicable"
26964if test $gmp_cv_asm_underscore = yes; then
26965 tmp_gsym_prefix=_
26966else
26967 tmp_gsym_prefix=
26968fi
26969for tmp_underscore in "" "_"; do
26970 cat >conftest.s <<EOF
26971 $gmp_cv_asm_text
26972 $gmp_cv_asm_globl ${tmp_gsym_prefix}main$gmp_cv_asm_globl_attr
26973${tmp_gsym_prefix}main$gmp_cv_asm_label_suffix
26974 addl $ ${tmp_underscore}_GLOBAL_OFFSET_TABLE_, %ebx
26975EOF
26976 gmp_compile="$CCAS $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.s >&5 && $CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic conftest.$OBJEXT >&5"
26977 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5
26978 (eval $gmp_compile) 2>&5
26979 ac_status=$?
26980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26981 test $ac_status = 0; }; then
26982 if test "$tmp_underscore" = "_"; then
26983 gmp_cv_asm_x86_got_underscore=yes
26984 else
26985 gmp_cv_asm_x86_got_underscore=no
26986 fi
26987 break
26988 fi
26989done
26990rm -f conftest* a.out b.out a.exe a_out.exe
26991
26992fi
26993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_got_underscore" >&5
26994$as_echo "$gmp_cv_asm_x86_got_underscore" >&6; }
26995if test "$gmp_cv_asm_x86_got_underscore" = "yes"; then
26996
26997echo 'define(<GOT_GSYM_PREFIX>, <_>)' >>$gmp_tmpconfigm4
26998
26999else
27000
27001echo 'define(<GOT_GSYM_PREFIX>, <>)' >>$gmp_tmpconfigm4
27002
27003fi
27004
27005
27006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler takes cl with shldl" >&5
27007$as_echo_n "checking if the assembler takes cl with shldl... " >&6; }
27008if ${gmp_cv_asm_x86_shldl_cl+:} false; then :
27009 $as_echo_n "(cached) " >&6
27010else
27011 cat >conftest.s <<EOF
27012 $gmp_cv_asm_text
27013 shldl %cl, %eax, %ebx
27014EOF
27015gmp_assemble="$CCAS $CFLAGS $CPPFLAGS conftest.s >conftest.out 2>&1"
27016if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_assemble\""; } >&5
27017 (eval $gmp_assemble) 2>&5
27018 ac_status=$?
27019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27020 test $ac_status = 0; }; then
27021 cat conftest.out >&5
27022 gmp_cv_asm_x86_shldl_cl=yes
27023else
27024 cat conftest.out >&5
27025 echo "configure: failed program was:" >&5
27026 cat conftest.s >&5
27027 gmp_cv_asm_x86_shldl_cl=no
27028fi
27029rm -f conftest*
27030
27031
27032fi
27033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gmp_cv_asm_x86_shldl_cl" >&5
27034$as_echo "$gmp_cv_asm_x86_shldl_cl" >&6; }
27035if test "$gmp_cv_asm_x86_shldl_cl" = "yes"; then
27036
27037echo 'define(<WANT_SHLDL_CL>, <1>)' >>$gmp_tmpconfigm4
27038
27039else
27040
27041echo 'define(<WANT_SHLDL_CL>, <0>)' >>$gmp_tmpconfigm4
27042
27043fi
27044
27045 case $enable_profiling in
27046 prof | gprof) # Check whether --enable-shared was given.
27047if test "${enable_shared+set}" = set; then :
27048 enableval=$enable_shared; p=${PACKAGE-default}
27049 case $enableval in
27050 yes) enable_shared=yes ;;
27051 no) enable_shared=no ;;
27052 *)
27053 enable_shared=no
27054 # Look at the argument we got. We use all the common list separators.
27055 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
27056 for pkg in $enableval; do
27057 IFS=$lt_save_ifs
27058 if test "X$pkg" = "X$p"; then
27059 enable_shared=yes
27060 fi
27061 done
27062 IFS=$lt_save_ifs
27063 ;;
27064 esac
27065else
27066 enable_shared=yes
27067fi
27068
27069
27070
27071
27072
27073
27074
27075
27076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to call x86 mcount" >&5
27077$as_echo_n "checking how to call x86 mcount... " >&6; }
27078cat >conftest.c <<EOF
27079foo(){bar();}
27080EOF
27081
27082if test "$enable_static" = yes; then
27083 gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c 1>&5"
27084 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_asmout_compile\""; } >&5
27085 (eval $gmp_asmout_compile) 2>&5
27086 ac_status=$?
27087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27088 test $ac_status = 0; }; then
27089 if grep '\.data' conftest.s >/dev/null; then
27090 mcount_nonpic_reg=`sed -n '/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p' conftest.s`
27091 else
27092 mcount_nonpic_reg=
27093 fi
27094 mcount_nonpic_call=`grep 'call.*mcount' conftest.s`
27095 if test -z "$mcount_nonpic_call"; then
27096 as_fn_error $? "Cannot find mcount call for non-PIC" "$LINENO" 5
27097 fi
27098 else
27099 as_fn_error $? "Cannot compile test program for non-PIC" "$LINENO" 5
27100 fi
27101fi
27102
27103if test "$enable_shared" = yes; then
27104 gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic -S conftest.c 1>&5"
27105 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_asmout_compile\""; } >&5
27106 (eval $gmp_asmout_compile) 2>&5
27107 ac_status=$?
27108 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27109 test $ac_status = 0; }; then
27110 if grep '\.data' conftest.s >/dev/null; then
27111 case $lt_prog_compiler_pic in
27112 *-DDLL_EXPORT*)
27113 # Windows DLLs have non-PIC style mcount
27114 mcount_pic_reg=`sed -n '/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p' conftest.s`
27115 ;;
27116 *)
27117 mcount_pic_reg=`sed -n 's/.*GOTOFF.*,\(%[a-z]*\).*$/\1/p' conftest.s`
27118 ;;
27119 esac
27120 else
27121 mcount_pic_reg=
27122 fi
27123 mcount_pic_call=`grep 'call.*mcount' conftest.s`
27124 if test -z "$mcount_pic_call"; then
27125 as_fn_error $? "Cannot find mcount call for PIC" "$LINENO" 5
27126 fi
27127 else
27128 as_fn_error $? "Cannot compile test program for PIC" "$LINENO" 5
27129 fi
27130fi
27131
27132
27133echo "define(<MCOUNT_NONPIC_REG>, <\`$mcount_nonpic_reg'>)" >> $gmp_tmpconfigm4
27134
27135
27136echo "define(<MCOUNT_NONPIC_CALL>,<\`$mcount_nonpic_call'>)" >> $gmp_tmpconfigm4
27137
27138
27139echo "define(<MCOUNT_PIC_REG>, <\`$mcount_pic_reg'>)" >> $gmp_tmpconfigm4
27140
27141
27142echo "define(<MCOUNT_PIC_CALL>, <\`$mcount_pic_call'>)" >> $gmp_tmpconfigm4
27143
27144
27145rm -f conftest.*
27146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: determined" >&5
27147$as_echo "determined" >&6; }
27148 ;;
27149 esac
27150 case $host in
27151 *-*-darwin*)
27152
27153echo "include_mpn(\`x86/darwin.m4')" >> $gmp_tmpconfigm4i
27154 ;;
27155 esac
27156 ;;
27157 64|x32)
27158
27159echo "include_mpn(\`x86_64/x86_64-defs.m4')" >> $gmp_tmpconfigm4i
27160
27161 $as_echo "#define HAVE_HOST_CPU_FAMILY_x86_64 1" >>confdefs.h
27162
27163 case $host in
27164 *-*-darwin*)
27165
27166echo "include_mpn(\`x86_64/darwin.m4')" >> $gmp_tmpconfigm4i
27167 ;;
27168 *-*-mingw* | *-*-cygwin)
27169
27170echo "include_mpn(\`x86_64/dos64.m4')" >> $gmp_tmpconfigm4i
27171 ;;
27172 *-openbsd*)
27173
27174echo "define(<OPENBSD>,1)" >> $gmp_tmpconfigm4
27175 ;;
27176 *-linux*)
27177
27178echo "define(<LINUX>,1)" >> $gmp_tmpconfigm4
27179 ;;
27180 esac
27181 ;;
27182 esac
27183 ;;
27184 esac
27185fi
27186
27187# For --enable-minithres, prepend "minithres" to path so that its special
27188# gmp-mparam.h will be used.
27189if test $enable_minithres = yes; then
27190 path="minithres $path"
27191fi
27192
27193# Create link for gmp-mparam.h.
27194gmp_mparam_source=
27195for gmp_mparam_dir in $path; do
27196 test "$no_create" = yes || rm -f gmp-mparam.h
27197 tmp_file=$srcdir/mpn/$gmp_mparam_dir/gmp-mparam.h
27198 if test -f $tmp_file; then
27199 ac_config_links="$ac_config_links gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h"
27200
27201 gmp_srclinks="$gmp_srclinks gmp-mparam.h"
27202 gmp_mparam_source=$tmp_file
27203 break
27204 fi
27205done
27206if test -z "$gmp_mparam_source"; then
27207 as_fn_error $? "no version of gmp-mparam.h found in path: $path" "$LINENO" 5
27208fi
27209
27210# For a helpful message from tune/tuneup.c
27211gmp_mparam_suggest=$gmp_mparam_source
27212if test "$gmp_mparam_dir" = generic; then
27213 for i in $path; do break; done
27214 if test "$i" != generic; then
27215 gmp_mparam_suggest="new file $srcdir/mpn/$i/gmp-mparam.h"
27216 fi
27217fi
27218
27219cat >>confdefs.h <<_ACEOF
27220#define GMP_MPARAM_H_SUGGEST "$gmp_mparam_source"
27221_ACEOF
27222
27223
27224
27225# Copy relevant parameters from gmp-mparam.h to config.m4.
27226# We only do this for parameters that are used by some assembly files.
27227# Fat binaries do this on a per-file basis, so skip in that case.
27228#
27229if test -z "$fat_path"; then
27230 for i in SQR_TOOM2_THRESHOLD BMOD_1_TO_MOD_1_THRESHOLD SHLD_SLOW SHRD_SLOW; do
27231 value=`sed -n 's/^#define '$i'[ ]*\([0-9A-Z][0-9A-Z_]*\).*$/\1/p' $gmp_mparam_source`
27232 if test -n "$value"; then
27233
27234echo "define(<$i>,<$value>)" >> $gmp_tmpconfigm4
27235
27236 fi
27237 done
27238fi
27239
27240
27241# Sizes of some types, needed at preprocessing time.
27242#
27243# FIXME: The assumption that GMP_LIMB_BITS is 8*sizeof(mp_limb_t) might
27244# be slightly rash, but it's true everywhere we know of and ought to be true
27245# of any sensible system. In a generic C build, grepping LONG_BIT out of
27246# <limits.h> might be an alternative, for maximum portability.
27247#
27248# The cast to long int works around a bug in the HP C Compiler
27249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27251# This bug is HP SR number 8606223364.
27252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
27253$as_echo_n "checking size of void *... " >&6; }
27254if ${ac_cv_sizeof_void_p+:} false; then :
27255 $as_echo_n "(cached) " >&6
27256else
27257 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
27258
27259else
27260 if test "$ac_cv_type_void_p" = yes; then
27261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27263as_fn_error 77 "cannot compute sizeof (void *)
27264See \`config.log' for more details" "$LINENO" 5; }
27265 else
27266 ac_cv_sizeof_void_p=0
27267 fi
27268fi
27269
27270fi
27271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
27272$as_echo "$ac_cv_sizeof_void_p" >&6; }
27273
27274
27275
27276cat >>confdefs.h <<_ACEOF
27277#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
27278_ACEOF
27279
27280
27281# The cast to long int works around a bug in the HP C Compiler
27282# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27283# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27284# This bug is HP SR number 8606223364.
27285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5
27286$as_echo_n "checking size of unsigned short... " >&6; }
27287if ${ac_cv_sizeof_unsigned_short+:} false; then :
27288 $as_echo_n "(cached) " >&6
27289else
27290 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default"; then :
27291
27292else
27293 if test "$ac_cv_type_unsigned_short" = yes; then
27294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27296as_fn_error 77 "cannot compute sizeof (unsigned short)
27297See \`config.log' for more details" "$LINENO" 5; }
27298 else
27299 ac_cv_sizeof_unsigned_short=0
27300 fi
27301fi
27302
27303fi
27304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_short" >&5
27305$as_echo "$ac_cv_sizeof_unsigned_short" >&6; }
27306
27307
27308
27309cat >>confdefs.h <<_ACEOF
27310#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
27311_ACEOF
27312
27313
27314# The cast to long int works around a bug in the HP C Compiler
27315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27317# This bug is HP SR number 8606223364.
27318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5
27319$as_echo_n "checking size of unsigned... " >&6; }
27320if ${ac_cv_sizeof_unsigned+:} false; then :
27321 $as_echo_n "(cached) " >&6
27322else
27323 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then :
27324
27325else
27326 if test "$ac_cv_type_unsigned" = yes; then
27327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27329as_fn_error 77 "cannot compute sizeof (unsigned)
27330See \`config.log' for more details" "$LINENO" 5; }
27331 else
27332 ac_cv_sizeof_unsigned=0
27333 fi
27334fi
27335
27336fi
27337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned" >&5
27338$as_echo "$ac_cv_sizeof_unsigned" >&6; }
27339
27340
27341
27342cat >>confdefs.h <<_ACEOF
27343#define SIZEOF_UNSIGNED $ac_cv_sizeof_unsigned
27344_ACEOF
27345
27346
27347# The cast to long int works around a bug in the HP C Compiler
27348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27350# This bug is HP SR number 8606223364.
27351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
27352$as_echo_n "checking size of unsigned long... " >&6; }
27353if ${ac_cv_sizeof_unsigned_long+:} false; then :
27354 $as_echo_n "(cached) " >&6
27355else
27356 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
27357
27358else
27359 if test "$ac_cv_type_unsigned_long" = yes; then
27360 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27361$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27362as_fn_error 77 "cannot compute sizeof (unsigned long)
27363See \`config.log' for more details" "$LINENO" 5; }
27364 else
27365 ac_cv_sizeof_unsigned_long=0
27366 fi
27367fi
27368
27369fi
27370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
27371$as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
27372
27373
27374
27375cat >>confdefs.h <<_ACEOF
27376#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
27377_ACEOF
27378
27379
27380# The cast to long int works around a bug in the HP C Compiler
27381# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27382# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27383# This bug is HP SR number 8606223364.
27384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of mp_limb_t" >&5
27385$as_echo_n "checking size of mp_limb_t... " >&6; }
27386if ${ac_cv_sizeof_mp_limb_t+:} false; then :
27387 $as_echo_n "(cached) " >&6
27388else
27389 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (mp_limb_t))" "ac_cv_sizeof_mp_limb_t" "#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
27390#define GMP_NAIL_BITS $GMP_NAIL_BITS
27391#define GMP_LIMB_BITS 123
27392$DEFN_LONG_LONG_LIMB
27393#include \"$srcdir/gmp-h.in\"
27394
27395"; then :
27396
27397else
27398 if test "$ac_cv_type_mp_limb_t" = yes; then
27399 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27401as_fn_error 77 "cannot compute sizeof (mp_limb_t)
27402See \`config.log' for more details" "$LINENO" 5; }
27403 else
27404 ac_cv_sizeof_mp_limb_t=0
27405 fi
27406fi
27407
27408fi
27409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_mp_limb_t" >&5
27410$as_echo "$ac_cv_sizeof_mp_limb_t" >&6; }
27411
27412
27413
27414cat >>confdefs.h <<_ACEOF
27415#define SIZEOF_MP_LIMB_T $ac_cv_sizeof_mp_limb_t
27416_ACEOF
27417
27418
27419if test "$ac_cv_sizeof_mp_limb_t" = 0; then
27420 as_fn_error $? "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5
27421fi
27422GMP_LIMB_BITS=`expr 8 \* $ac_cv_sizeof_mp_limb_t`
27423
27424
27425echo "define(<SIZEOF_UNSIGNED>,<$ac_cv_sizeof_unsigned>)" >> $gmp_tmpconfigm4
27426
27427
27428# Check compiler limb size matches gmp-mparam.h
27429#
27430# FIXME: Some of the cycle counter objects in the tune directory depend on
27431# the size of ulong, it'd be possible to check that here, though a mismatch
27432# probably wouldn't want to be fatal, none of the libgmp assembler code
27433# depends on ulong.
27434#
27435mparam_bits=`sed -n 's/^#define GMP_LIMB_BITS[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source`
27436if test -n "$mparam_bits" && test "$mparam_bits" -ne $GMP_LIMB_BITS; then
27437 if test "$test_CFLAGS" = set; then
27438 as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code
27439in this configuration expects $mparam_bits bits.
27440You appear to have set \$CFLAGS, perhaps you also need to tell GMP the
27441intended ABI, see \"ABI and ISA\" in the manual." "$LINENO" 5
27442 else
27443 as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code
27444in this configuration expects $mparam_bits bits." "$LINENO" 5
27445 fi
27446fi
27447
27448
27449echo "define(<GMP_LIMB_BITS>,$GMP_LIMB_BITS)" >> $gmp_tmpconfigm4
27450
27451
27452echo "define(<GMP_NAIL_BITS>,$GMP_NAIL_BITS)" >> $gmp_tmpconfigm4
27453
27454
27455echo "define(<GMP_NUMB_BITS>,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))" >> $gmp_tmpconfigm4
27456
27457
27458
27459
27460
27461
27462
27463
27464# A recompiled sqr_basecase for use in the tune program, if necessary.
27465TUNE_SQR_OBJ=
27466test -d tune || mkdir tune
27467case $sqr_basecase_source in
27468 *.asm)
27469 sqr_max=`sed -n 's/^def...(SQR_TOOM2_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source`
27470 if test -n "$sqr_max"; then
27471 TUNE_SQR_OBJ=sqr_asm.o
27472
27473cat >>confdefs.h <<_ACEOF
27474#define TUNE_SQR_TOOM2_MAX $sqr_max
27475_ACEOF
27476
27477 fi
27478 cat >tune/sqr_basecase.c <<EOF
27479/* not sure that an empty file can compile, so put in a dummy */
27480int sqr_basecase_dummy;
27481EOF
27482 ;;
27483 *.c)
27484 TUNE_SQR_OBJ=
27485 $as_echo "#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC" >>confdefs.h
27486
27487 cat >tune/sqr_basecase.c <<EOF
27488#define TUNE_PROGRAM_BUILD 1
27489#define TUNE_PROGRAM_BUILD_SQR 1
27490#include "mpn/sqr_basecase.c"
27491EOF
27492 ;;
27493esac
27494
27495
27496
27497# Configs for demos/pexpr.c.
27498#
27499ac_config_files="$ac_config_files demos/pexpr-config.h:demos/pexpr-config-h.in"
27500
27501case $ac_cv_func_clock in
27502yes) HAVE_CLOCK_01=1
27503 ;;
27504no) HAVE_CLOCK_01=0 ;;
27505esac
27506
27507case $ac_cv_func_cputime in
27508yes) HAVE_CPUTIME_01=1
27509 ;;
27510no) HAVE_CPUTIME_01=0 ;;
27511esac
27512
27513case $ac_cv_func_getrusage in
27514yes) HAVE_GETRUSAGE_01=1
27515 ;;
27516no) HAVE_GETRUSAGE_01=0 ;;
27517esac
27518
27519case $ac_cv_func_gettimeofday in
27520yes) HAVE_GETTIMEOFDAY_01=1
27521 ;;
27522no) HAVE_GETTIMEOFDAY_01=0 ;;
27523esac
27524
27525case $ac_cv_func_sigaction in
27526yes) HAVE_SIGACTION_01=1
27527 ;;
27528no) HAVE_SIGACTION_01=0 ;;
27529esac
27530
27531case $ac_cv_func_sigaltstack in
27532yes) HAVE_SIGALTSTACK_01=1
27533 ;;
27534no) HAVE_SIGALTSTACK_01=0 ;;
27535esac
27536
27537case $ac_cv_func_sigstack in
27538yes) HAVE_SIGSTACK_01=1
27539 ;;
27540no) HAVE_SIGSTACK_01=0 ;;
27541esac
27542
27543
27544case $ac_cv_header_sys_resource_h in
27545yes) HAVE_SYS_RESOURCE_H_01=1
27546 ;;
27547no) HAVE_SYS_RESOURCE_H_01=0 ;;
27548esac
27549
27550
27551ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
27552"
27553if test "x$ac_cv_type_stack_t" = xyes; then :
27554
27555cat >>confdefs.h <<_ACEOF
27556#define HAVE_STACK_T 1
27557_ACEOF
27558
27559HAVE_STACK_T_01=1
27560else
27561 HAVE_STACK_T_01=0
27562fi
27563
27564
27565
27566# Configs for demos/calc directory
27567#
27568# AC_SUBST+AC_CONFIG_FILES is used for calc-config.h, rather than AC_DEFINE+
27569# AC_CONFIG_HEADERS, since with the latter automake (1.8) will then put the
27570# directory (ie. demos/calc) into $(DEFAULT_INCLUDES) for every Makefile.in,
27571# which would look very strange.
27572#
27573# -lcurses is required by libreadline. On a typical SVR4 style system this
27574# normally doesn't have to be given explicitly, since libreadline.so will
27575# have a NEEDED record for it. But if someone for some reason is using only
27576# a static libreadline.a then we must give -lcurses. Readline (as of
27577# version 4.3) doesn't use libtool, so we can't rely on a .la to cover
27578# necessary dependencies.
27579#
27580# On a couple of systems we've seen libreadline available, but the headers
27581# not in the default include path, so check for readline/readline.h. We've
27582# also seen readline/history.h missing, not sure if that's just a broken
27583# install or a very old version, but check that too.
27584#
27585ac_config_files="$ac_config_files demos/calc/calc-config.h:demos/calc/calc-config-h.in"
27586
27587LIBCURSES=
27588if test $with_readline != no; then
27589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5
27590$as_echo_n "checking for tputs in -lncurses... " >&6; }
27591if ${ac_cv_lib_ncurses_tputs+:} false; then :
27592 $as_echo_n "(cached) " >&6
27593else
27594 ac_check_lib_save_LIBS=$LIBS
27595LIBS="-lncurses $LIBS"
27596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27597/* end confdefs.h. */
27598
27599/* Override any GCC internal prototype to avoid an error.
27600 Use char because int might match the return type of a GCC
27601 builtin and then its argument prototype would still apply. */
27602#ifdef __cplusplus
27603extern "C"
27604#endif
27605char tputs ();
27606int
27607main ()
27608{
27609return tputs ();
27610 ;
27611 return 0;
27612}
27613_ACEOF
27614if ac_fn_c_try_link "$LINENO"; then :
27615 ac_cv_lib_ncurses_tputs=yes
27616else
27617 ac_cv_lib_ncurses_tputs=no
27618fi
27619rm -f core conftest.err conftest.$ac_objext \
27620 conftest$ac_exeext conftest.$ac_ext
27621LIBS=$ac_check_lib_save_LIBS
27622fi
27623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5
27624$as_echo "$ac_cv_lib_ncurses_tputs" >&6; }
27625if test "x$ac_cv_lib_ncurses_tputs" = xyes; then :
27626 LIBCURSES=-lncurses
27627else
27628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5
27629$as_echo_n "checking for tputs in -lcurses... " >&6; }
27630if ${ac_cv_lib_curses_tputs+:} false; then :
27631 $as_echo_n "(cached) " >&6
27632else
27633 ac_check_lib_save_LIBS=$LIBS
27634LIBS="-lcurses $LIBS"
27635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27636/* end confdefs.h. */
27637
27638/* Override any GCC internal prototype to avoid an error.
27639 Use char because int might match the return type of a GCC
27640 builtin and then its argument prototype would still apply. */
27641#ifdef __cplusplus
27642extern "C"
27643#endif
27644char tputs ();
27645int
27646main ()
27647{
27648return tputs ();
27649 ;
27650 return 0;
27651}
27652_ACEOF
27653if ac_fn_c_try_link "$LINENO"; then :
27654 ac_cv_lib_curses_tputs=yes
27655else
27656 ac_cv_lib_curses_tputs=no
27657fi
27658rm -f core conftest.err conftest.$ac_objext \
27659 conftest$ac_exeext conftest.$ac_ext
27660LIBS=$ac_check_lib_save_LIBS
27661fi
27662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5
27663$as_echo "$ac_cv_lib_curses_tputs" >&6; }
27664if test "x$ac_cv_lib_curses_tputs" = xyes; then :
27665 LIBCURSES=-lcurses
27666fi
27667
27668fi
27669
27670fi
27671
27672use_readline=$with_readline
27673if test $with_readline = detect; then
27674 use_readline=no
27675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
27676$as_echo_n "checking for readline in -lreadline... " >&6; }
27677if ${ac_cv_lib_readline_readline+:} false; then :
27678 $as_echo_n "(cached) " >&6
27679else
27680 ac_check_lib_save_LIBS=$LIBS
27681LIBS="-lreadline $LIBCURSES $LIBS"
27682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27683/* end confdefs.h. */
27684
27685/* Override any GCC internal prototype to avoid an error.
27686 Use char because int might match the return type of a GCC
27687 builtin and then its argument prototype would still apply. */
27688#ifdef __cplusplus
27689extern "C"
27690#endif
27691char readline ();
27692int
27693main ()
27694{
27695return readline ();
27696 ;
27697 return 0;
27698}
27699_ACEOF
27700if ac_fn_c_try_link "$LINENO"; then :
27701 ac_cv_lib_readline_readline=yes
27702else
27703 ac_cv_lib_readline_readline=no
27704fi
27705rm -f core conftest.err conftest.$ac_objext \
27706 conftest$ac_exeext conftest.$ac_ext
27707LIBS=$ac_check_lib_save_LIBS
27708fi
27709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
27710$as_echo "$ac_cv_lib_readline_readline" >&6; }
27711if test "x$ac_cv_lib_readline_readline" = xyes; then :
27712 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
27713if test "x$ac_cv_header_readline_readline_h" = xyes; then :
27714 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
27715if test "x$ac_cv_header_readline_history_h" = xyes; then :
27716 use_readline=yes
27717fi
27718
27719
27720fi
27721
27722
27723fi
27724
27725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking readline detected" >&5
27726$as_echo_n "checking readline detected... " >&6; }
27727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_readline" >&5
27728$as_echo "$use_readline" >&6; }
27729fi
27730if test $use_readline = yes; then
27731 WITH_READLINE_01=1
27732
27733 LIBREADLINE=-lreadline
27734
27735else
27736 WITH_READLINE_01=0
27737fi
27738for ac_prog in 'bison -y' byacc
27739do
27740 # Extract the first word of "$ac_prog", so it can be a program name with args.
27741set dummy $ac_prog; ac_word=$2
27742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27743$as_echo_n "checking for $ac_word... " >&6; }
27744if ${ac_cv_prog_YACC+:} false; then :
27745 $as_echo_n "(cached) " >&6
27746else
27747 if test -n "$YACC"; then
27748 ac_cv_prog_YACC="$YACC" # Let the user override the test.
27749else
27750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27751for as_dir in $PATH
27752do
27753 IFS=$as_save_IFS
27754 test -z "$as_dir" && as_dir=.
27755 for ac_exec_ext in '' $ac_executable_extensions; do
27756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27757 ac_cv_prog_YACC="$ac_prog"
27758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27759 break 2
27760 fi
27761done
27762 done
27763IFS=$as_save_IFS
27764
27765fi
27766fi
27767YACC=$ac_cv_prog_YACC
27768if test -n "$YACC"; then
27769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
27770$as_echo "$YACC" >&6; }
27771else
27772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27773$as_echo "no" >&6; }
27774fi
27775
27776
27777 test -n "$YACC" && break
27778done
27779test -n "$YACC" || YACC="yacc"
27780
27781for ac_prog in flex lex
27782do
27783 # Extract the first word of "$ac_prog", so it can be a program name with args.
27784set dummy $ac_prog; ac_word=$2
27785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27786$as_echo_n "checking for $ac_word... " >&6; }
27787if ${ac_cv_prog_LEX+:} false; then :
27788 $as_echo_n "(cached) " >&6
27789else
27790 if test -n "$LEX"; then
27791 ac_cv_prog_LEX="$LEX" # Let the user override the test.
27792else
27793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27794for as_dir in $PATH
27795do
27796 IFS=$as_save_IFS
27797 test -z "$as_dir" && as_dir=.
27798 for ac_exec_ext in '' $ac_executable_extensions; do
27799 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27800 ac_cv_prog_LEX="$ac_prog"
27801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27802 break 2
27803 fi
27804done
27805 done
27806IFS=$as_save_IFS
27807
27808fi
27809fi
27810LEX=$ac_cv_prog_LEX
27811if test -n "$LEX"; then
27812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
27813$as_echo "$LEX" >&6; }
27814else
27815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27816$as_echo "no" >&6; }
27817fi
27818
27819
27820 test -n "$LEX" && break
27821done
27822test -n "$LEX" || LEX=":"
27823
27824if test "x$LEX" != "x:"; then
27825 cat >conftest.l <<_ACEOF
27826%%
27827a { ECHO; }
27828b { REJECT; }
27829c { yymore (); }
27830d { yyless (1); }
27831e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
27832 yyless ((input () != 0)); }
27833f { unput (yytext[0]); }
27834. { BEGIN INITIAL; }
27835%%
27836#ifdef YYTEXT_POINTER
27837extern char *yytext;
27838#endif
27839int
27840main (void)
27841{
27842 return ! yylex () + ! yywrap ();
27843}
27844_ACEOF
27845{ { ac_try="$LEX conftest.l"
27846case "(($ac_try" in
27847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27848 *) ac_try_echo=$ac_try;;
27849esac
27850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
27851$as_echo "$ac_try_echo"; } >&5
27852 (eval "$LEX conftest.l") 2>&5
27853 ac_status=$?
27854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27855 test $ac_status = 0; }
27856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
27857$as_echo_n "checking lex output file root... " >&6; }
27858if ${ac_cv_prog_lex_root+:} false; then :
27859 $as_echo_n "(cached) " >&6
27860else
27861
27862if test -f lex.yy.c; then
27863 ac_cv_prog_lex_root=lex.yy
27864elif test -f lexyy.c; then
27865 ac_cv_prog_lex_root=lexyy
27866else
27867 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
27868fi
27869fi
27870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
27871$as_echo "$ac_cv_prog_lex_root" >&6; }
27872LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
27873
27874if test -z "${LEXLIB+set}"; then
27875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
27876$as_echo_n "checking lex library... " >&6; }
27877if ${ac_cv_lib_lex+:} false; then :
27878 $as_echo_n "(cached) " >&6
27879else
27880
27881 ac_save_LIBS=$LIBS
27882 ac_cv_lib_lex='none needed'
27883 for ac_lib in '' -lfl -ll; do
27884 LIBS="$ac_lib $ac_save_LIBS"
27885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27886/* end confdefs.h. */
27887`cat $LEX_OUTPUT_ROOT.c`
27888_ACEOF
27889if ac_fn_c_try_link "$LINENO"; then :
27890 ac_cv_lib_lex=$ac_lib
27891fi
27892rm -f core conftest.err conftest.$ac_objext \
27893 conftest$ac_exeext conftest.$ac_ext
27894 test "$ac_cv_lib_lex" != 'none needed' && break
27895 done
27896 LIBS=$ac_save_LIBS
27897
27898fi
27899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
27900$as_echo "$ac_cv_lib_lex" >&6; }
27901 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
27902fi
27903
27904
27905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
27906$as_echo_n "checking whether yytext is a pointer... " >&6; }
27907if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
27908 $as_echo_n "(cached) " >&6
27909else
27910 # POSIX says lex can declare yytext either as a pointer or an array; the
27911# default is implementation-dependent. Figure out which it is, since
27912# not all implementations provide the %pointer and %array declarations.
27913ac_cv_prog_lex_yytext_pointer=no
27914ac_save_LIBS=$LIBS
27915LIBS="$LEXLIB $ac_save_LIBS"
27916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27917/* end confdefs.h. */
27918
27919 #define YYTEXT_POINTER 1
27920`cat $LEX_OUTPUT_ROOT.c`
27921_ACEOF
27922if ac_fn_c_try_link "$LINENO"; then :
27923 ac_cv_prog_lex_yytext_pointer=yes
27924fi
27925rm -f core conftest.err conftest.$ac_objext \
27926 conftest$ac_exeext conftest.$ac_ext
27927LIBS=$ac_save_LIBS
27928
27929fi
27930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
27931$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
27932if test $ac_cv_prog_lex_yytext_pointer = yes; then
27933
27934$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
27935
27936fi
27937rm -f conftest.l $LEX_OUTPUT_ROOT.c
27938
27939fi
27940if test "$LEX" = :; then
27941 LEX=${am_missing_run}flex
27942fi
27943
27944
27945
27946# Create config.m4.
27947
27948echo "creating $gmp_configm4"
27949echo "d""nl $gmp_configm4. Generated automatically by configure." > $gmp_configm4
27950if test -f $gmp_tmpconfigm4; then
27951 echo "changequote(<,>)" >> $gmp_configm4
27952 echo "ifdef(<__CONFIG_M4_INCLUDED__>,,<" >> $gmp_configm4
27953 cat $gmp_tmpconfigm4 >> $gmp_configm4
27954 echo ">)" >> $gmp_configm4
27955 echo "changequote(\`,')" >> $gmp_configm4
27956 rm $gmp_tmpconfigm4
27957fi
27958echo "ifdef(\`__CONFIG_M4_INCLUDED__',,\`" >> $gmp_configm4
27959if test -f $gmp_tmpconfigm4i; then
27960 cat $gmp_tmpconfigm4i >> $gmp_configm4
27961 rm $gmp_tmpconfigm4i
27962fi
27963if test -f $gmp_tmpconfigm4p; then
27964 cat $gmp_tmpconfigm4p >> $gmp_configm4
27965 rm $gmp_tmpconfigm4p
27966fi
27967echo "')" >> $gmp_configm4
27968echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4
27969
27970
27971# Create Makefiles
27972# FIXME: Upcoming version of autoconf/automake may not like broken lines.
27973# Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
27974
27975ac_config_files="$ac_config_files Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in gmp.pc:gmp.pc.in gmpxx.pc:gmpxx.pc.in"
27976
27977cat >confcache <<\_ACEOF
27978# This file is a shell script that caches the results of configure
27979# tests run on this system so they can be shared between configure
27980# scripts and configure runs, see configure's option --config-cache.
27981# It is not useful on other systems. If it contains results you don't
27982# want to keep, you may remove or edit it.
27983#
27984# config.status only pays attention to the cache file if you give it
27985# the --recheck option to rerun configure.
27986#
27987# `ac_cv_env_foo' variables (set or unset) will be overridden when
27988# loading this file, other *unset* `ac_cv_foo' will be assigned the
27989# following values.
27990
27991_ACEOF
27992
27993# The following way of writing the cache mishandles newlines in values,
27994# but we know of no workaround that is simple, portable, and efficient.
27995# So, we kill variables containing newlines.
27996# Ultrix sh set writes to stderr and can't be redirected directly,
27997# and sets the high bit in the cache file unless we assign to the vars.
27998(
27999 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28000 eval ac_val=\$$ac_var
28001 case $ac_val in #(
28002 *${as_nl}*)
28003 case $ac_var in #(
28004 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28005$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28006 esac
28007 case $ac_var in #(
28008 _ | IFS | as_nl) ;; #(
28009 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28010 *) { eval $ac_var=; unset $ac_var;} ;;
28011 esac ;;
28012 esac
28013 done
28014
28015 (set) 2>&1 |
28016 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28017 *${as_nl}ac_space=\ *)
28018 # `set' does not quote correctly, so add quotes: double-quote
28019 # substitution turns \\\\ into \\, and sed turns \\ into \.
28020 sed -n \
28021 "s/'/'\\\\''/g;
28022 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28023 ;; #(
28024 *)
28025 # `set' quotes correctly as required by POSIX, so do not add quotes.
28026 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28027 ;;
28028 esac |
28029 sort
28030) |
28031 sed '
28032 /^ac_cv_env_/b end
28033 t clear
28034 :clear
28035 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28036 t end
28037 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28038 :end' >>confcache
28039if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28040 if test -w "$cache_file"; then
28041 if test "x$cache_file" != "x/dev/null"; then
28042 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28043$as_echo "$as_me: updating cache $cache_file" >&6;}
28044 if test ! -f "$cache_file" || test -h "$cache_file"; then
28045 cat confcache >"$cache_file"
28046 else
28047 case $cache_file in #(
28048 */* | ?:*)
28049 mv -f confcache "$cache_file"$$ &&
28050 mv -f "$cache_file"$$ "$cache_file" ;; #(
28051 *)
28052 mv -f confcache "$cache_file" ;;
28053 esac
28054 fi
28055 fi
28056 else
28057 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28058$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
28059 fi
28060fi
28061rm -f confcache
28062
28063test "x$prefix" = xNONE && prefix=$ac_default_prefix
28064# Let make expand exec_prefix.
28065test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28066
28067DEFS=-DHAVE_CONFIG_H
28068
28069ac_libobjs=
28070ac_ltlibobjs=
28071U=
28072for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28073 # 1. Remove the extension, and $U if already installed.
28074 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28075 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
28076 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28077 # will be set to the directory where LIBOBJS objects are built.
28078 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28079 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28080done
28081LIBOBJS=$ac_libobjs
28082
28083LTLIBOBJS=$ac_ltlibobjs
28084
28085
28086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
28087$as_echo_n "checking that generated files are newer than configure... " >&6; }
28088 if test -n "$am_sleep_pid"; then
28089 # Hide warnings about reused PIDs.
28090 wait $am_sleep_pid 2>/dev/null
28091 fi
28092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
28093$as_echo "done" >&6; }
28094 if test -n "$EXEEXT"; then
28095 am__EXEEXT_TRUE=
28096 am__EXEEXT_FALSE='#'
28097else
28098 am__EXEEXT_TRUE='#'
28099 am__EXEEXT_FALSE=
28100fi
28101
28102if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
28103 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
28104Usually this means the macro was only invoked conditionally." "$LINENO" 5
28105fi
28106if test -z "${WANT_CXX_TRUE}" && test -z "${WANT_CXX_FALSE}"; then
28107 as_fn_error $? "conditional \"WANT_CXX\" was never defined.
28108Usually this means the macro was only invoked conditionally." "$LINENO" 5
28109fi
28110if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then
28111 as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined.
28112Usually this means the macro was only invoked conditionally." "$LINENO" 5
28113fi
28114
28115
28116: "${CONFIG_STATUS=./config.status}"
28117ac_write_fail=0
28118ac_clean_files_save=$ac_clean_files
28119ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28120{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
28121$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
28122as_write_fail=0
28123cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
28124#! $SHELL
28125# Generated by $as_me.
28126# Run this file to recreate the current configuration.
28127# Compiler output produced by configure, useful for debugging
28128# configure, is in config.log if it exists.
28129
28130debug=false
28131ac_cs_recheck=false
28132ac_cs_silent=false
28133
28134SHELL=\${CONFIG_SHELL-$SHELL}
28135export SHELL
28136_ASEOF
28137cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
28138## -------------------- ##
28139## M4sh Initialization. ##
28140## -------------------- ##
28141
28142# Be more Bourne compatible
28143DUALCASE=1; export DUALCASE # for MKS sh
28144if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
28145 emulate sh
28146 NULLCMD=:
28147 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
28148 # is contrary to our usage. Disable this feature.
28149 alias -g '${1+"$@"}'='"$@"'
28150 setopt NO_GLOB_SUBST
28151else
28152 case `(set -o) 2>/dev/null` in #(
28153 *posix*) :
28154 set -o posix ;; #(
28155 *) :
28156 ;;
28157esac
28158fi
28159
28160
28161as_nl='
28162'
28163export as_nl
28164# Printing a long string crashes Solaris 7 /usr/bin/printf.
28165as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
28166as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
28167as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
28168# Prefer a ksh shell builtin over an external printf program on Solaris,
28169# but without wasting forks for bash or zsh.
28170if test -z "$BASH_VERSION$ZSH_VERSION" \
28171 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
28172 as_echo='print -r --'
28173 as_echo_n='print -rn --'
28174elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
28175 as_echo='printf %s\n'
28176 as_echo_n='printf %s'
28177else
28178 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
28179 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
28180 as_echo_n='/usr/ucb/echo -n'
28181 else
28182 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
28183 as_echo_n_body='eval
28184 arg=$1;
28185 case $arg in #(
28186 *"$as_nl"*)
28187 expr "X$arg" : "X\\(.*\\)$as_nl";
28188 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
28189 esac;
28190 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
28191 '
28192 export as_echo_n_body
28193 as_echo_n='sh -c $as_echo_n_body as_echo'
28194 fi
28195 export as_echo_body
28196 as_echo='sh -c $as_echo_body as_echo'
28197fi
28198
28199# The user is always right.
28200if test "${PATH_SEPARATOR+set}" != set; then
28201 PATH_SEPARATOR=:
28202 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
28203 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
28204 PATH_SEPARATOR=';'
28205 }
28206fi
28207
28208
28209# IFS
28210# We need space, tab and new line, in precisely that order. Quoting is
28211# there to prevent editors from complaining about space-tab.
28212# (If _AS_PATH_WALK were called with IFS unset, it would disable word
28213# splitting by setting IFS to empty value.)
28214IFS=" "" $as_nl"
28215
28216# Find who we are. Look in the path if we contain no directory separator.
28217as_myself=
28218case $0 in #((
28219 *[\\/]* ) as_myself=$0 ;;
28220 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28221for as_dir in $PATH
28222do
28223 IFS=$as_save_IFS
28224 test -z "$as_dir" && as_dir=.
28225 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
28226 done
28227IFS=$as_save_IFS
28228
28229 ;;
28230esac
28231# We did not find ourselves, most probably we were run as `sh COMMAND'
28232# in which case we are not to be found in the path.
28233if test "x$as_myself" = x; then
28234 as_myself=$0
28235fi
28236if test ! -f "$as_myself"; then
28237 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
28238 exit 1
28239fi
28240
28241# Unset variables that we do not need and which cause bugs (e.g. in
28242# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
28243# suppresses any "Segmentation fault" message there. '((' could
28244# trigger a bug in pdksh 5.2.14.
28245for as_var in BASH_ENV ENV MAIL MAILPATH
28246do eval test x\${$as_var+set} = xset \
28247 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
28248done
28249PS1='$ '
28250PS2='> '
28251PS4='+ '
28252
28253# NLS nuisances.
28254LC_ALL=C
28255export LC_ALL
28256LANGUAGE=C
28257export LANGUAGE
28258
28259# CDPATH.
28260(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
28261
28262
28263# as_fn_error STATUS ERROR [LINENO LOG_FD]
28264# ----------------------------------------
28265# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
28266# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
28267# script with STATUS, using 1 if that was 0.
28268as_fn_error ()
28269{
28270 as_status=$1; test $as_status -eq 0 && as_status=1
28271 if test "$4"; then
28272 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
28273 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
28274 fi
28275 $as_echo "$as_me: error: $2" >&2
28276 as_fn_exit $as_status
28277} # as_fn_error
28278
28279
28280# as_fn_set_status STATUS
28281# -----------------------
28282# Set $? to STATUS, without forking.
28283as_fn_set_status ()
28284{
28285 return $1
28286} # as_fn_set_status
28287
28288# as_fn_exit STATUS
28289# -----------------
28290# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
28291as_fn_exit ()
28292{
28293 set +e
28294 as_fn_set_status $1
28295 exit $1
28296} # as_fn_exit
28297
28298# as_fn_unset VAR
28299# ---------------
28300# Portably unset VAR.
28301as_fn_unset ()
28302{
28303 { eval $1=; unset $1;}
28304}
28305as_unset=as_fn_unset
28306# as_fn_append VAR VALUE
28307# ----------------------
28308# Append the text in VALUE to the end of the definition contained in VAR. Take
28309# advantage of any shell optimizations that allow amortized linear growth over
28310# repeated appends, instead of the typical quadratic growth present in naive
28311# implementations.
28312if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
28313 eval 'as_fn_append ()
28314 {
28315 eval $1+=\$2
28316 }'
28317else
28318 as_fn_append ()
28319 {
28320 eval $1=\$$1\$2
28321 }
28322fi # as_fn_append
28323
28324# as_fn_arith ARG...
28325# ------------------
28326# Perform arithmetic evaluation on the ARGs, and store the result in the
28327# global $as_val. Take advantage of shells that can avoid forks. The arguments
28328# must be portable across $(()) and expr.
28329if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
28330 eval 'as_fn_arith ()
28331 {
28332 as_val=$(( $* ))
28333 }'
28334else
28335 as_fn_arith ()
28336 {
28337 as_val=`expr "$@" || test $? -eq 1`
28338 }
28339fi # as_fn_arith
28340
28341
28342if expr a : '\(a\)' >/dev/null 2>&1 &&
28343 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28344 as_expr=expr
28345else
28346 as_expr=false
28347fi
28348
28349if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28350 as_basename=basename
28351else
28352 as_basename=false
28353fi
28354
28355if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28356 as_dirname=dirname
28357else
28358 as_dirname=false
28359fi
28360
28361as_me=`$as_basename -- "$0" ||
28362$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28363 X"$0" : 'X\(//\)$' \| \
28364 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
28365$as_echo X/"$0" |
28366 sed '/^.*\/\([^/][^/]*\)\/*$/{
28367 s//\1/
28368 q
28369 }
28370 /^X\/\(\/\/\)$/{
28371 s//\1/
28372 q
28373 }
28374 /^X\/\(\/\).*/{
28375 s//\1/
28376 q
28377 }
28378 s/.*/./; q'`
28379
28380# Avoid depending upon Character Ranges.
28381as_cr_letters='abcdefghijklmnopqrstuvwxyz'
28382as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
28383as_cr_Letters=$as_cr_letters$as_cr_LETTERS
28384as_cr_digits='0123456789'
28385as_cr_alnum=$as_cr_Letters$as_cr_digits
28386
28387ECHO_C= ECHO_N= ECHO_T=
28388case `echo -n x` in #(((((
28389-n*)
28390 case `echo 'xy\c'` in
28391 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28392 xy) ECHO_C='\c';;
28393 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
28394 ECHO_T=' ';;
28395 esac;;
28396*)
28397 ECHO_N='-n';;
28398esac
28399
28400rm -f conf$$ conf$$.exe conf$$.file
28401if test -d conf$$.dir; then
28402 rm -f conf$$.dir/conf$$.file
28403else
28404 rm -f conf$$.dir
28405 mkdir conf$$.dir 2>/dev/null
28406fi
28407if (echo >conf$$.file) 2>/dev/null; then
28408 if ln -s conf$$.file conf$$ 2>/dev/null; then
28409 as_ln_s='ln -s'
28410 # ... but there are two gotchas:
28411 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28412 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28413 # In both cases, we have to default to `cp -pR'.
28414 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
28415 as_ln_s='cp -pR'
28416 elif ln conf$$.file conf$$ 2>/dev/null; then
28417 as_ln_s=ln
28418 else
28419 as_ln_s='cp -pR'
28420 fi
28421else
28422 as_ln_s='cp -pR'
28423fi
28424rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28425rmdir conf$$.dir 2>/dev/null
28426
28427
28428# as_fn_mkdir_p
28429# -------------
28430# Create "$as_dir" as a directory, including parents if necessary.
28431as_fn_mkdir_p ()
28432{
28433
28434 case $as_dir in #(
28435 -*) as_dir=./$as_dir;;
28436 esac
28437 test -d "$as_dir" || eval $as_mkdir_p || {
28438 as_dirs=
28439 while :; do
28440 case $as_dir in #(
28441 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
28442 *) as_qdir=$as_dir;;
28443 esac
28444 as_dirs="'$as_qdir' $as_dirs"
28445 as_dir=`$as_dirname -- "$as_dir" ||
28446$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28447 X"$as_dir" : 'X\(//\)[^/]' \| \
28448 X"$as_dir" : 'X\(//\)$' \| \
28449 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
28450$as_echo X"$as_dir" |
28451 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28452 s//\1/
28453 q
28454 }
28455 /^X\(\/\/\)[^/].*/{
28456 s//\1/
28457 q
28458 }
28459 /^X\(\/\/\)$/{
28460 s//\1/
28461 q
28462 }
28463 /^X\(\/\).*/{
28464 s//\1/
28465 q
28466 }
28467 s/.*/./; q'`
28468 test -d "$as_dir" && break
28469 done
28470 test -z "$as_dirs" || eval "mkdir $as_dirs"
28471 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
28472
28473
28474} # as_fn_mkdir_p
28475if mkdir -p . 2>/dev/null; then
28476 as_mkdir_p='mkdir -p "$as_dir"'
28477else
28478 test -d ./-p && rmdir ./-p
28479 as_mkdir_p=false
28480fi
28481
28482
28483# as_fn_executable_p FILE
28484# -----------------------
28485# Test if FILE is an executable regular file.
28486as_fn_executable_p ()
28487{
28488 test -f "$1" && test -x "$1"
28489} # as_fn_executable_p
28490as_test_x='test -x'
28491as_executable_p=as_fn_executable_p
28492
28493# Sed expression to map a string onto a valid CPP name.
28494as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
28495
28496# Sed expression to map a string onto a valid variable name.
28497as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
28498
28499
28500exec 6>&1
28501## ----------------------------------- ##
28502## Main body of $CONFIG_STATUS script. ##
28503## ----------------------------------- ##
28504_ASEOF
28505test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
28506
28507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28508# Save the log message, to keep $0 and so on meaningful, and to
28509# report actual input values of CONFIG_FILES etc. instead of their
28510# values after options handling.
28511ac_log="
28512This file was extended by GNU MP $as_me 6.2.0, which was
28513generated by GNU Autoconf 2.69. Invocation command line was
28514
28515 CONFIG_FILES = $CONFIG_FILES
28516 CONFIG_HEADERS = $CONFIG_HEADERS
28517 CONFIG_LINKS = $CONFIG_LINKS
28518 CONFIG_COMMANDS = $CONFIG_COMMANDS
28519 $ $0 $@
28520
28521on `(hostname || uname -n) 2>/dev/null | sed 1q`
28522"
28523
28524_ACEOF
28525
28526case $ac_config_files in *"
28527"*) set x $ac_config_files; shift; ac_config_files=$*;;
28528esac
28529
28530case $ac_config_headers in *"
28531"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
28532esac
28533
28534
28535cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28536# Files that config.status was made for.
28537config_files="$ac_config_files"
28538config_headers="$ac_config_headers"
28539config_links="$ac_config_links"
28540config_commands="$ac_config_commands"
28541
28542_ACEOF
28543
28544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28545ac_cs_usage="\
28546\`$as_me' instantiates files and other configuration actions
28547from templates according to the current configuration. Unless the files
28548and actions are specified as TAGs, all are instantiated by default.
28549
28550Usage: $0 [OPTION]... [TAG]...
28551
28552 -h, --help print this help, then exit
28553 -V, --version print version number and configuration settings, then exit
28554 --config print configuration, then exit
28555 -q, --quiet, --silent
28556 do not print progress messages
28557 -d, --debug don't remove temporary files
28558 --recheck update $as_me by reconfiguring in the same conditions
28559 --file=FILE[:TEMPLATE]
28560 instantiate the configuration file FILE
28561 --header=FILE[:TEMPLATE]
28562 instantiate the configuration header FILE
28563
28564Configuration files:
28565$config_files
28566
28567Configuration headers:
28568$config_headers
28569
28570Configuration links:
28571$config_links
28572
28573Configuration commands:
28574$config_commands
28575
28576Report bugs to <gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html>.
28577GNU MP home page: <http://www.gnu.org/software/gmp/>.
28578General help using GNU software: <http://www.gnu.org/gethelp/>."
28579
28580_ACEOF
28581cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28582ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
28583ac_cs_version="\\
28584GNU MP config.status 6.2.0
28585configured by $0, generated by GNU Autoconf 2.69,
28586 with options \\"\$ac_cs_config\\"
28587
28588Copyright (C) 2012 Free Software Foundation, Inc.
28589This config.status script is free software; the Free Software Foundation
28590gives unlimited permission to copy, distribute and modify it."
28591
28592ac_pwd='$ac_pwd'
28593srcdir='$srcdir'
28594INSTALL='$INSTALL'
28595MKDIR_P='$MKDIR_P'
28596AWK='$AWK'
28597test -n "\$AWK" || AWK=awk
28598_ACEOF
28599
28600cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28601# The default lists apply if the user does not specify any file.
28602ac_need_defaults=:
28603while test $# != 0
28604do
28605 case $1 in
28606 --*=?*)
28607 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28608 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
28609 ac_shift=:
28610 ;;
28611 --*=)
28612 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28613 ac_optarg=
28614 ac_shift=:
28615 ;;
28616 *)
28617 ac_option=$1
28618 ac_optarg=$2
28619 ac_shift=shift
28620 ;;
28621 esac
28622
28623 case $ac_option in
28624 # Handling of the options.
28625 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28626 ac_cs_recheck=: ;;
28627 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
28628 $as_echo "$ac_cs_version"; exit ;;
28629 --config | --confi | --conf | --con | --co | --c )
28630 $as_echo "$ac_cs_config"; exit ;;
28631 --debug | --debu | --deb | --de | --d | -d )
28632 debug=: ;;
28633 --file | --fil | --fi | --f )
28634 $ac_shift
28635 case $ac_optarg in
28636 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28637 '') as_fn_error $? "missing file argument" ;;
28638 esac
28639 as_fn_append CONFIG_FILES " '$ac_optarg'"
28640 ac_need_defaults=false;;
28641 --header | --heade | --head | --hea )
28642 $ac_shift
28643 case $ac_optarg in
28644 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28645 esac
28646 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
28647 ac_need_defaults=false;;
28648 --he | --h)
28649 # Conflict between --help and --header
28650 as_fn_error $? "ambiguous option: \`$1'
28651Try \`$0 --help' for more information.";;
28652 --help | --hel | -h )
28653 $as_echo "$ac_cs_usage"; exit ;;
28654 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28655 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28656 ac_cs_silent=: ;;
28657
28658 # This is an error.
28659 -*) as_fn_error $? "unrecognized option: \`$1'
28660Try \`$0 --help' for more information." ;;
28661
28662 *) as_fn_append ac_config_targets " $1"
28663 ac_need_defaults=false ;;
28664
28665 esac
28666 shift
28667done
28668
28669ac_configure_extra_args=
28670
28671if $ac_cs_silent; then
28672 exec 6>/dev/null
28673 ac_configure_extra_args="$ac_configure_extra_args --silent"
28674fi
28675
28676_ACEOF
28677cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28678if \$ac_cs_recheck; then
28679 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
28680 shift
28681 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
28682 CONFIG_SHELL='$SHELL'
28683 export CONFIG_SHELL
28684 exec "\$@"
28685fi
28686
28687_ACEOF
28688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28689exec 5>>config.log
28690{
28691 echo
28692 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28693## Running $as_me. ##
28694_ASBOX
28695 $as_echo "$ac_log"
28696} >&5
28697
28698_ACEOF
28699cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28700#
28701# INIT-COMMANDS
28702#
28703
28704
28705# The HP-UX ksh and POSIX shell print the target directory to stdout
28706# if CDPATH is set.
28707(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
28708
28709sed_quote_subst='$sed_quote_subst'
28710double_quote_subst='$double_quote_subst'
28711delay_variable_subst='$delay_variable_subst'
28712NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
28713AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
28714DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
28715OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
28716macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
28717macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
28718enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
28719enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
28720pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
28721enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
28722shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
28723SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
28724ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
28725PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
28726host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
28727host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
28728host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
28729build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
28730build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
28731build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
28732SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
28733Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
28734GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
28735EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
28736FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
28737LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
28738LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
28739max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
28740ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
28741exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
28742lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
28743lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
28744lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
28745lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
28746lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
28747reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
28748reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
28749deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
28750file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
28751file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
28752want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
28753sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
28754AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
28755AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
28756archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
28757STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
28758RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
28759old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
28760old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
28761old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
28762lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
28763CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
28764CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
28765compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
28766GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
28767lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
28768lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
28769lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
28770lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
28771lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
28772lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
28773nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
28774lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
28775lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
28776objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
28777MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
28778lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
28779lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
28780lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
28781lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
28782lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
28783need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
28784MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
28785DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
28786NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
28787LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
28788OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
28789OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
28790libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
28791shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
28792extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
28793archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
28794enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
28795export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
28796whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
28797compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
28798old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
28799old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
28800archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
28801archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
28802module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
28803module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
28804with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
28805allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
28806no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
28807hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
28808hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
28809hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
28810hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
28811hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
28812hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
28813hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
28814inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
28815link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
28816always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
28817export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
28818exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
28819include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
28820prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
28821postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
28822file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
28823variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
28824need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
28825need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
28826version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
28827runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
28828shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
28829shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
28830libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
28831library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
28832soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
28833install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
28834postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
28835postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
28836finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
28837finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
28838hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
28839sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
28840configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
28841configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
28842hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
28843enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
28844enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
28845enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
28846old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
28847striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
28848compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
28849predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
28850postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
28851predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
28852postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
28853compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
28854LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
28855reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
28856reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28857old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28858compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
28859GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
28860lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
28861lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
28862lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
28863lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
28864lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
28865archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
28866enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
28867export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
28868whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
28869compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
28870old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28871old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28872archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28873archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28874module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28875module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28876with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
28877allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
28878no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
28879hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
28880hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
28881hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
28882hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
28883hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
28884hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
28885hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
28886inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
28887link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
28888always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
28889export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28890exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
28891include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
28892prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28893postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
28894file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
28895hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
28896compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
28897predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
28898postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
28899predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
28900postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
28901compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
28902
28903LTCC='$LTCC'
28904LTCFLAGS='$LTCFLAGS'
28905compiler='$compiler_DEFAULT'
28906
28907# A function that is used when there is no print builtin or printf.
28908func_fallback_echo ()
28909{
28910 eval 'cat <<_LTECHO_EOF
28911\$1
28912_LTECHO_EOF'
28913}
28914
28915# Quote evaled strings.
28916for var in NM \
28917AS \
28918DLLTOOL \
28919OBJDUMP \
28920SHELL \
28921ECHO \
28922PATH_SEPARATOR \
28923SED \
28924GREP \
28925EGREP \
28926FGREP \
28927LD \
28928LN_S \
28929lt_SP2NL \
28930lt_NL2SP \
28931reload_flag \
28932deplibs_check_method \
28933file_magic_cmd \
28934file_magic_glob \
28935want_nocaseglob \
28936sharedlib_from_linklib_cmd \
28937AR \
28938AR_FLAGS \
28939archiver_list_spec \
28940STRIP \
28941RANLIB \
28942CC \
28943CFLAGS \
28944compiler \
28945lt_cv_sys_global_symbol_pipe \
28946lt_cv_sys_global_symbol_to_cdecl \
28947lt_cv_sys_global_symbol_to_import \
28948lt_cv_sys_global_symbol_to_c_name_address \
28949lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
28950lt_cv_nm_interface \
28951nm_file_list_spec \
28952lt_cv_truncate_bin \
28953lt_prog_compiler_no_builtin_flag \
28954lt_prog_compiler_pic \
28955lt_prog_compiler_wl \
28956lt_prog_compiler_static \
28957lt_cv_prog_compiler_c_o \
28958need_locks \
28959MANIFEST_TOOL \
28960DSYMUTIL \
28961NMEDIT \
28962LIPO \
28963OTOOL \
28964OTOOL64 \
28965shrext_cmds \
28966export_dynamic_flag_spec \
28967whole_archive_flag_spec \
28968compiler_needs_object \
28969with_gnu_ld \
28970allow_undefined_flag \
28971no_undefined_flag \
28972hardcode_libdir_flag_spec \
28973hardcode_libdir_separator \
28974exclude_expsyms \
28975include_expsyms \
28976file_list_spec \
28977variables_saved_for_relink \
28978libname_spec \
28979library_names_spec \
28980soname_spec \
28981install_override_mode \
28982finish_eval \
28983old_striplib \
28984striplib \
28985compiler_lib_search_dirs \
28986predep_objects \
28987postdep_objects \
28988predeps \
28989postdeps \
28990compiler_lib_search_path \
28991LD_CXX \
28992reload_flag_CXX \
28993compiler_CXX \
28994lt_prog_compiler_no_builtin_flag_CXX \
28995lt_prog_compiler_pic_CXX \
28996lt_prog_compiler_wl_CXX \
28997lt_prog_compiler_static_CXX \
28998lt_cv_prog_compiler_c_o_CXX \
28999export_dynamic_flag_spec_CXX \
29000whole_archive_flag_spec_CXX \
29001compiler_needs_object_CXX \
29002with_gnu_ld_CXX \
29003allow_undefined_flag_CXX \
29004no_undefined_flag_CXX \
29005hardcode_libdir_flag_spec_CXX \
29006hardcode_libdir_separator_CXX \
29007exclude_expsyms_CXX \
29008include_expsyms_CXX \
29009file_list_spec_CXX \
29010compiler_lib_search_dirs_CXX \
29011predep_objects_CXX \
29012postdep_objects_CXX \
29013predeps_CXX \
29014postdeps_CXX \
29015compiler_lib_search_path_CXX; do
29016 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
29017 *[\\\\\\\`\\"\\\$]*)
29018 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
29019 ;;
29020 *)
29021 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
29022 ;;
29023 esac
29024done
29025
29026# Double-quote double-evaled strings.
29027for var in reload_cmds \
29028old_postinstall_cmds \
29029old_postuninstall_cmds \
29030old_archive_cmds \
29031extract_expsyms_cmds \
29032old_archive_from_new_cmds \
29033old_archive_from_expsyms_cmds \
29034archive_cmds \
29035archive_expsym_cmds \
29036module_cmds \
29037module_expsym_cmds \
29038export_symbols_cmds \
29039prelink_cmds \
29040postlink_cmds \
29041postinstall_cmds \
29042postuninstall_cmds \
29043finish_cmds \
29044sys_lib_search_path_spec \
29045configure_time_dlsearch_path \
29046configure_time_lt_sys_library_path \
29047reload_cmds_CXX \
29048old_archive_cmds_CXX \
29049old_archive_from_new_cmds_CXX \
29050old_archive_from_expsyms_cmds_CXX \
29051archive_cmds_CXX \
29052archive_expsym_cmds_CXX \
29053module_cmds_CXX \
29054module_expsym_cmds_CXX \
29055export_symbols_cmds_CXX \
29056prelink_cmds_CXX \
29057postlink_cmds_CXX; do
29058 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
29059 *[\\\\\\\`\\"\\\$]*)
29060 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
29061 ;;
29062 *)
29063 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
29064 ;;
29065 esac
29066done
29067
29068ac_aux_dir='$ac_aux_dir'
29069
29070# See if we are running on zsh, and set the options that allow our
29071# commands through without removal of \ escapes INIT.
29072if test -n "\${ZSH_VERSION+set}"; then
29073 setopt NO_GLOB_SUBST
29074fi
29075
29076
29077 PACKAGE='$PACKAGE'
29078 VERSION='$VERSION'
29079 RM='$RM'
29080 ofile='$ofile'
29081
29082
29083
29084
29085
29086
29087_ACEOF
29088
29089cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29090
29091# Handling of arguments.
29092for ac_config_target in $ac_config_targets
29093do
29094 case $ac_config_target in
29095 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
29096 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
29097 "mpn/$tmp_fn.$tmp_ext") CONFIG_LINKS="$CONFIG_LINKS mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext" ;;
29098 "gmp-mparam.h") CONFIG_LINKS="$CONFIG_LINKS gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h" ;;
29099 "demos/pexpr-config.h") CONFIG_FILES="$CONFIG_FILES demos/pexpr-config.h:demos/pexpr-config-h.in" ;;
29100 "demos/calc/calc-config.h") CONFIG_FILES="$CONFIG_FILES demos/calc/calc-config.h:demos/calc/calc-config-h.in" ;;
29101 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29102 "mpf/Makefile") CONFIG_FILES="$CONFIG_FILES mpf/Makefile" ;;
29103 "mpn/Makefile") CONFIG_FILES="$CONFIG_FILES mpn/Makefile" ;;
29104 "mpq/Makefile") CONFIG_FILES="$CONFIG_FILES mpq/Makefile" ;;
29105 "mpz/Makefile") CONFIG_FILES="$CONFIG_FILES mpz/Makefile" ;;
29106 "printf/Makefile") CONFIG_FILES="$CONFIG_FILES printf/Makefile" ;;
29107 "scanf/Makefile") CONFIG_FILES="$CONFIG_FILES scanf/Makefile" ;;
29108 "rand/Makefile") CONFIG_FILES="$CONFIG_FILES rand/Makefile" ;;
29109 "cxx/Makefile") CONFIG_FILES="$CONFIG_FILES cxx/Makefile" ;;
29110 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
29111 "tests/devel/Makefile") CONFIG_FILES="$CONFIG_FILES tests/devel/Makefile" ;;
29112 "tests/mpf/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpf/Makefile" ;;
29113 "tests/mpn/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpn/Makefile" ;;
29114 "tests/mpq/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpq/Makefile" ;;
29115 "tests/mpz/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mpz/Makefile" ;;
29116 "tests/rand/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rand/Makefile" ;;
29117 "tests/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/misc/Makefile" ;;
29118 "tests/cxx/Makefile") CONFIG_FILES="$CONFIG_FILES tests/cxx/Makefile" ;;
29119 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
29120 "tune/Makefile") CONFIG_FILES="$CONFIG_FILES tune/Makefile" ;;
29121 "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;;
29122 "demos/calc/Makefile") CONFIG_FILES="$CONFIG_FILES demos/calc/Makefile" ;;
29123 "demos/expr/Makefile") CONFIG_FILES="$CONFIG_FILES demos/expr/Makefile" ;;
29124 "gmp.h") CONFIG_FILES="$CONFIG_FILES gmp.h:gmp-h.in" ;;
29125 "gmp.pc") CONFIG_FILES="$CONFIG_FILES gmp.pc:gmp.pc.in" ;;
29126 "gmpxx.pc") CONFIG_FILES="$CONFIG_FILES gmpxx.pc:gmpxx.pc.in" ;;
29127
29128 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
29129 esac
29130done
29131
29132
29133# If the user did not use the arguments to specify the items to instantiate,
29134# then the envvar interface is used. Set only those that are not.
29135# We use the long form for the default assignment because of an extremely
29136# bizarre bug on SunOS 4.1.3.
29137if $ac_need_defaults; then
29138 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29139 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29140 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
29141 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29142fi
29143
29144# Have a temporary directory for convenience. Make it in the build tree
29145# simply because there is no reason against having it here, and in addition,
29146# creating and moving files from /tmp can sometimes cause problems.
29147# Hook for its removal unless debugging.
29148# Note that there is a small window in which the directory will not be cleaned:
29149# after its creation but before its name has been assigned to `$tmp'.
29150$debug ||
29151{
29152 tmp= ac_tmp=
29153 trap 'exit_status=$?
29154 : "${ac_tmp:=$tmp}"
29155 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
29156' 0
29157 trap 'as_fn_exit 1' 1 2 13 15
29158}
29159# Create a (secure) tmp directory for tmp files.
29160
29161{
29162 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
29163 test -d "$tmp"
29164} ||
29165{
29166 tmp=./conf$$-$RANDOM
29167 (umask 077 && mkdir "$tmp")
29168} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29169ac_tmp=$tmp
29170
29171# Set up the scripts for CONFIG_FILES section.
29172# No need to generate them if there are no CONFIG_FILES.
29173# This happens for instance with `./config.status config.h'.
29174if test -n "$CONFIG_FILES"; then
29175
29176
29177ac_cr=`echo X | tr X '\015'`
29178# On cygwin, bash can eat \r inside `` if the user requested igncr.
29179# But we know of no other shell where ac_cr would be empty at this
29180# point, so we can use a bashism as a fallback.
29181if test "x$ac_cr" = x; then
29182 eval ac_cr=\$\'\\r\'
29183fi
29184ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29185if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
29186 ac_cs_awk_cr='\\r'
29187else
29188 ac_cs_awk_cr=$ac_cr
29189fi
29190
29191echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
29192_ACEOF
29193
29194
29195{
29196 echo "cat >conf$$subs.awk <<_ACEOF" &&
29197 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29198 echo "_ACEOF"
29199} >conf$$subs.sh ||
29200 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29201ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
29202ac_delim='%!_!# '
29203for ac_last_try in false false false false false :; do
29204 . ./conf$$subs.sh ||
29205 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29206
29207 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29208 if test $ac_delim_n = $ac_delim_num; then
29209 break
29210 elif $ac_last_try; then
29211 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29212 else
29213 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29214 fi
29215done
29216rm -f conf$$subs.sh
29217
29218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29219cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
29220_ACEOF
29221sed -n '
29222h
29223s/^/S["/; s/!.*/"]=/
29224p
29225g
29226s/^[^!]*!//
29227:repl
29228t repl
29229s/'"$ac_delim"'$//
29230t delim
29231:nl
29232h
29233s/\(.\{148\}\)..*/\1/
29234t more1
29235s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29236p
29237n
29238b repl
29239:more1
29240s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29241p
29242g
29243s/.\{148\}//
29244t nl
29245:delim
29246h
29247s/\(.\{148\}\)..*/\1/
29248t more2
29249s/["\\]/\\&/g; s/^/"/; s/$/"/
29250p
29251b
29252:more2
29253s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29254p
29255g
29256s/.\{148\}//
29257t delim
29258' <conf$$subs.awk | sed '
29259/^[^""]/{
29260 N
29261 s/\n//
29262}
29263' >>$CONFIG_STATUS || ac_write_fail=1
29264rm -f conf$$subs.awk
29265cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29266_ACAWK
29267cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
29268 for (key in S) S_is_set[key] = 1
29269 FS = ""
29270
29271}
29272{
29273 line = $ 0
29274 nfields = split(line, field, "@")
29275 substed = 0
29276 len = length(field[1])
29277 for (i = 2; i < nfields; i++) {
29278 key = field[i]
29279 keylen = length(key)
29280 if (S_is_set[key]) {
29281 value = S[key]
29282 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29283 len += length(value) + length(field[++i])
29284 substed = 1
29285 } else
29286 len += 1 + keylen
29287 }
29288
29289 print line
29290}
29291
29292_ACAWK
29293_ACEOF
29294cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29295if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29296 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29297else
29298 cat
29299fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29300 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
29301_ACEOF
29302
29303# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29304# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
29305# trailing colons and then remove the whole line if VPATH becomes empty
29306# (actually we leave an empty line to preserve line numbers).
29307if test "x$srcdir" = x.; then
29308 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
29309h
29310s///
29311s/^/:/
29312s/[ ]*$/:/
29313s/:\$(srcdir):/:/g
29314s/:\${srcdir}:/:/g
29315s/:@srcdir@:/:/g
29316s/^:*//
29317s/:*$//
29318x
29319s/\(=[ ]*\).*/\1/
29320G
29321s/\n//
29322s/^[^=]*=[ ]*$//
29323}'
29324fi
29325
29326cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29327fi # test -n "$CONFIG_FILES"
29328
29329# Set up the scripts for CONFIG_HEADERS section.
29330# No need to generate them if there are no CONFIG_HEADERS.
29331# This happens for instance with `./config.status Makefile'.
29332if test -n "$CONFIG_HEADERS"; then
29333cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
29334BEGIN {
29335_ACEOF
29336
29337# Transform confdefs.h into an awk script `defines.awk', embedded as
29338# here-document in config.status, that substitutes the proper values into
29339# config.h.in to produce config.h.
29340
29341# Create a delimiter string that does not exist in confdefs.h, to ease
29342# handling of long lines.
29343ac_delim='%!_!# '
29344for ac_last_try in false false :; do
29345 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
29346 if test -z "$ac_tt"; then
29347 break
29348 elif $ac_last_try; then
29349 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
29350 else
29351 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29352 fi
29353done
29354
29355# For the awk script, D is an array of macro values keyed by name,
29356# likewise P contains macro parameters if any. Preserve backslash
29357# newline sequences.
29358
29359ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29360sed -n '
29361s/.\{148\}/&'"$ac_delim"'/g
29362t rset
29363:rset
29364s/^[ ]*#[ ]*define[ ][ ]*/ /
29365t def
29366d
29367:def
29368s/\\$//
29369t bsnl
29370s/["\\]/\\&/g
29371s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29372D["\1"]=" \3"/p
29373s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29374d
29375:bsnl
29376s/["\\]/\\&/g
29377s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29378D["\1"]=" \3\\\\\\n"\\/p
29379t cont
29380s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29381t cont
29382d
29383:cont
29384n
29385s/.\{148\}/&'"$ac_delim"'/g
29386t clear
29387:clear
29388s/\\$//
29389t bsnlc
29390s/["\\]/\\&/g; s/^/"/; s/$/"/p
29391d
29392:bsnlc
29393s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29394b cont
29395' <confdefs.h | sed '
29396s/'"$ac_delim"'/"\\\
29397"/g' >>$CONFIG_STATUS || ac_write_fail=1
29398
29399cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29400 for (key in D) D_is_set[key] = 1
29401 FS = ""
29402}
29403/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29404 line = \$ 0
29405 split(line, arg, " ")
29406 if (arg[1] == "#") {
29407 defundef = arg[2]
29408 mac1 = arg[3]
29409 } else {
29410 defundef = substr(arg[1], 2)
29411 mac1 = arg[2]
29412 }
29413 split(mac1, mac2, "(") #)
29414 macro = mac2[1]
29415 prefix = substr(line, 1, index(line, defundef) - 1)
29416 if (D_is_set[macro]) {
29417 # Preserve the white space surrounding the "#".
29418 print prefix "define", macro P[macro] D[macro]
29419 next
29420 } else {
29421 # Replace #undef with comments. This is necessary, for example,
29422 # in the case of _POSIX_SOURCE, which is predefined and required
29423 # on some systems where configure will not decide to define it.
29424 if (defundef == "undef") {
29425 print "/*", prefix defundef, macro, "*/"
29426 next
29427 }
29428 }
29429}
29430{ print }
29431_ACAWK
29432_ACEOF
29433cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29434 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
29435fi # test -n "$CONFIG_HEADERS"
29436
29437
29438eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
29439shift
29440for ac_tag
29441do
29442 case $ac_tag in
29443 :[FHLC]) ac_mode=$ac_tag; continue;;
29444 esac
29445 case $ac_mode$ac_tag in
29446 :[FHL]*:*);;
29447 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
29448 :[FH]-) ac_tag=-:-;;
29449 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29450 esac
29451 ac_save_IFS=$IFS
29452 IFS=:
29453 set x $ac_tag
29454 IFS=$ac_save_IFS
29455 shift
29456 ac_file=$1
29457 shift
29458
29459 case $ac_mode in
29460 :L) ac_source=$1;;
29461 :[FH])
29462 ac_file_inputs=
29463 for ac_f
29464 do
29465 case $ac_f in
29466 -) ac_f="$ac_tmp/stdin";;
29467 *) # Look for the file first in the build tree, then in the source tree
29468 # (if the path is not absolute). The absolute path cannot be DOS-style,
29469 # because $ac_f cannot contain `:'.
29470 test -f "$ac_f" ||
29471 case $ac_f in
29472 [\\/$]*) false;;
29473 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29474 esac ||
29475 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
29476 esac
29477 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29478 as_fn_append ac_file_inputs " '$ac_f'"
29479 done
29480
29481 # Let's still pretend it is `configure' which instantiates (i.e., don't
29482 # use $as_me), people would be surprised to read:
29483 # /* config.h. Generated by config.status. */
29484 configure_input='Generated from '`
29485 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29486 `' by configure.'
29487 if test x"$ac_file" != x-; then
29488 configure_input="$ac_file. $configure_input"
29489 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29490$as_echo "$as_me: creating $ac_file" >&6;}
29491 fi
29492 # Neutralize special characters interpreted by sed in replacement strings.
29493 case $configure_input in #(
29494 *\&* | *\|* | *\\* )
29495 ac_sed_conf_input=`$as_echo "$configure_input" |
29496 sed 's/[\\\\&|]/\\\\&/g'`;; #(
29497 *) ac_sed_conf_input=$configure_input;;
29498 esac
29499
29500 case $ac_tag in
29501 *:-:* | *:-) cat >"$ac_tmp/stdin" \
29502 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
29503 esac
29504 ;;
29505 esac
29506
29507 ac_dir=`$as_dirname -- "$ac_file" ||
29508$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29509 X"$ac_file" : 'X\(//\)[^/]' \| \
29510 X"$ac_file" : 'X\(//\)$' \| \
29511 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29512$as_echo X"$ac_file" |
29513 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29514 s//\1/
29515 q
29516 }
29517 /^X\(\/\/\)[^/].*/{
29518 s//\1/
29519 q
29520 }
29521 /^X\(\/\/\)$/{
29522 s//\1/
29523 q
29524 }
29525 /^X\(\/\).*/{
29526 s//\1/
29527 q
29528 }
29529 s/.*/./; q'`
29530 as_dir="$ac_dir"; as_fn_mkdir_p
29531 ac_builddir=.
29532
29533case "$ac_dir" in
29534.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29535*)
29536 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
29537 # A ".." for each directory in $ac_dir_suffix.
29538 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29539 case $ac_top_builddir_sub in
29540 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29541 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29542 esac ;;
29543esac
29544ac_abs_top_builddir=$ac_pwd
29545ac_abs_builddir=$ac_pwd$ac_dir_suffix
29546# for backward compatibility:
29547ac_top_builddir=$ac_top_build_prefix
29548
29549case $srcdir in
29550 .) # We are building in place.
29551 ac_srcdir=.
29552 ac_top_srcdir=$ac_top_builddir_sub
29553 ac_abs_top_srcdir=$ac_pwd ;;
29554 [\\/]* | ?:[\\/]* ) # Absolute name.
29555 ac_srcdir=$srcdir$ac_dir_suffix;
29556 ac_top_srcdir=$srcdir
29557 ac_abs_top_srcdir=$srcdir ;;
29558 *) # Relative name.
29559 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29560 ac_top_srcdir=$ac_top_build_prefix$srcdir
29561 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29562esac
29563ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
29564
29565
29566 case $ac_mode in
29567 :F)
29568 #
29569 # CONFIG_FILE
29570 #
29571
29572 case $INSTALL in
29573 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29574 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
29575 esac
29576 ac_MKDIR_P=$MKDIR_P
29577 case $MKDIR_P in
29578 [\\/$]* | ?:[\\/]* ) ;;
29579 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
29580 esac
29581_ACEOF
29582
29583cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29584# If the template does not know about datarootdir, expand it.
29585# FIXME: This hack should be removed a few years after 2.60.
29586ac_datarootdir_hack=; ac_datarootdir_seen=
29587ac_sed_dataroot='
29588/datarootdir/ {
29589 p
29590 q
29591}
29592/@datadir@/p
29593/@docdir@/p
29594/@infodir@/p
29595/@localedir@/p
29596/@mandir@/p'
29597case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
29598*datarootdir*) ac_datarootdir_seen=yes;;
29599*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
29600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
29601$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
29602_ACEOF
29603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29604 ac_datarootdir_hack='
29605 s&@datadir@&$datadir&g
29606 s&@docdir@&$docdir&g
29607 s&@infodir@&$infodir&g
29608 s&@localedir@&$localedir&g
29609 s&@mandir@&$mandir&g
29610 s&\\\${datarootdir}&$datarootdir&g' ;;
29611esac
29612_ACEOF
29613
29614# Neutralize VPATH when `$srcdir' = `.'.
29615# Shell code in configure.ac might set extrasub.
29616# FIXME: do we really want to maintain this feature?
29617cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29618ac_sed_extra="$ac_vpsub
29619$extrasub
29620_ACEOF
29621cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29622:t
29623/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29624s|@configure_input@|$ac_sed_conf_input|;t t
29625s&@top_builddir@&$ac_top_builddir_sub&;t t
29626s&@top_build_prefix@&$ac_top_build_prefix&;t t
29627s&@srcdir@&$ac_srcdir&;t t
29628s&@abs_srcdir@&$ac_abs_srcdir&;t t
29629s&@top_srcdir@&$ac_top_srcdir&;t t
29630s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
29631s&@builddir@&$ac_builddir&;t t
29632s&@abs_builddir@&$ac_abs_builddir&;t t
29633s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
29634s&@INSTALL@&$ac_INSTALL&;t t
29635s&@MKDIR_P@&$ac_MKDIR_P&;t t
29636$ac_datarootdir_hack
29637"
29638eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
29639 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
29640
29641test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
29642 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
29643 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
29644 "$ac_tmp/out"`; test -z "$ac_out"; } &&
29645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
29646which seems to be undefined. Please make sure it is defined" >&5
29647$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
29648which seems to be undefined. Please make sure it is defined" >&2;}
29649
29650 rm -f "$ac_tmp/stdin"
29651 case $ac_file in
29652 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
29653 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
29654 esac \
29655 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
29656 ;;
29657 :H)
29658 #
29659 # CONFIG_HEADER
29660 #
29661 if test x"$ac_file" != x-; then
29662 {
29663 $as_echo "/* $configure_input */" \
29664 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
29665 } >"$ac_tmp/config.h" \
29666 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
29667 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
29668 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
29669$as_echo "$as_me: $ac_file is unchanged" >&6;}
29670 else
29671 rm -f "$ac_file"
29672 mv "$ac_tmp/config.h" "$ac_file" \
29673 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
29674 fi
29675 else
29676 $as_echo "/* $configure_input */" \
29677 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
29678 || as_fn_error $? "could not create -" "$LINENO" 5
29679 fi
29680# Compute "$ac_file"'s index in $config_headers.
29681_am_arg="$ac_file"
29682_am_stamp_count=1
29683for _am_header in $config_headers :; do
29684 case $_am_header in
29685 $_am_arg | $_am_arg:* )
29686 break ;;
29687 * )
29688 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
29689 esac
29690done
29691echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
29692$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29693 X"$_am_arg" : 'X\(//\)[^/]' \| \
29694 X"$_am_arg" : 'X\(//\)$' \| \
29695 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
29696$as_echo X"$_am_arg" |
29697 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29698 s//\1/
29699 q
29700 }
29701 /^X\(\/\/\)[^/].*/{
29702 s//\1/
29703 q
29704 }
29705 /^X\(\/\/\)$/{
29706 s//\1/
29707 q
29708 }
29709 /^X\(\/\).*/{
29710 s//\1/
29711 q
29712 }
29713 s/.*/./; q'`/stamp-h$_am_stamp_count
29714 ;;
29715 :L)
29716 #
29717 # CONFIG_LINK
29718 #
29719
29720 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
29721 :
29722 else
29723 # Prefer the file from the source tree if names are identical.
29724 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
29725 ac_source=$srcdir/$ac_source
29726 fi
29727
29728 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
29729$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
29730
29731 if test ! -r "$ac_source"; then
29732 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
29733 fi
29734 rm -f "$ac_file"
29735
29736 # Try a relative symlink, then a hard link, then a copy.
29737 case $ac_source in
29738 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
29739 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
29740 esac
29741 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
29742 ln "$ac_source" "$ac_file" 2>/dev/null ||
29743 cp -p "$ac_source" "$ac_file" ||
29744 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
29745 fi
29746 ;;
29747 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
29748$as_echo "$as_me: executing $ac_file commands" >&6;}
29749 ;;
29750 esac
29751
29752
29753 case $ac_file$ac_mode in
29754 "libtool":C)
29755
29756 # See if we are running on zsh, and set the options that allow our
29757 # commands through without removal of \ escapes.
29758 if test -n "${ZSH_VERSION+set}"; then
29759 setopt NO_GLOB_SUBST
29760 fi
29761
29762 cfgfile=${ofile}T
29763 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
29764 $RM "$cfgfile"
29765
29766 cat <<_LT_EOF >> "$cfgfile"
29767#! $SHELL
29768# Generated automatically by $as_me ($PACKAGE) $VERSION
29769# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
29770# NOTE: Changes made to this file will be lost: look at ltmain.sh.
29771
29772# Provide generalized library-building support services.
29773# Written by Gordon Matzigkeit, 1996
29774
29775# Copyright (C) 2014 Free Software Foundation, Inc.
29776# This is free software; see the source for copying conditions. There is NO
29777# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29778
29779# GNU Libtool is free software; you can redistribute it and/or modify
29780# it under the terms of the GNU General Public License as published by
29781# the Free Software Foundation; either version 2 of of the License, or
29782# (at your option) any later version.
29783#
29784# As a special exception to the GNU General Public License, if you
29785# distribute this file as part of a program or library that is built
29786# using GNU Libtool, you may include this file under the same
29787# distribution terms that you use for the rest of that program.
29788#
29789# GNU Libtool is distributed in the hope that it will be useful, but
29790# WITHOUT ANY WARRANTY; without even the implied warranty of
29791# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29792# GNU General Public License for more details.
29793#
29794# You should have received a copy of the GNU General Public License
29795# along with this program. If not, see <http://www.gnu.org/licenses/>.
29796
29797
29798# The names of the tagged configurations supported by this script.
29799available_tags='CXX '
29800
29801# Configured defaults for sys_lib_dlsearch_path munging.
29802: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
29803
29804# ### BEGIN LIBTOOL CONFIG
29805
29806# A BSD- or MS-compatible name lister.
29807NM=$lt_NM
29808
29809# Assembler program.
29810AS=$lt_AS
29811
29812# DLL creation program.
29813DLLTOOL=$lt_DLLTOOL
29814
29815# Object dumper program.
29816OBJDUMP=$lt_OBJDUMP
29817
29818# Which release of libtool.m4 was used?
29819macro_version=$macro_version
29820macro_revision=$macro_revision
29821
29822# Whether or not to build shared libraries.
29823build_libtool_libs=$enable_shared
29824
29825# Whether or not to build static libraries.
29826build_old_libs=$enable_static
29827
29828# What type of objects to build.
29829pic_mode=$pic_mode
29830
29831# Whether or not to optimize for fast installation.
29832fast_install=$enable_fast_install
29833
29834# Shared archive member basename,for filename based shared library versioning on AIX.
29835shared_archive_member_spec=$shared_archive_member_spec
29836
29837# Shell to use when invoking shell scripts.
29838SHELL=$lt_SHELL
29839
29840# An echo program that protects backslashes.
29841ECHO=$lt_ECHO
29842
29843# The PATH separator for the build system.
29844PATH_SEPARATOR=$lt_PATH_SEPARATOR
29845
29846# The host system.
29847host_alias=$host_alias
29848host=$host
29849host_os=$host_os
29850
29851# The build system.
29852build_alias=$build_alias
29853build=$build
29854build_os=$build_os
29855
29856# A sed program that does not truncate output.
29857SED=$lt_SED
29858
29859# Sed that helps us avoid accidentally triggering echo(1) options like -n.
29860Xsed="\$SED -e 1s/^X//"
29861
29862# A grep program that handles long lines.
29863GREP=$lt_GREP
29864
29865# An ERE matcher.
29866EGREP=$lt_EGREP
29867
29868# A literal string matcher.
29869FGREP=$lt_FGREP
29870
29871# Whether we need soft or hard links.
29872LN_S=$lt_LN_S
29873
29874# What is the maximum length of a command?
29875max_cmd_len=$max_cmd_len
29876
29877# Object file suffix (normally "o").
29878objext=$ac_objext
29879
29880# Executable file suffix (normally "").
29881exeext=$exeext
29882
29883# whether the shell understands "unset".
29884lt_unset=$lt_unset
29885
29886# turn spaces into newlines.
29887SP2NL=$lt_lt_SP2NL
29888
29889# turn newlines into spaces.
29890NL2SP=$lt_lt_NL2SP
29891
29892# convert \$build file names to \$host format.
29893to_host_file_cmd=$lt_cv_to_host_file_cmd
29894
29895# convert \$build files to toolchain format.
29896to_tool_file_cmd=$lt_cv_to_tool_file_cmd
29897
29898# Method to check whether dependent libraries are shared objects.
29899deplibs_check_method=$lt_deplibs_check_method
29900
29901# Command to use when deplibs_check_method = "file_magic".
29902file_magic_cmd=$lt_file_magic_cmd
29903
29904# How to find potential files when deplibs_check_method = "file_magic".
29905file_magic_glob=$lt_file_magic_glob
29906
29907# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
29908want_nocaseglob=$lt_want_nocaseglob
29909
29910# Command to associate shared and link libraries.
29911sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
29912
29913# The archiver.
29914AR=$lt_AR
29915
29916# Flags to create an archive.
29917AR_FLAGS=$lt_AR_FLAGS
29918
29919# How to feed a file listing to the archiver.
29920archiver_list_spec=$lt_archiver_list_spec
29921
29922# A symbol stripping program.
29923STRIP=$lt_STRIP
29924
29925# Commands used to install an old-style archive.
29926RANLIB=$lt_RANLIB
29927old_postinstall_cmds=$lt_old_postinstall_cmds
29928old_postuninstall_cmds=$lt_old_postuninstall_cmds
29929
29930# Whether to use a lock for old archive extraction.
29931lock_old_archive_extraction=$lock_old_archive_extraction
29932
29933# A C compiler.
29934LTCC=$lt_CC
29935
29936# LTCC compiler flags.
29937LTCFLAGS=$lt_CFLAGS
29938
29939# Take the output of nm and produce a listing of raw symbols and C names.
29940global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
29941
29942# Transform the output of nm in a proper C declaration.
29943global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
29944
29945# Transform the output of nm into a list of symbols to manually relocate.
29946global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
29947
29948# Transform the output of nm in a C name address pair.
29949global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
29950
29951# Transform the output of nm in a C name address pair when lib prefix is needed.
29952global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
29953
29954# The name lister interface.
29955nm_interface=$lt_lt_cv_nm_interface
29956
29957# Specify filename containing input files for \$NM.
29958nm_file_list_spec=$lt_nm_file_list_spec
29959
29960# The root where to search for dependent libraries,and where our libraries should be installed.
29961lt_sysroot=$lt_sysroot
29962
29963# Command to truncate a binary pipe.
29964lt_truncate_bin=$lt_lt_cv_truncate_bin
29965
29966# The name of the directory that contains temporary libtool files.
29967objdir=$objdir
29968
29969# Used to examine libraries when file_magic_cmd begins with "file".
29970MAGIC_CMD=$MAGIC_CMD
29971
29972# Must we lock files when doing compilation?
29973need_locks=$lt_need_locks
29974
29975# Manifest tool.
29976MANIFEST_TOOL=$lt_MANIFEST_TOOL
29977
29978# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
29979DSYMUTIL=$lt_DSYMUTIL
29980
29981# Tool to change global to local symbols on Mac OS X.
29982NMEDIT=$lt_NMEDIT
29983
29984# Tool to manipulate fat objects and archives on Mac OS X.
29985LIPO=$lt_LIPO
29986
29987# ldd/readelf like tool for Mach-O binaries on Mac OS X.
29988OTOOL=$lt_OTOOL
29989
29990# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
29991OTOOL64=$lt_OTOOL64
29992
29993# Old archive suffix (normally "a").
29994libext=$libext
29995
29996# Shared library suffix (normally ".so").
29997shrext_cmds=$lt_shrext_cmds
29998
29999# The commands to extract the exported symbol list from a shared archive.
30000extract_expsyms_cmds=$lt_extract_expsyms_cmds
30001
30002# Variables whose values should be saved in libtool wrapper scripts and
30003# restored at link time.
30004variables_saved_for_relink=$lt_variables_saved_for_relink
30005
30006# Do we need the "lib" prefix for modules?
30007need_lib_prefix=$need_lib_prefix
30008
30009# Do we need a version for libraries?
30010need_version=$need_version
30011
30012# Library versioning type.
30013version_type=$version_type
30014
30015# Shared library runtime path variable.
30016runpath_var=$runpath_var
30017
30018# Shared library path variable.
30019shlibpath_var=$shlibpath_var
30020
30021# Is shlibpath searched before the hard-coded library search path?
30022shlibpath_overrides_runpath=$shlibpath_overrides_runpath
30023
30024# Format of library name prefix.
30025libname_spec=$lt_libname_spec
30026
30027# List of archive names. First name is the real one, the rest are links.
30028# The last name is the one that the linker finds with -lNAME
30029library_names_spec=$lt_library_names_spec
30030
30031# The coded name of the library, if different from the real name.
30032soname_spec=$lt_soname_spec
30033
30034# Permission mode override for installation of shared libraries.
30035install_override_mode=$lt_install_override_mode
30036
30037# Command to use after installation of a shared archive.
30038postinstall_cmds=$lt_postinstall_cmds
30039
30040# Command to use after uninstallation of a shared archive.
30041postuninstall_cmds=$lt_postuninstall_cmds
30042
30043# Commands used to finish a libtool library installation in a directory.
30044finish_cmds=$lt_finish_cmds
30045
30046# As "finish_cmds", except a single script fragment to be evaled but
30047# not shown.
30048finish_eval=$lt_finish_eval
30049
30050# Whether we should hardcode library paths into libraries.
30051hardcode_into_libs=$hardcode_into_libs
30052
30053# Compile-time system search path for libraries.
30054sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
30055
30056# Detected run-time system search path for libraries.
30057sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
30058
30059# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
30060configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
30061
30062# Whether dlopen is supported.
30063dlopen_support=$enable_dlopen
30064
30065# Whether dlopen of programs is supported.
30066dlopen_self=$enable_dlopen_self
30067
30068# Whether dlopen of statically linked programs is supported.
30069dlopen_self_static=$enable_dlopen_self_static
30070
30071# Commands to strip libraries.
30072old_striplib=$lt_old_striplib
30073striplib=$lt_striplib
30074
30075
30076# The linker used to build libraries.
30077LD=$lt_LD
30078
30079# How to create reloadable object files.
30080reload_flag=$lt_reload_flag
30081reload_cmds=$lt_reload_cmds
30082
30083# Commands used to build an old-style archive.
30084old_archive_cmds=$lt_old_archive_cmds
30085
30086# A language specific compiler.
30087CC=$lt_compiler
30088
30089# Is the compiler the GNU compiler?
30090with_gcc=$GCC
30091
30092# Compiler flag to turn off builtin functions.
30093no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
30094
30095# Additional compiler flags for building library objects.
30096pic_flag=$lt_lt_prog_compiler_pic
30097
30098# How to pass a linker flag through the compiler.
30099wl=$lt_lt_prog_compiler_wl
30100
30101# Compiler flag to prevent dynamic linking.
30102link_static_flag=$lt_lt_prog_compiler_static
30103
30104# Does compiler simultaneously support -c and -o options?
30105compiler_c_o=$lt_lt_cv_prog_compiler_c_o
30106
30107# Whether or not to add -lc for building shared libraries.
30108build_libtool_need_lc=$archive_cmds_need_lc
30109
30110# Whether or not to disallow shared libs when runtime libs are static.
30111allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
30112
30113# Compiler flag to allow reflexive dlopens.
30114export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
30115
30116# Compiler flag to generate shared objects directly from archives.
30117whole_archive_flag_spec=$lt_whole_archive_flag_spec
30118
30119# Whether the compiler copes with passing no objects directly.
30120compiler_needs_object=$lt_compiler_needs_object
30121
30122# Create an old-style archive from a shared archive.
30123old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
30124
30125# Create a temporary old-style archive to link instead of a shared archive.
30126old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
30127
30128# Commands used to build a shared archive.
30129archive_cmds=$lt_archive_cmds
30130archive_expsym_cmds=$lt_archive_expsym_cmds
30131
30132# Commands used to build a loadable module if different from building
30133# a shared archive.
30134module_cmds=$lt_module_cmds
30135module_expsym_cmds=$lt_module_expsym_cmds
30136
30137# Whether we are building with GNU ld or not.
30138with_gnu_ld=$lt_with_gnu_ld
30139
30140# Flag that allows shared libraries with undefined symbols to be built.
30141allow_undefined_flag=$lt_allow_undefined_flag
30142
30143# Flag that enforces no undefined symbols.
30144no_undefined_flag=$lt_no_undefined_flag
30145
30146# Flag to hardcode \$libdir into a binary during linking.
30147# This must work even if \$libdir does not exist
30148hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
30149
30150# Whether we need a single "-rpath" flag with a separated argument.
30151hardcode_libdir_separator=$lt_hardcode_libdir_separator
30152
30153# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
30154# DIR into the resulting binary.
30155hardcode_direct=$hardcode_direct
30156
30157# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
30158# DIR into the resulting binary and the resulting library dependency is
30159# "absolute",i.e impossible to change by setting \$shlibpath_var if the
30160# library is relocated.
30161hardcode_direct_absolute=$hardcode_direct_absolute
30162
30163# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
30164# into the resulting binary.
30165hardcode_minus_L=$hardcode_minus_L
30166
30167# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
30168# into the resulting binary.
30169hardcode_shlibpath_var=$hardcode_shlibpath_var
30170
30171# Set to "yes" if building a shared library automatically hardcodes DIR
30172# into the library and all subsequent libraries and executables linked
30173# against it.
30174hardcode_automatic=$hardcode_automatic
30175
30176# Set to yes if linker adds runtime paths of dependent libraries
30177# to runtime path list.
30178inherit_rpath=$inherit_rpath
30179
30180# Whether libtool must link a program against all its dependency libraries.
30181link_all_deplibs=$link_all_deplibs
30182
30183# Set to "yes" if exported symbols are required.
30184always_export_symbols=$always_export_symbols
30185
30186# The commands to list exported symbols.
30187export_symbols_cmds=$lt_export_symbols_cmds
30188
30189# Symbols that should not be listed in the preloaded symbols.
30190exclude_expsyms=$lt_exclude_expsyms
30191
30192# Symbols that must always be exported.
30193include_expsyms=$lt_include_expsyms
30194
30195# Commands necessary for linking programs (against libraries) with templates.
30196prelink_cmds=$lt_prelink_cmds
30197
30198# Commands necessary for finishing linking programs.
30199postlink_cmds=$lt_postlink_cmds
30200
30201# Specify filename containing input files.
30202file_list_spec=$lt_file_list_spec
30203
30204# How to hardcode a shared library path into an executable.
30205hardcode_action=$hardcode_action
30206
30207# The directories searched by this compiler when creating a shared library.
30208compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
30209
30210# Dependencies to place before and after the objects being linked to
30211# create a shared library.
30212predep_objects=$lt_predep_objects
30213postdep_objects=$lt_postdep_objects
30214predeps=$lt_predeps
30215postdeps=$lt_postdeps
30216
30217# The library search path used internally by the compiler when linking
30218# a shared library.
30219compiler_lib_search_path=$lt_compiler_lib_search_path
30220
30221# ### END LIBTOOL CONFIG
30222
30223_LT_EOF
30224
30225 cat <<'_LT_EOF' >> "$cfgfile"
30226
30227# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
30228
30229# func_munge_path_list VARIABLE PATH
30230# -----------------------------------
30231# VARIABLE is name of variable containing _space_ separated list of
30232# directories to be munged by the contents of PATH, which is string
30233# having a format:
30234# "DIR[:DIR]:"
30235# string "DIR[ DIR]" will be prepended to VARIABLE
30236# ":DIR[:DIR]"
30237# string "DIR[ DIR]" will be appended to VARIABLE
30238# "DIRP[:DIRP]::[DIRA:]DIRA"
30239# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
30240# "DIRA[ DIRA]" will be appended to VARIABLE
30241# "DIR[:DIR]"
30242# VARIABLE will be replaced by "DIR[ DIR]"
30243func_munge_path_list ()
30244{
30245 case x$2 in
30246 x)
30247 ;;
30248 *:)
30249 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
30250 ;;
30251 x:*)
30252 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
30253 ;;
30254 *::*)
30255 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
30256 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
30257 ;;
30258 *)
30259 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
30260 ;;
30261 esac
30262}
30263
30264
30265# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
30266func_cc_basename ()
30267{
30268 for cc_temp in $*""; do
30269 case $cc_temp in
30270 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
30271 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
30272 \-*) ;;
30273 *) break;;
30274 esac
30275 done
30276 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
30277}
30278
30279
30280# ### END FUNCTIONS SHARED WITH CONFIGURE
30281
30282_LT_EOF
30283
30284 case $host_os in
30285 aix3*)
30286 cat <<\_LT_EOF >> "$cfgfile"
30287# AIX sometimes has problems with the GCC collect2 program. For some
30288# reason, if we set the COLLECT_NAMES environment variable, the problems
30289# vanish in a puff of smoke.
30290if test set != "${COLLECT_NAMES+set}"; then
30291 COLLECT_NAMES=
30292 export COLLECT_NAMES
30293fi
30294_LT_EOF
30295 ;;
30296 esac
30297
30298
30299ltmain=$ac_aux_dir/ltmain.sh
30300
30301
30302 # We use sed instead of cat because bash on DJGPP gets confused if
30303 # if finds mixed CR/LF and LF-only lines. Since sed operates in
30304 # text mode, it properly converts lines to CR/LF. This bash problem
30305 # is reportedly fixed, but why not run on old versions too?
30306 sed '$q' "$ltmain" >> "$cfgfile" \
30307 || (rm -f "$cfgfile"; exit 1)
30308
30309 mv -f "$cfgfile" "$ofile" ||
30310 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
30311 chmod +x "$ofile"
30312
30313
30314 cat <<_LT_EOF >> "$ofile"
30315
30316# ### BEGIN LIBTOOL TAG CONFIG: CXX
30317
30318# The linker used to build libraries.
30319LD=$lt_LD_CXX
30320
30321# How to create reloadable object files.
30322reload_flag=$lt_reload_flag_CXX
30323reload_cmds=$lt_reload_cmds_CXX
30324
30325# Commands used to build an old-style archive.
30326old_archive_cmds=$lt_old_archive_cmds_CXX
30327
30328# A language specific compiler.
30329CC=$lt_compiler_CXX
30330
30331# Is the compiler the GNU compiler?
30332with_gcc=$GCC_CXX
30333
30334# Compiler flag to turn off builtin functions.
30335no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
30336
30337# Additional compiler flags for building library objects.
30338pic_flag=$lt_lt_prog_compiler_pic_CXX
30339
30340# How to pass a linker flag through the compiler.
30341wl=$lt_lt_prog_compiler_wl_CXX
30342
30343# Compiler flag to prevent dynamic linking.
30344link_static_flag=$lt_lt_prog_compiler_static_CXX
30345
30346# Does compiler simultaneously support -c and -o options?
30347compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
30348
30349# Whether or not to add -lc for building shared libraries.
30350build_libtool_need_lc=$archive_cmds_need_lc_CXX
30351
30352# Whether or not to disallow shared libs when runtime libs are static.
30353allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
30354
30355# Compiler flag to allow reflexive dlopens.
30356export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
30357
30358# Compiler flag to generate shared objects directly from archives.
30359whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
30360
30361# Whether the compiler copes with passing no objects directly.
30362compiler_needs_object=$lt_compiler_needs_object_CXX
30363
30364# Create an old-style archive from a shared archive.
30365old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
30366
30367# Create a temporary old-style archive to link instead of a shared archive.
30368old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
30369
30370# Commands used to build a shared archive.
30371archive_cmds=$lt_archive_cmds_CXX
30372archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
30373
30374# Commands used to build a loadable module if different from building
30375# a shared archive.
30376module_cmds=$lt_module_cmds_CXX
30377module_expsym_cmds=$lt_module_expsym_cmds_CXX
30378
30379# Whether we are building with GNU ld or not.
30380with_gnu_ld=$lt_with_gnu_ld_CXX
30381
30382# Flag that allows shared libraries with undefined symbols to be built.
30383allow_undefined_flag=$lt_allow_undefined_flag_CXX
30384
30385# Flag that enforces no undefined symbols.
30386no_undefined_flag=$lt_no_undefined_flag_CXX
30387
30388# Flag to hardcode \$libdir into a binary during linking.
30389# This must work even if \$libdir does not exist
30390hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
30391
30392# Whether we need a single "-rpath" flag with a separated argument.
30393hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
30394
30395# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
30396# DIR into the resulting binary.
30397hardcode_direct=$hardcode_direct_CXX
30398
30399# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
30400# DIR into the resulting binary and the resulting library dependency is
30401# "absolute",i.e impossible to change by setting \$shlibpath_var if the
30402# library is relocated.
30403hardcode_direct_absolute=$hardcode_direct_absolute_CXX
30404
30405# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
30406# into the resulting binary.
30407hardcode_minus_L=$hardcode_minus_L_CXX
30408
30409# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
30410# into the resulting binary.
30411hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
30412
30413# Set to "yes" if building a shared library automatically hardcodes DIR
30414# into the library and all subsequent libraries and executables linked
30415# against it.
30416hardcode_automatic=$hardcode_automatic_CXX
30417
30418# Set to yes if linker adds runtime paths of dependent libraries
30419# to runtime path list.
30420inherit_rpath=$inherit_rpath_CXX
30421
30422# Whether libtool must link a program against all its dependency libraries.
30423link_all_deplibs=$link_all_deplibs_CXX
30424
30425# Set to "yes" if exported symbols are required.
30426always_export_symbols=$always_export_symbols_CXX
30427
30428# The commands to list exported symbols.
30429export_symbols_cmds=$lt_export_symbols_cmds_CXX
30430
30431# Symbols that should not be listed in the preloaded symbols.
30432exclude_expsyms=$lt_exclude_expsyms_CXX
30433
30434# Symbols that must always be exported.
30435include_expsyms=$lt_include_expsyms_CXX
30436
30437# Commands necessary for linking programs (against libraries) with templates.
30438prelink_cmds=$lt_prelink_cmds_CXX
30439
30440# Commands necessary for finishing linking programs.
30441postlink_cmds=$lt_postlink_cmds_CXX
30442
30443# Specify filename containing input files.
30444file_list_spec=$lt_file_list_spec_CXX
30445
30446# How to hardcode a shared library path into an executable.
30447hardcode_action=$hardcode_action_CXX
30448
30449# The directories searched by this compiler when creating a shared library.
30450compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
30451
30452# Dependencies to place before and after the objects being linked to
30453# create a shared library.
30454predep_objects=$lt_predep_objects_CXX
30455postdep_objects=$lt_postdep_objects_CXX
30456predeps=$lt_predeps_CXX
30457postdeps=$lt_postdeps_CXX
30458
30459# The library search path used internally by the compiler when linking
30460# a shared library.
30461compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
30462
30463# ### END LIBTOOL TAG CONFIG: CXX
30464_LT_EOF
30465
30466 ;;
30467
30468 esac
30469done # for ac_tag
30470
30471
30472as_fn_exit 0
30473_ACEOF
30474ac_clean_files=$ac_clean_files_save
30475
30476test $ac_write_fail = 0 ||
30477 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
30478
30479
30480# configure is writing to config.log, and then calls config.status.
30481# config.status does its own redirection, appending to config.log.
30482# Unfortunately, on DOS this fails, as config.log is still kept open
30483# by configure, so config.status won't be able to write to it; its
30484# output is simply discarded. So we exec the FD to /dev/null,
30485# effectively closing config.log, so it can be properly (re)opened and
30486# appended to by config.status. When coming back to configure, we
30487# need to make the FD available again.
30488if test "$no_create" != yes; then
30489 ac_cs_success=:
30490 ac_config_status_args=
30491 test "$silent" = yes &&
30492 ac_config_status_args="$ac_config_status_args --quiet"
30493 exec 5>/dev/null
30494 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30495 exec 5>>config.log
30496 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30497 # would make configure fail if this is the last instruction.
30498 $ac_cs_success || as_fn_exit 1
30499fi
30500if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30501 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30502$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30503fi
30504
30505
30506{ $as_echo "$as_me:${as_lineno-$LINENO}: summary of build options:
30507
30508 Version: ${PACKAGE_STRING}
30509 Host type: ${host}
30510 ABI: ${ABI}
30511 Install prefix: ${prefix}
30512 Compiler: ${CC}
30513 Static libraries: ${enable_static}
30514 Shared libraries: ${enable_shared}
30515" >&5
30516$as_echo "$as_me: summary of build options:
30517
30518 Version: ${PACKAGE_STRING}
30519 Host type: ${host}
30520 ABI: ${ABI}
30521 Install prefix: ${prefix}
30522 Compiler: ${CC}
30523 Static libraries: ${enable_static}
30524 Shared libraries: ${enable_shared}
30525" >&6;}