1 --- php-4.3.0/ext/cpdf/config.m4.orig Wed Mar 13 10:18:53 2002
2 +++ php-4.3.0/ext/cpdf/config.m4 Thu Jan 2 13:12:16 2003
6 -AC_MSG_CHECKING(for cpdflib support)
8 -[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).],
12 - AC_MSG_RESULT(no) ;;
13 +PHP_ARG_WITH(cpdflib, for cpdflib support,
14 +[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).])
16 +if test "$PHP_CPDFLIB" != "no"; then
18 + PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared)
19 + PHP_SUBST(CPDF_SHARED_LIBADD)
23 + PHP_ARG_WITH(jpeg-dir, for the location of libjpeg,
24 + [ --with-jpeg-dir[=DIR] PDFLIB: define libjpeg install directory. (OPTIONAL for PDFlib v4)])
26 + if test "$PHP_JPEG_DIR" != "no"; then
27 + PHP_CHECK_LIBRARY(jpeg,jpeg_read_header,
29 + PHP_ADD_LIBRARY_WITH_PATH(jpeg, $PHP_JPEG_DIR/lib, CPDF_SHARED_LIBADD)
31 + AC_MSG_ERROR([libjpeg not found!])
36 + AC_MSG_WARN([If configure fails, try --with-jpeg-dir=<DIR>])
41 + PHP_ARG_WITH(png-dir, for the location of libpng,
42 + [ --with-png-dir[=DIR] PDFLIB: define libpng install directory. (OPTIONAL for PDFlib v4)])
44 + if test "$PHP_PNG_DIR" != "no"; then
45 + PHP_CHECK_LIBRARY(png,png_create_info_struct,
47 + PHP_ADD_LIBRARY_WITH_PATH(png, $PHP_PNG_DIR/lib, CPDF_SHARED_LIBADD)
49 + AC_MSG_ERROR([libpng not found!])
54 + AC_MSG_WARN([If configure fails, try --with-png-dir=<DIR>])
59 + PHP_ARG_WITH(tiff-dir, for the location of libtiff,
60 + [ --with-tiff-dir[=DIR] PDFLIB: define libtiff install directory. (OPTIONAL for PDFlib v4)])
62 + if test "$PHP_TIFF_DIR" != "no"; then
63 + PHP_CHECK_LIBRARY(tiff,TIFFOpen,
65 + PHP_ADD_LIBRARY_WITH_PATH(tiff, $PHP_TIFF_DIR/lib, CPDF_SHARED_LIBADD)
67 + AC_MSG_ERROR([libtiff not found!])
72 + AC_MSG_WARN([If configure fails, try --with-tiff-dir=<DIR>])
77 + AC_MSG_CHECKING([for the location of zlib])
78 + if test "$PHP_ZLIB_DIR" = "no"; then
79 + AC_MSG_RESULT([no. If configure fails, try --with-zlib-dir=<DIR>])
81 + AC_MSG_RESULT([$PHP_ZLIB_DIR])
82 + PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, CPDF_SHARED_LIBADD)
85 + case $PHP_CPDFLIB in
88 - PHP_NEW_EXTENSION(cpdf, cpdf.c)
89 AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])],
90 [AC_MSG_ERROR([Cpdf module requires cpdflib >= 2.])])
91 + PHP_ADD_LIBRARY(cpdf,, CPDF_SHARED_LIBADD)
92 - PHP_ADD_LIBRARY(cpdf)
93 - PHP_ADD_LIBRARY(tiff)
94 - PHP_ADD_LIBRARY(jpeg)
97 - test -f $withval/include/cpdflib.h && CPDFLIB_INCLUDE=$withval/include
98 - if test -n "$CPDFLIB_INCLUDE" ; then
100 - PHP_NEW_EXTENSION(cpdf, cpdf.c)
102 - old_withval=$withval
104 - AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)])
105 - AC_ARG_WITH(jpeg-dir,
106 - [ --with-jpeg-dir[=DIR] jpeg dir for cpdflib 2.x],[
108 - if test -z $withval; then
111 - LIBS="$LIBS -L$withval/lib"
112 - AC_CHECK_LIB(jpeg,jpeg_read_header, ,[AC_MSG_RESULT(no)],)
113 - PHP_ADD_LIBRARY_WITH_PATH(jpeg, $withval/lib)
116 - AC_MSG_WARN(If configure fails try --with-jpeg-dir=<DIR>)
119 - AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)])
120 - AC_ARG_WITH(tiff-dir,
121 - [ --with-tiff-dir[=DIR] tiff dir for cpdflib 2.x],[
123 - if test -z $withval; then
126 - LIBS="$LIBS -L$withval/lib"
127 - AC_CHECK_LIB(tiff,TIFFOpen, ,[AC_MSG_RESULT(no)],)
128 - PHP_ADD_LIBRARY_WITH_PATH(tiff, $withval/lib)
131 - AC_MSG_WARN(If configure fails try --with-tiff-dir=<DIR>)
133 - withval=$old_withval
135 - LIBS="$LIBS -L$withval/lib"
136 - AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])],
137 - [AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])])
139 - PHP_ADD_LIBRARY_WITH_PATH(cpdf, $withval/lib)
140 - PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
141 + if test -f "$PHP_CPDFLIB/include/cpdflib.h"; then
142 + PHP_CHECK_LIBRARY(cpdf, cpdf_open,[
143 + AC_DEFINE(HAVE_PDFLIB,1,[ ])
144 + PHP_ADD_LIBRARY_WITH_PATH(cpdf, $PHP_CPDFLIB/lib, CPDF_SHARED_LIBADD)
145 + PHP_ADD_INCLUDE($PHP_CPDFLIB/include)
147 + AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
154 + AC_MSG_ERROR([cpdflib.h not found! Check the path passed to --with-cpdflib=<PATH>. PATH should be the install prefix directory.])