Index: aclocal/check-itron.m4
===================================================================
--- aclocal/check-itron.m4	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ aclocal/check-itron.m4	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -6,5 +6,5 @@
 AC_REQUIRE([RTEMS_ENABLE_ITRON])dnl
 
-AC_CACHE_CHECK([whether BSP supports libitron],
+AC_CACHE_CHECK([whether CPU supports libitron],
   rtems_cv_HAS_ITRON_API,
   [dnl
@@ -27,3 +27,8 @@
 fi
 AC_SUBST(HAS_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
 ])
Index: aclocal/check-multiprocessing.m4
===================================================================
--- aclocal/check-multiprocessing.m4	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ aclocal/check-multiprocessing.m4	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -36,3 +36,9 @@
 fi
 AC_SUBST(HAS_MP)
+
+if test x"${HAS_MP}" = x"yes";
+then
+  AC_DEFINE_UNQUOTED(RTEMS_MULTIPROCESSING,1,[if multiprocessing is supported])
+fi
+
 ])
Index: aclocal/check-posix.m4
===================================================================
--- aclocal/check-posix.m4	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ aclocal/check-posix.m4	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -6,5 +6,5 @@
 AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
 
-AC_CACHE_CHECK([whether BSP supports libposix],
+AC_CACHE_CHECK([whether CPU supports libposix],
   rtems_cv_HAS_POSIX_API,
   [dnl
@@ -27,3 +27,8 @@
 fi
 AC_SUBST(HAS_POSIX_API)dnl
+
+if test x"${HAS_POSIX_API}" = x"yes";
+then
+  AC_DEFINE_UNQUOTED(RTEMS_POSIX_API,1,[if posix api is supported])
+fi
 ])
Index: aclocal/enable-inlines.m4
===================================================================
--- aclocal/enable-inlines.m4	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ aclocal/enable-inlines.m4	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -11,3 +11,12 @@
 esac],[RTEMS_USE_MACROS=no])
 AC_SUBST(RTEMS_USE_MACROS)dnl
+
+if test x"${RTEMS_USE_MACROS}" = x"yes";
+then
+  AC_DEFINE_UNQUOTED(USE_MACROS,1,[if using macros])
+else
+  AC_DEFINE_UNQUOTED(USE_INLINES,1,[if using inlines])
+fi
+
+
 ])
Index: aclocal/enable-rtemsbsp.m4
===================================================================
--- aclocal/enable-rtemsbsp.m4	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ aclocal/enable-rtemsbsp.m4	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -34,3 +34,19 @@
 AC_MSG_RESULT(${RTEMS_BSP})
 AC_SUBST(RTEMS_BSP)
+
+## RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
+## AC_SUBST(RTEMS_ROOT)
 ])
+
+AC_DEFUN(RTEMS_ENV_RTEMSCPU,
+[AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
+if test x"$multilib" = x"no"; then
+  RTEMS_ENV_RTEMSBSP
+else
+  rtems_cv_RTEMS_BSP="multilib"
+  RTEMS_BSP="$rtems_cv_RTEMS_BSP"
+  AC_SUBST(RTEMS_BSP)
+## RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c
+## AC_SUBST(RTEMS_ROOT)
+fi
+])
Index: c/src/configure.in
===================================================================
--- c/src/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -18,4 +18,5 @@
 AM_MAINTAINER_MODE
 
+RTEMS_ENABLE_MULTILIB
 RTEMS_ENV_RTEMSBSP
 RTEMS_CHECK_CPU
@@ -26,5 +27,8 @@
 ## Note: the order of the directories below is essential
 cfg_subdirs="make"
+## Exclude exec from building if multilibs are enabled
+if test x"$multilib" = x"no"; then
 cfg_subdirs="$cfg_subdirs exec"
+fi
 cfg_subdirs="$cfg_subdirs lib"
 cfg_subdirs="$cfg_subdirs libmisc"
Index: c/src/exec/configure.in
===================================================================
--- c/src/exec/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -12,4 +12,6 @@
 AM_INIT_AUTOMAKE(rtems-c-src-exec,$RTEMS_VERSION,no)
 AM_MAINTAINER_MODE
+
+RTEMS_ENABLE_MULTILIB
 RTEMS_ENABLE_MULTIPROCESSING
 RTEMS_ENABLE_POSIX
@@ -18,5 +20,5 @@
 RTEMS_ENABLE_GCC28
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/itron/configure.in
===================================================================
--- c/src/exec/itron/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/itron/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -17,5 +17,5 @@
 RTEMS_ENABLE_INLINES
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/posix/configure.in
===================================================================
--- c/src/exec/posix/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/posix/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -17,5 +17,5 @@
 RTEMS_ENABLE_INLINES
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/a29k/configure.in
===================================================================
--- c/src/exec/score/cpu/a29k/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/a29k/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/h8300/configure.in
===================================================================
--- c/src/exec/score/cpu/h8300/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/h8300/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/hppa1.1/configure.in
===================================================================
--- c/src/exec/score/cpu/hppa1.1/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/hppa1.1/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/i386/configure.in
===================================================================
--- c/src/exec/score/cpu/i386/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/i386/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/i960/configure.in
===================================================================
--- c/src/exec/score/cpu/i960/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/i960/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/m68k/configure.in
===================================================================
--- c/src/exec/score/cpu/m68k/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/m68k/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/mips/configure.in
===================================================================
--- c/src/exec/score/cpu/mips/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/mips/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/mips64orion/configure.in
===================================================================
--- c/src/exec/score/cpu/mips64orion/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/mips64orion/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/no_cpu/configure.in
===================================================================
--- c/src/exec/score/cpu/no_cpu/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/no_cpu/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/powerpc/configure.in
===================================================================
--- c/src/exec/score/cpu/powerpc/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/powerpc/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
@@ -27,6 +27,9 @@
 # Check if there is custom/*.cfg for this BSP
 RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
+
+# FIXME: This is in contradiction to multilibs
 RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
 
+# FIXME: This is in contradiction to multilibs
 AM_CONDITIONAL(PPC_NEW_EXCEPTION_PROCESSING,test "$RTEMS_CPU_MODEL" = "mpc750" -o "$RTEMS_CPU_MODEL" = "mpc604")
 
Index: c/src/exec/score/cpu/sh/configure.in
===================================================================
--- c/src/exec/score/cpu/sh/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/sh/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
@@ -27,5 +27,4 @@
 # Check if there is custom/*.cfg for this BSP
 RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
 
 # Explicitly list all Makefiles here
Index: c/src/exec/score/cpu/sparc/configure.in
===================================================================
--- c/src/exec/score/cpu/sparc/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/sparc/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -13,5 +13,5 @@
 AM_MAINTAINER_MODE
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/cpu/unix/configure.in
===================================================================
--- c/src/exec/score/cpu/unix/configure.in	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/cpu/unix/configure.in	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -15,5 +15,5 @@
 RTEMS_ENABLE_MULTIPROCESSING
 
-RTEMS_ENV_RTEMSBSP
+RTEMS_ENV_RTEMSCPU
 
 RTEMS_CHECK_CPU
Index: c/src/exec/score/include/rtems/score/Makefile.am
===================================================================
--- c/src/exec/score/include/rtems/score/Makefile.am	(revision 6c5aba209a5603cdad076d5acb4c0ea5d6922609)
+++ c/src/exec/score/include/rtems/score/Makefile.am	(revision 04e6f7bffb71106516097299e37f57bb28cf9844)
@@ -6,5 +6,4 @@
 
 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/leaf.cfg
 
 # We only build multiprocessing related files if HAS_MP was defined
