diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-03-22 10:25:20 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-03-22 10:25:20 +0100 |
commit | fe508576ef1f815b22177d7597796886b91ea0c8 (patch) | |
tree | 885adbb929453bbbee04db48bdbbafec4e29205e /config/isl.m4 | |
parent | 445036bb9882485133750a14a5b3da30efeae2df (diff) | |
download | newlib-fe508576ef1f815b22177d7597796886b91ea0c8.zip newlib-fe508576ef1f815b22177d7597796886b91ea0c8.tar.gz newlib-fe508576ef1f815b22177d7597796886b91ea0c8.tar.bz2 |
Sync toplevel with upstream GCC.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'config/isl.m4')
-rw-r--r-- | config/isl.m4 | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/config/isl.m4 b/config/isl.m4 index f45854d..92524af 100644 --- a/config/isl.m4 +++ b/config/isl.m4 @@ -19,23 +19,23 @@ # ISL_INIT_FLAGS () # ------------------------- -# Provide configure switches for ISL support. +# Provide configure switches for isl support. # Initialize isllibs/islinc according to the user input. AC_DEFUN([ISL_INIT_FLAGS], [ AC_ARG_WITH([isl-include], [AS_HELP_STRING( [--with-isl-include=PATH], - [Specify directory for installed ISL include files])]) + [Specify directory for installed isl include files])]) AC_ARG_WITH([isl-lib], [AS_HELP_STRING( [--with-isl-lib=PATH], - [Specify the directory for the installed ISL library])]) + [Specify the directory for the installed isl library])]) AC_ARG_ENABLE(isl-version-check, [AS_HELP_STRING( [--disable-isl-version-check], - [disable check for ISL version])], + [disable check for isl version])], ENABLE_ISL_CHECK=$enableval, ENABLE_ISL_CHECK=yes) @@ -58,22 +58,24 @@ AC_DEFUN([ISL_INIT_FLAGS], if test "x${with_isl_lib}" != x; then isllibs="-L$with_isl_lib" fi - dnl If no --with-isl flag was specified and there is in-tree ISL + dnl If no --with-isl flag was specified and there is in-tree isl dnl source, set up flags to use that and skip any version tests - dnl as we cannot run them before building ISL. + dnl as we cannot run them before building isl. if test "x${islinc}" = x && test "x${isllibs}" = x \ && test -d ${srcdir}/isl; then isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' ENABLE_ISL_CHECK=no - AC_MSG_WARN([using in-tree ISL, disabling version check]) + AC_MSG_WARN([using in-tree isl, disabling version check]) fi + + isllibs="${isllibs} -lisl" ] ) # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT) # ---------------------------------------------------- -# Provide actions for failed ISL detection. +# Provide actions for failed isl detection. AC_DEFUN([ISL_REQUESTED], [ AC_REQUIRE([ISL_INIT_FLAGS]) @@ -90,20 +92,9 @@ AC_DEFUN([ISL_REQUESTED], ] ) -# _ISL_CHECK_CT_PROG(MAJOR, MINOR) -# -------------------------------------------- -# Helper for verifying ISL compile time version. -m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM( - [#include <isl/version.h> - #include <string.h>], - [if (strncmp (isl_version (), "isl-$1.$2", strlen ("isl-$1.$2")) != 0) - return 1; - ])]) - -# ISL_CHECK_VERSION ISL_CHECK_VERSION (MAJOR, MINOR) +# ISL_CHECK_VERSION ISL_CHECK_VERSION () # ---------------------------------------------------------------- -# Test the found ISL to be exact of version MAJOR.MINOR and at least -# REVISION. +# Test whether isl contains functionality added to the minimum expected version. AC_DEFUN([ISL_CHECK_VERSION], [ if test "${ENABLE_ISL_CHECK}" = yes ; then @@ -112,16 +103,32 @@ AC_DEFUN([ISL_CHECK_VERSION], _isl_saved_LIBS=$LIBS CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}" - LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" - LIBS="${_isl_saved_LIBS} -lisl" + LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}" + LIBS="${_isl_saved_LIBS} -lisl -lgmp" - AC_MSG_CHECKING([for version $1.$2 of ISL]) - AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)], - [gcc_cv_isl=yes], - [gcc_cv_isl=no], - [gcc_cv_isl=yes]) + AC_MSG_CHECKING([for isl 0.16, 0.15, or deprecated 0.14]) + AC_TRY_LINK([#include <isl/ctx.h>], + [isl_ctx_get_max_operations (isl_ctx_alloc ());], + [gcc_cv_isl=yes], + [gcc_cv_isl=no]) AC_MSG_RESULT([$gcc_cv_isl]) + if test "${gcc_cv_isl}" = no ; then + AC_MSG_RESULT([recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated]) + fi + + AC_MSG_CHECKING([for isl 0.16 or 0.15]) + AC_TRY_LINK([#include <isl/schedule.h>], + [isl_options_set_schedule_serialize_sccs (NULL, 0);], + [ac_has_isl_options_set_schedule_serialize_sccs=yes], + [ac_has_isl_options_set_schedule_serialize_sccs=no]) + AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs) + + if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then + islver="0.15" + AC_SUBST([islver]) + fi + CFLAGS=$_isl_saved_CFLAGS LDFLAGS=$_isl_saved_LDFLAGS LIBS=$_isl_saved_LIBS |