summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2005-03-14 14:41:01 +0000
committerAlex Dupre <ale@FreeBSD.org>2005-03-14 14:41:01 +0000
commitbf73a142ce4e2d8bb7ee0ff1a09a0a0fa63007b2 (patch)
tree8f2eb5b21c12e4678781d7cd600baa914a8e6603 /lang
parent- Add handling of statically included extensions (diff)
Add an option (disabled by default) to build the openssl extension statically.
Requested by: too many people
Diffstat (limited to 'lang')
-rw-r--r--lang/php4/Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/lang/php4/Makefile b/lang/php4/Makefile
index 83aff60e01e9..e54469434044 100644
--- a/lang/php4/Makefile
+++ b/lang/php4/Makefile
@@ -71,7 +71,8 @@ OPTIONS= REDIRECT "Enable force-cgi-redirect support" off \
OPTIONS= APACHE2 "Use apache 2.x instead of apache 1.3.x" off
.endif
OPTIONS+= DEBUG "Enable debug" off \
- IPV6 "Enable ipv6 support" on
+ IPV6 "Enable ipv6 support" on \
+ OPENSSL "Build static OpenSSL extension" off
EXT_DIR= 20020429
@@ -109,6 +110,13 @@ SAPI_FILE= bin/php
CONFIGURE_ENV= ac_cv_pthreads_lib=${PTHREAD_LIBS} \
ac_cv_pthreads_cflags=${PTHREAD_CFLAGS}
+.if defined(WITH_OPENSSL)
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} \
+ --with-openssl-dir=${OPENSSLBASE}
+LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl
+.endif
+
.if defined(WITH_APACHE)
.if exists(${LOCALBASE}/include/apache2/httpd.h)
WITH_APACHE2= yes
@@ -182,6 +190,9 @@ post-build:
@${ECHO_CMD} "PHP_EXT_DIR=${EXT_DIR}" >> ${WRKDIR}/php.conf
@${ECHO_CMD} "PHP_PORT=\$${PORTSDIR}/${PHP_PORT}" >> ${WRKDIR}/php.conf
@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
+.if defined(WITH_OPENSSL)
+ @${ECHO_CMD} "PHP_EXT_INC=openssl" >> ${WRKDIR}/php.conf
+.endif
post-install:
@${INSTALL_DATA} ${WRKSRC}/php.ini-dist ${PREFIX}/etc