summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2011-11-17 10:38:13 +0200
committerRob Crittenden <rcritten@redhat.com>2011-11-16 18:35:19 -0500
commit1f9ab4283cf72cbee7bc3693fc685e89e3fa903c (patch)
treeae80cbec4be12443d9d6aea380b393a1d2a6ac7c /ipa-client
parentebdc752b66fac4f0b1187fd5460f7e67463085ce (diff)
downloadfreeipa-1f9ab4283cf72cbee7bc3693fc685e89e3fa903c.tar.gz
freeipa-1f9ab4283cf72cbee7bc3693fc685e89e3fa903c.tar.xz
freeipa-1f9ab4283cf72cbee7bc3693fc685e89e3fa903c.zip
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
Diffstat (limited to 'ipa-client')
-rw-r--r--ipa-client/Makefile.am3
-rw-r--r--ipa-client/configure.ac15
2 files changed, 18 insertions, 0 deletions
diff --git a/ipa-client/Makefile.am b/ipa-client/Makefile.am
index d0a3f8463..f22a2c345 100644
--- a/ipa-client/Makefile.am
+++ b/ipa-client/Makefile.am
@@ -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 = \
diff --git a/ipa-client/configure.ac b/ipa-client/configure.ac
index 75544ae75..880e9289f 100644
--- a/ipa-client/configure.ac
+++ b/ipa-client/configure.ac
@@ -175,6 +175,21 @@ 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 ---------------------------------------------------------------------------