]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: migrate tests/sh.test checks to syntax-checks.
authorGary V. Vaughan <gary@gnu.org>
Wed, 16 Nov 2011 16:21:18 +0000 (23:21 +0700)
committerGary V. Vaughan <gary@gnu.org>
Fri, 25 Nov 2011 07:53:41 +0000 (14:53 +0700)
Some modernization of the legacy testsuite.
* tests/sh.test: Remove.
* Makefile.am (COMMON_TESTS): Adjust.
* cfg.mk (sc_libtool_m4_cc_basename, sc_prohibit_bracket_as_test)
(sc_prohibit_nested_quotes, sc_prohibit_set_dummy_without_shift)
(sc_prohibit_set_minus_minus, sc_prohibit_test_binary_operators)
(sc_prohibit_test_dollar, sc_prohibit_test_minus_e)
(sc_prohibit_test_unary_operators, sc_prohibit_test_X)
(sc_prohibit_Xsed_withou_X, sc_require_function_nl_brace):
Functionally identical tests to what used to be performed by
sh.test, only with coverage of all files.
* bootstrap, build-aux/edit-readme-alpha,
build-aux/extract-trace, build-aux/getopt.m4sh,
build-aux/ltmain.m4sh, configure.ac, m4/libtool.m4, m4/ltdl.m4,
tests/bindir.at, tests/configure-iface.at, tests/cwrapper.at,
tests/darwin.at, tests/defs.m4sh, tests/demo-hardcode.test,
tests/dlloader-api.at, tests/exceptions.at,
tests/getopt-m4sh.at, tests/lalib-syntax.at, tests/link-2.test,
tests/link-order2.at, tests/loadlibrary.at,
tests/lt_dladvise.at, tests/lt_dlexit.at, tests/lt_dlopen_a.at,
tests/lt_dlopenext.at, tests/need_lib_prefix.at,
tests/nonrecursive.at, tests/recursive.at, tests/resident.at,
tests/standalone.at, tests/static.at, tests/stresstest.at,
tests/subproject.at, tests/sysroot.at, tests/tagtrace.test,
tests/testsuite.at: Fix violations of the new syntax checks.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
40 files changed:
Makefile.am
bootstrap
build-aux/edit-readme-alpha
build-aux/extract-trace
build-aux/getopt.m4sh
build-aux/ltmain.m4sh
cfg.mk
configure.ac
libtoolize.m4sh
m4/libtool.m4
m4/ltdl.m4
tests/bindir.at
tests/configure-iface.at
tests/cwrapper.at
tests/darwin.at
tests/defs.m4sh
tests/demo-hardcode.test
tests/dlloader-api.at
tests/exceptions.at
tests/getopt-m4sh.at
tests/lalib-syntax.at
tests/link-2.test
tests/link-order2.at
tests/loadlibrary.at
tests/lt_dladvise.at
tests/lt_dlexit.at
tests/lt_dlopen_a.at
tests/lt_dlopenext.at
tests/need_lib_prefix.at
tests/nonrecursive.at
tests/recursive.at
tests/resident.at
tests/sh.test [deleted file]
tests/standalone.at
tests/static.at
tests/stresstest.at
tests/subproject.at
tests/sysroot.at
tests/tagtrace.test
tests/testsuite.at

index 5420510e7a15d54648d0382f3f7a736fb3bc82da..200f47016a84180cf388530fa4ad08e1e82a8997 100644 (file)
@@ -139,7 +139,7 @@ $(ltversion_m4): $(ltversion_in) $(dotversion)
        @$(rebuild); \
        if test -f '$@'; then \
          eval `'$(SED)' -n '/^macro_revision=/p' '$@'`; \
-         test x"$$macro_revision" = x"$$revision" && rebuild=false; \
+         test "x$$macro_revision" = "x$$revision" && rebuild=false; \
        fi; \
        for prereq in $?; do \
          case $$prereq in *.version);; *) rebuild=:;; esac; \
@@ -171,7 +171,7 @@ $(ltmain_sh): $(ltmain_m4sh) $(sh_files) $(dotversion)
        @$(rebuild); \
        if test -f '$@'; then \
          eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
-         test x"$$package_revision" = x"$$revision" && rebuild=false; \
+         test "x$$package_revision" = "x$$revision" && rebuild=false; \
        fi; \
        for prereq in $?; do \
          case $$prereq in *.version);; *) rebuild=:;; esac; \
@@ -557,7 +557,7 @@ changelog           = $(distdir)/ChangeLog
 # date is updated to the following year.
 changelog_start_date = 2011-01-01
 $(changelog): FORCE
-       $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+       $(AM_V_GEN)if test -d '$(srcdir)/.git'; then \
          $(gitlog_to_changelog) --amend=$(git_log_fix) \
              --since=$(changelog_start_date) > '$@T'; \
          rm -f '$@'; mv '$@T' '$@'; \
@@ -874,7 +874,6 @@ COMMON_TESTS = \
        tests/nomode.test \
        tests/objectlist.test \
        tests/quote.test \
-       tests/sh.test \
        tests/suffix.test \
        tests/tagtrace.test \
        tests/cdemo-static.test \
index 3bc153e03805b3bb70cc324ff57bccf7e56589a4..14a3df39eced52cfe3069dfa0c84642b69a1b9d6 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -738,20 +738,20 @@ func_clean_unused_macros ()
 
       # We use `ls|grep' instead of `ls *.m4' to avoid exceeding
       # command line length limits in some shells.
-      for file in `cd $macro_dir && ls -1 |grep '\.m4$'`; do
+      for file in `cd "$macro_dir" && ls -1 |grep '\.m4$'`; do
 
        # Remove a macro file when aclocal.m4 does not m4_include it...
         func_grep_q 'm4_include([[]'$macro_dir/$file'])' $aclocal_m4s \
