From: Jakub Bogusz Date: Fri, 13 Jun 2003 13:01:45 +0000 (+0000) Subject: - updated for 4.3.2 X-Git-Tag: php-4_3_2-0_5~24 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=97926c4e66537f267effa0ff0c87321bb08d79f1;p=packages%2Fphp.git - updated for 4.3.2 Changed files: php-cpdf-fix.patch -> 1.4 --- diff --git a/php-cpdf-fix.patch b/php-cpdf-fix.patch index 1d52d0b..77878d6 100644 --- a/php-cpdf-fix.patch +++ b/php-cpdf-fix.patch @@ -1,161 +1,55 @@ ---- php-4.3.0/ext/cpdf/config.m4.orig Wed Mar 13 10:18:53 2002 -+++ php-4.3.0/ext/cpdf/config.m4 Thu Jan 2 13:12:16 2003 -@@ -1,70 +1,97 @@ - dnl $Id$ +--- php-4.3.2/ext/cpdf/config.m4.orig Wed Apr 30 10:23:06 2003 ++++ php-4.3.2/ext/cpdf/config.m4 Fri Jun 13 12:23:26 2003 +@@ -24,9 +24,9 @@ + ],) + AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_ERROR(Problem with libjpeg.(a|so). Please check config.log for more information.)],) + if test -z "$CPDF_JPEG_DIR"; then +- PHP_ADD_LIBRARY(jpeg) ++ PHP_ADD_LIBRARY(jpeg, , CPDF_SHARED_LIBADD) + else +- PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib) ++ PHP_ADD_LIBRARY_WITH_PATH(jpeg, $CPDF_JPEG_DIR/lib, CPDF_SHARED_LIBADD) + fi + ]) + ]) +@@ -49,22 +49,23 @@ + ],) + AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_ERROR(Problem with libtiff.(a|so). Please check config.log for more information.)],) + if test -z "$CPDF_TIFF_DIR"; then +- PHP_ADD_LIBRARY(tiff) ++ PHP_ADD_LIBRARY(tiff, , CPDF_SHARED_LIBADD) + else +- PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib) ++ PHP_ADD_LIBRARY_WITH_PATH(tiff, $CPDF_TIFF_DIR/lib, CPDF_SHARED_LIBADD) + fi + ]) + ]) -AC_MSG_CHECKING(for cpdflib support) --AC_ARG_WITH(cpdflib, --[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).], --[ -- case $withval in -- no) -- AC_MSG_RESULT(no) ;; -+PHP_ARG_WITH(cpdflib, for cpdflib support, -+[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).]) -+ -+if test "$PHP_CPDFLIB" != "no"; then -+ -+ PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared) -+ PHP_SUBST(CPDF_SHARED_LIBADD) -+ -+ dnl # libjpeg -+ -+ PHP_ARG_WITH(jpeg-dir, for the location of libjpeg, -+ [ --with-jpeg-dir[=DIR] PDFLIB: define libjpeg install directory. (OPTIONAL for PDFlib v4)]) -+ -+ if test "$PHP_JPEG_DIR" != "no"; then -+ PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, -+ [ -+ PHP_ADD_LIBRARY_WITH_PATH(jpeg, $PHP_JPEG_DIR/lib, CPDF_SHARED_LIBADD) -+ ],[ -+ AC_MSG_ERROR([libjpeg not found!]) -+ ],[ -+ -L$PHP_JPEG_DIR/lib -+ ]) -+ else -+ AC_MSG_WARN([If configure fails, try --with-jpeg-dir=]) -+ fi -+ -+ dnl # libpng -+ -+ PHP_ARG_WITH(png-dir, for the location of libpng, -+ [ --with-png-dir[=DIR] PDFLIB: define libpng install directory. (OPTIONAL for PDFlib v4)]) -+ -+ if test "$PHP_PNG_DIR" != "no"; then -+ PHP_CHECK_LIBRARY(png,png_create_info_struct, -+ [ -+ PHP_ADD_LIBRARY_WITH_PATH(png, $PHP_PNG_DIR/lib, CPDF_SHARED_LIBADD) -+ ],[ -+ AC_MSG_ERROR([libpng not found!]) -+ ],[ -+ -L$PHP_PNG_DIR/lib -+ ]) -+ else -+ AC_MSG_WARN([If configure fails, try --with-png-dir=]) -+ fi -+ -+ dnl # libtiff -+ -+ PHP_ARG_WITH(tiff-dir, for the location of libtiff, -+ [ --with-tiff-dir[=DIR] PDFLIB: define libtiff install directory. (OPTIONAL for PDFlib v4)]) -+ -+ if test "$PHP_TIFF_DIR" != "no"; then -+ PHP_CHECK_LIBRARY(tiff,TIFFOpen, -+ [ -+ PHP_ADD_LIBRARY_WITH_PATH(tiff, $PHP_TIFF_DIR/lib, CPDF_SHARED_LIBADD) -+ ],[ -+ AC_MSG_ERROR([libtiff not found!]) -+ ],[ -+ -L$PHP_TIFF_DIR/lib -+ ]) -+ else -+ AC_MSG_WARN([If configure fails, try --with-tiff-dir=]) -+ fi -+ -+ dnl # zlib -+ -+ AC_MSG_CHECKING([for the location of zlib]) -+ if test "$PHP_ZLIB_DIR" = "no"; then -+ AC_MSG_RESULT([no. If configure fails, try --with-zlib-dir=]) -+ else -+ AC_MSG_RESULT([$PHP_ZLIB_DIR]) -+ PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, CPDF_SHARED_LIBADD) -+ fi -+ -+ case $PHP_CPDFLIB in - yes) -- AC_MSG_RESULT(yes) -- PHP_NEW_EXTENSION(cpdf, cpdf.c) - AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])], - [AC_MSG_ERROR([Cpdf module requires cpdflib >= 2.])]) -+ PHP_ADD_LIBRARY(cpdf,, CPDF_SHARED_LIBADD) -- PHP_ADD_LIBRARY(cpdf) -- PHP_ADD_LIBRARY(tiff) -- PHP_ADD_LIBRARY(jpeg) - ;; - *) -- test -f $withval/include/cpdflib.h && CPDFLIB_INCLUDE=$withval/include -- if test -n "$CPDFLIB_INCLUDE" ; then -- AC_MSG_RESULT(yes) -- PHP_NEW_EXTENSION(cpdf, cpdf.c) -- old_LIBS=$LIBS -- old_withval=$withval -- -- AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)]) -- AC_ARG_WITH(jpeg-dir, -- [ --with-jpeg-dir[=DIR] jpeg dir for cpdflib 2.x],[ -- AC_MSG_RESULT(yes) -- if test -z $withval; then -- withval=/usr/local -- fi -- LIBS="$LIBS -L$withval/lib" -- AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_RESULT(no)],) -- PHP_ADD_LIBRARY_WITH_PATH(jpeg, $withval/lib) -- ],[ -- AC_MSG_RESULT(no) -- AC_MSG_WARN(If configure fails try --with-jpeg-dir=) -- ]) -- -- AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)]) -- AC_ARG_WITH(tiff-dir, -- [ --with-tiff-dir[=DIR] tiff dir for cpdflib 2.x],[ -- AC_MSG_RESULT(yes) -- if test -z $withval; then -- withval=/usr/local -- fi -- LIBS="$LIBS -L$withval/lib" -- AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_RESULT(no)],) -- PHP_ADD_LIBRARY_WITH_PATH(tiff, $withval/lib) -- ],[ -- AC_MSG_RESULT(no) -- AC_MSG_WARN(If configure fails try --with-tiff-dir=) -- ]) -- withval=$old_withval -- -- LIBS="$LIBS -L$withval/lib" -- AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])], -- [AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])]) -- LIBS=$old_LIBS -- PHP_ADD_LIBRARY_WITH_PATH(cpdf, $withval/lib) -- PHP_ADD_INCLUDE($CPDFLIB_INCLUDE) -+ if test -f "$PHP_CPDFLIB/include/cpdflib.h"; then -+ PHP_CHECK_LIBRARY(cpdf, cpdf_open,[ -+ AC_DEFINE(HAVE_PDFLIB,1,[ ]) -+ PHP_ADD_LIBRARY_WITH_PATH(cpdf, $PHP_CPDFLIB/lib, CPDF_SHARED_LIBADD) -+ PHP_ADD_INCLUDE($PHP_CPDFLIB/include) -+ ],[ -+ AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.]) -+ ],[ -+ -L$PHP_PDFLIB/lib -+ ]) - else -- AC_MSG_RESULT(no) -- fi ;; -+ AC_MSG_ERROR([cpdflib.h not found! Check the path passed to --with-cpdflib=. PATH should be the install prefix directory.]) -+ fi -+ ;; - esac --],[ -- AC_MSG_RESULT(no) --]) -+fi + AC_ARG_WITH(cpdflib, + [ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).], + [ ++ AC_MSG_CHECKING(for cpdflib support) + if test "$withval" = "no"; then + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) +- PHP_NEW_EXTENSION(cpdf, cpdf.c) ++ PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared) ++ PHP_SUBST(CPDF_SHARED_LIBADD) + CPDF_JPEG_TEST + CPDF_TIFF_TEST + for i in $withval /usr /usr/local; do +@@ -78,10 +79,10 @@ + [AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])]) + ]) + if test "$i" != "/usr" -a "$i" != "/usr/local"; then +- PHP_ADD_LIBRARY_WITH_PATH(cpdf, $i/lib) ++ PHP_ADD_LIBRARY_WITH_PATH(cpdf, $i/lib, CPDF_SHARED_LIBADD) + PHP_ADD_INCLUDE($CPDFLIB_INCLUDE) + else +- PHP_ADD_LIBRARY(cpdf) ++ PHP_ADD_LIBRARY(cpdf, , CPDF_SHARED_LIBADD) + fi + break + fi