From 28a2cb46d52c2d21dabd8febe0a04e3cdb7d7fea Mon Sep 17 00:00:00 2001 From: foobar Date: Sun, 29 Apr 2001 10:14:18 +0000 Subject: Fix bug #10545. --- ext/fdf/config.m4 | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'ext/fdf/config.m4') 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 -- cgit v1.2.1