2 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3 # -------------------------------------------------------
4 # Tests whether HEADER exists and can be compiled using the include files in
5 # INCLUDES, setting the cache variable VAR accordingly.
6 ac_fn_c_check_header_compile ()
8 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
10 $as_echo_n "checking for $2... " >&6; }
11 if eval \${$3+:} false; then :
12 $as_echo_n "(cached) " >&6
14 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19 if ac_fn_c_try_compile "$LINENO"; then :
24 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28 $as_echo "$ac_res" >&6; }
29 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
31 } # ac_fn_c_check_header_compile
32 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
33 # Local configure fragment for sysdeps/x86_64.
36 ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */
38 if test "x$ac_cv_header_cpuid_h" = xyes; then :
41 as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
46 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX512 support in assembler" >&5
47 $as_echo_n "checking for AVX512 support in assembler... " >&6; }
48 if ${libc_cv_asm_avx512+:} false; then :
49 $as_echo_n "(cached) " >&6
51 cat > conftest.s <<\EOF
52 vmovdqu64 %zmm0, (%rsp)
53 vandpd (%rax), %zmm6, %zmm1
55 if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
56 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
59 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60 test $ac_status = 0; }; }; then
61 libc_cv_asm_avx512=yes
67 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_avx512" >&5
68 $as_echo "$libc_cv_asm_avx512" >&6; }
69 if test $libc_cv_asm_avx512 == yes; then
70 $as_echo "#define HAVE_AVX512_ASM_SUPPORT 1" >>confdefs.h
74 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX512 support" >&5
75 $as_echo_n "checking for AVX512 support... " >&6; }
76 if ${libc_cv_cc_avx512+:} false; then :
77 $as_echo_n "(cached) " >&6
79 if { ac_try='${CC-cc} -mavx512f -xc /dev/null -S -o /dev/null'
80 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
83 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
84 test $ac_status = 0; }; }; then :
85 libc_cv_cc_avx512=$libc_cv_asm_avx512
91 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx512" >&5
92 $as_echo "$libc_cv_cc_avx512" >&6; }
93 if test $libc_cv_cc_avx512 = yes; then
94 $as_echo "#define HAVE_AVX512_SUPPORT 1" >>confdefs.h
97 config_vars="$config_vars
98 config-cflags-avx512 = $libc_cv_cc_avx512"
100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Intel MPX support" >&5
101 $as_echo_n "checking for Intel MPX support... " >&6; }
102 if ${libc_cv_asm_mpx+:} false; then :
103 $as_echo_n "(cached) " >&6
105 cat > conftest.s <<\EOF
108 if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
109 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
113 test $ac_status = 0; }; }; then
120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_mpx" >&5
121 $as_echo "$libc_cv_asm_mpx" >&6; }
122 if test $libc_cv_asm_mpx == yes; then
123 $as_echo "#define HAVE_MPX_SUPPORT 1" >>confdefs.h
127 if test x"$build_mathvec" = xnotset; then
131 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
133 # work around problem with autoconf and empty lines at the end of files