Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix static building of libxhp

Description:
libxhp didn't have the correct variable set in the include file.

Also didn't include the path wherer to link libxhp from when it was static.
  • Loading branch information...
commit 6bf2a884e6f54f663327a0b07d3ce6d1f59fc2ce 1 parent dafff2c
@scottmac scottmac authored
Showing with 9 additions and 8 deletions.
  1. +5 −5 Makefile.frag
  2. +3 −2 config.m4
  3. +1 −1  ext.hpp
View
10 Makefile.frag
@@ -1,7 +1,7 @@
-XHP_SHARED_DEPENDENCIES = xhp/libxhp.a
-XHP_SHARED_LIBADD := xhp/libxhp.a ${XHP_SHARED_LIBADD}
-$(srcdir)/ext.cpp: xhp/libxhp.a
-xhp/libxhp.a: FORCE
- $(MAKE) $(MFLAGS) -C xhp libxhp.a
+XHP_SHARED_DEPENDENCIES = $(srcdir)/xhp/libxhp.a
+XHP_SHARED_LIBADD := ${XHP_SHARED_LIBADD}
+$(srcdir)/ext.cpp: $(srcdir)/xhp/libxhp.a
+$(srcdir)/xhp/libxhp.a: FORCE
+ $(MAKE) $(MFLAGS) -C $(srcdir)/xhp libxhp.a
FORCE:
View
5 config.m4
@@ -3,9 +3,10 @@ PHP_ARG_ENABLE(xhp, xhp,
PHP_REQUIRE_CXX()
if test "$PHP_XHP" = "yes"; then
- XHP_SHARED_DEPENDENCIES="libxhp.a"
+# XHP_SHARED_DEPENDENCIES="libxhp.a"
PHP_ADD_LIBRARY(stdc++,, XHP_SHARED_LIBADD)
PHP_SUBST(XHP_SHARED_LIBADD)
PHP_NEW_EXTENSION(xhp, ext.cpp, $ext_shared)
- PHP_ADD_MAKEFILE_FRAGMENT(Makefile.frag)
+ PHP_ADD_LIBRARY_WITH_PATH(xhp, $ext_srcdir/xhp/, XHP_SHARED_LIBADD)
+ PHP_ADD_MAKEFILE_FRAGMENT
fi
View
2  ext.hpp
@@ -25,4 +25,4 @@
#define PHP_XHP_EXTNAME "xhp"
extern zend_module_entry xhp_module_entry;
-#define phpext_xhp &xhp_module_entry
+#define phpext_xhp_ptr &xhp_module_entry
Please sign in to comment.
Something went wrong with that request. Please try again.