This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gccgo] Define ENABLE_BUILD_WITH_CXX in auto-host.h


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

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,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]