summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-09-25 16:35:09 +0200
committerraveit65 <[email protected]>2019-09-30 21:19:42 +0200
commit04657b8f6ef57fe5f6b620dbfe6db8b9a097ad9b (patch)
tree7504f2c94a6998634739e8d059176353186cfc12
parentf25804efa335294b633759e19ae8d4964bd9614e (diff)
downloadengrampa-04657b8f6ef57fe5f6b620dbfe6db8b9a097ad9b.tar.bz2
engrampa-04657b8f6ef57fe5f6b620dbfe6db8b9a097ad9b.tar.xz
Use mate-compiler-flags.m4 provided by mate-common
USAGE: ./autogen.sh --enable-compile-warnings=no/minimum/yes/maximum/error@ If --enable-compile-warnings is not provided, the default is --enable-compile-warnings=yes
-rw-r--r--.travis.yml4
-rw-r--r--caja/Makefile.am1
-rw-r--r--configure.ac21
-rw-r--r--copy-n-paste/Makefile.am7
-rw-r--r--src/Makefile.am6
-rw-r--r--src/commands/Makefile.am7
6 files changed, 23 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml
index 9c5ec28..dc807c5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -64,6 +64,7 @@ env:
requires:
archlinux:
# Useful URL: https://git.archlinux.org/svntogit/community.git/tree/engrampa
+ - autoconf-archive
- caja
- clang
- file
@@ -80,6 +81,7 @@ requires:
debian:
# Useful URL: https://github.com/mate-desktop/debian-packages
# Useful URL: https://salsa.debian.org/debian-mate-team/engrampa
+ - autoconf-archive
- clang
- clang-tools
- cppcheck
@@ -98,6 +100,7 @@ requires:
fedora:
# Useful URL: https://src.fedoraproject.org/cgit/rpms/engrampa.git
+ - autoconf-archive
- caja-devel
- clang
- clang-analyzer
@@ -114,6 +117,7 @@ requires:
- redhat-rpm-config
ubuntu:
+ - autoconf-archive
- clang
- clang-tools
- gettext
diff --git a/caja/Makefile.am b/caja/Makefile.am
index 85da23e..4821897 100644
--- a/caja/Makefile.am
+++ b/caja/Makefile.am
@@ -1,4 +1,5 @@
AM_CPPFLAGS = \
+ $(WARN_CFLAGS) \
-DFR_DATADIR=\"$(datadir)\" \
-DMATELOCALEDIR=\""$(datadir)/locale"\" \
-I$(top_srcdir) \
diff --git a/configure.ac b/configure.ac
index c2e6238..6600379 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,7 @@ AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
MATE_COMMON_INIT
+MATE_COMPILE_WARNINGS
AC_PROG_CC
AM_DISABLE_STATIC
@@ -48,26 +49,6 @@ AC_SUBST([GTK_LIBS])
dnl ===========================================================================
-WARN_CFLAGS="-Wall -Wcast-align -Wtype-limits -Wclobbered -Wempty-body -Wignored-qualifiers"
-
-for option in $WARN_CFLAGS; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[has_option=yes],[has_option=no])
- if test x$has_option = xyes; then
- WARNINGS="$WARNINGS $option"
- fi
- AC_MSG_RESULT($has_option)
- CFLAGS="$SAVE_CFLAGS"
- unset has_option
- unset SAVE_CFLAGS
-done
-unset option
-CFLAGS="$CFLAGS $WARNINGS"
-
-dnl ===========================================================================
-
AC_ARG_ENABLE(run_in_place,
AS_HELP_STRING([--enable-run-in-place],
[load ui data and extensions from the source tree]),,
diff --git a/copy-n-paste/Makefile.am b/copy-n-paste/Makefile.am
index 776885a..33f7469 100644
--- a/copy-n-paste/Makefile.am
+++ b/copy-n-paste/Makefile.am
@@ -1,10 +1,15 @@
+NULL =
+
AM_CPPFLAGS = \
-UGETTEXT_PACKAGE
noinst_LTLIBRARIES = libeggsmclient.la
libeggsmclient_la_LIBADD = $(GTK_LIBS)
-libeggsmclient_la_CFLAGS = $(GTK_CFLAGS)
+libeggsmclient_la_CFLAGS = \
+ $(GTK_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(NULL)
libeggsmclient_la_SOURCES = eggdesktopfile.h \
eggdesktopfile.c \
eggsmclient.h \
diff --git a/src/Makefile.am b/src/Makefile.am
index ff381fe..f0cd3e7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,5 @@
+NULL =
+
SUBDIRS = commands sh ui
bin_PROGRAMS = engrampa
@@ -36,7 +38,9 @@ AM_CPPFLAGS = \
-DPRIVEXECDIR=\"$(privexecdir)\" \
-DSHDIR=\"$(shdir)\" \
$(FR_CFLAGS) \
- $(JSON_GLIB_CFLAGS)
+ $(JSON_GLIB_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(NULL)
BUILT_SOURCES = \
fr-marshal.c \
diff --git a/src/commands/Makefile.am b/src/commands/Makefile.am
index 63d3d73..d423737 100644
--- a/src/commands/Makefile.am
+++ b/src/commands/Makefile.am
@@ -1,7 +1,12 @@
+NULL =
+
privexecdir = $(libexecdir)/$(PACKAGE)
privexec_PROGRAMS = rpm2cpio
-AM_CPPFLAGS = $(FR_CFLAGS)
+AM_CPPFLAGS = \
+ $(FR_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(NULL)
rpm2cpio_SOURCES = rpm2cpio.c
rpm2cpio_LDADD = $(FR_LIBS)