2 tests/test-uchar-c++.cc
3 tests/test-uchar-c++2.cc
13 AC_REQUIRE([gl_ANSI_CXX])
14 if test "$CXX" != no; then
15 dnl On FreeBSD 12, 'c++' defines __cplusplus to 201402, although it does not
16 dnl have the <cuchar> header file from C++11.
17 AC_CACHE_CHECK([whether the C++ compiler has <cuchar>],
18 [gl_cv_cxxheader_cuchar],
19 [dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
20 dnl an autoconf bug <https://savannah.gnu.org/support/?110294>.
21 echo '#include <cuchar>' > conftest.cpp
22 gl_command="$CXX $CXXFLAGS $CPPFLAGS -c conftest.cpp"
23 if AC_TRY_EVAL([gl_command]); then
24 gl_cv_cxxheader_cuchar=yes
26 gl_cv_cxxheader_cuchar=no
31 gl_cv_cxxheader_cuchar=no
33 AM_CONDITIONAL([CXX_HAVE_CUCHAR], [test $gl_cv_cxxheader_cuchar != no])
37 TESTS += test-uchar-c++
38 check_PROGRAMS += test-uchar-c++
39 test_uchar_c___SOURCES = test-uchar-c++.cc
41 test_uchar_c___SOURCES += test-uchar-c++2.cc
43 test_uchar_c___LDADD = $(LDADD) $(LIB_MBRTOWC)