cvs: php4 /ext/gettext config.m4 gettext.c php_gettext.h

From: Date: Wed, 29 Aug 2001 13:13:24 +0000
Subject: cvs: php4 /ext/gettext config.m4 gettext.c php_gettext.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7118@lists.php.net to get a copy of this message
wez Wed Aug 29 09:13:24 2001 EDT Modified files: /php4/ext/gettext config.m4 gettext.c php_gettext.h Log: fix build Index: php4/ext/gettext/config.m4 diff -u php4/ext/gettext/config.m4:1.7 php4/ext/gettext/config.m4:1.8 --- php4/ext/gettext/config.m4:1.7 Sat May 12 07:08:50 2001 +++ php4/ext/gettext/config.m4 Wed Aug 29 09:13:24 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.7 2001/05/12 11:08:50 sas Exp $ +dnl $Id: config.m4,v 1.8 2001/08/29 13:13:24 wez Exp $ dnl config.m4 for extension gettext dnl don't forget to call PHP_EXTENSION(gettext) @@ -22,11 +22,17 @@ O_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR" - AC_CHECK_LIB(intl, bindtextdomain, GETTEXT_LIBS=intl,[ - AC_CHECK_LIB(c, bindtextdomain, GETTEXT_LIBS= ,[ - AC_MSG_ERROR(Unable to find required gettext library) - ]) - ]) + AC_CHECK_LIB(intl, bindtextdomain, [ + GETTEXT_LIBS=intl + GETTEXT_CHECK_IN_LIB=intl + ], + AC_CHECK_LIB(c, bindtextdomain, [ + GETTEXT_LIBS= + GETTEXT_CHECK_IN_LIB=c + ],[ + AC_MSG_ERROR(Unable to find required gettext library) + ]) + ) LDFLAGS=$O_LDFLAGS AC_DEFINE(HAVE_LIBINTL,1,[ ]) @@ -38,4 +44,9 @@ fi PHP_ADD_INCLUDE($GETTEXT_INCDIR) + + AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, ngettext, [AC_DEFINE(HAVE_NGETTEXT, 1, [ ])]) + AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dngettext, [AC_DEFINE(HAVE_DNGETTEXT, 1, [ ])]) + AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dcngettext, [AC_DEFINE(HAVE_DCNGETTEXT, 1, [ ])]) + fi Index: php4/ext/gettext/gettext.c diff -u php4/ext/gettext/gettext.c:1.32 php4/ext/gettext/gettext.c:1.33 --- php4/ext/gettext/gettext.c:1.32 Mon Aug 27 18:26:49 2001 +++ php4/ext/gettext/gettext.c Wed Aug 29 09:13:24 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gettext.c,v 1.32 2001/08/27 22:26:49 sniper Exp $ */ +/* $Id: gettext.c,v 1.33 2001/08/29 13:13:24 wez Exp $ */ #include <stdio.h> #ifdef HAVE_CONFIG_H @@ -40,9 +40,15 @@ PHP_FE(dgettext, NULL) PHP_FE(dcgettext, NULL) PHP_FE(bindtextdomain, NULL) +#if HAVE_NGETTEXT PHP_FE(ngettext, NULL) +#endif +#if HAVE_DNGETTEXT PHP_FE(dngettext, NULL) +#endif +#if HAVE_DCNGETTEXT PHP_FE(dcngettext, NULL) +#endif {NULL, NULL, NULL} }; /* }}} */ @@ -177,6 +183,7 @@ } /* }}} */ +#if HAVE_NGETTEXT /* {{{ proto string ngettext(string MSGID1, string MSGID2, int N) Plural version of gettext() */ PHP_FUNCTION(ngettext) @@ -200,7 +207,9 @@ } } /* }}} */ +#endif +#if HAVE_DNGETTEXT /* {{{ proto string dngettext (string domain, string msgid1, string msgid2, long count) Plural version of dgettext() */ PHP_FUNCTION(dngettext) @@ -226,7 +235,9 @@ } } /* }}} */ +#endif +#if HAVE_DCNGETTEXT /* {{{ proto string dcngettext (string domain, string msgid1, string msgid2, long n, int category) Plural version of dcgettext() */ PHP_FUNCTION(dcngettext) @@ -253,6 +264,8 @@ } } } +/* }}} */ +#endif #endif /* HAVE_LIBINTL */ @@ -264,3 +277,4 @@ * vim600: sw=4 ts=4 tw=78 fdm=marker * vim<600: sw=4 ts=4 tw=78 */ + Index: php4/ext/gettext/php_gettext.h diff -u php4/ext/gettext/php_gettext.h:1.12 php4/ext/gettext/php_gettext.h:1.13 --- php4/ext/gettext/php_gettext.h:1.12 Mon Aug 27 14:43:07 2001 +++ php4/ext/gettext/php_gettext.h Wed Aug 29 09:13:24 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_gettext.h,v 1.12 2001/08/27 18:43:07 chagenbu Exp $ */ +/* $Id: php_gettext.h,v 1.13 2001/08/29 13:13:24 wez Exp $ */ #ifndef PHP_GETTEXT_H #define PHP_GETTEXT_H @@ -36,9 +36,15 @@ PHP_FUNCTION(dgettext); PHP_FUNCTION(dcgettext); PHP_FUNCTION(bindtextdomain); +#if HAVE_NGETTEXT PHP_FUNCTION(ngettext); +#endif +#if HAVE_DNGETTEXT PHP_FUNCTION(dngettext); +#endif +#if HAVE_DCNGETTEXT PHP_FUNCTION(dcngettext); +#endif #else #define gettext_module_ptr NULL

« previous php.cvs (#7118) next »