mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-05 23:35:48 +03:00
Add missing compile definition for static builds to Autotools
Related toeaa53788
and29923816
Closes #73
This commit is contained in:
15
configure.ac
15
configure.ac
@@ -505,6 +505,21 @@ AC_SUBST(XSLT_INCLUDEDIR)
|
|||||||
AC_SUBST(XSLT_LIBS)
|
AC_SUBST(XSLT_LIBS)
|
||||||
AC_SUBST(XSLT_PRIVATE_LIBS)
|
AC_SUBST(XSLT_PRIVATE_LIBS)
|
||||||
|
|
||||||
|
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
|
||||||
|
# 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"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_SUBST(LIBXSLT_CFLAGS)
|
||||||
|
|
||||||
EXSLT_LIBDIR='-L${libdir}'
|
EXSLT_LIBDIR='-L${libdir}'
|
||||||
EXSLT_INCLUDEDIR='-I${includedir}'
|
EXSLT_INCLUDEDIR='-I${includedir}'
|
||||||
EXSLT_PRIVATE_LIBS="$XSLT_PRIVATE_LIBS $LIBGCRYPT_LIBS"
|
EXSLT_PRIVATE_LIBS="$XSLT_PRIVATE_LIBS $LIBGCRYPT_LIBS"
|
||||||
|
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libxslt -I$(top_srcdir)/libexslt \
|
|||||||
-I$(top_builddir) -I$(top_builddir)/libxslt \
|
-I$(top_builddir) -I$(top_builddir)/libxslt \
|
||||||
-I$(top_builddir)/libexslt
|
-I$(top_builddir)/libexslt
|
||||||
|
|
||||||
AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBXML_CFLAGS)
|
AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
|
||||||
|
|
||||||
lib_LTLIBRARIES = libexslt.la
|
lib_LTLIBRARIES = libexslt.la
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libxslt
|
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/libxslt
|
||||||
|
|
||||||
AM_CFLAGS = $(LIBXML_CFLAGS)
|
AM_CFLAGS = $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
|
||||||
|
|
||||||
lib_LTLIBRARIES = libxslt.la
|
lib_LTLIBRARIES = libxslt.la
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ libxsltmod_la_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/libxslt \
|
-I$(top_srcdir)/libxslt \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I../libexslt \
|
-I../libexslt \
|
||||||
$(PYTHON_CFLAGS) $(LIBXML_CFLAGS)
|
$(PYTHON_CFLAGS) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
|
||||||
libxsltmod_la_SOURCES = libxslt.c types.c
|
libxsltmod_la_SOURCES = libxslt.c types.c
|
||||||
nodist_libxsltmod_la_SOURCES = libxslt-py.c
|
nodist_libxsltmod_la_SOURCES = libxslt-py.c
|
||||||
libxsltmod_la_LIBADD = \
|
libxsltmod_la_LIBADD = \
|
||||||
|
@@ -6,7 +6,7 @@ check_PROGRAMS = testTargets
|
|||||||
EXTRA_DIST = xpath.dict xpath.xml xslt.dict xslt.xml seed
|
EXTRA_DIST = xpath.dict xpath.xml xslt.dict xslt.xml seed
|
||||||
CLEANFILES = $(EXTRA_PROGRAMS)
|
CLEANFILES = $(EXTRA_PROGRAMS)
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)
|
AM_CPPFLAGS = -I$(top_srcdir)
|
||||||
AM_CFLAGS = $(LIBXML_CFLAGS)
|
AM_CFLAGS = $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
|
||||||
DEPENDENCIES = $(LIBXSLT_LIBS)
|
DEPENDENCIES = $(LIBXSLT_LIBS)
|
||||||
LDADD = $(LIBXSLT_LIBS) \
|
LDADD = $(LIBXSLT_LIBS) \
|
||||||
$(LIBXML_LIBS) $(EXTRA_LIBS) $(LIBM)
|
$(LIBXML_LIBS) $(EXTRA_LIBS) $(LIBM)
|
||||||
|
@@ -74,7 +74,7 @@ while test $# -gt 0; do
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
--cflags)
|
--cflags)
|
||||||
cflags="@LIBXML_CFLAGS@"
|
cflags="@LIBXML_CFLAGS@ @LIBXSLT_CFLAGS@"
|
||||||
if test "$includedir" != "/usr/include"; then
|
if test "$includedir" != "/usr/include"; then
|
||||||
cflags="$cflags @XSLT_INCLUDEDIR@"
|
cflags="$cflags @XSLT_INCLUDEDIR@"
|
||||||
fi
|
fi
|
||||||
|
@@ -7,7 +7,7 @@ bin_PROGRAMS = xsltproc
|
|||||||
|
|
||||||
noinst_PROGRAMS=testThreads
|
noinst_PROGRAMS=testThreads
|
||||||
|
|
||||||
AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBXML_CFLAGS)
|
AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
|
||||||
|
|
||||||
xsltproc_SOURCES = xsltproc.c
|
xsltproc_SOURCES = xsltproc.c
|
||||||
xsltproc_LDFLAGS =
|
xsltproc_LDFLAGS =
|
||||||
|
Reference in New Issue
Block a user