aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-01-12 22:46:23 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-01-12 22:46:23 -0200
commite3d4c7fb1ec936fe97d90cff25d7671199d0eef7 (patch)
tree2aa3e81c2f7a68f852b67246c4f57321d14a4b93
parentecore: Fixed libuv integration with configure.ac conditionals (diff)
downloadefl-e3d4c7fb1ec936fe97d90cff25d7671199d0eef7.tar.gz
Fixed node/node.h include hardcoded
-rw-r--r--configure.ac20
-rw-r--r--src/bindings/eolian_js/main.cc2
-rw-r--r--src/tests/eina_js/eina_js_suite.cc2
3 files changed, 21 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index fa72868f4e..6bd44c588f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1029,12 +1029,30 @@ case "$want_js" in
[
AC_DEFINE_UNQUOTED([V8_INCLUDE_HEADER], [node/v8.h], [Include header for libv8])
AC_DEFINE_UNQUOTED([UV_INCLUDE_HEADER], [node/uv.h], [Include header for libuv])
+ AC_DEFINE_UNQUOTED([NODE_INCLUDE_HEADER], [node/node.h], [Include header for nodejs])
V8_INCLUDE_HEADER=node/v8.h
UV_INCLUDE_HEADER=node/uv.h
+ NODE_INCLUDE_HEADER=node/node.h
AC_SUBST([V8_INCLUDE_HEADER])
AC_SUBST([UV_INCLUDE_HEADER])
+ AC_SUBST([NODE_INCLUDE_HEADER])
],
- [AC_MSG_ERROR([Could not find include headers from nodejs.])])
+ [
+ AC_CHECK_HEADER([nodejs/deps/v8/v8.h],
+ [
+ AC_DEFINE_UNQUOTED([V8_INCLUDE_HEADER], [nodejs/deps/v8/v8.h], [Include header for libv8])
+ AC_DEFINE_UNQUOTED([UV_INCLUDE_HEADER], [nodejs/deps/uv/uv.h], [Include header for libuv])
+ AC_DEFINE_UNQUOTED([NODE_INCLUDE_HEADER], [nodejs/src/node.h], [Include header for nodejs])
+ V8_INCLUDE_HEADER=node/deps/v8/v8.h
+ UV_INCLUDE_HEADER=node/deps/uv/uv.h
+ NODE_INCLUDE_HEADER=nodejs/src/node.h
+ AC_SUBST([V8_INCLUDE_HEADER])
+ AC_SUBST([UV_INCLUDE_HEADER])
+ AC_SUBST([NODE_INCLUDE_HEADER])
+ ],
+ [AC_MSG_ERROR([Could not find include headers from nodejs.])]
+ )
+ ])
;;
libv8)
EFL_DEPEND_PKG([EINA_JS], [V8], [v8 >= 3.25.28])
diff --git a/src/bindings/eolian_js/main.cc b/src/bindings/eolian_js/main.cc
index 3f89e24cc4..85d104358f 100644
--- a/src/bindings/eolian_js/main.cc
+++ b/src/bindings/eolian_js/main.cc
@@ -6,7 +6,7 @@
#ifdef HAVE_NODEJS
#include <Eina.hh>
-#include <node/node.h>
+#include EINA_STRINGIZE(NODE_INCLUDE_HEADER)
#include EINA_STRINGIZE(UV_INCLUDE_HEADER)
#include <iostream>
diff --git a/src/tests/eina_js/eina_js_suite.cc b/src/tests/eina_js/eina_js_suite.cc
index 5cf470a293..fff5c7cf42 100644
--- a/src/tests/eina_js/eina_js_suite.cc
+++ b/src/tests/eina_js/eina_js_suite.cc
@@ -188,7 +188,7 @@ int main(int, char*[])
}
#else
-#include <node/node.h>
+#include EINA_STRINGIZE(NODE_INCLUDE_HEADER)
namespace {