summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2017-03-13 19:33:39 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2017-03-15 10:02:32 +0000
commitf171ad4c1c722b5187ac27d8e4b71f42ccd8e207 (patch)
tree67add24cefdd0c07e79fa52b99effd9a0181bff7
parent803bac5a19c0d41f32aacfa14ab963349f20263a (diff)
configure.ac: wire -Wall -Wextra directly into the build
Both flags are widely available and the rest of MAYBE_WARN are of little interest. Since atm no flags were passed, we might as well not bother with anything but the former two. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> --- This will prompt some warnings, but we can sort this at a later stage.
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac38
2 files changed, 1 insertions, 38 deletions
diff --git a/Makefile.am b/Makefile.am
index 80de719..a6abf78 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,6 +37,7 @@ kmscube_LDADD = \
kmscube_CFLAGS = \
-O0 -g \
+ -Wall -Wextra \
$(DRM_CFLAGS) \
$(GBM_CFLAGS) \
$(EGL_CFLAGS) \
diff --git a/configure.ac b/configure.ac
index 615488a..785cd76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,43 +44,5 @@ PKG_CHECK_MODULES(GBM, gbm)
PKG_CHECK_MODULES(EGL, egl)
PKG_CHECK_MODULES(GLES2, glesv2)
-dnl ===========================================================================
-dnl check compiler flags
-AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
- AC_MSG_CHECKING([whether $CC supports $1])
-
- libdrm_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $1"
-
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
- [libdrm_cc_flag=yes],
- [libdrm_cc_flag=no])
- CFLAGS="$libdrm_save_CFLAGS"
-
- if test "x$libdrm_cc_flag" = "xyes"; then
- ifelse([$2], , :, [$2])
- else
- ifelse([$3], , :, [$3])
- fi
- AC_MSG_RESULT([$libdrm_cc_flag])
-])
-
-MAYBE_WARN="-Wall -Wextra -Wno-packed-bitfield-compat \
--Wsign-compare -Werror-implicit-function-declaration \
--Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
--Wnested-externs \
--Wpacked -Wswitch-enum -Wmissing-format-attribute \
--Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
--Wdeclaration-after-statement -Wold-style-definition \
--Wno-missing-field-initializers -Wno-unused-parameter \
--Wno-attributes -Wno-long-long -Winline"
-
-AC_MSG_CHECKING([which warning flags were supported])
-for W in $MAYBE_WARN; do
- LIBDRM_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
-done
-
-AC_SUBST(WARN_CFLAGS)
-
AC_CONFIG_FILES([Makefile])
AC_OUTPUT