about summary refs log tree commit diff homepage
path: root/autoconf/configure.ac
diff options
context:
space:
mode:
authorDan Liew <delcypher@gmail.com>2014-02-14 16:37:33 +0000
committerDan Liew <delcypher@gmail.com>2014-02-14 16:37:33 +0000
commitd2f1684355e9a99545aa864e3eac81b259712a6f (patch)
tree8994639b406bfb3d9454ba1d0abc29a4656fd25a /autoconf/configure.ac
parent2ad968e1c05cfa40c75d0e5ba689beb91ed9d572 (diff)
parent81a485c9a8e9e75899a3bbd9f9ccf4035b0bf723 (diff)
downloadklee-d2f1684355e9a99545aa864e3eac81b259712a6f.tar.gz
Merge pull request #99 from delcypher/feature_support_stp_with_boost
Upstream STP's libstp now depends on boost.
Diffstat (limited to 'autoconf/configure.ac')
-rw-r--r--autoconf/configure.ac22
1 files changed, 21 insertions, 1 deletions
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