1 # $FreeBSD: ports/www/apache22/Makefile.modules,v 1.47 2012/11/17 06:02:28 svnexp Exp $
3 # Note by Clement Laforet: (to generate PLIST_SUB entries for modules)
4 # gsed 's/^\(.*\)mod\(.*\)\.so/%%\MOD\U\2%%\L\1mod\2\.so/' pkg-plist > tmp
8 # =============================================
9 # Maintainer note for OPTION handling:
10 # To set additional option use
12 # To unset an OPTION, even the OPTION is set in OPTIONSFILE use
14 # Using OPTIONS_EXCLUDE and OPTIONS_OVERRIDE do not work as expected
15 # if the OPTION is enabled by the user, therefore we calculate
16 # them in bsd.apache.mk with help of WITHOUT_MODULES
17 # The other methode is to set IGNORE's and force the user to adjust OPTIONS
19 .if defined(_PREMKINCLUDED)
21 # check if APR was build with thread support
22 .if exists(${APR_CONFIG})
23 APR_LIBS!= ${SH} ${APR_CONFIG} --libs | ${SED} -e 's/-//g'
24 . if defined(APR_LIBS) && !empty(APR_LIBS)
26 . for lib in ${APR_LIBS}
32 .endif # exists APR_CONFIG
34 # check if APR-util module exists
35 .if exists(${APU_CONFIG})
36 . if ${PORT_OPTIONS:MLDAP} || ${PORT_OPTIONS:MAUTHNZ_LDAP}
37 . if !exists(${APU_LDAP})
38 IGNORE= LDAP and AUTHNZ_LDAP requires APR-util to have LDAP support built in.\
39 Please rebuild APR with LDAP support
43 . if ${PORT_OPTIONS:MDBD} || ${PORT_OPTIONS:MAUTHN_DBD}
44 . if !exists(${APU_DBD_MYSQL}) && !exists(${APU_DBD_PGSQL}) && !exists(${APU_DBD_SQLITE3})
45 IGNORE= AUTHN_DBD and DBD requires APR-util to have DBD support build in.\
46 Please rebuild APR at last with one DBD backend (MYSQL, PGSQL or SQLITE)
49 .endif # exists APU_CONFIG
51 # =============================================
52 # MPM's: prefork worker event itk peruser
53 .if ${WITH_MPM} == "prefork"
54 PLIST_SUB+= WORKER="@comment " EVENT="@comment "
55 .elif ${WITH_MPM} == "worker"
56 PLIST_SUB+= WORKER="" EVENT="@comment "
57 .elif ${WITH_MPM} == "event"
58 PLIST_SUB+= WORKER="@comment " EVENT=""
59 .elif ${WITH_MPM} == "peruser"
60 PLIST_SUB+= WORKER="@comment " EVENT="@comment "
61 .elif ${WITH_MPM} == "itk"
62 PLIST_SUB+= WORKER="@comment " EVENT="@comment "
63 EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-${MPM_ITK_VERSION}
64 . if defined (WITH_ITK_PERDIR_REGEX) && defined (WITH_ITK_LIMITS)
65 IGNORE= Use only one patch option not both (WITH_ITK_PERDIR_REGEX or WITH_ITK_LIMITS)
67 . if defined (WITH_ITK_PERDIR_REGEX)
68 EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-perdir-regex
70 . if defined (WITH_ITK_LIMITS)
71 EXTRA_PATCHES+= ${PATCHDIR}/mpm-itk-limits
74 IGNORE= Unknown MPM: ${WITH_MPM}
77 .if ${WITH_MPM} != "prefork"
78 PKGNAMESUFFIX= -${WITH_MPM}-mpm
79 LATEST_LINK= apache22-${WITH_MPM}-mpm
82 .if ${WITH_MPM} == "worker" || ${WITH_MPM} == "event"
84 .if ${PORT_OPTIONS:MCGI}
85 IGNORE= When using a multi-threaded MPM, the module CGID should be used in place CGI. \
86 Please de-select CGI and select CGID instead. \
87 See http://httpd.apache.org/docs/2.2/mod/mod_cgi.html
89 .if exists(${APR_CONFIG}) && !defined(APR_HAS_THREADS)
90 IGNORE= requires APR threads. Please rebuild APR with THREAD support
93 # =============================================
95 # The next three params are not converted to an option,
96 # they should be used only for special builds.
97 .if defined(WITH_STATIC_SUPPORT)
98 CONFIGURE_ARGS+= --enable-static-support
101 # debug overrides CFLAGS
102 .if defined(WITH_DEBUG)
103 DEBUG_FLAGS?= -O0 -g -ggdb3
104 CFLAGS= ${DEBUG_FLAGS}
105 CONFIGURE_ARGS+= --enable-maintainer-mode
106 WITH_EXCEPTION_HOOK= yes
109 .if defined(WITH_EXCEPTION_HOOK)
110 CONFIGURE_ARGS+= --enable-exception-hook
113 .if ${PORT_OPTIONS:MSSL}
114 CFLAGS+= -I${OPENSSLINC}
115 LDFLAGS+= -L${OPENSSLLIB}
116 CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE}
119 .if ${PORT_OPTIONS:MAUTHNZ_LDAP}
120 CONFIGURE_ARGS+= --enable-authnz-ldap
123 .if ${PORT_OPTIONS:MLDAP}
124 CONFIGURE_ARGS+= --enable-ldap=shared
127 .if ${PORT_OPTIONS:MAUTH_BASIC} || ${PORT_OPTIONS:MAUTH_DIGEST}
128 . if !${APACHE_MODULES:MAUTHN*}
129 IGNORE= AUTH_BASIC and AUTH_DIGEST need at last one AUTHN provider
133 .if ${PORT_OPTIONS:MAUTH_BASIC}
134 . if !${APACHE_MODULES:MAUTHZ*}
135 IGNORE= AUTH_BASIC need at last one AUTHZ provider
139 .if defined(APR_HAS_THREADS)
140 CFLAGS+= ${PTHREAD_CFLAGS}
141 LDFLAGS+= ${PTHREAD_LIBS}
143 . if exists(${APR_CONFIG}) && ${PORT_OPTIONS:MMEM_CACHE}
144 IGNORE= MEM_CACHE requires APR threads. Please rebuild APR with THREAD support
148 # http://httpd.apache.org/docs/2.2/bind.html
149 .if ${PORT_OPTIONS:MIPV4_MAPPED}
150 CONFIGURE_ARGS+= --enable-v4-mapped
152 CONFIGURE_ARGS+= --disable-v4-mapped
155 CONFIGURE_ARGS+= --with-mpm=${WITH_MPM}
157 .endif # _PREMKINCLUDED