diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-11-19 09:07:43 +0000 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-11-19 09:07:43 +0000 |
commit | 8c0c259ed64a7a182c82edfca9809cfe33cb96ce (patch) | |
tree | c1fbcfd009c2f118621fd66ff9ff4b35175e4673 | |
parent | d80fca527a6618595a118381a2cd2a569f85889f (diff) | |
download | openocd_libswd-8c0c259ed64a7a182c82edfca9809cfe33cb96ce.tar.gz openocd_libswd-8c0c259ed64a7a182c82edfca9809cfe33cb96ce.tar.bz2 openocd_libswd-8c0c259ed64a7a182c82edfca9809cfe33cb96ce.tar.xz openocd_libswd-8c0c259ed64a7a182c82edfca9809cfe33cb96ce.zip |
build: prepend --with-jim-ext=nvp to jimtcl configure
This allows us to add options to jimtcl configure.
The default autoconf AC_CONFIG_SUBDIRS does not currently support this.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
-rw-r--r-- | config_subdir.m4 | 27 | ||||
-rw-r--r-- | configure.in | 4 | ||||
m--------- | jimtcl | 0 |
3 files changed, 30 insertions, 1 deletions
diff --git a/config_subdir.m4 b/config_subdir.m4 new file mode 100644 index 00000000..f32bc89e --- /dev/null +++ b/config_subdir.m4 @@ -0,0 +1,27 @@ +dnl +dnl If needed, define the m4_ifblank and m4_ifnblank macros from autoconf 2.64 +dnl This allows us to run with earlier Autoconfs as well. +ifdef([m4_ifblank],[],[ +m4_define([m4_ifblank], +[m4_if(m4_translit([[$1]], [ ][ ][ +]), [], [$2], [$3])])]) +dnl +ifdef([m4_ifnblank],[],[ +m4_define([m4_ifnblank], +[m4_if(m4_translit([[$1]], [ ][ ][ +]), [], [$3], [$2])])]) +dnl + +dnl AC_CONFIG_SUBDIRS does not allow configure options to be passed +dnl to subdirs, this function allows that by creating a configure.gnu +dnl script that prepends configure options and then calls the real +dnl configure script +AC_DEFUN([AX_CONFIG_SUBDIR_OPTION], +[ +AC_CONFIG_SUBDIRS([$1]) + +m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu], +[printf "#!/bin/sh +"\$"SHELL "../$srcdir/$1/configure" $2 "\$"@" > "$srcdir/$1/configure.gnu" +]) +]) diff --git a/configure.in b/configure.in index c5e81a28..b030d9f8 100644 --- a/configure.in +++ b/configure.in @@ -4,6 +4,8 @@ AC_INIT([openocd], [0.5.0-dev], AC_CONFIG_SRCDIR([src/openocd.c]) AC_CONFIG_AUX_DIR([.]) +m4_include(config_subdir.m4)dnl + AM_INIT_AUTOMAKE([-Wall -Wno-portability dist-bzip2 dist-zip]) AM_MAINTAINER_MODE @@ -763,7 +765,7 @@ fi if test "$use_internal_jimtcl" = yes; then if test -f "$srcdir/jimtcl/configure.ac"; then - AC_CONFIG_SUBDIRS([jimtcl]) + AX_CONFIG_SUBDIR_OPTION(jimtcl, --with-jim-ext=nvp) else AC_MSG_ERROR([jimtcl not found, run git submodule init and git submodule update.]) fi diff --git a/jimtcl b/jimtcl -Subproject 9c8bcfe4e6f8ec12552edae7b2afa0a9a21d886 +Subproject f5e5c268eb800278a022c2f894ab2a8c277f0a4 |