[libxslt] autotools: Use AM_CFLAGS consistently
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] autotools: Use AM_CFLAGS consistently
- Date: Tue, 6 Sep 2022 20:58:34 +0000 (UTC)
commit f9a0817b2092240f63954ea7f5f19597470f1dfb
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Tue Sep 6 14:08:53 2022 +0200
autotools: Use AM_CFLAGS consistently
Don't pollute CFLAGS. Always add LIBXML_CFLAGS and LIBXSLT_CFLAGS.
configure.ac | 17 +++++++++++------
libexslt/Makefile.am | 3 +--
libxslt/Makefile.am | 2 --
python/Makefile.am | 4 ++--
tests/fuzz/Makefile.am | 1 -
tests/plugins/Makefile.am | 2 +-
xsltproc/Makefile.am | 2 --
7 files changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 27195247..4ceeacf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -337,20 +337,20 @@ dnl
if test "${GCC}" != "yes" ; then
case "${host}" in
*-*-hpux* )
- CFLAGS="${CFLAGS} -Wp,-H30000"
+ AM_CFLAGS="${AM_CFLAGS} -Wp,-H30000"
;;
*-dec-osf* )
- CFLAGS="${CFLAGS} -ieee"
+ AM_CFLAGS="${AM_CFLAGS} -ieee"
;;
esac
else
- CFLAGS="${CFLAGS} -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
+ AM_CFLAGS="${AM_CFLAGS} -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
case "${host}" in
alpha*-*-linux* )
- CFLAGS="${CFLAGS} -mieee"
+ AM_CFLAGS="${AM_CFLAGS} -mieee"
;;
alpha*-*-osf* )
- CFLAGS="${CFLAGS} -mieee"
+ AM_CFLAGS="${AM_CFLAGS} -mieee"
;;
esac
fi
@@ -443,6 +443,8 @@ then
AC_MSG_ERROR([Could not find libxml2 anywhere.])
fi
+AM_CFLAGS="$AM_CFLAGS $LIBXML_CFLAGS"
+
AC_ARG_WITH(plugins,
[ --with-plugins Add plugin extension support (on)])
@@ -508,17 +510,20 @@ LIBXSLT_CFLAGS=""
case ${host} in
*-*-mingw* | *-*-cygwin* | *-*-msvc* )
# If the host is Windows, and shared libraries are disabled, we
- # need to add -DLIBXML_STATIC to EXTRA_CFLAGS in order for linking to
+ # need to add -DLIBXML_STATIC to AM_CFLAGS in order for linking to
# work properly (without it, xmlexports.h would force the use of
# DLL imports, which obviously aren't present in a static
# library).
if test "x$enable_shared" = "xno"; then
LIBXSLT_CFLAGS="$LIBXSLT_CFLAGS -DLIBXSLT_STATIC -DLIBEXSLT_STATIC"
+ AM_CFLAGS="$AM_CFLAGS -DLIBXSLT_STATIC -DLIBEXSLT_STATIC"
fi
;;
esac
AC_SUBST(LIBXSLT_CFLAGS)
+AC_SUBST(AM_CFLAGS)
+
EXSLT_LIBDIR='-L${libdir}'
EXSLT_INCLUDEDIR='-I${includedir}'
EXSLT_PRIVATE_LIBS="$XSLT_PRIVATE_LIBS $LIBGCRYPT_LIBS"
diff --git a/libexslt/Makefile.am b/libexslt/Makefile.am
index 064fca05..39c8e205 100644
--- a/libexslt/Makefile.am
+++ b/libexslt/Makefile.am
@@ -2,8 +2,6 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libxslt -I$(top_srcdir)/libexslt \
-I$(top_builddir) -I$(top_builddir)/libxslt \
-I$(top_builddir)/libexslt
-AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
-
lib_LTLIBRARIES = libexslt.la
exsltincdir = $(includedir)/libexslt
@@ -27,6 +25,7 @@ libexslt_la_SOURCES = \
libexslt.h \
dynamic.c
+libexslt_la_CFLAGS = $(AM_CFLAGS) $(LIBGCRYPT_CFLAGS)
libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(LIBXML_LIBS) $(EXTRA_LIBS) $(LIBGCRYPT_LIBS)
$(LIBM)
libexslt_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined \
-version-info $(LIBEXSLT_VERSION_INFO)
diff --git a/libxslt/Makefile.am b/libxslt/Makefile.am
index eeda05b8..d2af7ded 100644
--- a/libxslt/Makefile.am
+++ b/libxslt/Makefile.am
@@ -1,7 +1,5 @@
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libxslt
-AM_CFLAGS = $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
-
lib_LTLIBRARIES = libxslt.la
xsltincdir = $(includedir)/libxslt
diff --git a/python/Makefile.am b/python/Makefile.am
index 3c99217b..bc4449bf 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -18,8 +18,8 @@ pyexec_LTLIBRARIES = libxsltmod.la
libxsltmod_la_CPPFLAGS = \
-I$(top_srcdir)/libxslt \
-I$(top_srcdir) \
- -I../libexslt \
- $(PYTHON_CFLAGS) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
+ -I../libexslt
+libxsltmod_la_CFLAGS = $(AM_CFLAGS) $(PYTHON_CFLAGS)
libxsltmod_la_SOURCES = libxslt.c types.c
nodist_libxsltmod_la_SOURCES = libxslt-py.c
libxsltmod_la_LIBADD = \
diff --git a/tests/fuzz/Makefile.am b/tests/fuzz/Makefile.am
index 5f4d90b6..372d2c5d 100644
--- a/tests/fuzz/Makefile.am
+++ b/tests/fuzz/Makefile.am
@@ -6,7 +6,6 @@ check_PROGRAMS = testTargets
EXTRA_DIST = xpath.dict xpath.xml xslt.dict xslt.xml seed
CLEANFILES = $(EXTRA_PROGRAMS)
AM_CPPFLAGS = -I$(top_srcdir)
-AM_CFLAGS = $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
DEPENDENCIES = $(LIBXSLT_LIBS)
LDADD = $(LIBXSLT_LIBS) \
$(LIBXML_LIBS) $(EXTRA_LIBS) $(LIBM)
diff --git a/tests/plugins/Makefile.am b/tests/plugins/Makefile.am
index 50fb20ac..98b2c977 100644
--- a/tests/plugins/Makefile.am
+++ b/tests/plugins/Makefile.am
@@ -18,7 +18,7 @@ noinst_LTLIBRARIES = xmlsoft_org_xslt_testplugin.la
plugindir = $(abs_builddir)/.libs
-xmlsoft_org_xslt_testplugin_la_CFLAGS = -DMODULE_COMPILE $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
+xmlsoft_org_xslt_testplugin_la_CFLAGS = $(AM_CFLAGS) -DMODULE_COMPILE
xmlsoft_org_xslt_testplugin_la_SOURCES = testplugin.c
xmlsoft_org_xslt_testplugin_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS)
xmlsoft_org_xslt_testplugin_la_LDFLAGS = \
diff --git a/xsltproc/Makefile.am b/xsltproc/Makefile.am
index 7ddac9d2..3f7c24ee 100644
--- a/xsltproc/Makefile.am
+++ b/xsltproc/Makefile.am
@@ -7,8 +7,6 @@ bin_PROGRAMS = xsltproc
noinst_PROGRAMS=testThreads
-AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
-
xsltproc_SOURCES = xsltproc.c
xsltproc_LDFLAGS =
xsltproc_DEPENDENCIES = $(DEPS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]