Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2017-08-28 12:58:38 -0400
committerMike Gerwitz <gerwitzm@lovullo.com>2017-08-29 14:56:13 -0400
commitc92e9790001a1a8a6d4964bbd13ef2557e72cb79 (patch)
tree8e428375209ca7cb136d4cf540674aa3dfb256bb /configure.ac
parent985819c31ba8151be9f572a955b8e6e31432911e (diff)
downloadliza-c92e9790001a1a8a6d4964bbd13ef2557e72cb79.tar.gz
liza-c92e9790001a1a8a6d4964bbd13ef2557e72cb79.tar.bz2
liza-c92e9790001a1a8a6d4964bbd13ef2557e72cb79.zip
Add bin/server to invoke server using configure'd node
* .gitignore (bin/server): Ignore generated file. * bin/server.in: Add script. * configure.ac: (NODE): Correct description (capitalize `Node'). (NODE_FLAGS): Add arg var. (NODE_DESTRUCTURE): Use determined node path for test. (AUTOGENERATED): Add substitution. (AC_CONFIG_FILES): Add bin/server. Make it executable.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index cc58591..40164e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,8 @@ AC_SUBST(MINOR, m4_argn(2, ver_split))
AC_SUBST(REV, m4_argn(3, ver_split))
AC_SUBST(SUFFIX, m4_argn(4, ver_split))
-AC_ARG_VAR([NODE], [The node.js interpreter])
+AC_ARG_VAR([NODE], [The Node.js interpreter])
+AC_ARG_VAR([NODE_FLAGS], [Arguments to Node.js for Liza Server (bin/server)])
AC_CHECK_PROGS(NODE, [node nodejs])
test -n "$NODE" || AC_MSG_ERROR([missing Node.js])
@@ -43,12 +44,15 @@ AC_CHECK_PROGS(TWOPI, [twopi])
AM_CONDITIONAL(HAS_TWOPI, [test "$TWOPI"])
# only needed for older versions of Node
-AC_MSG_CHECKING([node --harmony_destructuring])
-AS_IF([node --harmony_destructuring >/dev/null 2>/dev/null],
+AC_MSG_CHECKING([$NODE --harmony_destructuring])
+AS_IF(["$NODE" --harmony_destructuring >/dev/null 2>/dev/null],
[AC_MSG_RESULT(available)
AC_SUBST([NODE_DESTRUCTURE], [--harmony_destructuring])],
[AC_MSG_RESULT(no)])
+# include above check(s) in NODE_FLAGS
+NODE_FLAGS="$NODE_FLAGS $NODE_DESTRUCTURE"
+
set_devnotes='@set DEVNOTES'
AC_ARG_ENABLE(
[devnotes],
@@ -68,8 +72,13 @@ AC_ARG_WITH(
AC_SUBST([SET_SRCURI], [$set_srcuri])
+AC_SUBST([AUTOGENERATED],
+ ["THIS FILE IS AUTOGENERATED! DO NOT MODIFY! See *.in."])
+
# generate files from their *.in counterparts
AC_CONFIG_FILES([Makefile package.json
doc/Makefile doc/config.texi
- src/version.js])
+ src/version.js
+ bin/server],
+ [chmod +x bin/server])
AC_OUTPUT