+# Sets CXX_CHOICE to 'yes' or 'no', depending on the preferred use of C++.
+
+AC_DEFUN([gl_CXX_CHOICE],
+[
+ AC_MSG_CHECKING([whether to use C++])
+ dnl It would be so nice if plus signs were supported in AC_ARG_ENABLE.
+ dnl Feature request submitted on 2010-03-13.
+ AC_ARG_ENABLE([cxx],
+ [ --disable-cxx do not build C++ sources],
+ [CXX_CHOICE="$enableval"],
+ [CXX_CHOICE=yes])
+ AC_MSG_RESULT([$CXX_CHOICE])
+ AC_SUBST([CXX_CHOICE])
+])
+