From 2ca47a6386126261c30aa0ece75525afa9803717 Mon Sep 17 00:00:00 2001 From: reed Date: Tue, 6 Apr 2004 01:29:25 +0000 Subject: Do not assume that if /usr/lib/libintl.* does not exist that it can not be builtin. So also check for "This file is part of the GNU C Library". This helps with systems that have gettext(3) functionality included in their glibc. This also fixes build problem under Linux where devel/popt didn't build "because some functions are defined both in gettext-lib and in the native libc" as reported by minskim to tech-pkg on 21/Mar/2004. --- devel/gettext-lib/builtin.mk | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'devel') diff --git a/devel/gettext-lib/builtin.mk b/devel/gettext-lib/builtin.mk index a0127d3ec5d..0278d49101e 100644 --- a/devel/gettext-lib/builtin.mk +++ b/devel/gettext-lib/builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: builtin.mk,v 1.5 2004/04/01 18:33:20 jmmv Exp $ +# $NetBSD: builtin.mk,v 1.6 2004/04/06 01:29:25 reed Exp $ .if !defined(_BLNK_LIBINTL_FOUND) _BLNK_LIBINTL_FOUND!= \ @@ -14,13 +14,24 @@ _LIBINTL_H= /usr/include/libintl.h .if !defined(IS_BUILTIN.gettext) IS_BUILTIN.gettext= no -. if !empty(_BLNK_LIBINTL_FOUND:M[yY][eE][sS]) && exists(${_LIBINTL_H}) +. if exists(${_LIBINTL_H}) +. if !empty(_BLNK_LIBINTL_FOUND:M[Nn][Oo]) IS_BUILTIN.gettext!= \ - if ${GREP} -q "\#define[ ]*__USE_GNU_GETTEXT" ${_LIBINTL_H}; then \ + if ${GREP} -q "This file is part of the GNU C Library" ${_LIBINTL_H}; then \ ${ECHO} "yes"; \ else \ ${ECHO} "no"; \ fi +. endif +. if !empty(_BLNK_LIBINTL_FOUND:M[yY][eE][sS]) +IS_BUILTIN.gettext!= \ + if ${GREP} -q "\#define[ ]*__USE_GNU_GETTEXT" ${_LIBINTL_H}; then \ + ${ECHO} "yes"; \ + else \ + ${ECHO} "no"; \ + fi +. endif + . if !empty(IS_BUILTIN.gettext:M[yY][eE][sS]) # XXX # XXX Consider the native libintl to be gettext-lib-0.10.35nb1. -- cgit v1.2.3