Skip to content

Commit f93e890

Browse files
committedJan 29, 2018
configure: Use $CPP instead of cpp directly
The latter breaks in the case of cross-compilation, when `cpp` bears a target prefix.
1 parent 0167eac commit f93e890

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎configure.ac

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ CFLAGS=
6161
CXXFLAGS=
6262
AC_PROG_CC
6363
AC_PROG_CXX
64+
AC_PROG_CPP
6465
AX_CXX_COMPILE_STDCXX_11
6566

6667

@@ -199,7 +200,7 @@ AC_SUBST(ENABLE_S3, [$enable_s3])
199200
AC_LANG_POP(C++)
200201

201202
if test -n "$enable_s3"; then
202-
declare -a aws_version_tokens=($(printf '#include <aws/core/VersionConfig.h>\nAWS_SDK_VERSION_STRING' | cpp -E | grep -v '^#.*' | sed 's/"//g' | tr '.' ' '))
203+
declare -a aws_version_tokens=($(printf '#include <aws/core/VersionConfig.h>\nAWS_SDK_VERSION_STRING' | $CPP - | grep -v '^#.*' | sed 's/"//g' | tr '.' ' '))
203204
AC_DEFINE_UNQUOTED([AWS_VERSION_MAJOR], ${aws_version_tokens@<:@0@:>@}, [Major version of aws-sdk-cpp.])
204205
AC_DEFINE_UNQUOTED([AWS_VERSION_MINOR], ${aws_version_tokens@<:@1@:>@}, [Minor version of aws-sdk-cpp.])
205206
fi

0 commit comments

Comments
 (0)
Please sign in to comment.