@@ -94,73 +94,52 @@ AS_IF([test "$acsm_CXX_STD_MAX" -ge "$acsm_CXX_STD_MIN"],
94
94
acsm_found_cxx=0
95
95
acsm_cxx_version=0
96
96
97
- AS_IF ( [ test "$acsm_found_cxx" = "0" ] ,
98
- [
97
+ dnl We test for every standard in our range, so that later standards
98
+ dnl still "count" as earlier standards too.
99
99
AS_IF ( [ test 2017 -le "$acsm_CXX_STD_MAX"] ,
100
100
[
101
101
AS_IF ( [ test 2017 -gt "$acsm_CXX_STD_MIN"] ,
102
102
[ AX_CXX_COMPILE_STDCXX ( [ 17] ,[ $3 ] ,[ optional] ) ] ,
103
- [ AS_IF ( [ test 2017 -eq "$acsm_CXX_STD_MIN"] ,
104
- [ AX_CXX_COMPILE_STDCXX ( [ 17] ,[ $3 ] ,[ mandatory] ) ] ) ] )
103
+ [ AX_CXX_COMPILE_STDCXX ( [ 17] ,[ $3 ] ,[ mandatory] ) ] )
105
104
AS_IF ( [ test "$HAVE_CXX17" = "1"] ,
106
105
[
107
106
AC_MSG_NOTICE ( [ Found C++17 standard support] )
108
-
109
- dnl For our purposes C++17 includes C++11 and C++14; there
110
- dnl are more people relying on e.g. HAVE_CXX11 than there
111
- dnl are relying on C++11 standards that have been removed
112
- dnl from C++17
113
- HAVE_CXX14=1
114
- HAVE_CXX11=1
115
- AC_SUBST ( HAVE_CXX14 )
116
- AC_SUBST ( HAVE_CXX11 )
117
- acsm_found_cxx=1
118
- acsm_cxx_version=17] ,
107
+ AS_IF ( [ test $acsm_found_cxx -eq 0] ,
108
+ [ acsm_cxx_version=17] )
109
+ acsm_found_cxx=1] ,
119
110
[ AS_IF ( [ test "$HAVE_CXX17" = "0"] ,
120
111
[ AC_MSG_NOTICE ( [ Did not find C++17 standard support] ) ] ) ] )
121
112
] )
122
- ] )
123
113
124
- AS_IF ( [ test "$acsm_found_cxx" = "0"] ,
125
- [
126
114
AS_IF ( [ test 2014 -le "$acsm_CXX_STD_MAX"] ,
127
115
[
128
116
AS_IF ( [ test 2014 -gt "$acsm_CXX_STD_MIN"] ,
129
117
[ AX_CXX_COMPILE_STDCXX ( [ 14] ,[ $3 ] ,[ optional] ) ] ,
130
- [ AS_IF ( [ test 2014 -eq "$acsm_CXX_STD_MIN"] ,
131
- [ AX_CXX_COMPILE_STDCXX ( [ 14] ,[ $3 ] ,[ mandatory] ) ] ) ] )
118
+ [ AX_CXX_COMPILE_STDCXX ( [ 14] ,[ $3 ] ,[ mandatory] ) ] )
132
119
AS_IF ( [ test "$HAVE_CXX14" = "1"] ,
133
120
[
134
121
AC_MSG_NOTICE ( [ Found C++14 standard support] )
135
-
136
- dnl For our purposes C++14 includes C++11; there
137
- dnl are people relying on HAVE_CXX11
138
- HAVE_CXX11=1
139
- AC_SUBST ( HAVE_CXX11 )
140
- acsm_found_cxx=1
141
- acsm_cxx_version=14] ,
122
+ AS_IF ( [ test $acsm_found_cxx -eq 0] ,
123
+ [ acsm_cxx_version=14] )
124
+ acsm_found_cxx=1] ,
142
125
[ AS_IF ( [ test "$HAVE_CXX14" = "0"] ,
143
126
[ AC_MSG_NOTICE ( [ Did not find C++14 standard support] ) ] ) ] )
144
127
] )
145
- ] )
146
128
147
- AS_IF ( [ test "$acsm_found_cxx" = "0"] ,
148
- [
149
129
AS_IF ( [ test 2011 -le "$acsm_CXX_STD_MAX"] ,
150
130
[
151
- AS_IF ( [ test 2011 -ge "$acsm_CXX_STD_MIN"] ,
131
+ AS_IF ( [ test 2011 -gt "$acsm_CXX_STD_MIN"] ,
152
132
[ AX_CXX_COMPILE_STDCXX ( [ 11] ,[ $3 ] ,[ optional] ) ] ,
153
- [ AS_IF ( [ test 2011 -eq "$acsm_CXX_STD_MIN"] ,
154
- [ AX_CXX_COMPILE_STDCXX ( [ 11] ,[ $3 ] ,[ mandatory] ) ] ) ] )
133
+ [ AX_CXX_COMPILE_STDCXX ( [ 11] ,[ $3 ] ,[ mandatory] ) ] )
155
134
AS_IF ( [ test "$HAVE_CXX11" = "1"] ,
156
135
[
157
136
AC_MSG_NOTICE ( [ Found C++11 standard support] )
158
- acsm_found_cxx=1
159
- acsm_cxx_version=11] ,
137
+ AS_IF ( [ test $acsm_found_cxx -eq 0] ,
138
+ [ acsm_cxx_version=11] )
139
+ acsm_found_cxx=1] ,
160
140
[ AS_IF ( [ test "$HAVE_CXX11" = "0"] ,
161
141
[ AC_MSG_NOTICE ( [ Did not find C++11 standard support] ) ] ) ] )
162
142
] )
163
- ] )
164
143
165
144
AS_IF ( [ test "$acsm_found_cxx" = "1"] ,
166
145
[ AC_MSG_NOTICE ( [ Using support for C++$acsm_cxx_version standard] ) ] ,
0 commit comments