mirror of
https://github.com/php/php-src.git
synced 2024-10-06 17:26:11 +00:00
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
|
dnl $Id$
|
||
|
|
||
|
AC_MSG_CHECKING(whether to include pdflib support)
|
||
|
AC_ARG_WITH(pdflib,
|
||
|
[ --with-pdflib[=DIR] Include pdflib support (tested with 0.6).
|
||
|
DIR is the pdflib install directory,
|
||
|
defaults to /usr/local.],
|
||
|
[
|
||
|
case "$withval" in
|
||
|
no)
|
||
|
AC_MSG_RESULT(no) ;;
|
||
|
yes)
|
||
|
AC_MSG_RESULT(yes)
|
||
|
PHP_EXTENSION(pdf)
|
||
|
AC_CHECK_LIB(pdf, PDF_open, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-lpdf"],
|
||
|
[AC_MSG_ERROR(pdflib extension requires pdflib 0.6.)])
|
||
|
EXTRA_LIBS="$EXTRA_LIBS $PDFLIB_LIBS"
|
||
|
;;
|
||
|
*)
|
||
|
test -f $withval/include/pdf.h && PDFLIB_INCLUDE="-I$withval/include"
|
||
|
if test -n "$PDFLIB_INCLUDE" ; then
|
||
|
AC_MSG_RESULT(yes)
|
||
|
PHP_EXTENSION(pdf)
|
||
|
old_LIBS=$LIBS
|
||
|
LIBS="$LIBS -L$withval/lib"
|
||
|
AC_CHECK_LIB(pdf, PDF_open, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-L$withval/lib -lpdf"],
|
||
|
[AC_MSG_ERROR(pdflib extension requires pdflib 0.6.)])
|
||
|
LIBS=$old_LIBS
|
||
|
EXTRA_LIBS="$EXTRA_LIBS $PDFLIB_LIBS"
|
||
|
INCLUDES="$INCLUDES $PDFLIB_INCLUDE"
|
||
|
else
|
||
|
AC_MSG_RESULT(no)
|
||
|
fi ;;
|
||
|
esac
|
||
|
],[
|
||
|
AC_MSG_RESULT(no)
|
||
|
])
|