1# moo.m4 serial 1 (gettext-0.17)
2dnl Copyright (C) 2006 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7# Support for Minimal Object-Oriented style programming.
8
9AC_DEFUN([gl_MOO],
10[
11  AC_REQUIRE([AC_C_INLINE])
12  dnl Test for a C++ compiler at configure time, rather than at compile time,
13  dnl because when building Woe32 DLLs we need to build some compilation units
14  dnl in C++ mode and not others, and in this case we don't want to use C++
15  dnl classes with constructors, member functions, and operators.
16  AC_CACHE_CHECK([whether the C compiler is actually a C++ compiler],
17    [gl_cv_c_cplusplus],
18    [AC_EGREP_CPP([Is c++], [
19#ifdef __cplusplus
20  Is c++
21#endif
22       ],
23       [gl_cv_c_cplusplus=yes],
24       [gl_cv_c_cplusplus=no])])
25  if test $gl_cv_c_cplusplus = yes; then
26    AC_DEFINE([IS_CPLUSPLUS], 1,
27      [Define to 1 if the C compiler is actually a C++ compiler.])
28  fi
29])
30