|
Packit |
a07778 |
dnl gettext utilities
|
|
Packit |
a07778 |
dnl
|
|
Packit |
a07778 |
dnl Copyright (C) 2018 Red Hat, Inc.
|
|
Packit |
a07778 |
dnl
|
|
Packit |
a07778 |
dnl This library is free software; you can redistribute it and/or
|
|
Packit |
a07778 |
dnl modify it under the terms of the GNU Lesser General Public
|
|
Packit |
a07778 |
dnl License as published by the Free Software Foundation; either
|
|
Packit |
a07778 |
dnl version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
a07778 |
dnl
|
|
Packit |
a07778 |
dnl This library is distributed in the hope that it will be useful,
|
|
Packit |
a07778 |
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
a07778 |
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
a07778 |
dnl Lesser General Public License for more details.
|
|
Packit |
a07778 |
dnl
|
|
Packit |
a07778 |
dnl You should have received a copy of the GNU Lesser General Public
|
|
Packit |
a07778 |
dnl License along with this library. If not, see
|
|
Packit |
a07778 |
dnl <http://www.gnu.org/licenses/>.
|
|
Packit |
a07778 |
dnl
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
AC_DEFUN([LIBVIRT_GLIB_ARG_NLS],[
|
|
Packit |
a07778 |
m4_divert_text([DEFAULTS], [[enable_nls=yes]])
|
|
Packit |
a07778 |
AC_ARG_ENABLE([nls],
|
|
Packit |
a07778 |
[AS_HELP_STRING([--enable-nls],
|
|
Packit |
a07778 |
[NLS @<:@default=yes@:>@])])
|
|
Packit |
a07778 |
])
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
AC_DEFUN([LIBVIRT_GLIB_CHECK_NLS],[
|
|
Packit |
a07778 |
dnl GNU gettext tools (optional).
|
|
Packit |
a07778 |
AC_CHECK_PROG([XGETTEXT], [xgettext], [xgettext], [no])
|
|
Packit |
a07778 |
AC_CHECK_PROG([MSGFMT], [msgfmt], [msgfmt], [no])
|
|
Packit |
a07778 |
AC_CHECK_PROG([MSGMERGE], [msgmerge], [msgmerge], [no])
|
|
Packit |
a07778 |
|
|
Packit |
a07778 |
dnl Check they are the GNU gettext tools.
|
|
Packit |
a07778 |
AC_MSG_CHECKING([msgfmt is GNU tool])
|
|
Packit |
a07778 |
if $MSGFMT --version >/dev/null 2>&1 && $MSGFMT --version | grep -q 'GNU gettext'; then
|
|
Packit |
a07778 |
msgfmt_is_gnu=yes
|
|
Packit |
a07778 |
else
|
|
Packit |
a07778 |
msgfmt_is_gnu=no
|
|
Packit |
a07778 |
fi
|
|
Packit |
a07778 |
AC_MSG_RESULT([$msgfmt_is_gnu])
|
|
Packit |
a07778 |
AM_CONDITIONAL([ENABLE_NLS], [test "x$enable_nls" = "xyes"])
|
|
Packit |
a07778 |
AM_CONDITIONAL([HAVE_GNU_GETTEXT_TOOLS],
|
|
Packit |
a07778 |
[test "x$XGETTEXT" != "xno" && test "x$MSGFMT" != "xno" && \
|
|
Packit |
a07778 |
test "x$MSGMERGE" != "xno" && test "x$msgfmt_is_gnu" != "xno"])
|
|
Packit |
a07778 |
])
|