summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2014-12-09 16:41:16 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-12-23 22:23:46 -0200
commit9dbba7412358ac31af2f8e962d30438681b0f097 (patch)
tree91d4a92a3d9e89c8fffad6766b6c8e1b0e85b5f2 /configure.ac
parentb2ad8058c7e56dc2f0942b5291a630ea03a3202d (diff)
efl-js: JavaScript Eolian binding
To configure elementary sources with bindings to use in nodejs add ––with-js=nodejs in configure flags in EFL compilation to generate node files, then compile elementary normally: path/to/efl$ configure --with-js=nodejs path/to/efl$ make path/to/efl$ make install path/to/elm$ configure path/to/efl$ make path/to/efl$ make install To use, you have to require elm: elm = require('elm') The bindings is divided in two parts: generated and manually written. The generation uses the Eolian library for parsing Eo files and generate C++ code that is compiled against V8 interpreter library to create a elm.node file that can be required in a node.js instance. @feature
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac80
1 files changed, 73 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 1271665b8..60dd3dfc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,12 @@ AC_ARG_ENABLE([cxx-bindings],
36 [want_cxx11="${enableval}"], 36 [want_cxx11="${enableval}"],
37 [want_cxx11="yes"]) 37 [want_cxx11="yes"])
38 38
39AC_ARG_ENABLE([js-bindings],
40 [AS_HELP_STRING([--enable-js-bindings],
41 [enable JS bindings. @<:@default=disabled@:>@])],
42 [want_js="${enableval}"],
43 [want_js="yes"])
44
39# Tests 45# Tests
40 46
41AC_ARG_WITH([tests], 47AC_ARG_WITH([tests],
@@ -196,6 +202,7 @@ EFL_WITH_BIN([eldbus], [eldbus_codegen], [eldbus-codegen])
196# Force the helper to try external eolian generators 202# Force the helper to try external eolian generators
197AM_CONDITIONAL([HAVE_EOLIAN_GEN], [true]) 203AM_CONDITIONAL([HAVE_EOLIAN_GEN], [true])
198AM_CONDITIONAL([HAVE_EOLIAN_CXX], [true]) 204AM_CONDITIONAL([HAVE_EOLIAN_CXX], [true])
205AM_CONDITIONAL([HAVE_EOLIAN_JS], [true])
199 206
200EFL_ENABLE_BIN([elementary-test]) 207EFL_ENABLE_BIN([elementary-test])
201EFL_ENABLE_BIN([elementary-codegen]) 208EFL_ENABLE_BIN([elementary-codegen])
@@ -256,13 +263,6 @@ ELM_CHECK_OPTION([eweather], [0.2.0])
256ELM_CHECK_OPTION([emap], [0.1.0]) 263ELM_CHECK_OPTION([emap], [0.1.0])
257ELM_CHECK_OPTION([eweb]) 264ELM_CHECK_OPTION([eweb])
258 265
259PKG_CHECK_MODULES([ELEMENTARY], [${requirement_elm_pc}])
260PKG_CHECK_MODULES([ELEMENTARY_PC], [${requirement_elm_pc_only}])
261
262EFL_ENABLE_EO_API_SUPPORT
263EFL_ENABLE_BETA_API_SUPPORT
264
265
266if test "x${HAVE_CXX11}" = "x1" -a "x${want_cxx11}" = "xyes"; then 266if test "x${HAVE_CXX11}" = "x1" -a "x${want_cxx11}" = "xyes"; then
267 PKG_CHECK_MODULES([ELEMENTARY_CXX], 267 PKG_CHECK_MODULES([ELEMENTARY_CXX],
268 [ 268 [
@@ -294,6 +294,67 @@ else
294fi 294fi
295AM_CONDITIONAL([HAVE_CXX11], [test "x${have_cxx11}" = "xyes"]) 295AM_CONDITIONAL([HAVE_CXX11], [test "x${have_cxx11}" = "xyes"])
296 296
297if test "x${want_js}" = "xyes"; then
298 PKG_CHECK_MODULES([ELEMENTARY_JS],
299 [
300 eolian-js >= efl_version
301 eo-js >= efl_version
302 efl-js >= efl_version
303 eina-js >= efl_version
304 efl-cxx >= efl_version
305 eo-cxx >= efl_version
306 eina-cxx >= efl_version
307 ],
308 [
309 requirement_elm_js_pc="${requirement_elm_js_pc} \
310 eolian-js >= efl_version \
311 eo-js >= efl_version \
312 efl-js >= efl_version \
313 eina-js >= efl_version \
314 efl-cxx >= efl_version \
315 eina-cxx >= efl_version \
316 eo-cxx >= efl_version \
317 "
318 have_js="yes"
319 dep_js=`$PKG_CONFIG --variable=want_js efl-js`
320 ],
321 [have_js="no"
322 dep_js="none"
323 ]
324 )
325else
326 have_js="no"
327 dep_js="none"
328fi
329
330PKG_CHECK_MODULES([ELEMENTARY], [${requirement_elm_pc}])
331if test "x${have_js}" = "xyes"; then
332 PKG_CHECK_MODULES([ELEMENTARY_JS], [${requirement_elm_js_pc}])
333fi
334PKG_CHECK_MODULES([ELEMENTARY_PC], [${requirement_elm_pc_only}])
335
336EFL_ENABLE_EO_API_SUPPORT
337EFL_ENABLE_BETA_API_SUPPORT
338
339AM_CONDITIONAL([HAVE_JS], [test "x${have_js}" = "xyes"])
340
341AM_CONDITIONAL([HAVE_NODEJS], [test "x${dep_js}" = "xnodejs"])
342AC_DEFINE_IF([HAVE_NODEJS], [test "x${dep_js}" = "xnodejs"],
343 [1], [Using NodeJS])
344AC_SUBST([want_js])
345AC_SUBST([HAVE_NODEJS])
346
347AM_CONDITIONAL([HAVE_JS], [test "x${dep_js}" = "xnodejs" -o "x${dep_js}" = "xlibv8" -o "x${dep_js}" = "xlibuv"])
348AC_DEFINE_IF([HAVE_JS], [test "x${dep_js}" = "xnodejs" -o "x${dep_js}" = "xlibv8" -o "x${dep_js}" = "xlibuv"],
349 [1], [Compiling bindings for JavaScript])
350AC_SUBST([HAVE_JS])
351
352AM_CONDITIONAL([HAVE_LIBUV], [test "x${dep_js}" = "xnodejs" -o "x${dep_js}" = "xlibuv"])
353AC_DEFINE_IF([HAVE_LIBUV], [test "x${dep_js}" = "xnodejs" -o "x${dep_js}" = "xlibuv"],
354 [1], [Compiling libuv event loop integration])
355AC_SUBST([HAVE_LIBUV])
356
357EFL_WITH_BIN([eolian-js], [eolian-js], [eolian_js])
297 358
298MODULE_EDJE=`${PKG_CONFIG} --variable=module_arch edje` 359MODULE_EDJE=`${PKG_CONFIG} --variable=module_arch edje`
299AC_SUBST([MODULE_EDJE]) 360AC_SUBST([MODULE_EDJE])
@@ -359,6 +420,7 @@ ELEMENTARY_LIBS="${ELEMENTARY_LIBS} ${requirement_elm_libs}"
359ELEMENTARY_PC_LIBS="${ELEMENTARY_PC_LIBS} ${requirement_elm_libs}" 420ELEMENTARY_PC_LIBS="${ELEMENTARY_PC_LIBS} ${requirement_elm_libs}"
360 421
361AC_SUBST([requirement_elm_pc]) 422AC_SUBST([requirement_elm_pc])
423AC_SUBST([requirement_elm_js_pc])
362 424
363# check unit testing library 425# check unit testing library
364if test "${want_tests}" = "yes"; then 426if test "${want_tests}" = "yes"; then
@@ -564,6 +626,9 @@ echo " elm_prefs_cc.............: ${elm_prefs_cc}"
564echo " eolian_gen...............: ${eolian_gen}" 626echo " eolian_gen...............: ${eolian_gen}"
565echo " eolian_cxx...............: ${eolian_cxx}" 627echo " eolian_cxx...............: ${eolian_cxx}"
566echo " eldbus_codegen...........: ${eldbus_codegen}" 628echo " eldbus_codegen...........: ${eldbus_codegen}"
629if test "x${have_js}" = "xyes"; then
630echo " eolian_js...............: ${eolian_js}"
631fi
567echo 632echo
568echo " Build elementary_test....: ${have_elementary_test}" 633echo " Build elementary_test....: ${have_elementary_test}"
569echo " Build elementary_codegen.: ${have_elementary_codegen}" 634echo " Build elementary_codegen.: ${have_elementary_codegen}"
@@ -573,6 +638,7 @@ echo " Examples installed.......: ${enable_install_examples}"
573echo " Build elementary_config..: ${have_elementary_config}" 638echo " Build elementary_config..: ${have_elementary_config}"
574echo " Enable debug.............: ${want_elementary_debug}" 639echo " Enable debug.............: ${want_elementary_debug}"
575echo " Enable C++...............: ${have_cxx11}" 640echo " Enable C++...............: ${have_cxx11}"
641echo " Enable JavaScript........: ${have_js}"
576echo 642echo
577echo "Compilation................: make (or gmake)" 643echo "Compilation................: make (or gmake)"
578echo " CPPFLAGS.................: $CPPFLAGS" 644echo " CPPFLAGS.................: $CPPFLAGS"