2626# a detected standard. If no acceptable standard is detected, error
2727# out.
2828#
29+ # This macro makes "callbacks" to a user macro, ACSM_TEST_CXX_ALL,
30+ # which can be used to add additional C++ required-feature tests.
31+ # The user implementation of ACSM_TEST_CXX_ALL should set
32+ # have_cxx_all=yes if no tests fail, or have_cxx_all=no otherwise.
33+ #
2934# LICENSE
3035#
3136# Copyright (c) 2021 Roy Stogner <Roy.Stogner@inl.gov>
@@ -101,7 +106,9 @@ dnl still "count" as earlier standards too.
101106 AS_IF ( [ test 2017 -gt "$acsm_CXX_STD_MIN"] ,
102107 [ AX_CXX_COMPILE_STDCXX ( [ 17] ,[ $3 ] ,[ optional] ) ] ,
103108 [ AX_CXX_COMPILE_STDCXX ( [ 17] ,[ $3 ] ,[ mandatory] ) ] )
104- AS_IF ( [ test "$HAVE_CXX17" = "1"] ,
109+ AS_IF ( [ test $acsm_found_cxx -eq 0] ,
110+ [ ACSM_TEST_CXX_ALL] )
111+ AS_IF ( [ test "$HAVE_CXX17" = "1" -a "x$have_cxx_all"=xyes] ,
105112 [
106113 AC_MSG_NOTICE ( [ Found C++17 standard support] )
107114 AS_IF ( [ test $acsm_found_cxx -eq 0] ,
@@ -116,7 +123,9 @@ dnl still "count" as earlier standards too.
116123 AS_IF ( [ test 2014 -gt "$acsm_CXX_STD_MIN"] ,
117124 [ AX_CXX_COMPILE_STDCXX ( [ 14] ,[ $3 ] ,[ optional] ) ] ,
118125 [ AX_CXX_COMPILE_STDCXX ( [ 14] ,[ $3 ] ,[ mandatory] ) ] )
119- AS_IF ( [ test "$HAVE_CXX14" = "1"] ,
126+ AS_IF ( [ test $acsm_found_cxx -eq 0] ,
127+ [ ACSM_TEST_CXX_ALL] )
128+ AS_IF ( [ test "$HAVE_CXX14" = "1" -a "x$have_cxx_all"=xyes] ,
120129 [
121130 AC_MSG_NOTICE ( [ Found C++14 standard support] )
122131 AS_IF ( [ test $acsm_found_cxx -eq 0] ,
@@ -131,7 +140,9 @@ dnl still "count" as earlier standards too.
131140 AS_IF ( [ test 2011 -gt "$acsm_CXX_STD_MIN"] ,
132141 [ AX_CXX_COMPILE_STDCXX ( [ 11] ,[ $3 ] ,[ optional] ) ] ,
133142 [ AX_CXX_COMPILE_STDCXX ( [ 11] ,[ $3 ] ,[ mandatory] ) ] )
134- AS_IF ( [ test "$HAVE_CXX11" = "1"] ,
143+ AS_IF ( [ test $acsm_found_cxx -eq 0] ,
144+ [ ACSM_TEST_CXX_ALL] )
145+ AS_IF ( [ test "$HAVE_CXX11" = "1" -a "x$have_cxx_all"=xyes] ,
135146 [
136147 AC_MSG_NOTICE ( [ Found C++11 standard support] )
137148 AS_IF ( [ test $acsm_found_cxx -eq 0] ,
0 commit comments