From 69b6786127d290ec15e0e39b37a4c17b5c94d788 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Tue, 10 Dec 2002 22:48:48 +0000 Subject: [PATCH] Alpha porting fix. --- configure | 34 ++++++++++++++++++++++++++++++++++ configure.ac | 17 +++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/configure b/configure index 6528970cc24..9b054f1295b 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 f446767f854..7eef841afff 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