summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2002-06-24 11:36:21 +0000
committerfoobar <sniper@php.net>2002-06-24 11:36:21 +0000
commit3d799b5db402370c32c63194aaae465d246096dd (patch)
treee9fd49bbe14eff33d3a94113af7f6e477b646432 /acinclude.m4
parentf0998192b4beb08b5495111cc3c4bf2468911a8a (diff)
downloadphp-git-3d799b5db402370c32c63194aaae465d246096dd.tar.gz
Fixed PHP_ADD_LIBRARY_DEFER_WITH_PATH to work with shared builds.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m419
1 files changed, 17 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 50eebb1cd9..c16341f091 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -985,14 +985,29 @@ ifelse($3,,[
])
dnl
-dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path)
+dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
dnl
dnl add a library to the link line (deferred)
dnl and path to linkpath/runpath (not deferred)
+dnl if shared-libadd is not empty and $ext_shared is yes,
+dnl shared-libadd will be assigned the library information
dnl
AC_DEFUN(PHP_ADD_LIBRARY_DEFER_WITH_PATH,[
- PHP_ADD_LIBPATH($2)
+ifelse($3,,[
+ if test -n "$2"; then
+ PHP_ADD_LIBPATH($2)
+ fi
PHP_ADD_LIBRARY_DEFER($1)
+],[
+ if test "$ext_shared" = "yes"; then
+ $3="-l$1 [$]$3"
+ if test -n "$2"; then
+ PHP_ADD_LIBPATH($2,$3)
+ fi
+ else
+ PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2)
+ fi
+])
])
dnl