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
####
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
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