Windows configure.ac: fix AC_CACHE_CHECK miss case with value with setting in side effecting AC_SUBST which won't get cached

This commit is contained in:
rakslice 2020-08-28 03:01:38 -07:00
parent ec032ffd75
commit 4b93738773
2 changed files with 8 additions and 2 deletions

View File

@ -280,10 +280,13 @@ if [[ "x$HAVE_GCC30" = "xyes" ]]; then
AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing], AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing],
ac_cv_gcc_no_strict_aliasing, [ ac_cv_gcc_no_strict_aliasing, [
AC_TRY_COMPILE([],[], AC_TRY_COMPILE([],[],
[ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")], [ac_cv_gcc_no_strict_aliasing=yes],
[ac_cv_gcc_no_strict_aliasing=no]) [ac_cv_gcc_no_strict_aliasing=no])
]) ])
CFLAGS="$SAVED_CFLAGS" CFLAGS="$SAVED_CFLAGS"
if test "x$ac_cv_gcc_no_strict_aliasing" = xyes; then
AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")
fi
fi fi
dnl Select appropriate CPU source and REGPARAM define. dnl Select appropriate CPU source and REGPARAM define.

View File

@ -189,10 +189,13 @@ if [[ "x$HAVE_GCC30" = "xyes" ]]; then
AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing], AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing],
ac_cv_gcc_no_strict_aliasing, [ ac_cv_gcc_no_strict_aliasing, [
AC_TRY_COMPILE([],[], AC_TRY_COMPILE([],[],
[ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")], [ac_cv_gcc_no_strict_aliasing=yes],
[ac_cv_gcc_no_strict_aliasing=no]) [ac_cv_gcc_no_strict_aliasing=no])
]) ])
CFLAGS="$SAVED_CFLAGS" CFLAGS="$SAVED_CFLAGS"
if test "x$ac_cv_gcc_no_strict_aliasing" = xyes; then
AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")
fi
fi fi
case $host_os in case $host_os in