public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix graphite configure w/o ppl/cloog
@ 2009-10-21 22:52 Richard Guenther
  2009-10-22  6:19 ` Eric Botcazou
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Richard Guenther @ 2009-10-21 22:52 UTC (permalink / raw)
  To: gcc-patches


The configure shouldn't leave LIBS set, so better not set it at all as
it's unused.  Likewise the libelf LIBS saving is too late.

Bootstrapped on x86_64-unknown-linux-gnu, ok for trunk?

Thanks,
Richard.

2009-10-22  Richard Guenther  <rguenther@suse.de>

	* configure.ac: Do not set LIBS for ppl/cloog checks.  Disable
	cloog if the ppl version check failed.  Move flags saving
	before setting in libelf check.
	* configure: Regenerate.

Index: configure.ac
===================================================================
*** configure.ac	(revision 153055)
--- configure.ac	(working copy)
*************** case $with_ppl in 
*** 1523,1534 ****
      ppllibs=
      ;;
    yes)
-     LIBS="$ppllibs $LIBS"
      ;;
    *)
      ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
      pplinc="-I$with_ppl/include $pplinc"
-     LIBS="$ppllibs $LIBS"
      ;;
  esac
  if test "x$with_ppl_include" != x; then
--- 1523,1532 ----
*************** if test "x$with_ppl_include" != x; then
*** 1536,1547 ****
  fi
  if test "x$with_ppl_lib" != x; then
    ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
-   LIBS="$ppllibs $LIBS"
  fi
  if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
    ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '
    pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
-   LIBS="$ppllibs $LIBS"
  fi
  
  AC_ARG_ENABLE(ppl-version-check,
--- 1534,1543 ----
*************** if test "x$with_ppl" != "xno" -a "${ENAB
*** 1557,1563 ****
    #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
    choke me
    #endif
!   ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ])
    CFLAGS="$saved_CFLAGS"
  fi
  
--- 1553,1559 ----
    #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version
    choke me
    #endif
!   ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ])
    CFLAGS="$saved_CFLAGS"
  fi
  
*************** case $with_cloog in 
*** 1586,1597 ****
      clooginc=
      ;;
    yes)
-     LIBS="$clooglibs $LIBS"
      ;;
    *)
      clooglibs="-L$with_cloog/lib -lcloog"
      clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
-     LIBS="$clooglibs $LIBS"
      ;;
  esac
  if test "x$with_cloog_include" != x; then
--- 1582,1591 ----
*************** if test "x$with_cloog_include" != x; the
*** 1599,1610 ****
  fi
  if test "x$with_cloog_lib" != x; then
    clooglibs="-L$with_cloog_lib -lcloog"
-   LIBS="$clooglibs $LIBS"
  fi
  if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then
    clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/.libs -L$$r/$(HOST_SUBDIR)/cloog/_libs -lcloog '
    clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND '
-   LIBS="$clooglibs $LIBS"
  fi
  
  AC_ARG_ENABLE(cloog-version-check,
--- 1593,1602 ----
*************** if test x"$enable_lto" = x"yes" ; then
*** 1644,1649 ****
--- 1636,1645 ----
  
    AC_ARG_WITH(libelf_lib, [  --with-libelf-lib=PATH   Specify the directory for the installed libelf library])
  
+   saved_CFLAGS="$CFLAGS"
+   saved_CPPFLAGS="$CPPFLAGS"
+   saved_LIBS="$LIBS"
+ 
    case $with_libelf in 
      "")
        libelflibs="-lelf"
*************** if test x"$enable_lto" = x"yes" ; then
*** 1672,1681 ****
      LIBS="$libelflibs $LIBS"
    fi
  
-   saved_CFLAGS="$CFLAGS"
-   saved_CPPFLAGS="$CPPFLAGS"
-   saved_LIBS="$LIBS"
- 
    CFLAGS="$CFLAGS $libelfinc"
    CPPFLAGS="$CPPFLAGS $libelfinc"
    LIBS="$LIBS $libelflibs"
--- 1668,1673 ----
Index: configure
===================================================================
*** configure	(revision 153055)
--- configure	(working copy)
*************** case $with_ppl in
*** 5771,5782 ****
      ppllibs=
      ;;
    yes)
-     LIBS="$ppllibs $LIBS"
      ;;
    *)
      ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
      pplinc="-I$with_ppl/include $pplinc"
-     LIBS="$ppllibs $LIBS"
      ;;
  esac
  if test "x$with_ppl_include" != x; then
--- 5771,5780 ----
*************** if test "x$with_ppl_include" != x; then
*** 5784,5795 ****
  fi
  if test "x$with_ppl_lib" != x; then
    ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
-   LIBS="$ppllibs $LIBS"
  fi
  if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
    ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx '
    pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include '
-   LIBS="$ppllibs $LIBS"
  fi
  
  # Check whether --enable-ppl-version-check was given.
--- 5782,5791 ----
*************** if ac_fn_c_try_compile "$LINENO"; then :
*** 5825,5831 ****
  $as_echo "yes" >&6; }
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
! $as_echo "no" >&6; }; ppllibs= ; pplinc=
  fi
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    CFLAGS="$saved_CFLAGS"
--- 5821,5827 ----
  $as_echo "yes" >&6; }
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
! $as_echo "no" >&6; }; ppllibs= ; pplinc= ; with_ppl=no
  fi
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    CFLAGS="$saved_CFLAGS"
*************** case $with_cloog in
*** 5871,5882 ****
      clooginc=
      ;;
    yes)
-     LIBS="$clooglibs $LIBS"
      ;;
    *)
      clooglibs="-L$with_cloog/lib -lcloog"
      clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
-     LIBS="$clooglibs $LIBS"
      ;;
  esac
  if test "x$with_cloog_include" != x; then
--- 5867,5876 ----
*************** if test "x$with_cloog_include" != x; the
*** 5884,5895 ****
  fi
  if test "x$with_cloog_lib" != x; then
    clooglibs="-L$with_cloog_lib -lcloog"
-   LIBS="$clooglibs $LIBS"
  fi
  if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then
    clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/.libs -L$$r/$(HOST_SUBDIR)/cloog/_libs -lcloog '
    clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND '
-   LIBS="$clooglibs $LIBS"
  fi
  
  # Check whether --enable-cloog-version-check was given.
--- 5878,5887 ----
*************** if test "${with_libelf_lib+set}" = set; 
*** 5967,5972 ****
--- 5959,5968 ----
  fi
  
  
+   saved_CFLAGS="$CFLAGS"
+   saved_CPPFLAGS="$CPPFLAGS"
+   saved_LIBS="$LIBS"
+ 
    case $with_libelf in
      "")
        libelflibs="-lelf"
*************** fi
*** 5995,6004 ****
      LIBS="$libelflibs $LIBS"
    fi
  
-   saved_CFLAGS="$CFLAGS"
-   saved_CPPFLAGS="$CPPFLAGS"
-   saved_LIBS="$LIBS"
- 
    CFLAGS="$CFLAGS $libelfinc"
    CPPFLAGS="$CPPFLAGS $libelfinc"
    LIBS="$LIBS $libelflibs"
--- 5991,5996 ----

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-10-24 11:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-21 22:52 [PATCH] Fix graphite configure w/o ppl/cloog Richard Guenther
2009-10-22  6:19 ` Eric Botcazou
2009-10-22  7:41 ` Paolo Bonzini
2009-10-22  7:44   ` Paolo Bonzini
2009-10-22  9:09     ` Richard Guenther
2009-10-22 12:17       ` Eric Botcazou
2009-10-23 23:51 ` Jason Merrill
2009-10-24 11:13   ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).