[metacity] build: add AX_COMPILER_FLAGS
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] build: add AX_COMPILER_FLAGS
- Date: Sun, 20 Sep 2015 18:09:38 +0000 (UTC)
commit cc72840841072d6ccef380b26250e3c9d37ca344
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Sep 20 02:16:57 2015 +0300
build: add AX_COMPILER_FLAGS
configure.ac | 74 ++++--------------------------------------------------
src/Makefile.am | 4 +-
2 files changed, 8 insertions(+), 70 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4e158c9..5f12dc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,12 @@ dnl **************************************************************************
AX_CHECK_ENABLE_DEBUG([yes])
dnl **************************************************************************
+dnl Add warning flags
+dnl **************************************************************************
+
+AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS])
+
+dnl **************************************************************************
dnl Initialize automake
dnl **************************************************************************
@@ -71,69 +77,6 @@ AC_CHECK_SIZEOF(__int64)
## byte order
AC_C_BIGENDIAN
-#### Warnings
-
-changequote(,)dnl
-if test "x$GCC" = "xyes"; then
- case " $CFLAGS " in
- *[\ \ ]-Wall[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wall" ;;
- esac
-
-# case " $CFLAGS " in
-# *[\ \ ]-Wshadow[\ \ ]*) ;;
-# *) CFLAGS="$CFLAGS -Wshadow" ;;
-# esac
-
- case " $CFLAGS " in
- *[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
- esac
-
- case " $CFLAGS " in
- *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
- esac
-
- case " $CFLAGS " in
- *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
- esac
-
- case " $CFLAGS " in
- *[\ \ ]-Wnested-externs[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wnested-externs" ;;
- esac
-
- case " $CFLAGS " in
- *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
- esac
-
- case " $CFLAGS " in
- *[\ \ ]-Wcast-align[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wcast-align" ;;
- esac
-
- case " $CFLAGS " in
- *[\ \ ]-Wsign-compare[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -Wsign-compare" ;;
- esac
-
- if test "x$enable_ansi" = "xyes"; then
- case " $CFLAGS " in
- *[\ \ ]-ansi[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -ansi" ;;
- esac
-
- case " $CFLAGS " in
- *[\ \ ]-pedantic[\ \ ]*) ;;
- *) CFLAGS="$CFLAGS -pedantic" ;;
- esac
- fi
-fi
-changequote([,])dnl
-
GTK_API_VERSION=3.0
GTK_MIN_VERSION=3.15.2
GIO_MIN_VERSION=2.25.10
@@ -448,11 +391,6 @@ if test x"$ZENITY" = xno; then
AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
fi
-# Warnings are there for a reason
-if test "x$GCC" = "xyes"; then
- CFLAGS="$CFLAGS -Wall -ansi"
-fi
-
AC_ARG_ENABLE(themes-documentation,
AC_HELP_STRING([--disable-themes-documentation],
[disable building themes documentation on system where yelp-tools is unavailable]),,
diff --git a/src/Makefile.am b/src/Makefile.am
index d1a112a..73804d2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,7 @@ lib_LTLIBRARIES = libmetacity-private.la
SUBDIRS = tools themes
-AM_CPPFLAGS=-I$(srcdir)/include -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS \"
-DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\"
-DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1 @METACITY_CFLAGS@
+AM_CPPFLAGS=-I$(srcdir)/include -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS \"
-DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\"
-DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1 @METACITY_CFLAGS@
$(WARN_CFLAGS) $(AM_CFLAGS)
metacity_SOURCES= \
core/main.c \
@@ -111,7 +111,7 @@ libmetacity_private_la_SOURCES= \
ui/theme.h \
ui/ui.c
-libmetacity_private_la_LDFLAGS = -no-undefined -version-info 3:0:0
+libmetacity_private_la_LDFLAGS = -no-undefined -version-info 3:0:0 $(WARN_LDFLAGS) $(AM_LDFLAGS)
libmetacity_private_la_LIBADD = @METACITY_LIBS@
libmetacityincludedir = $(includedir)/metacity/metacity-private
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]