summaryrefslogtreecommitdiffstats
path: root/c/src/aclocal/check-custom-bsp.m4
blob: 850ba2237e347ed1941ab4d8dc9cd69306c1a00b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
dnl $Id$

AC_DEFUN([_RTEMS_CHECK_CUSTOM_BSP],[
  $2=
  for i in \
    "${srcdir}/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}"/*/make/custom/$1.cfg \
    "${srcdir}/${RTEMS_TOPdir}/make/custom/"$1.cfg;
  do
    AC_MSG_CHECKING([for $i])
    AS_IF([test -r $i],[
      $2="$i"
      AC_MSG_RESULT([yes])
      break;
    ],[
      AC_MSG_RESULT([no])
    ])
  done
])

AC_DEFUN([RTEMS_CHECK_CUSTOM_BSP],[
  AC_REQUIRE([RTEMS_TOP])
  _RTEMS_CHECK_CUSTOM_BSP([[$]$1],[BSP_FOUND])
  AS_IF([test -z "$BSP_FOUND"],[
    AC_MSG_ERROR([missing [$]$1.cfg])
  ])
])