diff options
| -rw-r--r-- | ext/yaz/config.m4 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/yaz/config.m4 b/ext/yaz/config.m4 index 9eeb9d2e9e..0f701fd7fe 100644 --- a/ext/yaz/config.m4 +++ b/ext/yaz/config.m4 @@ -20,8 +20,18 @@ if test "$PHP_YAZ" != "no"; then if test -f $yazconfig; then AC_DEFINE(HAVE_YAZ,1,[Whether you have YAZ]) . $yazconfig - YAZLIB=`echo $YAZLIB|sed 's%/.libs%%'` - PHP_EVAL_LIBLINE($YAZLIB, YAZ_SHARED_LIBADD) + dir="" + for c in $YAZLIB; do + case $c in + -L*) + dir=`echo $c|cut -c 3-|sed 's%/\.libs%%g'` + ;; + esac + done + if test -n "$dir"; then + PHP_ADD_LIBPATH($dir,YAZ_SHARED_LIBADD) + fi + PHP_ADD_LIBRARY_DEFER(yaz,1,YAZ_SHARED_LIBADD) PHP_EVAL_INCLINE($YAZINC) PHP_SUBST(YAZ_SHARED_LIBADD) PHP_EXTENSION(yaz, $ext_shared) |
