summaryrefslogtreecommitdiffstats
path: root/testsuites/aclocal/check-custom-bsp.m4
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/aclocal/check-custom-bsp.m4')
-rw-r--r--testsuites/aclocal/check-custom-bsp.m426
1 files changed, 20 insertions, 6 deletions
diff --git a/testsuites/aclocal/check-custom-bsp.m4 b/testsuites/aclocal/check-custom-bsp.m4
index 8128906111..402656f3a0 100644
--- a/testsuites/aclocal/check-custom-bsp.m4
+++ b/testsuites/aclocal/check-custom-bsp.m4
@@ -1,10 +1,24 @@
dnl $Id$
-AC_DEFUN([RTEMS_CHECK_CUSTOM_BSP],[
-AC_REQUIRE([RTEMS_TOP])
+AC_DEFUN([_RTEMS_CHECK_CUSTOM_BSP],[
+ for i in ${srcdir}/${RTEMS_TOPdir}/bspkit/${RTEMS_CPU}/*/$1 \
+ ${srcdir}/${RTEMS_TOPdir}/make/custom/$1;
+ do
+ AC_MSG_CHECKING([for $i])
+ AS_IF([test -r $i],[
+ $2="$i"
+ AC_MSG_RESULT([yes])
+ break;
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+ done
+])
-AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
-AS_IF([test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_ERROR([no])])
+AC_DEFUN([RTEMS_CHECK_CUSTOM_BSP],[
+ AC_REQUIRE([RTEMS_TOP])
+ _RTEMS_CHECK_CUSTOM_BSP([[$]$1.cfg],[BSP_FOUND])
+ AS_IF([test -z "$BSP_FOUND"],[
+ AC_MSG_ERROR([missing [$]$1.cfg])
+ ])
])