summaryrefslogtreecommitdiff
path: root/ext/swf/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'ext/swf/config.m4')
-rw-r--r--ext/swf/config.m414
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/swf/config.m4 b/ext/swf/config.m4
index cd728e6b24..117fe7c568 100644
--- a/ext/swf/config.m4
+++ b/ext/swf/config.m4
@@ -5,11 +5,11 @@ dnl This file is a modified version of config.m4
dnl in php4/ext/mcrypt
PHP_ARG_WITH(swf, for libswf support,
-[ --with-swf[=DIR] Include swf support])
+[ --with-swf[=DIR] Include swf support])
if test "$PHP_SWF" != "no"; then
for i in /usr/local /usr $PHP_SWF; do
- if test -f $i/libswf.a; then
+ if test -r $i/libswf.a; then
SWF_DIR=$i
fi
done
@@ -17,10 +17,16 @@ if test "$PHP_SWF" != "no"; then
if test -z "$SWF_DIR"; then
AC_MSG_ERROR(Please reinstall libswf.a - I cannot find libswf.a)
fi
+
AC_ADD_INCLUDE($SWF_DIR)
- AC_ADD_LIBRARY_WITH_PATH(swf, $SWF_DIR)
+ if test "$ext_shared" = "yes"; then
+ SWF_SHARED_LIBADD="-R$SWF_DIR -L$SWF_DIR -lswf"
+ PHP_SUBST(SWF_SHARED_LIBADD)
+ else
+ AC_ADD_LIBRARY_WITH_PATH(swf, $SWF_DIR)
+ fi
AC_DEFINE(HAVE_SWF,1,[ ])
- PHP_EXTENSION(swf)
+ PHP_EXTENSION(swf, $ext_shared)
fi