| 1 |
From 6ee653ecbef38c0e57860903541f1f3c97dbe75b Mon Sep 17 00:00:00 2001
|
| 2 |
From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
|
| 3 |
Date: Sat, 26 May 2012 17:37:43 +0000
|
| 4 |
Subject: [PATCH] Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking
|
| 5 |
errors
|
| 6 |
|
| 7 |
---
|
| 8 |
Makefile.am | 2 +-
|
| 9 |
configure.in | 15 ++++++++-------
|
| 10 |
libxml-2.0-uninstalled.pc.in | 2 +-
|
| 11 |
libxml-2.0.pc.in | 2 +-
|
| 12 |
4 files changed, 11 insertions(+), 10 deletions(-)
|
| 13 |
|
| 14 |
diff --git a/Makefile.am b/Makefile.am
|
| 15 |
index f82cefa..0b25666 100644
|
| 16 |
--- a/Makefile.am
|
| 17 |
+++ b/Makefile.am
|
| 18 |
@@ -18,7 +18,7 @@ bin_PROGRAMS = xmllint xmlcatalog
|
| 19 |
bin_SCRIPTS=xml2-config
|
| 20 |
|
| 21 |
lib_LTLIBRARIES = libxml2.la
|
| 22 |
-libxml2_la_LIBADD = @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
|
| 23 |
+libxml2_la_LIBADD = @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
|
| 24 |
|
| 25 |
if USE_VERSION_SCRIPT
|
| 26 |
LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
|
| 27 |
diff --git a/configure.in b/configure.in
|
| 28 |
index 0fb4983..ac45b58 100644
|
| 29 |
--- a/configure.in
|
| 30 |
+++ b/configure.in
|
| 31 |
@@ -97,7 +97,7 @@ dnl
|
| 32 |
dnl zlib option might change flags, so we save them initially
|
| 33 |
dnl
|
| 34 |
_cppflags="${CPPFLAGS}"
|
| 35 |
-_ldflags="${LDFLAGS}"
|
| 36 |
+_libs="${LIBS}"
|
| 37 |
|
| 38 |
AC_ARG_WITH(c14n,
|
| 39 |
[ --with-c14n add the Canonicalization support (on)])
|
| 40 |
@@ -154,7 +154,7 @@ AC_ARG_WITH(readline,
|
| 41 |
if test "$withval" != "no" -a "$withval" != "yes"; then
|
| 42 |
RDL_DIR=$withval
|
| 43 |
CPPFLAGS="${CPPFLAGS} -I$withval/include"
|
| 44 |
- LDFLAGS="${LDFLAGS} -L$withval/lib"
|
| 45 |
+ LIBS="${LIBS} -L$withval/lib"
|
| 46 |
fi
|
| 47 |
])
|
| 48 |
AC_ARG_WITH(regexps,
|
| 49 |
@@ -190,7 +190,7 @@ AC_ARG_WITH(zlib,
|
| 50 |
if test "$withval" != "no" -a "$withval" != "yes"; then
|
| 51 |
Z_DIR=$withval
|
| 52 |
CPPFLAGS="${CPPFLAGS} -I$withval/include"
|
| 53 |
- LDFLAGS="${LDFLAGS} -L$withval/lib"
|
| 54 |
+ LIBS="${LIBS} -L$withval/lib"
|
| 55 |
fi
|
| 56 |
])
|
| 57 |
AC_ARG_WITH(lzma,
|
| 58 |
@@ -198,7 +198,7 @@ AC_ARG_WITH(lzma,
|
| 59 |
if test "$withval" != "no" -a "$withval" != "yes"; then
|
| 60 |
LZMA_DIR=$withval
|
| 61 |
CPPFLAGS="${CPPFLAGS} -I$withval/include"
|
| 62 |
- LDFLAGS="${LDFLAGS} -L$withval/lib"
|
| 63 |
+ LIBS="${LIBS} -L$withval/lib"
|
| 64 |
fi
|
| 65 |
])
|
| 66 |
AC_ARG_WITH(coverage,
|
| 67 |
@@ -428,7 +428,7 @@ AC_SUBST(LZMA_LIBS)
|
| 68 |
AC_SUBST(WITH_LZMA)
|
| 69 |
|
| 70 |
CPPFLAGS=${_cppflags}
|
| 71 |
-LDFLAGS=${_ldflags}
|
| 72 |
+LIBS=${_libs}
|
| 73 |
|
| 74 |
echo Checking headers
|
| 75 |
|
| 76 |
@@ -1365,14 +1365,14 @@ XML_LIBTOOLLIBS="libxml2.la"
|
| 77 |
AC_SUBST(WITH_ICONV)
|
| 78 |
|
| 79 |
WITH_ICU=0
|
| 80 |
+ICU_LIBS=""
|
| 81 |
if test "$with_icu" != "yes" ; then
|
| 82 |
echo Disabling ICU support
|
| 83 |
else
|
| 84 |
ICU_CONFIG=icu-config
|
| 85 |
if ${ICU_CONFIG} --cflags >/dev/null 2>&1
|
| 86 |
then
|
| 87 |
- ICU_LIBS=`icu-config --ldflags`
|
| 88 |
- LDFLAGS="$LDFLAGS $ICU_LIBS"
|
| 89 |
+ ICU_LIBS=`${ICU_CONFIG} --ldflags`
|
| 90 |
WITH_ICU=1
|
| 91 |
echo Enabling ICU support
|
| 92 |
else
|
| 93 |
@@ -1380,6 +1380,7 @@ else
|
| 94 |
fi
|
| 95 |
fi
|
| 96 |
AC_SUBST(WITH_ICU)
|
| 97 |
+AC_SUBST(ICU_LIBS)
|
| 98 |
|
| 99 |
WITH_ISO8859X=1
|
| 100 |
if test "$WITH_ICONV" != "1" ; then
|
| 101 |
diff --git a/libxml-2.0-uninstalled.pc.in b/libxml-2.0-uninstalled.pc.in
|
| 102 |
index 0a4c833..cab6834 100644
|
| 103 |
--- a/libxml-2.0-uninstalled.pc.in
|
| 104 |
+++ b/libxml-2.0-uninstalled.pc.in
|
| 105 |
@@ -8,5 +8,5 @@ Name: libXML
|
| 106 |
Version: @VERSION@
|
| 107 |
Description: libXML library version2.
|
| 108 |
Requires:
|
| 109 |
-Libs: -L${libdir} -lxml2 @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
|
| 110 |
+Libs: -L${libdir} -lxml2 @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
|
| 111 |
Cflags: -I${includedir} @XML_INCLUDEDIR@ @XML_CFLAGS@
|
| 112 |
diff --git a/libxml-2.0.pc.in b/libxml-2.0.pc.in
|
| 113 |
index 31a1b8c..f5f5f03 100644
|
| 114 |
--- a/libxml-2.0.pc.in
|
| 115 |
+++ b/libxml-2.0.pc.in
|
| 116 |
@@ -9,5 +9,5 @@ Version: @VERSION@
|
| 117 |
Description: libXML library version2.
|
| 118 |
Requires:
|
| 119 |
Libs: -L${libdir} -lxml2
|
| 120 |
-Libs.private: @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
|
| 121 |
+Libs.private: @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
|
| 122 |
Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@
|
| 123 |
--
|
| 124 |
1.7.8.6
|
| 125 |
|