]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Skip sys_lib_search_path on systems without libz.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 16 Nov 2008 22:31:56 +0000 (23:31 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 16 Nov 2008 22:32:57 +0000 (23:32 +0100)
* tests/search-path.at (sys_lib_search_path): Autotest needs at
least one AT_CHECK executed in a test group.  So if we haven't
found -lz anywhere, as may happen with cross-compilers, skip the
test.
* THANKS: Update.
Report by Alon Bar-Lev.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
THANKS
tests/search-path.at

index aff79eb84f84cd5ca892530c3059f5ecd88dc49c..05285beaf7091c4edeb905324685af2f4248ef5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-11-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Skip sys_lib_search_path on systems without libz.
+       * tests/search-path.at (sys_lib_search_path): Autotest needs at
+       least one AT_CHECK executed in a test group.  So if we haven't
+       found -lz anywhere, as may happen with cross-compilers, skip the
+       test.
+       * THANKS: Update.
+       Report by Alon Bar-Lev.
+
        Fix execute mode test to actually expose cwrapper failures.
        * tests/execute-mode.at (execute mode): Actually also test the
        cwrapper on the arguments.
diff --git a/THANKS b/THANKS
index 66f705b23a96abc25de06f2df877aed8f56a49a3..d37d2648909d145a94c84cf49bf34529cc5a336e 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -68,6 +68,7 @@
   and generally assist in the libtool maintainership process:
 
   Alexei Sheplyakov            varg@theor.jinr.ru
+  Alon Bar-Lev                 alon.barlev@gmail.com
   Andreas Schwab               schwab@suse.de
   Andrey Slepuhin              pooh@msu.ru
   Aneesh Kumar K.V             kvaneesh@hotmail.com
index 2bc56c0de1f7ec3a838cc922f5f5156b89626095..929d2dd8edf0f32e4a5df13a6e1a80c1370c483a 100644 (file)
@@ -1,6 +1,6 @@
 # search-path.at -- test sys_lib_search_path_spec             -*- Autotest -*-
 #
-#   Copyright (C) 2006 Free Software Foundation, Inc.
+#   Copyright (C) 2006, 2008 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2006
 #
 #   This file is part of GNU Libtool.
@@ -41,13 +41,20 @@ int main()
 $CC $CPPFLAGS $CFLAGS -c main.c
 eval `$LIBTOOL --config | $EGREP '^(sys_lib_search_path_spec)='`
 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+no_libz=:
 for path in $sys_lib_search_path; do
   if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -L$path -lz
   then
     AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -lz],
              [], [ignore], [ignore])
+    no_libz=false
     break
   fi
 done
 
+# If -lz doesn't exist (hello, cross compiler!), we need a dummy test.
+if $no_libz; then
+  AT_CHECK([exit 77])
+fi
+
 AT_CLEANUP