Fix compile error with sys/wait.h.
[glibc.git] / sysdeps / i386 / configure.in
blob12dceaf84487568a8182563aaf23db4e01a4934c
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/i386.
4 AC_HEADER_CHECK([cpuid.h], ,
5   [AC_MSG_ERROR([gcc must provide the <cpuid.h> header])])
7 AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
8                libc_cv_cpp_asm_debuginfo, [dnl
9 cat > conftest.S <<EOF
10 #include "confdefs.h"
12 /* comment on
13    two lines */
14         ${libc_cv_dot_text}
15         ${libc_cv_asm_global_directive} foo
16 foo:
17         /* Unfortunately this test only works for a real instruction,
18            not for any of the machine-independent pseudo-ops.
19            So we just have to assume everybody has a "nop".  */
20         nop
21         /* comment */
22         nop
23         /* comment */
24         nop
25 EOF
26 if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
27    ac_pattern='conftest\.S'
28    AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
29                    grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
30   }; then
31   libc_cv_cpp_asm_debuginfo=yes
32 else
33   libc_cv_cpp_asm_debuginfo=no
35 rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
36 if test $libc_cv_cpp_asm_debuginfo = yes; then
37   AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
40 dnl Check if -msse4 works.
41 AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
42 if AC_TRY_COMMAND([${CC-cc} -msse4 -xc /dev/null -S -o /dev/null]); then
43   libc_cv_cc_sse4=yes
44 else
45   libc_cv_cc_sse4=no
46 fi])
47 if test $libc_cv_cc_sse4 = yes; then
48   AC_DEFINE(HAVE_SSE4_SUPPORT)