diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2015-09-20 02:16:57 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2015-09-20 02:16:57 +0300 |
commit | cc72840841072d6ccef380b26250e3c9d37ca344 (patch) | |
tree | 59aeeb92b214b65c621dc7dd20f5731a5e046c28 | |
parent | e2d6beadb342732a149da1d6b92b854ff908ad5c (diff) | |
download | metacity-cc72840841072d6ccef380b26250e3c9d37ca344.tar.gz |
build: add AX_COMPILER_FLAGS
-rw-r--r-- | configure.ac | 74 | ||||
-rw-r--r-- | src/Makefile.am | 4 |
2 files changed, 8 insertions, 70 deletions
diff --git a/configure.ac b/configure.ac index 4e158c9d..5f12dc0f 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 d1a112a6..73804d2d 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 |