Files
rtems/aclocal/check-rdbg.m4
Joel Sherrill 60c752425c 2001-10-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/check-rdbg.m4: Fix latent bug exposed by removal of
	config.cache's which prevented powerpc targets librdbg from building.
2001-10-17 20:30:38 +00:00

42 lines
950 B
Plaintext

dnl $Id$
dnl
AC_DEFUN(RTEMS_CHECK_RDBG,
[dnl
AC_REQUIRE([RTEMS_TOP])dnl
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
AC_REQUIRE([RTEMS_CHECK_NETWORKING])dnl
AC_REQUIRE([RTEMS_ENABLE_RDBG])dnl
AC_CACHE_CHECK([whether BSP supports librdbg],
rtems_cv_HAS_RDBG,
[
if test -d "$srcdir/${RTEMS_TOPdir}/c/src/librdbg/src/${RTEMS_CPU}/${$1}";
then
rtems_cv_HAS_RDBG="yes" ;
elif test -d "$srcdir/${RTEMS_TOPdir}/c/src/librdbg/src/${RTEMS_CPU}/any";
then
rtems_cv_HAS_RDBG="yes" ;
elif test "${RTEMS_CPU}" = "powerpc";
then
A=`grep -l RTEMS_PPC_EXCEPTION_PROCESSING_MODEL $srcdir/${RTEMS_TOPdir}/make/custom/* 2>/dev/null`;
C=""
for i in ${A} ;
do
B=`basename ${i} .cfg`;
C="${C} ${B}";
done
rtems_cv_HAS_RDBG="no";
for j in ${C} ;
do
if test "${$1}" = "${j}" ;
then
rtems_cv_HAS_RDBG="yes";
fi
done
else
rtems_cv_HAS_RDBG="no";
fi
])
HAS_RDBG="$rtems_cv_HAS_RDBG"
AC_SUBST(HAS_RDBG)
])