From ec7088e1df45a606aa5fe267af67a7b8789a095c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Dec 1999 07:15:36 +0000 Subject: [PATCH] - improved configuration due to compile problems which suddently show up --- ext/cpdf/config.m4 | 9 +++++---- ext/domxml/config.m4 | 2 +- ext/pdf/config.m4 | 19 +++++++++++++------ 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ext/cpdf/config.m4 b/ext/cpdf/config.m4 index 44d568db69..b3b52ea107 100644 --- a/ext/cpdf/config.m4 +++ b/ext/cpdf/config.m4 @@ -15,6 +15,8 @@ AC_ARG_WITH(cpdflib, 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" @@ -31,10 +33,9 @@ AC_ARG_WITH(cpdflib, 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=) @@ -47,7 +48,7 @@ AC_ARG_WITH(cpdflib, 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) ],[ @@ -56,7 +57,7 @@ AC_ARG_WITH(cpdflib, ]) 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 diff --git a/ext/domxml/config.m4 b/ext/domxml/config.m4 index e0fb49837e..308f98d2b0 100644 --- a/ext/domxml/config.m4 +++ b/ext/domxml/config.m4 @@ -17,8 +17,8 @@ AC_ARG_WITH(dom, AC_CHECK_LIB(xml, xmlNewDoc, [AC_DEFINE(HAVE_DOMXML)], [AC_MSG_ERROR(DOM module requires libxml >= 1.0)]) LIBS=$old_LIBS - AC_ADD_LIBRARY(xml) AC_ADD_LIBRARY(gz) + AC_ADD_LIBRARY(xml) AC_ADD_INCLUDE(/usr/local/include) ;; *) diff --git a/ext/pdf/config.m4 b/ext/pdf/config.m4 index b1edc0b523..39bfe3eee6 100644 --- a/ext/pdf/config.m4 +++ b/ext/pdf/config.m4 @@ -30,7 +30,6 @@ echo $withval if test -n "$PDFLIB_INCLUDE" ; then AC_MSG_RESULT(yes) PHP_EXTENSION(pdf) - old_LIBS=$LIBS old_withval=$withval if test $HAVE_ZLIB; then @@ -41,9 +40,11 @@ echo $withval 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=) @@ -61,8 +62,10 @@ echo $withval 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" ],[ @@ -77,21 +80,25 @@ echo $withval 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=) ]) 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 ;; -- 2.40.0