aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 30 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 5e56dfd2..57495032 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,33 @@ LT_PREREQ([2.2])
LT_INIT([disable-static])
dnl-----------------------------------------------------------------------------
+dnl Compiler warnings
+dnl
+
+dnl Make sure autoconf-archive is available
+m4_pattern_forbid([^AX_(COMPILER_FLAGS|COMPILER_FLAGS_(CFLAGS|GIR|LDFLAGS))\b],
+ [Unexpanded AX_ macro found. Please install GNU autoconf-archive])
+
+dnl Detect git or release builds
+AX_IS_RELEASE([git-directory])
+
+dnl Function type cast disabled: used throughout the code especially to
+dnl cast GAsyncReadyCallbacks with the real object type instead of GObject
+DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-cast-function-type"
+
+dnl All message protocol structs are packed, never complain about it
+DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-packed"
+
+dnl Setup compiler checks
+AX_COMPILER_FLAGS()
+AX_COMPILER_FLAGS_CFLAGS(,,,[${DISABLED_WARNINGS}])
+
+dnl Specify gnu89 mode
+if test "$GCC" = "yes"; then
+ CFLAGS="$CFLAGS -std=gnu89"
+fi
+
+dnl-----------------------------------------------------------------------------
dnl Version definitions
dnl
@@ -384,8 +411,6 @@ case $with_qmi in
;;
esac
-NM_COMPILER_WARNINGS
-
dnl-----------------------------------------------------------------------------
dnl Distribution version string
dnl
@@ -534,7 +559,10 @@ echo "
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
+ warn cflags: ${WARN_CFLAGS}
+ warn ldflags: ${WARN_LDFLAGS}
maintainer mode: ${USE_MAINTAINER_MODE}
+ release: ${ax_is_release}
System paths:
prefix: ${prefix}