blob: c421e2a1c7c7bdf985fbf0c8ec90911b247cc313 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
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)
])
|