From dddfeb6992f0c9c7c0fa3345bc8ef6be62ee36b4 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 25 Jun 2015 16:50:13 +0000 Subject: [PATCH] Fix autotools build There were two issues: * ISL's configure generates include/isl/stdint.h, not isl/stdint.h as assumed. This is also changed in the CMake build. * Need to pass --with-int=imath to ISL's configure; the default is gmp. Polly's configure has been regenerated due to changing configure.ac llvm-svn: 240657 --- polly/CMakeLists.txt | 1 + polly/Makefile.config.in | 1 + polly/autoconf/configure.ac | 5 +++++ polly/configure | 4 ++++ polly/lib/CMakeLists.txt | 2 +- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt index cb7b91f4a317..5c0270ebe404 100644 --- a/polly/CMakeLists.txt +++ b/polly/CMakeLists.txt @@ -114,6 +114,7 @@ include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/lib/JSON/include + ${CMAKE_CURRENT_BINARY_DIR}/lib/External/isl/include ${CMAKE_CURRENT_BINARY_DIR}/lib/External/isl ${CMAKE_CURRENT_SOURCE_DIR}/lib/External/isl/include ${CMAKE_CURRENT_SOURCE_DIR}/lib/External/isl/imath diff --git a/polly/Makefile.config.in b/polly/Makefile.config.in index b74613add90e..457567e19d78 100644 --- a/polly/Makefile.config.in +++ b/polly/Makefile.config.in @@ -51,6 +51,7 @@ CUDALIB_FOUND := @cuda_found@ # Set include directories POLLY_INC := @cuda_inc@ \ + -I$(POLLY_OBJ_ROOT)/lib/External/isl/include \ -I$(POLLY_OBJ_ROOT)/lib/External/isl \ -I$(POLLY_SRC_ROOT)/lib/JSON/include \ -I$(POLLY_SRC_ROOT)/lib/External/isl/include \ diff --git a/polly/autoconf/configure.ac b/polly/autoconf/configure.ac index d5d705fc7ce1..9731ab3364ec 100644 --- a/polly/autoconf/configure.ac +++ b/polly/autoconf/configure.ac @@ -97,6 +97,11 @@ dnl ************************************************************************** dnl Let ISL's configure generate isl_config.h and gitversion.h AC_CONFIG_SUBDIRS(lib/External/isl) +AC_CONFIG_COMMANDS_POST([ + dnl Configure ISL with small integer optimization, but do not add the + dnl option to config.status as it is mandatory for Polly. + ac_configure_args="$ac_configure_args --with-int=imath" +]) dnl This must be last AC_CONFIG_HEADERS(include/polly/Config/config.h) diff --git a/polly/configure b/polly/configure index bbaac84dd032..ec4db1275443 100755 --- a/polly/configure +++ b/polly/configure @@ -2499,6 +2499,7 @@ fi subdirs="$subdirs lib/External/isl" + ac_config_headers="$ac_config_headers include/polly/Config/config.h" cat >confcache <<\_ACEOF @@ -3762,6 +3763,9 @@ test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + ac_configure_args="$ac_configure_args --with-int=imath" + + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt index 33135d0eee08..417e28e95f84 100644 --- a/polly/lib/CMakeLists.txt +++ b/polly/lib/CMakeLists.txt @@ -77,7 +77,7 @@ check_c_source_compiles(" # Write configure result configure_file("External/gitversion.h.cmake" "${ISL_BINARY_DIR}/gitversion.h") configure_file("External/isl_config.h.cmake" "${ISL_BINARY_DIR}/isl_config.h") -file(WRITE "${ISL_BINARY_DIR}/isl/stdint.h" "#include ") +file(WRITE "${ISL_BINARY_DIR}/include/isl/stdint.h" "#include ") # ISL files to compile set (ISL_FILES