| @@ -1,47 +1,55 @@ | | | @@ -1,47 +1,55 @@ |
1 | # $NetBSD: builtin.mk,v 1.44 2013/11/23 11:29:35 obache Exp $ | | 1 | # $NetBSD: builtin.mk,v 1.45 2014/03/14 22:33:27 ryoon Exp $ |
2 | | | 2 | |
3 | .include "../../mk/bsd.fast.prefs.mk" | | 3 | .include "../../mk/bsd.fast.prefs.mk" |
4 | | | 4 | |
5 | BUILTIN_PKG:= gettext | | 5 | BUILTIN_PKG:= gettext |
6 | | | 6 | |
7 | BUILTIN_FIND_LIBS:= intl | | 7 | BUILTIN_FIND_LIBS:= intl |
8 | BUILTIN_FIND_HEADERS_VAR:= H_GETTEXT H_GENTOO_GETTEXT \ | | 8 | BUILTIN_FIND_HEADERS_VAR:= H_GETTEXT H_GENTOO_GETTEXT \ |
9 | H_NGETTEXT_GETTEXT | | 9 | H_NGETTEXT_GETTEXT \ |
| | | 10 | H_OPNSVR5_GETTEXT |
10 | BUILTIN_FIND_HEADERS.H_GETTEXT= libintl.h | | 11 | BUILTIN_FIND_HEADERS.H_GETTEXT= libintl.h |
11 | BUILTIN_FIND_GREP.H_GETTEXT= \#define[ ]*__USE_GNU_GETTEXT | | 12 | BUILTIN_FIND_GREP.H_GETTEXT= \#define[ ]*__USE_GNU_GETTEXT |
12 | BUILTIN_FIND_HEADERS.H_GENTOO_GETTEXT= libintl.h | | 13 | BUILTIN_FIND_HEADERS.H_GENTOO_GETTEXT= libintl.h |
13 | BUILTIN_FIND_GREP.H_GENTOO_GETTEXT= gentoo-multilib/.*/libintl.h | | 14 | BUILTIN_FIND_GREP.H_GENTOO_GETTEXT= gentoo-multilib/.*/libintl.h |
14 | BUILTIN_FIND_HEADERS.H_NGETTEXT_GETTEXT=libintl.h | | 15 | BUILTIN_FIND_HEADERS.H_NGETTEXT_GETTEXT=libintl.h |
15 | BUILTIN_FIND_GREP.H_NGETTEXT_GETTEXT= char.*ngettext | | 16 | BUILTIN_FIND_GREP.H_NGETTEXT_GETTEXT= char.*ngettext |
| | | 17 | BUILTIN_FIND_HEADERS.H_OPNSVR5_GETTEXT= libintl.h |
| | | 18 | BUILTIN_FIND_GREP.H_OPNSVR5_GETTEXT= libgnuintl.h |
16 | | | 19 | |
17 | .include "../../mk/buildlink3/bsd.builtin.mk" | | 20 | .include "../../mk/buildlink3/bsd.builtin.mk" |
18 | | | 21 | |
19 | ### | | 22 | ### |
20 | ### Determine if there is a built-in implementation of the package and | | 23 | ### Determine if there is a built-in implementation of the package and |
21 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | | 24 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). |
22 | ### | | 25 | ### |
23 | # | | 26 | # |
24 | # Gentoo Linux has an unusual scheme where /usr/include/libintl.h | | 27 | # Gentoo Linux has an unusual scheme where /usr/include/libintl.h |
25 | # pulls in gentoo-multilib/$ARCH/libintl.h, where the latter is the | | 28 | # pulls in gentoo-multilib/$ARCH/libintl.h, where the latter is the |
26 | # real libintl.h file. We can safely assume that this is GNU gettext | | 29 | # real libintl.h file. We can safely assume that this is GNU gettext |
27 | # (in glibc). | | 30 | # (in glibc). |
28 | # | | 31 | # |
| | | 32 | # SCO OpenServer 5.0.7/3.2 has an unusual scheme where /usr/include/libintl.h |
| | | 33 | # pulls in /usr/include/libgnuintl.h, where the latter is the real libintl.h. |
| | | 34 | # |
29 | .if !defined(IS_BUILTIN.gettext) | | 35 | .if !defined(IS_BUILTIN.gettext) |
30 | IS_BUILTIN.gettext= no | | 36 | IS_BUILTIN.gettext= no |
31 | . if (empty(H_GETTEXT:M__nonexistent__) && \ | | 37 | . if (empty(H_GETTEXT:M__nonexistent__) && \ |
32 | empty(H_GETTEXT:M${LOCALBASE}/*)) || \ | | 38 | empty(H_GETTEXT:M${LOCALBASE}/*)) || \ |
33 | (empty(H_GENTOO_GETTEXT:M__nonexistent__) && \ | | 39 | (empty(H_GENTOO_GETTEXT:M__nonexistent__) && \ |
34 | empty(H_GENTOO_GETTEXT:M${LOCALBASE}/*)) | | 40 | empty(H_GENTOO_GETTEXT:M${LOCALBASE}/*)) || \ |
| | | 41 | (empty(H_OPNSVR5_GETTEXT:M__nonexistent__) && \ |
| | | 42 | empty(H_OPNSVR5_GETTEXT:M${LOCALBASE}/*)) |
35 | IS_BUILTIN.gettext= yes | | 43 | IS_BUILTIN.gettext= yes |
36 | . endif | | 44 | . endif |
37 | .endif | | 45 | .endif |
38 | MAKEVARS+= IS_BUILTIN.gettext | | 46 | MAKEVARS+= IS_BUILTIN.gettext |
39 | | | 47 | |
40 | ### | | 48 | ### |
41 | ### Determine whether we should use the built-in implementation if it | | 49 | ### Determine whether we should use the built-in implementation if it |
42 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). | | 50 | ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no"). |
43 | ### | | 51 | ### |
44 | .if !defined(USE_BUILTIN.gettext) | | 52 | .if !defined(USE_BUILTIN.gettext) |
45 | . if ${PREFER.gettext} == "pkgsrc" | | 53 | . if ${PREFER.gettext} == "pkgsrc" |
46 | USE_BUILTIN.gettext= no | | 54 | USE_BUILTIN.gettext= no |
47 | . else | | 55 | . else |
| @@ -90,26 +98,29 @@ BUILTIN_LIBNAME.gettext= intl | | | @@ -90,26 +98,29 @@ BUILTIN_LIBNAME.gettext= intl |
90 | .else | | 98 | .else |
91 | BUILTIN_LIBNAME.gettext= # empty (part of the C library) | | 99 | BUILTIN_LIBNAME.gettext= # empty (part of the C library) |
92 | .endif | | 100 | .endif |
93 | | | 101 | |
94 | ### | | 102 | ### |
95 | ### The section below only applies if we are not including this file | | 103 | ### The section below only applies if we are not including this file |
96 | ### solely to determine whether a built-in implementation exists. | | 104 | ### solely to determine whether a built-in implementation exists. |
97 | ### | | 105 | ### |
98 | CHECK_BUILTIN.gettext?= no | | 106 | CHECK_BUILTIN.gettext?= no |
99 | .if !empty(CHECK_BUILTIN.gettext:M[nN][oO]) | | 107 | .if !empty(CHECK_BUILTIN.gettext:M[nN][oO]) |
100 | | | 108 | |
101 | . if !empty(USE_BUILTIN.gettext:M[yY][eE][sS]) | | 109 | . if !empty(USE_BUILTIN.gettext:M[yY][eE][sS]) |
102 | BUILDLINK_LIBNAME.gettext= ${BUILTIN_LIBNAME.gettext} | | 110 | BUILDLINK_LIBNAME.gettext= ${BUILTIN_LIBNAME.gettext} |
| | | 111 | . if !empty(OS_VARIANT:MSCOOSR5) |
| | | 112 | BUILDLINK_PREFIX.gettext= /usr/gnu |
| | | 113 | . endif |
103 | . if empty(BUILTIN_LIBNAME.gettext) | | 114 | . if empty(BUILTIN_LIBNAME.gettext) |
104 | BUILDLINK_TRANSFORM+= rm:-lintl | | 115 | BUILDLINK_TRANSFORM+= rm:-lintl |
105 | . endif | | 116 | . endif |
106 | . endif | | 117 | . endif |
107 | | | 118 | |
108 | # If using a built-in libintl that isn't from GNU gettext, then set up | | 119 | # If using a built-in libintl that isn't from GNU gettext, then set up |
109 | # some GNU configure variables that are checked by modern gettext.m4 | | 120 | # some GNU configure variables that are checked by modern gettext.m4 |
110 | # so that it will detect "GNU gettext" in the existing libintl. | | 121 | # so that it will detect "GNU gettext" in the existing libintl. |
111 | # | | 122 | # |
112 | . if defined(GNU_CONFIGURE) | | 123 | . if defined(GNU_CONFIGURE) |
113 | . if !empty(USE_BUILTIN.gettext:M[yY][eE][sS]) | | 124 | . if !empty(USE_BUILTIN.gettext:M[yY][eE][sS]) |
114 | . if !empty(BUILTIN_LIB_FOUND.intl:M[yY][eE][sS]) | | 125 | . if !empty(BUILTIN_LIB_FOUND.intl:M[yY][eE][sS]) |
115 | CONFIGURE_ENV+= gt_cv_func_gnugettext_libintl="yes" | | 126 | CONFIGURE_ENV+= gt_cv_func_gnugettext_libintl="yes" |