diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-03-24 12:39:01 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-03-24 12:39:01 +0000 |
commit | 230b40cd41fd9ad8fdd3e67ec9baa9077bb8e7cb (patch) | |
tree | 8ec90437406ab9252c3822638c923de9f070dbd5 /configure.ac | |
parent | 0c3c05bc497748320de8987579a35da2af0059da (diff) | |
download | mpc-230b40cd41fd9ad8fdd3e67ec9baa9077bb8e7cb.tar.gz |
acinclude.m4: New macro MPC_PROG_CC_WARNINGFLAG.
configure.ac: Use MPC_PROG_CC_WARNINGFLAG, use warning cflags when checking system functions (like gettimeofday).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@501 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac index a9cc9eb..9d070d2 100644 --- a/configure.ac +++ b/configure.ac @@ -256,23 +256,16 @@ AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME -# Checks for library functions. +# Checks if compiler accepts warning flags. +MPC_PROG_CC_WARNINGCFLAGS([WARNINGCFLAGS]) + +# Checks for library functions with warning flags. +old_cflags=$CFLAGS +CFLAGS="$CFLAGS $WARNINGCFLAGS" AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNCS([dup dup2 fileno],, [AC_DEFINE([NO_STREAM_REDIRECTION],1,[Do not check mpc_out_str on stdout])]) - -# Checks if compiler accepts warning flags. -if test x$GCC = xyes ; then - case $host in - *-*-cygwin* | *-*-mingw*) ;; - *) AX_C_CHECK_FLAG(-ansi,,,WARNINGCFLAGS="$WARNINGCFLAGS -ansi",) ;; - esac - AX_C_CHECK_FLAG(-pedantic,,,WARNINGCFLAGS="$WARNINGCFLAGS -pedantic",) - AX_C_CHECK_FLAG(-Wall,,,WARNINGCFLAGS="$WARNINGCFLAGS -Wall",) - AX_C_CHECK_FLAG(-Wextra,,,WARNINGCFLAGS="$WARNINGCFLAGS -Wextra",) - AX_C_CHECK_FLAG(-Werror,,,WARNINGCFLAGS="$WARNINGCFLAGS -Werror",) - AC_SUBST(WARNINGCFLAGS) -fi +CFLAGS=$old_cflags AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile doc/Makefile]) AC_OUTPUT |