From 81f898e2b7f74497e05efba0667e6bae4aae324f Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 19 May 2003 21:59:45 +0000 Subject: [PATCH] Autoconf archive macro to maximise warnings (gcc only) git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4799 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Tools/config/ac_compile_warnings.m4 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Tools/config/ac_compile_warnings.m4 diff --git a/Tools/config/ac_compile_warnings.m4 b/Tools/config/ac_compile_warnings.m4 new file mode 100644 index 000000000..ca1a85f78 --- /dev/null +++ b/Tools/config/ac_compile_warnings.m4 @@ -0,0 +1,28 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_compile_warnings.html +dnl +AC_DEFUN([AC_COMPILE_WARNINGS], +[AC_MSG_CHECKING(maximum warning verbosity option) +if test -n "$CXX" +then + if test "$GXX" = "yes" + then + ac_compile_warnings_opt='-Wall' + fi + CXXFLAGS="$CXXFLAGS $ac_compile_warnings_opt" + ac_compile_warnings_msg="$ac_compile_warnings_opt for C++" +fi + +if test -n "$CC" +then + if test "$GCC" = "yes" + then + ac_compile_warnings_opt='-Wall' + fi + CFLAGS="$CFLAGS $ac_compile_warnings_opt" + ac_compile_warnings_msg="$ac_compile_warnings_msg $ac_compile_warnings_opt for C" +fi +AC_MSG_RESULT($ac_compile_warnings_msg) +unset ac_compile_warnings_msg +unset ac_compile_warnings_opt +])