summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2001-06-01 06:43:09 +0000
committerfoobar <sniper@php.net>2001-06-01 06:43:09 +0000
commit92b3cc79540314463fd1969561a53b396e02adad (patch)
tree8ead219721cacc3401d48634b411c933c9758478
parentf56b195314f8d08240fad1f08dbce78b8b2339a0 (diff)
downloadphp-git-92b3cc79540314463fd1969561a53b396e02adad.tar.gz
MFH
-rw-r--r--ext/sablot/config.m435
-rw-r--r--ext/xml/config.m462
-rw-r--r--ext/xslt/config.m4155
-rw-r--r--ext/xslt/php_sablot.h2
-rw-r--r--ext/xslt/sablot.c2
5 files changed, 122 insertions, 134 deletions
diff --git a/ext/sablot/config.m4 b/ext/sablot/config.m4
index 9bf4324e1b..1710e13d5d 100644
--- a/ext/sablot/config.m4
+++ b/ext/sablot/config.m4
@@ -4,12 +4,13 @@ dnl config.m4 for extension Sablot
PHP_ARG_WITH(sablot, for Sablotron XSL support,
[ --with-sablot[=DIR] Include Sablotron support])
+PHP_ARG_WITH(expat-dir, libexpat dir for Sablotron 0.50,
+[ --with-expat-dir=DIR Sablotron: libexpat dir for Sablotron 0.50])
+
if test "$PHP_SABLOT" != "no"; then
PHP_EXTENSION(sablot, $ext_shared)
-
- PHP_ARG_WITH(expat-dir, libexpat dir for Sablotron 0.50,
- [ --with-expat-dir=DIR Sablotron: libexpat dir for Sablotron 0.50])
+ PHP_SUBST(SABLOT_SHARED_LIBADD)
if test -r $PHP_SABLOT/include/sablot.h; then
SABLOT_DIR=$PHP_SABLOT
@@ -29,17 +30,11 @@ if test "$PHP_SABLOT" != "no"; then
fi
PHP_ADD_INCLUDE($SABLOT_DIR/include)
-
- PHP_SUBST(SABLOT_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(sablot, $SABLOT_DIR/lib, SABLOT_SHARED_LIBADD)
- if test -z "$PHP_EXPAT_DIR"; then
- PHP_EXPAT_DIR=""
- fi
-
testval=no
for i in $PHP_EXPAT_DIR $SABLOT_DIR; do
- if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.so; then
+ if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.s?; then
AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib)
PHP_ADD_INCLUDE($i/include)
@@ -55,22 +50,20 @@ if test "$PHP_SABLOT" != "no"; then
found_iconv=no
AC_CHECK_LIB(c, iconv_open, found_iconv=yes)
- if test "$found_iconv" = "no"; then
+ if test "$found_iconv" = "no"; then
if test "$PHP_ICONV" = "no"; then
for i in /usr /usr/local; do
- if test -f $i/lib/libconv.a -o -f $i/lib/libiconv.so; then
- PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib)
- found_iconv=yes
- fi
+ if test -f $i/lib/libconv.a -o -f $i/lib/libiconv.s?; then
+ PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib)
+ found_iconv=yes
+ fi
done
fi
- fi
+ fi
- if test "$found_iconv" = "no"; then
- AC_MSG_ERROR(iconv not found, in order to build sablotron you need the iconv library)
- fi
-
+ if test "$found_iconv" = "no"; then
+ AC_MSG_ERROR(iconv not found, in order to build sablotron you need the iconv library)
+ fi
AC_DEFINE(HAVE_SABLOT,1,[ ])
-
fi
diff --git a/ext/xml/config.m4 b/ext/xml/config.m4
index ec85a84d73..da71601fca 100644
--- a/ext/xml/config.m4
+++ b/ext/xml/config.m4
@@ -15,38 +15,44 @@ fi
PHP_ARG_ENABLE(xml,for XML support,
[ --disable-xml Disable XML support using bundled expat lib], yes)
-if test "$PHP_XML" != "no"; then
+PHP_ARG_WITH(expat-dir, external libexpat install dir,
+[ --with-expat-dir=DIR XML: external libexpat install dir])
+if test "$PHP_XML" = "yes" -a "$PHP_EXPAT_DIR" = "no"; then
+
+ PHP_EXTENSION(xml, $ext_shared)
+ PHP_SUBST(EXPAT_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
- if test "$PHP_XML" = "yes"; then
- CPPFLAGS="$CPPFLAGS -DXML_BYTE_ORDER=$order"
- EXPAT_INTERNAL_LIBADD="expat/libexpat.la"
- PHP_SUBST(EXPAT_INTERNAL_LIBADD)
- EXPAT_SUBDIRS="expat"
- PHP_SUBST(EXPAT_SUBDIRS)
- PHP_SUBST(EXPAT_SHARED_LIBADD)
- PHP_EXTENSION(xml, $ext_shared)
- LIB_BUILD($ext_builddir/expat,$ext_shared,yes)
- LIB_BUILD($ext_builddir/expat/xmlparse,$ext_shared,yes)
- LIB_BUILD($ext_builddir/expat/xmltok,$ext_shared,yes)
- PHP_ADD_INCLUDE($ext_srcdir/expat/xmltok)
- PHP_ADD_INCLUDE($ext_srcdir/expat/xmlparse)
- PHP_FAST_OUTPUT($ext_builddir/expat/Makefile $ext_builddir/expat/xmlparse/Makefile $ext_builddir/expat/xmltok/Makefile)
-
- else
-
- EXPAT_DIR="$withval"
- if test -f $EXPAT_DIR/lib/libexpat.a -o -f $EXPAT_DIR/lib/libexpat.so ; then
- AC_DEFINE(HAVE_LIBEXPAT2, 1, [ ])
- PHP_ADD_INCLUDE($EXPAT_DIR/include)
- else
- AC_MSG_RESULT(not found)
- AC_MSG_ERROR(Please reinstall the expat distribution)
+ CPPFLAGS="$CPPFLAGS -DXML_BYTE_ORDER=$order"
+ EXPAT_INTERNAL_LIBADD="expat/libexpat.la"
+ PHP_SUBST(EXPAT_INTERNAL_LIBADD)
+ EXPAT_SUBDIRS="expat"
+ PHP_SUBST(EXPAT_SUBDIRS)
+ LIB_BUILD($ext_builddir/expat,$ext_shared,yes)
+ LIB_BUILD($ext_builddir/expat/xmlparse,$ext_shared,yes)
+ LIB_BUILD($ext_builddir/expat/xmltok,$ext_shared,yes)
+ PHP_ADD_INCLUDE($ext_srcdir/expat/xmltok)
+ PHP_ADD_INCLUDE($ext_srcdir/expat/xmlparse)
+ PHP_FAST_OUTPUT($ext_builddir/expat/Makefile $ext_builddir/expat/xmlparse/Makefile $ext_builddir/expat/xmltok/Makefile)
+
+else
+
+ PHP_EXTENSION(xml, $ext_shared)
+ PHP_SUBST(EXPAT_SHARED_LIBADD)
+ AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
+ AC_DEFINE(HAVE_LIBEXPAT2, 1, [Whether external expat libs are used])
+
+ for i in $PHP_XML $PHP_EXPAT_DIR; do
+ if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.s? ; then
+ EXPAT_DIR=$i
fi
+ done
- PHP_SUBST(EXPAT_SHARED_LIBADD)
- PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, EXPAT_SHARED_LIBADD)
- PHP_EXTENSION(xml, $ext_shared)
+ if test -z "$EXPAT_DIR"; then
+ AC_MSG_ERROR(not found. Please reinstall the expat distribution.)
fi
+
+ PHP_ADD_INCLUDE($EXPAT_DIR/include)
+ PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, EXPAT_SHARED_LIBADD)
fi
diff --git a/ext/xslt/config.m4 b/ext/xslt/config.m4
index f5cf260380..a4d5984a35 100644
--- a/ext/xslt/config.m4
+++ b/ext/xslt/config.m4
@@ -8,93 +8,82 @@ dnl $Id$
PHP_ARG_ENABLE(xslt, whether to enable xslt support,
[ --enable-xslt Enable xslt support])
-if test "$PHP_XSLT" != "no"; then
-
- PHP_EXTENSION(xslt, $ext_shared)
-
- PHP_ARG_WITH(xslt-sablot, whether to enable the sablotron backend,
- [ --with-xslt-sablot Enable the sablotron backend])
-
- PHP_ARG_WITH(expat-dir, libexpat dir for Sablotron XSL support,
- [ --with-expat-dir=DIR Sablotron: libexpat dir for Sablotron 0.50])
+PHP_ARG_WITH(xslt-sablot, whether to enable the XSLT Sablotron backend,
+[ --with-xslt-sablot XSLT: Enable the sablotron backend])
- if test "$PHP_XSLT_SABLOT" != "no"; then
- XSLT_CHECK_DIR=$PHP_XSLT_SABLOT
- XSLT_TEST_FILE=/include/sablot.h
- XSLT_BACKEND_NAME=Sablotron
- XSLT_LIBNAME=sablot
- fi
+PHP_ARG_WITH(expat-dir, libexpat dir for Sablotron XSL support,
+[ --with-expat-dir=DIR Sablotron: libexpat dir for Sablotron 0.50])
- condition="$XSLT_CHECK_DIR$XSLT_TEST_FILE"
-
- if test -r $condition; then
- XSLT_DIR=$XSLT_CHECK_DIR
- else
- AC_MSG_CHECKING(for $XSLT_BACKEND_NAME libraries in the default path)
- for i in /usr /usr/local; do
- condition="$i$XSLT_TEST_FILE"
- if test -r $condition; then
- XSLT_DIR=$i
- AC_MSG_RESULT(found $XSLT_BACKEND_NAME in $i)
- fi
- done
- fi
+if test "$PHP_XSLT" != "no"; then
- if test -z "$XSLT_DIR"; then
- AC_MSG_RESULT(not found)
- AC_MSG_ERROR(Please re-install the $XSLT_BACKEND_NAME distribution)
- fi
+ PHP_EXTENSION(xslt, $ext_shared)
+ PHP_SUBST(XSLT_SHARED_LIBADD)
+
+ if test "$PHP_XSLT_SABLOT" != "no"; then
+ XSLT_CHECK_DIR=$PHP_XSLT_SABLOT
+ XSLT_TEST_FILE=/include/sablot.h
+ XSLT_BACKEND_NAME=Sablotron
+ XSLT_LIBNAME=sablot
+ fi
+
+ condition="$XSLT_CHECK_DIR$XSLT_TEST_FILE"
+
+ if test -r $condition; then
+ XSLT_DIR=$XSLT_CHECK_DIR
+ else
+ AC_MSG_CHECKING(for $XSLT_BACKEND_NAME libraries in the default path)
+ for i in /usr /usr/local; do
+ condition="$i$XSLT_TEST_FILE"
+ if test -r $condition; then
+ XSLT_DIR=$i
+ AC_MSG_RESULT(found $XSLT_BACKEND_NAME in $i)
+ fi
+ done
+ fi
+
+ if test -z "$XSLT_DIR"; then
+ AC_MSG_ERROR(not found. Please re-install the $XSLT_BACKEND_NAME distribution)
+ fi
-
- if test -z "$XSLT_DIR"; then
- AC_MSG_RESULT(not found)
- AC_MSG_ERROR(Please re-install the $XSLT_BACKEND distribution)
- fi
-
- PHP_ADD_INCLUDE($XSLT_DIR/include)
-
- PHP_SUBST(XSLT_SHARED_LIBADD)
- PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_DIR/lib, XSLT_SHARED_LIBADD)
-
- if test "$PHP_XSLT_SABLOT" != "no"; then
- if test -z "$PHP_EXPAT_DIR"; then
- PHP_EXPAT_DIR=""
- fi
-
- found_expat=no
- for i in $PHP_EXPAT_DIR $XSLT_DIR; do
- if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.so; then
- AC_DEFINE(HAVE_LIBEXPAT2, 1, [ ])
- PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib)
- found_expat=yes
- fi
- done
-
- if test "$found_expat" = "no"; then
- PHP_ADD_LIBRARY(xmlparse)
- PHP_ADD_LIBRARY(xmltok)
- fi
-
- found_iconv=no
- AC_CHECK_LIB(c, iconv_open, found_iconv=yes)
- if test "$found_iconv" = "no"; then
- if test "$PHP_ICONV" = "no"; then
- for i in /usr /usr/local; do
- if test -f $i/lib/libconv.a -o -f $i/lib/libiconv.so; then
- PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib)
- found_iconv=yes
- fi
- done
- fi
- fi
-
- if test "$found_iconv" = "no"; then
- AC_MSG_ERROR(iconv not found, in order to build sablotron you need the iconv library)
- fi
+ PHP_ADD_INCLUDE($XSLT_DIR/include)
+ PHP_ADD_LIBRARY_WITH_PATH($XSLT_LIBNAME, $XSLT_DIR/lib, XSLT_SHARED_LIBADD)
+
+ if test "$PHP_XSLT_SABLOT" != "no"; then
+ found_expat=no
+ for i in $PHP_EXPAT_DIR $XSLT_DIR; do
+ if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.so; then
+ AC_DEFINE(HAVE_LIBEXPAT2, 1, [ ])
+ PHP_ADD_INCLUDE($i/include)
+ PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib)
+ found_expat=yes
+ fi
+ done
+
+ if test "$found_expat" = "no"; then
+ PHP_ADD_LIBRARY(xmlparse)
+ PHP_ADD_LIBRARY(xmltok)
+ fi
+
+ found_iconv=no
+ AC_CHECK_LIB(c, iconv_open, found_iconv=yes)
+ if test "$found_iconv" = "no"; then
+ if test "$PHP_ICONV" = "no"; then
+ for i in /usr /usr/local; do
+ if test -f $i/lib/libconv.a -o -f $i/lib/libiconv.so; then
+ PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib)
+ found_iconv=yes
+ fi
+ done
+ fi
+ fi
+
+ if test "$found_iconv" = "no"; then
+ AC_MSG_ERROR(iconv not found, in order to build sablotron you need the iconv library)
+ fi
- AC_DEFINE(HAVE_SABLOT, 1, [ ])
- AC_CHECK_LIB(sablot, SablotSetEncoding, AC_DEFINE(HAVE_SABLOT_SET_ENCODING, 1, [ ]))
- fi
+ AC_DEFINE(HAVE_SABLOT_BACKEND, 1, [ ])
+ AC_CHECK_LIB(sablot, SablotSetEncoding, AC_DEFINE(HAVE_SABLOT_SET_ENCODING, 1, [ ]))
+ fi
- AC_DEFINE(HAVE_XSLT, 1, [ ])
+ AC_DEFINE(HAVE_XSLT, 1, [ ])
fi
diff --git a/ext/xslt/php_sablot.h b/ext/xslt/php_sablot.h
index 0f0235248b..59934b1949 100644
--- a/ext/xslt/php_sablot.h
+++ b/ext/xslt/php_sablot.h
@@ -21,7 +21,7 @@
#include "php.h"
-#if HAVE_SABLOT
+#if HAVE_SABLOT_BACKEND
#include "php_xslt.h"
diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c
index a966eb52e5..c76d38997d 100644
--- a/ext/xslt/sablot.c
+++ b/ext/xslt/sablot.c
@@ -26,7 +26,7 @@
#include "php_sablot.h"
#include "ext/standard/info.h"
-#if HAVE_SABLOT
+#if HAVE_SABLOT_BACKEND
#include <sablot.h>