]> git.meshlink.io Git - catta/blobdiff - configure.ac
cleaned some compiler warning flags
[catta] / configure.ac
index 7430faa1ed16128c9f7f73a30ce39faed16eb72d..d760f340af3c5c40b76658830f07419f9239c5db 100644 (file)
@@ -135,7 +135,7 @@ if test x"$enable_ssp" = x"yes"; then
 fi
 
 # libtool stuff
-AC_PROG_LIBTOOL
+LT_INIT([win32-dll])
 
 ACX_PTHREAD(,AC_MSG_ERROR([Missing POSIX Threads support]))
 
@@ -254,7 +254,13 @@ test_gcc_flag() {
 # If using GCC specify some additional parameters
 if test "x$GCC" = "xyes" ; then
 
-    DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -fdiagnostics-show-option -Wno-cast-qual -fno-strict-aliasing"
+    DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wold-style-definition -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -fdiagnostics-show-option -fno-strict-aliasing"
+
+    # when compiling for MingW, -Wmissing-noreturn is triggered a bunch of
+    # times from autogenerated libtool wrappers, so leave it out on Windows.
+    if test "x$ac_cv_have_decl__WIN32" != "xyes" ; then
+        DESIRED_FLAGS="$DESIRED_FLAGS -Wmissing-noreturn"
+    fi
 
     for flag in $DESIRED_FLAGS ; do
         AC_MSG_CHECKING([whether $CC accepts $flag])