Skip to content

Commit

Permalink
configure: Use $CPP instead of cpp directly
Browse files Browse the repository at this point in the history
The latter breaks in the case of cross-compilation, when `cpp` bears a
target prefix.
  • Loading branch information
bgamari committed Jan 29, 2018
1 parent 0167eac commit f93e890
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion configure.ac
Expand Up @@ -61,6 +61,7 @@ CFLAGS=
CXXFLAGS=
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AX_CXX_COMPILE_STDCXX_11


Expand Down Expand Up @@ -199,7 +200,7 @@ 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 '.' ' '))
declare -a aws_version_tokens=($(printf '#include <aws/core/VersionConfig.h>\nAWS_SDK_VERSION_STRING' | $CPP - | 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
Expand Down

0 comments on commit f93e890

Please sign in to comment.