From d27703ea4f0eed950cddf0157dc78bcb5d8d1c65 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 19 Jun 2018 16:40:40 +0200 Subject: Prepare build system for gpgme-js and dist it * configure.ac: Add js as language. * lang/Makefile.am: Add js as dist language. * lang/js/BrowserTestExtension/Makefile.am, lang/js/DemoExtension/Makefile.am, lang/js/Makefile.am, lang/js/src/Makefile.am: Populate EXTRA_DIST variables. -- There is no actual build done yet as there seems to be no way to build it with debian stable tools. This needs clarification. --- configure.ac | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a1da1e3e..69d7132f 100644 --- a/configure.ac +++ b/configure.ac @@ -187,7 +187,7 @@ have_w64_system=no have_macos_system=no build_w32_glib=no build_w32_qt=no -available_languages="cl cpp python python2 python3 qt" +available_languages="cl cpp python python2 python3 qt js" default_languages="cl cpp python qt" case "${host}" in x86_64-*mingw32*) @@ -479,6 +479,28 @@ fi AC_SUBST(ENABLED_LANGUAGES, $enabled_languages) +# The javascript bindings +LIST_MEMBER("js", $enabled_languages) +if test "$found" = "1"; then + AC_CHECK_PROGS([NPX], [npx]) + if test -z "$NPX"; then + if test "$explicit_languages" = "1"; then + AC_MSG_ERROR([[ +*** +*** Node.js (npx) is required for the JavaScript binding. +***]]) + else + AC_MSG_WARN([ +*** +*** Node.js (npx) not found - JavaScript binding will not be built. +***]) + enabled_languages=$(echo $enabled_languages | sed 's/js//') + fi + fi +fi +AM_CONDITIONAL([BUILD_JS_BINDINGS], + [test -n "$NPX"]) + # # Provide information about the build. # @@ -899,6 +921,9 @@ AC_CONFIG_FILES(lang/qt/tests/Makefile) AC_CONFIG_FILES(lang/qt/src/qgpgme_version.h) AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd]) AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([lang/qt/doc/Doxyfile])]) +AC_CONFIG_FILES([lang/js/Makefile lang/js/src/Makefile + lang/js/BrowserTestExtension/Makefile + lang/js/DemoExtension/Makefile]) AC_CONFIG_FILES(lang/qt/doc/Makefile) AC_CONFIG_FILES([lang/python/Makefile lang/python/version.py -- cgit v1.2.3