mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
ce040f6c1e
commit
e4f961be09
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||||
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||||
dnl serial 11 (pkg-config-0.29)
|
dnl serial 11 (pkg-config-0.29.1)
|
||||||
dnl
|
dnl
|
||||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||||
|
@ -55,7 +55,7 @@ dnl
|
||||||
dnl See the "Since" comment for each macro you use to see what version
|
dnl See the "Since" comment for each macro you use to see what version
|
||||||
dnl of the macros you require.
|
dnl of the macros you require.
|
||||||
m4_defun([PKG_PREREQ],
|
m4_defun([PKG_PREREQ],
|
||||||
[m4_define([PKG_MACROS_VERSION], [0.29])
|
[m4_define([PKG_MACROS_VERSION], [0.29.1])
|
||||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||||
])dnl PKG_PREREQ
|
])dnl PKG_PREREQ
|
||||||
|
|
|
@ -784,6 +784,7 @@ infodir
|
||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
|
runstatedir
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
|
@ -894,6 +895,7 @@ datadir='${datarootdir}'
|
||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
|
runstatedir='${localstatedir}/run'
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||||
|
@ -1146,6 +1148,15 @@ do
|
||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
|
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||||
|
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||||
|
| --run | --ru | --r)
|
||||||
|
ac_prev=runstatedir ;;
|
||||||
|
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||||
|
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||||
|
| --run=* | --ru=* | --r=*)
|
||||||
|
runstatedir=$ac_optarg ;;
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
|
@ -1283,7 +1294,7 @@ fi
|
||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir
|
libdir localedir mandir runstatedir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
|
@ -1436,6 +1447,7 @@ Fine tuning of the installation directories:
|
||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
|
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
|
@ -9738,8 +9750,11 @@ esac
|
||||||
# check for systems that require aligned memory access
|
# check for systems that require aligned memory access
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
|
||||||
$as_echo_n "checking aligned memory access is required... " >&6; }
|
$as_echo_n "checking aligned memory access is required... " >&6; }
|
||||||
if test "$cross_compiling" = yes; then :
|
if ${ac_cv_aligned_required+:} false; then :
|
||||||
aligned_required=yes
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
if test "$cross_compiling" = yes; then :
|
||||||
|
ac_cv_aligned_required=yes
|
||||||
else
|
else
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
@ -9756,26 +9771,26 @@ int main()
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_run "$LINENO"; then :
|
if ac_fn_c_try_run "$LINENO"; then :
|
||||||
aligned_required=no
|
ac_cv_aligned_required=no
|
||||||
else
|
else
|
||||||
aligned_required=yes
|
ac_cv_aligned_required=yes
|
||||||
fi
|
fi
|
||||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "$aligned_required" = yes ; then
|
fi
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
|
||||||
|
$as_echo "$ac_cv_aligned_required" >&6; }
|
||||||
|
if test "$ac_cv_aligned_required" = yes ; then
|
||||||
|
|
||||||
$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
|
$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
|
|
||||||
$as_echo "$aligned_required" >&6; }
|
|
||||||
|
|
||||||
|
|
||||||
# str, bytes and memoryview hash algorithm
|
# str, bytes and memoryview hash algorithm
|
||||||
|
|
||||||
|
|
19
configure.ac
19
configure.ac
|
@ -2716,7 +2716,8 @@ esac
|
||||||
|
|
||||||
# check for systems that require aligned memory access
|
# check for systems that require aligned memory access
|
||||||
AC_MSG_CHECKING(aligned memory access is required)
|
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()
|
int main()
|
||||||
{
|
{
|
||||||
char s[16];
|
char s[16];
|
||||||
|
@ -2728,18 +2729,16 @@ int main()
|
||||||
if (*p1 == *p2)
|
if (*p1 == *p2)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}]])],
|
||||||
],
|
[ac_cv_aligned_required=no],
|
||||||
[aligned_required=no],
|
[ac_cv_aligned_required=yes],
|
||||||
[aligned_required=yes],
|
[ac_cv_aligned_required=yes])
|
||||||
[aligned_required=yes])
|
])
|
||||||
|
AC_MSG_RESULT($ac_cv_aligned_required)
|
||||||
if test "$aligned_required" = yes ; then
|
if test "$ac_cv_aligned_required" = yes ; then
|
||||||
AC_DEFINE([HAVE_ALIGNED_REQUIRED], [1],
|
AC_DEFINE([HAVE_ALIGNED_REQUIRED], [1],
|
||||||
[Define if aligned memory access is required])
|
[Define if aligned memory access is required])
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($aligned_required)
|
|
||||||
|
|
||||||
|
|
||||||
# str, bytes and memoryview hash algorithm
|
# str, bytes and memoryview hash algorithm
|
||||||
AH_TEMPLATE(Py_HASH_ALGORITHM,
|
AH_TEMPLATE(Py_HASH_ALGORITHM,
|
||||||
|
|
Loading…
Reference in New Issue