From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14061 invoked by alias); 20 Oct 2009 12:23:58 -0000 Received: (qmail 14044 invoked by uid 22791); 20 Oct 2009 12:23:56 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Oct 2009 12:23:51 +0000 Received: from relay2.suse.de (relay-ext.suse.de [195.135.221.8]) by mx2.suse.de (Postfix) with ESMTP id AD03486391; Tue, 20 Oct 2009 14:23:48 +0200 (CEST) Date: Tue, 20 Oct 2009 13:00:00 -0000 From: Richard Guenther To: gcc-patches@gcc.gnu.org Cc: spop@gcc.gnu.org Subject: [PATCH] Fix GRAPHITE configure Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg01274.txt.bz2 It seems that even though the documentation states that --with-cloog and --with-ppl need only be specified if cloog/ppl do not reside in the default search paths graphite is disabled if I do not specify them (with a correct path even). Looking at the configure # 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],, with_cloog=no) 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]) case $with_cloog in no) clooglibs= clooginc= ;; *) clooglibs="-L$with_cloog/lib -lcloog" clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND " LIBS="$clooglibs $LIBS" ;; esac it seems clear that without specifying --with-cloog with_cloog will be "no" and thus while the header checks will report success (and thus also config.log is silent about not using graphite) CLOOGLIBS will be empty and thus gcc/configure will set HAVE_cloog to 0. So, what is wrong here, the documentation or the configure? Even just specifying --with-cloog --with-ppl will not work as then I get HOST_CLOOGLIBS = -Lyes/lib -lcloog HOST_CLOOGINC = -Iyes/include -DCLOOG_PPL_BACKEND but still checking for version 0.10 of PPL... yes checking for correct version of CLooG... yes so I believe all these checks are somehow broken. At least the above should also have yes) ;; and IMHO AC_ARG_WITH shouldn't have with_cloog=no in its default so only --without-cloog will set with_cloog=no. Then the header checks shouldn't run if --without-cloog is specified, that only confuses the user. Also with --without-ppl cloog should be disabled as well, otherwise we'll still enable graphite but fail to link later. Thus, like the following. Tested with all sorts of --with[out]-{ppl,cloog} combinations. Ok for trunk? Thanks, Richard. 2009-10-20 Richard Guenther * configure.ac: Adjust the ppl and cloog configure to work as documented. Disable cloog if ppl was disabled. Omit the version checks if they were disabled. * configure: Re-generate. Index: configure.ac =================================================================== *** configure.ac (revision 153009) --- configure.ac (working copy) *************** pplinc= *** 1514,1520 **** AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package Equivalent to --with-ppl-include=PATH/include ! plus --with-ppl-lib=PATH/lib],, with_ppl=no) AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files]) AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library]) --- 1514,1520 ---- AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package Equivalent to --with-ppl-include=PATH/include ! plus --with-ppl-lib=PATH/lib],,) AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files]) AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library]) *************** case $with_ppl in *** 1522,1527 **** --- 1522,1529 ---- no) ppllibs= ;; + yes) + ;; *) ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx" pplinc="-I$with_ppl/include $pplinc" *************** AC_ARG_ENABLE(ppl-version-check, *** 1546,1552 **** ENABLE_PPL_CHECK=$enableval, ENABLE_PPL_CHECK=yes) ! if test "${ENABLE_PPL_CHECK}" = "yes"; then saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pplinc $gmpinc" AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL]) --- 1548,1554 ---- ENABLE_PPL_CHECK=$enableval, ENABLE_PPL_CHECK=yes) ! if test "x$with_ppl" != "xno" -a "${ENABLE_PPL_CHECK}" = "yes"; then saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pplinc $gmpinc" AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL]) *************** clooginc=" -DCLOOG_PPL_BACKEND " *** 1569,1583 **** 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],, with_cloog=no) 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]) case $with_cloog in no) clooglibs= clooginc= ;; *) clooglibs="-L$with_cloog/lib -lcloog" clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND " --- 1571,1591 ---- 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]) + 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 " *************** AC_ARG_ENABLE(cloog-version-check, *** 1602,1608 **** ENABLE_CLOOG_CHECK=$enableval, ENABLE_CLOOG_CHECK=yes) ! if test "${ENABLE_CLOOG_CHECK}" = "yes"; then saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc" AC_MSG_CHECKING([for correct version of CLooG]) --- 1610,1616 ---- 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 correct version of CLooG])