1 # Factoring default headers for most tests.
4 #ifdef HAVE_SYS_TYPES_H
5 # include <sys/types.h>
19 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
27 #ifdef HAVE_INTTYPES_H
28 # include <inttypes.h>
37 # This file is generated from configure.in by Autoconf. DO NOT EDIT!
38 # Local configure fragment for sysdeps/i386.
42 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
43 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
44 if test "${ac_cv_path_GREP+set}" = set; then
45 $as_echo_n "(cached) " >&6
47 if test -z "$GREP"; then
48 ac_path_GREP_found=false
49 # Loop through the user's path and test for each of PROGNAME-LIST
50 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
54 test -z "$as_dir" && as_dir=.
55 for ac_prog in grep ggrep; do
56 for ac_exec_ext in '' $ac_executable_extensions; do
57 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
58 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
59 # Check for GNU ac_path_GREP and select it if it is found.
60 # Check for GNU $ac_path_GREP
61 case `"$ac_path_GREP" --version 2>&1` in
63 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
66 $as_echo_n 0123456789 >"conftest.in"
69 cat "conftest.in" "conftest.in" >"conftest.tmp"
70 mv "conftest.tmp" "conftest.in"
71 cp "conftest.in" "conftest.nl"
72 $as_echo 'GREP' >> "conftest.nl"
73 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
74 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
75 ac_count=`expr $ac_count + 1`
76 if test $ac_count -gt ${ac_path_GREP_max-0}; then
77 # Best one so far, save it but keep looking for a better one
78 ac_cv_path_GREP="$ac_path_GREP"
79 ac_path_GREP_max=$ac_count
81 # 10*(2^10) chars as input seems more than enough
82 test $ac_count -gt 10 && break
84 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
87 $ac_path_GREP_found && break 3
92 if test -z "$ac_cv_path_GREP"; then
93 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
94 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
95 { (exit 1); exit 1; }; }
102 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
103 $as_echo "$ac_cv_path_GREP" >&6; }
104 GREP="$ac_cv_path_GREP"
107 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
108 $as_echo_n "checking for egrep... " >&6; }
109 if test "${ac_cv_path_EGREP+set}" = set; then
110 $as_echo_n "(cached) " >&6
112 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
113 then ac_cv_path_EGREP="$GREP -E"
115 if test -z "$EGREP"; then
116 ac_path_EGREP_found=false
117 # Loop through the user's path and test for each of PROGNAME-LIST
118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
119 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
122 test -z "$as_dir" && as_dir=.
123 for ac_prog in egrep; do
124 for ac_exec_ext in '' $ac_executable_extensions; do
125 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
126 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
127 # Check for GNU ac_path_EGREP and select it if it is found.
128 # Check for GNU $ac_path_EGREP
129 case `"$ac_path_EGREP" --version 2>&1` in
131 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
134 $as_echo_n 0123456789 >"conftest.in"
137 cat "conftest.in" "conftest.in" >"conftest.tmp"
138 mv "conftest.tmp" "conftest.in"
139 cp "conftest.in" "conftest.nl"
140 $as_echo 'EGREP' >> "conftest.nl"
141 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
142 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
143 ac_count=`expr $ac_count + 1`
144 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
145 # Best one so far, save it but keep looking for a better one
146 ac_cv_path_EGREP="$ac_path_EGREP"
147 ac_path_EGREP_max=$ac_count
149 # 10*(2^10) chars as input seems more than enough
150 test $ac_count -gt 10 && break
152 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
155 $ac_path_EGREP_found && break 3
160 if test -z "$ac_cv_path_EGREP"; then
161 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
162 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
163 { (exit 1); exit 1; }; }
166 ac_cv_path_EGREP=$EGREP
171 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
172 $as_echo "$ac_cv_path_EGREP" >&6; }
173 EGREP="$ac_cv_path_EGREP"
176 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
177 $as_echo_n "checking for ANSI C header files... " >&6; }
178 if test "${ac_cv_header_stdc+set}" = set; then
179 $as_echo_n "(cached) " >&6
181 cat >conftest.$ac_ext <<_ACEOF
184 cat confdefs.h >>conftest.$ac_ext
185 cat >>conftest.$ac_ext <<_ACEOF
186 /* end confdefs.h. */
200 rm -f conftest.$ac_objext
201 if { (ac_try="$ac_compile"
203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
204 *) ac_try_echo=$ac_try;;
206 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
207 $as_echo "$ac_try_echo") >&5
208 (eval "$ac_compile") 2>conftest.er1
210 grep -v '^ *+' conftest.er1 >conftest.err
213 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
214 (exit $ac_status); } && {
215 test -z "$ac_c_werror_flag" ||
216 test ! -s conftest.err
217 } && test -s conftest.$ac_objext; then
218 ac_cv_header_stdc=yes
220 $as_echo "$as_me: failed program was:" >&5
221 sed 's/^/| /' conftest.$ac_ext >&5
226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
228 if test $ac_cv_header_stdc = yes; then
229 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
230 cat >conftest.$ac_ext <<_ACEOF
233 cat confdefs.h >>conftest.$ac_ext
234 cat >>conftest.$ac_ext <<_ACEOF
235 /* end confdefs.h. */
239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
240 $EGREP "memchr" >/dev/null 2>&1; then
249 if test $ac_cv_header_stdc = yes; then
250 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
251 cat >conftest.$ac_ext <<_ACEOF
254 cat confdefs.h >>conftest.$ac_ext
255 cat >>conftest.$ac_ext <<_ACEOF
256 /* end confdefs.h. */
260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
261 $EGREP "free" >/dev/null 2>&1; then
270 if test $ac_cv_header_stdc = yes; then
271 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
272 if test "$cross_compiling" = yes; then
275 cat >conftest.$ac_ext <<_ACEOF
278 cat confdefs.h >>conftest.$ac_ext
279 cat >>conftest.$ac_ext <<_ACEOF
280 /* end confdefs.h. */
283 #if ((' ' & 0x0FF) == 0x020)
284 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
285 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
287 # define ISLOWER(c) \
288 (('a' <= (c) && (c) <= 'i') \
289 || ('j' <= (c) && (c) <= 'r') \
290 || ('s' <= (c) && (c) <= 'z'))
291 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
294 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
299 for (i = 0; i < 256; i++)
300 if (XOR (islower (i), ISLOWER (i))
301 || toupper (i) != TOUPPER (i))
306 rm -f conftest$ac_exeext
307 if { (ac_try="$ac_link"
309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
310 *) ac_try_echo=$ac_try;;
312 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
313 $as_echo "$ac_try_echo") >&5
314 (eval "$ac_link") 2>&5
316 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
317 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
318 { (case "(($ac_try" in
319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
320 *) ac_try_echo=$ac_try;;
322 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
323 $as_echo "$ac_try_echo") >&5
324 (eval "$ac_try") 2>&5
326 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
327 (exit $ac_status); }; }; then
330 $as_echo "$as_me: program exited with status $ac_status" >&5
331 $as_echo "$as_me: failed program was:" >&5
332 sed 's/^/| /' conftest.$ac_ext >&5
338 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
344 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
345 $as_echo "$ac_cv_header_stdc" >&6; }
346 if test $ac_cv_header_stdc = yes; then
348 cat >>confdefs.h <<\_ACEOF
349 #define STDC_HEADERS 1
354 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
364 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
365 inttypes.h stdint.h unistd.h
367 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
368 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
369 $as_echo_n "checking for $ac_header... " >&6; }
370 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
371 $as_echo_n "(cached) " >&6
373 cat >conftest.$ac_ext <<_ACEOF
376 cat confdefs.h >>conftest.$ac_ext
377 cat >>conftest.$ac_ext <<_ACEOF
378 /* end confdefs.h. */
381 #include <$ac_header>
383 rm -f conftest.$ac_objext
384 if { (ac_try="$ac_compile"
386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
387 *) ac_try_echo=$ac_try;;
389 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
390 $as_echo "$ac_try_echo") >&5
391 (eval "$ac_compile") 2>conftest.er1
393 grep -v '^ *+' conftest.er1 >conftest.err
396 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
397 (exit $ac_status); } && {
398 test -z "$ac_c_werror_flag" ||
399 test ! -s conftest.err
400 } && test -s conftest.$ac_objext; then
401 eval "$as_ac_Header=yes"
403 $as_echo "$as_me: failed program was:" >&5
404 sed 's/^/| /' conftest.$ac_ext >&5
406 eval "$as_ac_Header=no"
409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
411 ac_res=`eval 'as_val=${'$as_ac_Header'}
413 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
414 $as_echo "$ac_res" >&6; }
415 as_val=`eval 'as_val=${'$as_ac_Header'}
417 if test "x$as_val" = x""yes; then
418 cat >>confdefs.h <<_ACEOF
419 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
427 if test "${ac_cv_header_cpuid_h+set}" = set; then
428 { $as_echo "$as_me:$LINENO: checking for cpuid.h" >&5
429 $as_echo_n "checking for cpuid.h... " >&6; }
430 if test "${ac_cv_header_cpuid_h+set}" = set; then
431 $as_echo_n "(cached) " >&6
433 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_cpuid_h" >&5
434 $as_echo "$ac_cv_header_cpuid_h" >&6; }
436 # Is the header compilable?
437 { $as_echo "$as_me:$LINENO: checking cpuid.h usability" >&5
438 $as_echo_n "checking cpuid.h usability... " >&6; }
439 cat >conftest.$ac_ext <<_ACEOF
442 cat confdefs.h >>conftest.$ac_ext
443 cat >>conftest.$ac_ext <<_ACEOF
444 /* end confdefs.h. */
448 rm -f conftest.$ac_objext
449 if { (ac_try="$ac_compile"
451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
452 *) ac_try_echo=$ac_try;;
454 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
455 $as_echo "$ac_try_echo") >&5
456 (eval "$ac_compile") 2>conftest.er1
458 grep -v '^ *+' conftest.er1 >conftest.err
461 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
462 (exit $ac_status); } && {
463 test -z "$ac_c_werror_flag" ||
464 test ! -s conftest.err
465 } && test -s conftest.$ac_objext; then
466 ac_header_compiler=yes
468 $as_echo "$as_me: failed program was:" >&5
469 sed 's/^/| /' conftest.$ac_ext >&5
471 ac_header_compiler=no
474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
475 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
476 $as_echo "$ac_header_compiler" >&6; }
478 # Is the header present?
479 { $as_echo "$as_me:$LINENO: checking cpuid.h presence" >&5
480 $as_echo_n "checking cpuid.h presence... " >&6; }
481 cat >conftest.$ac_ext <<_ACEOF
484 cat confdefs.h >>conftest.$ac_ext
485 cat >>conftest.$ac_ext <<_ACEOF
486 /* end confdefs.h. */
489 if { (ac_try="$ac_cpp conftest.$ac_ext"
491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
492 *) ac_try_echo=$ac_try;;
494 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
495 $as_echo "$ac_try_echo") >&5
496 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
498 grep -v '^ *+' conftest.er1 >conftest.err
501 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
502 (exit $ac_status); } >/dev/null && {
503 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
504 test ! -s conftest.err
506 ac_header_preproc=yes
508 $as_echo "$as_me: failed program was:" >&5
509 sed 's/^/| /' conftest.$ac_ext >&5
514 rm -f conftest.err conftest.$ac_ext
515 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
516 $as_echo "$ac_header_preproc" >&6; }
518 # So? What about this header?
519 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
521 { $as_echo "$as_me:$LINENO: WARNING: cpuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
522 $as_echo "$as_me: WARNING: cpuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
523 { $as_echo "$as_me:$LINENO: WARNING: cpuid.h: proceeding with the compiler's result" >&5
524 $as_echo "$as_me: WARNING: cpuid.h: proceeding with the compiler's result" >&2;}
525 ac_header_preproc=yes
528 { $as_echo "$as_me:$LINENO: WARNING: cpuid.h: present but cannot be compiled" >&5
529 $as_echo "$as_me: WARNING: cpuid.h: present but cannot be compiled" >&2;}
530 { $as_echo "$as_me:$LINENO: WARNING: cpuid.h: check for missing prerequisite headers?" >&5
531 $as_echo "$as_me: WARNING: cpuid.h: check for missing prerequisite headers?" >&2;}
532 { $as_echo "$as_me:$LINENO: WARNING: cpuid.h: see the Autoconf documentation" >&5
533 $as_echo "$as_me: WARNING: cpuid.h: see the Autoconf documentation" >&2;}
534 { $as_echo "$as_me:$LINENO: WARNING: cpuid.h: section \"Present But Cannot Be Compiled\"" >&5
535 $as_echo "$as_me: WARNING: cpuid.h: section \"Present But Cannot Be Compiled\"" >&2;}
536 { $as_echo "$as_me:$LINENO: WARNING: cpuid.h: proceeding with the preprocessor's result" >&5
537 $as_echo "$as_me: WARNING: cpuid.h: proceeding with the preprocessor's result" >&2;}
538 { $as_echo "$as_me:$LINENO: WARNING: cpuid.h: in the future, the compiler will take precedence" >&5
539 $as_echo "$as_me: WARNING: cpuid.h: in the future, the compiler will take precedence" >&2;}
543 { $as_echo "$as_me:$LINENO: checking for cpuid.h" >&5
544 $as_echo_n "checking for cpuid.h... " >&6; }
545 if test "${ac_cv_header_cpuid_h+set}" = set; then
546 $as_echo_n "(cached) " >&6
548 ac_cv_header_cpuid_h=$ac_header_preproc
550 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_cpuid_h" >&5
551 $as_echo "$ac_cv_header_cpuid_h" >&6; }
554 if test "x$ac_cv_header_cpuid_h" = x""yes; then
557 { { $as_echo "$as_me:$LINENO: error: gcc must provide the <cpuid.h> header" >&5
558 $as_echo "$as_me: error: gcc must provide the <cpuid.h> header" >&2;}
559 { (exit 1); exit 1; }; }
564 { $as_echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
565 $as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
566 if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then
567 $as_echo_n "(cached) " >&6
569 cat > conftest.S <<EOF
570 #include "confdefs.h"
575 ${libc_cv_asm_global_directive} foo
577 /* Unfortunately this test only works for a real instruction,
578 not for any of the machine-independent pseudo-ops.
579 So we just have to assume everybody has a "nop". */
586 if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
590 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
591 (exit $ac_status); }; } && {
592 ac_pattern='conftest\.S'
593 { ac_try='readelf --debug-dump=line conftest.o |
594 grep $ac_pattern 1>&5'
595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
598 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
599 (exit $ac_status); }; }
601 libc_cv_cpp_asm_debuginfo=yes
603 libc_cv_cpp_asm_debuginfo=no
607 { $as_echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
608 $as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
609 if test $libc_cv_cpp_asm_debuginfo = yes; then
610 cat >>confdefs.h <<\_ACEOF
611 #define HAVE_CPP_ASM_DEBUGINFO 1
616 { $as_echo "$as_me:$LINENO: checking for SSE4 support" >&5
617 $as_echo_n "checking for SSE4 support... " >&6; }
618 if test "${libc_cv_cc_sse4+set}" = set; then
619 $as_echo_n "(cached) " >&6
621 if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
625 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
626 (exit $ac_status); }; }; then
632 { $as_echo "$as_me:$LINENO: result: $libc_cv_cc_sse4" >&5
633 $as_echo "$libc_cv_cc_sse4" >&6; }
634 if test $libc_cv_cc_sse4 = yes; then
635 cat >>confdefs.h <<\_ACEOF
636 #define HAVE_SSE4_SUPPORT 1
641 { $as_echo "$as_me:$LINENO: checking for assembler -mtune=i686 support" >&5
642 $as_echo_n "checking for assembler -mtune=i686 support... " >&6; }
643 if test "${libc_cv_as_i686+set}" = set; then
644 $as_echo_n "(cached) " >&6
646 if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null'
647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
650 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
651 (exit $ac_status); }; }; then
657 { $as_echo "$as_me:$LINENO: result: $libc_cv_as_i686" >&5
658 $as_echo "$libc_cv_as_i686" >&6; }
660 { $as_echo "$as_me:$LINENO: checking for AVX support" >&5
661 $as_echo_n "checking for AVX support... " >&6; }
662 if test "${libc_cv_cc_avx+set}" = set; then
663 $as_echo_n "(cached) " >&6
665 if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null'
666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
669 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
670 (exit $ac_status); }; }; then
676 { $as_echo "$as_me:$LINENO: result: $libc_cv_cc_avx" >&5
677 $as_echo "$libc_cv_cc_avx" >&6; }
678 if test $libc_cv_cc_avx = yes; then
679 cat >>confdefs.h <<\_ACEOF
680 #define HAVE_AVX_SUPPORT 1