]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Macros for use of moopp.
authorBruno Haible <bruno@clisp.org>
Sat, 23 Dec 2006 15:57:51 +0000 (15:57 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:34 +0000 (12:14 +0200)
gnulib-local/m4/moo.m4 [new file with mode: 0644]

diff --git a/gnulib-local/m4/moo.m4 b/gnulib-local/m4/moo.m4
new file mode 100644 (file)
index 0000000..ceb5075
--- /dev/null
@@ -0,0 +1,29 @@
+# moo.m4 serial 1 (gettext-0.16.2)
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Support for Minimal Object-Oriented style programming.
+
+AC_DEFUN([gl_MOO],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  dnl Test for a C++ compiler at configure time, rather than at compile time,
+  dnl because when building Woe32 DLLs we need to build some compilation units
+  dnl in C++ mode and not others, and in this case we don't want to use C++
+  dnl classes with constructors, member functions, and operators.
+  AC_CACHE_CHECK([whether the C compiler is actually a C++ compiler],
+    [gl_cv_c_cplusplus],
+    [AC_EGREP_CPP([Is c++], [
+#ifdef __cplusplus
+  Is c++
+#endif
+       ],
+       [gl_cv_c_cplusplus=yes],
+       [gl_cv_c_cplusplus=no])])
+  if test $gl_cv_c_cplusplus = yes; then
+    AC_DEFINE([IS_CPLUSPLUS], 1,
+      [Define to 1 if the C compiler is actually a C++ compiler.])
+  fi
+])