-            || test ! -f $gnulib_path/m4/$file || {
+            || test ! -f "$gnulib_path/m4/$file" || {
 
               # ...and there is an identical file in gnulib...
-              if func_cmp_s $gnulib_path/m4/$file $macro_dir/$file; then
+              if func_cmp_s "$gnulib_path/m4/$file" "$macro_dir/$file"; then
 
                 # ...and it's not in the precious list (`echo' is needed
                 # here to squash whitespace for the match expression).
                 case " "`echo $gnulib_precious`" " in
                   *" $file "*) ;;
-                  *) rm -f $macro_dir/$file
+                  *) rm -f "$macro_dir/$file"
                      func_verbose \
                        "removing unused gnulib file \`$macro_dir/$file'"
                 esac
@@ -1619,7 +1619,7 @@ func_gnulib_tool has installed the \`git-version-gen' script."
 # `gnulib-cache.m4' if possible.
 require_source_base=func_require_source_base
 func_require_source_base ()
-  {
+{
     $debug_cmd
 
     $require_gnulib_cache
@@ -2027,7 +2027,7 @@ func_truncate_cmd ()
       case $_G_opt in
         -*) _G_last_arg_opt_p=: ;;
         *)  $_G_last_arg_opt_p \
-                || test $min_cmd_len -gt $func_len_result \
+                || test "$min_cmd_len" -gt "$func_len_result" \
                 || break
             _G_last_arg_opt_p=false
             ;;
@@ -2065,13 +2065,14 @@ func_insert_sorted_if_absent ()
 
 # func_sort_ver VER1 VER2
 # -----------------------
+# `sort -V' is not generally available.
 # Note this deviates from the version comparison in automake
 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
 # but this should suffice as we won't be specifying old
 # version formats or redundant trailing .0 in bootstrap.conf.
 # If we did want full compatibility then we should probably
 # use m4_version_compare from autoconf.
