diff options
author | Rui Hirokawa <hirokawa@php.net> | 2001-01-09 15:22:45 +0000 |
---|---|---|
committer | Rui Hirokawa <hirokawa@php.net> | 2001-01-09 15:22:45 +0000 |
commit | 4e035d035aa0d4fdd2d9618e41398c20a1f24e9b (patch) | |
tree | 3a61b10f0cab202d7d422ce53de33092312a6bb4 /ext/iconv/config.m4 | |
parent | 0afcb03de3816d745ba79c5e27bbe3d7998106eb (diff) | |
download | php-git-4e035d035aa0d4fdd2d9618e41398c20a1f24e9b.tar.gz |
move iconv related functions to separate iconv extension.
Diffstat (limited to 'ext/iconv/config.m4')
-rw-r--r-- | ext/iconv/config.m4 | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 new file mode 100644 index 0000000000..2bf91e395b --- /dev/null +++ b/ext/iconv/config.m4 @@ -0,0 +1,38 @@ +dnl $Id$ +dnl config.m4 for extension iconv + +PHP_ARG_WITH(iconv, for iconv support, +[ --with-iconv[=DIR] Include iconv support]) + +if test "$PHP_ICONV" != "no"; then + + if test -r $PHP_ICONV/include/iconv.h; then + ICONV_DIR=$PHP_ICONV + else + AC_MSG_CHECKING(for iconv in default path) + for i in /usr/local /usr; do + if test -r $i/include/iconv.h; then + ICONV_DIR=$i + AC_MSG_RESULT(found in $i) + fi + done + fi + + if test -z "$ICONV_DIR"; then + AC_MSG_RESULT(not found) + AC_MSG_ERROR(Please reinstall the iconv library) + fi + + AC_ADD_INCLUDE($ICONV_DIR/include) + + PHP_SUBST(ICONV_SHARED_LIBADD) + + if test -f $ICONV_DIR/lib/libconv.a -o -f $ICONV_DIR/lib/libiconv.so ; then + AC_CHECK_LIB(iconv, iconv_open, AC_DEFINE(HAVE_ICONV, 1, [ ])) + AC_ADD_LIBRARY_WITH_PATH(iconv, $ICONV_DIR/lib, ICONV_SHARED_LIBADD) + else + AC_CHECK_LIB(c, iconv_open, AC_DEFINE(HAVE_ICONV, 1, [ ])) + fi + + PHP_EXTENSION(iconv, $ext_shared) +fi |