build: prepend --with-jim-ext=nvp to jimtcl configure
authorSpencer Oliver <ntfreak@users.sourceforge.net>
Fri, 19 Nov 2010 09:07:43 +0000 (09:07 +0000)
committerSpencer Oliver <ntfreak@users.sourceforge.net>
Fri, 19 Nov 2010 09:07:43 +0000 (09:07 +0000)
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>
config_subdir.m4 [new file with mode: 0644]
configure.in
jimtcl

diff --git a/config_subdir.m4 b/config_subdir.m4
new file mode 100644 (file)
index 0000000..f32bc89
--- /dev/null
@@ -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"
+])
+])
index c5e81a2812cb4619033224c7bbd12bbb98279c0f..b030d9f8edad262379e4094d124f2b902abc7d7e 100644 (file)
@@ -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
index 9c8bcfe4e6f8ec12552edae7b2afa0a9a21d8861..f5e5c268eb800278a022c2f894ab2a8c277f0a4f 160000 (submodule)
--- a/jimtcl
+++ b/jimtcl
@@ -1 +1 @@
-Subproject commit 9c8bcfe4e6f8ec12552edae7b2afa0a9a21d8861
+Subproject commit f5e5c268eb800278a022c2f894ab2a8c277f0a4f

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)