mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-11 15:00:08 +08:00
tests: let pic_flag and with-pic Autotests work on non-VPATH builds.
* 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>
This commit is contained in:
parent
215149492c
commit
c91aa0b5c7
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -22,6 +22,14 @@
|
||||
####
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user