xref: /php-src/ext/ftp/config.m4 (revision cf6bbdfb)
1PHP_ARG_ENABLE([ftp],
2  [whether to enable FTP support],
3  [AS_HELP_STRING([--enable-ftp],
4    [Enable FTP support])])
5
6dnl Empty variable means 'no' (for phpize builds).
7AS_VAR_IF([PHP_OPENSSL],, [PHP_OPENSSL=no])
8
9PHP_ARG_WITH([ftp-ssl],
10  [whether to enable FTP over SSL support],
11  [AS_HELP_STRING([--with-ftp-ssl],
12    [Explicitly enable FTP over SSL support when building without openssl
13    extension or when using phpize. If the openssl extension is enabled at the
14    configure step (--with-openssl), FTP-SSL is enabled implicitly regardless of
15    this option.])],
16  [$PHP_OPENSSL],
17  [no])
18
19if test "$PHP_FTP" = "yes"; then
20  AC_DEFINE([HAVE_FTP], [1],
21    [Define to 1 if the PHP extension 'ftp' is available.])
22  PHP_NEW_EXTENSION([ftp], [php_ftp.c ftp.c], [$ext_shared])
23
24  AS_VAR_IF([PHP_FTP_SSL], [no],, [
25    PHP_SETUP_OPENSSL([FTP_SHARED_LIBADD])
26    PHP_SUBST([FTP_SHARED_LIBADD])
27    AC_DEFINE([HAVE_FTP_SSL], [1], [Define to 1 if FTP over SSL is enabled.])
28  ])
29fi
30