Fix GCC -Wpedantic checking in configure
authorIvan Maidanski <ivmai@mail.ru>
Tue, 22 Nov 2016 01:48:41 +0000 (04:48 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 22 Nov 2016 01:48:41 +0000 (04:48 +0300)
(fix commit 96a8fd9)

* configure.ac [GCC] (ac_cv_cc_pedantic): Compile code that contains
"extern int quiet" (since the translation unit cannot be empty).

configure.ac

index 055167a..796dccd 100644 (file)
@@ -57,7 +57,9 @@ if test "$GCC" = yes; then
   AS_IF([test "$ac_cv_cc_wextra" = yes], [WEXTRA="-Wextra"], [WEXTRA="-W"])
   AC_MSG_CHECKING(for gcc -Wpedantic)
   CFLAGS="-Wpedantic -Wno-long-long $CFLAGS"
-  AC_TRY_COMPILE([],[], [ac_cv_cc_pedantic=yes], [ac_cv_cc_pedantic=no])
+  AC_TRY_COMPILE([],[
+extern int quiet;
+  ], [ac_cv_cc_pedantic=yes], [ac_cv_cc_pedantic=no])
   CFLAGS="$old_CFLAGS"
   AC_MSG_RESULT($ac_cv_cc_pedantic)
   WPEDANTIC=