mirror of
https://github.com/php/pecl-networking-ssh2.git
synced 2026-03-23 22:52:06 +01:00
Obviously, the appropriate define is not done in config.w32, although libssh2 1.4.2 is available for Windows builds as of 2012-09-20. For current PHP versions libssh2 1.9.0 is used on Windows.
45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
// vim:ft=javascript
|
|
|
|
ARG_WITH("ssh2", "SSH2 support", "no");
|
|
|
|
if (PHP_SSH2 != "no") {
|
|
var ssh2_all_ok = true;
|
|
|
|
if (!CHECK_LIB("libssh2_a.lib;libssh2.lib", "ssh2", PHP_SSH2)){
|
|
WARNING("ssh2 not enabled: libssh2 libraries not found");
|
|
ssh2_all_ok = false;
|
|
}
|
|
|
|
if (!CHECK_HEADER_ADD_INCLUDE("libssh2.h", "CFLAGS_SSH2", PHP_PHP_BUILD + "\\include\\libssh2")) {
|
|
WARNING("ssh2 not enabled: libssh2 headers not found");
|
|
ssh2_all_ok = false;
|
|
}
|
|
|
|
if (typeof SETUP_OPENSSL === "function") {
|
|
var ret = SETUP_OPENSSL("ssh2", PHP_PHP_BUILD + "\\lib");
|
|
if (ret < 1) {
|
|
WARNING("ssh2 support can't be enabled, openssl library not found")
|
|
ssh2_all_ok = false;
|
|
}
|
|
} else {
|
|
if (!CHECK_LIB("libeay32.lib", "ssh2", PHP_PHP_BUILD + "\\lib")) {
|
|
WARNING("ssh2 support can't be enabled, openssl library not found")
|
|
ssh2_all_ok = false;
|
|
}
|
|
}
|
|
|
|
if (!CHECK_LIB("zlib_a.lib", "ssh2", PHP_PHP_BUILD + "\\lib")) {
|
|
WARNING("ssh2 support can't be enabled, zlib library not found")
|
|
ssh2_all_ok = false;
|
|
}
|
|
|
|
if (ssh2_all_ok){
|
|
EXTENSION("ssh2", "ssh2.c ssh2_fopen_wrappers.c ssh2_sftp.c");
|
|
AC_DEFINE('HAVE_SSH2LIB', 1);
|
|
AC_DEFINE('PHP_SSH2_AGENT_AUTH', 1);
|
|
AC_DEFINE('PHP_SSH2_SESSION_TIMEOUT', 1);
|
|
ADD_EXTENSION_DEP('ssh2', 'zlib')
|
|
ADD_EXTENSION_DEP('ssh2', 'openssl')
|
|
}
|
|
}
|