-func_sort_ver ()  # sort -V is not generally available
+func_sort_ver ()
 {
     $debug_cmd
 
@@ -2141,7 +2142,7 @@ func_get_version ()
     func_tool_version_output $_G_app >/dev/null
     _G_status=$?
 
-    test $_G_status -ne 0 \
+    test "$_G_status" -ne 0 \
       || $_G_app --version 2>&1 |$SED -n "$sed_get_version"
 
     (exit $_G_status)
@@ -2234,7 +2235,7 @@ func_update_po_files ()
     # Usually contains *.s1 checksum files.
     _G_ref_po_dir=$_G_po_dir/.reference
 
-    test -d $_G_ref_po_dir || mkdir $_G_ref_po_dir || return
+    test -d "$_G_ref_po_dir" || mkdir $_G_ref_po_dir || return
     func_download_po_files $_G_ref_po_dir $_G_domain \
       && ls "$_G_ref_po_dir"/*.po 2>/dev/null \
          |$SED 's|.*/||; s|\.po$||' > "$_G_po_dir/LINGUAS" || return
index b154974ccf8dcf0d161118b6b69d3dcbacaec577..c759998f156b93852fedc41304929d721cef203e 100755 (executable)
@@ -57,7 +57,7 @@ func_fatal_error ()
 for file in "$@"; do
   # Assume that read-only README indicates that we are running inside
   # the latter part of a `make distcheck'.
-  test -w $file || {
+  test -w "$file" || {
     echo "$progname: not editing non-writeable \`$file' (distcheck?)" >&2
     continue
   }
@@ -85,7 +85,7 @@ support script.  Libtool hides the complexity of using shared libraries\
 behind a consistent, portable interface.' $file > $file.T
 
   # Diagnose redirection failure.
-  test -f $file.T || func_fatal_error "Unable to write $file.T"
+  test -f "$file.T" || func_fatal_error "Unable to write $file.T"
 
   # Overwrite the original file with our edited version.
   mv $file.T $file || func_fatal_error "Unable to edit $file"
index a4322ec2bca13e46053d967f0083ae6d0d97ad3a..6c92d5f0cb136d05e41b3642dbb81798f1028209 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # Make sure we've evaluated the option-parser library.
-test -n "$progpath" || . `echo "$0" |${SED-sed} 's,[^/]*$,,'`"/options-parser"
+test -n "$progpath" || . `echo "$0" |${SED-sed} 's,[^/]*$,,'`/options-parser
 
 # Set a version string.
 scriptversion=2011-11-04.09; # UTC
@@ -86,7 +86,7 @@ func_autoconf_configure ()
     test -n "$_G_ac_init"
     _G_status=$?
 
-    test $_G_status -ne 0 \
+    test "$_G_status" -ne 0 \
       && 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 "$_G_status" -ne 0 && test -n "$_G_fatal_error_msg" \
         && func_fatal_error "$_G_fatal_error_msg"
 
     (exit $_G_status)
index 568db29ef8771bb15e53b6d3b81d32a7bb3aaf72..27a8352df15e9c689d15f4aff88589b00606af76 100644 (file)
@@ -239,7 +239,7 @@ m4_define([m4go_shortnoargs], [-\?*|-h*])
 #      injecting new arguments into the command line before the
 #      processing loop terminates.  For example:
 #
-#              `eval set -- `cat $rcfile` ${1+"$@"}'
+#            eval set dummy `cat $rcfile` ${1+"$@"}; shift
 #
 #      Note that, because we look inside the content of INITn to
 #      determine whether there are newlines to be stripped, double
index b0b2a628ba275a6496837a1b22e3100c854d7889..02ff034d7855c536e3d6c1e671f8b5ede5deee41 100644 (file)
@@ -7901,7 +7901,7 @@ EOF
       test "$build_libtool_libs" != yes && libobjs=$non_pic_objects
 
       # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+      reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
 
       output=$obj
       func_execute_cmds "$reload_cmds" 'exit $?'
diff --git a/cfg.mk b/cfg.mk
index 58c01cc065172de9f4389ea90b28d2ef9451fd17..c9bfd9273111dac1d8cd6d39341f11af5a35b5db 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -55,6 +55,110 @@ local-checks-to-skip =                              \
 # trailing_blank: flags valid rfc3676 separators
 # unmarked_diagnostics: libtool isn't internationalized
 
+
+# Check for correct usage of $cc_basename in libtool.m4.
+sc_libtool_m4_cc_basename:
+       @sed -n '/case \$$cc_basename in/,/esac/ {                      \
+         /^[    ]*[a-zA-Z][a-zA-Z0-9+]*[^*][    ]*)/p;                 \
+       }' '$(srcdir)/$(macro_dir)/libtool.m4' | grep . && {            \
+         msg="\$$cc_basename matches should include a trailing \`*'."  \
+         $(_sc_say_and_exit) } || :
+
+# Check for uses of Xsed without corresponding echo "X
+exclude_file_name_regexp--sc_prohibit_Xsed_without_X = ^cfg.mk$$
+sc_prohibit_Xsed_without_X:
+       @files=$$($(VC_LIST_EXCEPT));                                   \
+       if test -n "$$files"; then                                      \
+         grep -nE '\$$Xsed' $$files | grep -vE '(func_echo_all|\$$ECHO) \\*"X' && {    \
+           msg='occurrences of `$$Xsed'\'' without `$$ECHO "X'\'' on the same line' \
+           $(_sc_say_and_exit) } || :;                                 \
+       else :;                                                         \
+       fi || :
+
+# Check for using `[' instead of `test'.
+exclude_file_name_regexp--sc_prohibit_bracket_as_test = ^cfg.mk$$
+sc_prohibit_bracket_as_test:
+       @prohibit='if[   ]+\['                                          \
+       halt="use \`if test' instead of \`if ['"                        \
+         $(_sc_search_regexp)
+
+# Check for quotes within backquotes within quotes "`"bar"`"
+exclude_file_name_regexp--sc_prohibit_nested_quotes = ^cfg.mk$$
+sc_prohibit_nested_quotes:
+       @prohibit='"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"'                    \
+       halt='found nested double quotes'                               \
+         $(_sc_search_regexp_or_exclude)
+
+# Check for using shift after set dummy (same or following line).
+exclude_file_name_regexp--sc_prohibit_set_dummy_without_shift = ^cfg.mk$$
+sc_prohibit_set_dummy_without_shift:
+       @files=$$($(VC_LIST_EXCEPT));                                   \
+       if test -n "$$files"; then                                      \
+         grep -nE '(set dummy|shift)' $$files |                        \
+           sed -n '/set[        ][      ]*dummy/{                      \
+             /set.*dummy.*;.*shift/d;                                  \
+             N;                                                        \
+             /\n.*shift/D;                                             \
+             p;                                                        \
+            }' | grep -n . && {                                                \
+           msg="use \`shift' after \`set dummy'"                       \
+           $(_sc_say_and_exit) } || :;                                 \
+       else :;                                                         \
+       fi || :
+
+# Check for using set -- instead of set dummy
+exclude_file_name_regexp--sc_prohibit_set_minus_minus = ^cfg.mk$$
+sc_prohibit_set_minus_minus:
+       @prohibit='set[  ]+--[   ]+'                                    \
+       halt="use \`set dummy ...' instead of \`set -- ...'"            \
+         $(_sc_search_regexp)
+
+# Check for using test X"... instead of test "X...
+exclude_file_name_regexp--sc_prohibit_test_X = ^cfg.mk$$
+sc_prohibit_test_X:
+       @prohibit='test[         ]+(![   ])?(-.[         ]+)?[Xx]["'\'']'       \
+       halt='use `test "X..."'\'' instead of `test X"'\'               \
+         $(_sc_search_regexp)
+
+# Check for bad binary operators.
+sc_prohibit_test_binary_operators:
+       @prohibit='if[   ]+["'\'']?\$$[^         ]+[     ]+(=|-[lg][te]|-eq|-ne)' \
+       halt="Use \`if test \$$something =' instead of \`if \$$something ='" \
+         $(_sc_search_regexp)
+
+# Check for using test $... instead of test "$...
+exclude_file_name_regexp--sc_prohibit_test_dollar = ^cfg.mk$$
+sc_prohibit_test_dollar:
+       @prohibit='test[         ]+(![   ])?(-.[         ]+)?X?\$$[^?#]' \
+       halt='use `test "$$..."'\'' instead of `test $$'\'              \
+         $(_sc_search_regexp)
+
+# Never use test -e.
+exclude_file_name_regexp--sc_prohibit_test_minus_e = ^cfg.mk$$
+sc_prohibit_test_minus_e:
+       @prohibit='test[         ]+(![   ])?-e'                         \
+       halt="use \`test -f' instead of \`test -e'"                     \
+         $(_sc_search_regexp)
+
+# Check for bad unary operators.
+sc_prohibit_test_unary_operators:
+       @prohibit='if[   ]+-[a-z]'                                      \
+       halt="use \`if test -X' instead of \`if -X'"                    \
+         $(_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:
+       @for file in $$($(VC_LIST_EXCEPT)); do                          \
+         sed -n '/^func_[^      ]*[     ]*(/{                          \
+           N;                                                          \
+           /^func_[^    ]* ()\n{$$/d;                                  \
+           p;                                                          \
+         }' $$file | grep -E . && {                                    \
+           msg="found malformed function_definition in $$file"         \
+           $(_sc_say_and_exit) } || :;                                 \
+       done
+
 sc_trailing_blank-non-rfc3676:
        @prohibit='([^-][^-][    ][      ]*|^[   ][      ]*)$$'         \
        halt='found trailing blank(s)'                                  \
index 39d06f47bcd63dfa86a58b6a3bd4b1fc17f344b4..5fe1cb84c588c38d1337cd3106aa8f05b66e610a 100644 (file)
@@ -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 "x${enable_ltdl_install+set}" != xset; then
   enable_ltdl_install=yes
 fi
 
@@ -200,7 +200,7 @@ END
    cd ..
    rm -rf conftest.dir
 ])
-if test $lt_cv_make_order_only = yes; then
+if test yes = "$lt_cv_make_order_only"; then
   ORDER='|'
 else
   ORDER=''
index 1a50fca7f242b7c00529227732cb4207d94e757c..33a10e4843efbddbcbebfe2af931d5a07f045892 100644 (file)
@@ -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 "x$macro_dir" = x.; 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=:
index eb2964c3f1b4d8efcbc672f0ee8daac2cf7f3f48..2cbcadbb8dda6250e7538a807029d4397d8bf92d 100644 (file)
@@ -547,7 +547,7 @@ for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -560,7 +560,7 @@ for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -598,7 +598,7 @@ AS_SHELL_SANITIZE
 _AS_PREPARE
 exec AS_MESSAGE_FD>&1
 _ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
@@ -643,7 +643,7 @@ Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
-while test $[#] != 0
+while test 0 != $[#]
 do
   case $[1] in
     --version | --v* | -V )
@@ -991,7 +991,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
          cat conftest.err >&AS_MESSAGE_LOG_FD
        # Otherwise, if the output was created with a 0 exit code from
        # the compiler, it worked.
-       elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+       elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
          lt_cv_apple_cc_single_mod=yes
        else
          cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1031,7 +1031,7 @@ _LT_EOF
       _lt_result=$?
       if test -s conftest.err && $GREP force_load conftest.err; then
        cat conftest.err >&AS_MESSAGE_LOG_FD
-      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1 ; then
        lt_cv_ld_force_load=yes
       else
        cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1368,7 +1368,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
     [AC_LANG_PUSH(C)
      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
      AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+  if test "x$lt_cv_cc_needs_belf" != xyes; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     CFLAGS=$SAVE_CFLAGS
   fi
@@ -1532,7 +1532,7 @@ AC_CACHE_CHECK([$1], [$2],
    $RM conftest*
 ])
 
-if test x"[$]$2" = xyes; then
+if test "x[$]$2" = xyes; then
     m4_if([$5], , :, [$5])
 else
     m4_if([$6], , :, [$6])
@@ -1576,7 +1576,7 @@ AC_CACHE_CHECK([$1], [$2],
    LDFLAGS=$save_LDFLAGS
 ])
 
-if test x"[$]$2" = xyes; then
+if test "x[$]$2" = xyes; then
     m4_if([$4], , :, [$4])
 else
     m4_if([$5], , :, [$5])
@@ -1702,7 +1702,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       # we can't tell.
       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
+             test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -1718,7 +1718,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   esac
 ])
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len" ; then
   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 else
   AC_MSG_RESULT(none)
@@ -2308,7 +2308,7 @@ amigaos*)
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
@@ -2944,7 +2944,7 @@ dnl not every word.  This closes a longstanding sh security hole.
   for ac_dir in $ac_dummy; do
     IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
+    if test -f "$ac_dir/$1"; then
       lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
       if test -n "$file_magic_test_file"; then
        case $deplibs_check_method in
@@ -4986,7 +4986,7 @@ _LT_EOF
        # need to do runtime linking.
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
          for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+         if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
            aix_use_runtimelinking=yes
            break
          fi
@@ -5064,7 +5064,7 @@ _LT_EOF
         # empty executable.
         _LT_SYS_MODULE_PATH_AIX([$1])
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs ${wl}'$no_entry_flag' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` ${wl}'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
        if test "$host_cpu" = ia64; then
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
@@ -5216,9 +5216,9 @@ _LT_EOF
 
     hpux9*)
       if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -6063,7 +6063,7 @@ if test "$_lt_caught_CXX_error" != yes; then
           _LT_SYS_MODULE_PATH_AIX([$1])
           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs ${wl}'$no_entry_flag' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` ${wl}'$exp_sym_flag:\$export_symbols' '$shared_flag
         else
           if test "$host_cpu" = ia64; then
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
@@ -6244,7 +6244,7 @@ if test "$_lt_caught_CXX_error" != yes; then
             _LT_TAGVAR(ld_shlibs, $1)=no
             ;;
           aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -6257,7 +6257,7 @@ if test "$_lt_caught_CXX_error" != yes; then
             ;;
           *)
             if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -6267,7 +6267,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
+        if test no = "$with_gnu_ld"; then
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
          _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
@@ -6322,7 +6322,7 @@ if test "$_lt_caught_CXX_error" != yes; then
            ;;
           *)
            if test "$GXX" = yes; then
-             if test $with_gnu_ld = no; then
+             if test no = "$with_gnu_ld"; then
                case $host_cpu in
                  hppa*64*)
                    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
@@ -6996,8 +6996,8 @@ if AC_TRY_EVAL(ac_compile); then
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
+       if test x-L = "$p" ||
+          test x-R = "$p"; then
         prev=$p
         continue
        fi
@@ -7733,7 +7733,7 @@ lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
+  test ! -f "$lt_ac_sed" && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -7750,9 +7750,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
     cmp -s conftest.out conftest.nl || break
     # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
+    test "$lt_ac_count" -gt 10 && break
     lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
+    if test "$lt_ac_count" -gt "$lt_ac_max"; then
       lt_ac_max=$lt_ac_count
       lt_cv_path_SED=$lt_ac_sed
     fi
@@ -7782,7 +7782,7 @@ xsi_shell=no
 ( _lt_dummy=a/b/c
   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
       = c,a/b,b/c, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && eval 'test 2 -eq $(( 1 + 1 )) \
     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
   && xsi_shell=yes
 AC_MSG_RESULT([$xsi_shell])
index 6a6f45f7ef7b3447463aa9ecc8ac2654561be202..ba3d9c1980e8a95895901260c0f059a40acdab12 100644 (file)
@@ -146,18 +146,18 @@ dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
 # -----------------
 # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
 m4_defun([_LTDL_INSTALLABLE],
-[if test -f $prefix/lib/libltdl.la; then
+[if test -f "$prefix/lib/libltdl.la"; then
   lt_save_LDFLAGS=$LDFLAGS
   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 "x${lt_lib_ltdl-no}" = xyes; then
+    if test "x$enable_ltdl_install" != xyes; 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 "x$enable_ltdl_install" = xno; then
     AC_MSG_WARN([libltdl not installed, but installation disabled])
   fi
 fi
@@ -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 "x${enable_ltdl_install-no}" != xno)
+ AM_CONDITIONAL(CONVENIENCE_LTDL, test "x${enable_ltdl_convenience-no}" != xno)])
 ])# _LT_ENABLE_INSTALL
 
 
@@ -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 "x$libltdl_cv_preloaded_symbols" = xyes; 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 "x$libltdl_cv_func_dlopen" = xyes || test "x$libltdl_cv_lib_dl_dlopen" = xyes
 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 "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
        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 "x$libltdl_cv_need_uscore" = xyes; then
   AC_DEFINE([NEED_USCORE], [1],
     [Define if dlsym() requires a leading underscore in symbol names.])
 fi
index a3684a96cc225a89967e79a03d043b60555257fa..5d76f8baa199b992c98ecec6dcd44e946343205c 100644 (file)
@@ -276,7 +276,7 @@ do
   # simplify this check by taking advantage of the fact that if it's a DLL,
   # it has to go in bindir, so we'll not check for both forms in libdir.
   if $bindirneeded; then
-    AT_CHECK([test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0*], [], [ignore], [ignore])
+    AT_CHECK([test -f "$libdir"/../bin/???foo-0.dll || ls "$libdir"/../bin/*foo*0*], [], [ignore], [ignore])
   else
     AT_CHECK([ls $libdir/*foo*], [], [ignore], [ignore])
   fi
@@ -335,14 +335,14 @@ do
     # Recreate directories (bindir already done) and install.
     AS_MKDIR_P($libdir)
     AS_MKDIR_P($curdir/sbin)
-    AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir], [], [ignore], [ignore])
-    AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT], [], [ignore], [ignore])
+    AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL libfoo.la "$libdir"], [], [ignore], [ignore])
+    AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT "$curdir/sbin/main$EXEEXT"], [], [ignore], [ignore])
 
     # Ensure it went to bindir rather than default dir this time.
     if $bindirneeded; then
-      AT_CHECK([test -f $bindir/???foo-0.dll || ls $bindir/*foo*0*], [], [ignore], [ignore])
+      AT_CHECK([test -f "$bindir"/???foo-0.dll || ls "$bindir"/*foo*0*], [], [ignore], [ignore])
     else
-      AT_CHECK([ls $libdir/*foo*], [], [ignore], [ignore])
+      AT_CHECK([ls "$libdir"/*foo*], [], [ignore], [ignore])
     fi
 
     # And that it can be executed.
index 20716463a53ea8927d1f705129466ed198b509d8..e63b5c696de668819f04c0c87f7dc655a1e6b6a2 100644 (file)
@@ -145,8 +145,8 @@ LT_AT_BOOTSTRAP([--ltdl], [-I libltdl/m4], [], [--add-missing], [],
         [--with-included-ltdl --prefix=$prefix], [all install])
 
 # TODO: Check that the installed program `main' is linked against our libltdl
-AT_CHECK([test -f $prefix/lib/libltdl.la])
-AT_CHECK([test -f $prefix/include/ltdl.h])
+AT_CHECK([test -f "$prefix/lib/libltdl.la"])
+AT_CHECK([test -f "$prefix/include/ltdl.h"])
 
 # Check that main is rebuilt if libltdl.la is newer
 rm -f libltdl/libltdl.la
@@ -175,8 +175,8 @@ LT_AT_MAKE([all install])
 # Remove build files
 rm -rf ltdl/
 
-AT_CHECK([test -f $prefix/lib/libltdl.la])
-AT_CHECK([test -f $prefix/include/ltdl.h])
+AT_CHECK([test -f "$prefix/lib/libltdl.la"])
+AT_CHECK([test -f "$prefix/include/ltdl.h"])
 
 _LT_AT_LTDL_SETUP
 
index cb89a4083a86428c60c761d0af181c23ff8abe3a..b08a61afb415c38cf3af6315b65d7be78fe7ced2 100644 (file)
@@ -187,7 +187,7 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-fast-install ]dnl
         [], [ignore], [ignore])
 
 # Skip if no cwrapper is generated.
