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 SSE4 support" >&5
47 $as_echo_n "checking for SSE4 support... " >&6; }
48 if ${libc_cv_cc_sse4+:} false; then :
49 $as_echo_n "(cached) " >&6
51 if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
52 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
55 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56 test $ac_status = 0; }; }; then :
63 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5
64 $as_echo "$libc_cv_cc_sse4" >&6; }
65 if test $libc_cv_cc_sse4 = yes; then
66 $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
69 config_vars="$config_vars
70 config-cflags-sse4 = $libc_cv_cc_sse4"
72 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
73 $as_echo_n "checking for AVX support... " >&6; }
74 if ${libc_cv_cc_avx+:} false; then :
75 $as_echo_n "(cached) " >&6
77 if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null'
78 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
81 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
82 test $ac_status = 0; }; }; then :
89 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5
90 $as_echo "$libc_cv_cc_avx" >&6; }
91 if test $libc_cv_cc_avx = yes; then
92 $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
95 config_vars="$config_vars
96 config-cflags-avx = $libc_cv_cc_avx"
98 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX512 support in assembler" >&5
99 $as_echo_n "checking for AVX512 support in assembler... " >&6; }
100 if ${libc_cv_asm_avx512+:} false; then :
101 $as_echo_n "(cached) " >&6
103 cat > conftest.s <<\EOF
104 vmovdqu64 %zmm0, (%rsp)
106 if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
107 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
111 test $ac_status = 0; }; }; then
112 libc_cv_asm_avx512=yes
114 libc_cv_asm_avx512=no
118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_avx512" >&5
119 $as_echo "$libc_cv_asm_avx512" >&6; }
120 if test $libc_cv_asm_avx512 == yes; then
121 $as_echo "#define HAVE_AVX512_ASM_SUPPORT 1" >>confdefs.h
125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX512 support" >&5
126 $as_echo_n "checking for AVX512 support... " >&6; }
127 if ${libc_cv_cc_avx512+:} false; then :
128 $as_echo_n "(cached) " >&6
130 if { ac_try='${CC-cc} -mavx512f -xc /dev/null -S -o /dev/null'
131 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
134 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
135 test $ac_status = 0; }; }; then :
136 libc_cv_cc_avx512=$libc_cv_asm_avx512
142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx512" >&5
143 $as_echo "$libc_cv_cc_avx512" >&6; }
144 if test $libc_cv_cc_avx512 = yes; then
145 $as_echo "#define HAVE_AVX512_SUPPORT 1" >>confdefs.h
148 config_vars="$config_vars
149 config-cflags-avx512 = $libc_cv_cc_avx512"
151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
152 $as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
153 if ${libc_cv_cc_sse2avx+:} false; then :
154 $as_echo_n "(cached) " >&6
156 if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
157 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
161 test $ac_status = 0; }; }; then :
162 libc_cv_cc_sse2avx=yes
164 libc_cv_cc_sse2avx=no
168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
169 $as_echo "$libc_cv_cc_sse2avx" >&6; }
170 if test $libc_cv_cc_sse2avx = yes; then
171 $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
174 config_vars="$config_vars
175 config-cflags-sse2avx = $libc_cv_cc_sse2avx"
177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
178 $as_echo_n "checking for FMA4 support... " >&6; }
179 if ${libc_cv_cc_fma4+:} false; then :
180 $as_echo_n "(cached) " >&6
182 if { ac_try='${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null'
183 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
187 test $ac_status = 0; }; }; then :
194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
195 $as_echo "$libc_cv_cc_fma4" >&6; }
196 if test $libc_cv_cc_fma4 = yes; then
197 $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
200 config_vars="$config_vars
201 have-mfma4 = $libc_cv_cc_fma4"
203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
204 $as_echo_n "checking for -mno-vzeroupper support... " >&6; }
205 if ${libc_cv_cc_novzeroupper+:} false; then :
206 $as_echo_n "(cached) " >&6
208 if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null'
209 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
212 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
213 test $ac_status = 0; }; }; then :
214 libc_cv_cc_novzeroupper=yes
216 libc_cv_cc_novzeroupper=no
220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
221 $as_echo "$libc_cv_cc_novzeroupper" >&6; }
222 config_vars="$config_vars
223 config-cflags-novzeroupper = $libc_cv_cc_novzeroupper"
225 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
227 # work around problem with autoconf and empty lines at the end of files