Autofoo macro cleanups (ac_->ec_).

- Changes names AC_/ac_ to EC_/ec_ to stay out of autoconf namespace.
This commit is contained in:
Kim Woelders 2014-10-18 20:16:24 +02:00
parent a085694ff0
commit a4dd5bcdc2
6 changed files with 35 additions and 35 deletions

View File

@ -393,7 +393,7 @@ AM_CONDITIONAL(BUILD_ID3_LOADER, test "$id3_ok" = yes)
AC_SUBST(ID3LIBS)
AC_C_WARNFLAGS()
EC_C_WARNINGS()
if test "x$enable_visibility_hiding" = xyes ; then
CPPFLAGS="$CPPFLAGS -fvisibility=hidden"

View File

@ -1,31 +0,0 @@
dnl Copyright (C) 2008 Kim Woelders
dnl This code is public domain and can be freely used or copied.
dnl Macro to set compiler warning flags
dnl Provides configure argument --enable-werror to stop compilation on warnings
dnl Usage: AC_C_WARNFLAGS([LANG])
dnl Set LANG to 'cpp' when compiling for C++
AC_DEFUN([AC_C_WARNFLAGS], [
define(ac_c_compile_cpp, ifelse([$1], [cpp], [yes], [no]))
AC_ARG_ENABLE(werror,
[ --enable-werror treat compiler warnings as errors @<:@default=no@:>@],,
enable_werror=no)
if test "x$GCC" = "xyes"; then
CWARNFLAGS="-W -Wall -Waggregate-return -Wcast-align -Wpointer-arith -Wshadow -Wwrite-strings"
dnl # ignore some warnings for now...
CWARNFLAGS="$CWARNFLAGS -Wno-unused-parameter"
ifelse(ac_c_compile_cpp, no, [
CWARNFLAGS="$CWARNFLAGS -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes"
],)
if test "x$enable_werror" = "xyes"; then
CWARNFLAGS="$CWARNFLAGS -Werror"
fi
fi
AC_SUBST(CWARNFLAGS)
])

31
m4/ec_warnflags.m4 Normal file
View File

@ -0,0 +1,31 @@
dnl Copyright (C) 2008 Kim Woelders
dnl This code is public domain and can be freely used or copied.
dnl Macro to set compiler warning flags in CFLAGS_WARNINGS
dnl Provides configure argument --enable-werror to stop compilation on warnings
dnl Usage: EC_C_WARNINGS([LANG])
dnl Set LANG to 'cpp' when compiling for C++
AC_DEFUN([EC_C_WARNINGS], [
define(ec_c_compile_cpp, ifelse([$1], [cpp], [yes], [no]))
AC_ARG_ENABLE(werror,
[ --enable-werror treat compiler warnings as errors @<:@default=no@:>@],,
enable_werror=no)
if test "x$GCC" = "xyes"; then
CFLAGS_WARNINGS="-W -Wall -Waggregate-return -Wcast-align -Wpointer-arith -Wshadow -Wwrite-strings"
dnl # ignore some warnings for now...
CFLAGS_WARNINGS="$CFLAGS_WARNINGS -Wno-unused-parameter"
ifelse(ec_c_compile_cpp, no, [
CFLAGS_WARNINGS="$CFLAGS_WARNINGS -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes"
],)
if test "x$enable_werror" = "xyes"; then
CFLAGS_WARNINGS="$CFLAGS_WARNINGS -Werror"
fi
fi
AC_SUBST(CFLAGS_WARNINGS)
])

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = 1.4 foreign
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = $(CWARNFLAGS)
AM_CFLAGS = $(CFLAGS_WARNINGS)
AM_CPPFLAGS = -DPACKAGE_LIB_DIR=\"$(libdir)\" \
-I$(top_builddir) \
$(X_CFLAGS) \

View File

@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = $(CWARNFLAGS)
AM_CFLAGS = $(CFLAGS_WARNINGS)
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/lib
pkgdir = $(libdir)/imlib2/filters

View File

@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = $(CWARNFLAGS)
AM_CFLAGS = $(CFLAGS_WARNINGS)
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/lib
pkgdir = $(libdir)/imlib2/loaders