Subject: Re: documentation for CHECK_BUILTIN and builtin.mk?
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 03/19/2004 19:44:07
On Fri, 19 Mar 2004, Jeremy C. Reed wrote:
> So with gettext (another example) it will never use the native version.
>
> I had to force CHECK_BUILTIN.gettext=yes in my /etc/mk.conf.
Or maybe it is because it assumes that a native system needs
/usr/lib/libintl.*.
Some systems have that built into libc. (Same with iconv.)
The following appears to work. Can anyone look at this?
--- /home/reed/builtin.mk Fri Mar 19 19:42:51 2004
+++ ../../devel/gettext-lib/builtin.mk Fri Mar 19 19:42:43 2004
@@ -14,18 +14,28 @@
.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 "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]) && exists(${_LIBINTL_H})
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])
#
Jeremy C. Reed
http://www.reedmedia.net/