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 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
43 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
44 if test "${ac_cv_path_GREP+set}" = set; then
45 echo $ECHO_N "(cached) $ECHO_C" >&6
47 # Extract the first word of "grep ggrep" to use in msg output
48 if test -z "$GREP"; then
49 set dummy grep ggrep; ac_prog_name=$2
50 if test "${ac_cv_path_GREP+set}" = set; then
51 echo $ECHO_N "(cached) $ECHO_C" >&6
53 ac_path_GREP_found=false
54 # Loop through the user's path and test for each of PROGNAME-LIST
55 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
59 test -z "$as_dir" && as_dir=.
60 for ac_prog in grep ggrep; do
61 for ac_exec_ext in '' $ac_executable_extensions; do
62 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
63 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
64 # Check for GNU ac_path_GREP and select it if it is found.
65 # Check for GNU $ac_path_GREP
66 case `"$ac_path_GREP" --version 2>&1` in
68 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
71 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
74 cat "conftest.in" "conftest.in" >"conftest.tmp"
75 mv "conftest.tmp" "conftest.in"
76 cp "conftest.in" "conftest.nl"
77 echo 'GREP' >> "conftest.nl"
78 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
79 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
80 ac_count=`expr $ac_count + 1`
81 if test $ac_count -gt ${ac_path_GREP_max-0}; then
82 # Best one so far, save it but keep looking for a better one
83 ac_cv_path_GREP="$ac_path_GREP"
84 ac_path_GREP_max=$ac_count
86 # 10*(2^10) chars as input seems more than enough
87 test $ac_count -gt 10 && break
89 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
93 $ac_path_GREP_found && break 3
103 GREP="$ac_cv_path_GREP"
104 if test -z "$GREP"; then
105 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
106 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
107 { (exit 1); exit 1; }; }
111 ac_cv_path_GREP=$GREP
116 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
117 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
118 GREP="$ac_cv_path_GREP"
121 { echo "$as_me:$LINENO: checking for egrep" >&5
122 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
123 if test "${ac_cv_path_EGREP+set}" = set; then
124 echo $ECHO_N "(cached) $ECHO_C" >&6
126 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
127 then ac_cv_path_EGREP="$GREP -E"
129 # Extract the first word of "egrep" to use in msg output
130 if test -z "$EGREP"; then
131 set dummy egrep; ac_prog_name=$2
132 if test "${ac_cv_path_EGREP+set}" = set; then
133 echo $ECHO_N "(cached) $ECHO_C" >&6
135 ac_path_EGREP_found=false
136 # Loop through the user's path and test for each of PROGNAME-LIST
137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
138 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
141 test -z "$as_dir" && as_dir=.
142 for ac_prog in egrep; do
143 for ac_exec_ext in '' $ac_executable_extensions; do
144 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
145 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
146 # Check for GNU ac_path_EGREP and select it if it is found.
147 # Check for GNU $ac_path_EGREP
148 case `"$ac_path_EGREP" --version 2>&1` in
150 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
153 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
156 cat "conftest.in" "conftest.in" >"conftest.tmp"
157 mv "conftest.tmp" "conftest.in"
158 cp "conftest.in" "conftest.nl"
159 echo 'EGREP' >> "conftest.nl"
160 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
161 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
162 ac_count=`expr $ac_count + 1`
163 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
164 # Best one so far, save it but keep looking for a better one
165 ac_cv_path_EGREP="$ac_path_EGREP"
166 ac_path_EGREP_max=$ac_count
168 # 10*(2^10) chars as input seems more than enough
169 test $ac_count -gt 10 && break
171 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
175 $ac_path_EGREP_found && break 3
185 EGREP="$ac_cv_path_EGREP"
186 if test -z "$EGREP"; then
187 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
188 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
189 { (exit 1); exit 1; }; }
193 ac_cv_path_EGREP=$EGREP
199 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
200 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
201 EGREP="$ac_cv_path_EGREP"
204 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
205 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
206 if test "${ac_cv_header_stdc+set}" = set; then
207 echo $ECHO_N "(cached) $ECHO_C" >&6
209 cat >conftest.$ac_ext <<_ACEOF
212 cat confdefs.h >>conftest.$ac_ext
213 cat >>conftest.$ac_ext <<_ACEOF
214 /* end confdefs.h. */
228 rm -f conftest.$ac_objext
229 if { (ac_try="$ac_compile"
231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
232 *) ac_try_echo=$ac_try;;
234 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
235 (eval "$ac_compile") 2>conftest.er1
237 grep -v '^ *+' conftest.er1 >conftest.err
240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
241 (exit $ac_status); } && {
242 test -z "$ac_c_werror_flag" ||
243 test ! -s conftest.err
244 } && test -s conftest.$ac_objext; then
245 ac_cv_header_stdc=yes
247 echo "$as_me: failed program was:" >&5
248 sed 's/^/| /' conftest.$ac_ext >&5
253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
255 if test $ac_cv_header_stdc = yes; then
256 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
257 cat >conftest.$ac_ext <<_ACEOF
260 cat confdefs.h >>conftest.$ac_ext
261 cat >>conftest.$ac_ext <<_ACEOF
262 /* end confdefs.h. */
266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
267 $EGREP "memchr" >/dev/null 2>&1; then
276 if test $ac_cv_header_stdc = yes; then
277 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
278 cat >conftest.$ac_ext <<_ACEOF
281 cat confdefs.h >>conftest.$ac_ext
282 cat >>conftest.$ac_ext <<_ACEOF
283 /* end confdefs.h. */
287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
288 $EGREP "free" >/dev/null 2>&1; then
297 if test $ac_cv_header_stdc = yes; then
298 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
299 if test "$cross_compiling" = yes; then
302 cat >conftest.$ac_ext <<_ACEOF
305 cat confdefs.h >>conftest.$ac_ext
306 cat >>conftest.$ac_ext <<_ACEOF
307 /* end confdefs.h. */
310 #if ((' ' & 0x0FF) == 0x020)
311 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
312 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
314 # define ISLOWER(c) \
315 (('a' <= (c) && (c) <= 'i') \
316 || ('j' <= (c) && (c) <= 'r') \
317 || ('s' <= (c) && (c) <= 'z'))
318 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
321 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
326 for (i = 0; i < 256; i++)
327 if (XOR (islower (i), ISLOWER (i))
328 || toupper (i) != TOUPPER (i))
333 rm -f conftest$ac_exeext
334 if { (ac_try="$ac_link"
336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
337 *) ac_try_echo=$ac_try;;
339 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
340 (eval "$ac_link") 2>&5
342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
343 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
344 { (case "(($ac_try" in
345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
346 *) ac_try_echo=$ac_try;;
348 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
349 (eval "$ac_try") 2>&5
351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
352 (exit $ac_status); }; }; then
355 echo "$as_me: program exited with status $ac_status" >&5
356 echo "$as_me: failed program was:" >&5
357 sed 's/^/| /' conftest.$ac_ext >&5
362 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
368 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
369 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
370 if test $ac_cv_header_stdc = yes; then
372 cat >>confdefs.h <<\_ACEOF
373 #define STDC_HEADERS 1
378 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
388 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
389 inttypes.h stdint.h unistd.h
391 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
392 { echo "$as_me:$LINENO: checking for $ac_header" >&5
393 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
394 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
395 echo $ECHO_N "(cached) $ECHO_C" >&6
397 cat >conftest.$ac_ext <<_ACEOF
400 cat confdefs.h >>conftest.$ac_ext
401 cat >>conftest.$ac_ext <<_ACEOF
402 /* end confdefs.h. */
405 #include <$ac_header>
407 rm -f conftest.$ac_objext
408 if { (ac_try="$ac_compile"
410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
411 *) ac_try_echo=$ac_try;;
413 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
414 (eval "$ac_compile") 2>conftest.er1
416 grep -v '^ *+' conftest.er1 >conftest.err
419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
420 (exit $ac_status); } && {
421 test -z "$ac_c_werror_flag" ||
422 test ! -s conftest.err
423 } && test -s conftest.$ac_objext; then
424 eval "$as_ac_Header=yes"
426 echo "$as_me: failed program was:" >&5
427 sed 's/^/| /' conftest.$ac_ext >&5
429 eval "$as_ac_Header=no"
432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
434 ac_res=`eval echo '${'$as_ac_Header'}'`
435 { echo "$as_me:$LINENO: result: $ac_res" >&5
436 echo "${ECHO_T}$ac_res" >&6; }
437 if test `eval echo '${'$as_ac_Header'}'` = yes; then
438 cat >>confdefs.h <<_ACEOF
439 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
447 if test "${ac_cv_header_cpuid_h+set}" = set; then
448 { echo "$as_me:$LINENO: checking for cpuid.h" >&5
449 echo $ECHO_N "checking for cpuid.h... $ECHO_C" >&6; }
450 if test "${ac_cv_header_cpuid_h+set}" = set; then
451 echo $ECHO_N "(cached) $ECHO_C" >&6
453 { echo "$as_me:$LINENO: result: $ac_cv_header_cpuid_h" >&5
454 echo "${ECHO_T}$ac_cv_header_cpuid_h" >&6; }
456 # Is the header compilable?
457 { echo "$as_me:$LINENO: checking cpuid.h usability" >&5
458 echo $ECHO_N "checking cpuid.h usability... $ECHO_C" >&6; }
459 cat >conftest.$ac_ext <<_ACEOF
462 cat confdefs.h >>conftest.$ac_ext
463 cat >>conftest.$ac_ext <<_ACEOF
464 /* end confdefs.h. */
468 rm -f conftest.$ac_objext
469 if { (ac_try="$ac_compile"
471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
472 *) ac_try_echo=$ac_try;;
474 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
475 (eval "$ac_compile") 2>conftest.er1
477 grep -v '^ *+' conftest.er1 >conftest.err
480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
481 (exit $ac_status); } && {
482 test -z "$ac_c_werror_flag" ||
483 test ! -s conftest.err
484 } && test -s conftest.$ac_objext; then
485 ac_header_compiler=yes
487 echo "$as_me: failed program was:" >&5
488 sed 's/^/| /' conftest.$ac_ext >&5
490 ac_header_compiler=no
493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
494 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
495 echo "${ECHO_T}$ac_header_compiler" >&6; }
497 # Is the header present?
498 { echo "$as_me:$LINENO: checking cpuid.h presence" >&5
499 echo $ECHO_N "checking cpuid.h presence... $ECHO_C" >&6; }
500 cat >conftest.$ac_ext <<_ACEOF
503 cat confdefs.h >>conftest.$ac_ext
504 cat >>conftest.$ac_ext <<_ACEOF
505 /* end confdefs.h. */
508 if { (ac_try="$ac_cpp conftest.$ac_ext"
510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
511 *) ac_try_echo=$ac_try;;
513 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
514 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
516 grep -v '^ *+' conftest.er1 >conftest.err
519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
520 (exit $ac_status); } >/dev/null && {
521 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
522 test ! -s conftest.err
524 ac_header_preproc=yes
526 echo "$as_me: failed program was:" >&5
527 sed 's/^/| /' conftest.$ac_ext >&5
532 rm -f conftest.err conftest.$ac_ext
533 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
534 echo "${ECHO_T}$ac_header_preproc" >&6; }
536 # So? What about this header?
537 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
539 { echo "$as_me:$LINENO: WARNING: cpuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
540 echo "$as_me: WARNING: cpuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
541 { echo "$as_me:$LINENO: WARNING: cpuid.h: proceeding with the compiler's result" >&5
542 echo "$as_me: WARNING: cpuid.h: proceeding with the compiler's result" >&2;}
543 ac_header_preproc=yes
546 { echo "$as_me:$LINENO: WARNING: cpuid.h: present but cannot be compiled" >&5
547 echo "$as_me: WARNING: cpuid.h: present but cannot be compiled" >&2;}
548 { echo "$as_me:$LINENO: WARNING: cpuid.h: check for missing prerequisite headers?" >&5
549 echo "$as_me: WARNING: cpuid.h: check for missing prerequisite headers?" >&2;}
550 { echo "$as_me:$LINENO: WARNING: cpuid.h: see the Autoconf documentation" >&5
551 echo "$as_me: WARNING: cpuid.h: see the Autoconf documentation" >&2;}
552 { echo "$as_me:$LINENO: WARNING: cpuid.h: section \"Present But Cannot Be Compiled\"" >&5
553 echo "$as_me: WARNING: cpuid.h: section \"Present But Cannot Be Compiled\"" >&2;}
554 { echo "$as_me:$LINENO: WARNING: cpuid.h: proceeding with the preprocessor's result" >&5
555 echo "$as_me: WARNING: cpuid.h: proceeding with the preprocessor's result" >&2;}
556 { echo "$as_me:$LINENO: WARNING: cpuid.h: in the future, the compiler will take precedence" >&5
557 echo "$as_me: WARNING: cpuid.h: in the future, the compiler will take precedence" >&2;}
561 { echo "$as_me:$LINENO: checking for cpuid.h" >&5
562 echo $ECHO_N "checking for cpuid.h... $ECHO_C" >&6; }
563 if test "${ac_cv_header_cpuid_h+set}" = set; then
564 echo $ECHO_N "(cached) $ECHO_C" >&6
566 ac_cv_header_cpuid_h=$ac_header_preproc
568 { echo "$as_me:$LINENO: result: $ac_cv_header_cpuid_h" >&5
569 echo "${ECHO_T}$ac_cv_header_cpuid_h" >&6; }
572 if test $ac_cv_header_cpuid_h = yes; then
575 { { echo "$as_me:$LINENO: error: gcc must provide the <cpuid.h> header" >&5
576 echo "$as_me: error: gcc must provide the <cpuid.h> header" >&2;}
577 { (exit 1); exit 1; }; }
582 { echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
583 echo $ECHO_N "checking if -g produces usable source locations for assembler-with-cpp... $ECHO_C" >&6; }
584 if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then
585 echo $ECHO_N "(cached) $ECHO_C" >&6
587 cat > conftest.S <<EOF
588 #include "confdefs.h"
593 ${libc_cv_asm_global_directive} foo
595 /* Unfortunately this test only works for a real instruction,
596 not for any of the machine-independent pseudo-ops.
597 So we just have to assume everybody has a "nop". */
604 if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
609 (exit $ac_status); }; } && {
610 ac_pattern='conftest\.S'
611 { ac_try='readelf --debug-dump=line conftest.o |
612 grep $ac_pattern 1>&5'
613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
617 (exit $ac_status); }; }
619 libc_cv_cpp_asm_debuginfo=yes
621 libc_cv_cpp_asm_debuginfo=no
625 { echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
626 echo "${ECHO_T}$libc_cv_cpp_asm_debuginfo" >&6; }
627 if test $libc_cv_cpp_asm_debuginfo = yes; then
628 cat >>confdefs.h <<\_ACEOF
629 #define HAVE_CPP_ASM_DEBUGINFO 1
634 { echo "$as_me:$LINENO: checking for SSE4 support" >&5
635 echo $ECHO_N "checking for SSE4 support... $ECHO_C" >&6; }
636 if test "${libc_cv_cc_sse4+set}" = set; then
637 echo $ECHO_N "(cached) $ECHO_C" >&6
639 if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
644 (exit $ac_status); }; }; then
650 { echo "$as_me:$LINENO: result: $libc_cv_cc_sse4" >&5
651 echo "${ECHO_T}$libc_cv_cc_sse4" >&6; }
652 if test $libc_cv_cc_sse4 = yes; then
653 cat >>confdefs.h <<\_ACEOF
654 #define HAVE_SSE4_SUPPORT 1