-AT_CHECK([test -f $objdir/lt-usea.c || exit 77])
+AT_CHECK([test -f "$objdir/lt-usea.c" || exit 77])
 
 # Try to make sure the test is relevant.
 AT_CHECK([grep ' *fputs' $objdir/lt-usea.c > /dev/null])
index e2abe1a97ebdc08f76ef9e5a2a5e45bf89337901..11be3aa73c7fbc9637b0df999b9475496aeb2e98 100644 (file)
@@ -251,7 +251,7 @@ AT_CHECK([test "$shared_ext" != "$module_ext" || exit 77])
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 prefix=`pwd`/inst
index 4d66ceca303dab45419b0545db3b127717c600b7..0943d2361610b940397f19c0835c6c138094ffa6 100644 (file)
@@ -141,7 +141,7 @@ func_rmprefixdir ()
 {
     $debug_cmd
 
-    test -d $prefix && rm -rf $prefix
+    test -d "$prefix" && rm -rf "$prefix"
     prefix=NONE
 }
 
@@ -338,7 +338,7 @@ func_exec ()
        exec_status=$EXIT_SKIP
       else
        # Simple check to see if they are superuser.
-       if test $exec_status = $EXIT_FAILURE || test -w /; then :
+       if test "$exec_status" = "$EXIT_FAILURE" || test -w /; then :
        else
          func_msg "You may need to run $0 as the superuser."
        fi
