Only build extra dependencies if necessary
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 23 Jul 2013 10:26:11 +0000 (12:26 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Tue, 23 Jul 2013 10:26:11 +0000 (12:26 +0200)
    When no extra gpgex host is set there should be no dependencies
    on those packages.

    * m4/gpg4win.m4 (GPG4WIN_SPKGEX): Check for GPGEX_ADD_HOST setting.

m4/gpg4win.m4

index eeb13c4..91b2efe 100644 (file)
@@ -337,19 +337,22 @@ AC_DEFUN([GPG4WIN_SPKGEX],
 [
   GPG4WIN_SPKG([$1],[$2],[$3],[$4])
 
-  # gpg4win_pkg_PKGNAME_deps=DEPS
-  gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_ex_deps="$2"
-  AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_ex_deps)
-
-  gpg4win_ex_pkgs="$gpg4win_ex_pkgs $1"
-
-  GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__])_EX)
-  # Record dependencies.  Also enter every package as node.
-  _gpg4win_ex_deps="$_gpg4win_ex_deps $1 $1"
-  AS_IF([test ! -z "$2"],
-        for _gpg4win_i in $2; do
-          _gpg4win_ex_deps="$_gpg4win_ex_deps $_gpg4win_i $1"
-        done)
+  AS_IF([test ! -z "$GPGEX_ADD_HOST"],
+
+    # gpg4win_pkg_PKGNAME_deps=DEPS
+    gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_ex_deps="$2"
+    AC_SUBST(gpg4win_pkg_[]m4_translit([$1],[A-Z+-],[a-z__])[]_ex_deps)
+
+    gpg4win_ex_pkgs="$gpg4win_ex_pkgs $1"
+
+    GPG4WIN_DEFINE(HAVE_PKG_[]m4_translit([$1],[a-z+-],[A-Z__])_EX)
+    # Record dependencies.  Also enter every package as node.
+    _gpg4win_ex_deps="$_gpg4win_ex_deps $1 $1"
+    AS_IF([test ! -z "$2"],
+          for _gpg4win_i in $2; do
+            _gpg4win_ex_deps="$_gpg4win_ex_deps $_gpg4win_i $1"
+          done)
+  )
 ])
 
 # GPG4WIN_BPKG_GNUWIN32([PKG],[DEPENDS],[IF-FOUND],[IF-NOT-FOUND])