mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-22 19:45:40 +00:00
configure.ac: manually check immintrin.h with AC_COMPILE_IFELSE().
AC_CHECK_HEADER() emits warnings when configuring for non-x86, because the preprocessor check is OK but the compile check is not: configure: WARNING: immintrin.h: present but cannot be compiled configure: WARNING: immintrin.h: check for missing prerequisite headers? configure: WARNING: immintrin.h: see the Autoconf documentation configure: WARNING: immintrin.h: section "Present But Cannot Be Compiled" configure: WARNING: immintrin.h: proceeding with the compiler's result
This commit is contained in:
parent
ca383599b5
commit
2143534a1c
22
configure
vendored
22
configure
vendored
|
@ -17826,14 +17826,27 @@ $as_echo "$have_gcc_sse3" >&6; }
|
|||
fi
|
||||
fi
|
||||
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_immintrin_h" = xyes; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immintrin.h" >&5
|
||||
$as_echo_n "checking for immintrin.h... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <immintrin.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
have_immintrin_h_hdr=yes
|
||||
else
|
||||
have_immintrin_h_hdr=no
|
||||
fi
|
||||
|
||||
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_immintrin_h_hdr" >&5
|
||||
$as_echo "$have_immintrin_h_hdr" >&6; }
|
||||
if test x$have_immintrin_h_hdr = xyes; then
|
||||
|
||||
$as_echo "#define HAVE_IMMINTRIN_H 1" >>confdefs.h
|
||||
|
@ -26104,7 +26117,6 @@ if test x$WARN_ABOUT_ARM_SIMD_ASM_MIT = xyes; then
|
|||
SUMMARY="${SUMMARY}configure script with:\n"
|
||||
SUMMARY="${SUMMARY}\n --disable-arm-simd\n"
|
||||
fi
|
||||
|
||||
if test x$WARN_ABOUT_ARM_NEON_ASM_MIT = xyes; then
|
||||
SUMMARY="${SUMMARY}\nSDL is being built with ARM NEON optimizations, which\n"
|
||||
SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
|
||||
|
|
|
@ -729,9 +729,10 @@ if test x$enable_assembly = xyes; then
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(immintrin.h,
|
||||
have_immintrin_h_hdr=yes,
|
||||
have_immintrin_h_hdr=no)
|
||||
AC_MSG_CHECKING(for immintrin.h)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <immintrin.h>]])],
|
||||
[have_immintrin_h_hdr=yes],[have_immintrin_h_hdr=no])
|
||||
AC_MSG_RESULT($have_immintrin_h_hdr)
|
||||
if test x$have_immintrin_h_hdr = xyes; then
|
||||
AC_DEFINE(HAVE_IMMINTRIN_H, 1, [ ])
|
||||
fi
|
||||
|
@ -4520,7 +4521,6 @@ if test x$WARN_ABOUT_ARM_SIMD_ASM_MIT = xyes; then
|
|||
SUMMARY="${SUMMARY}configure script with:\n"
|
||||
SUMMARY="${SUMMARY}\n --disable-arm-simd\n"
|
||||
fi
|
||||
|
||||
if test x$WARN_ABOUT_ARM_NEON_ASM_MIT = xyes; then
|
||||
SUMMARY="${SUMMARY}\nSDL is being built with ARM NEON optimizations, which\n"
|
||||
SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
|
||||
|
|
Loading…
Reference in a new issue