diff options
author | jlam <jlam> | 2003-03-07 05:58:31 +0000 |
---|---|---|
committer | jlam <jlam> | 2003-03-07 05:58:31 +0000 |
commit | c01001b6f7a3f59505cde26d752ac9d336eb6610 (patch) | |
tree | 05addac84490d637e00c75e101aaa8a4a8094231 /converters/libiconv | |
parent | b282274b1c5942cbd8c100d4e0815a1d947d549f (diff) | |
download | pkgsrc-c01001b6f7a3f59505cde26d752ac9d336eb6610.tar.gz |
Add a check for /usr/lib/libiconv.* in the case where /usr/include/iconv.h
exists. Use this check to appropriately assign a value to a new public
variable BUILDLINK_LIBICONV_LDADD that contains the linker options needed
so that the iconv functions resolve correctly.
Diffstat (limited to 'converters/libiconv')
-rw-r--r-- | converters/libiconv/buildlink2.mk | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/converters/libiconv/buildlink2.mk b/converters/libiconv/buildlink2.mk index 900f6fa5113..ec71c73f7aa 100644 --- a/converters/libiconv/buildlink2.mk +++ b/converters/libiconv/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.3 2002/09/10 16:06:37 wiz Exp $ +# $NetBSD: buildlink2.mk,v 1.4 2003/03/07 05:58:31 jlam Exp $ .if !defined(ICONV_BUILDLINK2_MK) ICONV_BUILDLINK2_MK= # defined @@ -10,11 +10,19 @@ BUILDLINK_PKGSRCDIR.iconv?= ../../converters/libiconv .if defined(USE_GNU_ICONV) _NEED_ICONV= YES +_BLNK_LIBICONV_FOUND= NO .else . if exists(/usr/include/iconv.h) _NEED_ICONV= NO +_BLNK_LIBICONV_LIST!= ${ECHO} /usr/lib/libiconv.* +. if ${_BLNK_LIBICONV_LIST} != "/usr/lib/libiconv.*" +_BLNK_LIBICONV_FOUND= YES +. else +_BLNK_LIBICONV_FOUND= NO +. endif . else _NEED_ICONV= YES +_BLNK_LIBICONV_FOUND= NO . endif _INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk INCOMPAT_ICONV?= # empty @@ -29,8 +37,16 @@ _NEED_ICONV= YES BUILDLINK_PACKAGES+= iconv EVAL_PREFIX+= BUILDLINK_PREFIX.iconv=libiconv BUILDLINK_PREFIX.iconv_DEFAULT= ${LOCALBASE} +BUILDLINK_LIBICONV_LDADD= -L${BUILDLINK_PREFIX.iconv}/lib +BUILDLINK_LIBICONV_LDADD+= -Wl,-R${BUILDLINK_PREFIX.iconv}/lib +BUILDLINK_LIBICONV_LDADD+= -liconv .else BUILDLINK_PREFIX.iconv= /usr +. if ${_BLNK_LIBICONV_FOUND} == "YES" +BUILDLINK_LIBICONV_LDADD= -liconv +. else +BUILDLINK_LIBICONV_LDADD= # empty +. endif .endif BUILDLINK_FILES.iconv= include/iconv.h |