summaryrefslogtreecommitdiffstats
path: root/unicode/m4/courier-unicode.m4
diff options
context:
space:
mode:
authorSam Varshavchik2022-05-22 13:35:13 -0400
committerSam Varshavchik2022-05-22 13:35:13 -0400
commitac1eba1d2cd22e62b24b963028f2cd623b1ab1da (patch)
treeeadfb723e38032bd93bfac702c113a5e9fbcd751 /unicode/m4/courier-unicode.m4
parent412734515b10bea970348dacdf42be3dc59845a6 (diff)
downloadcourier-libs-ac1eba1d2cd22e62b24b963028f2cd623b1ab1da.tar.bz2
gcc 12 and autotools updates.
Diffstat (limited to 'unicode/m4/courier-unicode.m4')
-rw-r--r--unicode/m4/courier-unicode.m422
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++])
])