diff --git a/configure b/configure index 4e5f5554f44..1e7ebcec6e0 100755 --- a/configure +++ b/configure @@ -5049,6 +5049,37 @@ EOF 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 <&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="" if test "$GCC" = "yes" then diff --git a/configure.in b/configure.in index 7bd0ad754ae..75149de48f7 100644 --- a/configure.in +++ b/configure.in @@ -695,6 +695,18 @@ then AC_DEFINE(HAVE_MSGHDR_ACCRIGHTS) 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 GCC_NO_BUILTIN="" if test "$GCC" = "yes"