Skip to content

Commit

Permalink
Fix autotools build
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Meinersbur committed Jun 25, 2015
1 parent d63d3cd commit dddfeb6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions polly/CMakeLists.txt
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions polly/Makefile.config.in
Expand Up @@ -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 \
Expand Down
5 changes: 5 additions & 0 deletions polly/autoconf/configure.ac
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions polly/configure
Expand Up @@ -2499,6 +2499,7 @@ fi
subdirs="$subdirs lib/External/isl"



ac_config_headers="$ac_config_headers include/polly/Config/config.h"

cat >confcache <<\_ACEOF
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion polly/lib/CMakeLists.txt
Expand Up @@ -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 <stdint.h>")
file(WRITE "${ISL_BINARY_DIR}/include/isl/stdint.h" "#include <stdint.h>")

# ISL files to compile
set (ISL_FILES
Expand Down

0 comments on commit dddfeb6

Please sign in to comment.