diff --git a/configure b/configure index 6528970cc2444ffc87667da53eb0466966c9d5f7..9b054f1295b0b23b25c0fe85cc9200c45b1aa328 100755 --- a/configure +++ b/configure @@ -13649,6 +13649,40 @@ then fi +case $host_cpu in + *alpha* ) + echo "$as_me:$LINENO: checking whether we need to define __ALPHA__" >&5 +echo $ECHO_N "checking whether we need to define __ALPHA__... $ECHO_C" >&6 +if test "${ac_cv_cpp_def_alpha+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#ifndef __ALPHA__ +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + ac_cv_cpp_def_alpha="yes" +else + ac_cv_cpp_def_alpha="no" +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_cpp_def_alpha" >&5 +echo "${ECHO_T}$ac_cv_cpp_def_alpha" >&6 + ;; +esac +if test "$ac_cv_cpp_def_alpha" = "yes" +then + CFLAGS="$CFLAGS -D__ALPHA__" + LINTFLAGS="$LINTFLAGS -D__ALPHA__" +fi + + case $host_cpu in *sparc* ) echo "$as_me:$LINENO: checking whether we need to define __sparc__" >&5 diff --git a/configure.ac b/configure.ac index f446767f854684cad4cafb13d4763caae9e96763..7eef841afff2e86aff5de5f5ead2552ff7f4de6e 100644 --- a/configure.ac +++ b/configure.ac @@ -1309,6 +1309,23 @@ then LINTFLAGS="$LINTFLAGS -D__i386__" fi +dnl *** check for the need to define __ALPHA__ + +case $host_cpu in + *alpha* ) + AC_CACHE_CHECK([whether we need to define __ALPHA__],ac_cv_cpp_def_alpha, + AC_EGREP_CPP(yes,[#ifndef __ALPHA__ +yes +#endif], + ac_cv_cpp_def_alpha="yes", ac_cv_cpp_def_alpha="no")) + ;; +esac +if test "$ac_cv_cpp_def_alpha" = "yes" +then + CFLAGS="$CFLAGS -D__ALPHA__" + LINTFLAGS="$LINTFLAGS -D__ALPHA__" +fi + dnl *** check for the need to define __sparc__ case $host_cpu in