]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Test for CC=c++ at configure-time, so that we don't confuse a fully C++
authorBruno Haible <bruno@clisp.org>
Sat, 23 Dec 2006 15:59:11 +0000 (15:59 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:34 +0000 (12:14 +0200)
build with a mixed C/C++ build.

gnulib-local/ChangeLog
gnulib-local/Makefile.am
gnulib-local/build-aux/moopp
gnulib-local/modules/moo

index d0f0b17ee0d7d6ae889ff03548ae563e9cb3e008..46d2919c34910bb937b3385e1e3cba83f41ea1bf 100644 (file)
@@ -1,3 +1,12 @@
+2006-12-22  Bruno Haible  <bruno@clisp.org>
+
+       Test for CC=c++ at configure-time.
+       * m4/moo.m4: New file.
+       * build-aux/moopp: Emit test of IS_CPLUSPLUS instead of __cplusplus.
+       * modules/moo (Files): Add m4/moo.m4.
+       (configure.ac): Set to gl_MOO.
+       * Makefile.am (EXTRA_DIST): Add m4/moo.m4.
+
 2006-12-23  Bruno Haible  <bruno@clisp.org>
 
        Support platforms with neither terminfo nor termcap functions, like
index 5e65356ff5c9bb6c7a991c3a7060991166655d46..cb3ad963d04ea5de7890fb1d7260c54a07b2d86f 100644 (file)
@@ -265,6 +265,7 @@ m4/libcroco.m4 \
 m4/libglib.m4 \
 m4/libxml.m4 \
 m4/java.m4 \
+m4/moo.m4 \
 m4/quotearg.m4.diff \
 m4/quote.m4.diff \
 m4/relocatable.m4 \
index 2792df8166f16ab03b03f39e461f91177a95b84d..92c98bbb15d2820dede03a24b669eee1fdf152f7 100755 (executable)
@@ -468,7 +468,7 @@ func_emit_source_h ()
     echo "/* ${main_classname}_t is defined as a pointer to struct ${main_repclassalias}."
     echo "   In C++ mode, we use a smart pointer class."
     echo "   In C mode, we have no other choice than a typedef to the root class type.  */"
-    echo "#ifdef __cplusplus"
+    echo "#if IS_CPLUSPLUS"
     echo "struct ${main_classname}_t"
     echo "{"
     echo "private:"
@@ -610,7 +610,7 @@ func_emit_source_c ()
     else
       rootclassname="$main_classname"
     fi
-    echo "#ifndef __cplusplus"
+    echo "#if !IS_CPLUSPLUS"
     echo "#define ${main_classname}_representation any_${rootclassname}_representation"
     echo "#endif"
     echo "#include \"${main_classname}.priv.h\""
index 714d38796625ebf9d2f55f3e015c170611acd9b3..4c2628b8d943426cb7a5117c66417544d054fbdc 100644 (file)
@@ -4,11 +4,12 @@ Minimal object-oriented programming style.
 Files:
 build-aux/moopp
 lib/moo.h
+m4/moo.m4
 
 Depends-on:
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
+gl_MOO
 
 Makefile.am:
 MOOPPFLAGS =