1 # $NetBSD: options.mk,v 1.14 2008/09/12 14:59:52 taca Exp $
3 PKG_OPTIONS_VAR= PKG_OPTIONS.squid
4 PKG_SUPPORTED_OPTIONS= snmp ssl \
5 squid-backend-aufs squid-backend-null \
6 squid-backend-ufs squid-carp squid-unlinkd \
7 squid-ldap-helper squid-pam-helper
9 PKG_OPTIONS_LEGACY_OPTS= aufs:squid-backend-aufs \
10 coss:squid-backend-coss diskd:squid-backend-diskd \
11 null:squid-backend-null ufs:squid-backend-ufs \
12 linux-netfilter:squid-netfilter ipf-transparent:squid-ipf \
13 pf-transparent:squid-pf unlinkd:squid-unlinkd \
14 arp-acl:squid-arp-acl pam-helper:squid-pam-helper carp:squid-carp
16 PLIST_VARS+= coss diskd snmp unlinkd
17 PLIST_VARS+= ba_LDAP ba_MSNT ba_NCSA ba_PAM ba_YP ba_getpwnam
18 PLIST_VARS+= da_ldap da_password
19 PLIST_VARS+= na_SMB na_fakeauth
20 PLIST_VARS+= eacl_ip_user eacl_ldap_group eacl_unix_group
23 # most of options are enabled by default except aufs. aufs backend isn't
25 PKG_SUGGESTED_OPTIONS= squid-carp snmp ssl squid-pam-helper squid-unlinkd
27 .include "../../mk/bsd.prefs.mk"
30 # Squid 3.0's COSS support is not stable now.
32 .if !empty(PKGNAME:Msquid-2.[0-9]*.[0-9]*)
33 PKG_SUPPORTED_OPTIONS+= squid-backend-coss
34 PKG_SUGGESTED_OPTIONS+= squid-backend-coss
37 .if !empty(OPSYS:MLinux)
38 PKG_SUPPORTED_OPTIONS+= squid-netfilter
41 # some release of NetBSD lacks <ipl.h> header of IP Filter 4.x
42 .if ${OPSYS} != "NetBSD" || ${OS_VERSION:M[01].*} || exists(/usr/include/netinet/ipl.h)
43 PKG_SUPPORTED_OPTIONS+= squid-ipf
46 .if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "DragonFly"
47 PKG_SUPPORTED_OPTIONS+= squid-pf
50 .if (${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD") && \
51 !empty(PKG_SUPPORTED_OPTIONS:Msquid-ipf)
52 PKG_SUGGESTED_OPTIONS+= squid-ipf
55 .if ${OPSYS} == "OpenBSD"
56 PKG_SUGGESTED_OPTIONS+= squid-pf
59 # Darwin dosen't support System V IPC support.
60 .if empty(OPSYS:MDarwin)
61 PKG_SUPPORTED_OPTIONS+= squid-backend-diskd
62 PKG_SUGGESTED_OPTIONS+= squid-backend-diskd
66 # limited platform support squid-arp-acl
67 .if !empty(OPSYS:MFreeBSD) || !empty(OPSYS:MNetBSD) || !empty(OPSYS:MOpenBSD) || !empty(OPSYS:MLinux) || !empty(OPSYS:MSunOS)
68 PKG_SUPPORTED_OPTIONS+= squid-arp-acl
71 .include "../../mk/bsd.options.mk"
73 SQUID_BACKENDS?= ufs null
74 SQUID_BASIC_AUTH_HELPERS?= getpwnam MSNT NCSA YP
75 SQUID_DIGEST_AUTH_HELPERS?= password
76 SQUID_NTLM_AUTH_HELPERS?= fakeauth SMB
77 SQUID_EXTERNAL_ACL_HELPERS?= ip_user unix_group
80 # squid's code has preference as:
81 # squid-ipf > squid-pf > squid-netfilter
82 # So, options.mk introduce preference as:
83 # squid-netfilter > squid-pf > squid-ipf
85 .if !empty(PKG_OPTIONS:Msquid-netfilter)
86 CONFIGURE_ARGS+= --enable-linux-netfilter
87 .elif !empty(PKG_OPTIONS:Msquid-pf)
88 CONFIGURE_ARGS+= --enable-pf-transparent
89 .elif !empty(PKG_OPTIONS:Msquid-ipf)
90 CONFIGURE_ARGS+= --enable-ipf-transparent
93 .if !empty(PKG_OPTIONS:Msquid-arp-acl)
94 CONFIGURE_ARGS+= --enable-arp-acl
97 .if !empty(PKG_OPTIONS:Msquid-carp)
98 CONFIGURE_ARGS+= --enable-carp
101 .if !empty(PKG_OPTIONS:Msquid-ldap-helper)
102 .include "../../databases/openldap-client/buildlink3.mk"
103 SQUID_BASIC_AUTH_HELPERS+= LDAP
104 SQUID_DIGEST_AUTH_HELPERS+= ldap
105 SQUID_EXTERNAL_ACL_HELPERS+= ldap_group
108 .if !empty(PKG_OPTIONS:Msquid-pam-helper)
109 . include "../../mk/pam.buildlink3.mk"
110 SQUID_BASIC_AUTH_HELPERS+= PAM
113 .if !empty(PKG_OPTIONS:Msnmp)
114 CONFIGURE_ARGS+= --enable-snmp
118 .if !empty(PKG_OPTIONS:Mssl)
119 CONFIGURE_ARGS+= --enable-ssl --with-openssl=${SSLBASE:Q}
120 .include "../../security/openssl/buildlink3.mk"
123 .if !empty(PKG_OPTIONS:Msquid-backend-aufs)
124 SQUID_BACKENDS+= aufs
125 PTHREAD_AUTO_VARS= yes
126 .include "../../mk/pthread.buildlink3.mk"
129 .if !empty(PKG_OPTIONS:Msquid-backend-coss)
130 .if empty(PKG_OPTIONS:Msquid-backend-aufs)
131 SQUID_BACKENDS+= aufs
132 PTHREAD_AUTO_VARS= yes
133 .include "../../mk/pthread.buildlink3.mk"
135 SQUID_BACKENDS+= coss
139 .if !empty(PKG_OPTIONS:Msquid-backend-diskd)
140 SQUID_BACKENDS+= diskd
144 .if empty(PKG_OPTIONS:Msquid-unlinkd)
145 CONFIGURE_ARGS+= --disable-unlinkd
150 .if !empty(SQUID_BASIC_AUTH_HELPERS)
151 CONFIGURE_ARGS+= --enable-basic-auth-helpers=${SQUID_BASIC_AUTH_HELPERS:Q}
152 .for i in ${SQUID_BASIC_AUTH_HELPERS}
157 .if !empty(SQUID_DIGEST_AUTH_HELPERS)
158 CONFIGURE_ARGS+= --enable-digest-auth-helpers=${SQUID_DIGEST_AUTH_HELPERS:Q}
159 .for i in ${SQUID_DIGEST_AUTH_HELPERS}
164 .if !empty(SQUID_NTLM_AUTH_HELPERS)
165 CONFIGURE_ARGS+= --enable-ntlm-auth-helpers=${SQUID_NTLM_AUTH_HELPERS:Q}
166 .for i in ${SQUID_NTLM_AUTH_HELPERS}
171 .if !empty(SQUID_EXTERNAL_ACL_HELPERS)
172 CONFIGURE_ARGS+= --enable-external-acl-helpers=${SQUID_EXTERNAL_ACL_HELPERS:Q}
173 .for i in ${SQUID_EXTERNAL_ACL_HELPERS}