aboutsummaryrefslogtreecommitdiff
path: root/polly/autoconf
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2012-05-07 16:20:07 +0000
committerSebastian Pop <spop@codeaurora.org>2012-05-07 16:20:07 +0000
commit082cea86165e30bfc71e02ea8eefb52444743a05 (patch)
tree30439714c677e2299a4ae5b824ca374a23bb0bd5 /polly/autoconf
parent8a59a957fbd560354ba5a9a91367410ae7da59d7 (diff)
downloadllvm-082cea86165e30bfc71e02ea8eefb52444743a05.zip
llvm-082cea86165e30bfc71e02ea8eefb52444743a05.tar.gz
llvm-082cea86165e30bfc71e02ea8eefb52444743a05.tar.bz2
add a check for ISL codegen at configure time
llvm-svn: 156305
Diffstat (limited to 'polly/autoconf')
-rw-r--r--polly/autoconf/aclocal.m43
-rw-r--r--polly/autoconf/configure.ac7
-rwxr-xr-xpolly/autoconf/m4/find_lib_and_headers.m43
3 files changed, 10 insertions, 3 deletions
diff --git a/polly/autoconf/aclocal.m4 b/polly/autoconf/aclocal.m4
index 720f8ee..0db70c1 100644
--- a/polly/autoconf/aclocal.m4
+++ b/polly/autoconf/aclocal.m4
@@ -36,7 +36,8 @@ AC_DEFUN([find_lib_and_headers],
given_lib_path=lib_not_give_$1]
)
# Check for library and headers works
- AC_MSG_CHECKING([for $1 in $given_inc_path, $given_lib_path])
+ AC_MSG_CHECKING([for $1: $2 in $given_inc_path, and lib$3 in $given_lib_path])
+
# try to compile a file that includes a header of the library
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <$2>]], [[;]])],
[AC_MSG_RESULT([ok])
diff --git a/polly/autoconf/configure.ac b/polly/autoconf/configure.ac
index 63600a8..5c34f86 100644
--- a/polly/autoconf/configure.ac
+++ b/polly/autoconf/configure.ac
@@ -80,12 +80,17 @@ find_lib_and_headers([gmp], [gmp.h], [gmp], [required])
dnl Find Isl
find_lib_and_headers([isl], [isl/config.h], [isl], [required])
+dnl Find whether ISL has a codegen.h file.
+find_lib_and_headers([isl], [isl/codegen.h], [isl])
+AS_IF([test "x$isl_found" = "xyes"],
+ [AC_DEFINE([ISL_CODEGEN_FOUND],[1],[Define if ISL has a code generator])])
+
dnl Check that we have cloog.
saved_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $gmp_inc $isl_inc"
find_lib_and_headers([cloog], [cloog/isl/cloog.h], [cloog-isl], [required])
CXXFLAGS=$saved_CXXFLAGS
-AS_IF([test "cloog_found" = "xyes"],
+AS_IF([test "x$cloog_found" = "xyes"],
[AC_DEFINE([CLOOG_FOUND],[1],[Define if cloog found])])
dnl Check that we have openscop.
diff --git a/polly/autoconf/m4/find_lib_and_headers.m4 b/polly/autoconf/m4/find_lib_and_headers.m4
index 8888061..e872819 100755
--- a/polly/autoconf/m4/find_lib_and_headers.m4
+++ b/polly/autoconf/m4/find_lib_and_headers.m4
@@ -23,7 +23,8 @@ AC_DEFUN([find_lib_and_headers],
given_lib_path=lib_not_give_$1]
)
# Check for library and headers works
- AC_MSG_CHECKING([for $1 in $given_inc_path, $given_lib_path])
+ AC_MSG_CHECKING([for $1: $2 in $given_inc_path, and lib$3 in $given_lib_path])
+
# try to compile a file that includes a header of the library
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <$2>]], [[;]])],
[AC_MSG_RESULT([ok])