stlink: add none 32bit memory read/write functions
[openocd/andreasf.git] / config_subdir.m4
blob4102dfd327efa6669fe12538b53e8a3cfafee166
1 dnl
2 dnl If needed, define the m4_ifblank and m4_ifnblank macros from autoconf 2.64
3 dnl This allows us to run with earlier Autoconfs as well.
4 ifdef([m4_ifblank],[],[
5 m4_define([m4_ifblank],
6 [m4_if(m4_translit([[$1]],  [ ][        ][
7 ]), [], [$2], [$3])])])
8 dnl
9 ifdef([m4_ifnblank],[],[
10 m4_define([m4_ifnblank],
11 [m4_if(m4_translit([[$1]],  [ ][        ][
12 ]), [], [$3], [$2])])])
13 dnl
15 dnl AC_CONFIG_SUBDIRS does not allow configure options to be passed
16 dnl to subdirs, this function allows that by creating a configure.gnu
17 dnl script that prepends configure options and then calls the real
18 dnl configure script
19 AC_DEFUN([AX_CONFIG_SUBDIR_OPTION],
21 AC_CONFIG_SUBDIRS([$1])
23 m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu],
24 [printf "#!/bin/sh
25 "\$"SHELL "../$srcdir/$1/configure" $2 \""\$"@"\" > "$srcdir/$1/configure.gnu"