diff options
author | foobar <sniper@php.net> | 2002-03-17 21:09:21 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-03-17 21:09:21 +0000 |
commit | 19e82a49f96393a7ae93331db73ef895f3c61376 (patch) | |
tree | a7d616a261888c324c13fd33788dca8ca3c7fb05 /ext/iconv/config.m4 | |
parent | 0d3a45299da1a36dd54680221494917e7ae65597 (diff) | |
download | php-git-19e82a49f96393a7ae93331db73ef895f3c61376.tar.gz |
- Made one test/setup macro for iconv and fixed it to check
for libc first.
Diffstat (limited to 'ext/iconv/config.m4')
-rw-r--r-- | ext/iconv/config.m4 | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index fbb417025d..12e14d7ad8 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -7,34 +7,11 @@ PHP_ARG_WITH(iconv, for iconv support, if test "$PHP_ICONV" != "no"; then - iconv_lib_name=iconv - for i in $PHP_ICONV /usr/local /usr; do - if test -r $i/include/giconv.h || test -r $i/include/iconv.h; then - ICONV_DIR=$i - if test -r $i/include/giconv.h; then - iconv_lib_name=giconv - fi - break - fi - done - - if test -z "$ICONV_DIR"; then + PHP_SETUP_ICONV(ICONV_SHARED_LIBADD, [ + PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) + PHP_SUBST(ICONV_SHARED_LIBADD) + ], [ AC_MSG_ERROR(Please reinstall the iconv library.) - 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, ICONV_SHARED_LIBADD) - AC_CHECK_LIB($iconv_lib_name, libiconv_open, [ - AC_DEFINE(HAVE_ICONV, 1, [ ]) - AC_DEFINE(HAVE_LIBICONV, 1, [ ]) - ]) - else - AC_CHECK_LIB(c, iconv_open, AC_DEFINE(HAVE_ICONV, 1, [ ])) - fi + ]) - PHP_ADD_INCLUDE($ICONV_DIR/include) - PHP_EXTENSION(iconv, $ext_shared) - PHP_SUBST(ICONV_SHARED_LIBADD) fi |