2009-03-20 20:23:50 +01:00
|
|
|
# $NetBSD: buildlink3.mk,v 1.31 2009/03/20 19:24:13 joerg Exp $
|
2004-01-04 00:06:43 +01:00
|
|
|
|
2009-03-20 20:23:50 +01:00
|
|
|
BUILDLINK_TREE+= gettext
|
2004-01-04 00:06:43 +01:00
|
|
|
|
2009-03-20 20:23:50 +01:00
|
|
|
.if !defined(GETTEXT_BUILDLINK3_MK)
|
|
|
|
GETTEXT_BUILDLINK3_MK:=
|
2004-03-10 18:57:14 +01:00
|
|
|
|
2006-04-06 08:21:32 +02:00
|
|
|
BUILDLINK_API_DEPENDS.gettext+= gettext-lib>=0.14.5
|
2004-03-10 18:57:14 +01:00
|
|
|
BUILDLINK_PKGSRCDIR.gettext?= ../../devel/gettext-lib
|
2008-02-27 23:10:34 +01:00
|
|
|
BUILDLINK_LIBNAME.gettext= intl
|
|
|
|
BUILDLINK_LDADD.gettext= ${BUILDLINK_LIBNAME.gettext:S/^/-l/:S/^-l$//}
|
|
|
|
BUILDLINK_LDADD.gettext+= ${BUILDLINK_LDADD.iconv}
|
2004-01-04 00:06:43 +01:00
|
|
|
|
2008-01-23 18:35:20 +01:00
|
|
|
.include "../../mk/bsd.fast.prefs.mk"
|
2007-09-24 20:33:52 +02:00
|
|
|
|
2008-02-27 23:10:34 +01:00
|
|
|
# Some GNU configure scripts generated with an older and broken gettext.m4
|
|
|
|
# fail to detect if gettext is present or not because it fails to add
|
|
|
|
# "-lintl" to the linker command line.
|
|
|
|
#
|
|
|
|
# If BROKEN_GETTEXT_DETECTION is "yes", then automatically add "-lintl"
|
|
|
|
# to LIBS to workaround this brokenness.
|
|
|
|
#
|
|
|
|
BROKEN_GETTEXT_DETECTION?= no
|
|
|
|
. if !empty(BROKEN_GETTEXT_DETECTION:M[yY][eE][sS])
|
|
|
|
BUILDLINK_LIBS.gettext+= ${BUILDLINK_LDADD.gettext}
|
|
|
|
CONFIGURE_ENV+= INTLLIBS="${BUILDLINK_LDADD.gettext}"
|
|
|
|
. endif
|
|
|
|
|
2007-09-24 20:33:52 +02:00
|
|
|
CHECK_BUILTIN.gettext:= yes
|
|
|
|
.include "../../devel/gettext-lib/builtin.mk"
|
|
|
|
CHECK_BUILTIN.gettext:= no
|
|
|
|
|
2008-02-27 23:10:34 +01:00
|
|
|
# A built-in gettext is always going to use a built-in iconv.
|
|
|
|
.if !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
|
|
|
|
USE_BUILTIN.iconv= yes
|
2007-09-24 20:33:52 +02:00
|
|
|
.endif
|
2004-01-04 00:06:43 +01:00
|
|
|
|
2008-02-27 23:10:34 +01:00
|
|
|
.include "../../converters/libiconv/buildlink3.mk"
|
2009-03-20 20:23:50 +01:00
|
|
|
.endif # GETTEXT_BUILDLINK3_MK
|
2008-02-27 23:10:34 +01:00
|
|
|
|
2009-03-20 20:23:50 +01:00
|
|
|
BUILDLINK_TREE+= -gettext
|