summaryrefslogtreecommitdiff
path: root/ext/fdf/config.m4
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2001-04-29 10:14:18 +0000
committerfoobar <sniper@php.net>2001-04-29 10:14:18 +0000
commit28a2cb46d52c2d21dabd8febe0a04e3cdb7d7fea (patch)
treec3dca2681f21f723b22b8f5bed063bf98cc2cca8 /ext/fdf/config.m4
parent27fd3a2e57a42b28208e1355c46e23ad04764621 (diff)
downloadphp-git-28a2cb46d52c2d21dabd8febe0a04e3cdb7d7fea.tar.gz
Fix bug #10545.
Diffstat (limited to 'ext/fdf/config.m4')
-rw-r--r--ext/fdf/config.m419
1 files changed, 13 insertions, 6 deletions
diff --git a/ext/fdf/config.m4 b/ext/fdf/config.m4
index fb6478b0ae..3dca416acb 100644
--- a/ext/fdf/config.m4
+++ b/ext/fdf/config.m4
@@ -4,12 +4,12 @@ PHP_ARG_WITH(fdftk, for fdftk support,
[ --with-fdftk[=DIR] Include fdftk support])
if test "$PHP_FDFTK" != "no"; then
- if test -r $PHP_FDFTK/include/FdfTk.h; then
+ if test -r $PHP_FDFTK/include/FdfTk.h -o -r $PHP_FDFTK/fdftk.h; then
FDFTK_DIR=$PHP_FDFTK
else
AC_MSG_CHECKING(for fdftk in default path)
for i in /usr/local /usr; do
- if test -r $i/include/FdfTk.h; then
+ if test -r $i/include/FdfTk.h -o -r $i/include/fdftk.h; then
FDFTK_DIR=$i
AC_MSG_RESULT(found in $i)
fi
@@ -25,13 +25,20 @@ if test "$PHP_FDFTK" != "no"; then
old_LIBS=$LIBS
LIBS="$LIBS -L$FDFTK_DIR/lib -lm"
- AC_CHECK_LIB(FdfTk, FDFOpen, [AC_DEFINE(HAVE_FDFLIB,1,[ ])],
- [AC_MSG_ERROR(fdftk module requires fdftk 2.0)])
+ FDFLIBRARY=""
+ for i in fdftk FdfTk; do
+ AC_CHECK_LIB($i, FDFOpen, [FDFLIBRARY=$i])
+ done
LIBS=$old_LIBS
+
+ if test $FDFLIBRARY = ""; then
+ AC_MSG_ERROR(fdftk module requires fdftk 2.0)
+ fi
+
+ AC_DEFINE(HAVE_FDFLIB,1,[ ])
+ PHP_ADD_LIBRARY_WITH_PATH($FDFLIBRARY, $FDFTK_DIR/lib, FDFTK_SHARED_LIBADD)
PHP_SUBST(FDFTK_SHARED_LIBADD)
- PHP_ADD_LIBRARY_WITH_PATH(FdfTk, $FDFTK_DIR/lib, FDFTK_SHARED_LIBADD)
-
PHP_EXTENSION(fdf, $ext_shared)
fi