Browse Source

Rework of autoconfiscation infrastructure

* autoconf/config.{guess,sub}: Update to GNU version 2003-10-07.
	* autoconf/ltmain.sh: Update to GNU version 1.4.3.
	* autoconf/autoconf: Remove (from now on we assume autoconf is
	  installed properly on the sytem).
	* autoconf/autoconf.m4: Likewise.
	* autoconf/autoconf.m4f: Likewise.
	* autoconf/acgeneral.m4: Likewise.
	* autoconf/acspecific.m4: Likewise.
	* autoconf/aclocal.m4: Regenerate.
	* autoconf/acinclude.m4: Remove (while moving the macros...)
	* m4/gmp.m4: New file (...to here).
	* Makefile.devel: Update to new scheme.
	* configure.ac: Likewise.
	* include/cln/GV_integer.h: Assume template specializations work.
	* include/cln/GV_modinteger.h: Likewise.
	* include/cln/config.h.in: Likewise, and drop HAVE_BOOL.
	* src/base/cl_base_config.h.in: Drop support for obsolete ftime(3).
	* src/base/random/cl_random_from.cc: Likewise.
	* src/timing/cl_base_config.h.in: Likewise.
	* src/timing/cl_t_current.cc: Likewise.
master
Richard Kreckel 21 years ago
parent
commit
697c3c7f80
  1. 24
      ChangeLog
  2. 3
      FILES
  3. 28
      Makefile.devel
  4. 18
      NEWS
  5. 2651
      autoconf/acgeneral.m4
  6. 2632
      autoconf/aclocal.m4
  7. 2867
      autoconf/acspecific.m4
  8. 790
      autoconf/autoconf
  9. 27
      autoconf/autoconf.m4
  10. 8823
      autoconf/autoconf.m4f
  11. 352
      autoconf/config.guess
  12. 256
      autoconf/config.sub
  13. 244
      autoconf/ltmain.sh
  14. 19
      configure.ac
  15. 2
      include/cln/GV_integer.h
  16. 2
      include/cln/GV_modinteger.h
  17. 10
      include/cln/config.h.in
  18. 2
      include/cln/modules.h
  19. 18
      m4/gmp.m4
  20. 6
      src/base/cl_base_config.h.in
  21. 16
      src/base/random/cl_random_from.cc
  22. 6
      src/timing/cl_t_config.h.in
  23. 13
      src/timing/cl_t_current.cc

24
ChangeLog

@ -1,3 +1,27 @@
2003-12-29 Richard B. Kreckel <kreckel@ginac.de>
Rework of autoconfiscation infrastructure
* autoconf/config.{guess,sub}: Update to GNU version 2003-10-07.
* autoconf/ltmain.sh: Update to GNU version 1.4.3.
* autoconf/autoconf: Remove (from now on we assume autoconf is
installed properly on the sytem).
* autoconf/autoconf.m4: Likewise.
* autoconf/autoconf.m4f: Likewise.
* autoconf/acgeneral.m4: Likewise.
* autoconf/acspecific.m4: Likewise.
* autoconf/aclocal.m4: Regenerate.
* autoconf/acinclude.m4: Remove (while moving the macros...)
* m4/gmp.m4: New file (...to here).
* Makefile.devel: Update to new scheme.
* configure.ac: Likewise.
* include/cln/GV_integer.h: Assume template specializations work.
* include/cln/GV_modinteger.h: Likewise.
* include/cln/config.h.in: Likewise, and drop HAVE_BOOL.
* src/base/cl_base_config.h.in: Drop support for obsolete ftime(3).
* src/base/random/cl_random_from.cc: Likewise.
* src/timing/cl_base_config.h.in: Likewise.
* src/timing/cl_t_current.cc: Likewise.
2003-12-27 Richard B. Kreckel <kreckel@ginac.de> 2003-12-27 Richard B. Kreckel <kreckel@ginac.de>
* src/polynomial/cl_UP_gen.h (gen_minus): Fix case where first * src/polynomial/cl_UP_gen.h (gen_minus): Fix case where first

3
FILES

