summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2001-05-01 03:26:04 +0000
committerSterling Hughes <sterling@php.net>2001-05-01 03:26:04 +0000
commit11961e658529725ffd4fba5ad9a40648e986ae0b (patch)
tree5f0039ec4bbbed0d358d3f5a19e8e8d6702d0502 /ext
parent09197a4531025ca26271b5c52772cc0419c83e34 (diff)
downloadphp-git-11961e658529725ffd4fba5ad9a40648e986ae0b.tar.gz
Check for the existance of the iconv library
# Not sure if this is correct, I can verify that it doesn't break anything # and it logically looks like it would work. Can someone test this (BSD # and/or Windows)
Diffstat (limited to 'ext')
-rw-r--r--ext/sablot/config.m418
-rw-r--r--ext/xslt/config.m417
2 files changed, 35 insertions, 0 deletions
diff --git a/ext/sablot/config.m4 b/ext/sablot/config.m4
index aa45004725..1d13c282c8 100644
--- a/ext/sablot/config.m4
+++ b/ext/sablot/config.m4
@@ -49,6 +49,24 @@ if test "$PHP_SABLOT" != "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,[ ])
diff --git a/ext/xslt/config.m4 b/ext/xslt/config.m4
index f1685069b1..e398a1adbe 100644
--- a/ext/xslt/config.m4
+++ b/ext/xslt/config.m4
@@ -72,6 +72,23 @@ if test "$PHP_XSLT" != "no"; then
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