Skip to content

Commit

Permalink
ws fixes. Plus removed unnecessary AC_MSG_ calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
foobar committed Mar 12, 2001
1 parent 5b4d6e7 commit 48545dd
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions ext/pdf/config.m4
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
dnl $Id$

AC_MSG_CHECKING(whether to include Pdflib 3.x support)

PHP_ARG_WITH(pdflib,whether to include pdflib support,
PHP_ARG_WITH(pdflib,whether to include PDFlib support,
[ --with-pdflib[=DIR] Include pdflib 3.x support. DIR is the pdflib
base install directory, defaults to /usr/local
Set DIR to "shared" to build as dl, or "shared,DIR"
base install directory, defaults to /usr/local
Set DIR to "shared" to build as dl, or "shared,DIR"
to build as dl and still specify DIR.])

case "$PHP_PDFLIB" in
no)
AC_MSG_RESULT(no) ;;
yes)
AC_MSG_RESULT(yes)
PHP_EXTENSION(pdf, $ext_shared)
old_LDFLAGS=$LDFLAGS
old_LIBS=$LIBS
LIBS="$LIBS -ltiff -ljpeg -lpng -lz"
AC_CHECK_LIB(pdf, PDF_show_boxed, [AC_DEFINE(HAVE_PDFLIB,1,[ ])],
[AC_MSG_ERROR(pdflib extension requires at least pdflib 3.x. You may also need libtiff and libjpeg. If so, use the options --with-tiff-dir=<DIR> and --with-jpeg-dir=<DIR>)])
old_LIBS=$LIBS
LIBS="$LIBS -ltiff -ljpeg -lpng -lz"
AC_CHECK_LIB(pdf, PDF_show_boxed, [
AC_DEFINE(HAVE_PDFLIB,1,[ ])
],[
AC_MSG_ERROR(pdflib extension requires at least pdflib 3.x. You may also need libtiff and libjpeg. If so, use the options --with-tiff-dir=<DIR> and --with-jpeg-dir=<DIR>)
])
LIBS=$old_LIBS
LDFLAGS=$old_LDFLAGS
PHP_SUBST(PDFLIB_SHARED_LIBADD)
Expand All @@ -31,7 +29,6 @@ PHP_ARG_WITH(pdflib,whether to include pdflib support,
*)
test -f $withval/include/pdflib.h && PDFLIB_INCLUDE="$withval/include"
if test -n "$PDFLIB_INCLUDE" ; then
AC_MSG_RESULT(yes)
PHP_EXTENSION(pdf, $ext_shared)
old_withval=$withval

Expand Down Expand Up @@ -112,13 +109,15 @@ PHP_ARG_WITH(pdflib,whether to include pdflib support,

old_LIBS=$LIBS
LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(pdf, PDF_show_boxed, [AC_DEFINE(HAVE_PDFLIB,1,[ ]) PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -lpdf"],
[AC_MSG_ERROR(pdflib extension requires pdflib 3.x.)])
AC_CHECK_LIB(pdf, PDF_show_boxed, [
AC_DEFINE(HAVE_PDFLIB,1,[ ])
PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -lpdf"
],[
AC_MSG_ERROR(pdflib extension requires pdflib 3.x.)
])
LIBS=$old_LIBS
PHP_SUBST(PDFLIB_SHARED_LIBADD)
PHP_SUBST(PDFLIB_SHARED_LIBADD)
AC_ADD_LIBRARY_WITH_PATH(pdf, $withval/lib, PDFLIB_SHARED_LIBADD)
AC_ADD_INCLUDE($PDFLIB_INCLUDE)
else
AC_MSG_RESULT(no)
fi ;;
esac

0 comments on commit 48545dd

Please sign in to comment.