diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-04-02 22:48:08 +0100 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-04-03 16:34:07 +0100 |
commit | b0c1d7291bbedf505529c648bc6c8b59cbef0544 (patch) | |
tree | 6e72094693ef2b4f5da4064a3f5a3a3290bb9ff3 /autoconf | |
parent | 141f052a488c5b76adc658a185032c62d6244b9c (diff) | |
download | klee-b0c1d7291bbedf505529c648bc6c8b59cbef0544.tar.gz |
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.
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 19 |
1 files changed, 18 insertions, 1 deletions
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) |