AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB)],
[AC_MSG_ERROR(Cpdf module requires cpdflib >= 2.)])
AC_ADD_LIBRARY(cpdf)
+ AC_ADD_LIBRARY(tiff)
+ AC_ADD_LIBRARY(jpeg)
;;
*)
test -f $withval/include/cpdflib.h && CPDFLIB_INCLUDE="$withval/include"
if test -z $withval; then
withval="/usr/local"
fi
- LIBS="$LIBS -L$withval/lib -ljpeg"
+ LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_RESULT(no)],)
AC_ADD_LIBRARY_WITH_PATH(jpeg, $withval/lib)
- LIBS="$LIBS -L$withval/lib -ljpeg"
],[
AC_MSG_RESULT(no)
AC_MSG_WARN(If configure fails try --with-jpeg-dir=<DIR>)
if test -z $withval; then
withval="/usr/local"
fi
- LIBS="$LIBS -L$withval/lib -ljpeg"
+ LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_RESULT(no)],)
AC_ADD_LIBRARY_WITH_PATH(tiff, $withval/lib)
],[
])
withval=$old_withval
- LIBS="$LIBS -L$withval/lib -ltiff"
+ LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB)],
[AC_MSG_ERROR(Cpdflib module requires cpdflib >= 2.)])
LIBS=$old_LIBS
if test -n "$PDFLIB_INCLUDE" ; then
AC_MSG_RESULT(yes)
PHP_EXTENSION(pdf)
- old_LIBS=$LIBS
old_withval=$withval
if test $HAVE_ZLIB; then
if test -z $withval; then
withval="/usr/local"
fi
+ old_LIBS=$LIBS
+ LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(z,deflate, [PDFLIB_LIBS="-L$withval/lib -lz"],[AC_MSG_RESULT(no)],)
- LIBS="$LIBS -L$withval/lib -lz"
- AC_ADD_LIBRARY_WITH_PATH(z, $/withvallib)
+ LIBS=$old_LIBS
+ AC_ADD_LIBRARY_WITH_PATH(z, $withval/lib)
],[
AC_MSG_RESULT(no)
AC_MSG_WARN(If configure fails try --with-zlib=<DIR>)
if test -z $withval; then
withval="/usr/local"
fi
- LIBS="$LIBS -L$withval/lib -ljpeg"
+ old_LIBS=$LIBS
+ LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(jpeg,jpeg_read_header, [PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -ljpeg"],[AC_MSG_RESULT(no)],)
+ LIBS=$old_LIBS
AC_ADD_LIBRARY_WITH_PATH(jpeg, $withval/lib)
LIBS="$LIBS -L$withval/lib -ljpeg"
],[
if test -z $withval; then
withval="/usr/local"
fi
- LIBS="$LIBS -L$withval/lib -ltiff -ljpeg"
+ old_LIBS=$LIBS
+ LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(tiff,TIFFOpen, [PDFLIB_LIBS="$PDFLIB_LIBS -L$withval/lib -ltiff"],[AC_MSG_RESULT(no)],)
+ LIBS=$old_LIBS
AC_ADD_LIBRARY_WITH_PATH(tiff, $withval/lib)
+ LIBS="$LIBS -L$withval/lib -ltiff"
],[
AC_MSG_RESULT(no)
AC_MSG_WARN(If configure fails try --with-tiff-dir=<DIR>)
])
withval=$old_withval
+ old_LIBS=$LIBS
LIBS="$LIBS -L$withval/lib"
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.x.)])
+ LIBS=$old_LIBS
AC_ADD_LIBRARY_WITH_PATH(pdf, $withval/lib)
AC_ADD_INCLUDE($PDFLIB_INCLUDE)
- LIBS=$old_LIBS
else
AC_MSG_RESULT(no)
fi ;;