about summary refs log tree commit diff homepage
path: root/autoconf
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2012-07-31 17:21:30 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2012-07-31 17:21:30 +0000
commitc582aa704b9f0d2729e76251aeb4676d4cb866a6 (patch)
treea8303928c18d72cad31f08cb07407ec080e9949d /autoconf
parent1fdb4ef41ea8a87225f751fa87534c5ac1751d40 (diff)
downloadklee-c582aa704b9f0d2729e76251aeb4676d4cb866a6.tar.gz
Patch by Dan Liew that removes our internal copy of STP, and makes the --with-stp option mandatory:
"1. At configure time the --with-stp= option is now mandatory.
 2. The HAVE_EXT_STP macro has been removed.
 3. The ENABLE_EXT_STP autoconf replacement variable has been removed and consequently the Makefile variable of the same name has been removed."



git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@161055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac23
1 files changed, 16 insertions, 7 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 2fa4fba0..928649b6 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -312,14 +312,26 @@ AC_CHECK_HEADERS([selinux/selinux.h],
         AC_SUBST(HAVE_SELINUX, 1),
         AC_SUBST(HAVE_SELINUX, 0))
 
+dnl **************************************************************************
+dnl Find an install of STP
+dnl **************************************************************************
+
 AC_ARG_WITH(stp,
   AS_HELP_STRING([--with-stp],
-    [Location of STP installation directory]),,)
+    [Location of STP installation directory]),,
+    [AC_MSG_ERROR([The --with-stp=<path> argument is mandatory where <path> is the path \
+to the root of your STP install])])
 
-if test X$with_stp = X ; then
-  AC_SUBST(ENABLE_EXT_STP,[[0]])
+#Check for empty argument
+if test "X$with_stp" = X ; then
+	AC_MSG_ERROR([<path> cannot be empty in --with-stp=<path>])
 else
-  stp_root=`cd $with_stp 2> /dev/null; pwd`
+  stp_root=`(cd $with_stp && pwd) 2> /dev/null`
+
+  #Check for bad path
+  if test "X$stp_root" = X ; then
+  	AC_MSG_ERROR([Cannot access path $with_stp passed to --with-stp])
+  fi
 
   old_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS -I$stp_root/include"
@@ -332,8 +344,6 @@ else
          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
 
@@ -346,7 +356,6 @@ AC_CONFIG_MAKEFILE(Makefile)
 AC_CONFIG_MAKEFILE(Makefile.common)
 AC_CONFIG_MAKEFILE(lib/Makefile)
 AC_CONFIG_MAKEFILE(runtime/Makefile)
-AC_CONFIG_MAKEFILE(stp/Makefile)
 AC_CONFIG_MAKEFILE(test/Makefile)
 AC_CONFIG_MAKEFILE(test/Makefile.tests)
 AC_CONFIG_MAKEFILE(tools/Makefile)