@@ -388,22 +388,30 @@ AS_IF([test "x$enable_Werror" = "xyes" || test "x$enable_Werror" = "xauto"],
388
388
[ AS_IF ( [ test -n "$CC"] ,[ AS_IF ( [ $CC --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"] ,
389
389
[ AC_MSG_NOTICE ( [ Enabling pedantic errors for GNU C] )
390
390
CFLAGS="$CFLAGS -pedantic -Wall -Werror -Werror=format-security"] ,
391
- [ AC_MSG_NOTICE ( [ Not enabling pedantic errors: compiler not supported by this recipe (not GNU C)] )
392
- AS_IF ( [ test "x$enable_Werror" = "xyes"] , [ AC_MSG_ERROR ( [ --enable-Werror=yes was requested and can not be satisfied for C: $CC] ) ] )
393
- ] ) ] )
391
+ [ AS_IF ( [ $CC --version 2>&1 | grep 'clang version' > /dev/null] ,
392
+ [ AC_MSG_NOTICE ( [ Enabling pedantic errors for clang C] )
393
+ CFLAGS="$CFLAGS -pedantic -Wall -Werror -Werror=format-security"] ,
394
+ [ AC_MSG_NOTICE ( [ Not enabling pedantic errors: compiler not supported by this recipe (not GNU or clang C)] )
395
+ AS_IF ( [ test "x$enable_Werror" = "xyes"] , [ AC_MSG_ERROR ( [ --enable-Werror=yes was requested and can not be satisfied for C: $CC] ) ] )
396
+ ] ) ] ) ] )
394
397
AS_IF ( [ test -n "$CXX"] ,[ AS_IF ( [ $CXX --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"] ,
395
398
[ AC_MSG_NOTICE ( [ Enabling pedantic errors for GNU C++] )
396
399
CXXFLAGS="$CXXFLAGS -pedantic -Wall -Werror -Werror=format-security"] ,
397
- [ AC_MSG_NOTICE ( [ Not enabling pedantic errors: compiler not supported by this recipe (not GNU C++)] )
398
- AS_IF ( [ test "x$enable_Werror" = "xyes"] , [ AC_MSG_ERROR ( [ --enable-Werror=yes was requested and can not be satisfied for C++: $CXX] ) ] )
399
- ] ) ] )
400
+ [ AS_IF ( [ $CXX --version 2>&1 | grep 'clang version' > /dev/null] ,
401
+ [ AC_MSG_NOTICE ( [ Enabling pedantic errors for clang C++] )
402
+ CXXFLAGS="$CXXFLAGS -pedantic -Wall -Werror -Werror=format-security"] ,
403
+ [ AC_MSG_NOTICE ( [ Not enabling pedantic errors: compiler not supported by this recipe (not GNU or clang C++)] )
404
+ AS_IF ( [ test "x$enable_Werror" = "xyes"] , [ AC_MSG_ERROR ( [ --enable-Werror=yes was requested and can not be satisfied for C++: $CXX] ) ] )
405
+ ] ) ] ) ] )
400
406
AS_IF ( [ test -n "$CPP"] ,[ AS_IF ( [ $CPP --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"] ,
401
407
[ AC_MSG_NOTICE ( [ Enabling pedantic errors for GNU CPP preprocessor] )
402
- CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
403
- ] ,
404
- [ AC_MSG_NOTICE ( [ Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU CPP)] )
405
- AS_IF ( [ test "x$enable_Werror" = "xyes"] , [ AC_MSG_ERROR ( [ --enable-Werror=yes was requested and can not be satisfied for CPP: $CPP] ) ] )
406
- ] ) ] )
408
+ CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"] ,
409
+ [ AS_IF ( [ $CXX --version 2>&1 | grep 'clang version' > /dev/null] ,
410
+ [ AC_MSG_NOTICE ( [ Enabling pedantic errors for clang CPP preprocessor] )
411
+ CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"] ,
412
+ [ AC_MSG_NOTICE ( [ Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU or clang CPP)] )
413
+ AS_IF ( [ test "x$enable_Werror" = "xyes"] , [ AC_MSG_ERROR ( [ --enable-Werror=yes was requested and can not be satisfied for CPP: $CPP] ) ] )
414
+ ] ) ] ) ] )
407
415
] )
408
416
409
417
# Specify output files
0 commit comments