diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-12-22T11·05+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-12-22T11·05+0100 |
commit | aa43cbb7646e880f871df4280f8a1909520136f0 (patch) | |
tree | d14c5e32f0f440899da70f78c89ce1d71e4d1dda /configure.ac | |
parent | 6d8087083278b078d0db6238fb16929163388acd (diff) |
Check aws-sdk-cpp version
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 9d8a81d0427b..c395b8713f23 100644 --- a/configure.ac +++ b/configure.ac @@ -186,11 +186,17 @@ fi # Look for aws-cpp-sdk-s3. AC_LANG_PUSH(C++) AC_CHECK_HEADERS([aws/s3/S3Client.h], - [AC_DEFINE([ENABLE_S3], [1], [Whether to enable S3 support via aws-cpp-sdk-s3.]) + [AC_DEFINE([ENABLE_S3], [1], [Whether to enable S3 support via aws-sdk-cpp.]) enable_s3=1], [enable_s3=]) AC_SUBST(ENABLE_S3, [$enable_s3]) AC_LANG_POP(C++) +if test -n "$enable_s3"; then + declare -a aws_version_tokens=($(printf '#include <aws/core/VersionConfig.h>\nAWS_SDK_VERSION_STRING' | cpp -E | grep -v '^#.*' | sed 's/"//g' | tr '.' ' ')) + AC_DEFINE_UNQUOTED([AWS_VERSION_MAJOR], ${aws_version_tokens@<:@0@:>@}, [Major version of aws-sdk-cpp.]) + AC_DEFINE_UNQUOTED([AWS_VERSION_MINOR], ${aws_version_tokens@<:@1@:>@}, [Minor version of aws-sdk-cpp.]) +fi + # Whether to use the Boehm garbage collector. AC_ARG_ENABLE(gc, AC_HELP_STRING([--enable-gc], |