summaryrefslogtreecommitdiffstats
path: root/aclocal/check-multiprocessing.m4
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-06-30 06:27:36 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-06-30 06:27:36 +0000
commit0f8ae13cac17677d26200fb61bc2a2ceaa4f1b73 (patch)
treed938b1df38c4994a9a1221f47908b31a9e9b64ac /aclocal/check-multiprocessing.m4
parent48e7a7181cbcdef94681aa68222e49ad78de2976 (diff)
downloadrtems-0f8ae13cac17677d26200fb61bc2a2ceaa4f1b73.tar.bz2
2002-06-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/check-multiprocessing.m4: Reworked. * aclocal/enable-multiprocessing.m4: Remove RTEMS_HAS_MULTIPROCESSING.
Diffstat (limited to 'aclocal/check-multiprocessing.m4')
-rw-r--r--aclocal/check-multiprocessing.m452
1 files changed, 24 insertions, 28 deletions
diff --git a/aclocal/check-multiprocessing.m4 b/aclocal/check-multiprocessing.m4
index 6e99a38afa..355635ce54 100644
--- a/aclocal/check-multiprocessing.m4
+++ b/aclocal/check-multiprocessing.m4
@@ -11,36 +11,32 @@ AC_REQUIRE([RTEMS_CHECK_CPU])dnl
AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl
AC_REQUIRE([RTEMS_BSP_ALIAS])dnl
-AC_CACHE_CHECK([whether BSP supports multiprocessing],
- rtems_cv_HAS_MP,
- [dnl
- if test x"$multilib" = x"yes"; then
- # FIXME: Currently, multilibs and multiprocessing can not be
- # build simultaneously
- rtems_cv_HAS_MP="disabled"
+AC_CACHE_CHECK([if wanting multiprocessing],
+ [rtems_cv_want_multiprocessing],
+ [
+ AS_IF([test x"$multilib" = x"no"],
+ [# no cpukit
+ rtems_cv_want_multiprocessing="$enable_multiprocessing"
+ ],[
+#HACK: Should check for RTEMS_MULTIPROCESSING in cpuopts.h, instead
+ rtems_cv_want_multiprocessing="$enable_multiprocessing"
+ ])
+ ])
+
+AS_IF([test "$rtems_cv_want_multiprocessing" = "yes"],
+[
+ AC_CACHE_CHECK([whether BSP supports multiprocessing],
+ [rtems_cv_HAS_MP],[
+ if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP_FAMILY}/shmsupp"; then
+ rtems_cv_HAS_MP="yes" ;
else
- if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP_FAMILY}/shmsupp"; then
- if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
- rtems_cv_HAS_MP="yes" ;
- else
- rtems_cv_HAS_MP="disabled";
- fi
- else
rtems_cv_HAS_MP="no";
- fi
- fi])
-if test "$rtems_cv_HAS_MP" = "yes"; then
-HAS_MP="yes"
-else
-HAS_MP="no"
+ fi
+ ])
+if test $rtems_cv_HAS_MP = "no"; then
+AC_MSG_ERROR([multiprocessing requested but not supported])
fi
-AC_SUBST(HAS_MP)
-])
+],[rtems_cv_HAS_MP="no";])
-AC_DEFUN(RTEMS_DEFINE_MULTIPROCESSING,
-[AC_REQUIRE([RTEMS_CHECK_MULTIPROCESSING])dnl
-if test x"${HAS_MP}" = x"yes";
-then
- AC_DEFINE_UNQUOTED(RTEMS_MULTIPROCESSING,1,[if multiprocessing is supported])
-fi
+AC_SUBST(HAS_MP,[$rtems_cv_HAS_MP])
])