[xml] Using libiconv



Hi folks,

When running configure on a system which provides iconv but also
has libiconv installed in /usr/local, linking fails complaining that
libiconv_open and related functions are not found.
This is because the configure script fails to notice that -liconv
is required in this circumstance.

The following patch fixes this

Regards
Brian Stafford

-- Start of patch --
cvs -z3 diff -u configure.in
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnome-xml/configure.in,v
retrieving revision 1.121
diff -u -r1.121 configure.in
--- configure.in        2001/06/28 16:18:09     1.121
+++ configure.in        2001/07/02 09:49:35
@@ -380,10 +380,12 @@
     echo Disabling ICONV support
     WITH_ICONV=0
 else
+    have_iconv="no"
     AC_CHECK_HEADER(iconv.h, 
-       AC_CHECK_FUNC(iconv, ,
-           AC_CHECK_LIB(iconv, iconv, ICONV_LIBS="-liconv")))
-    if test "$have_iconv" != "" ; then
+      AC_CHECK_LIB(iconv, iconv, [have_iconv="yes"
+                  ICONV_LIBS="-liconv"],
+                  [AC_CHECK_FUNC(iconv,have_iconv="yes")]))
+    if test "$have_iconv" != "yes" ; then
         echo Iconv support not found
         WITH_ICONV=0
     else
-- End of patch --





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]