diff mbox

Support official CLooG.org versions.

Message ID 1289505716-9480-1-git-send-email-simbuerg@googlemail.com
State New
Headers show

Commit Message

Andreas Simbürger Nov. 11, 2010, 8:01 p.m. UTC
--------------------------
Changes to previous patch:
  * Moved AC_SUBST's inside CLOOG_INIT_FLAGS
  * Separated in-tree opts from CLOOG_INIT_FLAGS

As discussed with Paolo, I will prepare a separate patch to implement
his proposal of moving the version checking inside the gcc/configure.ac
script.

Sorry for the delay, after a small break after my exams I got pulled off
by some other work and completely forgot about sending in this patch :-(.
--------------------------

Add support for official CLooG releases.
CLooG's configuration gets detected within 2 stages:

Stage 1: Detect the installed CLooG version.
  This is done by linking test programs against the various
  CLooG libraries. As CLooG's library sonames depend on the
  used backend, this is sufficient to detect the used backend.

  We only detect this backends, in order:
    1) CLooG-PPL (Legacy): The "old" CLooG.
    2) CLooG-ISL: The "new" CLooG.
    3) CLooG-Parma: An alternative backend, to compare it with
    CLooG-ISL.

  CLooG-Poly is not detected, as the PolyLib may conflict
  with GCC's license.

Stage 2: Version checks.
  After detecting the right configuration, we finally check
  if the installed version is usable. There are 2 different
  checks: One for CLooG-PPL (Legacy) and one for CLooG-ISL.

  * CLooG-ISL:
    As the "new" CLooG provides methods to check for its version at
    both compile and run time, we use the compile time check.
    We check for the constants to verify the header's compatibility.

  * CLooG-PPL (Legacy):
    This version check provides the same semantics as before.
    As CLooG-PPL (Legacy) provides the same constants as the
    official CLooG, we can use the same test program for the
    compile time check.

Tested with CLooG-ISL and CLooG-PPL (Legacy).
As for now, CLooG-Parma fails to build.

2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>

	* configure.ac: Support official CLooG.org versions.
	* configure: Regenerate.
	* config/cloog.m4: New.
---
 ChangeLog.graphite |    6 +
 config/cloog.m4    |  252 +++++++++++++++++++++++++++++++++++++++++++
 configure          |  304 ++++++++++++++++++++++++++++++++++++++++++----------
 configure.ac       |   83 +++++----------
 4 files changed, 533 insertions(+), 112 deletions(-)
 create mode 100644 config/cloog.m4

Comments

