Skip to content

Commit 65b6c42

Browse files
author
foobar
committed
Synced PHP_SETUP_OPENSSL with PHP_SETUP_ICONV and PHP_SETUP_LIBXML macros.
1 parent 9f306aa commit 65b6c42

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

ext/snmp/config.m4

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ dnl
55
PHP_ARG_WITH(snmp,for SNMP support,
66
[ --with-snmp[=DIR] Include SNMP support.])
77

8+
PHP_ARG_WITH(openssl-dir,OpenSSL dir for SNMP,
9+
[ --with-openssl-dir[=DIR] SNMP: openssl install prefix.], no, no)
10+
811
if test "$PHP_SNMP" != "no"; then
912

1013
dnl
@@ -77,13 +80,18 @@ if test "$PHP_SNMP" != "no"; then
7780
AC_MSG_RESULT($SNMP_SSL)
7881

7982
if test "$SNMP_SSL" = "yes"; then
80-
if test "$PHP_OPENSSL" != "no"; then
81-
PHP_ADD_LIBRARY(ssl, 1, SNMP_SHARED_LIBADD)
82-
PHP_ADD_LIBRARY(crypto,1, SNMP_SHARED_LIBADD)
83-
else
84-
AC_MSG_ERROR(The UCD-SNMP in this system is built with SSL support.
83+
if test "$PHP_OPENSSL_DIR" != "no"; then
84+
PHP_OPENSSL=$PHP_OPENSSL_DIR
85+
fi
86+
87+
if test "$PHP_OPENSSL" = "no"; then
88+
AC_MSG_ERROR([The UCD-SNMP in this system is built with SSL support.
8589
86-
Add --with-openssl<=DIR> to your configure line.)
90+
Add --with-openssl-dir=DIR to your configure line.])
91+
else
92+
PHP_SETUP_OPENSSL(SNMP_SHARED_LIBADD, [], [
93+
AC_MSG_ERROR([SNMP: OpenSSL check failed. Please check config.log for more information.])
94+
])
8795
fi
8896
fi
8997

0 commit comments

Comments
 (0)