[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] link againt iconv on bsd

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-07-19 22:28:04 CEST

I'm finally able to build HEAD of svn against HEAD of apr and
apr-util on my FreeBSD system.

Even though HAVE_ICONV was #defined by apr-util (which causes the
apr_xlate routines to start calling iconv() routines), I was getting
link errors when linking svn binaries: "iconv_open not defined".

It turned out the simple problem was a lack of '-liconv' on the link
line. On linux, the iconv routines are part of libc. On BSD, it's a
3rd party library.

So this patch just adds -liconv to the main set of $APRUTIL_LIBS.
Don't ask me how many hours it took me to figure this out. >:-(

Is there a better way to do this?

Index: apu-iconv.m4
===================================================================
RCS file: /home/cvs/apr-util/build/apu-iconv.m4,v
retrieving revision 1.3
diff -u -r1.3 apu-iconv.m4
--- apu-iconv.m4 19 Jul 2002 17:08:40 -0000 1.3
+++ apu-iconv.m4 19 Jul 2002 20:27:49 -0000
@@ -19,7 +19,8 @@
 fi
 AC_SUBST(have_iconv)
 APR_FLAG_HEADERS(iconv.h)
-
+APR_ADDTO(APRUTIL_EXPORT_LIBS,[-liconv])
+APR_ADDTO(APRUTIL_LIBS,[-liconv])
 ])dnl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 19 22:29:41 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.