mc-i18n.m4 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. dnl @synopsis mc_I18N
  2. dnl
  3. dnl Check if environment is ready for get translations of docs from transifex
  4. dnl
  5. dnl @author Slava Zanko <slavazanko@gmail.com>
  6. dnl @version 2011-02-10
  7. dnl @license GPL
  8. dnl @copyright Free Software Foundation, Inc.
  9. AC_DEFUN([mc_I18N],[
  10. dnl User visible support for charset conversion.
  11. AC_ARG_ENABLE([charset],
  12. AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@]))
  13. have_charset=
  14. charset_msg="no"
  15. if test "x$enable_charset" != "xno"; then
  16. AC_DEFINE(HAVE_CHARSET, 1, [Define to enable charset selection and conversion])
  17. have_charset=yes
  18. charset_msg="yes"
  19. AC_CHECK_HEADERS([gnu/libc-version.h])
  20. dnl Solaris has different name of Windows 1251 encoding
  21. case $host_os in
  22. solaris*)
  23. ENCODING_CP1251="ANSI-1251"
  24. ;;
  25. *)
  26. ENCODING_CP1251="CP1251"
  27. ;;
  28. esac
  29. if test "x$ac_cv_header_gnu_libc_version_h" != "xno"; then
  30. ENCODING_CP866="IBM866"
  31. ENCODING_ISO8859="ISO-8859"
  32. else
  33. ENCODING_CP866="CP866"
  34. ENCODING_ISO8859="ISO8859"
  35. fi
  36. AC_SUBST(ENCODING_CP1251)
  37. AC_SUBST(ENCODING_CP866)
  38. fi
  39. ])