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 | |
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')
-rw-r--r-- | ext/iconv/config.m4 | 33 | ||||
-rw-r--r-- | ext/rpc/xmlrpc/config.m4 | 24 | ||||
-rw-r--r-- | ext/xmlrpc/config.m4 | 24 | ||||
-rw-r--r-- | ext/xslt/config.m4 | 25 |
4 files changed, 12 insertions, 94 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 diff --git a/ext/rpc/xmlrpc/config.m4 b/ext/rpc/xmlrpc/config.m4 index 69eb0b4232..a7f4fae3b8 100644 --- a/ext/rpc/xmlrpc/config.m4 +++ b/ext/rpc/xmlrpc/config.m4 @@ -32,29 +32,9 @@ if test "$PHP_XMLRPC" != "no"; then AC_MSG_ERROR(XML-RPC support requires libexpat. Use --with-expat-dir=<DIR>) fi - found_iconv=no - - 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 + PHP_SETUP_ICONV(XMLRPC_SHARED_LIBADD, [], [ AC_MSG_ERROR([iconv not found, in order to build xmlrpc you need the iconv library]) - fi - + ]) fi diff --git a/ext/xmlrpc/config.m4 b/ext/xmlrpc/config.m4 index 69eb0b4232..a7f4fae3b8 100644 --- a/ext/xmlrpc/config.m4 +++ b/ext/xmlrpc/config.m4 @@ -32,29 +32,9 @@ if test "$PHP_XMLRPC" != "no"; then AC_MSG_ERROR(XML-RPC support requires libexpat. Use --with-expat-dir=<DIR>) fi - found_iconv=no - - 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 + PHP_SETUP_ICONV(XMLRPC_SHARED_LIBADD, [], [ AC_MSG_ERROR([iconv not found, in order to build xmlrpc you need the iconv library]) - fi - + ]) fi diff --git a/ext/xslt/config.m4 b/ext/xslt/config.m4 index f8fdacfebb..e1305bec3f 100644 --- a/ext/xslt/config.m4 +++ b/ext/xslt/config.m4 @@ -69,29 +69,10 @@ if test "$PHP_XSLT" != "no"; then PHP_ADD_LIBRARY(xmltok) fi - found_iconv=no - - 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 + PHP_SETUP_ICONV(XSLT_SHARED_LIBADD, [], [ AC_MSG_ERROR([iconv not found, in order to build sablotron you need the iconv library]) - fi - + ]) + if test "$PHP_SABLOT_JS" != "no"; then found_js=no AC_CHECK_LIB(js, JS_GetRuntime, found_js=yes) |