summaryrefslogtreecommitdiffstats
path: root/c/src/tests/aclocal/check-itron.m4
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/tests/aclocal/check-itron.m4')
-rw-r--r--c/src/tests/aclocal/check-itron.m437
1 files changed, 37 insertions, 0 deletions
diff --git a/c/src/tests/aclocal/check-itron.m4 b/c/src/tests/aclocal/check-itron.m4
new file mode 100644
index 0000000000..4c4dbf0042
--- /dev/null
+++ b/c/src/tests/aclocal/check-itron.m4
@@ -0,0 +1,37 @@
+dnl $Id$
+dnl
+AC_DEFUN(RTEMS_CHECK_ITRON_API,
+[dnl
+AC_REQUIRE([RTEMS_CHECK_CPU])dnl
+AC_REQUIRE([RTEMS_ENABLE_ITRON])dnl
+
+AC_CACHE_CHECK([whether CPU supports libitron],
+ rtems_cv_HAS_ITRON_API,
+ [dnl
+ case "$RTEMS_CPU" in
+ unix*)
+ rtems_cv_HAS_ITRON_API="no"
+ ;;
+ *)
+ if test "${RTEMS_HAS_ITRON_API}" = "yes"; then
+ rtems_cv_HAS_ITRON_API="yes";
+ else
+ rtems_cv_HAS_ITRON_API="disabled";
+ fi
+ ;;
+ esac])
+if test "$rtems_cv_HAS_ITRON_API" = "yes"; then
+ HAS_ITRON_API="yes";
+else
+ HAS_ITRON_API="no";
+fi
+AC_SUBST(HAS_ITRON_API)dnl
+])
+
+AC_DEFUN(RTEMS_DEFINE_ITRON_API,
+[AC_REQUIRE([RTEMS_CHECK_ITRON_API])dnl
+if test x"${HAS_ITRON_API}" = x"yes";
+then
+ AC_DEFINE_UNQUOTED(RTEMS_ITRON_API,1,[if itron api is supported])
+fi
+])