Skip to content

Commit

Permalink
Fix static building of libxhp
Browse files Browse the repository at this point in the history
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
Scott MacVicar committed Aug 8, 2011
1 parent dafff2c commit 6bf2a88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions 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:
5 changes: 3 additions & 2 deletions config.m4
Expand Up @@ -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
2 changes: 1 addition & 1 deletion ext.hpp
Expand Up @@ -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

0 comments on commit 6bf2a88

Please sign in to comment.