Commit 02d83bf6 authored by ale's avatar ale

Only link to libpam in the pam_sso module

Prevents spurious dependencies in the other libraries.
parent a81129d4
......@@ -59,7 +59,12 @@ AC_ARG_ENABLE(pam-sso,
dnl Probe for the functionality of the PAM libraries and their include file
dnl naming. Mac OS X puts them in pam/* instead of security/*.
if test "$build_pam_sso" != "no" ; then
AC_SEARCH_LIBS([pam_set_data], [pam])
dnl Do not add -lpam to LIBS, set PAM_LIBS instead.
save_LIBS="$LIBS"
AC_SEARCH_LIBS([pam_set_data], [pam], [], [
AC_MSG_ERROR([libpam not found])])
LIBS="$save_LIBS"
AC_SUBST(PAM_LIBS, [-lpam])
AC_CHECK_FUNCS([pam_getenv pam_getenvlist pam_modutil_getpwnam])
AC_REPLACE_FUNCS([pam_syslog pam_vsyslog])
AC_CHECK_HEADERS([security/pam_modutil.h], [],
......
......@@ -7,7 +7,7 @@ lib_LTLIBRARIES = pam_sso.la
pam_sso_la_SOURCES = \
pam_sso.c pam_sso.h
pam_sso_la_LDFLAGS = -module
pam_sso_la_LIBADD = $(top_builddir)/src/sso/libsso.la
pam_sso_la_LIBADD = $(PAM_LIBS) $(top_builddir)/src/sso/libsso.la
check_PROGRAMS = \
pam_sso_unittest
......@@ -16,6 +16,6 @@ TESTS = $(check_PROGRAMS)
pam_sso_unittest_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_CPPFLAGS)
pam_sso_unittest_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
pam_sso_unittest_LDADD = $(GTEST_LIBS) \
pam_sso_unittest_LDADD = $(GTEST_LIBS) $(PAM_LIBS) \
$(top_builddir)/src/sso/libsso.la
pam_sso_unittest_SOURCES = pam_sso_unittest.cc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment