diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-04-14 16:36:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-14 16:36:45 (GMT) |
commit | e4f961be0946639eb4356e274268dd9b5e90da9b (patch) | |
tree | ed8420c65d9ebbeed9b8f1c981b3af1df0c77f02 /configure.ac | |
parent | ce040f6c1ef4d31bad8a3ce51a766a0f82c7d2a0 (diff) | |
download | cpython-e4f961be0946639eb4356e274268dd9b5e90da9b.zip cpython-e4f961be0946639eb4356e274268dd9b5e90da9b.tar.gz cpython-e4f961be0946639eb4356e274268dd9b5e90da9b.tar.bz2 |
improve alignment autoconf test (#1129)
Replace the deprecated AC_TRY_RUN with AC_RUN_IFELSE. Also, standardize the
variable name and allow for caching of the result.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index f9bd92c..73e64fd 100644 --- a/configure.ac +++ b/configure.ac @@ -2716,7 +2716,8 @@ esac # check for systems that require aligned memory access AC_MSG_CHECKING(aligned memory access is required) -AC_TRY_RUN([ +AC_CACHE_VAL(ac_cv_aligned_required, +[AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main() { char s[16]; @@ -2728,18 +2729,16 @@ int main() if (*p1 == *p2) return 1; return 0; -} - ], - [aligned_required=no], - [aligned_required=yes], - [aligned_required=yes]) - -if test "$aligned_required" = yes ; then +}]])], +[ac_cv_aligned_required=no], +[ac_cv_aligned_required=yes], +[ac_cv_aligned_required=yes]) +]) +AC_MSG_RESULT($ac_cv_aligned_required) +if test "$ac_cv_aligned_required" = yes ; then AC_DEFINE([HAVE_ALIGNED_REQUIRED], [1], [Define if aligned memory access is required]) fi -AC_MSG_RESULT($aligned_required) - # str, bytes and memoryview hash algorithm AH_TEMPLATE(Py_HASH_ALGORITHM, |