1 # $NetBSD: builtin.mk,v 1.7 2006/03/30 18:06:18 jlam Exp $
3 BUILTIN_PKG
:= tcp_wrappers
5 BUILTIN_FIND_LIBS
:= wrap
6 BUILTIN_FIND_FILES_VAR
:= H_TCP_WRAPPERS
7 BUILTIN_FIND_FILES.H_TCP_WRAPPERS
= /usr
/include/tcpd.h
9 .
include "../../mk/buildlink3/bsd.builtin.mk"
12 ### Determine if there is a built-in implementation of the package and
13 ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
15 .if
!defined
(IS_BUILTIN.tcp_wrappers
)
16 IS_BUILTIN.tcp_wrappers
= no
17 . if empty
(H_TCP_WRAPPERS
:M__nonexistent__
) && \
18 empty
(H_TCP_WRAPPERS
:M
${LOCALBASE}/*) && \
19 !empty
(BUILTIN_LIB_FOUND.wrap
:M
[yY
][eE
][sS
])
20 IS_BUILTIN.tcp_wrappers
= yes
23 MAKEVARS
+= IS_BUILTIN.tcp_wrappers
26 ### Determine whether we should use the built-in implementation if it
27 ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
29 .if
!defined
(USE_BUILTIN.tcp_wrappers
)
30 . if
${PREFER.tcp_wrappers
} == "pkgsrc"
31 USE_BUILTIN.tcp_wrappers
= no
33 USE_BUILTIN.tcp_wrappers
= ${IS_BUILTIN.tcp_wrappers
}
34 . if defined
(BUILTIN_PKG.tcp_wrappers
) && \
35 !empty
(IS_BUILTIN.tcp_wrappers
:M
[yY
][eE
][sS
])
36 USE_BUILTIN.tcp_wrappers
= yes
37 . for _dep_ in
${BUILDLINK_API_DEPENDS.tcp_wrappers
}
38 . if
!empty
(USE_BUILTIN.tcp_wrappers
:M
[yY
][eE
][sS
])
39 USE_BUILTIN.tcp_wrappers
!= \
40 if
${PKG_ADMIN} pmatch
${_dep_
:Q
} ${BUILTIN_PKG.tcp_wrappers
:Q
}; then \
48 .
endif # PREFER.tcp_wrappers
50 MAKEVARS
+= USE_BUILTIN.tcp_wrappers