pkgsrc/devel/gmake/options.mk
jperkin bded73aa1d gmake: Unbreak PREFER_PKGSRC circular dependencies.
Just because a builtin is available does not mean a user has configured their
system to use it.  Check for USE_BUILTIN instead of IS_BUILTIN to ensure both
the builtin is available, and the user has allowed pkgsrc to use it, before
enabling.
2019-10-31 15:05:52 +00:00

24 lines
721 B
Makefile

# $NetBSD: options.mk,v 1.8 2019/10/31 15:05:52 jperkin Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.gmake
PKG_SUPPORTED_OPTIONS= nls
PKG_SUGGESTED_OPTIONS= nls
PLIST_VARS+= nls
.include "../../mk/bsd.options.mk"
# Build NLS support only if a native implementation of gettext is available
# to avoid a circular dependency (gmake->gettext-tools->ncurses->gmake).
.include "../../devel/gettext-lib/builtin.mk"
.if !empty(PKG_OPTIONS:Mnls) && \
!empty(USE_BUILTIN.gettext:M[yY][eE][sS])
USE_PKGLOCALEDIR= yes
USE_TOOLS+= msgfmt
. include "../../devel/gettext-lib/buildlink3.mk"
PLIST.nls= yes
.else
CONFIGURE_ARGS+= --without-libintl-prefix
CONFIGURE_ARGS+= --without-libiconv-prefix
CONFIGURE_ARGS+= --disable-nls
.endif