Merge pull request #2607 from 0mp/configure.ac-fix

Remove some bashisms from configure.ac
This commit is contained in:
Eelco Dolstra 2019-01-07 23:13:02 +01:00 committed by GitHub
commit 2fadd30ba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,9 +212,11 @@ AC_SUBST(ENABLE_S3, [$enable_s3])
AC_LANG_POP(C++) AC_LANG_POP(C++)
if test -n "$enable_s3"; then if test -n "$enable_s3"; then
declare -a aws_version_tokens=($(printf '#include <aws/core/VersionConfig.h>\nAWS_SDK_VERSION_STRING' | $CPP $CPPFLAGS - | grep -v '^#.*' | sed 's/"//g' | tr '.' ' ')) aws_version_tokens="$(printf '#include <aws/core/VersionConfig.h>\nAWS_SDK_VERSION_STRING' | $CPP $CPPFLAGS - | grep -v '^#.*' | sed 's/"//g' | tr '.' ' ')"
AC_DEFINE_UNQUOTED([AWS_VERSION_MAJOR], ${aws_version_tokens@<:@0@:>@}, [Major version of aws-sdk-cpp.]) aws_major_version="$(awk -v ver="${aws_version_tokens}" '{print $1}')"
AC_DEFINE_UNQUOTED([AWS_VERSION_MINOR], ${aws_version_tokens@<:@1@:>@}, [Minor version of aws-sdk-cpp.]) aws_minor_version="$(awk -v ver="${aws_version_tokens}" '{print $2}')"
AC_DEFINE_UNQUOTED([AWS_VERSION_MAJOR], ${aws_major_version}, [Major version of aws-sdk-cpp.])
AC_DEFINE_UNQUOTED([AWS_VERSION_MINOR], ${aws_minor_version}, [Minor version of aws-sdk-cpp.])
fi fi
@ -272,9 +274,12 @@ AC_SUBST(sandbox_shell)
test "$prefix" = NONE && prefix=$ac_default_prefix test "$prefix" = NONE && prefix=$ac_default_prefix
test "$exec_prefix" = NONE && exec_prefix='${prefix}' test "$exec_prefix" = NONE && exec_prefix='${prefix}'
for name in $ac_subst_vars; do for name in $ac_subst_vars; do
declare $name="$(eval echo "${!name}")" for _ in 1 2 3; do
declare $name="$(eval echo "${!name}")" if printf '%s' "${name}" | egrep '^[_[:alpha:]][_[:alnum:]]*$'
declare $name="$(eval echo "${!name}")" then
eval "${name}"="$(eval echo "\${${name}}")"
fi
done
done done
rm -f Makefile.config rm -f Makefile.config