[Libreoffice-commits] online.git: configure.ac

Katarina Behrens Katarina.Behrens at cib.de
Wed Apr 19 14:20:16 UTC 2017


 configure.ac |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 6416fe9d1bae43b47426dc0e6ca714e440581249
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Tue Apr 18 14:50:02 2017 +0200

    Check if npm is installed and detect buggy version
    
    shrinkpack won't work with npm versions between <3.9.0, 3.10.3>,
    for details, see https://github.com/JamieMason/shrinkpack/issues/45
    
    Change-Id: I65e1413f2ba24cc81736c12924afb20ca50004be
    Reviewed-on: https://gerrit.libreoffice.org/36640
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/configure.ac b/configure.ac
index 1a9e16a8..ad4b6757 100644
--- a/configure.ac
+++ b/configure.ac
@@ -293,6 +293,16 @@ int main(int argc, char **argv)
                [AC_MSG_RESULT([Yes])
                 LIBS="$LIBS -lpcre"])
 
+AC_PATH_PROG(NPM, npm, no)
+if test "$NPM" = "no"; then
+    AC_MSG_ERROR([npm required to build loleaflet, but not installed])
+else
+    NPM_VER=`npm -v | awk -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
+    if test "$NPM_VER" -ge 30900 -a "$NPM_VER" -lt 31004; then
+        AC_MSG_ERROR([This npm version is buggy, either upgrade to >= 3.10.4 or downgrade to < 3.9.0])
+    fi
+fi
+
 test "$prefix" = NONE && prefix=$ac_default_prefix
 LOOLWSD_CACHEDIR=${localstatedir}/cache/${PACKAGE}
 while :; do


More information about the Libreoffice-commits mailing list