@@ -1198,26 +1198,30 @@ AS_IF([test "x$enable_Werror" = "xyes" || test "x$enable_Werror" = "xauto"],
1198
1198
[AS_IF([test -n "$CC"],[AS_IF([$CC --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
1199
1199
[AC_MSG_NOTICE([Enabling pedantic errors for GNU C])
1200
1200
CFLAGS="$CFLAGS -pedantic -Wall -Werror -Werror=format-security"],
1201
- [AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU C)])
1202
- AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C: $CC])])
1203
- ])])
1201
+ [AS_IF([$CC --version 2>&1 | grep 'clang version' > /dev/null],
1202
+ [AC_MSG_NOTICE([Enabling pedantic errors for clang C])
1203
+ CFLAGS="$CFLAGS -pedantic -Wall -Werror -Werror=format-security"],
1204
+ [AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU or clang C)])
1205
+ AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C: $CC])])
1206
+ ])])])
1204
1207
AS_IF([test -n "$CXX"],[AS_IF([$CXX --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
1205
1208
[AC_MSG_NOTICE([Enabling pedantic errors for GNU C++])
1206
1209
CXXFLAGS="$CXXFLAGS -pedantic -Wall -Werror -Werror=format-security"],
1207
- [AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU C++)])
1208
- AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C++: $CXX])])
1209
- ])])
1210
+ [AS_IF([$CXX --version 2>&1 | grep 'clang version' > /dev/null],
1211
+ [AC_MSG_NOTICE([Enabling pedantic errors for clang C++])
1212
+ CXXFLAGS="$CXXFLAGS -pedantic -Wall -Werror -Werror=format-security"],
1213
+ [AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU or clang C++)])
1214
+ AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C++: $CXX])])
1215
+ ])])])
1210
1216
AS_IF([test -n "$CPP"],[AS_IF([$CPP --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
1211
1217
[AC_MSG_NOTICE([Enabling pedantic errors for GNU CPP preprocessor])
1212
- .if project.use_cxx
1213
- CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall"
1214
- .else
1215
- CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
1216
- .endif
1217
- ],
1218
- [AC_MSG_NOTICE([Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU CPP)])
1219
- AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for CPP: $CPP])])
1220
- ])])
1218
+ CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"],
1219
+ [AS_IF([$CXX --version 2>&1 | grep 'clang version' > /dev/null],
1220
+ [AC_MSG_NOTICE([Enabling pedantic errors for clang CPP preprocessor])
1221
+ CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"],
1222
+ [AC_MSG_NOTICE([Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU or clang CPP)])
1223
+ AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for CPP: $CPP])])
1224
+ ])])])
1221
1225
])
1222
1226
1223
1227
.if project.use_cxx_gcc_4_9
0 commit comments