Paolo Bonzini Nov. 11, 2010, 8:38 p.m. UTC | #1
On 11/11/2010 09:01 PM, Andreas Simbürger wrote:
> --------------------------
> Changes to previous patch:
>    * Moved AC_SUBST's inside CLOOG_INIT_FLAGS
>    * Separated in-tree opts from CLOOG_INIT_FLAGS
>
> As discussed with Paolo, I will prepare a separate patch to implement
> his proposal of moving the version checking inside the gcc/configure.ac
> script.
>
> Sorry for the delay, after a small break after my exams I got pulled off
> by some other work and completely forgot about sending in this patch :-(.

Ok.

Paolo
Sebastian Pop Nov. 11, 2010, 9:35 p.m. UTC | #2
On Thu, Nov 11, 2010 at 14:38, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 11/11/2010 09:01 PM, Andreas Simbürger wrote:
>>
>> --------------------------
>> Changes to previous patch:
>>   * Moved AC_SUBST's inside CLOOG_INIT_FLAGS
>>   * Separated in-tree opts from CLOOG_INIT_FLAGS
>>
>> As discussed with Paolo, I will prepare a separate patch to implement
>> his proposal of moving the version checking inside the gcc/configure.ac
>> script.
>>
>> Sorry for the delay, after a small break after my exams I got pulled off
>> by some other work and completely forgot about sending in this patch :-(.
>
> Ok.

Thanks Andreas for your effort on getting this done.
I committed the patch on trunk as r166622.

Sebastian
Sebastian Pop Nov. 11, 2010, 9:40 p.m. UTC | #3
On Thu, Nov 11, 2010 at 15:35, Sebastian Pop <sebpop@gmail.com> wrote:
> On Thu, Nov 11, 2010 at 14:38, Paolo Bonzini <bonzini@gnu.org> wrote:
>> On 11/11/2010 09:01 PM, Andreas Simbürger wrote:
>>>
>>> --------------------------
>>> Changes to previous patch:
>>>   * Moved AC_SUBST's inside CLOOG_INIT_FLAGS
>>>   * Separated in-tree opts from CLOOG_INIT_FLAGS
>>>
>>> As discussed with Paolo, I will prepare a separate patch to implement
>>> his proposal of moving the version checking inside the gcc/configure.ac
>>> script.
>>>
>>> Sorry for the delay, after a small break after my exams I got pulled off
>>> by some other work and completely forgot about sending in this patch :-(.
>>
>> Ok.
>
> Thanks Andreas for your effort on getting this done.
> I committed the patch on trunk as r166622.

Paolo,
I committed this only on the GCC side.  I remember that in the past there
were some problems of synchronizing the toplevel configure changes with
the other projects at toplevel.  Where exactly this change should also be
committed?

Thanks,
Sebastian
Jack Howarth Nov. 11, 2010, 10:32 p.m. UTC | #4
On Thu, Nov 11, 2010 at 03:35:02PM -0600, Sebastian Pop wrote:
> On Thu, Nov 11, 2010 at 14:38, Paolo Bonzini <bonzini@gnu.org> wrote:
> > On 11/11/2010 09:01 PM, Andreas Simbürger wrote:
> >>
> >> --------------------------
> >> Changes to previous patch:
> >>   * Moved AC_SUBST's inside CLOOG_INIT_FLAGS
> >>   * Separated in-tree opts from CLOOG_INIT_FLAGS
> >>
> >> As discussed with Paolo, I will prepare a separate patch to implement
> >> his proposal of moving the version checking inside the gcc/configure.ac
> >> script.
> >>
> >> Sorry for the delay, after a small break after my exams I got pulled off
> >> by some other work and completely forgot about sending in this patch :-(.
> >
> > Ok.
> 
> Thanks Andreas for your effort on getting this done.
> I committed the patch on trunk as r166622.
> 
> Sebastian

Sebastian,
   Is there a schedule yet for the cloog.org 0.15 release? Now that the gcc
build machinery support is in place, perhaps a release candidate tarball for
cloog.org 0.15 could be posted.
             Jack
Paolo Bonzini Nov. 11, 2010, 10:44 p.m. UTC | #5
On 11/11/2010 10:40 PM, Sebastian Pop wrote:
> Paolo,
> I committed this only on the GCC side.  I remember that in the past there
> were some problems of synchronizing the toplevel configure changes with
> the other projects at toplevel.  Where exactly this change should also be
> committed?

I'll take care of it tomorrow.

Paolo
Jack Howarth Nov. 11, 2010, 11:41 p.m. UTC | #6
On Thu, Nov 11, 2010 at 03:35:02PM -0600, Sebastian Pop wrote:
> On Thu, Nov 11, 2010 at 14:38, Paolo Bonzini <bonzini@gnu.org> wrote:
> > On 11/11/2010 09:01 PM, Andreas Simbürger wrote:
> >>
> >> --------------------------
> >> Changes to previous patch:
> >>   * Moved AC_SUBST's inside CLOOG_INIT_FLAGS
> >>   * Separated in-tree opts from CLOOG_INIT_FLAGS
> >>
> >> As discussed with Paolo, I will prepare a separate patch to implement
> >> his proposal of moving the version checking inside the gcc/configure.ac
> >> script.
> >>
> >> Sorry for the delay, after a small break after my exams I got pulled off
> >> by some other work and completely forgot about sending in this patch :-(.
> >
> > Ok.
> 
> Thanks Andreas for your effort on getting this done.
> I committed the patch on trunk as r166622.
> 
> Sebastian

Sebastian,
   Do these new changes require cloog-ppl 0.15.10 rather than 0.15.9? I am
finding the the x86_64-apple-darwin bootstrap fails with...

checking for version 0.10 (or later revision) of PPL... yes
checking for installed CLooG... no
configure: error: Unable to find a usable CLooG. See config.log for details.
### execution of /var/tmp/tmp.1.UpSRyE failed, exit code 1

with the config.log contents...

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ../gcc-4.6-20101111/configure --prefix=/sw --prefix=/sw/lib/gcc4.6 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.6/info --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.6 --enable-checking=yes

## --------- ##
## Platform. ##
## --------- ##

hostname = MacPro.local
uname -m = i386
uname -r = 10.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 10.5.0: Fri Nov  5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
         Darwin Kernel Version 10.5.0: Fri Nov  5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386
Kernel configured for up to 8 processors.
8 processors are physically available.
8 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 12.00 gigabytes
Default processor set: 98 tasks, 287 threads, 8 processors
Load average: 0.98, Mach factor: 7.01
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /sw/var/lib/fink/path-prefix-10.6
PATH: /sw/bin
PATH: /sw/sbin
PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/X11R6/bin
PATH: /sw/share/tinker/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2199: checking build system type
configure:2213: result: x86_64-apple-darwin10.5.0
configure:2260: checking host system type
configure:2273: result: x86_64-apple-darwin10.5.0
configure:2293: checking target system type
configure:2306: result: x86_64-apple-darwin10.5.0
configure:2360: checking for a BSD-compatible install
configure:2428: result: /usr/bin/install -c
configure:2439: checking whether ln works
configure:2461: result: yes
configure:2465: checking whether ln -s works
configure:2469: result: yes
configure:2476: checking for a sed that does not truncate output
configure:2540: result: /usr/bin/sed
configure:2549: checking for gawk
configure:2565: found /sw/bin/gawk
configure:2576: result: gawk
configure:3825: checking for gcc
configure:3841: found /sw/var/lib/fink/path-prefix-10.6/gcc
configure:3852: result: gcc
configure:4081: checking for C compiler version
configure:4090: gcc --version >&5
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4101: $? = 0
configure:4090: gcc -v >&5
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~105/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)
configure:4101: $? = 0
configure:4090: gcc -V >&5
gcc-4.2: argument to `-V' is missing
configure:4101: $? = 1
configure:4090: gcc -qversion >&5
i686-apple-darwin10-gcc-4.2.1: no input files
configure:4101: $? = 1
configure:4121: checking for C compiler default output file name
configure:4143: gcc    conftest.c  >&5
configure:4147: $? = 0
configure:4184: result: a.out
configure:4200: checking whether the C compiler works
configure:4209: ./a.out
configure:4213: $? = 0
configure:4228: result: yes
configure:4235: checking whether we are cross compiling
configure:4237: result: no
configure:4240: checking for suffix of executables
configure:4247: gcc -o conftest    conftest.c  >&5
configure:4251: $? = 0
configure:4273: result: 
configure:4279: checking for suffix of object files
configure:4301: gcc -c   conftest.c >&5
configure:4305: $? = 0
configure:4326: result: o
configure:4330: checking whether we are using the GNU C compiler
configure:4349: gcc -c   conftest.c >&5
configure:4349: $? = 0
configure:4358: result: yes
configure:4367: checking whether gcc accepts -g
configure:4387: gcc -c -g  conftest.c >&5
configure:4387: $? = 0
configure:4428: result: yes
configure:4445: checking for gcc option to accept ISO C89
configure:4509: gcc  -c -g -O2  conftest.c >&5
configure:4509: $? = 0
configure:4522: result: none needed
configure:4600: checking for g++
configure:4616: found /sw/var/lib/fink/path-prefix-10.6/g++
configure:4627: result: g++
configure:4654: checking for C++ compiler version
configure:4663: g++ --version >&5
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4674: $? = 0
configure:4663: g++ -v >&5
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~105/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)
configure:4674: $? = 0
configure:4663: g++ -V >&5
g++-4.2: argument to `-V' is missing
configure:4674: $? = 1
configure:4663: g++ -qversion >&5
i686-apple-darwin10-g++-4.2.1: no input files
configure:4674: $? = 1
configure:4678: checking whether we are using the GNU C++ compiler
configure:4697: g++ -c   conftest.cpp >&5
configure:4697: $? = 0
configure:4706: result: yes
configure:4715: checking whether g++ accepts -g
configure:4735: g++ -c -g  conftest.cpp >&5
configure:4735: $? = 0
configure:4776: result: yes
configure:4865: checking for gnatbind
configure:4895: result: no
configure:4957: checking for gnatmake
configure:4987: result: no
configure:5006: checking whether compiler driver understands Ada
configure:5029: result: no
configure:5038: checking how to compare bootstrapped objects
configure:5063: result: cmp --ignore-initial=16 $$f1 $$f2
configure:5079: checking for objdir
configure:5094: result: .libs
configure:5260: checking for the correct version of gmp.h
configure:5280: gcc -c -g -O2 -I/sw/include -I/sw/include   conftest.c >&5
configure:5280: $? = 0
configure:5298: gcc -c -g -O2 -I/sw/include -I/sw/include   conftest.c >&5
configure:5298: $? = 0
configure:5299: result: yes
configure:5315: checking for the correct version of mpfr.h
configure:5333: gcc -c -g -O2 -I/sw/include -I/sw/include   conftest.c >&5
configure:5333: $? = 0
configure:5350: gcc -c -g -O2 -I/sw/include -I/sw/include   conftest.c >&5
configure:5350: $? = 0
configure:5351: result: yes
configure:5368: checking for the correct version of mpc.h
configure:5385: gcc -c -g -O2 -I/sw/include -I/sw/include   conftest.c >&5
configure:5385: $? = 0
configure:5401: gcc -c -g -O2 -I/sw/include -I/sw/include   conftest.c >&5
configure:5401: $? = 0
configure:5402: result: yes
configure:5420: checking for the correct version of the gmp/mpfr/mpc libraries
configure:5451: gcc -o conftest -g -O2 -I/sw/include -I/sw/include    conftest.c  -L/sw/lib -L/sw/lib -lmpc -lmpfr -lgmp >&5
configure:5451: $? = 0
configure:5452: result: yes
configure:5625: checking for version 0.10 (or later revision) of PPL
configure:5642: gcc -c -g -O2 -I/sw/include  -I/sw/include -I/sw/include   conftest.c >&5
configure:5642: $? = 0
configure:5643: result: yes
configure:5736: checking for installed CLooG
configure:5753: gcc -o conftest -g -O2 -I/sw/include -I/sw/include  -I/sw/include -I/sw/include   -DCLOOG_PPL_BACKEND -DCLOOG_INT_GMP -DCLOOG_ORG  -L/sw/lib conftest.c -lcloog  >&5
Undefined symbols:
  "_ppl_version_major", referenced from:
      _main in ccRD4C69.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
configure:5753: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include <cloog/cloog.h>
| int
| main ()
| {
| ppl_version_major ()
|   ;
|   return 0;
| }
configure:5768: gcc -o conftest -g -O2 -I/sw/include -I/sw/include  -I/sw/include -I/sw/include   -DCLOOG_PPL_BACKEND -DCLOOG_INT_GMP -DCLOOG_ORG  -L/sw/lib conftest.c -lcloog-isl -lisl  >&5
ld: library not found for -lcloog-isl
collect2: ld returned 1 exit status
configure:5768: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include <cloog/cloog.h>
| int
| main ()
| {
| cloog_version ()
|   ;
|   return 0;
| }
configure:5783: gcc -o conftest -g -O2 -I/sw/include -I/sw/include  -I/sw/include -I/sw/include   -DCLOOG_PPL_BACKEND -DCLOOG_INT_GMP -DCLOOG_ORG  -L/sw/lib conftest.c -lcloog-ppl  >&5
ld: library not found for -lcloog-ppl
collect2: ld returned 1 exit status
configure:5783: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include <cloog/cloog.h>
| int
| main ()
| {
| cloog_version ()
|   ;
|   return 0;
| }
configure:5797: result: no
configure:5952: error: Unable to find a usable CLooG. See config.log for details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-apple-darwin10.5.0
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set=
ac_cv_env_AR_value=
ac_cv_env_AS_FOR_TARGET_set=
ac_cv_env_AS_FOR_TARGET_value=
ac_cv_env_AS_set=
ac_cv_env_AS_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_FOR_TARGET_set=
ac_cv_env_CXX_FOR_TARGET_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_DLLTOOL_FOR_TARGET_set=
ac_cv_env_DLLTOOL_FOR_TARGET_value=
ac_cv_env_DLLTOOL_set=
ac_cv_env_DLLTOOL_value=
ac_cv_env_GCC_FOR_TARGET_set=
ac_cv_env_GCC_FOR_TARGET_value=
ac_cv_env_GCJ_FOR_TARGET_set=
ac_cv_env_GCJ_FOR_TARGET_value=
ac_cv_env_GFORTRAN_FOR_TARGET_set=
ac_cv_env_GFORTRAN_FOR_TARGET_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LD_FOR_TARGET_set=
ac_cv_env_LD_FOR_TARGET_value=
ac_cv_env_LD_set=
ac_cv_env_LD_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LIPO_FOR_TARGET_set=
ac_cv_env_LIPO_FOR_TARGET_value=
ac_cv_env_LIPO_set=
ac_cv_env_LIPO_value=
ac_cv_env_NM_FOR_TARGET_set=
ac_cv_env_NM_FOR_TARGET_value=
ac_cv_env_NM_set=
ac_cv_env_NM_value=
ac_cv_env_OBJCOPY_set=
ac_cv_env_OBJCOPY_value=
ac_cv_env_OBJDUMP_FOR_TARGET_set=
ac_cv_env_OBJDUMP_FOR_TARGET_value=
ac_cv_env_OBJDUMP_set=
ac_cv_env_OBJDUMP_value=
ac_cv_env_RANLIB_FOR_TARGET_set=
ac_cv_env_RANLIB_FOR_TARGET_value=
ac_cv_env_RANLIB_set=
ac_cv_env_RANLIB_value=
ac_cv_env_STRIP_FOR_TARGET_set=
ac_cv_env_STRIP_FOR_TARGET_value=
ac_cv_env_STRIP_set=
ac_cv_env_STRIP_value=
ac_cv_env_WINDMC_FOR_TARGET_set=
ac_cv_env_WINDMC_FOR_TARGET_value=
ac_cv_env_WINDMC_set=
ac_cv_env_WINDMC_value=
ac_cv_env_WINDRES_FOR_TARGET_set=
ac_cv_env_WINDRES_FOR_TARGET_value=
ac_cv_env_WINDRES_set=
ac_cv_env_WINDRES_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_build_configargs_set=
ac_cv_env_build_configargs_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_host_configargs_set=
ac_cv_env_host_configargs_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_env_target_configargs_set=
ac_cv_env_target_configargs_value=
ac_cv_host=x86_64-apple-darwin10.5.0
ac_cv_objext=o
ac_cv_path_INTLTOOL_PERL=/usr/bin/perl
ac_cv_path_SED=/usr/bin/sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_target=x86_64-apple-darwin10.5.0
acx_cv_cc_gcc_supports_ada=no
acx_cv_prog_LN=ln
gcc_cv_cloog_type=no
gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
lt_cv_objdir=.libs

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET=''
AS=''
AS_FOR_BUILD='$(AS)'
AS_FOR_TARGET=''
AWK='gawk'
BISON=''
BUILD_CONFIG=''
CC='gcc'
CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET=''
CFLAGS='-g -O2'
CFLAGS_FOR_BUILD=''
CFLAGS_FOR_TARGET=''
COMPILER_AS_FOR_TARGET=''
COMPILER_LD_FOR_TARGET=''
COMPILER_NM_FOR_TARGET=''
CONFIGURE_GDB_TK=''
CPPFLAGS=''
CXX='g++'
CXXFLAGS='-g -O2'
CXXFLAGS_FOR_BUILD=''
CXXFLAGS_FOR_TARGET=''
CXX_FOR_BUILD='$(CXX)'
CXX_FOR_TARGET=''
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS=''
DLLTOOL=''
DLLTOOL_FOR_BUILD='$(DLLTOOL)'
DLLTOOL_FOR_TARGET=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EXEEXT=''
EXPECT=''
FLAGS_FOR_TARGET=''
FLEX=''
GCC_FOR_TARGET=''
GCC_SHLIB_SUBDIR=''
GCJ_FOR_BUILD='$(GCJ)'
GCJ_FOR_TARGET=''
GDB_TK=''
GFORTRAN_FOR_BUILD='$(GFORTRAN)'
GFORTRAN_FOR_TARGET=''
GNATBIND='no'
GNATMAKE='no'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD='/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld'
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LD_FOR_BUILD='$(LD)'
LD_FOR_TARGET=''
LEX=''
LIBOBJS=''
LIBS=''
LIPO=''
LIPO_FOR_TARGET=''
LN='ln'
LN_S='ln -s'
LTLIBOBJS=''
M4=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO=''
NM=''
NM_FOR_BUILD='$(NM)'
NM_FOR_TARGET=''
OBJCOPY=''
OBJDUMP=''
OBJDUMP_FOR_TARGET=''
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET=''
RAW_CXX_FOR_TARGET=''
RPATH_ENVVAR=''
RUNTEST=''
SED='/usr/bin/sed'
SHELL='/bin/sh'
STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='../gcc-4.6-20101111/configure --prefix=/sw --prefix=/sw/lib/gcc4.6 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.6/info --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.6 --enable-checking=yes'
WINDMC=''
WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET=''
WINDRES=''
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET=''
YACC=''
ac_ct_CC='gcc'
ac_ct_CXX='g++'
bindir='${exec_prefix}/bin'
build='x86_64-apple-darwin10.5.0'
build_alias=''
build_configargs=''
build_configdirs='build-libiberty build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes'
build_cpu='x86_64'
build_libsubdir='build-x86_64-apple-darwin10.5.0'
build_noncanonical='x86_64-apple-darwin10.5.0'
build_os='darwin10.5.0'
build_subdir='build-x86_64-apple-darwin10.5.0'
build_tooldir=''
build_vendor='apple'
clooginc=''
clooglibs=''
compare_exclusions=''
config_shell='/bin/sh'
configdirs='intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libelf libiconv texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
do_compare='cmp --ignore-initial=16 $$f1 $$f2'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
extra_host_libiberty_configure_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
gmpinc='-I/sw/include -I/sw/include '
gmplibs='-L/sw/lib -L/sw/lib -lmpc -lmpfr -lgmp'
host='x86_64-apple-darwin10.5.0'
host_alias=''
host_configargs=''
host_cpu='x86_64'
host_noncanonical='x86_64-apple-darwin10.5.0'
host_os='darwin10.5.0'
host_subdir='.'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='/sw/lib/gcc4.6/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='/sw/share/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
poststage1_ldflags=''
poststage1_libs=''
pplinc='-I/sw/include '
ppllibs='-L/sw/lib -lppl_c -lppl -lgmpxx'
prefix='/sw/lib/gcc4.6'
program_transform_name='s&$$&-fsf-4.6&'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags=''
stage1_checking=''
stage1_languages=''
stage1_ldflags=''
stage1_libs=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='x86_64-apple-darwin10.5.0'
target_alias=''
target_configargs=''
target_configdirs='target-libgcc target-libiberty target-libgloss target-newlib target-libgomp target-libstdc++-v3 target-libmudflap target-libssp target-libquadmath target-libgfortran target-boehm-gc target-libffi target-zlib target-qthreads target-libjava target-libobjc target-libada target-examples target-groff target-gperf target-rda'
target_cpu='x86_64'
target_noncanonical='x86_64-apple-darwin10.5.0'
target_os='darwin10.5.0'
target_subdir='x86_64-apple-darwin10.5.0'
target_vendor='apple'
tooldir=''

## ------------------- ##
## File substitutions. ##
## ------------------- ##

alphaieee_frag=''
host_makefile_frag='config/mh-darwin'
ospace_frag=''
serialization_dependencies=''
target_makefile_frag=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define LT_OBJDIR ".libs/"

configure: exit 1
Jack Howarth Nov. 12, 2010, 1:53 a.m. UTC | #7
On Thu, Nov 11, 2010 at 06:41:03PM -0500, Jack Howarth wrote:
> 
> Sebastian,
>    Do these new changes require cloog-ppl 0.15.10 rather than 0.15.9? I am
> finding the the x86_64-apple-darwin bootstrap fails with...
> 
> checking for version 0.10 (or later revision) of PPL... yes
> checking for installed CLooG... no
> configure: error: Unable to find a usable CLooG. See config.log for details.
> ### execution of /var/tmp/tmp.1.UpSRyE failed, exit code 1
> 

Sebastian,
   I finally caught on that the recent check-ins completely depreciate the use
of cloog-ppl. It would be nice if the configure error message alerted the user
to that fact. Installed cloog-org from the git using the recommended commands...

git clone git://repo.or.cz/cloog.git
cd cloog
./get_submodules.sh
./autogen.sh
./configure --with-gmp-prefix=/path/to/gmp/installation
make
And as root: make install

which doesn't appear to provide the required support for building cloog-ppl
in cloog.org. Using the installed cloog-isl, I was able to start a build of
current gcc trunk with...

../gcc-4.6-20101111/configure --prefix=/sw --prefix=/sw/lib/gcc4.6 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.6/info --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.6 --enable-checking=yes

where the ppl installed is 0.11. This build unfortunately fails at...

/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/lib/ -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/include -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/sys-include    -c   -g -O2 -mdynamic-no-pic -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6-20101111/gcc -I../../gcc-4.6-20101111/gcc/. -I../../gcc-4.6-20101111/gcc/../include -I../../gcc-4.6-20101111/gcc/../libcpp/include -I/sw/include -I/sw/include  -I../../gcc-4.6-20101111/gcc/../libdecnumber -I../../gcc-4.6-20101111/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/include  -I/sw/include -DCLOOG_INT_GMP -DCLOOG_ORG -I/sw/include ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c -o graphite-cloog-util.o
../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'oppose_constraint':
../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:63:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'cloog_matrix_to_ppl_constraint':
../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:180:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'new_Constraint_System_from_Cloog_Matrix':
../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:210:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
cc1: all warnings being treated as errors

make[3]: *** [graphite-cloog-util.o] Error 1
make[3]: *** Waiting for unfinished jobs....

Is there any documentation on how to build cloog-ppl from the cloog.org git?
Also what will be the recommended build configuration for gcc's graphite support
in gcc 4.6? Will it be ppl 0.11 and cloog-isl or cloog-ppl?
              Jack
Jack Howarth Nov. 12, 2010, 2:07 a.m. UTC | #8
On Thu, Nov 11, 2010 at 08:53:20PM -0500, Jack Howarth wrote:
> 
> Sebastian,
>    I finally caught on that the recent check-ins completely depreciate the use
> of cloog-ppl. It would be nice if the configure error message alerted the user
> to that fact. Installed cloog-org from the git using the recommended commands...
> 
> git clone git://repo.or.cz/cloog.git
> cd cloog
> ./get_submodules.sh
> ./autogen.sh
> ./configure --with-gmp-prefix=/path/to/gmp/installation
> make
> And as root: make install
> 
> which doesn't appear to provide the required support for building cloog-ppl
> in cloog.org. Using the installed cloog-isl, I was able to start a build of
> current gcc trunk with...
> 
> ../gcc-4.6-20101111/configure --prefix=/sw --prefix=/sw/lib/gcc4.6 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.6/info --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.6 --enable-checking=yes
> 
> where the ppl installed is 0.11. This build unfortunately fails at...
> 
> /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/lib/ -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/include -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/sys-include    -c   -g -O2 -mdynamic-no-pic -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6-20101111/gcc -I../../gcc-4.6-20101111/gcc/. -I../../gcc-4.6-20101111/gcc/../include -I../../gcc-4.6-20101111/gcc/../libcpp/include -I/sw/include -I/sw/include  -I../../gcc-4.6-20101111/gcc/../libdecnumber -I../../gcc-4.6-20101111/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/include  -I/sw/include -DCLOOG_INT_GMP -DCLOOG_ORG -I/sw/include ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c -o graphite-cloog-util.o
> ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'oppose_constraint':
> ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:63:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'cloog_matrix_to_ppl_constraint':
> ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:180:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'new_Constraint_System_from_Cloog_Matrix':
> ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:210:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> cc1: all warnings being treated as errors
> 
> make[3]: *** [graphite-cloog-util.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> 
> Is there any documentation on how to build cloog-ppl from the cloog.org git?
> Also what will be the recommended build configuration for gcc's graphite support
> in gcc 4.6? Will it be ppl 0.11 and cloog-isl or cloog-ppl?
>               Jack

Sebastian,
   I just checked the graphite branch and was surprised to find that gcc trunk is being jumped ahead
of the graphite branch with respect to cloog.org support. It doesn't appear that the configury changes
have been installed there yet.
             Jack
Jack Howarth Nov. 12, 2010, 2:23 a.m. UTC | #9
On Thu, Nov 11, 2010 at 09:07:22PM -0500, Jack Howarth wrote:

> > where the ppl installed is 0.11. This build unfortunately fails at...
> > 
> > /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/lib/ -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/include -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/sys-include    -c   -g -O2 -mdynamic-no-pic -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6-20101111/gcc -I../../gcc-4.6-20101111/gcc/. -I../../gcc-4.6-20101111/gcc/../include -I../../gcc-4.6-20101111/gcc/../libcpp/include -I/sw/include -I/sw/include  -I../../gcc-4.6-20101111/gcc/../libdecnumber -I../../gcc-4.6-20101111/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/include  -I/sw/include -DCLOOG_INT_GMP -DCLOOG_ORG -I/sw/include ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c -o graphite-cloog-util.o
> > ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'oppose_constraint':
> > ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:63:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> > ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'cloog_matrix_to_ppl_constraint':
> > ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:180:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> > ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c: In function 'new_Constraint_System_from_Cloog_Matrix':
> > ../../gcc-4.6-20101111/gcc/graphite-cloog-util.c:210:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> > cc1: all warnings being treated as errors
> > 
> > make[3]: *** [graphite-cloog-util.o] Error 1
> > make[3]: *** Waiting for unfinished jobs....
> > 

FYI, I get the same error if I build gcc trunk against ppl 0.10.2 and cloog-isl.
               Jack
Joseph Myers Nov. 12, 2010, 2:29 a.m. UTC | #10
On Thu, 11 Nov 2010, Jack Howarth wrote:

> On Thu, Nov 11, 2010 at 06:41:03PM -0500, Jack Howarth wrote:
> > 
> > Sebastian,
> >    Do these new changes require cloog-ppl 0.15.10 rather than 0.15.9? I am
> > finding the the x86_64-apple-darwin bootstrap fails with...
> > 
> > checking for version 0.10 (or later revision) of PPL... yes
> > checking for installed CLooG... no
> > configure: error: Unable to find a usable CLooG. See config.log for details.
> > ### execution of /var/tmp/tmp.1.UpSRyE failed, exit code 1
> > 
> 
> Sebastian,
>    I finally caught on that the recent check-ins completely depreciate the use
> of cloog-ppl. It would be nice if the configure error message alerted the user
> to that fact. Installed cloog-org from the git using the recommended commands...

If the configure changes have the effect of deprecating something or 
adjusting the required versions of something, there is a serious problem 
and they should not have been approved: the documentation of prerequisites 
in install.texi does not appear to have been changed and it still 
specifies CLooG-PPL.  It is not acceptable to change the prerequisites 
without including the documentation changes in the same commit.

> Is there any documentation on how to build cloog-ppl from the cloog.org git?
> Also what will be the recommended build configuration for gcc's graphite support
> in gcc 4.6? Will it be ppl 0.11 and cloog-isl or cloog-ppl?

Regarding recommended configurations the same principle as before still 
applies: the version of GCC and the configure options should determine the 
code generated, so given any particular configure options it should not 
accept different CLooG variants that may cause GCC to generate different 
code, it should accept only the recommended version unless 
sanity-check-disabling options such as --disable-cloog-version-check are 
passed.
Andreas Schwab Nov. 15, 2010, 3:38 p.m. UTC | #11
Andreas Simbürger <simbuerg@googlemail.com> writes:

> +  AC_ARG_WITH(cloog_include,

The option is called --with-cloog-include, not --with-cloog_include.

> +  AC_ARG_WITH(cloog_lib,

Likewise.

Andreas.
Andreas Schwab Nov. 15, 2010, 3:48 p.m. UTC | #12
Andreas Simbürger <simbuerg@googlemail.com> writes:

> +  AC_ARG_WITH(cloog,
> +    [AS_HELP_STRING(
> +      [--with-cloog=PATH],
> +      [Specify prefix directory for the installed CLooG-PPL package.

The help string should start with lower case.

Andreas.
Paolo Bonzini Nov. 15, 2010, 3:51 p.m. UTC | #13
On 11/15/2010 04:38 PM, Andreas Schwab wrote:
>> >  +  AC_ARG_WITH(cloog_include,
> The option is called --with-cloog-include, not --with-cloog_include.
>
>> >  +  AC_ARG_WITH(cloog_lib,
> Likewise.

I noticed the same, but since it doesn't matter (either works) and other 
AC_ARG_WITH invocations are using underscores, I didn't point that out 
for consistency.

Paolo
diff mbox

Patch

diff --git a/ChangeLog.graphite b/ChangeLog.graphite
index 46f1290..d067200 100644
--- a/ChangeLog.graphite
+++ b/ChangeLog.graphite
@@ -1,3 +1,9 @@ 
+2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
+
+	* configure.ac: Support official CLooG.org versions.
+	* configure: Regenerate.
+	* config/cloog.m4: New.
+
 2010-10-20  Sebastian Pop  <sebastian.pop@amd.com>
 
 	* Merge from mainline (164578:165734).
diff --git a/config/cloog.m4 b/config/cloog.m4
new file mode 100644
index 0000000..9ddea98
--- /dev/null
+++ b/config/cloog.m4
@@ -0,0 +1,252 @@ 
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+#
+# Contributed by Andreas Simbuerger <simbuerg@fim.uni-passau.de>
+
+# CLOOG_INIT_FLAGS ()
+# -------------------------
+# Provide configure switches for CLooG support.
+# Initialize clooglibs/clooginc according to the user input.
+AC_DEFUN([CLOOG_INIT_FLAGS],
+[
+  AC_ARG_WITH(cloog,
+    [AS_HELP_STRING(
+      [--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,
+    [AS_HELP_STRING(
+      [--with-cloog-include=PATH],
+      [Specify directory for installed CLooG include files])])
+  AC_ARG_WITH(cloog_lib,
+    [AS_HELP_STRING(
+      [--with-cloog-lib=PATH],
+      [Specify the directory for the installed CLooG library])])
+  
+  AC_ARG_ENABLE(cloog-version-check,
+    [AS_HELP_STRING(
+      [--disable-cloog-version-check],
+      [disable check for CLooG version])],
+    ENABLE_CLOOG_CHECK=$enableval,
+    ENABLE_CLOOG_CHECK=yes)
+  
+  # Initialize clooglibs and clooginc.
+  case $with_cloog in
+    no)
+      clooglibs=
+      clooginc=
+      ;;
+    "" | yes)
+      ;;
+    *)
+      clooglibs="-L$with_cloog/lib"
+      clooginc="-I$with_cloog/include"
+      ;;
+  esac
+  if test "x${with_cloog_include}" != x ; then
+    clooginc="-I$with_cloog_include"
+  fi
+  if test "x${with_cloog_lib}" != x; then
+    clooglibs="-L$with_cloog_lib"
+  fi
+
+  dnl Flags needed for CLOOG
+  AC_SUBST(clooglibs)
+  AC_SUBST(clooginc)
+]
+)
+
+# CLOOG_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
+# ----------------------------------------------------
+# Provide actions for failed CLooG detection.
+AC_DEFUN([CLOOG_REQUESTED],
+[
+  AC_REQUIRE([CLOOG_INIT_FLAGS])
+
+  if test "x${with_cloog}" != x \
+    || test "x${with_cloog_include}" != x \
+    || test "x${with_cloog_lib}" != x ; then
+    $1
+  else
+    $2
+  fi
+]
+)
+
+# _CLOOG_ORG_PROG ()
+# ------------------
+# Helper for detecting CLooG.org's backend.
+m4_define([_CLOOG_ORG_PROG],[AC_LANG_PROGRAM(
+  [#include <cloog/cloog.h>],
+  [cloog_version ()])])
+
+# _CLOOG_PPL_LEGACY_PROG ()
+# -------------------------
+# Helper for detecting CLooG-Legacy (CLooG-PPL).
+m4_define([_CLOOG_PPL_LEGACY_PROG], [AC_LANG_PROGRAM(
+  [#include <cloog/cloog.h>],
+  [ppl_version_major ()])])
+
+# CLOOG_FIND_FLAGS ()
+# ------------------
+# Detect the used CLooG-backend and set clooginc/clooglibs/cloog_org.
+# Preference: CLooG-PPL (Legacy) > CLooG-ISL > CLooG-PPL
+AC_DEFUN([CLOOG_FIND_FLAGS],
+[
+  AC_REQUIRE([CLOOG_INIT_FLAGS])
+
+  _cloog_saved_CFLAGS=$CFLAGS
+  _cloog_saved_CPPFLAGS=$CPPFLAGS
+  _cloog_saved_LDFLAGS=$LDFLAGS
+  _cloog_saved_LIBS=$LIBS
+
+  _clooglegacyinc="-DCLOOG_PPL_BACKEND"
+  _cloogorginc="-DCLOOG_INT_GMP -DCLOOG_ORG"
+ 
+  dnl clooglibs & clooginc may have been initialized by CLOOG_INIT_FLAGS.
+  CFLAGS="${CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
+  CPPFLAGS="${CPPFLAGS} ${_clooglegacyinc} ${_cloogorginc}"
+  LDFLAGS="${LDFLAGS} ${clooglibs}"
+
+  AC_CACHE_CHECK([for installed CLooG],
+                 [gcc_cv_cloog_type],
+    [LIBS="-lcloog ${_cloog_saved_LIBS}"
+     AC_LINK_IFELSE([_CLOOG_PPL_LEGACY_PROG],
+      [gcc_cv_cloog_type="PPL Legacy"],
+      [LIBS="-lcloog-isl -lisl ${_cloog_saved_LIBS}"
+       AC_LINK_IFELSE([_CLOOG_ORG_PROG],
+        [gcc_cv_cloog_type=ISL],
+        [LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
+         AC_LINK_IFELSE([_CLOOG_ORG_PROG],
+          [gcc_cv_cloog_type=PPL],
+          [gcc_cv_cloog_type=no])])])])
+
+  case $gcc_cv_cloog_type in
+    "PPL Legacy")
+      clooginc="${clooginc} ${_clooglegacyinc}"
+      clooglibs="${clooglibs} -lcloog"
+      cloog_org=no
+      ;;
+    "ISL")
+      clooginc="${clooginc} ${_cloogorginc}"
+      clooglibs="${clooglibs} -lcloog-isl"
+      cloog_org=yes
+      ;;
+    "PPL")
+      clooginc="${clooginc} ${_cloogorginc}"
+      clooglibs="${clooglibs} -lcloog-ppl"
+      cloog_org=yes
+      ;;
+    *)
+      clooglibs=
+      clooginc=
+      cloog_org=
+      ;;
+  esac
+
+  LIBS=$_cloog_saved_LIBS
+  CFLAGS=$_cloog_saved_CFLAGS
+  CPPFLAGS=$_cloog_saved_CPPFLAGS
+  LDFLAGS=$_cloog_saved_LDFLAGS
+]
+)
+
+# _CLOOG_CHECK_CT_PROG(MAJOR, MINOR, REVISION)
+# --------------------------------------------
+# Helper for verifying CLooG's compile time version.
+m4_define([_CLOOG_CHECK_CT_PROG],[AC_LANG_PROGRAM(
+  [#include "cloog/cloog.h"],
+  [#if CLOOG_VERSION_MAJOR != $1 \
+    || CLOOG_VERSION_MINOR != $2 \
+    || CLOOG_VERSION_REVISION < $3
+    choke me
+   #endif])])
+
+# _CLOOG_CHECK_RT_PROG ()
+# -----------------------
+# Helper for verifying that CLooG's compile time version
+# matches the run time version.
+m4_define([_CLOOG_CHECK_RT_PROG],[AC_LANG_PROGRAM(
+  [#include "cloog/cloog.h"],
+  [if ((cloog_version_major () != CLOOG_VERSION_MAJOR)
+    && (cloog_version_minor () != CLOOG_VERSION_MINOR)
+    && (cloog_version_revision () != CLOOG_VERSION_REVISION))
+    {
+      return 1;
+    }])])
+
+# CLOOG_CHECK_VERSION CLOOG_CHECK_VERSION (MAJOR, MINOR, REVISION)
+# ----------------------------------------------------------------
+# Test the found CLooG to be exact of version MAJOR.MINOR and at least
+# REVISION.
+# If we're using the old CLooG-PPL (Legacy), the old version check will
+# be executed (Ignores the provided version information).
+AC_DEFUN([CLOOG_CHECK_VERSION],
+[
+  AC_REQUIRE([CLOOG_FIND_FLAGS])
+
+  if test "${ENABLE_CLOOG_CHECK}" = yes ; then
+    _cloog_saved_CFLAGS=$CFLAGS
+    _cloog_saved_LDFLAGS=$LDFLAGS
+
+    CFLAGS="${_cloog_saved_CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
+    LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs}"
+
+    if test "${cloog_org}" = yes ; then
+      AC_CACHE_CHECK([for verison $1.$2.$3 of CLooG],
+        [gcc_cv_cloog_ct_0_14_0],
+        [AC_COMPILE_IFELSE([_CLOOG_CHECK_CT_PROG($1,$2,$3)],
+          [gcc_cv_cloog_ct_0_14_0=yes],
+          [gcc_cv_cloog_ct_0_14_0=no])])
+    elif test "${cloog_org}" = no ; then
+      AC_CACHE_CHECK([for version 0.15.5 (or later revision) of CLooG],
+        [gcc_cv_cloog_ct_0_15_5],
+        [AC_COMPILE_IFELSE([_CLOOG_CHECK_CT_PROG(0,15,5)],
+          [AC_COMPILE_IFELSE([_CLOOG_CHECK_CT_PROG(0,15,9)],
+           [gcc_cv_cloog_ct_0_15_5=yes],
+            [gcc_cv_cloog_ct_0_15_5="buggy but acceptable"])],
+          [gcc_cv_cloog_ct_0_15_5=no])])
+    fi
+
+    CFLAGS=$_cloog_saved_CFLAGS
+    LDFLAGS=$_cloog_saved_LDFLAGS
+  fi
+]
+)
+
+# CLOOG_IF_FAILED (ACTION-IF-FAILED)
+# ----------------------------------
+# Executes ACTION-IF-FAILED, if GRAPHITE was requested and
+# the checks failed.
+AC_DEFUN([CLOOG_IF_FAILED],
+[
+  CLOOG_REQUESTED([graphite_requested=yes], [graphite_requested=no])
+  
+  if test "${gcc_cv_cloog_ct_0_14_0}" = no \
+    || test "${gcc_cv_cloog_rt_0_14_0}" = no \
+    || test "${gcc_cv_cloog_ct_0_15_5}" = no; then
+    clooglibs=
+    clooginc=
+  fi
+
+  if test "${graphite_requested}" = yes \
+    && test "x${clooglibs}" = x \
+    && test "x${clooginc}" = x ; then
+    $1
+  fi
+]
+)
diff --git a/configure b/configure
index b1fbfaa..372459c 100755
--- a/configure
+++ b/configure
@@ -833,6 +833,9 @@  LIBS
 CPPFLAGS
 CXX
 CXXFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
 CCC
 CPP
 build_configargs
@@ -1491,7 +1494,8 @@  Optional Features:
   --enable-libssp         build libssp directory
   --enable-build-with-cxx build with C++ compiler instead of C compiler
   --disable-ppl-version-check    disable check for PPL version
-  --disable-cloog-version-check  disable check for CLooG version
+  --disable-cloog-version-check
+                          disable check for CLooG version
   --enable-lto            enable link time optimization support
   --enable-stage1-languages[=all]   choose additional languages to build during
                           stage1.  Mostly useful for compiler development.
@@ -1542,11 +1546,14 @@  Optional Packages:
                           plus --with-ppl-lib=PATH/lib
   --with-ppl-include=PATH Specify directory for installed PPL include files
   --with-ppl-lib=PATH     Specify the directory for the installed PPL library
-  --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
-  --with-cloog-include=PATH Specify directory for installed CLooG include files
-  --with-cloog-lib=PATH   Specify the directory for the installed CLooG library
+  --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
+  --with-cloog-include=PATH
+                          Specify directory for installed CLooG include files
+  --with-cloog-lib=PATH   Specify the directory for the installed CLooG
+                          library
   --with-libelf=PATH       Specify prefix directory for the installed libelf package
                           Equivalent to --with-libelf-include=PATH/include
                           plus --with-libelf-lib=PATH/lib
@@ -5894,8 +5901,7 @@  fi
 
 
 # Check for CLOOG
-clooglibs=" -lcloog "
-clooginc=" -DCLOOG_PPL_BACKEND "
+
 
 
 # Check whether --with-cloog was given.
@@ -5916,58 +5922,212 @@  if test "${with_cloog_lib+set}" = set; then :
 fi
 
 
+  # Check whether --enable-cloog-version-check was given.
+if test "${enable_cloog_version_check+set}" = set; then :
+  enableval=$enable_cloog_version_check; ENABLE_CLOOG_CHECK=$enableval
+else
+  ENABLE_CLOOG_CHECK=yes
+fi
+
+
+  # Initialize clooglibs and clooginc.
+  case $with_cloog in
+    no)
+      clooglibs=
+      clooginc=
+      ;;
+    "" | yes)
+      ;;
+    *)
+      clooglibs="-L$with_cloog/lib"
+      clooginc="-I$with_cloog/include"
+      ;;
+  esac
+  if test "x${with_cloog_include}" != x ; then
+    clooginc="-I$with_cloog_include"
+  fi
+  if test "x${with_cloog_lib}" != x; then
+    clooglibs="-L$with_cloog_lib"
+  fi
+
+
+
+
+
 if test "x$with_ppl" = "xno"; then
   with_cloog=no
 fi
+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" != "xno"; then
 
-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 "
+
+
+  _cloog_saved_CFLAGS=$CFLAGS
+  _cloog_saved_CPPFLAGS=$CPPFLAGS
+  _cloog_saved_LDFLAGS=$LDFLAGS
+  _cloog_saved_LIBS=$LIBS
+
+  _clooglegacyinc="-DCLOOG_PPL_BACKEND"
+  _cloogorginc="-DCLOOG_INT_GMP -DCLOOG_ORG"
+
+    CFLAGS="${CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
+  CPPFLAGS="${CPPFLAGS} ${_clooglegacyinc} ${_cloogorginc}"
+  LDFLAGS="${LDFLAGS} ${clooglibs}"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG" >&5
+$as_echo_n "checking for installed CLooG... " >&6; }
+if test "${gcc_cv_cloog_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  LIBS="-lcloog ${_cloog_saved_LIBS}"
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <cloog/cloog.h>
+int
+main ()
+{
+ppl_version_major ()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_cloog_type="PPL Legacy"
+else
+  LIBS="-lcloog-isl -lisl ${_cloog_saved_LIBS}"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <cloog/cloog.h>
+int
+main ()
+{
+cloog_version ()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_cloog_type=ISL
+else
+  LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <cloog/cloog.h>
+int
+main ()
+{
+cloog_version ()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_cloog_type=PPL
+else
+  gcc_cv_cloog_type=no
 fi
-if test "x$with_cloog_lib" != x; then
-  clooglibs="-L$with_cloog_lib -lcloog"
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 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
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
-
-# Check whether --enable-cloog-version-check was given.
-if test "${enable_cloog_version_check+set}" = set; then :
-  enableval=$enable_cloog_version_check; ENABLE_CLOOG_CHECK=$enableval
-else
-  ENABLE_CLOOG_CHECK=yes
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_type" >&5
+$as_echo "$gcc_cv_cloog_type" >&6; }
 
+  case $gcc_cv_cloog_type in
+    "PPL Legacy")
+      clooginc="${clooginc} ${_clooglegacyinc}"
+      clooglibs="${clooglibs} -lcloog"
+      cloog_org=no
+      ;;
+    "ISL")
+      clooginc="${clooginc} ${_cloogorginc}"
+      clooglibs="${clooglibs} -lcloog-isl"
+      cloog_org=yes
+      ;;
+    "PPL")
+      clooginc="${clooginc} ${_cloogorginc}"
+      clooglibs="${clooglibs} -lcloog-ppl"
+      cloog_org=yes
+      ;;
+    *)
+      clooglibs=
+      clooginc=
+      cloog_org=
+      ;;
+  esac
 
-if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then
-  saved_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.15.5 (or later revision) of CLooG" >&5
+  LIBS=$_cloog_saved_LIBS
+  CFLAGS=$_cloog_saved_CFLAGS
+  CPPFLAGS=$_cloog_saved_CPPFLAGS
+  LDFLAGS=$_cloog_saved_LDFLAGS
+
+
+
+
+
+  if test "${ENABLE_CLOOG_CHECK}" = yes ; then
+    _cloog_saved_CFLAGS=$CFLAGS
+    _cloog_saved_LDFLAGS=$LDFLAGS
+
+    CFLAGS="${_cloog_saved_CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
+    LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs}"
+
+    if test "${cloog_org}" = yes ; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for verison 0.14.0 of CLooG" >&5
+$as_echo_n "checking for verison 0.14.0 of CLooG... " >&6; }
+if test "${gcc_cv_cloog_ct_0_14_0+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include "cloog/cloog.h"
+int
+main ()
+{
+#if CLOOG_VERSION_MAJOR != 0 \
+    || CLOOG_VERSION_MINOR != 14 \
+    || CLOOG_VERSION_REVISION < 0
+    choke me
+   #endif
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gcc_cv_cloog_ct_0_14_0=yes
+else
+  gcc_cv_cloog_ct_0_14_0=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_ct_0_14_0" >&5
+$as_echo "$gcc_cv_cloog_ct_0_14_0" >&6; }
+    elif test "${cloog_org}" = no ; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.15.5 (or later revision) of CLooG" >&5
 $as_echo_n "checking for version 0.15.5 (or later revision) of CLooG... " >&6; }
+if test "${gcc_cv_cloog_ct_0_15_5+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include "cloog/cloog.h"
 int
 main ()
 {
-
-  #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5
-  choke me
-  #endif
-
+#if CLOOG_VERSION_MAJOR != 0 \
+    || CLOOG_VERSION_MINOR != 15 \
+    || CLOOG_VERSION_REVISION < 5
+    choke me
+   #endif
   ;
   return 0;
 }
@@ -5979,34 +6139,66 @@  if ac_fn_c_try_compile "$LINENO"; then :
 int
 main ()
 {
-
-  #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 9
-  choke me
-  #endif
-
+#if CLOOG_VERSION_MAJOR != 0 \
+    || CLOOG_VERSION_MINOR != 15 \
+    || CLOOG_VERSION_REVISION < 9
+    choke me
+   #endif
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+  gcc_cv_cloog_ct_0_15_5=yes
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
-$as_echo "buggy but acceptable" >&6; }
+  gcc_cv_cloog_ct_0_15_5="buggy but acceptable"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }; clooglibs= ; clooginc=
+  gcc_cv_cloog_ct_0_15_5=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS="$saved_CFLAGS"
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_ct_0_15_5" >&5
+$as_echo "$gcc_cv_cloog_ct_0_15_5" >&6; }
+    fi
+
+    CFLAGS=$_cloog_saved_CFLAGS
+    LDFLAGS=$_cloog_saved_LDFLAGS
+  fi
+
+
+
+
+
+
+
+  if test "x${with_cloog}" != x \
+    || test "x${with_cloog_include}" != x \
+    || test "x${with_cloog_lib}" != x ; then
+    graphite_requested=yes
+  else
+    graphite_requested=no
+  fi
 
-# Flags needed for CLOOG
 
 
+  if test "${gcc_cv_cloog_ct_0_14_0}" = no \
+    || test "${gcc_cv_cloog_rt_0_14_0}" = no \
+    || test "${gcc_cv_cloog_ct_0_15_5}" = no; then
+    clooglibs=
+    clooginc=
+  fi
+
+  if test "${graphite_requested}" = yes \
+    && test "x${clooglibs}" = x \
+    && test "x${clooginc}" = x ; then
+
+    as_fn_error "Unable to find a usable CLooG. See config.log for details." "$LINENO" 5
+  fi
+
+
+fi
 
 # Check for LTO support.
 # Check whether --enable-lto was given.
diff --git a/configure.ac b/configure.ac
index bf5fe3a..1b8260c 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)
@@ -1580,68 +1581,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,