diff --git a/scripts/ax_init_standard_project.m4 b/scripts/ax_init_standard_project.m4 index bc0fb7b..bb19163 100644 --- a/scripts/ax_init_standard_project.m4 +++ b/scripts/ax_init_standard_project.m4 @@ -427,6 +427,33 @@ maintainer-clean-example-targets: EOF ]) +# use this in configure.ac to support C++ examples +AC_DEFUN([AX_USE_NODEJS], [ + AC_PATH_PROG(ANDROID, [android], [0], + [${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools]) + AC_PATH_PROG(CORDOVA, [cordova], [0], + [${PATH}${PATH_SEPARATOR}$(pwd)/node_modules/cordova/bin]) + if test ${CORDOVA} = 0; then + AC_MSG_WARN([cordova is missing, on ubuntu install cordova-cli from repository ppa:cordova-ubuntu/ppa]) + fi + if test ${ANDROID} = 0; then + AC_MSG_WARN([android sdk is missing, set variable ANDROID_HOME after installation]) + fi + AM_CONDITIONAL(HAVE_CORDOVA, [test ${CORDOVA} != 0 -a ${ANDROID} != 0]) + AX_SUBST(CORDOVA) + AC_CONFIG_FILES([nodejs/package.json]) + AC_CONFIG_FILES([nodejs/makefile]) + AC_CONFIG_FILES([cordova/makefile]) + AC_CONFIG_FILES([cordova/config.xml]) + AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-example-targets], [examples/makefile.in]) + test -f examples/makefile.in && cat >> examples/makefile.in <