about summary refs log tree commit diff homepage
path: root/autoconf
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2010-07-14 18:54:38 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2010-07-14 18:54:38 +0000
commitca22c4dee94552f65e6044341b0365a21d794d65 (patch)
treed952573658c01dd894005d52afce598197e946a7 /autoconf
parent59c0dedbc949433afeac482e8243119240076026 (diff)
downloadklee-ca22c4dee94552f65e6044341b0365a21d794d65.tar.gz
Add option to use an external version of STP
This patch adds a new configure option, --with-stp, which configures
KLEE to use an external version of STP instead of the version in the
source tree.  It includes documentation referring users to the STP
download location.

git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@108347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac25
1 files changed, 25 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 4266ac47..015c4f44 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -262,6 +262,31 @@ AC_CHECK_HEADERS([selinux/selinux.h],
         AC_SUBST(HAVE_SELINUX, 1),
         AC_SUBST(HAVE_SELINUX, 0))
 
+AC_ARG_WITH(stp,
+  AS_HELP_STRING([--with-stp],
+    [Location of STP installation directory]),,)
+
+if test X$with_stp = X ; then
+  AC_SUBST(ENABLE_EXT_STP,[[0]])
+else
+  stp_root=`cd $with_stp 2> /dev/null; pwd`
+
+  old_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="$CPPFLAGS -I$stp_root/include"
+  AC_CHECK_HEADER(stp/c_interface.h,, [
+         AC_MSG_ERROR([Unable to use stp/c_interface.h header])
+  ])
+  CPPFLAGS="$old_CPPFLAGS"
+
+  AC_CHECK_LIB(stp, vc_setInterfaceFlags,, [
+         AC_MSG_ERROR([Unable to link with libstp])
+  ], -L$stp_root/lib)
+
+  AC_DEFINE(HAVE_EXT_STP, 1, [Using external STP])
+  AC_SUBST(ENABLE_EXT_STP,[[1]])
+  AC_SUBST(STP_ROOT,$stp_root)
+fi
+
 dnl **************************************************************************
 dnl * Create the output files
 dnl **************************************************************************