]> granicus.if.org Git - php/commitdiff
- improved configuration due to compile problems which suddently show up
authorUwe Steinmann <steinm@php.net>
Thu, 9 Dec 1999 07:15:36 +0000 (07:15 +0000)
committerUwe Steinmann <steinm@php.net>
Thu, 9 Dec 1999 07:15:36 +0000 (07:15 +0000)
ext/cpdf/config.m4
ext/domxml/config.m4
ext/pdf/config.m4

index 44d568db6992132d6108b6a275c15dda381d9cc8..b3b52ea107df0ae71df69bf623071e971de0e3c7 100644 (file)
@@ -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=<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
index e0fb49837edbca65b8625636161ba1f96aac346c..308f98d2b03ff158ede5c08c3cb22fc4ee285ffb 100644 (file)
@@ -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)
       ;;
     *)
index b1edc0b5236dde021fcc435e101c4cd1b469170b..39bfe3eee6c274aba99d2bda7ee0d131c4464054 100644 (file)
@@ -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=<DIR>)
@@ -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=<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 ;;