summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2015-07-13 16:04:48 +0200
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2015-07-13 16:04:48 +0200
commit569bfca9e2c19d3ecf27429ccec8ebdb9d5df311 (patch)
tree5cbdb851b7684182e805cee9fed89b78b23d397d /macros
parent0cb42dc92a380b2033f92bb7f31fc8a0dc0b278a (diff)
downloadmm-common-569bfca9e2c19d3ecf27429ccec8ebdb9d5df311.tar.gz
Add MM_ prefix to AX_CXX_COMPILE_STDCXX_11 m4 macro
* macros/mm-ax_cxx_compile_stdcxx_11.m4: Add MM_ prefix, to avoid possible conflict with AX_CXX_COMPILE_STDCXX_11 in other modules. This patch can possibly be applied to future versions, if an updated version is copied from www.gnu.org/software/autoconf-archive. Bug #751432.
Diffstat (limited to 'macros')
-rw-r--r--macros/mm-ax_cxx_compile_stdcxx_11.m419
1 files changed, 11 insertions, 8 deletions
diff --git a/macros/mm-ax_cxx_compile_stdcxx_11.m4 b/macros/mm-ax_cxx_compile_stdcxx_11.m4
index b83fac4..47aa97a 100644
--- a/macros/mm-ax_cxx_compile_stdcxx_11.m4
+++ b/macros/mm-ax_cxx_compile_stdcxx_11.m4
@@ -4,7 +4,7 @@
#
# SYNOPSIS
#
-# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
+# MM_AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
#
# DESCRIPTION
#
@@ -34,9 +34,12 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
+# Copied from ax_cxx_compile_stdcxx_11.m4 and added MM_ prefix to avoid
+# possible conflict with AX_CXX_COMPILE_STDCXX_11 in other modules.
+
#serial 11
-m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
+m4_define([_MM_AX_CXX_COMPILE_STDCXX_11_testbody], [[
template <typename T>
struct check
{
@@ -86,20 +89,20 @@ m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
}
]])
-AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
+AC_DEFUN([MM_AX_CXX_COMPILE_STDCXX_11], [dnl
m4_if([$1], [], [],
[$1], [ext], [],
[$1], [noext], [],
- [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
+ [m4_fatal([invalid argument `$1' to MM_AX_CXX_COMPILE_STDCXX_11])])dnl
m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
[$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
[$2], [optional], [ax_cxx_compile_cxx11_required=false],
- [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])
+ [m4_fatal([invalid second argument `$2' to MM_AX_CXX_COMPILE_STDCXX_11])])
AC_LANG_PUSH([C++])dnl
ac_success=no
AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
ax_cv_cxx_compile_cxx11,
- [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_11_testbody])],
[ax_cv_cxx_compile_cxx11=yes],
[ax_cv_cxx_compile_cxx11=no])])
if test x$ax_cv_cxx_compile_cxx11 = xyes; then
@@ -114,7 +117,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
$cachevar,
[ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $switch"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_11_testbody])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXXFLAGS="$ac_save_CXXFLAGS"])
@@ -136,7 +139,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
$cachevar,
[ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $switch"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_MM_AX_CXX_COMPILE_STDCXX_11_testbody])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXXFLAGS="$ac_save_CXXFLAGS"])