mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-21 01:40:57 +08:00
syntax-check: fix violations and implement sc_prohibit_test_const_follows_var.
To safely use a non-literal first argument to `test', you must always prepend a literal non-`-' character, but often the second operand is a constant that doesn't begin with a `-' already, so always use `test a = "$b"' instead of noisy `test "X$b" = Xa'. * cfg.mk (sc_prohibit_test_const_follows_var): New syntax-check rule to ensure we don't reintroduce noisy test operands. * bootstrap, build-aux/extract-trace, build-aux/general.m4sh, build-aux/ltmain.m4sh, doc/libtool.texi, libtoolize.m4sh, m4/argz.m4, m4/libtool.m4, m4/ltdl.m4, tests/bindir.at, tests/defs.m4sh, tests/demo-relink.test, tests/demo/configure.ac, tests/depdemo-relink.test, tests/destdir.at, tests/duplicate_conv.at, tests/fail.at, tests/getopt-m4sh.at, tests/help.at, tests/libtoolize.at, tests/link-2.test, tests/link-order2.at, tests/lt_dlopenext.at, tests/mdemo/configure.ac, tests/mdemo2/configure.ac, tests/need_lib_prefix.at, tests/nocase.at, tests/pdemo/configure.ac, tests/pic_flag.at, tests/search-path.at, tests/shlibpath.at, tests/static.at, tests/sysroot.at, tests/tagtrace.test, tests/testsuite.at, tests/with-pic.at: Swap operands to avoid useless noise. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
parent
8fad6be03e
commit
962aa919f5
14
bootstrap
14
bootstrap
@ -5,7 +5,7 @@
|
||||
. `echo "$0" |${SED-sed} 's,[^/]*$,,'`"build-aux/extract-trace"
|
||||
|
||||
# Set a version string for *this* script.
|
||||
scriptversion=2011-11-15.06; # UTC
|
||||
scriptversion=2011-11-20.15; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
# Written by Gary V. Vaughan, 2010
|
||||
@ -1760,7 +1760,7 @@ func_ifcontains ()
|
||||
;;
|
||||
esac
|
||||
|
||||
test "$_G_status" -eq 0 || exit $_G_status
|
||||
test 0 -eq $_G_status || exit $_G_status
|
||||
}
|
||||
|
||||
|
||||
@ -1996,7 +1996,7 @@ func_show_eval ()
|
||||
${opt_dry_run-'false'} || {
|
||||
eval "$_G_cmd"
|
||||
_G_status=$?
|
||||
test "$_G_status" -eq 0 || eval "(exit $_G_status); $_G_fail_exp"
|
||||
test 0 -eq $_G_status || eval "(exit $_G_status); $_G_fail_exp"
|
||||
}
|
||||
}
|
||||
|
||||
@ -2142,7 +2142,7 @@ func_get_version ()
|
||||
func_tool_version_output $_G_app >/dev/null
|
||||
_G_status=$?
|
||||
|
||||
test "$_G_status" -ne 0 \
|
||||
test 0 -ne $_G_status \
|
||||
|| $_G_app --version 2>&1 |$SED -n "$sed_get_version"
|
||||
|
||||
(exit $_G_status)
|
||||
@ -2164,7 +2164,7 @@ func_check_versions ()
|
||||
|
||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||
_G_appvar=`echo $_G_app |tr '[a-z]' '[A-Z]'`
|
||||
test "$_G_appvar" = TAR && _G_appvar=AMTAR
|
||||
test TAR = "$_G_appvar" && _G_appvar=AMTAR
|
||||
eval "_G_app=\${$_G_appvar-$_G_app}"
|
||||
_G_instver=`func_get_version $_G_app`
|
||||
|
||||
@ -2177,7 +2177,7 @@ func_check_versions ()
|
||||
func_check_versions_result=false
|
||||
|
||||
# Fail if a new version than what we have is required.
|
||||
elif test "$_G_reqver" != "-"; then
|
||||
elif test "$_G_reqver" != -; then
|
||||
_G_newer=`func_sort_ver $_G_reqver $_G_instver |cut -d' ' -f2`
|
||||
test "$_G_newer" != "$_G_instver" && {
|
||||
func_error "\
|
||||
@ -2244,7 +2244,7 @@ func_update_po_files ()
|
||||
func_find_tool SHA1SUM sha1sum gsha1sum shasum
|
||||
|
||||
_G_langs=`cd $_G_ref_po_dir && echo *.po|$SED 's|\.po||g'`
|
||||
test "$_G_langs" = '*' && _G_langs=x
|
||||
test '*' = "$_G_langs" && _G_langs=x
|
||||
for _G_po in $_G_langs; do
|
||||
case $_G_po in x) continue;; esac
|
||||
_G_new_po=$_G_ref_po_dir/$_G_po.po
|
||||
|
@ -4,7 +4,7 @@
|
||||
test -n "$progpath" || . `echo "$0" |${SED-sed} 's,[^/]*$,,'`/options-parser
|
||||
|
||||
# Set a version string.
|
||||
scriptversion=2011-11-04.09; # UTC
|
||||
scriptversion=2011-11-20.15; # UTC
|
||||
|
||||
# Extract macro arguments from autotools input with GNU M4.
|
||||
# Written by Gary V. Vaughan, 2010
|
||||
@ -86,7 +86,7 @@ func_autoconf_configure ()
|
||||
test -n "$_G_ac_init"
|
||||
_G_status=$?
|
||||
|
||||
test "$_G_status" -ne 0 \
|
||||
test 0 -ne $_G_status \
|
||||
&& func_verbose "\`$1' not using Autoconf"
|
||||
|
||||
(exit $_G_status)
|
||||
@ -161,7 +161,7 @@ func_tool_version_output ()
|
||||
{ $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
|
||||
_G_status=$?
|
||||
|
||||
test "$_G_status" -ne 0 && test -n "$_G_fatal_error_msg" \
|
||||
test 0 -ne $_G_status && test -n "$_G_fatal_error_msg" \
|
||||
&& func_fatal_error "$_G_fatal_error_msg"
|
||||
|
||||
(exit $_G_status)
|
||||
|
@ -189,7 +189,7 @@ func_normal_abspath ()
|
||||
-e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
|
||||
while :; do
|
||||
# Processed it all yet?
|
||||
if test "$func_normal_abspath_tpath" = / ; then
|
||||
if test / = "$func_normal_abspath_tpath"; then
|
||||
# If we ascended to the root using ".." the result may be empty now.
|
||||
if test -z "$func_normal_abspath_result" ; then
|
||||
func_normal_abspath_result=/
|
||||
@ -252,7 +252,7 @@ func_relative_path ()
|
||||
*)
|
||||
func_dirname $func_relative_path_tlibdir
|
||||
func_relative_path_tlibdir=$func_dirname_result
|
||||
if test "x$func_relative_path_tlibdir" = x ; then
|
||||
if test -z "$func_relative_path_tlibdir"; then
|
||||
# Have to descend all the way to the root!
|
||||
func_relative_path_result=../$func_relative_path_result
|
||||
func_relative_path_tcancelled=$func_relative_path_tbindir
|
||||
@ -267,12 +267,12 @@ func_relative_path ()
|
||||
func_stripname '' '/' "$func_relative_path_result"
|
||||
func_relative_path_result=$func_stripname_result
|
||||
func_stripname '/' '/' "$func_relative_path_tcancelled"
|
||||
if test "x$func_stripname_result" != x ; then
|
||||
if test -n "$func_stripname_result"; then
|
||||
func_relative_path_result=$func_relative_path_result/$func_stripname_result
|
||||
fi
|
||||
|
||||
# Normalisation. If bindir is libdir, return `.' else relative path.
|
||||
if test ! -z "$func_relative_path_result"; then
|
||||
if test -n "$func_relative_path_result"; then
|
||||
func_stripname './' '' "$func_relative_path_result"
|
||||
func_relative_path_result=$func_stripname_result
|
||||
fi
|
||||
@ -423,7 +423,7 @@ func_mkdir_p ()
|
||||
my_directory_path=$1
|
||||
my_dir_list=
|
||||
|
||||
if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
|
||||
if test -n "$my_directory_path" && test : != "$opt_dry_run"; then
|
||||
|
||||
# Protect directory names starting with `-'
|
||||
case $my_directory_path in
|
||||
@ -469,7 +469,7 @@ func_mktempdir ()
|
||||
{
|
||||
my_template=${TMPDIR-/tmp}/${1-$progname}
|
||||
|
||||
if test "$opt_dry_run" = ":"; then
|
||||
if test : = "$opt_dry_run"; then
|
||||
# Return a directory name, but don't create it in dry-run mode
|
||||
my_tmpdir=$my_template-$$
|
||||
else
|
||||
@ -570,7 +570,7 @@ func_show_eval ()
|
||||
if ${opt_dry_run-false}; then :; else
|
||||
eval "$my_cmd"
|
||||
my_status=$?
|
||||
if test "$my_status" -eq 0; then :; else
|
||||
if test 0 -eq $my_status; then :; else
|
||||
eval "(exit $my_status); $my_fail_exp"
|
||||
fi
|
||||
fi
|
||||
@ -596,7 +596,7 @@ func_show_eval_locale ()
|
||||
$my_cmd"
|
||||
my_status=$?
|
||||
eval "$lt_safe_locale"
|
||||
if test "$my_status" -eq 0; then :; else
|
||||
if test 0 -eq "$my_status"; then :; else
|
||||
eval "(exit $my_status); $my_fail_exp"
|
||||
fi
|
||||
fi
|
||||
|
File diff suppressed because it is too large
Load Diff
12
cfg.mk
12
cfg.mk
@ -157,6 +157,18 @@ sc_prohibit_test_unary_operators:
|
||||
halt="use \`if test -X' instead of \`if -X'" \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Don't add noisy characters on the front of the left operand of a test
|
||||
# to prevent arguments being passed inadvertently (e.g. LHS is `-z'),
|
||||
# when the other operand is a constant -- just swap them, and remove the
|
||||
# spurious leading `x'.
|
||||
sc_prohibit_test_const_follows_var:
|
||||
@var='[ ]+"[^$$"]*\$$[0-9A-Za-z_][^"]*"' \
|
||||
op='[ ]+(!?=|-[lgn][et]|-eq)' \
|
||||
const='[ ]+[^-$$][^$$; ]*' \
|
||||
prohibit='test'$$var$$op$$const'[ ]*(&&|\|\||;|\\?$$)' \
|
||||
halt='use `test a = "$$b"'\'' instead of `test "x$$b" = xa'\' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Check for opening brace on next line in shell function definition.
|
||||
exclude_file_name_regexp--sc_require_function_nl_brace = (^HACKING|\.[ch])$$
|
||||
sc_require_function_nl_brace:
|
||||
|
@ -114,7 +114,7 @@ AC_SUBST([pkgdatadir], ["\$(datadir)/$PACKAGE"])
|
||||
|
||||
AC_ARG_ENABLE(ltdl-install,
|
||||
[AS_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
|
||||
if test "x${enable_ltdl_install+set}" != xset; then
|
||||
if test set != "${enable_ltdl_install+set}"; then
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
|
||||
|
@ -4756,7 +4756,7 @@ LT_INIT([dlopen])
|
||||
LTDL_INIT
|
||||
|
||||
# The lt_dladvise_init symbol was added with libtool-2.2
|
||||
if test "x$with_included_ltdl" != "xyes"; then
|
||||
if test yes != "$with_included_ltdl"; then
|
||||
save_CFLAGS=$CFLAGS
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
CFLAGS="$CFLAGS $LTDLINCL"
|
||||
|
@ -366,7 +366,7 @@ func_serial ()
|
||||
my_filebase=$func_basename_result
|
||||
for my_file in `func_included_files "$my_filename"`; do
|
||||
if test -z "$my_macro_regex" ||
|
||||
test "$my_filename" = aclocal.m4 ||
|
||||
test aclocal.m4 = "$my_filename" ||
|
||||
test "X$my_macro_regex" = "X$my_filebase" ||
|
||||
func_grep '^AC_DEFUN(\@<:@'"$my_macro_regex" "$my_file"
|
||||
then
|
||||
@ -447,7 +447,7 @@ func_serial_update_check ()
|
||||
my_update_p=:
|
||||
|
||||
if test -f "$my_destfile"; then
|
||||
test "X$my_src_serial" = "X0" && {
|
||||
test 0 = "$my_src_serial" && {
|
||||
func_warning "no serial number on \`$my_srcfile', not copying."
|
||||
return
|
||||
}
|
||||
@ -490,9 +490,9 @@ func_aclocal_update_check ()
|
||||
|
||||
# Strictly, this libtoolize ought not to have to deal with ancient
|
||||
# serial formats, but we accept them here to be complete:
|
||||
test "X$my_src_serial" = "X0" &&
|
||||
test 0 = "$my_src_serial" &&
|
||||
my_src_serial=`func_serial "$my_srcfile" 'A[CM]_PROG_LIBTOOL'`
|
||||
test "X$my_dest_serial" = "X0" &&
|
||||
test 0 = "$my_dest_serial" &&
|
||||
my_dest_serial=`func_serial "$my_destfile" 'A[CM]_PROG_LIBTOOL'`
|
||||
;;
|
||||
ltdl.m4)
|
||||
@ -541,10 +541,10 @@ func_serial_update ()
|
||||
|
||||
# Strictly, this libtoolize ought not to have to deal with ancient
|
||||
# serial formats, but we accept them here to be complete:
|
||||
test "X$my_src_serial" = "X0" &&
|
||||
test 0 = "$my_src_serial" &&
|
||||
my_src_serial=`func_serial "$my_srcfile" "$my_old_macro_regex"`
|
||||
|
||||
test "X$my_dest_serial" = "X0" &&
|
||||
test 0 = "$my_dest_serial" &&
|
||||
my_dest_serial=`func_serial "$my_destfile" "$my_old_macro_regex"`
|
||||
|
||||
func_serial_update_check \
|
||||
@ -1005,7 +1005,7 @@ func_check_macros ()
|
||||
func_echo "Remember to add \`LT_INIT' to $configure_ac."
|
||||
|
||||
# Suggest using LTDL_INIT if appropriate:
|
||||
$opt_ltdl && if test x$seen_ltdl != x:; then
|
||||
$opt_ltdl && if test : != "$seen_ltdl"; then
|
||||
case $ltdl_mode in
|
||||
subproject) ltdl_init_args= ;;
|
||||
*) ltdl_init_args="([$ltdl_mode])" ;;
|
||||
@ -1021,7 +1021,7 @@ func_check_macros ()
|
||||
# For nonrecursive mode, warn about continued use of Makefile.inc:
|
||||
# FIXME: Remove in 2013
|
||||
# (along with last minute rename in func_install_pkgltdl_files)
|
||||
if test "x$ltdl_mode" = "xnonrecursive"; then
|
||||
if test nonrecursive = "$ltdl_mode"; then
|
||||
if func_grep "^-\?include $ltdl_dir/Makefile.inc\$" Makefile.am;
|
||||
then
|
||||
func_error "Use of \`include $ltdl_dir/Makefile.inc' is deprecated!"
|
||||
@ -1031,7 +1031,7 @@ func_check_macros ()
|
||||
fi
|
||||
|
||||
# Suggest modern idioms for storing autoconf macros:
|
||||
$ac_config_macro_dir_advised || if test -z "$ac_macro_dir" || test "x$macro_dir" = x.; then
|
||||
$ac_config_macro_dir_advised || if test -z "$ac_macro_dir" || test . = "$macro_dir"; then
|
||||
func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([m4])' to $configure_ac and"
|
||||
func_echo "rerunning $progname, to keep the correct libtool macros in-tree."
|
||||
ac_config_macro_dir_advised=:
|
||||
@ -1086,7 +1086,7 @@ func_autoconf_configure ()
|
||||
test -n "$_G_ac_init"
|
||||
_G_status=$?
|
||||
|
||||
test "$_G_status" -ne 0 \
|
||||
test 0 -ne $_G_status \
|
||||
&& func_verbose "\`$1' not using Autoconf"
|
||||
|
||||
(exit $_G_status)
|
||||
|
14
m4/argz.m4
14
m4/argz.m4
@ -44,7 +44,7 @@ AS_IF([test -z "$ARGZ_H"],
|
||||
[[case $host_os in #(
|
||||
*cygwin*)
|
||||
lt_cv_sys_argz_works=no
|
||||
if test "$cross_compiling" != no; then
|
||||
if test no != "$cross_compiling"; then
|
||||
lt_cv_sys_argz_works="guessing no"
|
||||
else
|
||||
lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
|
||||
@ -55,18 +55,18 @@ AS_IF([test -z "$ARGZ_H"],
|
||||
lt_os_major=${2-0}
|
||||
lt_os_minor=${3-0}
|
||||
lt_os_micro=${4-0}
|
||||
if test "$lt_os_major" -gt 1 \
|
||||
|| { test "$lt_os_major" -eq 1 \
|
||||
&& { test "$lt_os_minor" -gt 5 \
|
||||
|| { test "$lt_os_minor" -eq 5 \
|
||||
&& test "$lt_os_micro" -gt 24; }; }; }; then
|
||||
if test 1 -le "$lt_os_major" \
|
||||
|| { test 1 -eq "$lt_os_major" \
|
||||
&& { test 5 -le "$lt_os_minor" \
|
||||
|| { test 5 -eq "$lt_os_minor" \
|
||||
&& test 24 -le "$lt_os_micro"; }; }; }; then
|
||||
lt_cv_sys_argz_works=yes
|
||||
fi
|
||||
fi
|
||||
;; #(
|
||||
*) lt_cv_sys_argz_works=yes ;;
|
||||
esac]])
|
||||
AS_IF([test "$lt_cv_sys_argz_works" = yes],
|
||||
AS_IF([test yes = "$lt_cv_sys_argz_works"],
|
||||
[AC_DEFINE([HAVE_WORKING_ARGZ], 1,
|
||||
[This value is set to 1 to indicate that the system argz facility works])],
|
||||
[ARGZ_H=argz.h
|
||||
|
322
m4/libtool.m4
vendored
322
m4/libtool.m4
vendored
File diff suppressed because it is too large
Load Diff
26
m4/ltdl.m4
26
m4/ltdl.m4
@ -151,13 +151,13 @@ m4_defun([_LTDL_INSTALLABLE],
|
||||
LDFLAGS="-L$prefix/lib $LDFLAGS"
|
||||
AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
|
||||
LDFLAGS=$lt_save_LDFLAGS
|
||||
if test "x${lt_lib_ltdl-no}" = xyes; then
|
||||
if test "x$enable_ltdl_install" != xyes; then
|
||||
if test yes = "${lt_lib_ltdl-no}"; then
|
||||
if test yes != "$enable_ltdl_install"; then
|
||||
# Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
|
||||
AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
|
||||
enable_ltdl_install=no
|
||||
fi
|
||||
elif test "x$enable_ltdl_install" = xno; then
|
||||
elif test no = "$enable_ltdl_install"; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
fi
|
||||
fi
|
||||
@ -243,7 +243,7 @@ AC_ARG_WITH([included_ltdl],
|
||||
[AS_HELP_STRING([--with-included-ltdl],
|
||||
[use the GNU ltdl sources included here])])
|
||||
|
||||
if test "x$with_included_ltdl" != xyes; then
|
||||
if test yes != "$with_included_ltdl"; then
|
||||
# We are not being forced to use the included libltdl sources, so
|
||||
# decide whether there is a useful installed version we can use.
|
||||
AC_CHECK_HEADER([ltdl.h],
|
||||
@ -433,8 +433,8 @@ case ,$enable_ltdl_install,$enable_ltdl_convenience in
|
||||
esac
|
||||
|
||||
m4_ifdef([AM_CONDITIONAL],
|
||||
[AM_CONDITIONAL(INSTALL_LTDL, test "x${enable_ltdl_install-no}" != xno)
|
||||
AM_CONDITIONAL(CONVENIENCE_LTDL, test "x${enable_ltdl_convenience-no}" != xno)])
|
||||
[AM_CONDITIONAL(INSTALL_LTDL, test no != "${enable_ltdl_install-no}")
|
||||
AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}")])
|
||||
])# _LT_ENABLE_INSTALL
|
||||
|
||||
|
||||
@ -532,7 +532,7 @@ AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
|
||||
;;
|
||||
esac
|
||||
])
|
||||
if test "$lt_cv_sys_dlopen_deplibs" != yes; then
|
||||
if test yes != "$lt_cv_sys_dlopen_deplibs"; then
|
||||
AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
|
||||
[Define if the OS needs help to load dependent libraries for dlopen().])
|
||||
fi
|
||||
@ -633,7 +633,7 @@ AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
|
||||
libltdl_cv_preloaded_symbols=no
|
||||
fi
|
||||
])
|
||||
if test "x$libltdl_cv_preloaded_symbols" = xyes; then
|
||||
if test yes = "$libltdl_cv_preloaded_symbols"; then
|
||||
AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
|
||||
[Define if libtool can extract symbol lists from object files.])
|
||||
fi
|
||||
@ -671,7 +671,7 @@ AC_SEARCH_LIBS([dlopen], [dl],
|
||||
[Define if you have the libdl library or equivalent.])
|
||||
LIBADD_DLOPEN=-lsvld libltdl_cv_func_dlopen=yes
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
|
||||
if test "x$libltdl_cv_func_dlopen" = xyes || test "x$libltdl_cv_lib_dl_dlopen" = xyes
|
||||
if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"
|
||||
then
|
||||
lt_save_LIBS=$LIBS
|
||||
LIBS="$LIBS $LIBADD_DLOPEN"
|
||||
@ -789,9 +789,9 @@ dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
|
||||
# --------------------
|
||||
AC_DEFUN([LT_FUNC_DLSYM_USCORE],
|
||||
[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
|
||||
if test "x$lt_cv_sys_symbol_underscore" = xyes; then
|
||||
if test "x$libltdl_cv_func_dlopen" = xyes ||
|
||||
test "x$libltdl_cv_lib_dl_dlopen" = xyes ; then
|
||||
if test yes = "$lt_cv_sys_symbol_underscore"; then
|
||||
if test yes = "$libltdl_cv_func_dlopen" ||
|
||||
test yes = "$libltdl_cv_lib_dl_dlopen" ; then
|
||||
AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
|
||||
[libltdl_cv_need_uscore],
|
||||
[libltdl_cv_need_uscore=unknown
|
||||
@ -805,7 +805,7 @@ if test "x$lt_cv_sys_symbol_underscore" = xyes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$libltdl_cv_need_uscore" = xyes; then
|
||||
if test yes = "$libltdl_cv_need_uscore"; then
|
||||
AC_DEFINE([NEED_USCORE], [1],
|
||||
[Define if dlsym() requires a leading underscore in symbol names.])
|
||||
fi
|
||||
|
@ -182,7 +182,7 @@ case $host_os in
|
||||
esac
|
||||
|
||||
eval "`$LIBTOOL --config | grep '^build_libtool_libs='`"
|
||||
AT_CHECK([test "$build_libtool_libs" = yes || exit 77])
|
||||
AT_CHECK([test yes = "$build_libtool_libs" || exit 77])
|
||||
|
||||
####
|
||||
# These routines save the PATH before a test and restore it after,
|
||||
|
@ -330,7 +330,7 @@ func_exec ()
|
||||
if eval $my_program $my_exp_output; then :
|
||||
else
|
||||
shift
|
||||
test "x$1" = x || shift
|
||||
test -z "$1" || shift
|
||||
func_error "$0: cannot execute $my_program ${1+$@}"
|
||||
|
||||
if test "$build" != "$host"; then
|
||||
|
@ -65,7 +65,7 @@ rm -f libhello.la "$objdir"/libhello.*
|
||||
func_msg "running demo/hell"
|
||||
if ./hell$EXEEXT; then
|
||||
:
|
||||
elif test "x,$hardcode_action,$hardcode_direct" = x,relink,yes; then
|
||||
elif test relink,yes = "$hardcode_action,$hardcode_direct"; then
|
||||
func_msg "Ok, uninstalled programs fail after uninstalled libraries are removed."
|
||||
func_msg "This works in other configurations, but not in this particular one."
|
||||
else
|
||||
@ -85,12 +85,12 @@ else
|
||||
func_msg "Failed, as expected"
|
||||
fi
|
||||
|
||||
if test "x$hardcode_action" = xrelink; then
|
||||
if test relink = "$hardcode_action"; then
|
||||
func_msg "Exiting: install-time relinking is required"
|
||||
exit $EXIT_SUCCESS
|
||||
fi
|
||||
|
||||
if test "$shlibpath_overrides_runpath" != yes; then
|
||||
if test yes != "$shlibpath_overrides_runpath"; then
|
||||
rm -f $objdir/lt-hell$EXEEXT || exit $EXIT_FAILURE
|
||||
cp $objdir/hell$EXEEXT $objdir/lt-hell$EXEEXT || exit $EXIT_FAILURE
|
||||
func_msg "running demo/hell with installed libhello.la"
|
||||
|
@ -51,13 +51,13 @@ LT_INIT([dlopen win32-dll])
|
||||
AC_SUBST([LIBTOOL_DEPS])
|
||||
|
||||
STATIC=
|
||||
test "X$enable_static" = Xyes && STATIC=-static
|
||||
test yes = "$enable_static" && STATIC=-static
|
||||
AC_SUBST([STATIC])
|
||||
|
||||
case $lt_cv_sys_global_symbol_pipe in
|
||||
?*) binary_helldl=yes ;;
|
||||
esac
|
||||
AM_CONDITIONAL([BINARY_HELLDL], [test "X$binary_helldl" = Xyes])
|
||||
AM_CONDITIONAL([BINARY_HELLDL], [test yes = "$binary_helldl"])
|
||||
|
||||
|
||||
## --------------------------- ##
|
||||
|
@ -80,7 +80,7 @@ if ./depdemo$EXEEXT ||
|
||||
# but it's definitely not enough of a reason for the test to fail.
|
||||
./depdemo$EXEEXT -alt; then
|
||||
:
|
||||
elif test "x,$hardcode_action,$hardcode_direct" = x,relink,yes; then
|
||||
elif test relink,yes = "$hardcode_action,$hardcode_direct"; then
|
||||
func_msg "Ok, uninstalled programs fail after uninstalled libraries are removed"
|
||||
func_msg "This works in other configurations, but not in this particular one"
|
||||
elif test "$build" != "$host"; then
|
||||
@ -107,12 +107,12 @@ else
|
||||
func_msg "Failed, as expected"
|
||||
fi
|
||||
|
||||
if test "x$hardcode_action" = xrelink; then
|
||||
if test relink = "$hardcode_action"; then
|
||||
func_msg "Exiting: install-time relinking is required"
|
||||
exit $EXIT_SUCCESS
|
||||
fi
|
||||
|
||||
if test "$shlibpath_overrides_runpath" != yes; then
|
||||
if test yes != "$shlibpath_overrides_runpath"; then
|
||||
rm -f $objdir/lt-depdemo || exit $EXIT_FAILURE
|
||||
cp $objdir/depdemo $objdir/lt-depdemo || exit $EXIT_FAILURE
|
||||
func_msg "running depdemo/depdemo with installed libl3.la"
|
||||
|
@ -127,7 +127,7 @@ done
|
||||
LT_AT_EXEC_CHECK([$bindir/m$EXEEXT])
|
||||
|
||||
# TODO: make this more portable:
|
||||
if test "$OBJDUMP" != false && ($OBJDUMP -p $bindir/m$EXEEXT) >/dev/null 2>&1; then
|
||||
if test false != "$OBJDUMP" && ($OBJDUMP -p $bindir/m$EXEEXT) >/dev/null 2>&1; then
|
||||
AT_CHECK([$OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i "R(UN)?PATH.*$DESTDIR"], [1])
|
||||
. $libdir/liba.la
|
||||
set x $library_names
|
||||
|
@ -77,7 +77,7 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT
|
||||
LT_AT_EXEC_CHECK([./main],[0],[ignore],[ignore])
|
||||
$LIBTOOL --mode=clean rm -f libcee.la
|
||||
|
||||
AT_CHECK([test "x$reload_cmds" = xfalse && exit 77], [1])
|
||||
AT_CHECK([test false = "$reload_cmds" && exit 77], [1])
|
||||
|
||||
# Test whether this works with reloadable objects as well.
|
||||
AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la],
|
||||
|
@ -102,8 +102,8 @@ case $build_libtool_libs in yes)
|
||||
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c.c
|
||||
(
|
||||
. ./c.lo
|
||||
test "$pic_object" != none && echo choke me >"$pic_object"
|
||||
test "$non_pic_object" != none && echo choke me >"$non_pic_object"
|
||||
test none = "$pic_object" || echo choke me >"$pic_object"
|
||||
test none = "$non_pic_object" || echo choke me >"$non_pic_object"
|
||||
)
|
||||
FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo])
|
||||
AT_CHECK([test -f liba.la], [1])
|
||||
|
@ -48,7 +48,7 @@ m4_pattern_forbid([m4_include])
|
||||
m4_pattern_forbid([AS_INIT])
|
||||
AT_CHECK([$M4SH --version || exit 77], [], [ignore], [ignore])
|
||||
AT_CHECK([$M4SH -B $abs_top_srcdir/build-aux options.m4sh > t-options],
|
||||
[], [], [], [AT_CHECK([test "$at_status" -eq 63 && exit 77])])
|
||||
[], [], [], [AT_CHECK([test 63 -eq "$at_status" && exit 77])])
|
||||
$SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
|
||||
])# _LT_AT_GETOPT_M4SH_SETUP
|
||||
|
||||
|
@ -121,7 +121,7 @@ AT_CHECK([case "$LIBTOOL $CC $CPPFLAGS $CFLAGS $LDFLAGS " in ]dnl
|
||||
|
||||
check_trace ()
|
||||
{
|
||||
if test "X$trace" = X--debug; then
|
||||
if test X--debug = "X$trace"; then
|
||||
AT_CHECK([grep 'enabling shell trace mode' stdout stderr], [0], [ignore])
|
||||
AT_CHECK([grep ' --mode' stderr], [0], [ignore])
|
||||
else
|
||||
@ -164,7 +164,7 @@ for trace in '' --debug; do
|
||||
AT_CHECK([$orig_LIBTOOL --mode=install $lt_INSTALL liba.la libb.la $libdir],
|
||||
[], [stdout], [stderr])
|
||||
if grep ': relinking ' stdout stderr; then
|
||||
if test "X$trace" = X--debug; then
|
||||
if test X--debug = "X$trace"; then
|
||||
AT_CHECK([grep ' --mode=relink' stdout stderr | grep ' --debug '],
|
||||
[0], [ignore])
|
||||
else
|
||||
|
@ -723,7 +723,7 @@ func_serial ()
|
||||
# in the file that AC_DEFUNs MACRO_REGEX.
|
||||
my_serial=
|
||||
if test -z "$my_macro_regex" ||
|
||||
test "$my_filename" = aclocal.m4 ||
|
||||
test aclocal.m4 = "$my_filename" ||
|
||||
test "$my_macro_regex" = `echo "$my_filename" | $SED "$basename"` ||
|
||||
func_grep '^AC_DEFUN(\@<:@'"$my_macro_regex" "$my_filename"
|
||||
then
|
||||
|
@ -38,7 +38,7 @@ res=$?
|
||||
|
||||
rm -f hell.lo
|
||||
|
||||
test "$res" -eq 0 || exit $EXIT_FAILURE
|
||||
test 0 -eq "$res" || exit $EXIT_FAILURE
|
||||
|
||||
echo "$linkresult"
|
||||
case $linkresult in
|
||||
|
@ -104,7 +104,7 @@ for type_of_depdepl in libtool non-libtool; do
|
||||
# Simulate a non-Libtool system library.
|
||||
rm $deflibdir/liba1.la
|
||||
addpath=$deflibdir
|
||||
if test "$shlibpath_var" = PATH; then
|
||||
if test PATH = "$shlibpath_var"; then
|
||||
addpath=$defbindir
|
||||
fi
|
||||
sep=
|
||||
@ -114,9 +114,9 @@ for type_of_depdepl in libtool non-libtool; do
|
||||
fi
|
||||
for static in '' -static-libtool-libs; do
|
||||
case `$LIBTOOL --features` in
|
||||
*disable\ static\ libraries*) test "$static" = '' || continue;;
|
||||
*disable\ static\ libraries*) test -z "$static" || continue;;
|
||||
esac
|
||||
test "$type_of_depdepl,$static" = "non-libtool,-static-libtool-libs" &&
|
||||
test non-libtool,-static-libtool-libs = "$type_of_depdepl,$static" &&
|
||||
static=-all-static
|
||||
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir
|
||||
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir
|
||||
|
@ -222,7 +222,7 @@ else
|
||||
have=with
|
||||
fi
|
||||
|
||||
if test "$shlibpath_var" = PATH; then
|
||||
if test PATH = "$shlibpath_var"; then
|
||||
$unset shlibpath_var || shlibpath_var=
|
||||
fi
|
||||
|
||||
|
@ -55,7 +55,7 @@ LT_INIT([dlopen win32-dll])
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
STATIC=
|
||||
test "X$enable_static" = Xyes && STATIC="-static"
|
||||
test yes = "$enable_static" && STATIC="-static"
|
||||
AC_SUBST([STATIC])
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ LT_INIT([dlopen])
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
STATIC=
|
||||
test "X$enable_static" = Xyes && STATIC="-static"
|
||||
test yes = "$enable_static" && STATIC="-static"
|
||||
AC_SUBST([STATIC])
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ LDFLAGS=$LDFLAGS
|
||||
eval "`$LIBTOOL --config | $EGREP '^(libname_spec)='`"
|
||||
name=
|
||||
eval libname=\"$libname_spec\"
|
||||
AT_CHECK([test "$libname" = lib || exit 77])
|
||||
AT_CHECK([test lib = "$libname" || exit 77])
|
||||
|
||||
# Create our own libtool, forcing need_lib_prefix setting
|
||||
sed 's,^\(need_lib_prefix\)=.*$,\1=unknown,' $LIBTOOL > ./libtool
|
||||
|
@ -28,7 +28,7 @@ AT_KEYWORDS([libtool])
|
||||
|
||||
eval `$LIBTOOL --config | $EGREP '^(want_nocaseglob|file_magic_glob)='`
|
||||
|
||||
AT_CHECK([test "$want_nocaseglob" != yes && ]dnl
|
||||
AT_CHECK([test yes != "$want_nocaseglob" && ]dnl
|
||||
[test -z "$file_magic_glob" && exit 77],
|
||||
[1], [ignore], [ignore])
|
||||
|
||||
|
@ -51,13 +51,13 @@ LT_INIT([dlopen])
|
||||
AC_SUBST([LIBTOOL_DEPS])
|
||||
|
||||
STATIC=
|
||||
test "X$enable_static" = Xyes && STATIC=-static
|
||||
test yes = "$enable_static" && STATIC=-static
|
||||
AC_SUBST([STATIC])
|
||||
|
||||
case $lt_cv_sys_global_symbol_pipe in
|
||||
?*) binary_helldl=yes ;;
|
||||
esac
|
||||
AM_CONDITIONAL([BINARY_HELLDL], [test "X$binary_helldl" = Xyes])
|
||||
AM_CONDITIONAL([BINARY_HELLDL], [test yes = "$binary_helldl"])
|
||||
|
||||
|
||||
## ---------------------------- ##
|
||||
|
@ -44,7 +44,7 @@ if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else
|
||||
CXX_pic_flag=
|
||||
fi
|
||||
|
||||
AT_CHECK([test "$at_srcdir" != . || exit 77])
|
||||
AT_CHECK([test . != "$at_srcdir" || exit 77])
|
||||
LT_AT_CONFIGURE([lt_cv_prog_compiler_pic="$C_pic_flag" ]dnl
|
||||
[lt_cv_prog_compiler_pic_CXX="$CXX_pic_flag"],
|
||||
["$abs_top_srcdir"/configure --disable-silent-rules])
|
||||
|
@ -78,7 +78,7 @@ HCURSOR get_cursor (void)
|
||||
]])
|
||||
|
||||
eval "`$LIBTOOL --config | grep '^build_libtool_libs='`"
|
||||
AT_CHECK([test "$build_libtool_libs" = yes || exit 77])
|
||||
AT_CHECK([test yes = "$build_libtool_libs" || exit 77])
|
||||
|
||||
AT_CHECK([$LIBTOOL --mode=compile --tag=CC \
|
||||
$CC $CPPFLAGS $CFLAGS -o gc.lo -c gc.c || exit 77],
|
||||
|
@ -53,7 +53,7 @@ eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shlibpath_overrides_runpath)='
|
||||
# No point checking a system with static libraries:
|
||||
LT_AT_EXEC_CHECK([./m], [1], [ignore], [ignore], [|| exit 1 && exit 77])
|
||||
|
||||
if test "$shlibpath_var" = PATH; then
|
||||
if test PATH = "$shlibpath_var"; then
|
||||
addpath=`pwd`/moved/bin
|
||||
else
|
||||
addpath=`pwd`/moved/lib
|
||||
@ -62,7 +62,7 @@ sep=
|
||||
eval test -n \"\$$shlibpath_var\" && sep=:
|
||||
eval $shlibpath_var='$addpath$sep$'$shlibpath_var
|
||||
export $shlibpath_var
|
||||
if test "$shlibpath_overrides_runpath" != no; then
|
||||
if test no != "$shlibpath_overrides_runpath"; then
|
||||
LT_AT_EXEC_CHECK([./m], [0], [ignore], [ignore])
|
||||
else
|
||||
LT_AT_EXEC_CHECK([./m], [1], [ignore], [ignore], [|| exit 1])
|
||||
|
@ -130,7 +130,7 @@ func_fix_path ()
|
||||
# against a broken library but the good one would come later in the PATH.
|
||||
# So we let the caller of this function set the order: the "other" two
|
||||
# come first.
|
||||
if test "$shlibpath_var" = PATH; then
|
||||
if test PATH = "$shlibpath_var"; then
|
||||
save_PATH=$PATH
|
||||
sep=
|
||||
test -z "$PATH" || sep=:
|
||||
@ -141,9 +141,7 @@ func_fix_path ()
|
||||
|
||||
func_restore_path ()
|
||||
{
|
||||
if test "$shlibpath_var" = PATH; then
|
||||
PATH=$save_PATH
|
||||
fi
|
||||
test PATH = "$shlibpath_var" && PATH=$save_PATH
|
||||
}
|
||||
|
||||
# func_move_libs srcdir_to_move prefix_to_move other_prefix other_prefix
|
||||
@ -244,11 +242,11 @@ for withdep in no yes; do
|
||||
done
|
||||
|
||||
### install the libraries.
|
||||
test "$withdep" = yes && $LIBTOOL --mode=install cp a1/liba1dep.la $libdir1/liba1dep.la
|
||||
test yes = "$withdep" && $LIBTOOL --mode=install cp a1/liba1dep.la $libdir1/liba1dep.la
|
||||
$LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la
|
||||
$LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la
|
||||
$LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la
|
||||
test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la
|
||||
test yes = "$withdep" && $LIBTOOL --mode=clean rm -f a1/liba1dep.la
|
||||
# simulate a non-libtool lib:
|
||||
rm -f $libdir3/liba3.la
|
||||
|
||||
|
@ -67,7 +67,7 @@ LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
|
||||
configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
|
||||
|
||||
#???
|
||||
if test "$shlibpath_var" = PATH; then
|
||||
if test PATH = "$shlibpath_var"; then
|
||||
configure_options="$configure_options --libdir=/$prefix/bin"
|
||||
fi
|
||||
|
||||
|
@ -35,10 +35,10 @@ fi
|
||||
|
||||
( cd "$abs_srcdir" && $AUTOCONF --trace 'LT_SUPPORTED_TAG:$1' ) >/dev/null
|
||||
ret=$?
|
||||
if test "$ret" -eq 63 || test "$ret" -eq 1; then
|
||||
if test 63 -eq $ret || test 1 -eq $ret; then
|
||||
func_error "This test requires the same Autoconf version"
|
||||
func_skip "as the one that was used to bootstrap Libtool"
|
||||
elif test "$ret" -ne 0; then
|
||||
elif test 0 -ne $ret; then
|
||||
func_fatal_error "\`$AUTOCONF --trace' exited $ret"
|
||||
fi
|
||||
|
||||
|
@ -113,7 +113,7 @@ AT_CHECK([LT_AT_LIBTOOLIZE([$1])],
|
||||
# --------------------------
|
||||
m4_define([LT_AT_ACLOCAL],
|
||||
[AT_CHECK([$ACLOCAL $1], [0], [ignore], [ignore])
|
||||
AT_XFAIL_IF([test "$ACLOCAL" = no])
|
||||
AT_XFAIL_IF([test no = "$ACLOCAL"])
|
||||
AT_KEYWORDS([automake])
|
||||
])
|
||||
|
||||
@ -122,7 +122,7 @@ AT_KEYWORDS([automake])
|
||||
# --------------------------
|
||||
m4_define([LT_AT_AUTOCONF],
|
||||
[AT_CHECK([$AUTOCONF $1], [0], [ignore], [ignore])
|
||||
AT_XFAIL_IF([test "$AUTOCONF" = no])
|
||||
AT_XFAIL_IF([test no = "$AUTOCONF"])
|
||||
AT_KEYWORDS([autoconf])
|
||||
])
|
||||
|
||||
@ -132,7 +132,7 @@ AT_KEYWORDS([autoconf])
|
||||
m4_define([LT_AT_AUTOMAKE],
|
||||
[AT_CHECK([$AUTOMAKE $1], [0], [ignore], [stderr],
|
||||
[AT_CHECK([grep 'require .*but have' stderr && (exit 77)], [1])])
|
||||
AT_XFAIL_IF([test "$AUTOMAKE" = no])
|
||||
AT_XFAIL_IF([test no = "$AUTOMAKE"])
|
||||
AT_KEYWORDS([automake])
|
||||
])
|
||||
|
||||
@ -141,7 +141,7 @@ AT_KEYWORDS([automake])
|
||||
# ---------------------------
|
||||
m4_define([LT_AT_AUTOHEADER],
|
||||
[AT_CHECK([$AUTOHEADER $1], [0], [ignore], [ignore])
|
||||
AT_XFAIL_IF([test "$AUTOHEADER" = no])
|
||||
AT_XFAIL_IF([test no = "$AUTOHEADER"])
|
||||
AT_KEYWORDS([autoconf])
|
||||
])
|
||||
|
||||
@ -296,7 +296,7 @@ m4_define([LT_AT_TAG],
|
||||
AT_CHECK([{ test -n "[$]$1" && test "X[$]$1" != Xno; } || (exit 77)])
|
||||
m4_case([$1],
|
||||
[CXX],
|
||||
[AT_CHECK([test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)])],
|
||||
[AT_CHECK([test g++ != "$CXX" || (g++ -v >/dev/null 2>&1) || (exit 77)])],
|
||||
[GCJ],
|
||||
[# There are just too many broken gcj installations out there, either missing
|
||||
# libgcj.spec or unable to find it. Skip the test for them.
|
||||
|
@ -24,8 +24,8 @@
|
||||
AT_SETUP([test --with-pic])
|
||||
eval `$LIBTOOL --config | $EGREP '^(pic_flag|FGREP)='`
|
||||
|
||||
AT_CHECK([test "z$pic_flag" != "z" || exit 77])
|
||||
AT_CHECK([test "$at_srcdir" != . || exit 77])
|
||||
AT_CHECK([test -n "$pic_flag" || exit 77])
|
||||
AT_CHECK([test . != "$at_srcdir" || exit 77])
|
||||
|
||||
CONFIGURE=$abs_top_srcdir/tests/demo/configure
|
||||
: ${MAKE=make}
|
||||
|
Loading…
Reference in New Issue
Block a user