diff options
author | Andrew Dolgov <[email protected]> | 2022-11-23 21:14:33 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-11-23 21:14:33 +0300 |
commit | 0c8af4992cb0f7589dcafaad65ada12753c64594 (patch) | |
tree | 18e83d068c3e7dd2499331de977782b382279396 /vendor/aws/aws-crt-php/config.m4 |
initial
Diffstat (limited to 'vendor/aws/aws-crt-php/config.m4')
-rw-r--r-- | vendor/aws/aws-crt-php/config.m4 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/aws/aws-crt-php/config.m4 b/vendor/aws/aws-crt-php/config.m4 new file mode 100644 index 0000000..c65e3a8 --- /dev/null +++ b/vendor/aws/aws-crt-php/config.m4 @@ -0,0 +1,30 @@ +dnl +dnl * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +dnl * SPDX-License-Identifier: Apache-2.0. +dnl + +PHP_ARG_WITH(awscrt, for AWS Common Runtime support, + [ --with-awscrt Include awscrt support]) + +if test "$PHP_AWSCRT" != "no"; then + # force lib paths to be absolute, or PHP will mangle them + cwd=`pwd` + # Enable s2n and libcrypto for non-darwin UNIX + if uname -a | grep -i darwin > /dev/null 2>&1; then + platform_tls_libs="" + else + platform_tls_libs="-ls2n -lcrypto" + fi + CRT_LIBPATHS="-L${cwd}/build/install/lib -L${cwd}/build/install/lib64" + CRT_LIBS="-laws-crt-ffi -laws-c-auth -laws-c-http -laws-c-io -laws-c-cal -laws-c-compression -laws-checksums -laws-c-common ${platform_tls_libs}" + PHP_ADD_INCLUDE(${cwd}/build/install/include) + PHP_EVAL_LIBLINE([$CRT_LIBPATHS $CRT_LIBS], AWSCRT_SHARED_LIBADD) + + # Shoves the linker line into the Makefile + PHP_SUBST(AWSCRT_SHARED_LIBADD) + + # Sources for the PHP extension itself + AWSCRT_SOURCES=ext/awscrt.c + PHP_NEW_EXTENSION(awscrt, $AWSCRT_SOURCES, $ext_shared) + PHP_ADD_MAKEFILE_FRAGMENT +fi |