Set debug & warning flags using new mate-common macros

test:

$ ./autogen.sh --disable-silent-rules --enable-debug=profile --enable-compile-warnings=maximum --prefix=/usr

<cut>
	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
<cut>

$ ./autogen.sh --disable-silent-rules --disable-debug --disable-compile-warnings --prefix=/usr
<cut>
	prefix:                 /usr
	source code location:   .
	compiler:               gcc
	cflags:
	warning flags:
	linker flags:
<cut>

$ grep MATE_ENABLE_DEBUG config.h
rbuj 2019-10-10 23:28:27 +02:00 committed by raveit65
parent 4248e1c7ee
commit 7e46a1eaf0
1 changed files with 13 additions and 10 deletions

View File

@ -14,28 +14,28 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz check-news]) AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz check-news])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) 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 GETTEXT_PACKAGE=mate-terminal
AC_SUBST([GETTEXT_PACKAGE]) AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
AC_C_BIGENDIAN AC_C_BIGENDIAN
if test -z "$enable_maintainer_mode"; then
enable_maintainer_mode=yes
fi
AM_MAINTAINER_MODE([enable])
PKG_PROG_PKG_CONFIG PKG_PROG_PKG_CONFIG
AC_PROG_CC AC_PROG_CC
AC_HEADER_STDC AC_HEADER_STDC
AM_PROG_LIBTOOL AM_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.50.1]) IT_PROG_INTLTOOL([0.50.1])
MATE_COMMON_INIT
MATE_DEBUG_CHECK
MATE_COMPILE_WARNINGS([maximum])
#MATE_MAINTAINER_MODE_DEFINES
AM_GLIB_GNU_GETTEXT AM_GLIB_GNU_GETTEXT
GLIB_REQUIRED=2.50.0 GLIB_REQUIRED=2.50.0
@ -144,6 +144,9 @@ echo "
prefix: ${prefix} prefix: ${prefix}
source code location: ${srcdir} source code location: ${srcdir}
compiler: ${CC} compiler: ${CC}
cflags: ${CFLAGS}
warning flags: ${WARN_CFLAGS}
linker flags: ${LDFLAGS}
s/key support: ${enable_skey} s/key support: ${enable_skey}
" "