cvs: php4 /ext/fribidi config.m4 fribidi.c

From: Date: Sun, 19 Aug 2001 06:37:06 +0000
Subject: cvs: php4 /ext/fribidi config.m4 fribidi.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6951@lists.php.net to get a copy of this message
sniper Sun Aug 19 02:37:06 2001 EDT Modified files: /php4/ext/fribidi config.m4 fribidi.c Log: Fixed bug: #11232. Now we require Fribidi 0.9.0. # Better use the latest version for this one too since # it seems to have stabilized and they made an internal # rewrite for that one. Index: php4/ext/fribidi/config.m4 diff -u php4/ext/fribidi/config.m4:1.5 php4/ext/fribidi/config.m4:1.6 --- php4/ext/fribidi/config.m4:1.5 Sat May 12 07:08:49 2001 +++ php4/ext/fribidi/config.m4 Sun Aug 19 02:37:05 2001 @@ -1,16 +1,11 @@ -dnl $Id: config.m4,v 1.5 2001/05/12 11:08:49 sas Exp $ +dnl $Id: config.m4,v 1.6 2001/08/19 06:37:05 sniper Exp $ dnl config.m4 for extension fribidi -dnl don't forget to call PHP_EXTENSION(fribidi) - - PHP_ARG_WITH(fribidi, whether to add fribidi support, [ --with-fribidi[=DIR] Include fribidi support (requires FriBidi >=0.1.12). DIR is the fribidi installation directory - default /usr/local/]) - - if test "$PHP_FRIBIDI" != "no"; then dnl if module was requested with default path of fribidi installation then @@ -19,8 +14,6 @@ if test "$PHP_FRIBIDI" = "yes"; then PHP_FRIBIDI=/usr/local fi - - dnl check for fribidi header files @@ -32,8 +25,6 @@ AC_MSG_RESULT([missing]) fi - - dnl check for fribidi shared library AC_MSG_CHECKING([for libfribidi.so file in "$PHP_FRIBIDI/lib/"]) @@ -54,20 +45,35 @@ AC_MSG_RESULT([missing]) fi + + dnl check for fribidi version + AC_MSG_CHECKING([for FriBidi version]) + FRIBIDI_CONFIG=$PHP_FRIBIDI/bin/fribidi-config + if test -x $FRIBIDI_CONFIG; then + fribidi_version_full=$FRIBIDI_CONFIG --version + fi + + fribidi_version=echo ${fribidi_version_full} | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}' + + if test "$fribidi_version" -ge 9000; then + AC_MSG_RESULT([$fribidi_version_full]) + else + AC_MSG_ERROR(FriBidi version 0.9.0 or later is required to compile php with FriBidi support) + fi + AC_MSG_CHECKING([sanity to build extension]) if test -n "$FRIBIDI_INCDIR" && test -n "$FRIBIDI_LIBDIR" && test -n "$GLIB_INCDIR"; then AC_MSG_RESULT([yes]) - PHP_ADD_INCLUDE("$FRIBIDI_INCDIR") PHP_ADD_INCLUDE("$GLIB_INCDIR") PHP_ADD_LIBRARY_WITH_PATH(fribidi,"$FRIBIDI_LIBDIR", FRIBIDI_SHARED_LIBADD) - PHP_SUBST(FRIBIDI_SHARED_LIBADD) AC_DEFINE(HAVE_FRIBIDI, 1, [ ]) PHP_EXTENSION(fribidi, $ext_shared) + PHP_SUBST(FRIBIDI_SHARED_LIBADD) else AC_MSG_RESULT([no]) fi Index: php4/ext/fribidi/fribidi.c diff -u php4/ext/fribidi/fribidi.c:1.7 php4/ext/fribidi/fribidi.c:1.8 --- php4/ext/fribidi/fribidi.c:1.7 Sat Aug 11 12:38:27 2001 +++ php4/ext/fribidi/fribidi.c Sun Aug 19 02:37:05 2001 @@ -12,11 +12,11 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Authors: | + | Authors: Onn Ben-Zvi <onn@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: fribidi.c,v 1.7 2001/08/11 16:38:27 zeev Exp $ */ +/* $Id: fribidi.c,v 1.8 2001/08/19 06:37:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -66,8 +66,8 @@ PHP_MINIT_FUNCTION(fribidi) { REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_UTF8", FRIBIDI_CHARSET_UTF8, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_6", FRIBIDI_CHARSET_8859_6, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_8", FRIBIDI_CHARSET_8859_8, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_6", FRIBIDI_CHARSET_ISO8859_6, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_8", FRIBIDI_CHARSET_ISO8859_8, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_CP1255", FRIBIDI_CHARSET_CP1255, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_CP1256", FRIBIDI_CHARSET_CP1256, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_ISIRI_3342", FRIBIDI_CHARSET_ISIRI_3342, CONST_CS | CONST_PERSISTENT); @@ -108,13 +108,13 @@ /* Possible values (i.e., char sets supported) */ /* FRIBIDI_CHARSET_UTF8 */ /* FRIBIDI_CHARSET_8859_6 */ -/* FRIBIDI_CHARSET_8859_8 */ -/* FRIBIDI_CHARSET_CP1255 */ -/* FRIBIDI_CHARSET_CP1256 */ -/* FRIBIDI_CHARSET_ISIRI_3342 */ +/* FRIBIDI_CHARSET_8859_8 */ +/* FRIBIDI_CHARSET_CP1255 */ +/* FRIBIDI_CHARSET_CP1256 */ +/* FRIBIDI_CHARSET_ISIRI_3342 */ /* */ /* Output: on success: The visual string. */ -/* on failure: */ +/* on failure: */ /*--------------------------------------------------------------*/ /* {{{ proto string fribidi_log2vis(string str, string direction, int charset) @@ -174,10 +174,10 @@ case FRIBIDI_CHARSET_UTF8: utf8_len=fribidi_utf8_to_unicode(inString, u_logical_str); break; - case FRIBIDI_CHARSET_8859_6: + case FRIBIDI_CHARSET_ISO8859_6: fribidi_iso8859_6_to_unicode(inString, u_logical_str); break; - case FRIBIDI_CHARSET_8859_8: + case FRIBIDI_CHARSET_ISO8859_8: fribidi_iso8859_8_to_unicode(inString, u_logical_str); break; case FRIBIDI_CHARSET_CP1255: @@ -211,10 +211,10 @@ case FRIBIDI_CHARSET_UTF8: fribidi_unicode_to_utf8(u_visual_str, utf8_len , outString); break; - case FRIBIDI_CHARSET_8859_6: + case FRIBIDI_CHARSET_ISO8859_6: fribidi_unicode_to_iso8859_6(u_visual_str, len , outString); break; - case FRIBIDI_CHARSET_8859_8: + case FRIBIDI_CHARSET_ISO8859_8: fribidi_unicode_to_iso8859_8(u_visual_str, len , outString); break; case FRIBIDI_CHARSET_CP1255:

« previous php.cvs (#6951) next »