index 0e486904324f43144f8630315536e49a324ecc74..269c2ff35f440e9f37af4dbde8a23eb85d678b4c 100755 (executable)
@@ -98,7 +98,7 @@ for file in hc-*; do
   # Check the result.
   case $hardcoded in
   yes)
-    if test $expected = yes; then
+    if test yes = "$expected"; then
       echo "$objdir was hardcoded in \`$file', as libtool expected"
     else
       echo "$objdir was hardcoded in \`$file', which fooled libtool" 1>&2
@@ -107,7 +107,7 @@ for file in hc-*; do
     ;;
 
   no)
-    if test $expected = no; then
+    if test no = "$expected"; then
       echo "$objdir was not hardcoded in \`$file', as libtool expected"
     else
       echo "$objdir was not hardcoded in \`$file', which fooled libtool" 1>&2
@@ -116,7 +116,7 @@ for file in hc-*; do
     ;;
 
   unsupported)
-    if test $expected = unsupported; then
+    if test unsupported = "$expected"; then
       echo "\`$file' was not linked properly, as libtool expected"
     else
       echo "\`$file' was not linked properly, which fooled libtool" 1>&2
index 3215c3b68f61d7b85cff344c5b9e976a4fd9536f..c277e088148651bcb8bab8d59b9dcb19c5287525 100644 (file)
@@ -415,7 +415,7 @@ last_exit: last_ctx
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
index c1dcce119e2cf7b7950497f76490eb80fc16abed..fdb341fed037b5167c396dcf6fbca90b2f82e257 100644 (file)
@@ -31,7 +31,7 @@ AT_KEYWORDS([libltdl])
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
index 4c11dbf5b3627ebb3bcfa3a74eb645a9c25360b3..0728760843c8525d0fd43e66e32903cb7933ef45 100644 (file)
@@ -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 "$at_status" -eq 63 && exit 77])])
 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
 ])# _LT_AT_GETOPT_M4SH_SETUP
 
