diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-11 21:33:24 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-11 21:33:24 +0000 |
commit | a3c81e03f3b40689a0fa5adb9595d10fdf2d697c (patch) | |
tree | 0513271428917e22045e1daa338c643489c93ef8 /configure.ac | |
parent | 7290d950cf53afc2929f18e142d15151788b2087 (diff) | |
download | gcc-a3c81e03f3b40689a0fa5adb9595d10fdf2d697c.tar.gz |
Support official CLooG.org versions.
2010-11-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
* configure.ac: Support official CLooG.org versions.
* configure: Regenerate.
* config/cloog.m4: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 83 |
1 files changed, 27 insertions, 56 deletions
diff --git a/configure.ac b/configure.ac index 9b55f4e296c..50c9aee1d53 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,7 @@ m4_include([ltoptions.m4]) m4_include([ltsugar.m4]) m4_include([ltversion.m4]) m4_include([lt~obsolete.m4]) +m4_include([config/cloog.m4]) AC_INIT(move-if-change) AC_PREREQ(2.64) @@ -1587,68 +1588,38 @@ AC_SUBST(pplinc) # Check for CLOOG -clooglibs=" -lcloog " -clooginc=" -DCLOOG_PPL_BACKEND " - -AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package - Equivalent to --with-cloog-include=PATH/include - plus --with-cloog-lib=PATH/lib]) -AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files]) -AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library]) +dnl Provide configure switches and initialize clooginc & clooglibs +dnl with user input. +CLOOG_INIT_FLAGS if test "x$with_ppl" = "xno"; then with_cloog=no fi - -case $with_cloog in - no) - clooglibs= - clooginc= - ;; - "" | yes) - ;; - *) - clooglibs="-L$with_cloog/lib -lcloog" - clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND " - ;; -esac -if test "x$with_cloog_include" != x; then - clooginc="-I$with_cloog_include -DCLOOG_PPL_BACKEND " +if test "x${with_cloog}" = x && test "x${with_cloog_include}" = x \ + && test "x${with_cloog_lib}" = x && test -d ${srcdir}/cloog; then + clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' ' + clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include ' fi -if test "x$with_cloog_lib" != x; then - clooglibs="-L$with_cloog_lib -lcloog" +if test "x$with_cloog" != "xno"; then + dnl Version check for CLooG-Org + dnl As long as there is no new release of CLooG, + dnl we will check for 0.14.0. + dnl + dnl The first git revision that will work with + dnl GCC is: bd91b845a65805c290d43fc1bef8139864a163fb + dnl This is enforced implictly, as this is the commit that + dnl introduced the versioning information used within our + dnl checks. + dnl + dnl If we're using CLooG-Legacy, the provided version information + dnl will be ignored. + CLOOG_CHECK_VERSION(0,14,0) + + dnl Only execute fail-action, if CLooG has been + dnl requested. + CLOOG_IF_FAILED([ + AC_MSG_ERROR([Unable to find a usable CLooG. See config.log for details.])]) fi -if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then - clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' -lcloog ' - clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND ' - enable_cloog_version_check=no -fi - -AC_ARG_ENABLE(cloog-version-check, -[ --disable-cloog-version-check disable check for CLooG version], -ENABLE_CLOOG_CHECK=$enableval, -ENABLE_CLOOG_CHECK=yes) - -if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then - saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc" - AC_MSG_CHECKING([for version 0.15.5 (or later revision) of CLooG]) - AC_TRY_COMPILE([#include "cloog/cloog.h"],[ - #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5 - choke me - #endif - ], [AC_TRY_COMPILE([#include "cloog/cloog.h"],[ - #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 9 - choke me - #endif - ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])], - [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ]) - CFLAGS="$saved_CFLAGS" -fi - -# Flags needed for CLOOG -AC_SUBST(clooglibs) -AC_SUBST(clooginc) # Check for LTO support. AC_ARG_ENABLE(lto, |