summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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