run autoconf, autoheader and make depend

This commit is contained in:
JD Horelick 2012-02-29 23:18:57 -05:00
parent 6bdef3d52f
commit bf9bfd2696
14 changed files with 8814 additions and 5551 deletions

302
configure vendored
View File

@ -613,6 +613,8 @@ SSL_SRCS_ENABLE
MOD_TARGET MOD_TARGET
MODULES_LIBS MODULES_LIBS
SELECT_TYPE SELECT_TYPE
PROGRAM_PREFIX
PKGRUNDIR
moduledir moduledir
MODULE_DIR MODULE_DIR
helpdir helpdir
@ -626,6 +628,13 @@ ENCSPEED
ALLOCA ALLOCA
VICONF VICONF
CRYPT_LIB CRYPT_LIB
PKGLIBEXECDIR
pkglibexecdir
PKGLOCALSTATEDIR
pkglocalstatedir
pkgrundir
rundir
pkglibdir
LEXLIB LEXLIB
LEX_OUTPUT_ROOT LEX_OUTPUT_ROOT
LEX LEX
@ -699,6 +708,7 @@ SHELL'
ac_subst_files='' ac_subst_files=''
ac_user_opts=' ac_user_opts='
enable_option_checking enable_option_checking
enable_fhs_paths
enable_ipv6 enable_ipv6
enable_openssl enable_openssl
with_zlib_path with_zlib_path
@ -712,6 +722,8 @@ with_confdir
with_logdir with_logdir
with_helpdir with_helpdir
with_moduledir with_moduledir
with_rundir
with_program_prefix
enable_assert enable_assert
enable_iodebug enable_iodebug
enable_profile enable_profile
@ -1343,6 +1355,7 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-fhs-paths User more FHS-like pathnames (for packagers).
--enable-ipv6 Enable IPv6 support --enable-ipv6 Enable IPv6 support
--enable-openssl=DIR Enable OpenSSL support (DIR optional). --enable-openssl=DIR Enable OpenSSL support (DIR optional).
--disable-openssl Disable OpenSSL support. --disable-openssl Disable OpenSSL support.
@ -1368,6 +1381,9 @@ Optional Packages:
--with-logdir=DIR Directory where to write logfiles. --with-logdir=DIR Directory where to write logfiles.
--with-helpdir=DIR Directory to install help files. --with-helpdir=DIR Directory to install help files.
--with-moduledir=DIR Directory to install modules. --with-moduledir=DIR Directory to install modules.
--with-rundir=DIR Directory in which to store pidfile.
--with-program-prefix= If set, programs installed into PATH will be
installed with names prefixed by this prefix.
--with-nicklen=LENGTH Set the nick length to LENGTH (default 31, max 50) --with-nicklen=LENGTH Set the nick length to LENGTH (default 31, max 50)
--with-topiclen=NUMBER Set the max topic length to NUMBER (default 390, max --with-topiclen=NUMBER Set the max topic length to NUMBER (default 390, max
390) 390)
@ -5348,12 +5364,74 @@ if test "$LEX" = ":"; then
as_fn_error $? "could not locate a suitable lexical generator, install flex or lex." "$LINENO" 5 as_fn_error $? "could not locate a suitable lexical generator, install flex or lex." "$LINENO" 5
fi fi
if test "$libexecdir" = '${exec_prefix}/libexec' && # Check whether --enable-fhs-paths was given.
test "$localstatedir" = '${prefix}/var'; then if test "${enable_fhs_paths+set}" = set; then :
libexecdir='${bindir}' enableval=$enable_fhs_paths;
localstatedir='${prefix}' else
if test "$libexecdir" = '${exec_prefix}/libexec' && \
test "$localstatedir" = '${prefix}/var' && \
test "$libdir" = '${exec_prefix}/lib'; then :
enable_fhs_paths=no
else
enable_fhs_paths=yes
fi fi
fi
if test "x$enable_fhs_paths" = "xyes"; then :
pkglibexecdir='${libexecdir}/${PACKAGE_TARNAME}'
rundir=${rundir-'${prefix}/run'}
pkgrundir='${rundir}/${PACKAGE_TARNAME}'
pkglocalstatedir='${localstatedir}/${PACKAGE_TARNAME}'
else
libexecdir='${bindir}'
pkglibexecdir='${libexecdir}'
rundir='${sysconfdir}'
pkgrundir='${rundir}'
localstatedir='${prefix}'
pkglocalstatedir='${sysconfdir}'
fi
pkglibdir='${libdir}/${PACKAGE_TARNAME}'
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $pkglocalstatedir`
ac_define_dir=`eval echo $last_ac_define_dir`
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir`
done
PKGLOCALSTATEDIR="$ac_define_dir"
cat >>confdefs.h <<_ACEOF
#define PKGLOCALSTATEDIR "$ac_define_dir"
_ACEOF
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $pkglibexecdir`
ac_define_dir=`eval echo $last_ac_define_dir`
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir`
done
PKGLIBEXECDIR="$ac_define_dir"
cat >>confdefs.h <<_ACEOF
#define PKGLIBEXECDIR "$ac_define_dir"
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; } $as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then : if ${ac_cv_header_stdc+:} false; then :
@ -7208,8 +7286,12 @@ $as_echo "yes" >&6; }
test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $confdir` last_ac_define_dir=`eval echo $confdir`
ac_define_dir=`eval echo $ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir`
done
ETC_DIR="$ac_define_dir" ETC_DIR="$ac_define_dir"
@ -7228,14 +7310,18 @@ _ACEOF
else else
confdir='${prefix}/etc' confdir='${sysconfdir}'
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }
test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $confdir` last_ac_define_dir=`eval echo $confdir`
ac_define_dir=`eval echo $ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir`
done
ETC_DIR="$ac_define_dir" ETC_DIR="$ac_define_dir"
@ -7266,37 +7352,25 @@ if test "${with_logdir+set}" = set; then :
withval=$with_logdir; logdir=`echo $withval | sed 's/\/$//'` withval=$with_logdir; logdir=`echo $withval | sed 's/\/$//'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $logdir`
ac_define_dir=`eval echo $ac_define_dir`
LOG_DIR="$ac_define_dir"
cat >>confdefs.h <<_ACEOF
#define LOG_DIR "$ac_define_dir"
_ACEOF
logdir=`(
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
eval echo \""$logdir"\"
)`
else else
logdir='${prefix}/logs' if test "x$enable_fhs_paths" = "xyes"; then :
logdir='${localstatedir}/log/${PACKAGE_TARNAME}'
else
logdir='${prefix}/logs'
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }
fi
test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $logdir` last_ac_define_dir=`eval echo $logdir`
ac_define_dir=`eval echo $ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir`
done
LOG_DIR="$ac_define_dir" LOG_DIR="$ac_define_dir"
@ -7315,9 +7389,6 @@ _ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to modify helpdir" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to modify helpdir" >&5
$as_echo_n "checking whether to modify helpdir... " >&6; } $as_echo_n "checking whether to modify helpdir... " >&6; }
@ -7327,37 +7398,25 @@ if test "${with_helpdir+set}" = set; then :
withval=$with_helpdir; helpdir=`echo $withval | sed 's/\/$//'` withval=$with_helpdir; helpdir=`echo $withval | sed 's/\/$//'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $helpdir`
ac_define_dir=`eval echo $ac_define_dir`
HELP_DIR="$ac_define_dir"
cat >>confdefs.h <<_ACEOF
#define HELP_DIR "$ac_define_dir"
_ACEOF
helpdir=`(
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
eval echo \""$helpdir"\"
)`
else else
helpdir='${prefix}/help' if test "x$enable_fhs_paths" = "xyes"; then :
helpdir='${datadir}/${PACKAGE_TARNAME}/help'
else
helpdir='${prefix}/help'
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }
fi
test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $helpdir` last_ac_define_dir=`eval echo $helpdir`
ac_define_dir=`eval echo $ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir`
done
HELP_DIR="$ac_define_dir" HELP_DIR="$ac_define_dir"
@ -7376,9 +7435,6 @@ _ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to modify moduledir" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to modify moduledir" >&5
$as_echo_n "checking whether to modify moduledir... " >&6; } $as_echo_n "checking whether to modify moduledir... " >&6; }
@ -7388,37 +7444,26 @@ if test "${with_moduledir+set}" = set; then :
withval=$with_moduledir; moduledir=`echo $withval | sed 's/\/$//'` withval=$with_moduledir; moduledir=`echo $withval | sed 's/\/$//'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $moduledir`
ac_define_dir=`eval echo $ac_define_dir`
MODULE_DIR="$ac_define_dir"
cat >>confdefs.h <<_ACEOF
#define MODULE_DIR "$ac_define_dir"
_ACEOF
moduledir=`(
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
eval echo \""$moduledir"\"
)`
else else
moduledir='${prefix}/modules' if test "x$enable_fhs_paths" = "xyes"; then :
moduledir='${pkglibdir}/modules'
else
moduledir='${prefix}/modules'
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }
fi
test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo $moduledir` last_ac_define_dir=`eval echo $moduledir`
ac_define_dir=`eval echo $ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir`
done
MODULE_DIR="$ac_define_dir" MODULE_DIR="$ac_define_dir"
@ -7437,7 +7482,62 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or modify rundir" >&5
$as_echo_n "checking whether or modify rundir... " >&6; }
# Check whether --with-rundir was given.
if test "${with_rundir+set}" = set; then :
withval=$with_rundir; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
rundir=`echo $withval | sed 's/\/$//'`
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if test "x$enable_fhs_paths" = "xyes"; then :
rundir='${prefix}/run'
else
rundir='${sysconfdir}'
fi fi
fi
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $pkgrundir`
ac_define_dir=`eval echo $last_ac_define_dir`
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir`
done
PKGRUNDIR="$ac_define_dir"
cat >>confdefs.h <<_ACEOF
#define PKGRUNDIR "$ac_define_dir"
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for program prefix" >&5
$as_echo_n "checking for program prefix... " >&6; }
# Check whether --with-program-prefix was given.
if test "${with_program_prefix+set}" = set; then :
withval=$with_program_prefix; test "x$with_program_prefix" = "xno" && with_program_prefix=
else
with_program_prefix=
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$with_program_prefix\"" >&5
$as_echo "\"$with_program_prefix\"" >&6; }
PROGRAM_PREFIX="$with_program_prefix"
cat >>confdefs.h <<_ACEOF
#define PROGRAM_PREFIX "$with_program_prefix"
_ACEOF
if test ! -z "$SELECT_TYPE_EXPLICIT"; then if test ! -z "$SELECT_TYPE_EXPLICIT"; then
@ -9467,7 +9567,9 @@ _ACEOF
fi fi
ac_config_files="$ac_config_files Makefile bandb/Makefile ssld/Makefile extensions/Makefile unsupported/Makefile src/Makefile modules/Makefile tools/Makefile doc/Makefile help/Makefile" ac_config_files="$ac_config_files Makefile bandb/Makefile ssld/Makefile extensions/Makefile unsupported/Makefile src/Makefile modules/Makefile tools/Makefile tools/genssl.sh doc/Makefile help/Makefile"
ac_config_commands="$ac_config_commands tools/genssl.sh_chmod"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
@ -10017,6 +10119,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for. # Files that config.status was made for.
config_files="$ac_config_files" config_files="$ac_config_files"
config_headers="$ac_config_headers" config_headers="$ac_config_headers"
config_commands="$ac_config_commands"
_ACEOF _ACEOF
@ -10046,6 +10149,9 @@ $config_files
Configuration headers: Configuration headers:
$config_headers $config_headers
Configuration commands:
$config_commands
Report bugs to the package provider." Report bugs to the package provider."
_ACEOF _ACEOF
@ -10183,8 +10289,10 @@ do
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;;
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
"tools/genssl.sh") CONFIG_FILES="$CONFIG_FILES tools/genssl.sh" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;; "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;;
"tools/genssl.sh_chmod") CONFIG_COMMANDS="$CONFIG_COMMANDS tools/genssl.sh_chmod" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac esac
@ -10198,6 +10306,7 @@ done
if $ac_need_defaults; then if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi fi
# Have a temporary directory for convenience. Make it in the build tree # Have a temporary directory for convenience. Make it in the build tree
@ -10494,7 +10603,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_HEADERS" fi # test -n "$CONFIG_HEADERS"
eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
shift shift
for ac_tag for ac_tag
do do
@ -10732,9 +10841,16 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;}
fi fi
;; ;;
:C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
$as_echo "$as_me: executing $ac_file commands" >&6;}
;;
esac esac
case $ac_file$ac_mode in
"tools/genssl.sh_chmod":C) chmod 755 tools/genssl.sh ;;
esac
done # for ac_tag done # for ac_tag

View File

@ -174,7 +174,7 @@
/* Define to 1 if you have the <wait.h> header file. */ /* Define to 1 if you have the <wait.h> header file. */
#undef HAVE_WAIT_H #undef HAVE_WAIT_H
/* Prefix where help file are installed. */ /* Prefix where help files are installed. */
#undef HELP_DIR #undef HELP_DIR
/* Prefix where the ircd is installed. */ /* Prefix where the ircd is installed. */
@ -237,6 +237,18 @@
/* Size of the pre-client heap. */ /* Size of the pre-client heap. */
#undef PCLIENT_HEAP_SIZE #undef PCLIENT_HEAP_SIZE
/* Directory where binaries the IRCd itself spawns live */
#undef PKGLIBEXECDIR
/* Directory in which to store state, such as band database */
#undef PKGLOCALSTATEDIR
/* Directory to store pidfile in. */
#undef PKGRUNDIR
/* String with which all programs intended to be in PATH are prefixed. */
#undef PROGRAM_PREFIX
/* This is the type of IO loop we are using */ /* This is the type of IO loop we are using */
#undef SELECT_TYPE #undef SELECT_TYPE

View File

@ -143,10 +143,10 @@ CFLAGS = @CFLAGS@
CP = @CP@ CP = @CP@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CRYPT_LIB = @CRYPT_LIB@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
@ -174,6 +174,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
MV = @MV@ MV = @MV@
NM = @NM@ NM = @NM@
@ -192,6 +193,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PICFLAGS = @PICFLAGS@ PICFLAGS = @PICFLAGS@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
RB_PREFIX = @RB_PREFIX@ RB_PREFIX = @RB_PREFIX@
RM = @RM@ RM = @RM@
@ -208,6 +211,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -240,7 +244,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@

2121
libratbox/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

554
libratbox/config.guess vendored
View File

@ -1,10 +1,10 @@
#! /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, 2003, 2004, 2005, 2006, 2007, 2008 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# Free Software Foundation, Inc. # 2011 Free Software Foundation, Inc.
timestamp='2008-01-23' timestamp='2011-02-02'
# 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
@ -27,16 +27,16 @@ timestamp='2008-01-23'
# 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 <per@bothner.com>. # Originally written by Per Bothner. Please send patches (context
# Please send patches to <config-patches@gnu.org>. Submit a context # diff format) to <config-patches@gnu.org> and include a ChangeLog
# diff and a properly formatted ChangeLog entry. # entry.
# #
# This script attempts to guess a canonical system name similar to # This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and # config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1. # exits with 0. Otherwise, it exits with 1.
# #
# The plan is that this can be called by configure scripts if you # You can get the latest version of this script from:
# don't specify an explicit build system type. # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'` me=`echo "$0" | sed -e 's,.*/,,'`
@ -56,8 +56,9 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -139,6 +140,29 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU/*)
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include <features.h>
#ifdef __UCLIBC__
# ifdef __UCLIBC_CONFIG_VERSION__
LIBC=uclibc __UCLIBC_CONFIG_VERSION__
# else
LIBC=uclibc
# endif
#else
# ifdef __dietlibc__
LIBC=dietlibc
# else
LIBC=gnu
# endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
;;
esac
# Note: order is significant - the case branches are not exclusive. # Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@ -170,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax) arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null | grep -q __ELF__
then then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX? # Return netbsd for either. FIX?
@ -180,7 +204,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi fi
;; ;;
*) *)
os=netbsd os=netbsd
;; ;;
esac esac
# The OS release # The OS release
@ -223,7 +247,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;; ;;
*5.*) *5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;; ;;
esac esac
# According to Compaq, /usr/sbin/psrinfo has been available on # According to Compaq, /usr/sbin/psrinfo has been available on
@ -269,7 +293,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# 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.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit ;; # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
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
@ -295,7 +322,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe echo s390-ibm-zvmoe
exit ;; exit ;;
*:OS400:*:*) *:OS400:*:*)
echo powerpc-ibm-os400 echo powerpc-ibm-os400
exit ;; exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE} echo arm-acorn-riscix${UNAME_RELEASE}
@ -324,14 +351,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;; sparc) echo sparc-icl-nx7; exit ;;
esac ;; esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
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 ;; exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
sun4*:SunOS:6*:*) sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize # According to config.sub, this is the proper way to canonicalize
@ -375,23 +421,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should # MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem. # be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit ;; exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit ;; exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE} echo m68k-atari-mint${UNAME_RELEASE}
exit ;; exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE} echo m68k-milan-mint${UNAME_RELEASE}
exit ;; exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE} echo m68k-hades-mint${UNAME_RELEASE}
exit ;; exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE} echo m68k-unknown-mint${UNAME_RELEASE}
exit ;; exit ;;
m68k:machten:*:*) m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE} echo m68k-apple-machten${UNAME_RELEASE}
exit ;; exit ;;
@ -461,8 +507,8 @@ EOF
echo m88k-motorola-sysv3 echo m88k-motorola-sysv3
exit ;; exit ;;
AViiON:dgux:*:*) AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures # DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p` UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@ -475,7 +521,7 @@ EOF
else else
echo i586-dg-dgux${UNAME_RELEASE} echo i586-dg-dgux${UNAME_RELEASE}
fi fi
exit ;; exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3) M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3 echo m88k-dolphin-sysv3
exit ;; exit ;;
@ -532,7 +578,7 @@ EOF
echo rs6000-ibm-aix3.2 echo rs6000-ibm-aix3.2
fi fi
exit ;; exit ;;
*:AIX:*:[456]) *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | 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
@ -575,52 +621,52 @@ EOF
9000/[678][0-9][0-9]) 9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0 532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;; 32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;; 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;; esac ;;
esac esac
fi fi
if [ "${HP_ARCH}" = "" ]; then if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE #define _HPUX_SOURCE
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
int main () int main ()
{ {
#if defined(_SC_KERNEL_BITS) #if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS); long bits = sysconf(_SC_KERNEL_BITS);
#endif #endif
long cpu = sysconf (_SC_CPU_VERSION); long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu) switch (cpu)
{ {
case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0: case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS) #if defined(_SC_KERNEL_BITS)
switch (bits) switch (bits)
{ {
case 64: puts ("hppa2.0w"); break; case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break; case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break; default: puts ("hppa2.0"); break;
} break; } break;
#else /* !defined(_SC_KERNEL_BITS) */ #else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break; puts ("hppa2.0"); break;
#endif #endif
default: puts ("hppa1.0"); break; default: puts ("hppa1.0"); break;
} }
exit (0); exit (0);
} }
EOF EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa test -z "$HP_ARCH" && HP_ARCH=hppa
@ -640,7 +686,7 @@ EOF
# => hppa64-hp-hpux11.23 # => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep __LP64__ >/dev/null grep -q __LP64__
then then
HP_ARCH="hppa2.0w" HP_ARCH="hppa2.0w"
else else
@ -711,22 +757,22 @@ EOF
exit ;; exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd echo c1-convex-bsd
exit ;; exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc if getsysinfo -f scalar_acc
then echo c32-convex-bsd then echo c32-convex-bsd
else echo c2-convex-bsd else echo c2-convex-bsd
fi fi
exit ;; exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd echo c34-convex-bsd
exit ;; exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd echo c38-convex-bsd
exit ;; exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd echo c4-convex-bsd
exit ;; exit ;;
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 ;; exit ;;
@ -750,14 +796,14 @@ EOF
exit ;; exit ;;
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/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;; exit ;;
5000:UNIX_System_V:4.*:*) 5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;; exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@ -785,18 +831,18 @@ EOF
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:windows32*:*) i*:windows32*:*)
# uname -m includes "-pc" on this system. # uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32 echo ${UNAME_MACHINE}-mingw32
exit ;; exit ;;
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
*:Interix*:[3456]*) *:Interix*:*)
case ${UNAME_MACHINE} in case ${UNAME_MACHINE} in
x86) x86)
echo i586-pc-interix${UNAME_RELEASE} echo i586-pc-interix${UNAME_RELEASE}
exit ;; exit ;;
EM64T | authenticamd) authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE} echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;; exit ;;
IA64) IA64)
@ -806,6 +852,9 @@ EOF
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks echo i${UNAME_MACHINE}-pc-mks
exit ;; exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
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
@ -826,101 +875,15 @@ EOF
exit ;; exit ;;
*:GNU:*:*) *:GNU:*:*)
# the GNU system # 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-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;; exit ;;
*:GNU/*:*:*) *:GNU/*:*:*)
# other systems with GNU libc and userland # 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 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;; exit ;;
i*86:Minix:*:*) i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit ;; exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
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 | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
alpha:Linux:*:*) alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;; EV5) UNAME_MACHINE=alphaev5 ;;
@ -930,106 +893,111 @@ EOF
EV6) UNAME_MACHINE=alphaev6 ;; EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;; EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;; EV68*) UNAME_MACHINE=alphaev68 ;;
esac esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#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-${LIBC}"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-${LIBC}
exit ;; exit ;;
parisc:Linux:*:* | hppa:Linux:*:*) parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level # Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;; PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-gnu ;; *) echo hppa-unknown-linux-${LIBC} ;;
esac esac
exit ;; exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*) ppc64:Linux:*:*)
echo hppa64-unknown-linux-gnu echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-${LIBC}
exit ;; exit ;;
s390:Linux:*:* | s390x:Linux:*:*) s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux echo ${UNAME_MACHINE}-ibm-linux
exit ;; exit ;;
sh64*:Linux:*:*) sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;; exit ;;
sh*:Linux:*:*) sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;; exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*) sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-tilera-linux-gnu
exit ;; exit ;;
vax:Linux:*:*) vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;; exit ;;
x86_64:Linux:*:*) x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu echo x86_64-unknown-linux-${LIBC}
exit ;; exit ;;
xtensa*:Linux:*:*) xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;; exit ;;
i*86:Linux:*:*)
# 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
# problems with other programs or directories called `ld' in the path.
# 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
s/[ ][ ]*/ /g
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
}
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
i*86:DYNIX/ptx:4*:*) i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both # earlier versions are messed up and put the nodename in both
@ -1037,11 +1005,11 @@ EOF
echo i386-sequent-sysv4 echo i386-sequent-sysv4
exit ;; exit ;;
i*86:UNIX_SV:4.2MP:2.*) i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version # Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2... # number series starting with 2...
# I am not positive that other SVR4 systems won't match this, # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms. # I just have to hope. -- rms.
# 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 ;; exit ;;
i*86:OS/2:*:*) i*86:OS/2:*:*)
@ -1058,7 +1026,7 @@ EOF
i*86:syllable:*:*) i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable echo ${UNAME_MACHINE}-pc-syllable
exit ;; exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE} echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;; exit ;;
i*86:*DOS:*:*) i*86:*DOS:*:*)
@ -1073,7 +1041,7 @@ EOF
fi fi
exit ;; exit ;;
i*86:*:5:[678]*) i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6. # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;; *486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;; *Pentium) UNAME_MACHINE=i586 ;;
@ -1101,10 +1069,13 @@ EOF
exit ;; exit ;;
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
# the processor, so we play safe by assuming i386. # the processor, so we play safe by assuming i586.
echo i386-pc-msdosdjgpp # Note: whatever this is, it MUST be the same as what config.sub
exit ;; # prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*) Intel:Mach:3*:*)
echo i386-pc-mach3 echo i386-pc-mach3
exit ;; exit ;;
@ -1139,8 +1110,18 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;; && { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE} echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;; exit ;;
@ -1153,7 +1134,7 @@ EOF
rs6000:LynxOS:2.*:*) rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE} echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;; exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE} echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;; exit ;;
SM[BE]S:UNIX_SV:*:*) SM[BE]S:UNIX_SV:*:*)
@ -1173,10 +1154,10 @@ EOF
echo ns32k-sni-sysv echo ns32k-sni-sysv
fi fi
exit ;; exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV> # says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4 echo i586-unisys-sysv4
exit ;; exit ;;
*:UNIX_System_V:4*:FTX*) *:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>. # From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm # How about differentiating between stratus architectures? -djm
@ -1202,11 +1183,11 @@ EOF
exit ;; exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE} echo mips-nec-sysv${UNAME_RELEASE}
else else
echo mips-unknown-sysv${UNAME_RELEASE} echo mips-unknown-sysv${UNAME_RELEASE}
fi fi
exit ;; exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos echo powerpc-be-beos
exit ;; exit ;;
@ -1216,6 +1197,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos echo i586-pc-beos
exit ;; exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*) SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE} echo sx4-nec-superux${UNAME_RELEASE}
exit ;; exit ;;
@ -1243,6 +1227,16 @@ EOF
*:Darwin:*:*) *:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;; unknown) UNAME_PROCESSOR=powerpc ;;
esac esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@ -1258,6 +1252,9 @@ EOF
*:QNX:*:4*) *:QNX:*:4*)
echo i386-pc-qnx echo i386-pc-qnx
exit ;; exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*) NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE} echo nse-tandem-nsk${UNAME_RELEASE}
exit ;; exit ;;
@ -1303,13 +1300,13 @@ EOF
echo pdp10-unknown-its echo pdp10-unknown-its
exit ;; exit ;;
SEI:*:*:SEIUX) SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE} echo mips-sei-seiux${UNAME_RELEASE}
exit ;; exit ;;
*:DragonFly:*:*) *:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;; exit ;;
*:*VMS:*:*) *:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null` UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;; A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;;
@ -1324,6 +1321,9 @@ EOF
i*86:rdos:*:*) i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos echo ${UNAME_MACHINE}-pc-rdos
exit ;; exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
esac esac
#echo '(No uname command or uname output not recognized.)' 1>&2 #echo '(No uname command or uname output not recognized.)' 1>&2
@ -1346,11 +1346,11 @@ main ()
#include <sys/param.h> #include <sys/param.h>
printf ("m68k-sony-newsos%s\n", printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4 #ifdef NEWSOS4
"4" "4"
#else #else
"" ""
#endif #endif
); exit (0); ); exit (0);
#endif #endif
#endif #endif

213
libratbox/config.sub vendored
View File

@ -1,10 +1,10 @@
#! /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, 2003, 2004, 2005, 2006, 2007, 2008 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# Free Software Foundation, Inc. # 2011 Free Software Foundation, Inc.
timestamp='2008-01-16' timestamp='2011-02-02'
# 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
@ -32,13 +32,16 @@ timestamp='2008-01-16'
# 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 GNU ChangeLog entry.
# #
# Configuration subroutine to validate and canonicalize a configuration type. # Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument. # Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1. # If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed. # Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages # This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases # and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software. # that are meaningful with *any* GNU software.
@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -120,8 +124,10 @@ 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* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*) 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/'`
@ -148,10 +154,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray) -apple | -axis | -knuth | -cray | -microblaze)
os= os=
basic_machine=$1 basic_machine=$1
;; ;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond) -sim | -cisco | -oki | -wec | -winbond)
os= os=
basic_machine=$1 basic_machine=$1
@ -166,10 +175,10 @@ case $os in
os=-chorusos os=-chorusos
basic_machine=$1 basic_machine=$1
;; ;;
-chorusrdb) -chorusrdb)
os=-chorusrdb os=-chorusrdb
basic_machine=$1 basic_machine=$1
;; ;;
-hiux*) -hiux*)
os=-hiuxwe2 os=-hiuxwe2
;; ;;
@ -244,18 +253,21 @@ case $basic_machine in
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \ | bfin \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx | dvp \
| fido | fr30 | frv \ | fido | 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 \ | ip2k | iq2000 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep \ | maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \ | mips16 \
| mips64 | mips64el \ | mips64 | mips64el \
| mips64vr | mips64vrel \ | mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \ | mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \ | mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \ | mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \ | mips64vr5000 | mips64vr5000el \
@ -268,28 +280,41 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \ | mipstx39 | mipstx39el \
| mn10200 | mn10300 \ | mn10200 | mn10300 \
| moxie \
| mt \ | mt \
| msp430 \ | msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \ | nios | nios2 \
| ns16k | ns32k \ | ns16k | ns32k \
| or32 \ | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \ | pyramid \
| rx \
| score \ | score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \ | sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \ | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e \ | v850 | v850e \
| we32k \ | we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k) | z8k | z80)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
m6811 | m68hc11 | m6812 | m68hc12) c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12. # Motorola 68HC11/12.
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
os=-none os=-none
@ -320,7 +345,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \ | avr-* | avr32-* \
| bfin-* | bs2000-* \ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
@ -329,14 +354,17 @@ case $basic_machine in
| 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-* \ | ip2k-* | iq2000-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \ | mips16-* \
| mips64-* | mips64el-* \ | mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \ | mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \ | mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \ | mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \ | mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \ | mips64vr5000-* | mips64vr5000el-* \
@ -351,27 +379,30 @@ case $basic_machine in
| mmix-* \ | mmix-* \
| mt-* \ | mt-* \
| msp430-* \ | msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | 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-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \ | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \ | tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tron-* \ | tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \ | xstormy16-* | xtensa*-* \
| ymp-* \ | ymp-* \
| z8k-*) | z8k-* | z80-*)
;; ;;
# Recognize the basic CPU types without company name, with glob match. # Recognize the basic CPU types without company name, with glob match.
xtensa*) xtensa*)
@ -393,7 +424,7 @@ case $basic_machine in
basic_machine=a29k-amd basic_machine=a29k-amd
os=-udi os=-udi
;; ;;
abacus) abacus)
basic_machine=abacus-unknown basic_machine=abacus-unknown
;; ;;
adobe68k) adobe68k)
@ -439,6 +470,10 @@ case $basic_machine in
basic_machine=m68k-apollo basic_machine=m68k-apollo
os=-bsd os=-bsd
;; ;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux) aux)
basic_machine=m68k-apple basic_machine=m68k-apple
os=-aux os=-aux
@ -455,10 +490,27 @@ case $basic_machine in
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux os=-linux
;; ;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90) c90)
basic_machine=c90-cray basic_machine=c90-cray
os=-unicos os=-unicos
;; ;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1) convex-c1)
basic_machine=c1-convex basic_machine=c1-convex
os=-bsd os=-bsd
@ -487,7 +539,7 @@ case $basic_machine in
basic_machine=craynv-cray basic_machine=craynv-cray
os=-unicosmp os=-unicosmp
;; ;;
cr16) cr16 | cr16-*)
basic_machine=cr16-unknown basic_machine=cr16-unknown
os=-elf os=-elf
;; ;;
@ -526,6 +578,10 @@ case $basic_machine in
basic_machine=m88k-motorola basic_machine=m88k-motorola
os=-sysv3 os=-sysv3
;; ;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp) djgpp)
basic_machine=i586-pc basic_machine=i586-pc
os=-msdosdjgpp os=-msdosdjgpp
@ -699,6 +755,9 @@ case $basic_machine in
basic_machine=ns32k-utek basic_machine=ns32k-utek
os=-sysv os=-sysv
;; ;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32) mingw32)
basic_machine=i386-pc basic_machine=i386-pc
os=-mingw32 os=-mingw32
@ -714,6 +773,24 @@ case $basic_machine in
basic_machine=m68k-atari basic_machine=m68k-atari
os=-mint os=-mint
;; ;;
mipsEE* | ee | ps2)
basic_machine=mips64r5900el-scei
case $os in
-linux*)
;;
*)
os=-elf
;;
esac
;;
iop)
basic_machine=mipsel-scei
os=-irx
;;
dvp)
basic_machine=dvp-scei
os=-elf
;;
mips3*-*) mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;; ;;
@ -803,6 +880,12 @@ case $basic_machine in
np1) np1)
basic_machine=np1-gould basic_machine=np1-gould
;; ;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem) nsr-tandem)
basic_machine=nsr-tandem basic_machine=nsr-tandem
;; ;;
@ -1037,17 +1120,10 @@ case $basic_machine in
basic_machine=t90-cray basic_machine=t90-cray
os=-unicos os=-unicos
;; ;;
tic54x | c54x*) # This must be matched before tile*.
basic_machine=tic54x-unknown tilegx*)
os=-coff basic_machine=tilegx-unknown
;; os=-linux-gnu
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;; ;;
tile*) tile*)
basic_machine=tile-unknown basic_machine=tile-unknown
@ -1128,6 +1204,10 @@ case $basic_machine in
basic_machine=z8k-unknown basic_machine=z8k-unknown
os=-sim os=-sim
;; ;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none) none)
basic_machine=none-none basic_machine=none-none
os=-none os=-none
@ -1166,7 +1246,7 @@ case $basic_machine in
we32k) we32k)
basic_machine=we32k-att basic_machine=we32k-att
;; ;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown basic_machine=sh-unknown
;; ;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@ -1213,9 +1293,12 @@ esac
if [ x"$os" != x"" ] if [ x"$os" != x"" ]
then then
case $os in case $os in
# First match some system type aliases # First match some system type aliases
# that might get confused with valid system types. # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception. # -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*) -solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'` os=`echo $os | sed -e 's|solaris1|sunos4|'`
;; ;;
@ -1236,10 +1319,11 @@ case $os in
# Each alternative MUST END IN A *, to match a version number. # Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4. # -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \ | -aos* | -aros* \
| -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* | -knetbsd* | -mirbsd* | -netbsd* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@ -1248,17 +1332,18 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -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* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -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* | -irx* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@ -1297,7 +1382,7 @@ case $os in
-opened*) -opened*)
os=-openedition os=-openedition
;; ;;
-os400*) -os400*)
os=-os400 os=-os400
;; ;;
-wince*) -wince*)
@ -1346,7 +1431,7 @@ case $os in
-sinix*) -sinix*)
os=-sysv4 os=-sysv4
;; ;;
-tpf*) -tpf*)
os=-tpf os=-tpf
;; ;;
-triton*) -triton*)
@ -1388,6 +1473,11 @@ case $os in
-zvmoe) -zvmoe)
os=-zvmoe os=-zvmoe
;; ;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none) -none)
;; ;;
*) *)
@ -1410,10 +1500,10 @@ else
# system, and we'll never get to this point. # system, and we'll never get to this point.
case $basic_machine in case $basic_machine in
score-*) score-*)
os=-elf os=-elf
;; ;;
spu-*) spu-*)
os=-elf os=-elf
;; ;;
*-acorn) *-acorn)
@ -1425,8 +1515,17 @@ case $basic_machine in
arm*-semi) arm*-semi)
os=-aout os=-aout
;; ;;
c4x-* | tic4x-*) c4x-* | tic4x-*)
os=-coff os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;; ;;
# This must come before the *-dec entry. # This must come before the *-dec entry.
pdp10-*) pdp10-*)
@ -1453,7 +1552,7 @@ case $basic_machine in
m68*-cisco) m68*-cisco)
os=-aout os=-aout
;; ;;
mep-*) mep-*)
os=-elf os=-elf
;; ;;
mips*-cisco) mips*-cisco)
@ -1480,7 +1579,7 @@ case $basic_machine in
*-ibm) *-ibm)
os=-aix os=-aix
;; ;;
*-knuth) *-knuth)
os=-mmixware os=-mmixware
;; ;;
*-wec) *-wec)
@ -1585,7 +1684,7 @@ case $basic_machine in
-sunos*) -sunos*)
vendor=sun vendor=sun
;; ;;
-aix*) -cnk*|-aix*)
vendor=ibm vendor=ibm
;; ;;
-beos*) -beos*)

