Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
# Libtool library files generated during build process
*.la

# Mac shared library files generated during build process
*.dylib

# Directories created by Libtool for storing generated library files
.libs/

Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ PHP NEWS
- DOM:
. Fix weird unpack behaviour in DOM. (nielsdos)

- Embed:
. Fixed bug GH-8533 (Unable to link dynamic libphp on Mac). (Kévin Dunglas)

- GD:
. Fixed bug GH-17984 (calls with arguments as array with references).
(David Carlier)
Expand Down
4 changes: 4 additions & 0 deletions build/Makefile.global
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ libphp.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LIBPHP_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1

libphp.dylib: libphp.la
$(LIBTOOL) --tag=CC --mode=link $(CC) -dynamiclib $(LIBPHP_CFLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -rpath $(phptempdir) -install_name @rpath/$@ $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --tag=CC --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1

libs/libphp.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp.so

Expand Down
9 changes: 9 additions & 0 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,14 @@ AC_DEFUN([PHP_BUILD_SHARED],[
php_lo=$shared_lo
])

dnl
dnl PHP_BUILD_SHARED_DYLIB
dnl
AC_DEFUN([PHP_BUILD_SHARED_DYLIB],[
PHP_BUILD_SHARED
OVERALL_TARGET=libphp.dylib
])

dnl
dnl PHP_BUILD_STATIC
dnl
Expand Down Expand Up @@ -876,6 +884,7 @@ AC_DEFUN([PHP_SELECT_SAPI],[
case "$2" in
static[)] PHP_BUILD_STATIC;;
shared[)] PHP_BUILD_SHARED;;
shared-dylib[)] PHP_BUILD_SHARED_DYLIB;;
bundle[)] PHP_BUILD_BUNDLE;;
esac
install_sapi="install-sapi"
Expand Down
5 changes: 4 additions & 1 deletion sapi/embed/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ if test "$PHP_EMBED" != "no"; then
case "$PHP_EMBED" in
yes|shared)
LIBPHP_CFLAGS="-shared"
PHP_EMBED_TYPE=shared
AS_CASE(["$host_alias"], [*darwin*], [
SAPI_SHARED="libs/libphp.dylib"
PHP_EMBED_TYPE=shared-dylib
], [PHP_EMBED_TYPE=shared])
INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib"
;;
static)
Expand Down
Loading