summaryrefslogtreecommitdiffstats
path: root/aclocal/bsp-arg-enable.m4
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-01-29 15:27:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-01-29 15:27:25 +0000
commit560aae24e2aedf480676e5daf9c4c3e0eb62a120 (patch)
treee8c409e0f835f0ac3d317fb1597daba70e78183e /aclocal/bsp-arg-enable.m4
parent2001-01-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-560aae24e2aedf480676e5daf9c4c3e0eb62a120.tar.bz2
2001-01-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/enable-rtemsbsp.m4: Split out RTEMS_ENV_RTEMSBSP, RTEMS_ENV_RTEMSCPU. * aclocal/env-rtemsbsp.m4: New file for RTEMS_ENV_RTEMSBSP, add special treatment for GCC_SPECS. * aclocal/env-rtemscpu.m4: New file for RTEMS_ENV_RTEMSCPU, add special treatment for GCC_SPECS. * aclocal/bsp-enable-arg.m4: New file, introduce RTEMS_BSP_ARG_ENABLE. * aclocal/prog-cc.m4: Add AC_PROG_CPP, use build_os in GCCSED hack. * automake/compile.am: New treatment of CPP, GCCSPECS, use `..` instead of $(shell ..) for LIBC_LIB*.
Diffstat (limited to 'aclocal/bsp-arg-enable.m4')
-rw-r--r--aclocal/bsp-arg-enable.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/aclocal/bsp-arg-enable.m4 b/aclocal/bsp-arg-enable.m4
new file mode 100644
index 0000000000..53ea4845de
--- /dev/null
+++ b/aclocal/bsp-arg-enable.m4
@@ -0,0 +1,18 @@
+dnl $Id$
+dnl
+dnl RTEMS_BSP_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
+dnl
+dnl Accept --enable-FEATURE=<RTEMS_BSP>:<value> and --enable-FEATURE=<value>
+dnl in BSP-configure scripts.
+dnl
+dnl Configure scripts will receive <value> if <RTEMS_BSP> matches the actual
+dnl value of the shell variable RTEMS_BSP (cf. RTEMS_ENV_RTEMSBSP), and
+dnl <RTEMS_BSP>:<value>.
+dnl
+AC_DEFUN(RTEMS_BSP_ARG_ENABLE,
+[AC_REQUIRE([RTEMS_ENV_RTEMSBSP])
+AC_ARG_ENABLE([$1],[$2],
+[enableval=`echo "[$enable_]patsubst([$1], -, _)" | sed -e "s%^${RTEMS_BSP}:%%"`
+ eval "[enable_]patsubst([$1], -, _)='$enableval'"
+$3],[$4])
+])