summaryrefslogtreecommitdiff
path: root/converters/libiconv
diff options
context:
space:
mode:
authorsnj <snj@pkgsrc.org>2004-04-26 00:28:39 +0000
committersnj <snj@pkgsrc.org>2004-04-26 00:28:39 +0000
commita886bcf21f6bf7177e5847b9e42058af2050dc3f (patch)
tree0c307b2bb5924fe6ed7b71c625e4ac89fe0170b6 /converters/libiconv
parent37b08b6278da11646d0d08d7a4fbc5cf59d5b7ae (diff)
downloadpkgsrc-a886bcf21f6bf7177e5847b9e42058af2050dc3f.tar.gz
If USE_GNU_ICONV is defined, don't use builtin libiconv if ICONV_TYPE is
native.
Diffstat (limited to 'converters/libiconv')
-rw-r--r--converters/libiconv/builtin.mk30
1 files changed, 15 insertions, 15 deletions
diff --git a/converters/libiconv/builtin.mk b/converters/libiconv/builtin.mk
index 6d039ba83e7..7f77a42169e 100644
--- a/converters/libiconv/builtin.mk
+++ b/converters/libiconv/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.2 2004/03/29 05:43:28 jlam Exp $
+# $NetBSD: builtin.mk,v 1.3 2004/04/26 00:28:39 snj Exp $
.if !defined(_LIBICONV_FOUND)
_LIBICONV_FOUND!= \
@@ -30,9 +30,22 @@ USE_BUILTIN.iconv= no
. endif
. endfor
+.if !defined(ICONV_TYPE)
+ICONV_TYPE?= gnu
+. if !empty(USE_BUILTIN.iconv:M[yY][eE][sS]) && exists(${_ICONV_H})
+ICONV_TYPE!= \
+ if ${GREP} -q "GNU LIBICONV Library" ${_ICONV_H}; then \
+ ${ECHO} "gnu"; \
+ else \
+ ${ECHO} "native"; \
+ fi
+. endif
+BUILDLINK_VARS+= ICONV_TYPE
+.endif
+
. if defined(USE_GNU_ICONV)
. if !empty(IS_BUILTIN.iconv:M[nN][oO]) || \
- (${PREFER.iconv} == "pkgsrc")
+ (${PREFER.iconv} == "pkgsrc") || ${ICONV_TYPE} == "native"
USE_BUILTIN.iconv= no
. endif
. endif
@@ -54,19 +67,6 @@ BUILDLINK_TRANSFORM+= l:iconv:
BUILDLINK_LDADD.iconv?= ${_LIBICONV}
-.if !defined(ICONV_TYPE)
-ICONV_TYPE?= gnu
-. if !empty(USE_BUILTIN.iconv:M[yY][eE][sS]) && exists(${_ICONV_H})
-ICONV_TYPE!= \
- if ${GREP} -q "GNU LIBICONV Library" ${_ICONV_H}; then \
- ${ECHO} "gnu"; \
- else \
- ${ECHO} "native"; \
- fi
-. endif
-BUILDLINK_VARS+= ICONV_TYPE
-.endif
-
.if defined(GNU_CONFIGURE)
. if !empty(USE_BUILTIN.iconv:M[nN][oO])
CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv}