[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with Sun Studio 12 C++
From: |
Eric Blake |
Subject: |
Re: Problem with Sun Studio 12 C++ |
Date: |
Sat, 06 Jun 2009 12:42:38 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[revisiting an old thread]
According to Ralf Wildenhues on 3/9/2009 12:28 PM:
Hi Ralf, others,
>>> The cpp-works stuff is necessary for systems without a working C++
>>> compiler. AC_PROG_CXX sets CXX to g++ in that case. We should find
>>> out why that was done, and fix it.
>> Didn't libtool already have to hack around that fact? Yes, it would be
>> nice to make autoconf more honest when CXX cannot be found, but as a
>> separate patch.
>
> yes and yes and yes.
I'm not sure why it was done, but this appears to fix it. I'm in the
middle of testing a libtool bootstrap after (temporarily) removing my C++
compiler; if everything still works, are there any objections to this patch?
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoquJsACgkQ84KuGfSFAYDA7ACfaHDuL+5M7SM86fg092kicxih
MrMAn36nZiFUUs2y2BIGboLFtBeVSfuE
=lGai
-----END PGP SIGNATURE-----
>From 5f22e075cbae3331ed1d7ed56d4ed63117238425 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Sat, 6 Jun 2009 11:24:26 -0600
Subject: [PATCH] Avoid ambiguous fallback in AC_PROG_CXX, AC_PROG_OBJC.
* lib/autoconf/c.m4 (AC_PROG_CXX, AC_PROG_OBJC): Use 'no', rather
than an ambiguous compiler name, when no compiler is present.
Reported by Ralf Wildenhues and others.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 5 +++++
NEWS | 6 ++++++
lib/autoconf/c.m4 | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 45cc4b4..9a7ccf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-06-06 Eric Blake <address@hidden>
+ Avoid ambiguous fallback in AC_PROG_CXX, AC_PROG_OBJC.
+ * lib/autoconf/c.m4 (AC_PROG_CXX, AC_PROG_OBJC): Use 'no', rather
+ than an ambiguous compiler name, when no compiler is present.
+ Reported by Ralf Wildenhues and others.
+
Document fallback behavior of AC_PROG_LEX.
* doc/autoconf.texi (Particular Programs) <AC_PROG_LEX>: Mention
why fallback is :, and that a --version check must be used to
diff --git a/NEWS b/NEWS
index 82ba635..060c34b 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,12 @@ GNU Autoconf NEWS - User visible changes.
* Major changes in Autoconf 2.64 (2009-??-??) [stable]
Released by Eric Blake, based on git versions 2.63b.*.
+** AC_PROG_CXX and AC_PROG_OBJC now set CXX/OBCJ to "no" instead
+ of "g++"/"gcc" when no compiler for the requested language is
+ present on the user's machine. This change was made to accomodate
+ packages that perform conditional compilation based on the presence
+ of a language, such as Libtool.
+
** AS_IF and AS_CASE have been taught to avoid syntax errors even when
given arguments that expand to just whitespace.
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index ffdbd45..1bdc9af 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -699,7 +699,7 @@ if test -z "$CXX"; then
AC_CHECK_TOOLS(CXX,
[m4_default([$1],
[g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC
xlC_r xlC])],
- g++)
+ no)
fi
fi
# Provide some information about the compiler.
@@ -871,7 +871,7 @@ _AC_ARG_VAR_CPPFLAGS()dnl
_AC_ARG_VAR_PRECIOUS([OBJC])dnl
AC_CHECK_TOOLS(OBJC,
[m4_default([$1], [gcc objcc objc cc CC])],
- gcc)
+ no)
# Provide some information about the compiler.
_AS_ECHO_LOG([checking for _AC_LANG compiler version])
set X $ac_compile
--
1.6.3.rc3.2.g4b51
- Re: Problem with Sun Studio 12 C++,
Eric Blake <=