about summary refs log tree commit diff homepage
path: root/configure
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2015-04-02 22:48:08 +0100
committerDan Liew <daniel.liew@imperial.ac.uk>2015-04-03 16:34:07 +0100
commitb0c1d7291bbedf505529c648bc6c8b59cbef0544 (patch)
tree6e72094693ef2b4f5da4064a3f5a3a3290bb9ff3 /configure
parent141f052a488c5b76adc658a185032c62d6244b9c (diff)
downloadklee-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 'configure')
-rwxr-xr-xconfigure64
1 files changed, 63 insertions, 1 deletions
diff --git a/configure b/configure
index 82657008..85d10756 100755
--- a/configure
+++ b/configure
@@ -5085,6 +5085,7 @@ fi
 
 CPPFLAGS="$old_CPPFLAGS"
 
+STP_NEEDS_MINISAT=0
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vc_setInterfaceFlags in -lstp" >&5
 $as_echo_n "checking for vc_setInterfaceFlags in -lstp... " >&6; }
 if ${ac_cv_lib_stp_vc_setInterfaceFlags+:} false; then :
@@ -5130,11 +5131,72 @@ _ACEOF
 
 else
 
-       as_fn_error $? "Could not link with libstp" "$LINENO" 5
+       STP_NEEDS_MINISAT=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Could not link with libstp" >&5
+$as_echo "Could not link with libstp" >&6; }
 
 fi
 
 
+if test "X$STP_NEEDS_MINISAT" != X0 ; then
+  # Need to clear cached result
+  unset ac_cv_lib_stp_vc_setInterfaceFlags
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vc_setInterfaceFlags in -lstp" >&5
+$as_echo_n "checking for vc_setInterfaceFlags in -lstp... " >&6; }
+if ${ac_cv_lib_stp_vc_setInterfaceFlags+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lstp "$STP_LDFLAGS" "-lminisat"  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char vc_setInterfaceFlags ();
+int
+main ()
+{
+return vc_setInterfaceFlags ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_lib_stp_vc_setInterfaceFlags=yes
+else
+  ac_cv_lib_stp_vc_setInterfaceFlags=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stp_vc_setInterfaceFlags" >&5
+$as_echo "$ac_cv_lib_stp_vc_setInterfaceFlags" >&6; }
+if test "x$ac_cv_lib_stp_vc_setInterfaceFlags" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSTP 1
+_ACEOF
+
+  LIBS="-lstp $LIBS"
+
+else
+
+	       as_fn_error $? "Unable to link with libstp. Check config.log to see what went wrong" "$LINENO" 5
+
+fi
+
+
+  STP_LDFLAGS="${STP_LDFLAGS} -lstp -lminisat"
+else
+  STP_LDFLAGS="${STP_LDFLAGS} -lstp"
+fi
+
+