summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-11-20 08:48:03 +0000
committerjlam <jlam@pkgsrc.org>2002-11-20 08:48:03 +0000
commitbe6a887a9d9f5848ce82d985168d507e4d6ff1f7 (patch)
tree96f2b2692bfa274f73a3c22f0fd3411b7fa06c80 /devel
parentfc2596e3165fa547913aa488fa8a0682ff1f99d3 (diff)
downloadpkgsrc-be6a887a9d9f5848ce82d985168d507e4d6ff1f7.tar.gz
Allow for Linux systems where the gettext() routines are incorporated into
glibc instead of in a separate libintl.
Diffstat (limited to 'devel')
-rw-r--r--devel/gettext-lib/buildlink2.mk25
1 files changed, 15 insertions, 10 deletions
diff --git a/devel/gettext-lib/buildlink2.mk b/devel/gettext-lib/buildlink2.mk
index a41d89834ec..97d106311db 100644
--- a/devel/gettext-lib/buildlink2.mk
+++ b/devel/gettext-lib/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.8 2002/10/16 22:13:52 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.9 2002/11/20 08:48:03 jlam Exp $
.if !defined(GETTEXT_BUILDLINK2_MK)
GETTEXT_BUILDLINK2_MK= # defined
@@ -11,16 +11,16 @@ BUILDLINK_PKGSRCDIR.gettext?= ../../devel/gettext-lib
.if defined(USE_GNU_GETTEXT)
_NEED_GNU_GETTEXT= YES
.else
-_BLNK_LIBINTL_LIST!= ${ECHO} /usr/lib/libintl.*
-. if exists(/usr/include/libintl.h) && \
- (${_BLNK_LIBINTL_LIST} != "/usr/lib/libintl.*")
+_BLNK_LIBINTL_LIST!= ${ECHO} /usr/lib/libintl.*
+. if ${_BLNK_LIBINTL_LIST} != "/usr/lib/libintl.*"
+_BLNK_LIBINTL_FOUND= YES
+. else
+_BLNK_LIBINTL_FOUND= NO
+. endif
+. if exists(/usr/include/libintl.h)
#
# Consider the base system libintl to be gettext-lib-0.10.35nb1.
#
-# XXX This isn't correct on Linux systems, as it may cause the installation
-# XXX of the pkgsrc gettext-lib even if the system one is the latest
-# XXX version.
-#
_GETTEXT_PKG= gettext-lib-0.10.35nb1
_GETTEXT_DEPENDS= ${BUILDLINK_DEPENDS.gettext}
_NEED_GNU_GETTEXT!= \
@@ -60,7 +60,7 @@ BUILDLINK_TARGETS+= gettext-buildlink
BUILDLINK_TARGETS+= gettext-libintl-la
# Add -lintl to LIBS in CONFIGURE_ENV to work around broken gettext.m4:
-# gettext.m4 does not add -lintl where it should, and the resulting
+# older gettext.m4 does not add -lintl where it should, and the resulting
# configure script fails to detect if libintl.a is the genuine GNU gettext
# or not.
#
@@ -70,8 +70,13 @@ _BLNK_LIBINTL= # empty
_BLNK_INCINTL+= -I${BUILDLINK_PREFIX.gettext}/include
_BLNK_LIBINTL+= -L${BUILDLINK_PREFIX.gettext}/lib
_BLNK_LIBINTL+= -Wl,-R${BUILDLINK_PREFIX.gettext}/lib
+_BLNK_LIBINTL+= -lintl
+.else
+. if ${_BLNK_LIBINTL_FOUND} == "YES"
+_BLNK_LIBINTL+= -lintl
+. endif
.endif
-_BLNK_LIBINTL+= -lintl
+
.if defined(GNU_CONFIGURE)
LIBS+= ${_BLNK_LIBINTL}
CONFIGURE_ENV+= INTLLIBS="${_BLNK_LIBINTL}"