diff options
Diffstat (limited to 'unicode/m4/courier-unicode.m4')
| -rw-r--r-- | unicode/m4/courier-unicode.m4 | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/unicode/m4/courier-unicode.m4 b/unicode/m4/courier-unicode.m4 index 673bc65..9619b45 100644 --- a/unicode/m4/courier-unicode.m4 +++ b/unicode/m4/courier-unicode.m4 @@ -4,16 +4,19 @@ dnl use the courier-unicode package. AC_DEFUN([AX_COURIER_UNICODE_CXXFLAGS],[ +AC_REQUIRE([AC_PROG_CXX]) + save_FLAGS="$CXXFLAGS" AC_LANG_PUSH([C++]) -AC_TRY_COMPILE([ + +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <string> -], [ +]], [[ std::u32string s; char32_t c; - ], + ]])], [ ], [ @@ -21,12 +24,12 @@ AC_TRY_COMPILE([ COURIER_UNICODE_CXXFLAGS="-std=c++11" CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS" -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <string> -], [ +]], [[ std::u32string s; char32_t c; - ], + ]])], [ ], [ @@ -34,12 +37,12 @@ AC_TRY_COMPILE([ COURIER_UNICODE_CXXFLAGS="-std=c++0x" CXXFLAGS="$save_CFLAGS $COURIER_UNICODE_CXXFLAGS" -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <string> -], [ +]], [[ std::u32string s; char32_t c; - ], + ]])], [ ], [ @@ -48,5 +51,6 @@ AC_MSG_ERROR([*** A compiler with C++11 Unicode support was not found]) ]) ]) CXXFLAGS="$save_FLAGS" + AC_LANG_POP([C++]) ]) |
