[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool--release--2.0 test results
From: |
Peter O'Gorman |
Subject: |
Re: libtool--release--2.0 test results |
Date: |
Wed, 06 Oct 2004 21:36:54 +0900 |
User-agent: |
Mozilla Thunderbird 0.7.3 (Macintosh/20040803) |
Peter O'Gorman wrote:
Yeah, I should have forward ported my patch to the libtool branch-1-5
configure.ac, sorry. Won't take but a minute.
Okay, so it took more than a minute :)
With this patch and a c++ and f77 compiler ./configure && make && make check
VPATH build.
All 108 tests passed.
Without c++ or f77 compilers.
All 90 tests passed.
There are still some issues, like the generated libtool always has
available_tags set to every tag that was called with LT_LANG, example for me is:
available_tags="CXX F77 GCJ RC ", even though at the time there were none of
these compilers on my system.
Anyway, okay to apply?
Peter
--
Peter O'Gorman - http://www.pogma.com
Index: ChangeLog
2004-10-06 Peter O'Gorman <address@hidden>
* m4/libtool.m4 (_LT_PROG_CXX, _LT_PROG_F77): New macros to work
around the deficiencies in AC_PROG_CXX and AC_PROG_F77.
* configure.ac: Cleaned up, having moved the checks for compilers
which do not exist to libtool.m4.
Index: configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/configure.ac,v
retrieving revision 1.58
diff -u -3 -p -u -r1.58 configure.ac
--- configure.ac 5 Oct 2004 01:00:39 -0000 1.58
+++ configure.ac 6 Oct 2004 12:32:23 -0000
@@ -159,20 +159,6 @@ AC_SUBST([DIST_MAKEFILE_LIST])
AC_PROG_CC
AC_PROG_CPP
-# The Autoconf tests for C++ and Fortran 77 sometimes call AC_MSG_ERROR
-# and we don't want that to be an error whilst creating the libtool script.
-# As these are AC_REQUIREd inside libtool.m4 we can simply call them here
-# and catch the errors now.
-pushdef([AC_MSG_ERROR], [caught_CXX_error=yes])
-AC_PROG_CXX
-AC_PROG_CXXCPP
-popdef([AC_MSG_ERROR])
-
-pushdef([AC_MSG_ERROR], [caught_F77_error=yes])
-AC_PROG_F77
-popdef([AC_MSG_ERROR])
-
-
## ----------------------- ##
## Libtool initialisation. ##
## ----------------------- ##
@@ -189,12 +175,8 @@ LT_LANG(Windows Resource)
## --------------------------- ##
## Work out which tests to run ##
## --------------------------- ##
-AM_CONDITIONAL(HAVE_CXX,
-[test "X$caught_CXX_error" != "Xyes" &&
- test -n "[$]_LT_TAGVAR(compiler, CXX)"])
-AM_CONDITIONAL(HAVE_F77,
-[test "X$caught_F77_error" != "Xyes" &&
- test -n "[$]_LT_TAGVAR(compiler, F77)"])
+AM_CONDITIONAL(HAVE_CXX,[test -n "[$]_LT_TAGVAR(compiler, CXX)"])
+AM_CONDITIONAL(HAVE_F77,[test -n "[$]_LT_TAGVAR(compiler, F77)"])
AM_CONDITIONAL(HAVE_GCJ, [test -n "[$]_LT_TAGVAR(compiler, GCJ)"])
AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"])
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.126
diff -u -3 -p -u -r1.126 libtool.m4
--- m4/libtool.m4 4 Oct 2004 18:32:45 -0000 1.126
+++ m4/libtool.m4 6 Oct 2004 12:32:45 -0000
@@ -4462,6 +4462,24 @@ AC_LANG_POP
CC="$lt_save_CC"
])# _LT_LANG_C_CONFIG
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
# _LT_LANG_CXX_CONFIG([TAG])
# --------------------------
@@ -4469,8 +4487,7 @@ CC="$lt_save_CC"
# defined. These variables are subsequently used by _LT_CONFIG to write
# the compiler configuration to `libtool'.
m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([AC_PROG_CXX])dnl
-AC_REQUIRE([AC_PROG_CXXCPP])dnl
+[AC_REQUIRE([_LT_PROG_CXX])dnl
AC_REQUIRE([LT_SYS_DLOPEN_SELF])dnl
m4_require([_LT_DECL_EGREP])dnl
@@ -4506,7 +4523,7 @@ _LT_TAGVAR(objext, $1)=$objext
# the CXX compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test "$caught_CXX_error" != yes; then
+if test "$_lt_caught_CXX_error" != yes; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;\n"
@@ -5386,7 +5403,7 @@ if test "$caught_CXX_error" != yes; then
_LT_CONFIG($1)
fi # test -n "$compiler"
-fi # test "$caught_CXX_error" != yes
+fi # test "$_lt_caught_CXX_error" != yes
AC_LANG_POP
CC=$lt_save_CC
@@ -5553,13 +5570,28 @@ _LT_TAGDECL([], [compiler_lib_search_pat
a shared library])
])# _LT_SYS_HIDDEN_LIBDEPS
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_F77_error=yes])
+AC_PROG_F77
+if test -z "$F77"; then
+ _lt_caught_F77_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+
# _LT_LANG_F77_CONFIG([TAG])
# --------------------------
# Ensure that the configuration variables for a Fortran 77 compiler are
# suitably defined. These variables are subsequently used by _LT_CONFIG
# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([AC_PROG_F77])dnl
+[AC_REQUIRE([_LT_PROG_F77])dnl
AC_LANG_PUSH(Fortran 77)
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -5593,7 +5625,7 @@ _LT_TAGVAR(objext, $1)=$objext
# the F77 compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test "$caught_F77_error" != yes; then
+if test "$_lt_caught_F77_error" != yes; then
# Code to be used in simple compile tests
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
@@ -5657,7 +5689,7 @@ if test "$caught_F77_error" != yes; then
_LT_CONFIG($1)
fi # test -n "$compiler"
-fi # test "$caught_F77_error" != yes
+fi # test "$_lt_caught_F77_error" != yes
AC_LANG_POP
CC="$lt_save_CC"
Re: libtool--release--2.0 test results, Noah Misch, 2004/10/05
Re: libtool--release--2.0 test results, Charles Wilson, 2004/10/06
Re: libtool--release--2.0 test results, Bob Friesenhahn, 2004/10/06