about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorMartin Nowack <martin@se.inf.tu-dresden.de>2013-12-19 08:45:27 +0100
committerMartin Nowack <martin@se.inf.tu-dresden.de>2013-12-19 08:47:59 +0100
commit99b748b47f97361f42c5c1778dde3f6542cd7a3e (patch)
treedc4c9571f50ef84c99b4847eab7192574307d258
parenta45df61f6641ed0f6b92919bf377ce2ef1f1d839 (diff)
downloadklee-99b748b47f97361f42c5c1778dde3f6542cd7a3e.tar.gz
Allow different build modes for LLVM coexist
-rw-r--r--autoconf/configure.ac3
-rwxr-xr-xconfigure4
2 files changed, 3 insertions, 4 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 4bd79557..09769f8f 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -161,8 +161,7 @@ AC_ARG_WITH(llvm-build-mode,
 AC_MSG_CHECKING([llvm build mode])
 
 if test X${with_llvm_build_mode} = Xcheck ; then
-  llvm_configs="`echo $llvm_obj/*/bin/llvm-config`"
-  dnl This will be true if the user has exactly 1 build mode built
+  llvm_configs="`ls -1 $llvm_obj/*/bin/llvm-config 2>/dev/null | head -n 1`"
   if test -x "$llvm_configs" ; then
     llvm_build_mode="`$llvm_configs --build-mode`"
   else
diff --git a/configure b/configure
index ab148c2c..f2714ae8 100755
--- a/configure
+++ b/configure
@@ -2660,8 +2660,8 @@ fi
 $as_echo_n "checking llvm build mode... " >&6; }
 
 if test X${with_llvm_build_mode} = Xcheck ; then
-  llvm_configs="`echo $llvm_obj/*/bin/llvm-config`"
-    if test -x "$llvm_configs" ; then
+  llvm_configs="`ls -1 $llvm_obj/*/bin/llvm-config 2>/dev/null | head -n 1`"
+  if test -x "$llvm_configs" ; then
     llvm_build_mode="`$llvm_configs --build-mode`"
   else
     as_fn_error $? "Could not autodetect build mode" "$LINENO" 5