Added check for missing __i386__ definition.

This commit is contained in:
Alexandre Julliard 1999-05-08 16:05:27 +00:00
parent 1bb9403938
commit 51d46ba954
2 changed files with 43 additions and 0 deletions

31
configure vendored
View File

@ -5049,6 +5049,37 @@ EOF
fi fi
echo $ac_n "checking "whether we need to define __i386__"""... $ac_c" 1>&6
echo "configure:5055: checking "whether we need to define __i386__"" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5060 "configure"
#include "confdefs.h"
#if (defined(i386) || defined(__i386)) && !defined(__i386__)
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_cpp_def_i386="yes"
else
rm -rf conftest*
ac_cv_cpp_def_i386="no"
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cpp_def_i386" 1>&6
if test "$ac_cv_cpp_def_i386" = "yes"
then
CFLAGS="$CFLAGS -D__i386__"
fi
GCC_NO_BUILTIN="" GCC_NO_BUILTIN=""
if test "$GCC" = "yes" if test "$GCC" = "yes"
then then

View File

@ -695,6 +695,18 @@ then
AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS) AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS)
fi fi
dnl *** check for the need to define __i386__
AC_CACHE_CHECK("whether we need to define __i386__",ac_cv_cpp_def_i386,
AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
yes
#endif],
ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
if test "$ac_cv_cpp_def_i386" = "yes"
then
CFLAGS="$CFLAGS -D__i386__"
fi
dnl $GCC is set by autoconf dnl $GCC is set by autoconf
GCC_NO_BUILTIN="" GCC_NO_BUILTIN=""
if test "$GCC" = "yes" if test "$GCC" = "yes"