summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Shabalin <shaba@altlinux.ru>2014-02-07 17:02:03 +0400
committerJakub Hrozek <jhrozek@redhat.com>2014-02-19 16:29:46 +0100
commit22091abbe7b4a5667f62603dfd875e9ec6adf789 (patch)
tree36ed9ead632ad364ad828943d5cf7ab3a77b4bbb
parent9688383806aac671c7ae0faddaf96ec35c9a455b (diff)
downloadsssd-22091abbe7b4a5667f62603dfd875e9ec6adf789.tar.gz
sssd-22091abbe7b4a5667f62603dfd875e9ec6adf789.tar.xz
sssd-22091abbe7b4a5667f62603dfd875e9ec6adf789.zip
Use KRB5_CFLAGS where appropriate
There are cases when MIT Kerberos is installed with includes in a subdirectory of /usr/include (or /usr/local/include). In such case we have to properly use KRB5_CFLAGS to reach them. https://fedorahosted.org/sssd/ticket/2226 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
-rw-r--r--Makefile.am12
-rw-r--r--src/external/krb5.m45
2 files changed, 15 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index d990a8c61..07bd4e816 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1009,6 +1009,7 @@ krb5_utils_tests_SOURCES = \
$(SSSD_FAILOVER_OBJ)
krb5_utils_tests_CFLAGS = \
$(AM_CFLAGS) \
+ $(KRB5_CFLAGS) \
$(CHECK_CFLAGS) \
$(SYSTEMD_LOGIN_CFLAGS)
krb5_utils_tests_LDADD = \
@@ -1285,6 +1286,7 @@ krb5_child_test_SOURCES = \
krb5_child_test_CFLAGS = \
$(AM_CFLAGS) \
-DKRB5_CHILD_DIR=\"$(builddir)\" \
+ $(KRB5_CFLAGS) \
$(CHECK_CFLAGS) \
$(SYSTEMD_LOGIN_CFLAGS)
krb5_child_test_LDADD = \
@@ -1694,6 +1696,9 @@ libsss_ldap_common_la_SOURCES += \
src/providers/ldap/sdap_async_autofs.c
endif
+libsss_ldap_common_la_CFLAGS = \
+ $(KRB5_CFLAGS)
+
pkglib_LTLIBRARIES += libsss_krb5_common.la
libsss_krb5_common_la_SOURCES = \
@@ -1709,6 +1714,8 @@ libsss_krb5_common_la_SOURCES = \
src/providers/krb5/krb5_init_shared.c
libsss_krb5_common_la_LDFLAGS = \
-avoid-version
+libsss_krb5_common_la_CFLAGS = \
+ $(KRB5_CFLAGS)
libsss_ldap_la_SOURCES = \
src/util/find_uid.c \
@@ -1769,7 +1776,8 @@ libsss_krb5_la_SOURCES = \
libsss_krb5_la_CFLAGS = \
$(AM_CFLAGS) \
$(SYSTEMD_LOGIN_CFLAGS) \
- $(DHASH_CFLAGS)
+ $(DHASH_CFLAGS) \
+ $(KRB5_CFLAGS)
libsss_krb5_la_LIBADD = \
$(SYSTEMD_LOGIN_LIBS) \
$(DHASH_LIBS) \
@@ -1981,7 +1989,7 @@ sssd_pac_plugin_la_CFLAGS = \
$(KRB5_CFLAGS)
sssd_pac_plugin_la_LIBADD = \
$(CLIENT_LIBS) \
- -lkrb5
+ $(KRB5_LIBS)
sssd_pac_plugin_la_LDFLAGS = \
-avoid-version \
-module
diff --git a/src/external/krb5.m4 b/src/external/krb5.m4
index 1a50bf1c7..861c8c9fd 100644
--- a/src/external/krb5.m4
+++ b/src/external/krb5.m4
@@ -67,6 +67,8 @@ AC_CHECK_FUNCS([krb5_get_init_creds_opt_alloc krb5_get_error_message \
krb5_cc_get_full_name])
CFLAGS=$SAVE_CFLAGS
LIBS=$SAVE_LIBS
+CFLAGS="$CFLAGS $KRB5_CFLAGS"
+LIBS="$LIBS $KRB5_LIBS"
if test x$ac_cv_header_krb5_h != xyes -a x$ac_cv_header_krb5_krb5_h != xyes
then
@@ -93,3 +95,6 @@ AM_CONDITIONAL([BUILD_KRB5_LOCATOR_PLUGIN],
[test x$have_locate_plugin = xyes -a x$build_locator = xyes])
AM_COND_IF([BUILD_KRB5_LOCATOR_PLUGIN],
[AC_DEFINE_UNQUOTED(HAVE_KRB5_LOCATOR_PLUGIN, 1, [Build with krb5 locator plugin])])
+
+CFLAGS=$SAVE_CFLAGS
+LIBS=$SAVE_LIBS