I am having a problem building snmp as a shared extension since the move to
PHP_SETUP_OPENSSL.
The big problem is libssl.so on FreeBSD doesn't have a dependence on
libcrypt.so, but I don't think I can get fixed anytime soon.
When running ./configure for the shared extension it fails for the test of
SSL_CTX_set_ssl_version because of undefined symbols. This is because it is
only linking with -lssl and not -lssl -lcrypto.
Short of hacking the generated configure script and adding:
LIBS="$LIBS -lcrypt";
right before the SSL_CTX_set_ssl_version, I don't know how to fix it.
Any ideas?
Thanks,
Brian
acinclude.m4:
1660 PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
1661 PHP_ADD_LIBRARY(crypto,,$1)
1662 ],[
1663 AC_MSG_ERROR([libcrypto not found!])
1664 ],[
1665 -L$OPENSSL_LIBDIR
1666 ])
1667
1668 PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
1669 PHP_ADD_LIBRARY(ssl,,$1)
1670 found_openssl=yes
1671 ],[
1672 AC_MSG_ERROR([libssl not found!])
1673 ],[
1674 -L$OPENSSL_LIBDIR
1675 ])
1676 fi