summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2020-04-04 00:09:20 +0200
committerraveit65 <[email protected]>2022-07-20 23:45:24 +0200
commit5600eb0d3819db43bb1a58b54d55f6db19ab1bd0 (patch)
tree8424230e1758346353504debc18a4adb4df13e32
parent382f8de466127f469f345d52b863aedf04bc0cc4 (diff)
downloadcaja-5600eb0d3819db43bb1a58b54d55f6db19ab1bd0.tar.bz2
caja-5600eb0d3819db43bb1a58b54d55f6db19ab1bd0.tar.xz
use MATE_COMPILE_WARNINGS from mate-common
-rw-r--r--configure.ac51
-rw-r--r--eel/Makefile.am2
-rw-r--r--libcaja-extension/Makefile.am2
-rw-r--r--libcaja-private/Makefile.am2
-rw-r--r--libegg/Makefile.am2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/file-manager/Makefile.am2
-rw-r--r--test/Makefile.am2
8 files changed, 11 insertions, 54 deletions
diff --git a/configure.ac b/configure.ac
index 85c14ef3..157b6ee4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,8 @@ AC_CONFIG_SRCDIR(src)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
+MATE_COMPILE_WARNINGS
+
AM_INIT_AUTOMAKE([1.9 tar-ustar dist-xz no-dist-gzip check-news])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
@@ -211,53 +213,6 @@ if test "x$enable_packagekit" != "xno"; then
AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable PackageKit mimetype installer])
fi
-# ==========================================================================
-# Turn on the additional warnings last, so -Werror doesn't affect other tests.
-
-WARNING_CFLAGS=""
-
-AC_ARG_ENABLE(more-warnings,
-AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
-set_more_warnings="$enableval",[
-if test -f $srcdir/CVSVERSION; then
- is_cvs_version=true
- set_more_warnings=yes
-else
- set_more_warnings=no
-fi
-])
-AC_MSG_CHECKING(for more warnings, including -Werror)
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- AC_MSG_RESULT(yes)
- WARNING_CFLAGS="\
- -Wall \
- -Wmissing-declarations -Wmissing-prototypes \
- -Wnested-externs -Wpointer-arith \
- -Wcast-align \
- -Werror"
-
- for option in -Wstrict-aliasing=0 -Wno-pointer-sign; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
- if test $has_option = yes; then
- WARNING_CFLAGS="$WARNING_CFLAGS $option"
- fi
- AC_MSG_RESULT($has_option)
- CFLAGS="$SAVE_CFLAGS"
- unset has_option
- unset SAVE_CFLAGS
- done
- unset option
-else
- AC_MSG_RESULT(no)
-fi
-
-AC_SUBST(WARNING_CFLAGS)
-
dnl ==========================================================================
dnl libegg
@@ -348,6 +303,8 @@ caja-$VERSION:
prefix: ${prefix}
source code location: ${srcdir}
compiler: ${CC}
+ compiler flags: ${CFLAGS}
+ warning flags: ${WARN_CFLAGS}
xmp support: $msg_xmp
PackageKit support: $msg_packagekit
Self check: $msg_self_check
diff --git a/eel/Makefile.am b/eel/Makefile.am
index cf886ce4..e999b453 100644
--- a/eel/Makefile.am
+++ b/eel/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir) \
$(CORE_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DSOURCE_DATADIR=\""$(top_srcdir)/data"\" \
diff --git a/libcaja-extension/Makefile.am b/libcaja-extension/Makefile.am
index 540afbc1..a33bebb9 100644
--- a/libcaja-extension/Makefile.am
+++ b/libcaja-extension/Makefile.am
@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
$(LIBCAJA_EXTENSION_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
$(NULL)
diff --git a/libcaja-private/Makefile.am b/libcaja-private/Makefile.am
index a567afdc..01b0ffce 100644
--- a/libcaja-private/Makefile.am
+++ b/libcaja-private/Makefile.am
@@ -6,7 +6,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
$(CORE_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
$(TRACKER_CFLAGS) \
$(BEAGLE_CFLAGS) \
diff --git a/libegg/Makefile.am b/libegg/Makefile.am
index b174a82b..3601740a 100644
--- a/libegg/Makefile.am
+++ b/libegg/Makefile.am
@@ -27,7 +27,7 @@ libegg_la_CFLAGS = \
-DEGG_SM_CLIENT_BACKEND_XSMP \
-DG_LOG_DOMAIN=\""EggSMClient"\" \
$(LIBEGG_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
$(DISABLE_DEPRECATED)
libegg_la_LIBADD = \
diff --git a/src/Makefile.am b/src/Makefile.am
index 8ce75565..8af31525 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,7 +13,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir)/libcaja-private \
$(CORE_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
$(EXIF_CFLAGS) \
$(EXEMPI_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
diff --git a/src/file-manager/Makefile.am b/src/file-manager/Makefile.am
index 1a1031e2..6c1e59ca 100644
--- a/src/file-manager/Makefile.am
+++ b/src/file-manager/Makefile.am
@@ -5,7 +5,7 @@ noinst_LTLIBRARIES=libcaja-file-manager.la
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(CORE_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
-DCAJA_DATADIR=\""$(datadir)/caja"\" \
-DDATADIR=\""$(datadir)"\" \
$(DISABLE_DEPRECATED_CFLAGS) \
diff --git a/test/Makefile.am b/test/Makefile.am
index 18093047..ada26435 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -3,7 +3,7 @@ NULL=
AM_CPPFLAGS =\
-I$(top_srcdir) \
$(CORE_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
-DVERSION="\"$(VERSION)\"" \
-DCAJA_DATADIR=\""$(datadir)/caja"\" \
-DMATELOCALEDIR=\""$(prefix)/${DATADIRNAME}/locale"\" \