From 7e46a1eaf005a0f979e8c425896a07f5e8f46840 Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 10 Oct 2019 23:28:27 +0200 Subject: [PATCH] Set debug & warning flags using new mate-common macros test: $ ./autogen.sh --disable-silent-rules --enable-debug=profile --enable-compile-warnings=maximum --prefix=/usr prefix: /usr source code location: . compiler: gcc cflags: -g -pg warning flags: -Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wformat-nonliteral -Wmissing-declarations -Wmissing-field-initializers -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wno-sign-compare linker flags: -pg $ ./autogen.sh --disable-silent-rules --disable-debug --disable-compile-warnings --prefix=/usr prefix: /usr source code location: . compiler: gcc cflags: warning flags: linker flags: $ grep MATE_ENABLE_DEBUG config.h --- configure.ac | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 225d1fa..5d219a7 100644 --- a/configure.ac +++ b/configure.ac @@ -14,28 +14,28 @@ AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz check-news]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +if test -z "$enable_maintainer_mode"; then + enable_maintainer_mode=yes +fi +AM_MAINTAINER_MODE([enable]) + +MATE_COMMON_INIT +MATE_DEBUG_CHECK([no]) +MATE_COMPILE_WARNINGS([yes]) +#MATE_MAINTAINER_MODE_DEFINES + GETTEXT_PACKAGE=mate-terminal AC_SUBST([GETTEXT_PACKAGE]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) AC_C_BIGENDIAN -if test -z "$enable_maintainer_mode"; then - enable_maintainer_mode=yes -fi -AM_MAINTAINER_MODE([enable]) - PKG_PROG_PKG_CONFIG AC_PROG_CC AC_HEADER_STDC AM_PROG_LIBTOOL IT_PROG_INTLTOOL([0.50.1]) -MATE_COMMON_INIT -MATE_DEBUG_CHECK -MATE_COMPILE_WARNINGS([maximum]) -#MATE_MAINTAINER_MODE_DEFINES - AM_GLIB_GNU_GETTEXT GLIB_REQUIRED=2.50.0 @@ -144,6 +144,9 @@ echo " prefix: ${prefix} source code location: ${srcdir} compiler: ${CC} + cflags: ${CFLAGS} + warning flags: ${WARN_CFLAGS} + linker flags: ${LDFLAGS} s/key support: ${enable_skey} "