aboutsummaryrefslogtreecommitdiff
path: root/www/apache24/Makefile.modules
blob: d6a7484618a944589af9f330ad427a88f697b6dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# $FreeBSD$
#
# Note by Clement Laforet: (to generate PLIST_SUB entries for modules)
#	gsed 's/^\(.*\)mod\(.*\)\.so/%%\MOD\U\2%%\L\1mod\2\.so/' pkg-plist > tmp
#	mv tmp pkg-plist
#

# =============================================
# Maintainer note for OPTION handling:
# To set additional option use
#    PORT_OPTIONS+=
# To unset an OPTION, even the OPTION is set in OPTIONSFILE use
#    WITHOUT_MODULES+=
#  Using OPTIONS_EXCLUDE and OPTIONS_OVERRIDE do not work as expected
#  if the OPTION is enabled by the user, therefore we calculate
#  them in bsd.apache.mk with help of WITHOUT_MODULES
#  The other methode is to set IGNORE's and force the user to adjust OPTIONS

.if defined(_PREMKINCLUDED)

# check if APR-util module exists
.if exists(${APU_CONFIG})
.  if ${PORT_OPTIONS:MLDAP} || ${PORT_OPTIONS:MAUTHNZ_LDAP}
.    if !exists(${APU_LDAP})
IGNORE=	LDAP and AUTHNZ_LDAP requires APR-util to have LDAP support built in.\
	Please rebuild APR with LDAP support
.    endif
.  endif

.  if ${PORT_OPTIONS:MSESSION_CRYPTO}
.    if !exists(${APU_CRYPTO_OPENSSL}) && !exists(${APU_CRYPTO_NSS})
IGNORE=	SESSION_CRYPTO requires APR-util to have crypto openssl support build in.\
	Please rebuild APR with crypto openssl support
.    endif
.  endif

.endif	# exists APU_CONFIG

# =============================================
# if build with shared MPM the last module will be activated
# see apache issue 53882

# XXX in case we use OPTIONS for MPM
# we do not have a WITH_MPM variable
.if ${PORT_OPTIONS:MMPM_SHARED}
SUB_LIST+=		MPM_FALLBACK_CHECK=""
PLIST_SUB+=		MPM_SHARED=""
CONFIGURE_ARGS+=	--enable-mpms-shared=all
.else
SUB_LIST+=		MPM_FALLBACK_CHECK="\#"
PLIST_SUB+=		MPM_SHARED="@comment "
.endif

.if ${PORT_OPTIONS:MMPM_PREFORK}
CONFIGURE_ARGS+=	--with-mpm=prefork
.elif ${PORT_OPTIONS:MMPM_WORKER}
CONFIGURE_ARGS+=	--with-mpm=worker
.elif ${PORT_OPTIONS:MMPM_EVENT}
CONFIGURE_ARGS+=	--with-mpm=event
.else
IGNORE=	Unknown MPM:
.endif
# =============================================

# build develop/example modules only with additional confirmation
.for DEVMOD in ${EXAMPLE_MODULES}
.  if ${PORT_OPTIONS:M${DEVMOD}}
WITH_DEVMODS=	yes
.  endif
.endfor

.if defined(WITH_DEVMODS) && !defined(IAMADEVELOPER )
IGNORE=		to build the develop/example modules specify -DIAMADEVELOPER on the command line.\
		Do not use the this modules in production environment
.endif

# The next three params are not converted to an option,
# they should be used only for special builds.
.if defined(WITH_STATIC_SUPPORT)
CONFIGURE_ARGS+=	--enable-static-support
.endif

# debug overrides CFLAGS
.if defined(WITH_DEBUG)
DEBUG_FLAGS?=	-O0 -g -ggdb3
CFLAGS=		${DEBUG_FLAGS}
CONFIGURE_ARGS+=	--enable-maintainer-mode
WITH_EXCEPTION_HOOK=	yes
.endif

.if defined(WITH_EXCEPTION_HOOK)
CONFIGURE_ARGS+=	--enable-exception-hook
.endif

# watchdog modules
.if ! ${PORT_OPTIONS:MWATCHDOG} || ! ${PORT_OPTIONS:MSTATUS}
.  if ${PORT_OPTIONS:MHEARTBEAT}
IGNORE=	HEARTBEAT requires WATCHDOG and STATUS
.  elif ${PORT_OPTIONS:MHEARTMONITOR}
IGNORE=	HEARTMONITOR requires WATCHDOG and STATUS
.  endif
.endif
.if ${PORT_OPTIONS:MLBMETHOD_HEARTBEAT} && ! ${PORT_OPTIONS:MHEARTMONITOR}
IGNORE=	LBMETHOD_HEARTBEAT requires WATCHDOG, STATUS and HEARTMONITOR
.endif

.if ${PORT_OPTIONS:MAUTH_BASIC} || ${PORT_OPTIONS:MAUTH_DIGEST}
.  if !${APACHE_MODULES:MAUTHN*}
IGNORE=	AUTH_BASIC and AUTH_DIGEST need at least one AUTHN provider
.  endif
.endif

.  if ${PORT_OPTIONS:MAUTHN_DBD} && ! ${PORT_OPTIONS:MDBD}
IGNORE=	AUTHN_DBD requires DBD
.  endif

.if ${PORT_OPTIONS:MAUTH_BASIC}
.  if !${APACHE_MODULES:MAUTHZ*}
IGNORE=	AUTH_BASIC need at least one AUTHZ provider
.  endif
.endif

.if ${PORT_OPTIONS:MXML2ENC} || ${PORT_OPTIONS:MPROXY_HTML}
CONFIGURE_ARGS+=	--with-libxml2=${LOCALBASE}/include/libxml2
.else
CONFIGURE_ARGS+=	--without-libxml2
.endif

.endif	# _PREMKINCLUDED