aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-04-12 04:16:22 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:16:22 +0000
commit4e4441fd32e694753824a543c050e5d3c0b49a5a (patch)
tree19f9bf11723edbc2a34e2d7d8b6d545003c2bae7 /configure.ac
parentdd20681daa91b2143c9f8f6e27b59845a14f51b6 (diff)
downloadmpd-4e4441fd32e694753824a543c050e5d3c0b49a5a.tar.gz
mpd-4e4441fd32e694753824a543c050e5d3c0b49a5a.tar.xz
mpd-4e4441fd32e694753824a543c050e5d3c0b49a5a.zip
configure: better CFLAGS checking
needed for compatibility with older gcc. Also, threw in some warnings for things I find offensive (declaration-after-statement, shadow) git-svn-id: https://svn.musicpd.org/mpd/trunk@7299 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--configure.ac12
1 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1b8bc0400..81a94afdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,7 @@ AC_SUBST(MPD_CFLAGS)
AC_SUBST(MP4FF_LIB)
AC_SUBST(MP4FF_SUBDIR)
+AC_LANG(C)
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
@@ -21,8 +22,15 @@ AC_DEFINE(PROTOCOL_VERSION, "0.14.0", [The mpd protocol version])
MPD_LIBS=""
MPD_CFLAGS=""
-if test x$GCC = xyes; then
- MPD_CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-deprecated-declarations -Wmissing-prototypes"
+if test x$GCC = xyes
+then
+ MPD_CHECK_FLAG([-Wall])
+ MPD_CHECK_FLAG([-Wextra])
+ MPD_CHECK_FLAG([-Wno-unused-parameter])
+ MPD_CHECK_FLAG([-Wno-deprecated-declarations])
+ MPD_CHECK_FLAG([-Wmissing-prototypes])
+ MPD_CHECK_FLAG([-Wdeclaration-after-statement])
+ MPD_CHECK_FLAG([-Wshadow])
fi
if test -z "$prefix" || test "x$prefix" = xNONE; then