summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/icap/Makefile.in2
-rw-r--r--ext/icap/config.m434
2 files changed, 16 insertions, 20 deletions
diff --git a/ext/icap/Makefile.in b/ext/icap/Makefile.in
index 5965ec0272..9e43d29867 100644
--- a/ext/icap/Makefile.in
+++ b/ext/icap/Makefile.in
@@ -1,5 +1,7 @@
LTLIBRARY_NAME = libicap.la
LTLIBRARY_SOURCES = php_icap.c
+LTLIBRARY_SHARED_NAME = icap.la
+LTLIBRARY_SHARED_LIBADD = $(ICAP_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/icap/config.m4 b/ext/icap/config.m4
index 372621546a..27f1be4c6a 100644
--- a/ext/icap/config.m4
+++ b/ext/icap/config.m4
@@ -1,25 +1,19 @@
dnl $Id$
-AC_MSG_CHECKING(for ICAP support)
-AC_ARG_WITH(icap,
-[ --with-icap[=DIR] Include ICAP support.],
-[
- if test "$withval" != "no"; then
- if test "$withval" = "yes"; then
- ICAP_DIR=/usr/local
- else
- ICAP_DIR=$withval
- fi
+PHP_ARG_WITH(icap,for ICAP support,
+[ --with-icap[=DIR] Include ICAP support.])
+
+if test "$PHP_ICAP" != "no"; then
+ ICAP_DIR=$PHP_ICAP
+ test "$ICAP_DIR" = "yes" && ICAP_DIR=/usr/local
- AC_ADD_INCLUDE($ICAP_DIR)
- AC_ADD_LIBRARY_WITH_PATH(icap, $ICAP_DIR)
- AC_DEFINE(HAVE_ICAP,1,[ ])
- PHP_EXTENSION(icap)
- AC_MSG_RESULT(yes)
+ AC_ADD_INCLUDE($ICAP_DIR)
+ if test "$ext_shared" = "yes"; then
+ ICAP_SHARED_LIBADD="-R$ICAP_DIR/lib -L$ICAP_DIR/lib -licap"
+ PHP_SUBST(ICAP_SHARED_LIBADD)
else
- AC_MSG_ERROR(no)
+ AC_ADD_LIBRARY_WITH_PATH(icap, $ICAP_DIR)
fi
-],[
- AC_MSG_RESULT(no)
-])
-
+ AC_DEFINE(HAVE_ICAP,1,[ ])
+ PHP_EXTENSION(icap, $ext_shared)
+fi