diff options
author | Wez Furlong <wez@php.net> | 2001-08-29 13:13:24 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2001-08-29 13:13:24 +0000 |
commit | efdc50c175198e4aece46b6952e58e23227721a8 (patch) | |
tree | 7d9215231ba27179b6b31741fc97cbc43be39668 | |
parent | e6c7f6f22cb774b6eb39593ec07303c5f09cf85f (diff) | |
download | php-git-efdc50c175198e4aece46b6952e58e23227721a8.tar.gz |
fix build
-rw-r--r-- | ext/gettext/config.m4 | 21 | ||||
-rw-r--r-- | ext/gettext/gettext.c | 14 | ||||
-rw-r--r-- | ext/gettext/php_gettext.h | 6 |
3 files changed, 36 insertions, 5 deletions
diff --git a/ext/gettext/config.m4 b/ext/gettext/config.m4 index c48b696c12..da184397d9 100644 --- a/ext/gettext/config.m4 +++ b/ext/gettext/config.m4 @@ -22,11 +22,17 @@ if test "$PHP_GETTEXT" != "no"; then 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 @@ if test "$PHP_GETTEXT" != "no"; then 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 diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index 6d61da97cf..eca1d20f78 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -40,9 +40,15 @@ function_entry php_gettext_functions[] = { 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 @@ PHP_FUNCTION(bindtextdomain) } /* }}} */ +#if HAVE_NGETTEXT /* {{{ proto string ngettext(string MSGID1, string MSGID2, int N) Plural version of gettext() */ PHP_FUNCTION(ngettext) @@ -200,7 +207,9 @@ PHP_FUNCTION(ngettext) } } /* }}} */ +#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 @@ PHP_FUNCTION(dngettext) } } /* }}} */ +#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 @@ PHP_FUNCTION(dcngettext) } } } +/* }}} */ +#endif #endif /* HAVE_LIBINTL */ @@ -264,3 +277,4 @@ PHP_FUNCTION(dcngettext) * vim600: sw=4 ts=4 tw=78 fdm=marker * vim<600: sw=4 ts=4 tw=78 */ + diff --git a/ext/gettext/php_gettext.h b/ext/gettext/php_gettext.h index 1cfa68f09c..8a2faf9f7c 100644 --- a/ext/gettext/php_gettext.h +++ b/ext/gettext/php_gettext.h @@ -36,9 +36,15 @@ PHP_FUNCTION(gettext); 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 |