diff options
author | Bruno Haible <bruno@clisp.org> | 2001-01-17 17:45:22 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-01-17 17:45:22 +0000 |
commit | a7a991ef5dcd4db939e5a90957a431544d1864d8 (patch) | |
tree | c4b90b94b9ce88e7b9bb2b97568c1a8909240368 /m4/setlocale.m4 | |
parent | 67053507debd8316db3c810227ab721d4eb15e38 (diff) | |
download | external_gettext-a7a991ef5dcd4db939e5a90957a431544d1864d8.zip external_gettext-a7a991ef5dcd4db939e5a90957a431544d1864d8.tar.gz external_gettext-a7a991ef5dcd4db939e5a90957a431544d1864d8.tar.bz2 |
Since gettext is doesn't translate any more in the C locale, we must use
setlocale() in the testsuite. But since SunOS 4 and other old systems have
no other locales than the C locale, we must implement a fake setlocale()
ourselves.
Diffstat (limited to 'm4/setlocale.m4')
-rw-r--r-- | m4/setlocale.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/m4/setlocale.m4 b/m4/setlocale.m4 new file mode 100644 index 0000000..3b400ca --- /dev/null +++ b/m4/setlocale.m4 @@ -0,0 +1,26 @@ +#serial 1 + +# Check for setlocale declaration. + +AC_DEFUN(gt_SETLOCALE,[ +AC_CHECK_HEADERS([locale.h]) +AC_MSG_CHECKING([for setlocale declaration]) +AC_CACHE_VAL(gt_cv_proto_setlocale, [ +AC_TRY_COMPILE([ +#include <stdlib.h> +#ifdef HAVE_LOCALE_H +#include <locale.h> +#endif +#if defined(__STDC__) || defined(__cplusplus) +char* setlocale (int category, char* locale); +#else +char* setlocale(); +#endif +], [], gt_cv_proto_setlocale_arg1="", gt_cv_proto_setlocale_arg1="const") +gt_cv_proto_setlocale="extern char* setlocale (int, $gt_cv_proto_setlocale_arg1 char*);"]) +gt_cv_proto_setlocale=`echo "[$]gt_cv_proto_setlocale" | tr -s ' ' | sed -e 's/( /(/'` +AC_MSG_RESULT([$]{ac_t:- + }[$]gt_cv_proto_setlocale) +AC_DEFINE_UNQUOTED(SETLOCALE_CONST,$gt_cv_proto_setlocale_arg1, + [Define as const if the declaration of setlocale() needs const.]) +]) |