Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/eglib
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alexrp@xamarin.com>2014-06-10 11:34:01 +0400
committerAlex Rønne Petersen <alexrp@xamarin.com>2014-06-10 11:35:01 +0400
commitbe483f24daa3ee3076ab198cc1bc22b1cdef3b62 (patch)
tree1d97ab9a9162004dd2d264ad45c7260f1a0ae953 /eglib
parentbe195eb1e66f7be27b8ee9fc216da3b32d5f4262 (diff)
Add build system plumbing for building with -Werror.
Diffstat (limited to 'eglib')
-rw-r--r--eglib/Makefile.am2
-rw-r--r--eglib/configure.ac6
-rw-r--r--eglib/src/Makefile.am2
3 files changed, 10 insertions, 0 deletions
diff --git a/eglib/Makefile.am b/eglib/Makefile.am
index b7e5cd63894..84cc8353c99 100644
--- a/eglib/Makefile.am
+++ b/eglib/Makefile.am
@@ -1,5 +1,7 @@
ACLOCAL_AMFLAGS = -I m4
+AM_CFLAGS = $(WERROR_CFLAGS)
+
if HOST_WIN32
SUBDIRS = m4 src
else
diff --git a/eglib/configure.ac b/eglib/configure.ac
index fab57247699..80600f8565f 100644
--- a/eglib/configure.ac
+++ b/eglib/configure.ac
@@ -235,6 +235,12 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Chan
fi
)
+AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
+if test x$werror_flag = xyes; then
+ WERROR_CFLAGS="-Werror"
+fi
+AC_SUBST([WERROR_CFLAGS])
+
AC_SUBST(GPOINTER_TO_INT)
AC_SUBST(GPOINTER_TO_UINT)
AC_SUBST(GINT_TO_POINTER)
diff --git a/eglib/src/Makefile.am b/eglib/src/Makefile.am
index 0d0e90354ee..a0baeea025f 100644
--- a/eglib/src/Makefile.am
+++ b/eglib/src/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libeglib.la libeglib-static.la
+AM_CFLAGS = $(WERROR_CFLAGS)
+
win_files = \
eglib-config.hw \
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \