This repository was archived by the owner on Dec 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathconfig.m4
More file actions
47 lines (44 loc) · 1.57 KB
/
config.m4
File metadata and controls
47 lines (44 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
PHP_ARG_ENABLE(applepay, for applepay support,
[ --enable-applepay Enable applepay support])
PHP_ARG_WITH(openssl-dir, for custom OpenSSL dir,
[ --with-openssl-dir[=DIR] OpenSSL libs and includes directory], no, no)
if test "$PHP_OPENSSL_DIR" != "no"; then
FOUND_OPENSSL=no
if test "$PHP_OPENSSL_DIR" = "yes"; then
PHP_OPENSSL_DIR="/usr/local/openssl /usr/local/ssl /usr/local /usr"
fi
for i in $PHP_OPENSSL_DIR; do
AC_MSG_CHECKING([for OpenSSL at $i])
if test -r $i/include/openssl/ssl.h; then
OPENSSL_INCDIR=$i/include
fi
if test -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME -a -r $i/$PHP_LIBDIR/libcrypto.$SHLIB_SUFFIX_NAME; then
OPENSSL_LIBDIR=$i/$PHP_LIBDIR
fi
test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && FOUND_OPENSSL=yes
AC_MSG_RESULT([$FOUND_OPENSSL])
test FOUND_OPENSSL = "yes" && break
done
if test "$FOUND_OPENSSL" = "no"; then
AC_MSG_ERROR([Could not find OpenSSL libs.])
fi
AC_MSG_CHECKING([for OpenSSL version])
AC_EGREP_CPP(yes, [
#include "$OPENSSL_INCDIR/openssl/opensslv.h"
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
yes
#endif
],[
AC_MSG_RESULT([>= 1.0.2])
],[
AC_MSG_RESULT([< 1.0.2])
AC_MSG_ERROR([OpenSSL version >= 1.0.2 required.])
])
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
PHP_ADD_LIBRARY_WITH_PATH(ssl, $OPENSSL_LIBDIR, APPLEPAY_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(crypto, $OPENSSL_LIBDIR, APPLEPAY_SHARED_LIBADD)
fi
if test "$PHP_APPLEPAY" != "no"; then
PHP_NEW_EXTENSION(applepay, applepay.c, $ext_shared)
PHP_SUBST(APPLEPAY_SHARED_LIBADD)
fi