1dnl gettext setup 2 3dnl AG_GST_GETTEXT([gettext-package]) 4dnl defines GETTEXT_PACKAGE and LOCALEDIR 5 6AC_DEFUN([AG_GST_GETTEXT], 7[ 8 if test "$USE_NLS" = "yes"; then 9 GETTEXT_PACKAGE=[$1] 10 else 11 GETTEXT_PACKAGE=[NULL] 12 fi 13 AC_SUBST(GETTEXT_PACKAGE) 14 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", 15 [gettext package name]) 16 17 dnl make sure po/Makevars is kept in sync with GETTEXT_PACKAGE 18 if test -e "${srcdir}/po/Makevars"; then 19 if ! grep -e "$1" "${srcdir}/po/Makevars"; then 20 AC_MSG_ERROR([DOMAIN in po/Makevars does not match GETTEXT_PACKAGE $1]) 21 fi 22 fi 23 24 dnl define LOCALEDIR in config.h 25 AS_AC_EXPAND(LOCALEDIR, $datadir/locale) 26 AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR", 27 [gettext locale dir]) 28]) 29