diff options
author | jlam <jlam> | 2003-01-05 22:16:53 +0000 |
---|---|---|
committer | jlam <jlam> | 2003-01-05 22:16:53 +0000 |
commit | 7123810bedd4c24e0d921cbcd9e1d8aa5496ecc0 (patch) | |
tree | 2b35b1e0a70632ad89a794092c15f7f0fe4c360e /devel | |
parent | e65353379d4cc249e58b8e989b0d08cf7134f4b1 (diff) | |
download | pkgsrc-7123810bedd4c24e0d921cbcd9e1d8aa5496ecc0.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')
-rw-r--r-- | devel/gettext-lib/buildlink2.mk | 30 |
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 |