diff mbox

[gccgo] Define ENABLE_BUILD_WITH_CXX in auto-host.h

Message ID mcrsjz7pizq.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Nov. 11, 2010, 10:56 p.m. UTC
This patch adds ENABLE_BUILD_WITH_CXX as a preprocessor macro defined in
auto-host.h when configured with --enable-build-with-cxx.  This permits
code which is already written in C++ decide whether it needs to use
extern "C".  Committed to gccgo branch.

Ian
diff mbox

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 166591)
+++ configure.ac	(working copy)
@@ -587,6 +587,10 @@  AC_ARG_ENABLE(build-with-cxx,
 ENABLE_BUILD_WITH_CXX=$enableval,
 ENABLE_BUILD_WITH_CXX=no)
 AC_SUBST(ENABLE_BUILD_WITH_CXX)
+if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then
+  AC_DEFINE(ENABLE_BUILD_WITH_CXX, 1,
+	    [Define if building with C++.])
+fi
 
 # With stabs
 AC_ARG_WITH(stabs,