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

Re: [PATCH] link againt iconv on bsd

From: Justin Erenkrantz <jerenkrantz_at_apache.org>
Date: 2002-07-19 23:34:36 CEST

On Fri, Jul 19, 2002 at 03:28:04PM -0500, Ben Collins-Sussman wrote:
> 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])

The correct thing to do is to replace the AC_CHECK_LIB and
AC_CHECK_FUNCS with:

AC_CHECK_LIB(iconv, iconv, [
 APR_ADDTO(APRUTIL_EXPORT_LIBS,[-liconv])
 APR_ADDTO(APRUTIL_LIBS,[-liconv])
 have_iconv="1"
], [
 AC_CHECK_FUNCS(iconv, [ have_iconv="1" ], [ have_iconv="0" ]
])

No need to check the funcs when we know we have a separate library.
We might need to wrap all this with a AC_CHECK_HEADER to ensure we
have an iconv.h, but I'm not 100% sure if all libc impls have an
iconv.h.

HTH. -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 19 23:35:19 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.