i386/x86_64: punt HAVE_CPP_ASM_DEBUGINFO
[platform/upstream/glibc.git] / sysdeps / x86_64 / configure
1
2 # as_fn_set_status STATUS
3 # -----------------------
4 # Set $? to STATUS, without forking.
5 as_fn_set_status ()
6 {
7   return $1
8 } # as_fn_set_status
9
10 # as_fn_exit STATUS
11 # -----------------
12 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13 as_fn_exit ()
14 {
15   set +e
16   as_fn_set_status $1
17   exit $1
18 } # as_fn_exit
19 if expr a : '\(a\)' >/dev/null 2>&1 &&
20    test "X`expr 00001 : '.*\(...\)'`" = X001; then
21   as_expr=expr
22 else
23   as_expr=false
24 fi
25
26 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27   as_basename=basename
28 else
29   as_basename=false
30 fi
31
32 as_me=`$as_basename -- "$0" ||
33 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
34          X"$0" : 'X\(//\)$' \| \
35          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36 $as_echo X/"$0" |
37     sed '/^.*\/\([^/][^/]*\)\/*$/{
38             s//\1/
39             q
40           }
41           /^X\/\(\/\/\)$/{
42             s//\1/
43             q
44           }
45           /^X\/\(\/\).*/{
46             s//\1/
47             q
48           }
49           s/.*/./; q'`
50
51
52   as_lineno_1=$LINENO as_lineno_1a=$LINENO
53   as_lineno_2=$LINENO as_lineno_2a=$LINENO
54   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
55   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
56   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
57   sed -n '
58     p
59     /[$]LINENO/=
60   ' <$as_myself |
61     sed '
62       s/[$]LINENO.*/&-/
63       t lineno
64       b
65       :lineno
66       N
67       :loop
68       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
69       t loop
70       s/-\n.*//
71     ' >$as_me.lineno &&
72   chmod +x "$as_me.lineno" ||
73     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
74
75   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
76   # already done that, so ensure we don't try to do so again and fall
77   # in an infinite loop.  This has already happened in practice.
78   _as_can_reexec=no; export _as_can_reexec
79   # Don't try to exec as it changes $[0], causing all sort of problems
80   # (the dirname of $[0] is not the place where we might find the
81   # original and so on.  Autoconf is especially sensitive to this).
82   . "./$as_me.lineno"
83   # Exit status is that of the last command.
84   exit
85 }
86
87
88 # ac_fn_c_try_compile LINENO
89 # --------------------------
90 # Try to compile conftest.$ac_ext, and return whether this succeeded.
91 ac_fn_c_try_compile ()
92 {
93   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
94   rm -f conftest.$ac_objext
95   if { { ac_try="$ac_compile"
96 case "(($ac_try" in
97   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
98   *) ac_try_echo=$ac_try;;
99 esac
100 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
101 $as_echo "$ac_try_echo"; } >&5
102   (eval "$ac_compile") 2>conftest.err
103   ac_status=$?
104   if test -s conftest.err; then
105     grep -v '^ *+' conftest.err >conftest.er1
106     cat conftest.er1 >&5
107     mv -f conftest.er1 conftest.err
108   fi
109   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
110   test $ac_status = 0; } && {
111          test -z "$ac_c_werror_flag" ||
112          test ! -s conftest.err
113        } && test -s conftest.$ac_objext; then :
114   ac_retval=0
115 else
116   $as_echo "$as_me: failed program was:" >&5
117 sed 's/^/| /' conftest.$ac_ext >&5
118
119         ac_retval=1
120 fi
121   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
122   as_fn_set_status $ac_retval
123
124 } # ac_fn_c_try_compile
125
126 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
127 # -------------------------------------------------------
128 # Tests whether HEADER exists and can be compiled using the include files in
129 # INCLUDES, setting the cache variable VAR accordingly.
130 ac_fn_c_check_header_compile ()
131 {
132   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
134 $as_echo_n "checking for $2... " >&6; }
135 if eval \${$3+:} false; then :
136   $as_echo_n "(cached) " >&6
137 else
138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
139 /* end confdefs.h.  */
140 $4
141 #include <$2>
142 _ACEOF
143 if ac_fn_c_try_compile "$LINENO"; then :
144   eval "$3=yes"
145 else
146   eval "$3=no"
147 fi
148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
149 fi
150 eval ac_res=\$$3
151                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
152 $as_echo "$ac_res" >&6; }
153   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
154
155 } # ac_fn_c_check_header_compile
156 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
157  # Local configure fragment for sysdeps/x86_64.
158
159
160 ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes.  */
161 "
162 if test "x$ac_cv_header_cpuid_h" = xyes; then :
163
164 else
165   as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
166 fi
167
168
169
170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
171 $as_echo_n "checking for SSE4 support... " >&6; }
172 if ${libc_cv_cc_sse4+:} false; then :
173   $as_echo_n "(cached) " >&6
174 else
175   if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
176   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
177   (eval $ac_try) 2>&5
178   ac_status=$?
179   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
180   test $ac_status = 0; }; }; then :
181   libc_cv_cc_sse4=yes
182 else
183   libc_cv_cc_sse4=no
184 fi
185
186 fi
187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5
188 $as_echo "$libc_cv_cc_sse4" >&6; }
189 if test $libc_cv_cc_sse4 = yes; then
190   $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
191
192 fi
193
194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
195 $as_echo_n "checking for AVX support... " >&6; }
196 if ${libc_cv_cc_avx+:} false; then :
197   $as_echo_n "(cached) " >&6
198 else
199   if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null'
200   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
201   (eval $ac_try) 2>&5
202   ac_status=$?
203   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
204   test $ac_status = 0; }; }; then :
205   libc_cv_cc_avx=yes
206 else
207   libc_cv_cc_avx=no
208 fi
209
210 fi
211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5
212 $as_echo "$libc_cv_cc_avx" >&6; }
213 if test $libc_cv_cc_avx = yes; then
214   $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
215
216 fi
217
218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
219 $as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
220 if ${libc_cv_cc_sse2avx+:} false; then :
221   $as_echo_n "(cached) " >&6
222 else
223   if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
224   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
225   (eval $ac_try) 2>&5
226   ac_status=$?
227   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
228   test $ac_status = 0; }; }; then :
229   libc_cv_cc_sse2avx=yes
230 else
231   libc_cv_cc_sse2avx=no
232 fi
233
234 fi
235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5
236 $as_echo "$libc_cv_cc_sse2avx" >&6; }
237 if test $libc_cv_cc_sse2avx = yes; then
238   $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
239
240 fi
241
242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
243 $as_echo_n "checking for FMA4 support... " >&6; }
244 if ${libc_cv_cc_fma4+:} false; then :
245   $as_echo_n "(cached) " >&6
246 else
247   if { ac_try='${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null'
248   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
249   (eval $ac_try) 2>&5
250   ac_status=$?
251   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
252   test $ac_status = 0; }; }; then :
253   libc_cv_cc_fma4=yes
254 else
255   libc_cv_cc_fma4=no
256 fi
257
258 fi
259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
260 $as_echo "$libc_cv_cc_fma4" >&6; }
261 if test $libc_cv_cc_fma4 = yes; then
262   $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
263
264 fi
265
266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
267 $as_echo_n "checking for -mno-vzeroupper support... " >&6; }
268 if ${libc_cv_cc_novzeroupper+:} false; then :
269   $as_echo_n "(cached) " >&6
270 else
271   if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null'
272   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
273   (eval $ac_try) 2>&5
274   ac_status=$?
275   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
276   test $ac_status = 0; }; }; then :
277   libc_cv_cc_novzeroupper=yes
278 else
279   libc_cv_cc_novzeroupper=no
280 fi
281
282 fi
283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
284 $as_echo "$libc_cv_cc_novzeroupper" >&6; }
285
286 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
287
288 # work around problem with autoconf and empty lines at the end of files