index 2eea98f138b0c0ab9370a9966951e00566a8cdf5..eca9ba575f91861dad5cfff5e7d85345d088a717 100644 (file)
@@ -73,7 +73,7 @@ AT_DATA([module.c],
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$CPPFLAGS $LTDLINCL"
index 9c7c8c62c803b7e0d17aa343211b020173c47632..1418c01a0cf41720925e7517c984f05d2dca7751 100755 (executable)
@@ -38,7 +38,7 @@ res=$?
 
 rm -f hell.lo
 
-test $res -eq 0 || exit $EXIT_FAILURE
+test "$res" -eq 0 || exit $EXIT_FAILURE
 
 echo "$linkresult"
 case $linkresult in
index a6eea0e9d5f2072151afa9231074dc32ff89c9c2..2f0096bbe51083f03a63c7a5694a9a85b2ce30db 100644 (file)
@@ -100,7 +100,7 @@ $LIBTOOL --mode=clean rm -f liba0.la
 
 for type_of_depdepl in libtool non-libtool; do
   echo "type of depdepl: $type_of_depdepl"
-  if test $type_of_depdepl = non-libtool; then
+  if test non-libtool = "$type_of_depdepl"; then
     # Simulate a non-Libtool system library.
     rm $deflibdir/liba1.la
     addpath=$deflibdir
@@ -126,7 +126,7 @@ for type_of_depdepl in libtool non-libtool; do
     # Now test that if we reverse the link order, the program fails.
     AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la],
             [], [ignore], [ignore])
-    if test $shared_fails,$static != yes,; then
+    if test yes, != "$shared_fails,$static"; then
       LT_AT_EXEC_CHECK([./wrong], [1], [], [ignore], [|| (exit 1)])
     fi
 
@@ -136,13 +136,13 @@ for type_of_depdepl in libtool non-libtool; do
     $LIBTOOL --mode=install cp wrong$EXEEXT $bindir/wrong$EXEEXT
     $LIBTOOL --mode=clean rm -f liba1.la libb.la
     LT_AT_EXEC_CHECK([$bindir/main])
-    if test $shared_fails,$static != yes,; then
+    if test yes, = "$shared_fails,$static"; then
       LT_AT_EXEC_CHECK([$bindir/wrong], [1], [], [ignore], [|| (exit 1)])
     fi
   done
 done
 
-AT_CHECK([test $shared_fails = no || (exit 77)])
+AT_CHECK([test no = "$shared_fails" || (exit 77)])
 
 # Now the converse: if both the program and the library need libm, then
 # it needs to be sorted last.  (TODO)
index e87cb90129cfa2f1f3d23ec9978edae5aeeead42..58b8463beb1119c7bcafda15979dacb22a7eb3c8 100644 (file)
@@ -215,7 +215,7 @@ barsym (void)
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
index 48cf5e9616c4c79244c68dde5fc172badf011a0d..9bcc73d81ac1908fa222a337a3167e113df18b19 100644 (file)
@@ -313,7 +313,7 @@ preload: 6
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
@@ -357,7 +357,7 @@ $CC $CPPFLAGS $CFLAGS -c main.c
 for name in resident local global preload; do
   # FIXME: adding -static to libpreload shouldn't be necessary.
   #        Fix this properly in ltmain, then remove this workaround.
-  if test $name = preload; then
+  if test preload = "$name"; then
     st=-static
   else
     st=
index 9441f8a9aa8d45ed357ca414e44bad9b62c436ce..d2fc58e54c0bc04b1cd5deda60e3939555a1a963 100644 (file)
@@ -139,7 +139,7 @@ int vb1 = 3;
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
index 4844d061f5f7eb0a89729a94a6c94dc1817743e4..f1c82b5a617d41f274ab1e01ddbfe4ff9d2494a8 100644 (file)
@@ -91,7 +91,7 @@ mkdir -p $bindir
 
 AT_CHECK([$LIBTOOL --mode=install cp plugin.la $libdir],[], [ignore], [ignore])
 AT_CHECK([$LIBTOOL --mode=install cp main$EXEEXT $bindir],[], [ignore], [ignore])
-AT_CHECK([test -f $libdir/plugin.a || exit 77])
+AT_CHECK([test -f "$libdir/plugin.a" || exit 77])
 LT_AT_EXEC_CHECK([$bindir/main], [], [ignore], [ignore],[$libdir/plugin.la])
 
 AT_CLEANUP
index 16b5b7542db97a2ac430d54abc72f20dfa3c0f40..bf5d04f81945de0dd887037e2d4f0e9bf5e36523 100644 (file)
@@ -186,7 +186,7 @@ dlerrordup (char *errormsg)
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
@@ -227,7 +227,7 @@ if test "$shlibpath_var" = PATH; then
 fi
 
 for lafile in $have_lafile; do
