From 843698676de2b31d422254ac35546393a0d2d469 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Sat, 25 Jan 2014 09:43:07 +0000 Subject: Upstream STP's libstp now depends on boost. This commit updates the configure script to detect this by first trying to link without boost and if that fails then trying to link libstp with boost. This also updates the relevant Makefiles so that the klee and kleaver executables link in STP's boost dependencies if necessary. --- autoconf/configure.ac | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'autoconf') diff --git a/autoconf/configure.ac b/autoconf/configure.ac index af5affc0..7d4ff994 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -523,10 +523,30 @@ else ]) CPPFLAGS="$old_CPPFLAGS" + STP_NEEDS_BOOST=0 + + # Try old STP AC_CHECK_LIB(stp, vc_setInterfaceFlags,, [ - AC_MSG_ERROR([Unable to link with libstp]) + STP_NEEDS_BOOST=1 ; AC_MSG_RESULT([Could not link with libstp. Checking if newer STP is being used]) ], -L$stp_root/lib) + dnl Flags for upstream STP which has boost dependency + UPSTREAM_STP_LINK_FLAGS="-lboost_system -lboost_program_options" + if test "X$STP_NEEDS_BOOST" != X0 ; then + # Need to clear cached result + unset ac_cv_lib_stp_vc_setInterfaceFlags + + AC_CHECK_LIB(stp, + vc_setInterfaceFlags,, [ + AC_MSG_ERROR([Unable to link with libstp. Check config.log to see what went wrong]) + ], -L$stp_root/lib $UPSTREAM_STP_LINK_FLAGS ) + + AC_SUBST(UPSTREAM_STP_LINK_FLAGS, $UPSTREAM_STP_LINK_FLAGS) + AC_SUBST(STP_NEEDS_BOOST, $STP_NEEDS_BOOST) + else + AC_MSG_RESULT([Using old STP]) + fi + AC_SUBST(STP_ROOT,$stp_root) fi -- cgit 1.4.1