diff options
author | Sebastian Pop <spop@codeaurora.org> | 2012-05-07 20:20:07 +0400 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2012-05-07 20:20:07 +0400 |
commit | 082cea86165e30bfc71e02ea8eefb52444743a05 (patch) | |
tree | 30439714c677e2299a4ae5b824ca374a23bb0bd5 /polly/autoconf | |
parent | 8a59a957fbd560354ba5a9a91367410ae7da59d7 (diff) |
add a check for ISL codegen at configure time
llvm-svn: 156305
Diffstat (limited to 'polly/autoconf')
-rw-r--r-- | polly/autoconf/aclocal.m4 | 3 | ||||
-rw-r--r-- | polly/autoconf/configure.ac | 7 | ||||
-rwxr-xr-x | polly/autoconf/m4/find_lib_and_headers.m4 | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/polly/autoconf/aclocal.m4 b/polly/autoconf/aclocal.m4 index 720f8ee7131a..0db70c1a6188 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 63600a8e76e5..5c34f866435e 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 88880619ffde..e872819abc21 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]) |