* "new and improved" iconv test

This commit is contained in:
Stig Bakken 2002-03-15 13:56:32 +00:00
parent 720c40dd4e
commit fb624cb77a
3 changed files with 50 additions and 28 deletions

View File

@ -32,16 +32,23 @@ if test "$PHP_XMLRPC" != "no"; then
AC_MSG_ERROR(XML-RPC support requires libexpat. Use --with-expat-dir=<DIR>)
fi
found_iconv=no
dnl found_iconv=no
AC_CHECK_LIB(c, iconv_open, found_iconv=yes)
if test "$found_iconv" = "no"; then
for i in /usr /usr/local $ICONV_DIR; do
if test -f $i/lib/libiconv.a -o -f $i/lib/libiconv.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib, XMLRPC_SHARED_LIBADD)
found_iconv=yes
fi
done
if test -z "$ICONV_DIR"; then
AC_MSG_ERROR(Please specify the location of iconv with --with-iconv)
fi
if test -f $ICONV_DIR/lib/lib${iconv_lib_name}.a ||
test -f $ICONV_DIR/lib/lib${iconv_lib_name}.$SHLIB_SUFFIX_NAME
then
PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/lib, XMLRPC_SHARED_LIBADD)
AC_CHECK_LIB($iconv_lib_name, libiconv_open, [
found_iconv=yes
])
else
AC_CHECK_LIB(c, iconv_open, [
found_iconv=yes
])
fi
if test "$found_iconv" = "no"; then

View File

@ -32,16 +32,23 @@ if test "$PHP_XMLRPC" != "no"; then
AC_MSG_ERROR(XML-RPC support requires libexpat. Use --with-expat-dir=<DIR>)
fi
found_iconv=no
dnl found_iconv=no
AC_CHECK_LIB(c, iconv_open, found_iconv=yes)
if test "$found_iconv" = "no"; then
for i in /usr /usr/local $ICONV_DIR; do
if test -f $i/lib/libiconv.a -o -f $i/lib/libiconv.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib, XMLRPC_SHARED_LIBADD)
found_iconv=yes
fi
done
if test -z "$ICONV_DIR"; then
AC_MSG_ERROR(Please specify the location of iconv with --with-iconv)
fi
if test -f $ICONV_DIR/lib/lib${iconv_lib_name}.a ||
test -f $ICONV_DIR/lib/lib${iconv_lib_name}.$SHLIB_SUFFIX_NAME
then
PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/lib, XMLRPC_SHARED_LIBADD)
AC_CHECK_LIB($iconv_lib_name, libiconv_open, [
found_iconv=yes
])
else
AC_CHECK_LIB(c, iconv_open, [
found_iconv=yes
])
fi
if test "$found_iconv" = "no"; then

View File

@ -70,14 +70,22 @@ if test "$PHP_XSLT" != "no"; then
fi
found_iconv=no
AC_CHECK_LIB(c, iconv_open, found_iconv=yes)
if test "$found_iconv" = "no"; then
for i in /usr /usr/local $ICONV_DIR; do
if test -f $i/lib/libiconv.a -o -f $i/lib/libiconv.so; then
PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib, XSLT_SHARED_LIBADD)
found_iconv=yes
fi
done
if test -z "$ICONV_DIR"; then
AC_MSG_ERROR(Please specify the location of iconv with --with-iconv)
fi
if test -f $ICONV_DIR/lib/lib${iconv_lib_name}.a ||
test -f $ICONV_DIR/lib/lib${iconv_lib_name}.$SHLIB_SUFFIX_NAME
then
PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/lib, XSLT_SHARED_LIBADD)
AC_CHECK_LIB($iconv_lib_name, libiconv_open, [
found_iconv=yes
])
else
AC_CHECK_LIB(c, iconv_open, [
found_iconv=yes
])
fi
if test "$found_iconv" = "no"; then