]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: let pic_flag and with-pic Autotests work on non-VPATH builds.
authorGary V. Vaughan <gary@gnu.org>
Sun, 27 Nov 2011 12:18:23 +0000 (19:18 +0700)
committerGary V. Vaughan <gary@gnu.org>
Thu, 4 Oct 2012 13:11:06 +0000 (20:11 +0700)
* tests/pic_flag.at: Use _LT_DEMO_SETUP to generate a demo style
project, rather than relying on $abs_top_srcdir/configure.
* tests/with-pic.at: Likewise.
* Makefile.am (TESTSUITE_AT): Move tests/pic_flag.at and
tests/with-pic.at so that they run immediately following
tests/demo.at.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Makefile.am
tests/pic_flag.at
tests/with-pic.at

index 74db695248087fa6eb9c1d6f29e16914091594c3..180d82fcaefc939aff27d5a63d81f76c5c4cd84c 100644 (file)
@@ -619,6 +619,8 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/getopt-m4sh.at \
                  tests/libtoolize.at \
                  tests/demo.at \
+                 tests/pic_flag.at \
+                 tests/with-pic.at \
                  tests/cdemo.at \
                  tests/convenience.at \
                  tests/depdemo.at \
@@ -675,13 +677,11 @@ TESTSUITE_AT      = tests/testsuite.at \
                  tests/ctor.at \
                  tests/exceptions.at \
                  tests/early-libtool.at \
-                 tests/with-pic.at \
                  tests/no-executables.at \
                  tests/deplibs-ident.at \
                  tests/configure-iface.at \
                  tests/stresstest.at \
                  tests/cmdline_wrap.at \
-                 tests/pic_flag.at \
                  tests/f77demo.at \
                  tests/fcdemo.at \
                  tests/darwin.at \
index 20beec0ff4802462e984e70773cbf59c394d5af4..c72593bb8d4612775254bb5b93186e4f5d69e2c0 100644 (file)
@@ -44,10 +44,17 @@ if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else
   CXX_pic_flag=
 fi
 
-AT_CHECK([test . != "$at_srcdir" || exit 77])
+# Set up a tests/demo.at style project.
+_LT_DEMO_SETUP
+
+# Bootstrap, and configure it so that we can extract libtool --config
+# settings.
+LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
+    [ignore], [ignore])
+
 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])
+               [./configure])
 : ${MAKE=make}
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([if ./libtool --features | grep 'enable shared libraries'; then ]dnl
index 915acf598e6d2d768321fc6f8261cc1def7b5a9f..2ffbd03456f2ca3957da52537e8c97f2b88adf77 100644 (file)
 ####
 
 AT_SETUP([test --with-pic])
+
+# Set up a tests/demo.at style project.
+_LT_DEMO_SETUP
+
+# Bootstrap, and configure it so that we can extract libtool --config
+# settings.
+LT_AT_BOOTSTRAP([], [-I m4], [], [--add-missing], [],
+    [], [ignore])
 eval `$LIBTOOL --config | $EGREP '^(pic_flag|FGREP)='`
 
 real_pic=false
@@ -31,25 +39,24 @@ esac
 AT_CHECK([$real_pic || exit 77])
 AT_CHECK([test . != "$at_srcdir" || exit 77])
 
-CONFIGURE=$abs_top_srcdir/tests/demo/configure
 : ${MAKE=make}
 
-LT_AT_CONFIGURE([--disable-shared --with-pic=no], [$CONFIGURE])
+LT_AT_CONFIGURE([--disable-shared --with-pic=no])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([$FGREP -v "$pic_flag" stdout], [], [ignore], [ignore])
 $MAKE clean
 
-LT_AT_CONFIGURE([--disable-shared --with-pic=yes], [$CONFIGURE])
+LT_AT_CONFIGURE([--disable-shared --with-pic=yes])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([$FGREP "$pic_flag" stdout], [], [ignore], [ignore])
 $MAKE clean
 
-LT_AT_CONFIGURE([--disable-shared --with-pic="demo,foo,bar"], [$CONFIGURE])
+LT_AT_CONFIGURE([--disable-shared --with-pic="demo,foo,bar"])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([$FGREP "$pic_flag" stdout], [], [ignore], [ignore])
 $MAKE clean
 
-LT_AT_CONFIGURE([--disable-shared --with-pic="foo,bar"], [$CONFIGURE])
+LT_AT_CONFIGURE([--disable-shared --with-pic="foo,bar"])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
 AT_CHECK([$FGREP -v "$pic_flag" stdout], [], [ignore], [ignore])
 $MAKE clean