-  if test $lafile = without; then
+  if test without = "$lafile"; then
     rm $libdir/simple-module.la
   fi
 
index 02610f1d668c40d1116d5019778f329addb6f8d0..2b162eb806f7a25bb8a6bc9e410b229fbea3b5cb 100644 (file)
@@ -147,7 +147,7 @@ libfoo2: 3
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
index fa8cfb6d83a6708d6069ec2fef30f32f2ec53d0f..92af12f74500e25e5417a16e28979a813e4bafb3 100644 (file)
@@ -140,8 +140,8 @@ done
 LT_AT_BOOTSTRAP([ignore], [-I ltdl/m4], [], [--add-missing --copy],
        [], [--enable-ltdl-install --prefix=$prefix], [all install $tst_dist])
 
-AT_CHECK([test -f $prefix/lib/libltdl.la])
-AT_CHECK([test -f $prefix/include/ltdl.h])
+AT_CHECK([test -f "$prefix/lib/libltdl.la"])
+AT_CHECK([test -f "$prefix/include/ltdl.h"])
 
 AT_CLEANUP
 
index f27939867988b407c9baa6888f2db1a7368ece6c..eec9e6390de2246b94cd6a7d67425e9a328029d0 100644 (file)
@@ -110,8 +110,8 @@ LT_AT_AUTORECONF([--force --verbose --install])
 LT_AT_CONFIGURE([--enable-ltdl-install --prefix=$prefix])
 LT_AT_MAKE([all install $tst_dist])
 
-AT_CHECK([test -f $prefix/lib/libltdl.la])
-AT_CHECK([test -f $prefix/include/ltdl.h])
+AT_CHECK([test -f "$prefix/lib/libltdl.la"])
+AT_CHECK([test -f "$prefix/include/ltdl.h"])
 
 AT_CLEANUP
 
