This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: expected behavior for --with-cloog?


On Sat, Mar 27, 2010 at 12:17, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
> On Sat, Mar 27, 2010 at 07:56:14AM +0100, Ralf Wildenhues wrote:
>> Hello Jack,
>>
>> * Jack Howarth wrote on Fri, Mar 26, 2010 at 01:13:16AM CET:
>> > ? ?While testing a patch to update the minimum version
>> > of cloog-ppl in gcc trunk...
>>
>> > --- configure.ac ? ? ? ?(revision 157732)
>> > +++ configure.ac ? ? ? ?(working copy)
>> > @@ -1612,9 +1612,9 @@
>> > ?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_MSG_CHECKING([for version 0.15.9 (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
>> > + ?#if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 9
>> > ? ?choke me
>> > ? ?#endif
>> > ? ?], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])
>> >
>> > I noticed that this test only returns...
>> >
>> > checking for version 0.15.9 (or later revision) of CLooG... no
>> >
>> > for...
>> >
>> > ? ../gcc-4.5-20100325/configure --prefix=/sw ?--prefix=/sw/lib/gcc4.5 --mandir=/sw/share/man --infodir=/sw/share/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 --disable-libjava-multilib --enable-checking=release
>> >
>> > ...when a cloog-ppl earlier than 0.15.9 is installed. Shouldn't configure fail
>> > outright in this case since the user obviously intended cloog to be used? Currently
>> > configure proceeds to set up a build without graphite support.
>>
>> Well, what does config.log tell you why it was not detected?
>>
>> Cheers,
>> Ralf
>
> Ralf,
> ? It is detected as being insufficient, hence the...
>
>> > checking for version 0.15.9 (or later revision) of CLooG... no
>
> My question was whether options like --with-cloog should cause configure
> to exit as failed when they can't be satisfied rather than proceeding?
> Does a failure to meet the required gmp/mpfr/mpc version requirements
> behave the same way or do they abort the configure process?
> ? ? ? ? ? ? ? ?Jack
> ps I am considering the case of explicitly passing a --with-xxxx option
> as opposed to a library dependency which is being automatically checked
> by configure.

Fixed like this:

        * configure.ac: Print "buggy but acceptable" when CLooG
        revision is less than 9.
        * configure: Regenerated.

Passed bootstrap and test on amd64-linux.  Ok for trunk?

Thanks,
Sebastian
From c72ddf65ba51c46b3bd60e1c60b926e72261eea7 Mon Sep 17 00:00:00 2001
From: Sebastian Pop <sebpop@gmail.com>
Date: Sat, 27 Mar 2010 20:28:03 -0500
Subject: [PATCH] Print "buggy but acceptable" when CLooG revision is less than 9.

	* configure.ac: Print "buggy but acceptable" when CLooG
	revision is less than 9.
	* configure: Regenerated.
---
 configure    |   21 +++++++++++++++++++++
 configure.ac |    7 ++++++-
 2 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index c2c406e..fe2bb65 100755
--- a/configure
+++ b/configure
@@ -5951,9 +5951,30 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
+  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 < 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; }
 else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5
+$as_echo "buggy but acceptable" >&6; }
+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=
 fi
diff --git a/configure.ac b/configure.ac
index 72407f8..edad2b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1617,7 +1617,12 @@ if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then
   #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5
   choke me
   #endif
-  ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])
+  ], 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
 
-- 
1.6.3.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]