summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2003-08-18 12:02:20 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2003-08-18 12:02:20 +0000
commit284e4fc53310e93c9c331339c4b5c05b9e3f6010 (patch)
tree327784c6df6ce3aeda757f192e6689e7249b44d7
parent2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-284e4fc53310e93c9c331339c4b5c05b9e3f6010.tar.bz2
2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/check-itron.m4: New. * aclocal/enable-inlines.m4: New. * Makefile.am: Add -I aclocal to ACLOCAL_AMFLAGS.
-rw-r--r--c/src/make/ChangeLog6
-rw-r--r--c/src/make/Makefile.am2
-rw-r--r--c/src/make/aclocal/check-itron.m437
-rw-r--r--c/src/make/aclocal/enable-inlines.m417
4 files changed, 61 insertions, 1 deletions
diff --git a/c/src/make/ChangeLog b/c/src/make/ChangeLog
index cd9bed10f0..1c1f9849f0 100644
--- a/c/src/make/ChangeLog
+++ b/c/src/make/ChangeLog
@@ -1,5 +1,11 @@
2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+ * aclocal/check-itron.m4: New.
+ * aclocal/enable-inlines.m4: New.
+ * Makefile.am: Add -I aclocal to ACLOCAL_AMFLAGS.
+
+2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
* Makefile.am: Reflect having moved aclocal/.
2003-08-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
diff --git a/c/src/make/Makefile.am b/c/src/make/Makefile.am
index c391b8840b..c8d8869f79 100644
--- a/c/src/make/Makefile.am
+++ b/c/src/make/Makefile.am
@@ -2,7 +2,7 @@
## $Id$
##
-ACLOCAL_AMFLAGS = -I ../aclocal
+ACLOCAL_AMFLAGS = -I aclocal -I ../aclocal
rtems_makedir = $(prefix)/make
diff --git a/c/src/make/aclocal/check-itron.m4 b/c/src/make/aclocal/check-itron.m4
new file mode 100644
index 0000000000..4c4dbf0042
--- /dev/null
+++ b/c/src/make/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
+])
diff --git a/c/src/make/aclocal/enable-inlines.m4 b/c/src/make/aclocal/enable-inlines.m4
new file mode 100644
index 0000000000..4e0eb80d24
--- /dev/null
+++ b/c/src/make/aclocal/enable-inlines.m4
@@ -0,0 +1,17 @@
+dnl $Id$
+
+AC_DEFUN(RTEMS_ENABLE_INLINES,
+[AC_ARG_ENABLE(rtems-inlines,
+[AC_HELP_STRING([--enable-rtems-inlines],
+[enable RTEMS inline functions (default:enabled, disable to use macros)])],
+[case "${enableval}" in
+ yes) RTEMS_USE_MACROS=no ;;
+ no) RTEMS_USE_MACROS=yes ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
+esac],[RTEMS_USE_MACROS=no])
+AC_SUBST(RTEMS_USE_MACROS)dnl
+
+AS_IF([test x"${RTEMS_USE_MACROS}" = x"yes"],
+ [AC_DEFINE_UNQUOTED(USE_MACROS,1,[if using macros])],
+ [AC_DEFINE_UNQUOTED(USE_INLINES,1,[if using inlines])])
+])