@ -50,6 +50,7 @@ Files in this package:
Installation: Installation:
configure configuration script configure configuration script
configure.in autoconf-2.13 source for the configuration script
configure.in autoconf source for the configuration script
autoconf/* auxiliary configuration scripts autoconf/* auxiliary configuration scripts
m4/* autoconf's driver macros
Makefile.in Makefile master Makefile.in Makefile master

28
Makefile.devel

@ -13,33 +13,31 @@ PACKOPT = cvfhj
PACKEXT = .tar.bz2 PACKEXT = .tar.bz2
all : configures documentation
all: configures documentation
CONFIGURES = configure CONFIGURES = configure
CONFIGURES_IN = configure.ac CONFIGURES_IN = configure.ac
AUTOCONF_FILES = autoconf/aclocal.m4 autoconf/autoconf.m4f autoconf/acgeneral.m4 autoconf/acspecific.m4
AUTOCONF_FILES = autoconf/aclocal.m4
configures : $(CONFIGURES)
configures: ${CONFIGURES}
configure : configure.ac $(AUTOCONF_FILES)
./autoconf/autoconf -A autoconf -l autoconf
configure: configure.ac ${AUTOCONF_FILES}
autoconf --include=autoconf
CLISP_ACLOCAL = /home/kreckel/contrib/clisp/src/autoconf/aclocal.m4
ACSELECT = /home/kreckel/contrib/clisp/src/autoconf/acselect
LIBTOOLMACROS = /home/kreckel/contrib/libtool/libtool.m4
CLISP_M4DIR = ~/contrib/clisp/src/m4
autoconf/aclocal.m4 : $(CLISP_ACLOCAL) autoconf/acinclude.m4
($(ACSELECT) `cat $(CONFIGURES_IN) | grep '^[A-Z][A-Z]_' | sed 's,[^A-Z_].*$$,,g' | sort | uniq` < $(CLISP_ACLOCAL) ; cat $(LIBTOOLMACROS) | sed -e 's,AC_CANONICAL_HOST,CL_CANONICAL_HOST,g' -e 's,AC_PROG_RANLIB,CL_PROG_RANLIB,g'; cat autoconf/acinclude.m4) > autoconf/aclocal.m4
autoconf/aclocal.m4: ${wildcard m4/*.m4}
aclocal -I m4 -I ${CLISP_M4DIR} --output=autoconf/aclocal.m4
# Syntaxcheck # Syntaxcheck
check-configures : $(CONFIGURES)
set -e; for f in $(CONFIGURES); do bash -x -n $$f; done
check-configures: ${CONFIGURES}
set -e; for f in ${CONFIGURES}; do bash -x -n $$f; done
documentation : force
cd doc && $(MAKE) -f Makefile.devel documentation
documentation: force
cd doc && ${MAKE} -f Makefile.devel documentation
force :
force:

18
NEWS

@ -1,3 +1,21 @@
2003-12-xy, version 1.1.6
Implementation changes
----------------------
* Fix a bug in polynomial subtraction.
(Reported by Munagala Ramanath.)
Other changes
-------------
* Provide a package control file cln.pc.
* Updated infrastructure to autoconf-2.57.
* Fix compilation issues with GCC-3.4 and on Mac OSX.
2002-05-28, version 1.1.5 2002-05-28, version 1.1.5
========================= =========================

2651
autoconf/acgeneral.m4
File diff suppressed because it is too large
View File

2632
autoconf/aclocal.m4
File diff suppressed because it is too large
View File

2867
autoconf/acspecific.m4
File diff suppressed because it is too large
View File

790
autoconf/autoconf

@ -1,790 +0,0 @@
#! /bin/sh
# -*- shell-script -*-
# autoconf -- create `configure' using m4 macros
# Copyright 1992, 1993, 1994, 1996, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
me=`echo "$0" | sed -e 's,.*[\\/],,'`
usage="\
Usage: $0 [OPTION] ... [TEMPLATE-FILE]
Generate a configuration script from a TEMPLATE-FILE if given, or
\`configure.ac' if present, or else \`configure.in'. Output is sent
to the standard output if TEMPLATE-FILE is given, else into
\`configure'.
Operation modes:
-h, --help print this help, then exit
-V, --version print version number, then exit
-v, --verbose verbosely report processing
-d, --debug don't remove temporary files
-o, --output=FILE save output in FILE (stdout is the default)
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
Warning categories include:
\`cross' cross compilation issues
\`obsolete' obsolete constructs
\`syntax' dubious syntactic constructs
\`all' all the warnings
\`no-CATEGORY' turn off the warnings on CATEGORY
\`none' turn off all the warnings
\`error' warnings are error
The environment variable \`WARNINGS' is honored.
Library directories:
-A, --autoconf-dir=ACDIR Autoconf's macro files location (rarely needed)
-l, --localdir=DIR location of the \`aclocal.m4' file
Tracing:
-t, --trace=MACRO report the list of calls to MACRO
-i, --initialization also trace Autoconf's initialization process
In tracing mode, no configuration script is created.
Report bugs to <bug-autoconf@gnu.org>."
version="\
autoconf (GNU Autoconf) 2.52
Written by David J. MacKenzie.
Copyright 1992, 1993, 1994, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="\
Try \`$me --help' for more information."
exit_missing_arg="\
echo \"$me: option \\\`\$1' requires an argument\" >&2
echo \"\$help\" >&2
exit 1"
# NLS nuisances.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
# ac_LF_and_DOT
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
# line-breaks from the sub-command output. A line-break within
# single-quotes doesn't work because, if this script is created in a
# platform that uses two characters for line-breaks (e.g., DOS), tr
# would break.
ac_LF_and_DOT=`echo; echo .`
# Find GNU m4.
# Handle the case that m4 has moved since we were configured.
# It may have been found originally in a build directory.
: ${M4=/usr/bin/m4}
case "$M4" in
[\\/]* | ?:[\\/]*) test -f "$M4" || M4=m4 ;;
esac
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
case `$M4 --help </dev/null 2>&1` in
*reload-state*);;
*) echo "$me: Autoconf requires GNU m4 1.4 or later" >&2; exit 1 ;;
esac
# Set some high recursion limit as the default limit, 250, has already
# been hit with AC_OUTPUT.
case " $M4 " in
*" --nesting-limit"* | *" -L"* )
# Don't override the user's choice
;;
*) M4="$M4 --nesting-limit=1024"
;;
esac
# Find a good AWK.
: ${AWK=gawk}
if echo xfoo | $AWK '/foo|^bar$/ { print }' | grep xfoo >/dev/null; then :; else
echo "$me: the regex engine of $AWK is too broken to be used" >&2
echo "$me: you might want to install GNU AWK" >&2
exit 1
fi
# Variables.
: ${autoconf_dir=${AC_MACRODIR=/usr/share/autoconf}}
test -z "$AC_ACLOCALDIR" &&
AC_ACLOCALDIR=`(aclocal --print-ac-dir) 2>/dev/null`
debug=false
# Trace Autoconf's initialization?
initialization=false
localdir=.
outfile=
# Exit status.
status=0
# Tasks:
# - trace
# Trace the first arguments of some macros
# - script
# Produce the configure script (default)
task=script
tmp=
verbose=:
# Parse command line.
while test $# -gt 0 ; do
optarg=`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
"x$1" : 'x-.\(.*\)'`
case $1 in
--version | -V )
echo "$version" ; exit 0 ;;
--help | -h )
echo "$usage"; exit 0 ;;
--debug | -d )
debug=:; shift ;;
--verbose | -v )
verbose=echo
shift;;
--localdir=* | -l?* )
localdir=$optarg
shift ;;
--localdir | -l )
test $# = 1 && eval "$exit_missing_arg"
shift
localdir=$1
shift ;;
--autoconf-dir=* | -A?* )
autoconf_dir=$optarg
shift ;;
--autoconf-dir | -A )
test $# = 1 && eval "$exit_missing_arg"
shift
autoconf_dir=$1
shift ;;
--macrodir=* | -m?* )
echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&2
autoconf_dir=$optarg
shift ;;
--macrodir | -m )
echo "$me: warning: --macrodir is obsolete, use --autoconf-dir" >&2
test $# = 1 && eval "$exit_missing_arg"
shift
autoconf_dir=$1
shift ;;
--trace=* | -t?* )
task=trace
traces="$traces '"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'"
shift ;;
--trace | -t )
test $# = 1 && eval "$exit_missing_arg"
task=trace
shift
traces="$traces '"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'"
shift ;;
--initialization | -i )
initialization=:
shift;;
--output=* | -o?* )
outfile=$optarg
shift ;;
--output | -o )
test $# = 1 && eval "$exit_missing_arg"
shift
outfile=$1
shift ;;
--warnings=* | -W?* )
warnings=$warnings,$optarg
shift ;;
--warnings | -W )
test $# = 1 && eval "$exit_missing_arg"
shift
warnings=$warnings,$1
shift ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
exec >&2
echo "$me: invalid option $1"
echo "$help"
exit 1 ;;
* )
break ;;
esac
done
# The warnings are the concatenation of 1. application's defaults,
# 2. $WARNINGS, $3 command line options, in that order.
# Set them in the order expected by the M4 macros: the converse.
alphabet='abcdefghijklmnopqrstuvwxyz'
ALPHABET='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
NUMBERS='0123456789'
WORDCHAR=_$alphabet$ALPHABET$NUMBERS
m4_warnings=
for warning in `IFS=,; echo syntax $WARNINGS $warnings |
tr $ALPHABET $alphabet`
do
test -n $warning || continue
m4_warnings="$warning"`test -n "$m4_warnings" && echo ",$m4_warnings"`
done
# Trap on 0 to stop playing with `rm'.
$debug ||
{
trap 'status=$?; rm -rf $tmp && exit $status' 0
trap '(exit 1); exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/acXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
tmp=$TMPDIR/ac$$
(umask 077 && mkdir $tmp)
} ||
{
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
(exit 1); exit 1;
}
# Running m4.
test -f "$autoconf_dir/acsite.m4" && acsite_m4="$autoconf_dir/acsite.m4"
test -f "$localdir/aclocal.m4" && aclocal_m4="$localdir/aclocal.m4"
m4_common="-I $autoconf_dir -I $localdir -Dm4_tmpdir=$tmp"
m4_prefiles=" $autoconf_dir/autoconf.m4 $acsite_m4 $aclocal_m4"
m4f_prefiles="--reload-state=$autoconf_dir/autoconf.m4f $acsite_m4 $aclocal_m4"
run_m4="$M4 $m4_common"
# Find the input file.
case $# in
0)
case `ls configure.ac configure.in 2>/dev/null` in
*ac*in )
echo "$me: warning: both \`configure.ac' and \`configure.in' are present." >&2
echo "$me: warning: proceeding with \`configure.ac'." >&2
infile=configure.ac;;
*ac ) infile=configure.ac;;
*in ) infile=configure.in;;
* )
echo "$me: no input file" >&2
exit 1;;
esac
test $task = script && test -z "$outfile" && outfile=configure;;
1) infile=$1 ;;
*) exec >&2
echo "$me: invalid number of arguments."
echo "$help"
(exit 1); exit 1 ;;
esac
# Unless specified, the output is stdout.
test -z "$outfile" && outfile=-
# We need an actual file.
if test z$infile = z-; then
infile=$tmp/stdin
cat >$infile
elif test ! -r "$infile"; then
echo "$me: $infile: No such file or directory" >&2
(exit 1); exit 1
fi
# Output is produced into FD 4. Prepare it.
case $outfile in
-) # Output to stdout
exec 4>&1 ;;
* )
exec 4>$outfile;;
esac
# Initializations are performed. Proceed to the main task.
case $task in
## --------------------------------- ##
## Generate the `configure' script. ##
## --------------------------------- ##
script)
# M4 expansion.
: >$tmp/forbidden.rx
: >$tmp/allowed.rx
$verbose "$me: running $run_m4 -Dm4_warnings=$m4_warnings $m4f_prefiles $infile" >&2
$run_m4 -Dm4_warnings=$m4_warnings $m4f_prefiles $infile >$tmp/configure ||
{ (exit 1); exit 1; }
if test "x$outfile" != x-; then
chmod +x $outfile
fi
# Put the real line numbers into configure to make config.log more
# helpful. Because quoting can sometimes get really painful in m4,
# there are special @tokens@ to substitute.
sed 's/^ //' >"$tmp/finalize.awk" <<EOF
# Load the list of tokens which escape the forbidden patterns.
BEGIN {
# Be sure the read GAWK documentation to understand the parens
# around \`tmp "/forbidden.rx"'.
while ((getline pattern < (tmp "/forbidden.rx")) > 0)
forbidden = (forbidden ? forbidden "|" : "") pattern
close (tmp "/forbidden.rx")
if (verbose)
errprint("$me: forbidden: " forbidden)
while ((getline pattern < (tmp "/allowed.rx")) > 0)
allowed = (allowed ? allowed "|" : "") pattern
if (!allowed)
allowed = "^$"
close (tmp "/allowed.rx")
if (verbose)
errprint("$me: allowed: " allowed)
}
function errprint (message)
{
# BAD! the pipe to 'cat >&2' doesn't work for DJGPP.
# print message | "cat >&2"
# Use normal redirection instead:
print message > "$tmp/finalize.err"
}
function undefined (file, line, macro)
{
errprint(file ":" line ": error: possibly undefined macro: " macro)
}
# Body.
{
sub (/[ \t]*$/, "")
if (\$0 == "")
{
if (!duplicate)
{
oline++
print
}
duplicate = 1
next
}
duplicate = 0
oline++
if (\$0 ~ /__oline__/)
while (sub (/__oline__/, oline))
continue
while (sub (/@<:@/, "["))
continue
while (sub (/@:>@/, "]"))
continue
while (sub (/@S\|@/, "$"))
continue
while (sub (/@%:@/, "#"))
continue
print
# Dubious feature: we tolerate macro names when commented.
sub (/#.*/, "")
# Get the tokens.
split (\$0, tokens, /[^$WORDCHAR]*/)
for (token in tokens)
if (match (tokens[token], forbidden) &&
!match (tokens[token], allowed))
{
macros [tokens [token]] = oline
some_macros_were_not_expanded = 1
}
}
# If there are some macros which are left unexpanded in the output,
# try to find the input which is responsible. Otherwise, try to help.
END {
if (some_macros_were_not_expanded)
{
line = 0
while (getline < "$infile")
{
line++
for (macro in macros)
if (index (\$0, macro))
{
delete macros [macro]
undefined("$infile", line, macro)
}
}
close ("$infile")
for (macro in macros)
undefined("$outfile", macros [macro], macro)
exit 1
}
}
EOF
$AWK -v tmp="$tmp" \
`$verbose "-v verbose=1"` \
-f "$tmp/finalize.awk" <$tmp/configure >&4 ||
{ test -f "$tmp/finalize.err" && cat "$tmp/finalize.err" >&2
(exit 1); exit 1; }
test -f "$tmp/finalize.err" && cat "$tmp/finalize.err" >&2
;; # End of the task script.
## -------------- ##
## Trace macros. ##
## -------------- ##
trace)
# trace.m4
# --------
# Routines to process formatted m4 traces.
sed 's/^ //' >$tmp/trace.m4 <<\EOF
divert(-1)
changequote([, ])
# _at_MODE(SEPARATOR, ELT1, ELT2...)
# ----------------------------------
# List the elements, separating then with SEPARATOR.
# MODE can be:
# `at' -- the elements are enclosed in brackets.
# `star' -- the elements are listed as are.
# `percent' -- the elements are `flattened': spaces are singled out,
# and no new line remains.
define([_at_at],
[at_ifelse([$#], [1], [],
[$#], [2], [[[$2]]],
[[[$2]][$1]$0([$1], at_shift(at_shift($@)))])])
define([_at_percent],
[at_ifelse([$#], [1], [],
[$#], [2], [at_flatten([$2])],
[at_flatten([$2])[$1]$0([$1], at_shift(at_shift($@)))])])
define([_at_star],
[at_ifelse([$#], [1], [],
[$#], [2], [[$2]],
[[$2][$1]$0([$1], at_shift(at_shift($@)))])])
# FLATTEN quotes its result.
define([at_flatten],
[at_patsubst(at_patsubst(at_patsubst([[[$1]]],
[\\
]),
[[
]+],
[ ]),
[^ *\(.*\) *$], [[\1]])])
define([at_args], [at_shift(at_shift(at_shift(at_shift(at_shift($@)))))])
define([at_at], [_$0([$1], at_args($@))])
define([at_percent], [_$0([$1], at_args($@))])
define([at_star], [_$0([$1], at_args($@))])
EOF
# If you trace `define', then on `define([m4_exit], defn([m4exit])' you
# will produce
#
# AT_define([m4sugar.m4], [115], [1], [define], [m4_exit], <m4exit>)
#
# Since `<m4exit>' is not quoted, the outter m4, when processing
# `trace.m4' will exit prematurely. Hence, move all the builtins to
# the `at_' name space.
echo '# Copy the builtins.' >>$tmp/trace.m4
echo "dumpdef" |
$M4 2>&1 >/dev/null |
sed 's/^\([^:]*\):.*/define([at_\1], defn([\1]))/' >>$tmp/trace.m4
echo >>$tmp/trace.m4
echo '# Disable the builtins.' >>$tmp/trace.m4
echo "dumpdef" |
$M4 2>&1 >/dev/null |
sed 's/^\([^:]*\):.*/at_undefine([\1])/' >>$tmp/trace.m4
echo >>$tmp/trace.m4
# trace2m4.sed
# ------------
# Transform the traces from m4 into an m4 input file.
# Typically, transform:
#
# | m4trace:configure.ac:3: -1- AC_SUBST([exec_prefix], [NONE])
#
# into
#
# | AT_AC_SUBST([configure.ac], [3], [1], [AC_SUBST], [exec_prefix], [NONE])
#
# Pay attention that the file name might include colons, if under DOS
# for instance, so we don't use `[^:][^:]*'.
# The first s/// catches multiline traces, the second, traces as above.
preamble='m4trace:\(..*\):\([0-9][0-9]*\): -\([0-9][0-9]*\)-'
cat >$tmp/trace2m4.sed <<EOF
s/^$preamble \([^(][^(]*\)(\(.*\)$/AT_\4([\1], [\2], [\3], [\4], \5/
s/^$preamble \(.*\)$/AT_\4([\1], [\2], [\3], [\4])/
EOF
# translate.awk
# -------------
# Translate user tracing requests into m4 macros.
cat >$tmp/translate.awk <<\EOF
function trans (arg, sep)
{
# File name.
if (arg == "f")
return "$1"
# Line number.
if (arg == "l")
return "$2"
# Depth.
if (arg == "d")
return "$3"
# Name (also available as $0).
if (arg == "n")
return "$4"
# Escaped dollar.
if (arg == "$")
return "$"
# $@, list of quoted effective arguments.
if (arg == "@")
return "]at_at([" (separator ? separator : ",") "], $@)["
# $*, list of unquoted effective arguments.
if (arg == "*")
return "]at_star([" (separator ? separator : ",") "], $@)["
# $%, list of flattened unquoted effective arguments.
if (arg == "%")
return "]at_percent([" (separator ? separator : ":") "], $@)["
}
function error (message)
{
print message | "cat >&2"
exit 1
}
{
# Accumulate the whole input.
request = request $0 "\n"
}
END {
# Chomp.
request = substr (request, 1, length (request) - 1)
# The default request is `$f:$l:$n:$*'.
colon = index (request, ":")
macro = colon ? substr (request, 1, colon - 1) : request
request = colon ? substr (request, colon + 1) : "$f:$l:$n:$%"
res = ""
for (cp = request; cp; cp = substr (cp, 2))
{
char = substr (cp, 1, 1)
if (char == "$")
{
if (match (cp, /^\$[0-9]+/))
{
# $n -> $(n + 4)
res = res "$" (substr (cp, 2, RLENGTH - 1) + 4)
cp = substr (cp, RLENGTH)
}
else if (substr (cp, 2, 1) ~ /[fldn$@%*]/)
{
# $x, no separator given.
res = res trans(substr (cp, 2, 1))
cp = substr (cp, 2)
}
else if (substr (cp, 2, 1) == "{")
{
# ${sep}x, long separator.
end = index (cp, "}")
if (!end)
error("invalid escape: " cp)
separator = substr (cp, 3, end - 3)
if (substr (cp, end + 1, 1) ~ /[*@%]/)
res = res trans(substr (cp, end + 1, 1), separator)
else
error("invalid escape: " cp)
cp = substr (cp, end + 1)
}
else if (substr (cp, 3, 1) ~ /[*@%]/)
{
# $sx, short separator `s'.
res = res trans(substr (cp, 3, 1), substr (cp, 2, 1))
cp = substr(cp, 3)
}
else
{
error("invalid escape: " substr (cp, 1, 2))
}
}
else
res = res char
}
# Produce the definition of AT_<MACRO> = the translation of the request.
print "at_define([AT_" macro "],"
print "[[" res "]])"
print ""
close("cat >&2")
}
EOF
# Extract both the m4 program and the m4 options from TRACES.
echo "## ------------------------- ##" >>$tmp/trace.m4
echo "## Trace processing macros. ##" >>$tmp/trace.m4
echo "## ------------------------- ##" >>$tmp/trace.m4
echo >>$tmp/trace.m4
eval set dummy "$traces"
shift
for trace
do
echo "# $trace" >>$tmp/trace.m4
# The request may be several lines long, hence sed has to quit.
macro_name=`echo "$trace" | sed 's/:.*//;q'`
# If for instance TRACE is `define', be sure to have an empty
# TRACE_FORMAT.
case $trace in
$macro_name:* )
trace_format=`echo "$trace" | sed "1s/^$macro_name:/:/"`;;
* )
trace_format=;;
esac
# GNU M4 1.4's tracing of builtins is buggy. When run on this input:
#
# | divert(-1)
# | changequote([, ])
# | define([m4_eval], defn([eval]))
# | eval(1)
# | m4_eval(2)
# | undefine([eval])
# | m4_eval(3)
#
# it behaves this way:
#
# | % m4 input.m4 -da -t eval
# | m4trace: -1- eval(1)
# | m4trace: -1- m4_eval(2)
# | m4trace: -1- m4_eval(3)
# | %
#
# Conversely:
#
# | % m4 input.m4 -da -t m4_eval
# | %
#
# So we will merge them, i.e. tracing `BUILTIN' or tracing
# `m4_BUILTIN' will be the same: tracing both, but honoring the
# *last* trace specification.
# FIXME: This is not enough: in the output `$0' will be `BUILTIN'
# sometimes and `m4_BUILTIN' at others. We should render a unique name,
# the one specified by the user.
base_name=`echo "$macro_name" | sed 's/^m4_//'`
if echo "ifdef(\`$base_name', \`', \`m4exit(-1)')" | $M4; then
# BASE_NAME is a builtin.
trace_opt="$trace_opt -t $base_name -t m4_$base_name"
echo "$base_name$trace_format" |
$AWK -f $tmp/translate.awk >>$tmp/trace.m4 ||
{ (exit 1); exit 1; }
echo "m4_$base_name$trace_format" |
$AWK -f $tmp/translate.awk >>$tmp/trace.m4 ||
{ (exit 1); exit 1; }
else
# MACRO_NAME is not a builtin.
trace_opt="$trace_opt -t $macro_name"
echo "$trace" |
$AWK -f $tmp/translate.awk >>$tmp/trace.m4 ||
{ (exit 1); exit 1; }
fi
echo >>$tmp/trace.m4
done
echo "## ------------------- ##" >>$tmp/trace.m4
echo "## Traces to process. ##" >>$tmp/trace.m4
echo "## ------------------- ##" >>$tmp/trace.m4
echo >>$tmp/trace.m4
echo "at_divert(0)at_dnl" >>$tmp/trace.m4
# Do we trace the initialization?
# `errprint' must be silent, otherwise there can be warnings mixed
# with traces in m4's stderr.
run_m4_trace="$run_m4 $trace_opt -daflq -Derrprint"
if $initialization; then
trace_prefiles="$m4_prefiles"
else
trace_prefiles="$m4f_prefiles"
fi
# Run m4 on the input file to get traces.
#
# We used to have a simple pipe, which was very convenient as it
# allows to use traces on never ending expansions (i.e., when
# debugging :) but it is requires to keep error messages *and*
# traces in stderr. This is too fragile, as it results in
# unexpected data in the output. autoheader has been fragile to
# this.
$verbose "$me: running $run_m4_trace $trace_prefiles $infile -o $tmp/traces" >&2
$run_m4_trace $trace_prefiles $infile -o $tmp/traces >/dev/null ||
{
echo "$me: tracing failed" >&2
(exit 1); exit 1
}
$verbose "$me: running $M4 $tmp/trace.m4" >&2
sed -f $tmp/trace2m4.sed $tmp/traces |
# Now we are ready to run m4 to process the trace file.
if $debug; then
cat >>$tmp/trace.m4
$M4 $tmp/trace.m4
else
$M4 $tmp/trace.m4 -
fi |
# It makes no sense to try to transform __oline__.
sed '
s/@<:@/[/g
s/@:>@/]/g
s/@S|@/$/g
s/@%:@/#/g
' >&4 ||
{
echo "$me: traces formatting failed" >&2
(exit 1); exit 1
}
;;
## ------------ ##
## Unknown task ##
## ------------ ##
*) echo "$me: internal error: unknown task: $task" >&2
(exit 1); exit 1
esac
(exit $status); exit $status

27
autoconf/autoconf.m4

@ -1,27 +0,0 @@
dnl Driver that loads the Autoconf macro files.
dnl Requires GNU m4.
dnl This file is part of Autoconf.
dnl Copyright (C) 1994 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl Written by David MacKenzie.
dnl
include(acgeneral.m4)dnl
builtin(include, acspecific.m4)dnl
dnl Do not sinclude acsite.m4 here, because it may not be installed
dnl yet when Autoconf is frozen.
dnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.

8823
autoconf/autoconf.m4f
File diff suppressed because it is too large
View File

352
autoconf/config.guess

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2002-01-02'
timestamp='2003-10-07'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -24,7 +24,7 @@ timestamp='2002-01-02'
# configuration script generated by Autoconf, you may include it under # configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program. # the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner <bothner@cygnus.com>.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context # Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry. # diff and a properly formatted ChangeLog entry.
# #
@ -88,30 +88,42 @@ if test $# != 0; then
exit 1 exit 1
fi fi
trap 'exit 1' 1 2 15
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# CC_FOR_BUILD -- compiler used by this script.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated. # use `HOST_CC' if defined, but it is deprecated.
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int dummy(){}" > $dummy.c ;
for c in cc gcc c89 ; do
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
if test $? = 0 ; then
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ; CC_FOR_BUILD="$c"; break ;
fi ; fi ;
done ; done ;
rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ; CC_FOR_BUILD=no_compiler_found ;
fi fi
;; ;;
,,*) CC_FOR_BUILD=$CC ;; ,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac'
esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24) # (ghazi@noc.rutgers.edu 1994-08-24)
@ -138,9 +150,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# #
# Note: NetBSD doesn't particularly care about the vendor # Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown". # portion of the name. We always set it to "unknown".
UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
UNAME_MACHINE_ARCH=unknown
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;; arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;; sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;; sh3eb) machine=sh-unknown ;;
@ -166,7 +180,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;; ;;
esac esac
# The OS release # The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form: # contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@ -215,65 +240,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
if test $UNAME_RELEASE = "V4.0"; then if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi fi
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Vn.n version is a released version. # A Vn.n version is a released version.
# A Tn.n version is a released field test version. # A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel. # A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r. # 1.2 uses "1.2" for uname -r.
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
eval $set_cc_for_build
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
1-0)
UNAME_MACHINE="alphaev5"
;;
1-1)
UNAME_MACHINE="alphaev56"
;;
1-101)
UNAME_MACHINE="alphapca56"
;;
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
2-1307)
UNAME_MACHINE="alphaev68"
;;
esac
fi
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;; exit 0 ;;
Alpha*:OpenVMS:*:*)
echo alpha-hp-vms
exit 0 ;;
Alpha\ *:Windows_NT*:*) Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem? # How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead # Should we change UNAME_MACHINE based on the output of uname instead
@ -312,6 +324,13 @@ EOF
NILE*:*:*:dcosx) NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4 echo pyramid-pyramid-svr4
exit 0 ;; exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
esac ;;
sun4H:SunOS:5.*:*) sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;; exit 0 ;;
@ -340,7 +359,7 @@ EOF
echo m68k-sun-sunos${UNAME_RELEASE} echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
sun*:*:4.2BSD:*) sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in case "`/bin/arch`" in
sun3) sun3)
@ -418,15 +437,20 @@ EOF
exit (-1); exit (-1);
} }
EOF EOF
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c \
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& exit 0
echo mips-mips-riscos${UNAME_RELEASE} echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
Motorola:PowerMAX_OS:*:*) Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax echo powerpc-motorola-powermax
exit 0 ;; exit 0 ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:Power_UNIX:*:*) Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix echo powerpc-harris-powerunix
exit 0 ;; exit 0 ;;
@ -499,8 +523,7 @@ EOF
exit(0); exit(0);
} }
EOF EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5 echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4 echo rs6000-ibm-aix3.2.4
@ -509,7 +532,7 @@ EOF
fi fi
exit 0 ;; exit 0 ;;
*:AIX:*:[45]) *:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000 IBM_ARCH=rs6000
else else
@ -598,11 +621,21 @@ EOF
exit (0); exit (0);
} }
EOF EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;; fi ;;
esac esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
# avoid double evaluation of $set_cc_for_build
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV} echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;; exit 0 ;;
ia64:HP-UX:*:*) ia64:HP-UX:*:*)
@ -636,8 +669,7 @@ EOF
exit (0); exit (0);
} }
EOF EOF
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2 echo unknown-hitachi-hiuxwe2
exit 0 ;; exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@ -683,9 +715,6 @@ EOF
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd echo c4-convex-bsd
exit 0 ;; exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*) CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
@ -698,18 +727,15 @@ EOF
CRAY*TS:*:*:*) CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
CRAY*T3D:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3E:*:*:*) CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
CRAY*SV1:*:*:*) CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
*:UNICOS/mp:*:*)
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
@ -726,7 +752,21 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:FreeBSD:*:*) *:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
# Determine whether the default compiler uses glibc.
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#if __GLIBC__ >= 2
LIBC=gnu
#else
LIBC=
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
# FreeBSD's kernel, but not the complete OS.
case ${LIBC} in gnu) kernel_only='k' ;; esac
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;; exit 0 ;;
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
@ -737,14 +777,17 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;; exit 0 ;;
x86:Interix*:3*)
echo i386-pc-interix3
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit 0 ;; exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*) i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem? # How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386? # UNAME_MACHINE based on the output of uname instead of i386?
echo i386-pc-interix
echo i586-pc-interix
exit 0 ;; exit 0 ;;
i*:UWIN*:*) i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin echo ${UNAME_MACHINE}-pc-uwin
@ -756,16 +799,24 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;; exit 0 ;;
*:GNU:*:*) *:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;; exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit 0 ;;
i*86:Minix:*:*) i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit 0 ;; exit 0 ;;
arm*:Linux:*:*) arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;; exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
ia64:Linux:*:*) ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;; exit 0 ;;
m68*:Linux:*:*) m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -787,8 +838,26 @@ EOF
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
rm -f $dummy.c
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;; ;;
ppc:Linux:*:*) ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu echo powerpc-unknown-linux-gnu
@ -824,6 +893,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*) s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;; exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*) sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;; exit 0 ;;
@ -837,7 +909,8 @@ EOF
# The BFD linker knows what the default object file format is, so # The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent # first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path. # problems with other programs or directories called `ld' in the path.
ld_supported_targets=`cd /; ld --help 2>&1 \
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d | sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g s/[ ][ ]*/ /g
s/.*supported targets: *// s/.*supported targets: *//
@ -874,11 +947,17 @@ EOF
LIBC=gnulibc1 LIBC=gnulibc1
# endif # endif
#else #else
#ifdef __INTEL_COMPILER
LIBC=gnu
#else
LIBC=gnuaout LIBC=gnuaout
#endif #endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;; ;;
@ -896,6 +975,23 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it. # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;; exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@ -917,22 +1013,19 @@ EOF
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586 && UNAME_MACHINE=i586
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686 && UNAME_MACHINE=i686
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686 && UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else else
echo ${UNAME_MACHINE}-pc-sysv32 echo ${UNAME_MACHINE}-pc-sysv32
fi fi
exit 0 ;; exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*) pc:*:*:*)
# Left here for compatibility: # Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about # uname -m prints for DJGPP always 'pc', but it prints nothing about
@ -956,9 +1049,15 @@ EOF
# "miniframe" # "miniframe"
echo m68010-convergent-sysv echo m68010-convergent-sysv
exit 0 ;; exit 0 ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit 0 ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit 0 ;;
M68*:*:R3V[567]*:*) M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL='' OS_REL=''
test -r /etc/.relid \ test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@ -975,9 +1074,6 @@ EOF
mc68030:UNIX_System_V:4.*:*) mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4 echo m68k-atari-sysv4
exit 0 ;; exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*) TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE} echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -1049,6 +1145,9 @@ EOF
SX-5:SUPER-UX:*:*) SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE} echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit 0 ;;
Power*:Rhapsody:*:*) Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE} echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -1056,18 +1155,24 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:Darwin:*:*) *:Darwin:*:*)
echo `uname -p`-apple-darwin${UNAME_RELEASE}
case `uname -p` in
*86) UNAME_PROCESSOR=i686 ;;
powerpc) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*) *:procnto*:*:* | *:QNX:[0123456789]*:*)
if test "${UNAME_MACHINE}" = "x86pc"; then
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc UNAME_MACHINE=pc
fi fi
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:QNX:*:4*) *:QNX:*:4*)
echo i386-pc-qnx echo i386-pc-qnx
exit 0 ;; exit 0 ;;
NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE} echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:NonStop-UX:*:*) *:NonStop-UX:*:*)
@ -1090,11 +1195,6 @@ EOF
fi fi
echo ${UNAME_MACHINE}-unknown-plan9 echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;; exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
*:TOPS-10:*:*) *:TOPS-10:*:*)
echo pdp10-unknown-tops10 echo pdp10-unknown-tops10
exit 0 ;; exit 0 ;;
@ -1113,11 +1213,8 @@ EOF
*:ITS:*:*) *:ITS:*:*)
echo pdp10-unknown-its echo pdp10-unknown-its
exit 0 ;; exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
esac esac
@ -1239,8 +1336,7 @@ main ()
} }
EOF EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment. # Apollos put the system type in the environment.

256
autoconf/config.sub

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2002-01-02'
timestamp='2003-10-07'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
@ -228,28 +228,42 @@ case $basic_machine in
| a29k \ | a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dsp16xx \
| fr30 \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m68000 | m68k | m88k | mcore \ | m32r | m68000 | m68k | m88k | mcore \
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
| mipsisa32 \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \ | mn10200 | mn10300 \
| msp430 \
| ns16k | ns32k \ | ns16k | ns32k \
| openrisc \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \ | pyramid \
| sh | sh[34] | sh[34]eb | shbe | shle \
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \ | strongarm \
| tahoe | thumb | tic80 | tron \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \ | v850 | v850e \
| we32k \ | we32k \
| x86 | xscale | xstormy16 | xtensa \ | x86 | xscale | xstormy16 | xtensa \
@ -281,37 +295,53 @@ case $basic_machine in
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armv*-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \ | avr-* \
| bs2000-* \ | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c54x-* \
| clipper-* | cray2-* | cydra-* \
| d10v-* | d30v-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fr30-* | fx80-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* \ | m32r-* \
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \ | m88110-* | m88k-* | mcore-* \
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \ | pyramid-* \
| romp-* | rs6000-* \ | romp-* | rs6000-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \ | xtensa-* \
| ymp-* \ | ymp-* \
| z8k-*) | z8k-*)
@ -346,6 +376,9 @@ case $basic_machine in
basic_machine=a29k-none basic_machine=a29k-none
os=-bsd os=-bsd
;; ;;
amd64)
basic_machine=x86_64-pc
;;
amdahl) amdahl)
basic_machine=580-amdahl basic_machine=580-amdahl
os=-sysv os=-sysv
@ -377,6 +410,10 @@ case $basic_machine in
basic_machine=ns32k-sequent basic_machine=ns32k-sequent
os=-dynix os=-dynix
;; ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
convex-c1) convex-c1)
basic_machine=c1-convex basic_machine=c1-convex
os=-bsd os=-bsd
@ -397,16 +434,8 @@ case $basic_machine in
basic_machine=c38-convex basic_machine=c38-convex
os=-bsd os=-bsd
;; ;;
cray | ymp)
basic_machine=ymp-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[cjt]90)
basic_machine=${basic_machine}-cray
cray | j90)
basic_machine=j90-cray
os=-unicos os=-unicos
;; ;;
crds | unos) crds | unos)
@ -609,14 +638,6 @@ case $basic_machine in
basic_machine=m68k-atari basic_machine=m68k-atari
os=-mint os=-mint
;; ;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*) mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;; ;;
@ -707,6 +728,10 @@ case $basic_machine in
np1) np1)
basic_machine=np1-gould basic_machine=np1-gould
;; ;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem) nsr-tandem)
basic_machine=nsr-tandem basic_machine=nsr-tandem
;; ;;
@ -714,6 +739,10 @@ case $basic_machine in
basic_machine=hppa1.1-oki basic_machine=hppa1.1-oki
os=-proelf os=-proelf
;; ;;
or32 | or32-*)
basic_machine=or32-unknown
os=-coff
;;
OSE68000 | ose68000) OSE68000 | ose68000)
basic_machine=m68000-ericsson basic_machine=m68000-ericsson
os=-ose os=-ose
@ -736,49 +765,55 @@ case $basic_machine in
pbb) pbb)
basic_machine=m68k-tti basic_machine=m68k-tti
;; ;;
pc532 | pc532-*)
pc532 | pc532-*)
basic_machine=ns32k-pc532 basic_machine=ns32k-pc532
;; ;;
pentium | p5 | k5 | k6 | nexgen | viac3) pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc basic_machine=i586-pc
;; ;;
pentiumpro | p6 | 6x86 | athlon)
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc basic_machine=i686-pc
;; ;;
pentiumii | pentium2)
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc basic_machine=i686-pc
;; ;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
pentiumpro-* | p6-* | 6x86-* | athlon-*) pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
pentiumii-* | pentium2-*)
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn) pn)
basic_machine=pn-gould basic_machine=pn-gould
;; ;;
power) basic_machine=power-ibm power) basic_machine=power-ibm
;; ;;
ppc) basic_machine=powerpc-unknown ppc) basic_machine=powerpc-unknown
;;
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
ppcle | powerpclittle | ppc-le | powerpc-little) ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown basic_machine=powerpcle-unknown
;;
;;
ppcle-* | powerpclittle-*) ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
ppc64) basic_machine=powerpc64-unknown ppc64) basic_machine=powerpc64-unknown
;;
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little) ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown basic_machine=powerpc64le-unknown
;;
;;
ppc64le-* | powerpc64little-*) ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
@ -809,6 +844,16 @@ case $basic_machine in
basic_machine=a29k-amd basic_machine=a29k-amd
os=-udi os=-udi
;; ;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent) sequent)
basic_machine=i386-sequent basic_machine=i386-sequent
;; ;;
@ -816,6 +861,9 @@ case $basic_machine in
basic_machine=sh-hitachi basic_machine=sh-hitachi
os=-hms os=-hms
;; ;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs) sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs basic_machine=sparclite-wrs
os=-vxworks os=-vxworks
@ -883,13 +931,25 @@ case $basic_machine in
os=-dynix os=-dynix
;; ;;
t3e) t3e)
basic_machine=t3e-cray
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos os=-unicos
;; ;;
tic54x | c54x*) tic54x | c54x*)
basic_machine=tic54x-unknown basic_machine=tic54x-unknown
os=-coff os=-coff
;; ;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tx39) tx39)
basic_machine=mipstx39-unknown basic_machine=mipstx39-unknown
;; ;;
@ -924,8 +984,8 @@ case $basic_machine in
os=-vms os=-vms
;; ;;
vpp*|vx|vx-*) vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
basic_machine=f301-fujitsu
;;
vxworks960) vxworks960)
basic_machine=i960-wrs basic_machine=i960-wrs
os=-vxworks os=-vxworks
@ -946,17 +1006,13 @@ case $basic_machine in
basic_machine=hppa1.1-winbond basic_machine=hppa1.1-winbond
os=-proelf os=-proelf
;; ;;
windows32)
basic_machine=i386-pc
os=-windows32-msvcrt
xps | xps100)
basic_machine=xps100-honeywell
;; ;;
xmp)
basic_machine=xmp-cray
ymp)
basic_machine=ymp-cray
os=-unicos os=-unicos
;; ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
z8k-*-coff) z8k-*-coff)
basic_machine=z8k-unknown basic_machine=z8k-unknown
os=-sim os=-sim
@ -977,13 +1033,6 @@ case $basic_machine in
op60c) op60c)
basic_machine=hppa1.1-oki basic_machine=hppa1.1-oki
;; ;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp) romp)
basic_machine=romp-ibm basic_machine=romp-ibm
;; ;;
@ -1003,13 +1052,16 @@ case $basic_machine in
we32k) we32k)
basic_machine=we32k-att basic_machine=we32k-att
;; ;;
sh3 | sh4 | sh3eb | sh4eb)
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown basic_machine=sh-unknown
;; ;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b) sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun basic_machine=sparc-sun
;; ;;
cydra)
cydra)
basic_machine=cydra-cydrome basic_machine=cydra-cydrome
;; ;;
orion) orion)
@ -1024,10 +1076,6 @@ case $basic_machine in
pmac | pmac-mpw) pmac | pmac-mpw)
basic_machine=powerpc-apple basic_machine=powerpc-apple
;; ;;
c4x*)
basic_machine=c4x-none
os=-coff
;;
*-unknown) *-unknown)
# Make sure to match an already-canonicalized machine name. # Make sure to match an already-canonicalized machine name.
;; ;;
@ -1083,17 +1131,19 @@ case $os in
| -aos* \ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -morphos*)
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@ -1105,8 +1155,10 @@ case $os in
;; ;;
esac esac
;; ;;
-nto-qnx*)
;;
-nto*) -nto*)
os=-nto-qnx
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;; ;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@ -1115,6 +1167,9 @@ case $os in
-mac*) -mac*)
os=`echo $os | sed -e 's|mac|macos|'` os=`echo $os | sed -e 's|mac|macos|'`
;; ;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*) -linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'` os=`echo $os | sed -e 's|linux|linux-gnu|'`
;; ;;
@ -1154,8 +1209,11 @@ case $os in
-ctix* | -uts*) -ctix* | -uts*)
os=-sysv os=-sysv
;; ;;
-nova*)
os=-rtmk-nova
;;
-ns2 ) -ns2 )
os=-nextstep2
os=-nextstep2
;; ;;
-nsk*) -nsk*)
os=-nsk os=-nsk
@ -1194,8 +1252,14 @@ case $os in
-xenix) -xenix)
os=-xenix os=-xenix
;; ;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;; ;;
-none) -none)
;; ;;
@ -1228,11 +1292,14 @@ case $basic_machine in
arm*-semi) arm*-semi)
os=-aout os=-aout
;; ;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry. # This must come before the *-dec entry.
pdp10-*) pdp10-*)
os=-tops20 os=-tops20
;; ;;
pdp11-*)
pdp11-*)
os=-none os=-none
;; ;;
*-dec | vax-*) *-dec | vax-*)
@ -1259,6 +1326,9 @@ case $basic_machine in
mips*-*) mips*-*)
os=-elf os=-elf
;; ;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os. *-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3 os=-sysv3
;; ;;
@ -1322,19 +1392,19 @@ case $basic_machine in
*-next) *-next)
os=-nextstep3 os=-nextstep3
;; ;;
*-gould)
*-gould)
os=-sysv os=-sysv
;; ;;
*-highlevel)
*-highlevel)
os=-bsd os=-bsd
;; ;;
*-encore) *-encore)
os=-bsd os=-bsd
;; ;;
*-sgi)
*-sgi)
os=-irix os=-irix
;; ;;
*-siemens)
*-siemens)
os=-sysv4 os=-sysv4
;; ;;
*-masscomp) *-masscomp)
@ -1406,7 +1476,7 @@ case $basic_machine in
-ptx*) -ptx*)
vendor=sequent vendor=sequent
;; ;;
-vxsim* | -vxworks*)
-vxsim* | -vxworks* | -windiss*)
vendor=wrs vendor=wrs
;; ;;
-aux*) -aux*)

