From b0c1d7291bbedf505529c648bc6c8b59cbef0544 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 2 Apr 2015 22:48:08 +0100 Subject: Upstream STP now depends on an external build of minisat. Attempt to fix travis build of upstream STP and also how KLEE links against STP. --- autoconf/configure.ac | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'autoconf') diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 5b9c4e58..8d4f465c 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -576,10 +576,27 @@ AC_CHECK_HEADER(stp/c_interface.h,, ]) CPPFLAGS="$old_CPPFLAGS" +STP_NEEDS_MINISAT=0 AC_CHECK_LIB(stp, vc_setInterfaceFlags,, [ - AC_MSG_ERROR([Could not link with libstp]) + STP_NEEDS_MINISAT=1; AC_MSG_RESULT([Could not link with libstp]) ], "$STP_LDFLAGS") +dnl Try linking again with minisat if necessary +if test "X$STP_NEEDS_MINISAT" != 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]) + ], "$STP_LDFLAGS" "-lminisat" ) + + STP_LDFLAGS="${STP_LDFLAGS} -lstp -lminisat" +else + STP_LDFLAGS="${STP_LDFLAGS} -lstp" +fi + + AC_SUBST(STP_CFLAGS) AC_SUBST(STP_LDFLAGS) -- cgit 1.4.1