summaryrefslogtreecommitdiff
path: root/ext/pdf
diff options
context:
space:
mode:
authorUwe Steinmann <steinm@php.net>1999-08-12 06:23:28 +0000
committerUwe Steinmann <steinm@php.net>1999-08-12 06:23:28 +0000
commitd4346da6cbf683b8a8c28cc332a9659e9cde9dcb (patch)
treeee07672982f4f1b78762750a07d479efde6e64ed /ext/pdf
parente6241dc70350d038fb3ec6f4af440ce0d9645494 (diff)
downloadphp-git-d4346da6cbf683b8a8c28cc332a9659e9cde9dcb.tar.gz
config for pdf module should now be similar to php3
Diffstat (limited to 'ext/pdf')
-rw-r--r--ext/pdf/config.m440
1 files changed, 34 insertions, 6 deletions
diff --git a/ext/pdf/config.m4 b/ext/pdf/config.m4
index 981bea33c1..2c977a7acd 100644
--- a/ext/pdf/config.m4
+++ b/ext/pdf/config.m4
@@ -2,7 +2,7 @@ dnl $Id$
AC_MSG_CHECKING(whether to include Pdflib 2.0 support)
AC_ARG_WITH(pdflib,
-[ --with-pdflib[=DIR] Include pdflib 2.0 support.
+[ --with-pdflib[=DIR] Include pdflib 2.x support.
DIR is the pdflib install directory,
defaults to /usr/local.],
[
@@ -13,8 +13,8 @@ echo $withval
yes)
AC_MSG_RESULT(yes)
PHP_EXTENSION(pdf)
- AC_CHECK_LIB(pdf, PDF_close, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-lpdf -lz"],
- [AC_MSG_ERROR(pdflib extension requires pdflib 2.0.)])
+ AC_CHECK_LIB(pdf, PDF_close, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-L/usr/local -lpdf -lz"],
+ [AC_MSG_ERROR(pdflib extension requires pdflib 2.x. You may as well need libtiff and libjpeg. In such a case use the options --with-tiff-dir=<DIR> and --with-jpeg-dir=<DIR>)])
EXTRA_LIBS="$EXTRA_LIBS $PDFLIB_LIBS"
;;
*)
@@ -24,8 +24,8 @@ echo $withval
PHP_EXTENSION(pdf)
old_LIBS=$LIBS
+ old_withval=$withval
if test $HAVE_ZLIB; then
- old_withval=$withval
AC_MSG_CHECKING([for zlib (needed by pdflib 2.0)])
AC_ARG_WITH(zlib-dir,
[ --with-zlib-dir[=DIR] zlib dir for pdflib 2.0 or include zlib support],[
@@ -39,15 +39,43 @@ echo $withval
AC_MSG_RESULT(no)
AC_MSG_WARN(If configure fails try --with-zlib=<DIR>)
])
- withval=$old_withval
else
echo "checking for libz needed by pdflib 2.0... already zlib support"
PDFLIB_LIBS="$ZLIB_LIBS"
LIBS="$LIBS -lz"
fi
+ AC_MSG_CHECKING([for libjpeg (needed by pdflib 2.0)])
+ AC_ARG_WITH(jpeg-dir,
+ [ --with-jpeg-dir[=DIR] jpeg dir for pdflib 2.0],[
+ AC_MSG_RESULT(yes)
+ if test -z $withval; then
+ withval="/usr/local"
+ fi
+ LIBS="$LIBS -L$withval/lib -ljpeg"
+ AC_CHECK_LIB(jpeg,jpeg_read_header, [PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -ljpeg"],[AC_MSG_RESULT(no)],)
+ ],[
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(If configure fails try --with-jpeg-dir=<DIR>)
+ ])
+
+ AC_MSG_CHECKING([for libtiff (needed by pdflib 2.0)])
+ AC_ARG_WITH(tiff-dir,
+ [ --with-tiff-dir[=DIR] tiff dir for pdflib 2.0],[
+ AC_MSG_RESULT(yes)
+ if test -z $withval; then
+ withval="/usr/local"
+ fi
+ LIBS="$LIBS -L$withval/lib -ltiff"
+ AC_CHECK_LIB(tiff,TIFFOpen, [PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -ltiff"],[AC_MSG_RESULT(no)],)
+ ],[
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(If configure fails try --with-tiff-dir=<DIR>)
+ ])
+ withval=$old_withval
+
LIBS="$LIBS -L$withval/lib"
- AC_CHECK_LIB(pdf, PDF_close, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-L$withval/lib -lpdf"],
+ AC_CHECK_LIB(pdf, PDF_close, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -lpdf"],
[AC_MSG_ERROR(pdflib extension requires pdflib 2.0.)])
LIBS=$old_LIBS
EXTRA_LIBS="$EXTRA_LIBS $PDFLIB_LIBS"