Add configure check for libintl.h

There are some distributions which do not provide gettext support within
libc.

For these cases checking for libintl is required.

https://fedorahosted.org/freeipa/ticket/1840
This commit is contained in:
Alexander Bokovoy 2011-11-17 10:38:13 +02:00 committed by Rob Crittenden
parent ebdc752b66
commit 1f9ab4283c
2 changed files with 18 additions and 0 deletions

View File

@ -50,6 +50,7 @@ ipa_getkeytab_LDADD = \
$(OPENLDAP_LIBS) \
$(SASL_LIBS) \
$(POPT_LIBS) \
$(LIBINTL_LIBS) \
$(NULL)
ipa_rmkeytab_SOURCES = \
@ -60,6 +61,7 @@ ipa_rmkeytab_SOURCES = \
ipa_rmkeytab_LDADD = \
$(KRB5_LIBS) \
$(POPT_LIBS) \
$(LIBINTL_LIBS) \
$(NULL)
ipa_join_SOURCES = \
@ -75,6 +77,7 @@ ipa_join_LDADD = \
$(CURL_LIBS) \
$(XMLRPC_LIBS) \
$(POPT_LIBS) \
$(LIBINTL_LIBS) \
$(NULL)
SUBDIRS = \

View File

@ -174,6 +174,21 @@ if test "x$XMLRPC_LIBS" = "x" ; then
fi
AC_SUBST(XMLRPC_LIBS)
dnl ---------------------------------------------------------------------------
dnl - Check for libintl
dnl ---------------------------------------------------------------------------
SAVE_LIBS="$LIBS"
LIBINTL_LIBS=
AC_CHECK_HEADER(libintl.h, [], [AC_MSG_ERROR([libintl.h not found, please install xgettext])])
AC_SEARCH_LIBS([bindtextdomain], [libintl],[], [])
if test "x$ac_cv_search_bindtextdomain" = "xno" ; then
AC_MSG_ERROR([libintl is not found and your libc does not support gettext, please install xgettext])
elif test "x$ac_cv_search_bindtextdomain" != "xnone required" ; then
LIBINTL_LIBS="$ac_cv_search_bindtextdomain"
fi
LIBS="$SAVELIBS"
AC_SUBST(LIBINTL_LIBS)
dnl ---------------------------------------------------------------------------
dnl - Set the data install directory since we don't use pkgdatadir
dnl ---------------------------------------------------------------------------