244
autoconf/ltmain.sh

@ -49,14 +49,14 @@ EOF
fi fi
# The name of this program. # The name of this program.
progname=`$echo "$0" | sed 's%^.*/%%'`
progname=`$echo "$0" | ${SED} 's%^.*/%%'`
modename="$progname" modename="$progname"
# Constants. # Constants.
PROGRAM=ltmain.sh PROGRAM=ltmain.sh
PACKAGE=libtool PACKAGE=libtool
VERSION=1.4.2
TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
VERSION=1.4.3
TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)"
default_mode= default_mode=
help="Try \`$progname --help' for more information." help="Try \`$progname --help' for more information."
@ -67,10 +67,19 @@ rm="rm -f"
# Sed substitution that helps us do robust quoting. It backslashifies # Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings. # metacharacters that are still active within double-quoted strings.
Xsed='sed -e 1s/^X//'
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
SP2NL='tr \040 \012'
NL2SP='tr \015\012 \040\040'
# test EBCDIC or ASCII
case `echo A|od -x` in
*[Cc]1*) # EBCDIC based system
SP2NL="tr '\100' '\n'"
NL2SP="tr '\r\n' '\100\100'"
;;
*) # Assume ASCII based system
SP2NL="tr '\040' '\012'"
NL2SP="tr '\015\012' '\040\040'"
;;
esac
# NLS nuisances. # NLS nuisances.
# Only set LANG and LC_ALL to C if already set. # Only set LANG and LC_ALL to C if already set.
@ -144,7 +153,7 @@ do
;; ;;
--config) --config)
sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
exit 0 exit 0
;; ;;
@ -177,6 +186,8 @@ do
--mode) prevopt="--mode" prev=mode ;; --mode) prevopt="--mode" prev=mode ;;
--mode=*) mode="$optarg" ;; --mode=*) mode="$optarg" ;;
--preserve-dup-deps) duplicate_deps="yes" ;;
--quiet | --silent) --quiet | --silent)
show=: show=:
;; ;;
@ -215,7 +226,7 @@ if test -z "$show_help"; then
# Infer the operation mode. # Infer the operation mode.
if test -z "$mode"; then if test -z "$mode"; then
case $nonopt in case $nonopt in
*cc | *++ | gcc* | *-gcc*)
*cc | *++ | gcc* | *-gcc* | xlc*)
mode=link mode=link
for arg for arg
do do
@ -467,7 +478,7 @@ if test -z "$show_help"; then
pic_mode=default pic_mode=default
;; ;;
esac esac
if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
# non-PIC code in shared libraries is not supported # non-PIC code in shared libraries is not supported
pic_mode=default pic_mode=default
fi fi
@ -992,7 +1003,7 @@ compiler."
# so, if we see these flags be careful not to treat them like -L # so, if we see these flags be careful not to treat them like -L
-L[A-Z][A-Z]*:*) -L[A-Z][A-Z]*:*)
case $with_gcc/$host in case $with_gcc/$host in
no/*-*-irix*)
no/*-*-irix* | no/*-*-nonstopux*)
compile_command="$compile_command $arg" compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg" finalize_command="$finalize_command $arg"
;; ;;
@ -1043,14 +1054,14 @@ compiler."
# These systems don't actually have a C library (as such) # These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue test "X$arg" = "X-lc" && continue
;; ;;
*-*-openbsd*)
*-*-openbsd* | *-*-freebsd*)
# Do not include libc due to us having libc/libc_r. # Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue test "X$arg" = "X-lc" && continue
;; ;;
esac esac
elif test "X$arg" = "X-lc_r"; then elif test "X$arg" = "X-lc_r"; then
case $host in case $host in
*-*-openbsd*)
*-*-openbsd* | *-*-freebsd*)
# Do not include libc_r directly, use -pthread flag. # Do not include libc_r directly, use -pthread flag.
continue continue
;; ;;
@ -1330,9 +1341,11 @@ compiler."
# Find all interdependent deplibs by searching for libraries # Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la) # that are linked more than once (e.g. -la -lb -la)
for deplib in $deplibs; do for deplib in $deplibs; do
case "$libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
if test "X$duplicate_deps" = "Xyes" ; then
case "$libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
fi
libs="$libs $deplib" libs="$libs $deplib"
done done
deplibs= deplibs=
@ -1461,10 +1474,12 @@ compiler."
lib) lib)
if test "$deplibs_check_method" != pass_all; then if test "$deplibs_check_method" != pass_all; then
echo echo
echo "*** Warning: This library needs some functionality provided by $deplib."
echo "*** Warning: Trying to link with static lib archive $deplib."
echo "*** I have the capability to make that library automatically link in when" echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a" echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
echo "*** shared version of the library, which you do not appear to have"
echo "*** because the file extensions .$libext of this argument makes me believe"
echo "*** that it is just a static archive that I should not used here."
else else
echo echo
echo "*** Warning: Linking the shared library $output against the" echo "*** Warning: Linking the shared library $output against the"
@ -1508,7 +1523,7 @@ compiler."
fi fi
# Check to see that this really is a libtool archive. # Check to see that this really is a libtool archive.
if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1 exit 1
@ -1555,9 +1570,11 @@ compiler."
tmp_libs= tmp_libs=
for deplib in $dependency_libs; do for deplib in $dependency_libs; do
deplibs="$deplib $deplibs" deplibs="$deplib $deplibs"
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
if test "X$duplicate_deps" = "Xyes" ; then
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
fi
tmp_libs="$tmp_libs $deplib" tmp_libs="$tmp_libs $deplib"
done done
elif test $linkmode != prog && test $linkmode != lib; then elif test $linkmode != prog && test $linkmode != lib; then
@ -1680,9 +1697,11 @@ compiler."
# or/and link against static libraries # or/and link against static libraries
newdependency_libs="$deplib $newdependency_libs" newdependency_libs="$deplib $newdependency_libs"
fi fi
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
if test "X$duplicate_deps" = "Xyes" ; then
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
fi
tmp_libs="$tmp_libs $deplib" tmp_libs="$tmp_libs $deplib"
done # for deplib done # for deplib
continue continue
@ -1766,8 +1785,8 @@ compiler."
# Make a new name for the extract_expsyms_cmds to use # Make a new name for the extract_expsyms_cmds to use
soroot="$soname" soroot="$soname"
soname=`echo $soroot | sed -e 's/^.*\///'`
newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
soname=`echo $soroot | ${SED} -e 's/^.*\///'`
newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
# If the library has no export list, then create one now # If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then : if test -f "$output_objdir/$soname-def"; then :
@ -1926,13 +1945,14 @@ compiler."
# Just print a warning and add the library to dependency_libs so # Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library. # that the program can be linked against the static library.
echo echo
echo "*** Warning: This library needs some functionality provided by $lib."
echo "*** Warning: This system can not link to static lib archive $lib."
echo "*** I have the capability to make that library automatically link in when" echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a" echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have." echo "*** shared version of the library, which you do not appear to have."
if test "$module" = yes; then if test "$module" = yes; then
echo "*** Therefore, libtool will create a static module, that should work "
echo "*** as long as the dlopening application is linked with the -dlopen flag."
echo "*** But as you try to build a module library, libtool will still create "
echo "*** a static module, that should work as long as the dlopening application"
echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then if test -z "$global_symbol_pipe"; then
echo echo
echo "*** However, this would only work if libtool was able to extract symbol" echo "*** However, this would only work if libtool was able to extract symbol"
@ -1981,9 +2001,11 @@ compiler."
tmp_libs= tmp_libs=
for deplib in $dependency_libs; do for deplib in $dependency_libs; do
newdependency_libs="$deplib $newdependency_libs" newdependency_libs="$deplib $newdependency_libs"
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
if test "X$duplicate_deps" = "Xyes" ; then
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
fi
tmp_libs="$tmp_libs $deplib" tmp_libs="$tmp_libs $deplib"
done done
@ -2009,7 +2031,7 @@ compiler."
if grep "^installed=no" $deplib > /dev/null; then if grep "^installed=no" $deplib > /dev/null; then
path="-L$absdir/$objdir" path="-L$absdir/$objdir"
else else
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit 1 exit 1
@ -2273,16 +2295,21 @@ compiler."
versuffix=".$current"; versuffix=".$current";
;; ;;
irix)
irix | nonstopux)
major=`expr $current - $age + 1` major=`expr $current - $age + 1`
verstring="sgi$major.$revision"
case $version_type in
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
esac
verstring="$verstring_prefix$major.$revision"
# Add in all the interfaces that we are compatible with. # Add in all the interfaces that we are compatible with.
loop=$revision loop=$revision
while test $loop != 0; do while test $loop != 0; do
iface=`expr $revision - $loop` iface=`expr $revision - $loop`
loop=`expr $loop - 1` loop=`expr $loop - 1`
verstring="sgi$major.$iface:$verstring"
verstring="$verstring_prefix$major.$iface:$verstring"
done done
# Before this point, $major must not contain `.'. # Before this point, $major must not contain `.'.
@ -2296,7 +2323,7 @@ compiler."
;; ;;
osf) osf)
major=`expr $current - $age`
major=.`expr $current - $age`
versuffix=".$current.$age.$revision" versuffix=".$current.$age.$revision"
verstring="$current.$age.$revision" verstring="$current.$age.$revision"
@ -2388,9 +2415,9 @@ compiler."
# Eliminate all temporary directories. # Eliminate all temporary directories.
for path in $notinst_path; do for path in $notinst_path; do
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
done done
if test -n "$xrpath"; then if test -n "$xrpath"; then
@ -2441,7 +2468,7 @@ compiler."
*-*-netbsd*) *-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed. # Don't link with libc until the a.out ld.so is fixed.
;; ;;
*-*-openbsd*)
*-*-openbsd* | *-*-freebsd*)
# Do not include libc due to us having libc/libc_r. # Do not include libc due to us having libc/libc_r.
;; ;;
*) *)
@ -2502,18 +2529,20 @@ EOF
else else
droppeddeps=yes droppeddeps=yes
echo echo
echo "*** Warning: This library needs some functionality provided by $i."
echo "*** Warning: dynamic linker does not accept needed library $i."
echo "*** I have the capability to make that library automatically link in when" echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a" echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
echo "*** shared version of the library, which I believe you do not have"
echo "*** because a test_compile did reveal that the linker did not use it for"
echo "*** its dynamic dependency list that programs get resolved with at runtime."
fi fi
else else
newdeplibs="$newdeplibs $i" newdeplibs="$newdeplibs $i"
fi fi
done done
else else
# Error occured in the first compile. Let's try to salvage the situation:
# Compile a seperate program for each library.
# Error occured in the first compile. Let's try to salvage
# the situation: Compile a separate program for each library.
for i in $deplibs; do for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`" name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument. # If $name is empty we are operating on a -L argument.
@ -2532,10 +2561,12 @@ EOF
else else
droppeddeps=yes droppeddeps=yes
echo echo
echo "*** Warning: This library needs some functionality provided by $i."
echo "*** Warning: dynamic linker does not accept needed library $i."
echo "*** I have the capability to make that library automatically link in when" echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a" echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
echo "*** shared version of the library, which you do not appear to have"
echo "*** because a test_compile did reveal that the linker did not use this one"
echo "*** as a dynamic dependency that programs can get resolved with at runtime."
fi fi
else else
droppeddeps=yes droppeddeps=yes
@ -2574,14 +2605,14 @@ EOF
# but so what? # but so what?
potlib="$potent_lib" potlib="$potent_lib"
while test -h "$potlib" 2>/dev/null; do while test -h "$potlib" 2>/dev/null; do
potliblink=`ls -ld $potlib | sed 's/.* -> //'`
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
case $potliblink in case $potliblink in
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac esac
done done
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| sed 10q \
| ${SED} 10q \
| egrep "$file_magic_regex" > /dev/null; then | egrep "$file_magic_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib" newdeplibs="$newdeplibs $a_deplib"
a_deplib="" a_deplib=""
@ -2592,10 +2623,17 @@ EOF
if test -n "$a_deplib" ; then if test -n "$a_deplib" ; then
droppeddeps=yes droppeddeps=yes
echo echo
echo "*** Warning: This library needs some functionality provided by $a_deplib."
echo "*** Warning: linker path does not have real file for library $a_deplib."
echo "*** I have the capability to make that library automatically link in when" echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a" echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
echo "*** shared version of the library, which you do not appear to have"
echo "*** because I did check the linker path looking for a file starting"
if test -z "$potlib" ; then
echo "*** with $libname but no candidates were found. (...for file magic test)"
else
echo "*** with $libname and none of the candidates passed a file format test"
echo "*** using a file magic. Last file checked: $potlib"
fi
fi fi
else else
# Add a -L argument. # Add a -L argument.
@ -2614,8 +2652,9 @@ EOF
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
potential_libs=`ls $i/$libname[.-]* 2>/dev/null` potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
for potent_lib in $potential_libs; do for potent_lib in $potential_libs; do
potlib="$potent_lib" # see symlink-check below in file_magic test
if eval echo \"$potent_lib\" 2>/dev/null \ if eval echo \"$potent_lib\" 2>/dev/null \
| sed 10q \
| ${SED} 10q \
| egrep "$match_pattern_regex" > /dev/null; then | egrep "$match_pattern_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib" newdeplibs="$newdeplibs $a_deplib"
a_deplib="" a_deplib=""
@ -2626,10 +2665,17 @@ EOF
if test -n "$a_deplib" ; then if test -n "$a_deplib" ; then
droppeddeps=yes droppeddeps=yes
echo echo
echo "*** Warning: This library needs some functionality provided by $a_deplib."
echo "*** Warning: linker path does not have real file for library $a_deplib."
echo "*** I have the capability to make that library automatically link in when" echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a" echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
echo "*** shared version of the library, which you do not appear to have"
echo "*** because I did check the linker path looking for a file starting"
if test -z "$potlib" ; then
echo "*** with $libname but no candidates were found. (...for regex pattern test)"
else
echo "*** with $libname and none of the candidates passed a file format test"
echo "*** using a regex pattern. Last file checked: $potlib"
fi
fi fi
else else
# Add a -L argument. # Add a -L argument.
@ -2894,7 +2940,18 @@ EOF
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
eval cmds=\"$archive_expsym_cmds\" eval cmds=\"$archive_expsym_cmds\"
else else
save_deplibs="$deplibs"
for conv in $convenience; do
tmp_deplibs=
for test_deplib in $deplibs; do
if test "$test_deplib" != "$conv"; then
tmp_deplibs="$tmp_deplibs $test_deplib"
fi
done
deplibs="$tmp_deplibs"
done
eval cmds=\"$archive_cmds\" eval cmds=\"$archive_cmds\"
deplibs="$save_deplibs"
fi fi
save_ifs="$IFS"; IFS='~' save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do for cmd in $cmds; do
@ -3093,7 +3150,7 @@ EOF
prog) prog)
case $host in case $host in
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
*cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
esac esac
if test -n "$vinfo"; then if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
@ -3115,6 +3172,13 @@ EOF
# On Rhapsody replace the C library is the System framework # On Rhapsody replace the C library is the System framework
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
case $host in
*darwin*)
# Don't allow lazy linking, it breaks C++ global constructors
compile_command="$compile_command ${wl}-bind_at_load"
finalize_command="$finalize_command ${wl}-bind_at_load"
;;
esac
;; ;;
esac esac
@ -3281,9 +3345,9 @@ extern \"C\" {
if test -z "$export_symbols"; then if test -z "$export_symbols"; then
export_symbols="$output_objdir/$output.exp" export_symbols="$output_objdir/$output.exp"
$run $rm $export_symbols $run $rm $export_symbols
$run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
else else
$run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"' $run eval 'mv "$nlist"T "$nlist"'
fi fi
@ -3291,7 +3355,7 @@ extern \"C\" {
for arg in $dlprefiles; do for arg in $dlprefiles; do
$show "extracting global C symbols from \`$arg'" $show "extracting global C symbols from \`$arg'"
name=`echo "$arg" | sed -e 's%^.*/%%'`
name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
$run eval 'echo ": $name " >> "$nlist"' $run eval 'echo ": $name " >> "$nlist"'
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done done
@ -3306,7 +3370,13 @@ extern \"C\" {
fi fi
# Try sorting and uniquifying the output. # Try sorting and uniquifying the output.
if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
if grep -v "^: " < "$nlist" |
if sort -k 3 </dev/null >/dev/null 2>&1; then
sort -k 3
else
sort +2
fi |
uniq > "$nlist"S; then
: :
else else
grep -v "^: " < "$nlist" > "$nlist"S grep -v "^: " < "$nlist" > "$nlist"S
@ -3528,7 +3598,7 @@ static const void *lt_preloaded_setup() {
relink_command="$var=\"$var_value\"; export $var; $relink_command" relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi fi
done done
relink_command="cd `pwd`; $relink_command"
relink_command="(cd `pwd`; $relink_command)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
fi fi
@ -3548,7 +3618,7 @@ static const void *lt_preloaded_setup() {
# win32 will think the script is a binary if it has # win32 will think the script is a binary if it has
# a .exe suffix, so we strip it off here. # a .exe suffix, so we strip it off here.
case $output in case $output in
*.exe) output=`echo $output|sed 's,.exe$,,'` ;;
*.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
esac esac
# test for cygwin because mv fails w/o .exe extensions # test for cygwin because mv fails w/o .exe extensions
case $host in case $host in
@ -3572,7 +3642,7 @@ static const void *lt_preloaded_setup() {
# Sed substitution that helps us do robust quoting. It backslashifies # Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings. # metacharacters that are still active within double-quoted strings.
Xsed='sed -e 1s/^X//'
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='$sed_quote_subst' sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout # The HP-UX ksh and POSIX shell print the target directory to stdout
@ -3610,7 +3680,7 @@ else
test \"x\$thisdir\" = \"x\$file\" && thisdir=. test \"x\$thisdir\" = \"x\$file\" && thisdir=.
# Follow symbolic links until we get to the real thisdir. # Follow symbolic links until we get to the real thisdir.
file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
while test -n \"\$file\"; do while test -n \"\$file\"; do
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
@ -3623,7 +3693,7 @@ else
fi fi
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
done done
# Try to get the absolute directory name. # Try to get the absolute directory name.
@ -3637,7 +3707,7 @@ else
progdir=\"\$thisdir/$objdir\" progdir=\"\$thisdir/$objdir\"
if test ! -f \"\$progdir/\$program\" || \\ if test ! -f \"\$progdir/\$program\" || \\
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then test \"X\$file\" != \"X\$progdir/\$program\"; }; then
file=\"\$\$-\$program\" file=\"\$\$-\$program\"
@ -3683,7 +3753,7 @@ else
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\" $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var # Some systems cannot cope with colon-terminated $shlibpath_var
# The second colon is a workaround for a bug in BeOS R4 sed
# The second colon is a workaround for a bug in BeOS R4 ${SED}
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
export $shlibpath_var export $shlibpath_var
@ -3858,7 +3928,7 @@ fi\
fi fi
done done
# Quote the link command for shipping. # Quote the link command for shipping.
relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
# Only create the output if not a dry run. # Only create the output if not a dry run.
@ -3875,7 +3945,7 @@ fi\
case $deplib in case $deplib in
*.la) *.la)
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit 1 exit 1
@ -3889,7 +3959,7 @@ fi\
newdlfiles= newdlfiles=
for lib in $dlfiles; do for lib in $dlfiles; do
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1 exit 1
@ -3900,7 +3970,7 @@ fi\
newdlprefiles= newdlprefiles=
for lib in $dlprefiles; do for lib in $dlprefiles; do
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1 exit 1
@ -4124,7 +4194,7 @@ relink_command=\"$relink_command\""
*.la) *.la)
# Check to see that this really is a libtool archive. # Check to see that this really is a libtool archive.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else else
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
@ -4273,19 +4343,27 @@ relink_command=\"$relink_command\""
fi fi
# Do a test to see if this is really a libtool program. # Do a test to see if this is really a libtool program.
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
case $host in
*cygwin*|*mingw*)
wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
;;
*)
wrapper=$file
;;
esac
if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
notinst_deplibs= notinst_deplibs=
relink_command= relink_command=
# If there is no directory component, then add one. # If there is no directory component, then add one.
case $file in case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
*/* | *\\*) . $wrapper ;;
*) . ./$wrapper ;;
esac esac
# Check the variables that should have been set. # Check the variables that should have been set.
if test -z "$notinst_deplibs"; then if test -z "$notinst_deplibs"; then
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
exit 1 exit 1
fi fi
@ -4310,8 +4388,8 @@ relink_command=\"$relink_command\""
relink_command= relink_command=
# If there is no directory component, then add one. # If there is no directory component, then add one.
case $file in case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
*/* | *\\*) . $wrapper ;;
*) . ./$wrapper ;;
esac esac
outputname= outputname=
@ -4359,7 +4437,7 @@ relink_command=\"$relink_command\""
destfile=$destfile.exe destfile=$destfile.exe
;; ;;
*:*.exe) *:*.exe)
destfile=`echo $destfile | sed -e 's,.exe$,,'`
destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
;; ;;
esac esac
;; ;;
@ -4507,7 +4585,7 @@ relink_command=\"$relink_command\""
case $file in case $file in
*.la) *.la)
# Check to see that this really is a libtool archive. # Check to see that this really is a libtool archive.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2 $echo "$help" 1>&2
@ -4578,7 +4656,7 @@ relink_command=\"$relink_command\""
-*) ;; -*) ;;
*) *)
# Do a test to see if this is really a libtool program. # Do a test to see if this is really a libtool program.
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# If there is no directory component, then add one. # If there is no directory component, then add one.
case $file in case $file in
*/* | *\\*) . $file ;; */* | *\\*) . $file ;;
@ -4610,7 +4688,7 @@ relink_command=\"$relink_command\""
fi fi
# Now prepare to actually exec the command. # Now prepare to actually exec the command.
exec_cmd='"$cmd"$args'
exec_cmd="\$cmd$args"
else else
# Display what would be done. # Display what would be done.
if test -n "$shlibpath_var"; then if test -n "$shlibpath_var"; then
@ -4687,7 +4765,7 @@ relink_command=\"$relink_command\""
case $name in case $name in
*.la) *.la)
# Possibly a libtool archive, so verify it. # Possibly a libtool archive, so verify it.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
. $dir/$name . $dir/$name
# Delete the libtool libraries and symlinks. # Delete the libtool libraries and symlinks.
@ -4742,7 +4820,7 @@ relink_command=\"$relink_command\""
*) *)
# Do a test to see if this is a libtool program. # Do a test to see if this is a libtool program.
if test $mode = clean && if test $mode = clean &&
(sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
(${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
relink_command= relink_command=
. $dir/$file . $dir/$file

19
configure.ac

@ -51,9 +51,9 @@ AC_PROG_CXXCPP
dnl sets variable CXXCPP dnl sets variable CXXCPP
CL_AS_UNDERSCORE CL_AS_UNDERSCORE
dnl sets variable AS_UNDERSCORE, DEFS ASM_UNDERSCORE dnl sets variable AS_UNDERSCORE, DEFS ASM_UNDERSCORE
CL_PROG_RANLIB
AC_PROG_RANLIB
dnl sets variable RANLIB dnl sets variable RANLIB
CL_PROG_INSTALL
AC_PROG_INSTALL
dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM dnl sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
dnl dnl
dnl check for host type dnl check for host type
@ -65,7 +65,6 @@ CL_CANONICAL_HOST_CPU
dnl dnl
dnl check for build configuration dnl check for build configuration
dnl dnl
dnl libcln depends on libm
PACKAGE=cln PACKAGE=cln
dnl libtool wants PACKAGE dnl libtool wants PACKAGE
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
@ -80,7 +79,7 @@ dnl CL_CURRENT and set CL_REVISION to 0,
dnl * if any functions/classes have been added, increment CL_AGE, dnl * if any functions/classes have been added, increment CL_AGE,
dnl * if backwards compatibility has been broken, set CL_AGE to 0. dnl * if backwards compatibility has been broken, set CL_AGE to 0.
CL_CURRENT=2 CL_CURRENT=2
CL_REVISION=4
CL_REVISION=5
CL_AGE=0 CL_AGE=0
dnl make substitutions dnl make substitutions
AC_SUBST(CL_CURRENT) AC_SUBST(CL_CURRENT)
@ -89,7 +88,7 @@ AC_SUBST(CL_AGE)
dnl release version dnl release version
CL_VERSION_MAJOR=1 CL_VERSION_MAJOR=1
CL_VERSION_MINOR=1 CL_VERSION_MINOR=1
CL_VERSION_PATCHLEVEL=5
CL_VERSION_PATCHLEVEL=6
dnl release version for cln/config.h, so it can be tested by the preprocessor dnl release version for cln/config.h, so it can be tested by the preprocessor
AC_DEFINE_UNQUOTED(CL_VERSION_MAJOR, $CL_VERSION_MAJOR) AC_DEFINE_UNQUOTED(CL_VERSION_MAJOR, $CL_VERSION_MAJOR)
AC_DEFINE_UNQUOTED(CL_VERSION_MINOR, $CL_VERSION_MINOR) AC_DEFINE_UNQUOTED(CL_VERSION_MINOR, $CL_VERSION_MINOR)
@ -104,20 +103,16 @@ dnl checks for compiler characteristics
dnl dnl
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
dnl dnl
CL_BOOL
dnl DEFS HAVE_BOOL, bool
CL_LONGLONG CL_LONGLONG
dnl DEFS HAVE_LONGLONG dnl DEFS HAVE_LONGLONG
CL_LONGDOUBLE CL_LONGDOUBLE
dnl DEFS HAVE_LONGDOUBLE dnl DEFS HAVE_LONGDOUBLE
CL_TEMPLATE_NULL
dnl DEFS HAVE_TEMPLATE_NULL
CL_GLOBAL_CONSTRUCTORS CL_GLOBAL_CONSTRUCTORS
dnl DEFS CL_GLOBAL_CONSTRUCTOR_PREFIX, CL_GLOBAL_DESTRUCTOR_PREFIX dnl DEFS CL_GLOBAL_CONSTRUCTOR_PREFIX, CL_GLOBAL_DESTRUCTOR_PREFIX
dnl dnl
dnl checks for header files dnl checks for header files
dnl dnl
CL_UNISTD_H
AC_CHECK_HEADERS([unistd.h])
dnl DEFS HAVE_UNISTD_H if exist unistd.h dnl DEFS HAVE_UNISTD_H if exist unistd.h
dnl dnl
dnl checks for typedefs dnl checks for typedefs
@ -131,8 +126,6 @@ CL_FPU_CONTROL
dnl DEFS HAVE_FPU_CONTROL_T, HAVE_SETFPUCW dnl DEFS HAVE_FPU_CONTROL_T, HAVE_SETFPUCW
CL_GETTIMEOFDAY CL_GETTIMEOFDAY
dnl DEFS HAVE_GETTIMEOFDAY, GETTIMEOFDAY_DOTS, GETTIMEOFDAY_TZP_T dnl DEFS HAVE_GETTIMEOFDAY, GETTIMEOFDAY_DOTS, GETTIMEOFDAY_TZP_T
CL_FTIME
dnl DEFS HAVE_FTIME
CL_TIMES_CLOCK CL_TIMES_CLOCK
dnl DEFS HAVE_TIMES_CLOCK dnl DEFS HAVE_TIMES_CLOCK
CL_RUSAGE CL_RUSAGE
@ -142,7 +135,7 @@ CL_PERROR
dnl dnl
dnl checks for compiler characteristics dnl checks for compiler characteristics
dnl dnl
CL_CHAR_UNSIGNED
AC_C_CHAR_UNSIGNED
dnl DEFS __CHAR_UNSIGNED__ if char is unsigned dnl DEFS __CHAR_UNSIGNED__ if char is unsigned
test -d 'include/cln' || mkdir -p 'include/cln' test -d 'include/cln' || mkdir -p 'include/cln'
CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,include/cln/intparam.h,cl_cv_file_intparam_h) CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,include/cln/intparam.h,cl_cv_file_intparam_h)

2
include/cln/GV_integer.h

@ -13,9 +13,7 @@ namespace cln {
// A vector of integers is *not* just a normal vector of numbers (the vectorops // A vector of integers is *not* just a normal vector of numbers (the vectorops
// support the maxbits() operation), but we treat can it like this nevertheless. // support the maxbits() operation), but we treat can it like this nevertheless.
#ifdef HAVE_TEMPLATE_NULL
template <> template <>
#endif
struct cl_heap_GV<cl_I> : cl_heap { struct cl_heap_GV<cl_I> : cl_heap {
cl_GV_inner<cl_I> v; cl_GV_inner<cl_I> v;
// here room for the elements // here room for the elements

2
include/cln/GV_modinteger.h

@ -11,9 +11,7 @@ namespace cln {
// A vector of modular integers (over the same modular integer ring) // A vector of modular integers (over the same modular integer ring)
// is just a normal vector of integers, with maxbits() operation. // is just a normal vector of integers, with maxbits() operation.
#ifdef HAVE_TEMPLATE_NULL
template <> template <>
#endif
struct cl_heap_GV<_cl_MI> : cl_heap { struct cl_heap_GV<_cl_MI> : cl_heap {
cl_GV_inner<_cl_MI> v; cl_GV_inner<_cl_MI> v;
// here room for the elements // here room for the elements

10
include/cln/config.h.in

@ -71,12 +71,6 @@
/* compiler characteristics */ /* compiler characteristics */
/* CL_BOOL */
/* Define if your compiler understands the bool type. */
#undef HAVE_BOOL
/* Define this as `int' if your compiler doesn't understand the bool type. */
#undef bool
/* CL_LONGLONG */ /* CL_LONGLONG */
/* Define if your compiler supports the `long long' type. */ /* Define if your compiler supports the `long long' type. */
#undef HAVE_LONGLONG #undef HAVE_LONGLONG
@ -85,10 +79,6 @@
/* Define if your compiler supports the `long double' type. */ /* Define if your compiler supports the `long double' type. */
#undef HAVE_LONGDOUBLE #undef HAVE_LONGDOUBLE
/* CL_TEMPLATE_NULL */
/* Define if your compiler supports the `template <>' syntax. */
#undef HAVE_TEMPLATE_NULL
/* header files */ /* header files */

2
include/cln/modules.h

@ -7,7 +7,7 @@
// specified in C++. AIX 4 has a linker which apparently does order // specified in C++. AIX 4 has a linker which apparently does order
// the modules according to dependencies, so that low-level modules // the modules according to dependencies, so that low-level modules
// will be initialized earlier than the high-level modules which depend // will be initialized earlier than the high-level modules which depend
// on them. I have a patch for GNU ld that does the same thing.
// on them. I (Bruno) have a patch for GNU ld that does the same thing.
// //
// But for now, I take a half-automatic approach to the correct module // But for now, I take a half-automatic approach to the correct module
// ordering problem: PROVIDE/REQUIRE, as in Common Lisp. // ordering problem: PROVIDE/REQUIRE, as in Common Lisp.

18
autoconf/acinclude.m4 → m4/gmp.m4

@ -1,4 +1,16 @@
# Is the gmp header file new enough? (should be implemented with an argument)
dnl -*- Autoconf -*-
dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl From Richard B. Kreckel.
AC_PREREQ(2.13)
dnl Is the gmp header file new enough? (should be implemented with an argument)
AC_DEFUN(CL_GMP_H_VERSION, AC_DEFUN(CL_GMP_H_VERSION,
[AC_CACHE_CHECK([for recent enough gmp.h], cl_cv_new_gmp_h, [ [AC_CACHE_CHECK([for recent enough gmp.h], cl_cv_new_gmp_h, [
AC_TRY_CPP([#include <gmp.h> AC_TRY_CPP([#include <gmp.h>
@ -8,7 +20,7 @@ AC_DEFUN(CL_GMP_H_VERSION,
cl_cv_new_gmp_h="yes", cl_cv_new_gmp_h="no") cl_cv_new_gmp_h="yes", cl_cv_new_gmp_h="no")
])])dnl ])])dnl
# Does libgmp provide some functionality introduced in version 3.0?
dnl Does libgmp provide some functionality introduced in version 3.0?
AC_DEFUN(CL_GMP_CHECK, AC_DEFUN(CL_GMP_CHECK,
[AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [ [AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [
SAVELIBS=$LIBS SAVELIBS=$LIBS
@ -17,7 +29,7 @@ AC_DEFUN(CL_GMP_CHECK,
cl_cv_new_libgmp="yes", cl_cv_new_libgmp="no"; LIBS=$SAVELIBS) cl_cv_new_libgmp="yes", cl_cv_new_libgmp="no"; LIBS=$SAVELIBS)
])]) ])])
# What is sizeof(mp_limb_t)? (It has to match sizeof(uintD) later.)
dnl What is sizeof(mp_limb_t)? (It has to match sizeof(uintD) later.)
AC_DEFUN(CL_GMP_SET_UINTD, AC_DEFUN(CL_GMP_SET_UINTD,
[AC_CACHE_CHECK([how large gmp demands uintD to be], cl_cv_gmp_set_uintd, [ [AC_CACHE_CHECK([how large gmp demands uintD to be], cl_cv_gmp_set_uintd, [
AC_TRY_RUN([#include <stdio.h> AC_TRY_RUN([#include <stdio.h>

6
src/base/cl_base_config.h.in

@ -16,13 +16,9 @@
/* Define as the type of `tzp' in gettimeofday() declaration. */ /* Define as the type of `tzp' in gettimeofday() declaration. */
#undef GETTIMEOFDAY_TZP_T #undef GETTIMEOFDAY_TZP_T
/* CL_FTIME */
/* Define if you have the ftime() function. */
#undef HAVE_FTIME
/* CL_TIMES_CLOCK */ /* CL_TIMES_CLOCK */
/* Define if you have the times() function and it returns the real time, /* Define if you have the times() function and it returns the real time,
but don't have the gettimeofday() or ftime() function. */
but don't have the gettimeofday() function. */
#undef HAVE_TIMES_CLOCK #undef HAVE_TIMES_CLOCK

16
src/base/random/cl_random_from.cc

@ -34,22 +34,6 @@ inline uint32 get_seed (void)
return cln::highlow32(tv.tv_sec,tv.tv_usec); // 16+16 zufällige Bits return cln::highlow32(tv.tv_sec,tv.tv_usec); // 16+16 zufällige Bits
} }
#elif defined(HAVE_FTIME)
#include <sys/timeb.h>
#ifdef _WIN32
extern "C" void ftime (struct timeb * tp);
#else
extern "C" int ftime (struct timeb * tp);
#endif
inline uint32 get_seed (void)
{
var struct timeb tb;
ftime(&tb);
return (tb.time << 10) | tb.millitm; // 22+10 zufällige Bits
}
#elif defined(HAVE_TIMES_CLOCK) #elif defined(HAVE_TIMES_CLOCK)
#include <time.h> #include <time.h>

6
src/timing/cl_t_config.h.in

@ -16,13 +16,9 @@
/* Define as the type of `tzp' in gettimeofday() declaration. */ /* Define as the type of `tzp' in gettimeofday() declaration. */
#undef GETTIMEOFDAY_TZP_T #undef GETTIMEOFDAY_TZP_T
/* CL_FTIME */
/* Define if you have the ftime() function. */
#undef HAVE_FTIME
/* CL_TIMES_CLOCK */ /* CL_TIMES_CLOCK */
/* Define if you have the times() function and it returns the real time, /* Define if you have the times() function and it returns the real time,
but don't have the gettimeofday() or ftime() function. */
but don't have the gettimeofday() function. */
#undef HAVE_TIMES_CLOCK #undef HAVE_TIMES_CLOCK
/* CL_RUSAGE */ /* CL_RUSAGE */

13
src/timing/cl_t_current.cc

@ -19,13 +19,6 @@
#else #else
extern "C" int gettimeofday (struct timeval * tp, GETTIMEOFDAY_TZP_T tzp); extern "C" int gettimeofday (struct timeval * tp, GETTIMEOFDAY_TZP_T tzp);
#endif #endif
#elif defined(HAVE_FTIME)
#include <sys/timeb.h>
#ifdef _WIN32
extern "C" void ftime (struct timeb * tp);
#else
extern "C" int ftime (struct timeb * tp);
#endif
#else #else
#include <time.h> #include <time.h>
#endif #endif
@ -49,12 +42,6 @@ const cl_timespec cl_current_time ()
return cl_timespec(tv.tv_sec, return cl_timespec(tv.tv_sec,
tv.tv_usec * (1000000000/1000000) tv.tv_usec * (1000000000/1000000)
); );
#elif defined(HAVE_FTIME)
var struct timeb timebuf;
ftime(&timebuf);
return cl_timespec(timebuf.time,
(uintL)timebuf.millitm * (1000000000/1000)
);
#else #else
return cl_timespec(time(NULL),0); return cl_timespec(time(NULL),0);
#endif #endif

Loading…
Cancel
Save