sniper          Mon Dec 20 23:23:35 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/ext/cpdf   config.m4 
  Log:
  MFH: - Fixed bug #31145 (configure is using -lcpdf instead of -lcpdfm)
  # Also backported some previous fixes that weren't in this branch yet.
  
  
http://cvs.php.net/diff.php/php-src/ext/cpdf/config.m4?r1=1.10.4.6&r2=1.10.4.7&ty=u
Index: php-src/ext/cpdf/config.m4
diff -u php-src/ext/cpdf/config.m4:1.10.4.6 php-src/ext/cpdf/config.m4:1.10.4.7
--- php-src/ext/cpdf/config.m4:1.10.4.6 Tue Sep 30 22:53:53 2003
+++ php-src/ext/cpdf/config.m4  Mon Dec 20 23:23:35 2004
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.10.4.6 2003/10/01 02:53:53 sniper Exp $
+dnl $Id: config.m4,v 1.10.4.7 2004/12/21 04:23:35 sniper Exp $
 
 AC_DEFUN(CPDF_JPEG_TEST,[
   AC_ARG_WITH(jpeg-dir,
@@ -10,7 +10,6 @@
       fi
     done
     if test -z "$CPDF_JPEG_DIR"; then
-      AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)])
       AC_MSG_ERROR([libjpeg.(a|so) not found.])
     fi
     PHP_CHECK_LIBRARY(jpeg, jpeg_read_header, [
@@ -33,7 +32,6 @@
       fi
     done
     if test -z "$CPDF_TIFF_DIR"; then
-      AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)])
       AC_MSG_ERROR([libtiff.(a|so) not found.])
     fi
     PHP_CHECK_LIBRARY(tiff, TIFFOpen, [
@@ -46,42 +44,41 @@
   ],)
 ])
 
-AC_MSG_CHECKING(for cpdflib support)
-AC_ARG_WITH(cpdflib,
-[  --with-cpdflib[=DIR]    Include cpdflib support (requires cpdflib >= 2).],
-[
-  PHP_WITH_SHARED
-  if test "$withval" != "no"; then
-    cpdf_withval=$withval
-    PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared,, \\$(GDLIB_CFLAGS))
-    PHP_SUBST(CPDF_SHARED_LIBADD)
-    CPDF_JPEG_TEST
-    CPDF_TIFF_TEST
-
-    for i in $cpdf_withval /usr/local /usr; do
-      if test -f "$i/include/cpdflib.h"; then
-        CPDFLIB_INCLUDE=$i/include
-        AC_MSG_CHECKING(for cpdflib.h)
-        AC_MSG_RESULT([in $i/include])
-
-        PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
-          PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
-          PHP_ADD_LIBRARY_WITH_PATH(cpdf, $i/lib, CPDF_SHARED_LIBADD)
-          AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
+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,, \\$(GDLIB_CFLAGS))
+  PHP_SUBST(CPDF_SHARED_LIBADD)
+  CPDF_JPEG_TEST
+  CPDF_TIFF_TEST
+
+  for i in $PHP_CPDFLIB /usr/local /usr; do
+    if test -f "$i/include/cpdflib.h"; then
+      CPDFLIB_INCLUDE=$i/include
+
+      PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
+        cpdf_libname=cpdf
+      ], [
+        PHP_CHECK_LIBRARY(cpdfm, cpdf_open, [
+          cpdf_libname=cpdfm
         ], [
           AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
         ], [
           -L$i/lib $CPDF_SHARED_LIBADD
         ])
-        break
-      fi
-    done  
-
-    if test -z "$CPDFLIB_INCLUDE"; then
-      AC_MSG_CHECKING(for cpdflib.h)
-      AC_MSG_ERROR([not found])
+      ], [
+        -L$i/lib $CPDF_SHARED_LIBADD
+      ])
+
+      PHP_ADD_LIBRARY_WITH_PATH($cpdf_libname, $i/lib, CPDF_SHARED_LIBADD)
+      PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
+      AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
+      break
     fi
+  done  
+
+  if test -z "$CPDFLIB_INCLUDE"; then
+    AC_MSG_ERROR([cpdflib.h not found])
   fi
-],[
-  AC_MSG_RESULT(no)
-])
+fi

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to