summaryrefslogtreecommitdiff
path: root/devel/gettext-lib
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-01-05 22:16:53 +0000
committerjlam <jlam@pkgsrc.org>2003-01-05 22:16:53 +0000
commitd2939d01feebe40c67afd4b59b39afcfe1aee238 (patch)
tree2b35b1e0a70632ad89a794092c15f7f0fe4c360e /devel/gettext-lib
parent4371bc5e7c130cafdcf4514ca7d38318fdc9ecd5 (diff)
downloadpkgsrc-d2939d01feebe40c67afd4b59b39afcfe1aee238.tar.gz
Avoid a conditional based on the value of GNU_CONFIGURE. This allows
gettext-lib/buildlink2.mk to be included anywhere in a Makefile instead of only after where GNU_CONFIGURE may be defined.
Diffstat (limited to 'devel/gettext-lib')
-rw-r--r--devel/gettext-lib/buildlink2.mk30
1 files changed, 21 insertions, 9 deletions
diff --git a/devel/gettext-lib/buildlink2.mk b/devel/gettext-lib/buildlink2.mk
index b9500cd26e3..fe38a46d27e 100644
--- a/devel/gettext-lib/buildlink2.mk
+++ b/devel/gettext-lib/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.17 2002/12/20 07:11:42 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.18 2003/01/05 22:16:53 jlam Exp $
.if !defined(GETTEXT_BUILDLINK2_MK)
GETTEXT_BUILDLINK2_MK= # defined
@@ -99,17 +99,29 @@ _BLNK_LIBINTL+= -lintl
. endif
.endif
-.if defined(GNU_CONFIGURE)
-LIBS+= ${_BLNK_LIBINTL}
-CONFIGURE_ENV+= INTLLIBS="${_BLNK_LIBINTL}"
-CONFIGURE_ARGS+= --with-libintl-prefix=${BUILDLINK_PREFIX.gettext}
-. if ${_NEED_GNU_GETTEXT} == "NO"
-. if ${_BLNK_LIBINTL_FOUND} == "YES"
-CONFIGURE_ENV+= gt_cv_func_gnugettext1_libintl="yes"
-. endif
+# The following section is written to avoid using a conditional based on
+# ${GNU_CONFIGURE}.
+#
+_BLNK_LIBINTL.no= # empty
+_BLNK_LIBINTL.yes= ${_BLNK_LIBINTL}
+
+_BLNK_LIBINTL_CONFIGURE_ENV.no= # empty
+_BLNK_LIBINTL_CONFIGURE_ENV.yes= INTLLIBS="${_BLNK_LIBINTL}"
+.if ${_NEED_GNU_GETTEXT} == "NO"
+. if ${_BLNK_LIBINTL_FOUND} == "YES"
+_BLNK_LIBINTL_CONFIGURE_ENV.yes+= gt_cv_func_gnugettext1_libintl="yes"
. endif
.endif
+_BLNK_LIBINTL_CONFIGURE_ARGS.no= # empty
+_BLNK_LIBINTL_CONFIGURE_ARGS.yes= \
+ --with-libintl-prefix=${BUILDLINK_PREFIX.gettext}
+
+_GNU_CONFIGURE= ${GNU_CONFIGURE:S/Y/y/:S/E/e/:S/S/s/}
+LIBS+= ${_BLNK_LIBINTL.${_GNU_CONFIGURE}}
+CONFIGURE_ENV+= ${_BLNK_LIBINTL_CONFIGURE_ENV.${_GNU_CONFIGURE}}
+CONFIGURE_ARGS+= ${_BLNK_LIBINTL_CONFIGURE_ARGS.${_GNU_CONFIGURE}}
+
.if ${_NEED_GNU_GETTEXT} == "NO"
. if ${_BLNK_LIBINTL_FOUND} == "YES"
_BLNK_INTL_LDFLAGS= -L${BUILDLINK_PREFIX.gettext}/lib -lintl