summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.am21
-rw-r--r--server/external/krb5.m424
2 files changed, 38 insertions, 7 deletions
diff --git a/server/Makefile.am b/server/Makefile.am
index f2a9c96d2..583baa98a 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -98,6 +98,8 @@ libsss_crypt_la_SOURCES = \
util/nss_sha512crypt.c
libsss_crypt_la_CPPFLAGS = \
$(NSS_CFLAGS)
+libsss_crypt_la_LIBADD = \
+ $(NSS_LIBS)
if BUILD_PYTHON_BINDINGS
pyexec_LTLIBRARIES = \
@@ -208,7 +210,6 @@ endif
SSSD_LIBS = \
$(TALLOC_LIBS) \
- $(TDB_LIBS) \
$(TEVENT_LIBS) \
$(POPT_LIBS) \
$(LDB_LIBS) \
@@ -223,7 +224,6 @@ SSSD_LIBS = \
PYTHON_BINDINGS_LIBS = \
$(TALLOC_LIBS) \
- $(TDB_LIBS) \
$(TEVENT_LIBS) \
$(POPT_LIBS) \
$(LDB_LIBS) \
@@ -234,7 +234,17 @@ PYTHON_BINDINGS_LIBS = \
libsss_crypt.la
TOOLS_LIBS = \
- $(SSSD_LIBS)
+ $(TALLOC_LIBS) \
+ $(TEVENT_LIBS) \
+ $(POPT_LIBS) \
+ $(LDB_LIBS) \
+ $(DBUS_LIBS) \
+ $(PCRE_LIBS) \
+ $(INI_CFG_LIBS) \
+ $(COLLECTION_LIBS) \
+ $(DHASH_LIBS) \
+ $(REPLACE_LIBS) \
+ libsss_crypt.la
if BUILD_SELINUX
TOOLS_LIBS += $(SELINUX_LIBS)
@@ -300,6 +310,7 @@ sssd_nss_SOURCES = \
$(SSSD_UTIL_OBJ) \
$(SSSD_RESPONDER_OBJ)
sssd_nss_LDADD = \
+ $(TDB_LIBS) \
$(SSSD_LIBS)
sssd_pam_SOURCES = \
@@ -387,7 +398,7 @@ sysdb_tests_CFLAGS = \
sysdb_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS)
-
+
strtonum_tests_SOURCES = \
tests/strtonum-tests.c \
util/debug.c \
@@ -502,8 +513,6 @@ libsss_krb5_la_SOURCES = \
libsss_krb5_la_CFLAGS = \
$(AM_CFLAGS) \
$(KRB5_CFLAGS)
-libsss_krb5_la_LIBADD = \
- $(KRB5_LIBS)
libsss_krb5_la_LDFLAGS = \
-version-info 1:0:0 \
-module
diff --git a/server/external/krb5.m4 b/server/external/krb5.m4
index 95cd386e2..d02732b16 100644
--- a/server/external/krb5.m4
+++ b/server/external/krb5.m4
@@ -1,5 +1,14 @@
AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LIBS)
+
+if test x$KRB5_LIBS != x; then
+ KRB5_PASSED_LIBS=$KRB5_LIBS
+fi
+
+if test x$KRB5_CFLAGS != x; then
+ KRB5_PASSED_CFLAGS=$KRB5_CFLAGS
+fi
+
AC_PATH_PROG(KRB5_CONFIG, krb5-config)
AC_MSG_CHECKING(for working krb5-config)
if test -x "$KRB5_CONFIG"; then
@@ -7,9 +16,22 @@ if test -x "$KRB5_CONFIG"; then
KRB5_LIBS="`$KRB5_CONFIG --libs`"
AC_MSG_RESULT(yes)
else
- AC_MSG_ERROR(no. Please install MIT kerberos devel package)
+ if test x$KRB5_PASSED_LIBS = x; then
+ AC_MSG_ERROR(no. Please install MIT kerberos devel package)
+ fi
fi
+if test x$KRB5_PASSED_LIBS != x; then
+ KRB5_LIBS=$KRB5_PASSED_LIBS
+fi
+
+if test x$KRB5_PASSED_CFLAGS != x; then
+ KRB5_CFLAGS=$KRB5_PASSED_CFLAGS
+fi
+
+AC_ARG_VAR([KRB5_CFLAGS], [C compiler flags for kerberos, overriding krb5-config])dnl
+AC_ARG_VAR([KRB5_LIBS], [linker flags for kerberos, overriding krb5-config])dnl
+
SAVE_CFLAGS=$CFLAGS
SAVE_LIBS=$LIBS
CFLAGS="$CFLAGS $KRB5_CFLAGS"