2366
libratbox/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2004-04-25.13 scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -16,9 +17,7 @@ scriptversion=2004-04-25.13
# GNU General Public License for more details. # GNU General Public License for more details.
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -43,17 +42,18 @@ Environment variables:
depmode Dependency tracking mode. depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'. source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output. depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies. tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no). libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>. Report bugs to <bug-automake@gnu.org>.
EOF EOF
exit 0 exit $?
;; ;;
-v | --v*) -v | --v*)
echo "depcomp $scriptversion" echo "depcomp $scriptversion"
exit 0 exit $?
;; ;;
esac esac
@ -61,18 +61,10 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2 echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1 exit 1
fi fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
@ -93,12 +85,34 @@ if test "$depmode" = dashXmstdout; then
depmode=dashmstdout depmode=dashmstdout
fi fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in case "$depmode" in
gcc3) gcc3)
## gcc 3 implements dependency tracking that does exactly what ## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm. ## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile" ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$? stat=$?
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
@ -185,14 +199,14 @@ sgi)
' < "$tmpdepfile" \ ' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr ' tr '
' ' ' >> $depfile ' ' ' >> "$depfile"
echo >> $depfile echo >> "$depfile"
# The second pass generates a dummy entry for each header file. # The second pass generates a dummy entry for each header file.
tr ' ' ' tr ' ' '
' < "$tmpdepfile" \ ' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile >> "$depfile"
else else
# The sourcefile does not contain any dependencies, so just # The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile # store a dummy comment line, to avoid errors with the Makefile
@ -208,34 +222,39 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the # current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information. # start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases. # Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
tmpdepfile="$stripped.u" test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M "$@" -Wc,-M
else else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M "$@" -M
fi fi
stat=$? stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
rm -f "$tmpdepfile" rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat exit $stat
fi fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'. # Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to # Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'. # `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" # That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else else
# The sourcefile does not contain any dependencies, so just # The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile # store a dummy comment line, to avoid errors with the Makefile
@ -283,6 +302,51 @@ icc)
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64) tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side # The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@ -294,33 +358,43 @@ tru64)
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then if test "$libtool" = yes; then
# Dependencies are output in .lo.d with libtool 1.4. # With Tru64 cc, shared objects can also be used to make a
# They are output in .o.d with libtool 1.5. # static library. This mechanism is used in libtool 1.4 series to
tmpdepfile1="$dir.libs/$base.lo.d" # handle both shared and static libraries in a single compilation.
tmpdepfile2="$dir.libs/$base.o.d" # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
tmpdepfile3="$dir.libs/$base.d" #
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD "$@" -Wc,-MD
else else
tmpdepfile1="$dir$base.o.d" tmpdepfile1=$dir$base.o.d
tmpdepfile2="$dir$base.d" tmpdepfile2=$dir$base.d
tmpdepfile3="$dir$base.d" tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD "$@" -MD
fi fi
stat=$? stat=$?
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat exit $stat
fi fi
if test -f "$tmpdepfile1"; then for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
tmpdepfile="$tmpdepfile1" do
elif test -f "$tmpdepfile2"; then test -f "$tmpdepfile" && break
tmpdepfile="$tmpdepfile2" done
else
tmpdepfile="$tmpdepfile3"
fi
if test -f "$tmpdepfile"; then if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the []. # That's a tab and a space in the [].
@ -342,7 +416,7 @@ dashmstdout)
# Remove the call to Libtool. # Remove the call to Libtool.
if test "$libtool" = yes; then if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do while test "X$1" != 'X--mode=compile'; do
shift shift
done done
shift shift
@ -393,32 +467,39 @@ makedepend)
"$@" || exit $? "$@" || exit $?
# Remove any Libtool call # Remove any Libtool call
if test "$libtool" = yes; then if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do while test "X$1" != 'X--mode=compile'; do
shift shift
done done
shift shift
fi fi
# X makedepend # X makedepend
shift shift
cleared=no cleared=no eat=no
for arg in "$@"; do for arg
do
case $cleared in case $cleared in
no) no)
set ""; shift set ""; shift
cleared=yes ;; cleared=yes ;;
esac esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in case "$arg" in
-D*|-I*) -D*|-I*)
set fnord "$@" "$arg"; shift ;; set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove # Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file. # the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object) -*|$object)
;; ;;
*) *)
set fnord "$@" "$arg"; shift ;; set fnord "$@" "$arg"; shift ;;
esac esac
done done
obj_suffix="`echo $object | sed 's/^.*\././'`" obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile" touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile" rm -f "$depfile"
@ -438,7 +519,7 @@ cpp)
# Remove the call to Libtool. # Remove the call to Libtool.
if test "$libtool" = yes; then if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do while test "X$1" != 'X--mode=compile'; do
shift shift
done done
shift shift
@ -464,7 +545,8 @@ cpp)
done done
"$@" -E | "$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile" sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile" rm -f "$depfile"
echo "$object : \\" > "$depfile" echo "$object : \\" > "$depfile"
@ -475,13 +557,27 @@ cpp)
msvisualcpp) msvisualcpp)
# Important note: in order to support this mode, a compiler *must* # Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o, # always write the preprocessed file to stdout.
# because we must use -o when running libtool.
"$@" || exit $? "$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" " IFS=" "
for arg for arg
do do
case "$arg" in case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@" set fnord "$@"
shift shift
@ -494,16 +590,23 @@ msvisualcpp)
;; ;;
esac esac
done done
"$@" -E | "$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile" rm -f "$depfile"
echo "$object : \\" > "$depfile" echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile" echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none) none)
exec "$@" exec "$@"
;; ;;
@ -522,5 +625,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$" # time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: # End:

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2004-04-01.17 scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -39,120 +39,157 @@ scriptversion=2004-04-01.17
# when there is no Makefile. # when there is no Makefile.
# #
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction # from scratch.
# shared with many OS's install programs.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script # set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it. # Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}" doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# put in absolute paths if you don't have them in your path; or use env. vars. # Put in absolute file names if you don't have them in your path;
# or use environment vars.
mvprog="${MVPROG-mv}" chgrpprog=${CHGRPPROG-chgrp}
cpprog="${CPPROG-cp}" chmodprog=${CHMODPROG-chmod}
chmodprog="${CHMODPROG-chmod}" chownprog=${CHOWNPROG-chown}
chownprog="${CHOWNPROG-chown}" cmpprog=${CMPPROG-cmp}
chgrpprog="${CHGRPPROG-chgrp}" cpprog=${CPPROG-cp}
stripprog="${STRIPPROG-strip}" mkdirprog=${MKDIRPROG-mkdir}
rmprog="${RMPROG-rm}" mvprog=${MVPROG-mv}
mkdirprog="${MKDIRPROG-mkdir}" rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
transformbasename=
transform_arg=
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd= chgrpcmd=
stripcmd= chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f" rmcmd="$rmprog -f"
mvcmd="$mvprog" stripcmd=
src= src=
dst= dst=
dir_arg= dir_arg=
dst_arg=
usage="Usage: $0 [OPTION]... SRCFILE DSTFILE copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 -d DIRECTORIES... or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the 1st form, copy SRCFILE to DSTFILE.
In the second, create the directory path DIR. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options: Options:
-b=TRANSFORMBASENAME --help display this help and exit.
-c copy source (using $cpprog) instead of moving (using $mvprog). --version display version info and exit.
-d create directories instead of installing files.
-g GROUP $chgrp installed files to GROUP. -c (ignored)
-m MODE $chmod installed files to MODE. -C install only if different (preserve the last data modification time)
-o USER $chown installed files to USER. -d create directories instead of installing files.
-s strip installed files (using $stripprog). -g GROUP $chgrpprog installed files to GROUP.
-t=TRANSFORM -m MODE $chmodprog installed files to MODE.
--help display this help and exit. -o USER $chownprog installed files to USER.
--version display version info and exit. -s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
" "
while test -n "$1"; do while test $# -ne 0; do
case $1 in case $1 in
-b=*) transformbasename=`echo $1 | sed 's/-b=//'` -c) ;;
shift
continue;;
-c) instcmd=$cpprog -C) copy_on_change=true;;
shift
continue;;
-d) dir_arg=true -d) dir_arg=true;;
shift
continue;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift shift;;
shift
continue;;
--help) echo "$usage"; exit 0;; --help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2" -m) mode=$2
shift case $mode in
shift *' '* | *' '* | *'
continue;; '* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift shift;;
shift
continue;;
-s) stripcmd=$stripprog -s) stripcmd=$stripprog;;
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'` -t) dst_arg=$2
shift shift;;
continue;;
--version) echo "$0 $scriptversion"; exit 0;; -T) no_target_directory=true;;
*) # When -d is used, all remaining arguments are directories to create. --version) echo "$0 $scriptversion"; exit $?;;
test -n "$dir_arg" && break
# Otherwise, the last argument is the destination. Remove it from $@. --) shift
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;; break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac esac
shift
done done
if test -z "$1"; then if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2 echo "$0: no input file specified." >&2
exit 1 exit 1
@ -162,25 +199,48 @@ if test -z "$1"; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src for src
do do
# Protect names starting with `-'. # Protect names starting with `-'.
case $src in case $src in
-*) src=./$src ;; -*) src=./$src;;
esac esac
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
dst=$src dst=$src
src= dstdir=$dst
test -d "$dstdir"
if test -d "$dst"; then dstdir_status=$?
instcmd=:
chmodcmd=
else
instcmd=$mkdirprog
fi
else else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad # might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'. # if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then if test ! -f "$src" && test ! -d "$src"; then
@ -188,138 +248,273 @@ do
exit 1 exit 1
fi fi
if test -z "$dstarg"; then if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2 echo "$0: no destination specified." >&2
exit 1 exit 1
fi fi
dst=$dstarg dst=$dst_arg
# Protect names starting with `-'. # Protect names starting with `-'.
case $dst in case $dst in
-*) dst=./$dst ;; -*) dst=./$dst;;
esac esac
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored. # if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
dst=$dst/`basename "$src"` if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi fi
fi fi
# This sed command emulates the dirname command. obsolete_mkdir_used=false
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists. if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
# Skip lots of stat calls in the usual case. *[0-7])
if test ! -d "$dstdir"; then mkdir_umask=`expr $umask + 22 \
defaultIFS=' - $umask % 100 % 40 + $umask % 20 \
' - $umask % 10 % 4 + $umask % 2
IFS="${IFS-$defaultIFS}" `;;
*) mkdir_umask=$umask,go-w;;
esac
oIFS=$IFS # With -d, create the new directory with the user-specified mode.
# Some sh's can't handle IFS=/ for some reason. # Otherwise, rely on $mkdir_umask.
IFS='%' if test -n "$dir_arg"; then
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` mkdir_mode=-m$mode
IFS=$oIFS else
mkdir_mode=
fi
pathcomp= posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
while test $# -ne 0 ; do if (umask $mkdir_umask &&
pathcomp=$pathcomp$1 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift shift
if test ! -d "$pathcomp"; then $posix_glob set +f
$mkdirprog "$pathcomp" || lasterr=$? IFS=$oIFS
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This prefixes=
# is OK.
test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi fi
pathcomp=$pathcomp/ fi
done
fi fi
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
$doit $instcmd "$dst" \ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else else
# If we're going to rename the final executable, determine the name now.
if test -z "$transformarg"; then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename \
| sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename.
test -z "$dstfile" && dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_ rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name # Copy the file name to the temp name.
$doit $instcmd "$src" "$dsttmp" && (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
# If any of these fail, we abort the whole thing. If we want to # If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore # ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command. # errors from the above "$doit $cpprog $src $dsttmp" command.
# #
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination. # If -C, don't bother to copy if it wouldn't change the file.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ if $copy_on_change &&
|| { old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
# The rename failed, perhaps because mv can't rename something else new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location. eval "$initialize_posix_glob" &&
# We try this two ways since rm can't unlink itself on some $posix_glob set -f &&
# systems and the destination file might be busy for other set X $old && old=:$2:$4:$5:$6 &&
# reasons. In this case, the final cleanup might fail but the new set X $new && new=:$2:$4:$5:$6 &&
# file should still install successfully. $posix_glob set +f &&
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination. test "$old" = "$new" &&
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile" $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
} then
} rm -f "$dsttmp"
fi || { (exit 1); exit; } else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$" # time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: # End:

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# Common stub for a few missing GNU programs while installing. # Common stub for a few missing GNU programs while installing.
scriptversion=2003-09-02.23 scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# Free Software Foundation, Inc. # 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -18,9 +18,7 @@ scriptversion=2003-09-02.23
# GNU General Public License for more details. # GNU General Public License for more details.
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -33,6 +31,8 @@ if test $# -eq 0; then
fi fi
run=: run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the # In the cases where this matters, `missing' is being run in the
# srcdir already. # srcdir already.
@ -44,7 +44,7 @@ fi
msg="missing on your system" msg="missing on your system"
case "$1" in case $1 in
--run) --run)
# Try to run requested program, and just exit if it succeeds. # Try to run requested program, and just exit if it succeeds.
run= run=
@ -60,11 +60,6 @@ case "$1" in
msg="probably too old" msg="probably too old"
fi fi
;; ;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help) -h|--h|--he|--hel|--help)
echo "\ echo "\
@ -82,6 +77,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4' aclocal touch file \`aclocal.m4'
autoconf touch file \`configure' autoconf touch file \`configure'
autoheader touch file \`config.h.in' autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch] bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c flex create \`lex.yy.c', if possible, from existing .c
@ -91,11 +87,16 @@ Supported PROGRAM values:
tar try tar, gnutar, gtar, then tar without non-portable flags tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch] yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>." Send bug reports to <bug-automake@gnu.org>."
exit $?
;; ;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version) -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)" echo "missing $scriptversion (GNU Automake)"
exit $?
;; ;;
-*) -*)
@ -104,12 +105,49 @@ Send bug reports to <bug-automake@gnu.org>."
exit 1 exit 1
;; ;;
aclocal*) esac
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed. # We have it, but it failed.
exit 1 exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $program in
aclocal*)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want you modified \`acinclude.m4' or \`${configure_ac}'. You might want
@ -118,12 +156,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch aclocal.m4 touch aclocal.m4
;; ;;
autoconf) autoconf*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the you modified \`${configure_ac}'. You might want to install the
@ -132,12 +165,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch configure touch configure
;; ;;
autoheader) autoheader*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want you modified \`acconfig.h' or \`${configure_ac}'. You might want
@ -147,7 +175,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h" test -z "$files" && files="config.h"
touch_files= touch_files=
for f in $files; do for f in $files; do
case "$f" in case $f in
*:*) touch_files="$touch_files "`echo "$f" | *:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;; sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";; *) touch_files="$touch_files $f.in";;
@ -157,11 +185,6 @@ WARNING: \`$1' is $msg. You should only need it if
;; ;;
automake*) automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
@ -172,12 +195,7 @@ WARNING: \`$1' is $msg. You should only need it if
while read f; do touch "$f"; done while read f; do touch "$f"; done
;; ;;
autom4te) autom4te*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg. WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the You might have modified some files without having the
@ -185,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU You can get \`$1' as part of \`Autoconf' from any GNU
archive site." archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then if test -f "$file"; then
touch $file touch $file
else else
@ -200,90 +218,78 @@ WARNING: \`$1' is needed, but is $msg.
fi fi
;; ;;
bison|yacc) bison*|yacc*)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site." \`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then if test $# -ne 1; then
eval LASTARG="\${$#}" eval LASTARG="\${$#}"
case "$LASTARG" in case $LASTARG in
*.y) *.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c cp "$SRCFILE" y.tab.c
fi fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h cp "$SRCFILE" y.tab.h
fi fi
;; ;;
esac esac
fi fi
if [ ! -f y.tab.h ]; then if test ! -f y.tab.h; then
echo >y.tab.h echo >y.tab.h
fi fi
if [ ! -f y.tab.c ]; then if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c echo 'main() { return 0; }' >y.tab.c
fi fi
;; ;;
lex|flex) lex*|flex*)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site." \`Flex' from any GNU archive site."
rm -f lex.yy.c rm -f lex.yy.c
if [ $# -ne 1 ]; then if test $# -ne 1; then
eval LASTARG="\${$#}" eval LASTARG="\${$#}"
case "$LASTARG" in case $LASTARG in
*.l) *.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c cp "$SRCFILE" lex.yy.c
fi fi
;; ;;
esac esac
fi fi
if [ ! -f lex.yy.c ]; then if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c echo 'main() { return 0; }' >lex.yy.c
fi fi
;; ;;
help2man) help2man*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take \`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site." effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` file=`echo "$*" | sed -n "$sed_output"`
if test -z "$file"; then test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` if test -f "$file"; then
fi
if [ -f "$file" ]; then
touch $file touch $file
else else
test -z "$file" || exec >$file test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page" echo ".ab help2man is required to generate this page"
exit 1 exit $?
fi fi
;; ;;
makeinfo) makeinfo*)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file you modified a \`.texi' or \`.texinfo' file, or any other file
@ -291,20 +297,29 @@ WARNING: \`$1' is $msg. You should only need it if
call might also be the consequence of using a buggy \`make' (AIX, call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site." the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` # ... or it is the one specified with @setfilename ...
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file touch $file
;; ;;
tar) tar*)
shift shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part. # We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error # Look for gnutar/gtar before invocation to avoid ugly error
@ -317,13 +332,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi fi
firstarg="$1" firstarg="$1"
if shift; then if shift; then
case "$firstarg" in case $firstarg in
*o*) *o*)
firstarg=`echo "$firstarg" | sed s/o//` firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0 tar "$firstarg" "$@" && exit 0
;; ;;
esac esac
case "$firstarg" in case $firstarg in
*h*) *h*)
firstarg=`echo "$firstarg" | sed s/h//` firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0 tar "$firstarg" "$@" && exit 0
@ -356,5 +371,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$" # time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: # End:

View File

@ -113,10 +113,10 @@ CFLAGS = @CFLAGS@
CP = @CP@ CP = @CP@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CRYPT_LIB = @CRYPT_LIB@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
@ -144,6 +144,7 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
MV = @MV@ MV = @MV@
NM = @NM@ NM = @NM@
@ -162,6 +163,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PICFLAGS = @PICFLAGS@ PICFLAGS = @PICFLAGS@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
RB_PREFIX = @RB_PREFIX@ RB_PREFIX = @RB_PREFIX@
RM = @RM@ RM = @RM@
@ -178,6 +181,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@ am__include = @am__include@
@ -210,7 +214,6 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff