]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix pic_flag test unportabilities.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 2 Aug 2010 20:21:05 +0000 (22:21 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 2 Aug 2010 20:21:05 +0000 (22:21 +0200)
* tests/pic_flag.at (override pic_flag at configure time): Skip
test if the compiler produces a warning containing `fpic'.
Do not use nonportable `grep -e', for Solaris.
Report by Charles Wilson.

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

index a0e0469151b266a312e7c4358c40e6e59024f3ee..3655c07dd110a64fa134015fbb2110c3f3e66e38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix pic_flag test unportabilities.
+       * tests/pic_flag.at (override pic_flag at configure time): Skip
+       test if the compiler produces a warning containing `fpic'.
+       Do not use nonportable `grep -e', for Solaris.
+       Report by Charles Wilson.
+
 2010-08-01  Paolo Bonzini  <bonzini@gnu.org>
 
        Fix bug in postdeps computation
index a729d16e26e0768e82d7fb95f3b807cf00d4fc9a..e62e1b7a5a1589a68390fd54831c192d7ba9e049 100644 (file)
@@ -34,7 +34,9 @@ int func(void) { return data; }
 cp foo.c foo.cpp
 C_pic_flag='-fpic -DPIC'
 AT_CHECK([$CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 77],
-        [], [ignore], [ignore])
+        [], [stdout], [stderr])
+# The configure test for the PIC flag also checks for warnings.
+AT_CHECK([grep fpic stdout stderr && exit 77], [1])
 
 CXX_pic_flag='-fpic -DPIC'
 if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else
@@ -46,6 +48,6 @@ AT_CHECK(["$abs_top_srcdir"/configure lt_cv_prog_compiler_pic="$C_pic_flag" ]dnl
 : ${MAKE=make}
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([if ./libtool --features | grep 'enable shared libraries'; then ]dnl
-        [  grep -e -fpic stdout; else exit 77; fi], [], [ignore], [ignore])
+        [  grep ' -fpic' stdout; else exit 77; fi], [], [ignore], [ignore])
 
 AT_CLEANUP