[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
don't force CXX and F77 to be configured in
From: |
Alexandre Oliva |
Subject: |
don't force CXX and F77 to be configured in |
Date: |
17 Apr 2005 17:28:30 -0300 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Currently, at least in the 1.5 branch, a configure.ac as simple as:
configure.ac
Description: Binary data
causes libtool to be configured for CXX and F77, in addition to the
implicitly requested CC tag.
That's caused by an undesirable interaction between _LT_AC_TAGCONFIG
and the code that detects whether AC_PROG_{CXX,F77} were used:
_LT_AC_TAGCONFIG expands unconditionally macros that AC_REQUIRE
AC_PROG_CXX and AC_PROG_F77, such that the test whether they are
provided always results positive.
This patch avoids expanding the AC_REQUIREing macros if they haven't
been explicitly brought in before, using the same logic as the
existing test, thereby fixing the problem. Ok to install?
Incidentally, I noticed that, even after the fix, adding AC_PROG_CXX
or AC_PROG_F77 after AC_PROG_LIBTOOL doesn't trigger the autoconf
AC_BEFORE error I expected; it instead now causes a configure-time
error because the CXX and F77 sections of _LT_AC_TAGCONFIG are
missing. I wish we could do better than this, but I couldn't quite
figure out how.
(Ralf, thanks for picking up the patch I posted a couple of weeks ago,
and sorry for not completing the work before noticing you'd already
done it :-)
Index: ChangeLog
from Alexandre Oliva <address@hidden>
* libtool.m4 (_LT_AC_TAGCONFIG): Don't bring in CXX and F77 unless
the corresponding AC_PROG_ macro was provided.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.81
diff -u -p -r1.314.2.81 libtool.m4
--- libtool.m4 15 Apr 2005 14:40:09 -0000 1.314.2.81
+++ libtool.m4 17 Apr 2005 04:49:36 -0000
@@ -1701,6 +1701,7 @@ if test -f "$ltmain" && test -n "$tagnam
echo appending configuration tag \"$tagname\" to $ofile
case $tagname in
+AC_PROVIDE_IFELSE([AC_PROG_CXX],[
CXX)
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
@@ -1711,6 +1712,8 @@ if test -f "$ltmain" && test -n "$tagnam
fi
;;
+])dnl
+AC_PROVIDE_IFELSE([AC_PROG_F77],[
F77)
if test -n "$F77" && test "X$F77" != "Xno"; then
AC_LIBTOOL_LANG_F77_CONFIG
@@ -1719,6 +1722,7 @@ if test -f "$ltmain" && test -n "$tagnam
fi
;;
+])dnl
GCJ)
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
AC_LIBTOOL_LANG_GCJ_CONFIG
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer address@hidden, gcc.gnu.org}
Free Software Evangelist address@hidden, gnu.org}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- don't force CXX and F77 to be configured in,
Alexandre Oliva <=