diff options
author | Tom Lane | 2008-05-27 22:18:18 +0000 |
---|---|---|
committer | Tom Lane | 2008-05-27 22:18:18 +0000 |
commit | 19423aafc55434168d1e951bb2325719e87ece40 (patch) | |
tree | 4f5d51d960001a90702f6658e9e0e166eaf0a73c | |
parent | 15e27c480b9aed14dd54138bae4dc1d3dc4048cf (diff) |
Require bind_textdomain_codeset() not just gettext() to enable NLS support.
GNU gettext before 0.10.36 does not have that function, and is generally too
incomplete to be usable.
-rw-r--r-- | config/programs.m4 | 6 | ||||
-rwxr-xr-x | configure | 24 |
2 files changed, 16 insertions, 14 deletions
diff --git a/config/programs.m4 b/config/programs.m4 index 2b3ffcedc2..6eb6b4948d 100644 --- a/config/programs.m4 +++ b/config/programs.m4 @@ -187,10 +187,13 @@ AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1, # PGAC_CHECK_GETTEXT # ------------------ +# We check for bind_textdomain_codeset() not just gettext(). GNU gettext +# before 0.10.36 does not have that function, and is generally too incomplete +# to be usable. AC_DEFUN([PGAC_CHECK_GETTEXT], [ - AC_SEARCH_LIBS(gettext, intl, [], + AC_SEARCH_LIBS(bind_textdomain_codeset, intl, [], [AC_MSG_ERROR([a gettext implementation is required for NLS])]) AC_CHECK_HEADER([libintl.h], [], [AC_MSG_ERROR([header file <libintl.h> is required for NLS])]) @@ -199,7 +202,6 @@ AC_DEFUN([PGAC_CHECK_GETTEXT], AC_MSG_ERROR([msgfmt is required for NLS]) fi AC_CHECK_PROGS(MSGMERGE, msgmerge) -dnl FIXME: We should probably check for version >=0.10.36. AC_CHECK_PROGS(XGETTEXT, xgettext) ])# PGAC_CHECK_GETTEXT @@ -24625,9 +24625,9 @@ _ACEOF if test "$enable_nls" = yes ; then - { echo "$as_me:$LINENO: checking for library containing gettext" >&5 -echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6; } -if test "${ac_cv_search_gettext+set}" = set; then + { echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5 +echo $ECHO_N "checking for library containing bind_textdomain_codeset... $ECHO_C" >&6; } +if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS @@ -24644,11 +24644,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char gettext (); +char bind_textdomain_codeset (); int main () { -return gettext (); +return bind_textdomain_codeset (); ; return 0; } @@ -24678,7 +24678,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_search_gettext=$ac_res + ac_cv_search_bind_textdomain_codeset=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -24688,21 +24688,21 @@ fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext - if test "${ac_cv_search_gettext+set}" = set; then + if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then break fi done -if test "${ac_cv_search_gettext+set}" = set; then +if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then : else - ac_cv_search_gettext=no + ac_cv_search_bind_textdomain_codeset=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5 -echo "${ECHO_T}$ac_cv_search_gettext" >&6; } -ac_res=$ac_cv_search_gettext +{ echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5 +echo "${ECHO_T}$ac_cv_search_bind_textdomain_codeset" >&6; } +ac_res=$ac_cv_search_bind_textdomain_codeset if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |