summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-10 00:25:36 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-10 00:25:36 +0000
commit949b61905191188eb1dcf77260404f690c3e6cbe (patch)
tree696498c08f90fcdc9ba25f5c896eeaa62bfd982e /c
parentbfba54ed1c5be001e6aa104b83c2df05c424888c (diff)
downloadrtems-949b61905191188eb1dcf77260404f690c3e6cbe.tar.bz2
2001-10-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* acinclude.m4: New file. * configure.in: Use RTEMS_BSP_SUBDIR.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/a29k/acinclude.m411
-rw-r--r--c/src/lib/libbsp/a29k/configure.in3
-rw-r--r--c/src/lib/libbsp/arm/acinclude.m415
-rw-r--r--c/src/lib/libbsp/arm/configure.in3
-rw-r--r--c/src/lib/libbsp/c4x/acinclude.m411
-rw-r--r--c/src/lib/libbsp/c4x/configure.in3
-rw-r--r--c/src/lib/libbsp/h8300/acinclude.m411
-rw-r--r--c/src/lib/libbsp/h8300/configure.in3
-rw-r--r--c/src/lib/libbsp/hppa1.1/acinclude.m411
-rw-r--r--c/src/lib/libbsp/hppa1.1/configure.in3
-rw-r--r--c/src/lib/libbsp/i386/acinclude.m415
-rw-r--r--c/src/lib/libbsp/i386/configure.in3
-rw-r--r--c/src/lib/libbsp/i960/acinclude.m415
-rw-r--r--c/src/lib/libbsp/i960/configure.in3
-rw-r--r--c/src/lib/libbsp/m68k/acinclude.m439
-rw-r--r--c/src/lib/libbsp/m68k/configure.in3
-rw-r--r--c/src/lib/libbsp/mips/acinclude.m415
-rw-r--r--c/src/lib/libbsp/mips/configure.in3
-rw-r--r--c/src/lib/libbsp/mips64orion/acinclude.m411
-rw-r--r--c/src/lib/libbsp/mips64orion/configure.in3
-rw-r--r--c/src/lib/libbsp/no_cpu/acinclude.m411
-rw-r--r--c/src/lib/libbsp/no_cpu/configure.in3
-rw-r--r--c/src/lib/libbsp/powerpc/acinclude.m427
-rw-r--r--c/src/lib/libbsp/powerpc/configure.in3
-rw-r--r--c/src/lib/libbsp/sh/acinclude.m415
-rw-r--r--c/src/lib/libbsp/sh/configure.in3
-rw-r--r--c/src/lib/libbsp/sparc/acinclude.m413
-rw-r--r--c/src/lib/libbsp/sparc/configure.in3
-rw-r--r--c/src/lib/libbsp/unix/acinclude.m411
-rw-r--r--c/src/lib/libbsp/unix/configure.in3
30 files changed, 246 insertions, 30 deletions
diff --git a/c/src/lib/libbsp/a29k/acinclude.m4 b/c/src/lib/libbsp/a29k/acinclude.m4
new file mode 100644
index 0000000000..160a19cc7c
--- /dev/null
+++ b/c/src/lib/libbsp/a29k/acinclude.m4
@@ -0,0 +1,11 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ portsw )
+ AC_CONFIG_SUBDIRS([portsw]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/a29k/configure.in b/c/src/lib/libbsp/a29k/configure.in
index a5beaf60d7..2ede00513d 100644
--- a/c/src/lib/libbsp/a29k/configure.in
+++ b/c/src/lib/libbsp/a29k/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/arm/acinclude.m4 b/c/src/lib/libbsp/arm/acinclude.m4
new file mode 100644
index 0000000000..f42c2e9ec8
--- /dev/null
+++ b/c/src/lib/libbsp/arm/acinclude.m4
@@ -0,0 +1,15 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ arm_bare_bsp )
+ AC_CONFIG_SUBDIRS([arm_bare_bsp]);;
+ armulator )
+ AC_CONFIG_SUBDIRS([armulator]);;
+ vegaplus )
+ AC_CONFIG_SUBDIRS([vegaplus]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/arm/configure.in b/c/src/lib/libbsp/arm/configure.in
index a270baee99..d5e03bcb2f 100644
--- a/c/src/lib/libbsp/arm/configure.in
+++ b/c/src/lib/libbsp/arm/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/c4x/acinclude.m4 b/c/src/lib/libbsp/c4x/acinclude.m4
new file mode 100644
index 0000000000..8d355c8d3c
--- /dev/null
+++ b/c/src/lib/libbsp/c4x/acinclude.m4
@@ -0,0 +1,11 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ c4xsim )
+ AC_CONFIG_SUBDIRS([c4xsim]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/c4x/configure.in b/c/src/lib/libbsp/c4x/configure.in
index fd841ee832..2a58da07ba 100644
--- a/c/src/lib/libbsp/c4x/configure.in
+++ b/c/src/lib/libbsp/c4x/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/h8300/acinclude.m4 b/c/src/lib/libbsp/h8300/acinclude.m4
new file mode 100644
index 0000000000..47c3d3b949
--- /dev/null
+++ b/c/src/lib/libbsp/h8300/acinclude.m4
@@ -0,0 +1,11 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ h8sim )
+ AC_CONFIG_SUBDIRS([h8sim]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/h8300/configure.in b/c/src/lib/libbsp/h8300/configure.in
index 204035022d..2265d3e769 100644
--- a/c/src/lib/libbsp/h8300/configure.in
+++ b/c/src/lib/libbsp/h8300/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/hppa1.1/acinclude.m4 b/c/src/lib/libbsp/hppa1.1/acinclude.m4
new file mode 100644
index 0000000000..a0341e0e19
--- /dev/null
+++ b/c/src/lib/libbsp/hppa1.1/acinclude.m4
@@ -0,0 +1,11 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ simhppa )
+ AC_CONFIG_SUBDIRS([simhppa]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/hppa1.1/configure.in b/c/src/lib/libbsp/hppa1.1/configure.in
index 5853647c0b..535e918698 100644
--- a/c/src/lib/libbsp/hppa1.1/configure.in
+++ b/c/src/lib/libbsp/hppa1.1/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/i386/acinclude.m4 b/c/src/lib/libbsp/i386/acinclude.m4
new file mode 100644
index 0000000000..2ffdaae268
--- /dev/null
+++ b/c/src/lib/libbsp/i386/acinclude.m4
@@ -0,0 +1,15 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ i386ex )
+ AC_CONFIG_SUBDIRS([i386ex]);;
+ pc386 )
+ AC_CONFIG_SUBDIRS([pc386]);;
+ ts_386ex )
+ AC_CONFIG_SUBDIRS([ts_386ex]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/i386/configure.in b/c/src/lib/libbsp/i386/configure.in
index 5cffc5f181..1bf3d0a451 100644
--- a/c/src/lib/libbsp/i386/configure.in
+++ b/c/src/lib/libbsp/i386/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/i960/acinclude.m4 b/c/src/lib/libbsp/i960/acinclude.m4
new file mode 100644
index 0000000000..2ecb609494
--- /dev/null
+++ b/c/src/lib/libbsp/i960/acinclude.m4
@@ -0,0 +1,15 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ cvme961 )
+ AC_CONFIG_SUBDIRS([cvme961]);;
+ i960sim )
+ AC_CONFIG_SUBDIRS([i960sim]);;
+ rxgen960 )
+ AC_CONFIG_SUBDIRS([rxgen960]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/i960/configure.in b/c/src/lib/libbsp/i960/configure.in
index 6b20653fb3..5a92570898 100644
--- a/c/src/lib/libbsp/i960/configure.in
+++ b/c/src/lib/libbsp/i960/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/m68k/acinclude.m4 b/c/src/lib/libbsp/m68k/acinclude.m4
new file mode 100644
index 0000000000..5e25b0bac6
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/acinclude.m4
@@ -0,0 +1,39 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ dmv152 )
+ AC_CONFIG_SUBDIRS([dmv152]);;
+ efi332 )
+ AC_CONFIG_SUBDIRS([efi332]);;
+ efi68k )
+ AC_CONFIG_SUBDIRS([efi68k]);;
+ gen68302 )
+ AC_CONFIG_SUBDIRS([gen68302]);;
+ gen68340 )
+ AC_CONFIG_SUBDIRS([gen68340]);;
+ gen68360 )
+ AC_CONFIG_SUBDIRS([gen68360]);;
+ idp )
+ AC_CONFIG_SUBDIRS([idp]);;
+ mrm332 )
+ AC_CONFIG_SUBDIRS([mrm332]);;
+ mvme136 )
+ AC_CONFIG_SUBDIRS([mvme136]);;
+ mvme147 )
+ AC_CONFIG_SUBDIRS([mvme147]);;
+ mvme147s )
+ AC_CONFIG_SUBDIRS([mvme147s]);;
+ mvme162 )
+ AC_CONFIG_SUBDIRS([mvme162]);;
+ mvme167 )
+ AC_CONFIG_SUBDIRS([mvme167]);;
+ ods68302 )
+ AC_CONFIG_SUBDIRS([ods68302]);;
+ sim68000 )
+ AC_CONFIG_SUBDIRS([sim68000]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/m68k/configure.in b/c/src/lib/libbsp/m68k/configure.in
index 9f7909b448..5fa5d7d652 100644
--- a/c/src/lib/libbsp/m68k/configure.in
+++ b/c/src/lib/libbsp/m68k/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/mips/acinclude.m4 b/c/src/lib/libbsp/mips/acinclude.m4
new file mode 100644
index 0000000000..328bec8b7a
--- /dev/null
+++ b/c/src/lib/libbsp/mips/acinclude.m4
@@ -0,0 +1,15 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ genmongoosev )
+ AC_CONFIG_SUBDIRS([genmongoosev]);;
+ jmr3904 )
+ AC_CONFIG_SUBDIRS([jmr3904]);;
+ p4000 )
+ AC_CONFIG_SUBDIRS([p4000]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/mips/configure.in b/c/src/lib/libbsp/mips/configure.in
index 030372b30f..e9d95f1478 100644
--- a/c/src/lib/libbsp/mips/configure.in
+++ b/c/src/lib/libbsp/mips/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/mips64orion/acinclude.m4 b/c/src/lib/libbsp/mips64orion/acinclude.m4
new file mode 100644
index 0000000000..5dc942a9a6
--- /dev/null
+++ b/c/src/lib/libbsp/mips64orion/acinclude.m4
@@ -0,0 +1,11 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ p4000 )
+ AC_CONFIG_SUBDIRS([p4000]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/mips64orion/configure.in b/c/src/lib/libbsp/mips64orion/configure.in
index a82ebfd0c7..72e0973079 100644
--- a/c/src/lib/libbsp/mips64orion/configure.in
+++ b/c/src/lib/libbsp/mips64orion/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/no_cpu/acinclude.m4 b/c/src/lib/libbsp/no_cpu/acinclude.m4
new file mode 100644
index 0000000000..cb0977edbb
--- /dev/null
+++ b/c/src/lib/libbsp/no_cpu/acinclude.m4
@@ -0,0 +1,11 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ no_bsp )
+ AC_CONFIG_SUBDIRS([no_bsp]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/no_cpu/configure.in b/c/src/lib/libbsp/no_cpu/configure.in
index f0ea16a611..ba506b545a 100644
--- a/c/src/lib/libbsp/no_cpu/configure.in
+++ b/c/src/lib/libbsp/no_cpu/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/powerpc/acinclude.m4 b/c/src/lib/libbsp/powerpc/acinclude.m4
new file mode 100644
index 0000000000..e9b581a6b1
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/acinclude.m4
@@ -0,0 +1,27 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ dmv177 )
+ AC_CONFIG_SUBDIRS([dmv177]);;
+ eth_comm )
+ AC_CONFIG_SUBDIRS([eth_comm]);;
+ helas403 )
+ AC_CONFIG_SUBDIRS([helas403]);;
+ mbx8xx )
+ AC_CONFIG_SUBDIRS([mbx8xx]);;
+ motorola_powerpc )
+ AC_CONFIG_SUBDIRS([motorola_powerpc]);;
+ papyrus )
+ AC_CONFIG_SUBDIRS([papyrus]);;
+ ppcn_60x )
+ AC_CONFIG_SUBDIRS([ppcn_60x]);;
+ psim )
+ AC_CONFIG_SUBDIRS([psim]);;
+ score603e )
+ AC_CONFIG_SUBDIRS([score603e]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/powerpc/configure.in b/c/src/lib/libbsp/powerpc/configure.in
index ab077c3979..882ce3f3b6 100644
--- a/c/src/lib/libbsp/powerpc/configure.in
+++ b/c/src/lib/libbsp/powerpc/configure.in
@@ -17,8 +17,7 @@ RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
AM_CONDITIONAL(need_shared, test "$RTEMS_BSP_FAMILY" = "motorola_powerpc")
diff --git a/c/src/lib/libbsp/sh/acinclude.m4 b/c/src/lib/libbsp/sh/acinclude.m4
new file mode 100644
index 0000000000..f91ee96b92
--- /dev/null
+++ b/c/src/lib/libbsp/sh/acinclude.m4
@@ -0,0 +1,15 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ gensh1 )
+ AC_CONFIG_SUBDIRS([gensh1]);;
+ gensh2 )
+ AC_CONFIG_SUBDIRS([gensh2]);;
+ shsim )
+ AC_CONFIG_SUBDIRS([shsim]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/sh/configure.in b/c/src/lib/libbsp/sh/configure.in
index df5c41355e..d65eef6600 100644
--- a/c/src/lib/libbsp/sh/configure.in
+++ b/c/src/lib/libbsp/sh/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/sparc/acinclude.m4 b/c/src/lib/libbsp/sparc/acinclude.m4
new file mode 100644
index 0000000000..774085622c
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/acinclude.m4
@@ -0,0 +1,13 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ erc32 )
+ AC_CONFIG_SUBDIRS([erc32]);;
+ leon )
+ AC_CONFIG_SUBDIRS([leon]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/sparc/configure.in b/c/src/lib/libbsp/sparc/configure.in
index 7090edbb56..7235f24d82 100644
--- a/c/src/lib/libbsp/sparc/configure.in
+++ b/c/src/lib/libbsp/sparc/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(
diff --git a/c/src/lib/libbsp/unix/acinclude.m4 b/c/src/lib/libbsp/unix/acinclude.m4
new file mode 100644
index 0000000000..79e5bf28a6
--- /dev/null
+++ b/c/src/lib/libbsp/unix/acinclude.m4
@@ -0,0 +1,11 @@
+# RTEMS_CHECK_BSPDIR(RTEMS_BSP)
+AC_DEFUN([RTEMS_CHECK_BSPDIR],
+[
+ RTEMS_BSP_ALIAS(ifelse([$1],,[${RTEMS_BSP}],[$1]),bspdir)
+ case "$bspdir" in
+ posix )
+ AC_CONFIG_SUBDIRS([posix]);;
+ *)
+ AC_MSG_ERROR([Invalid BSP]);;
+ esac
+])
diff --git a/c/src/lib/libbsp/unix/configure.in b/c/src/lib/libbsp/unix/configure.in
index fbaeb71d48..b764dd1c89 100644
--- a/c/src/lib/libbsp/unix/configure.in
+++ b/c/src/lib/libbsp/unix/configure.in
@@ -16,8 +16,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_PROJECT_ROOT
-RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
-AC_CONFIG_SUBDIRS($bspdir)
+RTEMS_CHECK_BSPDIR([$RTEMS_BSP])
# Explicitly list all Makefiles here
AC_OUTPUT(