index cf00688579d1168a8efb3b052c4da8191ed11657..508cbfe6b4829fb2ae823cc9c94a80aae8117883 100644 (file)
@@ -126,7 +126,7 @@ setup_plugin (void)
 # Skip this test when called from:
 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
 AT_CHECK([case $LIBLTDL in #(
- */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
+ */_inst/lib/*) test -f "$LIBLTDL" || (exit 77) ;;
 esac], [], [ignore])
 
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
diff --git a/tests/sh.test b/tests/sh.test
deleted file mode 100755 (executable)
index 5c6d675..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-#! /bin/sh
-# sh.test - check for some nonportable or dubious or undesired shell
-#           constructs in shell scripts.
-#
-#   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free
-#   Software Foundation, Inc.
-#   Written by Gary V. Vaughan, 2003
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-####
-
-. tests/defs || exit 1
-
-# Check all the "portable" shell scripts.
-status=$EXIT_SUCCESS
-
-# Check for bad binary operators.
-if $EGREP -n -e 'if[    ]+["'\'']?\$[^  ]+[     ]+(=|-[lg][te]|-eq|-ne)' $scripts; then
-  echo "use \`if test \$something =' instead of \`if \$something ='"
-  status=$EXIT_FAILURE
-fi
-
-# Check for bad unary operators.
-if $EGREP -n -e 'if[    ]+-' $scripts; then
-  echo "use \`if test -X' instead of \`if -X'"
-  status=$EXIT_FAILURE
-fi
-
-# Check for using `[' instead of `test'.
-if $EGREP -n -e 'if[    ]+\[' $scripts; then
-  echo "use \`if test' instead of \`if ['"
-  status=$EXIT_FAILURE
-fi
-
-# Check for using test X... instead of test "X...
-if $EGREP -n -e 'test[  ]+(![   ])?(-.[         ]+)?X' $scripts; then
-  echo "use \`test \"X...\"' instead of \`test X'"
-  status=$EXIT_FAILURE
-fi
-
-# Check for using test $... instead of test "$...
-if $EGREP -n -e 'test[  ]+(![   ])?(-.[         ]+)?X?\$' $scripts; then
-  echo "use \`test \"\$...\"' instead of \`test \$'"
-  status=$EXIT_FAILURE
-fi
-
-# Never use test -e.
-if $EGREP -n -e 'test[  ]+(![   ])?-e' $scripts; then
-  echo "use \`test -f' instead of \`test -e'"
-  status=$EXIT_FAILURE
-fi
-
-# Check for uses of Xsed without corresponding echo "X
-if $EGREP -n -e '\$Xsed' $scripts | $EGREP -v -n -e '\$ECHO \\*"X'; then
-  echo "occurrences of \`\$Xsed\' without \`echo \"X\' on the same line"
-  status=$EXIT_FAILURE
-fi
-
-# Check for quotes within backquotes within quotes "`"bar"`"
-if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \
-   $EGREP -v "### testsuite: skip nested quoting test$"; then
-  echo "nested quotes are dangerous"
-  status=$EXIT_FAILURE
-fi
-
-# Check for using set -- instead of set dummy
-if $EGREP -n -e 'set[   ]+--[   ]+' $scripts; then
-  echo "use \`set dummy ...' instead of \`set -- ...'"
-  status=$EXIT_FAILURE
-fi
-
-# Check for using shift after set dummy (same or following line).
-for s in $scripts
-do
-  if $SED -n '
-      /set[     ][      ]*dummy/{
-         /set.*dummy.*;.*shift/d
-         N
-         /\n.*shift/D
-         p
-      }' "$s" | $EGREP .; then
-    echo "use \`shift' after \`set dummy' in $s"
-    status=$EXIT_FAILURE
-  fi
-done
-
-# Check for opening brace on next line in shell function definition.
-# redirect stderr so we also barf when sed issues diagnostics.
-for s in $scripts
-do
-  if $SED -n '
-      /^func_.*(/{
-         N
-         /^func_[^      ]* ()\n{$/d
-         p
-      }' "$s" 2>&1 | $EGREP .; then
-    echo "Function definitions should look like this in $s:
-func_foo ()
-{
-  # ...
-}"
-    status=$EXIT_FAILURE
-  fi
-done
-
-# Check for correct usage of $cc_basename.
-# redirect stderr so we also barf when sed issues diagnostics.
-for s in "$abs_macro_dir/libtool.m4"
-do
-  if $SED -n '/case \$cc_basename in/,/esac/ {
-             /^[        ]*[a-zA-Z][a-zA-Z0-9+]*[^*][    ]*)/p
-             }'  $s 2>&1 | $EGREP .; then
-    echo "\$cc_basename matches should include a trailing \`*' in $s."
-    status=$EXIT_FAILURE
-  fi
-done
-
-exit $status
index 39b77c48f9f993370f0227fb4e554f3289fdc771..50c98d606b5d1399ca1cefb161af6ec54b4235ac 100644 (file)
@@ -66,8 +66,8 @@ LT_AT_CHECK_LIBTOOLIZE([--copy --ltdl=.], [], [ignore])
 LT_AT_CONFIGURE([--enable-ltdl-install --prefix=$prefix])
 LT_AT_MAKE([all install $tst_dist])
 
-AT_CHECK([test -f $prefix/lib/libltdl.la])
-AT_CHECK([test -f $prefix/include/ltdl.h])
+AT_CHECK([test -f "$prefix/lib/libltdl.la"])
+AT_CHECK([test -f "$prefix/include/ltdl.h"])
 
 AT_CLEANUP
 
index 5b779e6786b273f2acbfad88430c80bbe2ccf9cd..60078984a0252f7d6551d3a6a655e0ad598fd161 100644 (file)
@@ -327,7 +327,7 @@ for withdep in no yes; do
   # - remove the library images to catch failure to link statically/dynamically,
   # - add false other deplibs in the paths to catch (some) wrongly added run paths.
 
-  # if -all-static does not work, do not exercise it any more.
+  # if `-all-static' does not work, do not exercise it any more.
   all_static=-all-static
   test -z "$link_static_flag" && all_static=
 
index 4722ffd01b8ffc4b104e22bc1822625d52236d35..28e719148409c1cf5f29487264c15c4811e5b4cc 100644 (file)
@@ -264,7 +264,7 @@ do
                 [0],[ignore],[ignore])
        for st in '' '-static' '-no-install'
        do
-         # if -static is not passed, and the library is shared, then we have
+         # if `-static' is not passed, and the library is shared, then we have
          # to use -DLIBA_DLL_IMPORT, thus main.lo (and not main-static.lo).
          case $st,$l3 in
          -static,*) mst=-static ;;
index 0e003a38e86283b0be38d06676038d0b1c07d05b..11c0d69f751fcc5181951378ed8d9d7dc4b84a48 100644 (file)
@@ -96,8 +96,8 @@ LT_AT_BOOTSTRAP([--copy --ltdl], [-I sub/ltdl/m4], [ignore],
        [--add-missing --copy], [], [--enable-ltdl-install --prefix=$prefix],
        [all install $tst_dist])
 
-AT_CHECK([test -f $prefix/lib/libltdl.la])
-AT_CHECK([test -f $prefix/include/ltdl.h])
+AT_CHECK([test -f "$prefix/lib/libltdl.la"])
+AT_CHECK([test -f "$prefix/include/ltdl.h"])
 
 AT_CLEANUP
 
index 90aab6fe4e68cc6421bffe20bbe9753fb196427e..524db5e9490916723a7eb98db1c3f24bad41cb0b 100644 (file)
@@ -144,7 +144,7 @@ LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4], [ignore],
                [--add-missing], [], [], [all])
 
 AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore])
-AT_CHECK([test -f $sysroot/$prefix/lib/lib2.la])
+AT_CHECK([test -f "$sysroot/$prefix/lib/lib2.la"])
 AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la"], [1])
 cd ..
 
@@ -184,7 +184,7 @@ LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4], [ignore],
                [--add-missing], [], [], [all])
 
 AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore])
-AT_CHECK([test -f $sysroot/$prefix/bin/prog$EXEEXT])
+AT_CHECK([test -f "$sysroot/$prefix/bin/prog$EXEEXT"])
 AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT"], [1])
 AT_CHECK([grep "'.*=" $sysroot/$prefix/lib/lib2.la], [0], [ignore])
 AT_CHECK([./libtool --mode=finish $sysroot/$prefix/lib/lib@<:@12@:>@.la], [0], [ignore])
index 3c32333fe01518bf43d1914a74723d330c027ead..9b737e88a88b75e093241c926767d96a7fd11b03 100755 (executable)
@@ -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 "$ret" -eq 63 || test "$ret" -eq 1; 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 "$ret" -ne 0; then
   func_fatal_error "\`$AUTOCONF --trace' exited $ret"
 fi
 
index 0c2ffcf2e4032a039ed66fb7fbf6129b82e2bca9..84894e1ee79bbbb30f1f5e942546e9aaff474575 100644 (file)
@@ -262,7 +262,7 @@ LT_AT_UNIFY_NL([$1.t], [m4_default([$2], [$1])])[]dnl
 m4_define([LT_AT_EXEC_CHECK],
 [lt_exe=$1; if test -f "$1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
 AT_CHECK([if "$lt_exe" $5; then :; else lt_status=$?; ]dnl
-        [  m4_ifval([$2], [test $lt_status != $2 && ])]dnl
+        [  m4_ifval([$2], [test "$lt_status" != $2 && ])]dnl
         [  test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; ]dnl
         [  exit $lt_status; fi],[$2],[$3],[$4])
 ])
@@ -281,7 +281,7 @@ AT_CHECK([if "$lt_exe" $5; then :; else lt_status=$?; ]dnl
 m4_define([LT_AT_NOINST_EXEC_CHECK],
 [lt_exe=$1; if test -f "$1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
 AT_CHECK([if $LIBTOOL --mode=execute $2 "$lt_exe" $6; then :; else lt_status=$?; ]dnl
-        [  m4_ifval([$3], [test $lt_status != $3 && ])]dnl
+        [  m4_ifval([$3], [test "$lt_status" != $3 && ])]dnl
         [  test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; ]dnl
         [  exit $lt_status; fi],[$3],[$4],[$5])
 ])