From bac0445676120379be50736ce1d3fdf088f84e7d Mon Sep 17 00:00:00 2001 From: cpickett Date: Fri, 21 Mar 2008 17:22:43 +0000 Subject: [PATCH] * add options using AX_CFLAGS_GCC_OPTION git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@427 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- Makefile.am | 2 ++ configure.ac | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 79c9b16..cd05d08 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,3 +36,5 @@ SVNChangeLog: else \ echo "SVN Changelog not available" > $@ ;\ fi + +ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index d20054b..a00942f 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,9 @@ AC_INIT([Check], [0.9.5], [check-devel at lists dot sourceforge dot net]) # unique source file --- primitive safety check AC_CONFIG_SRCDIR([src/check.c]) +# place where extra autoconf macros are kept +AC_CONFIG_MACRO_DIR([m4]) + # place to put some extra build scripts installed AC_CONFIG_AUX_DIR([build-aux]) @@ -73,9 +76,16 @@ AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_LIBTOOL -if test -n "$GCC"; then - CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-variadic-macros" -fi + +# add these options to CFLAGS if gcc supports them +AX_CFLAGS_GCC_OPTION([-Wall]) +AX_CFLAGS_GCC_OPTION([-Wextra]) +# for some reason this option is detected as "obsolete"... +AX_CFLAGS_GCC_OPTION([-Wstrict-prototypes]) +AX_CFLAGS_GCC_OPTION([-Wmissing-prototypes]) +AX_CFLAGS_GCC_OPTION([-Wwrite-strings]) +AX_CFLAGS_GCC_OPTION([-Wno-variadic-macros]) + AC_CHECK_PROGS(GCOV, gcov, false) AC_CHECK_PROGS(LCOV, lcov, false) AC_CHECK_PROGS(GENHTML, genhtml, false) -- 2.40.0