From fed7e94f76c4279015354ff210bc72f1ac68af70 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 28 Feb 2007 13:52:17 -0500 Subject: add a connector library and (reluctantly) a PAM module Here are some patches to add one library and one PAM module so other programs (apart from gdm) can easily interact with ConsoleKit. It's mainly going to be used, I think, by login(1) and xinit(1). I'm not super happy about doing a PAM module but the Fedora util-linux package maintainer seems to be insist on this instead of just patching login(1). The PAM module isn't built by default. Both pieces of code are licensed under the MIT license as god knows what might want to use them. Sounds good to you? --- configure.ac | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2da5655..1e2c1aa 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,9 @@ PKG_CHECK_MODULES(CONSOLE_KIT, gobject-2.0 >= $GLIB_REQUIRED_VERSION gthread-2.0 >= $GLIB_REQUIRED_VERSION ) +PKG_CHECK_MODULES(LIBDBUS, + dbus-1 >= $DBUS_REQUIRED_VERSION +) AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) EXTRA_COMPILE_WARNINGS(yes) @@ -197,6 +200,28 @@ else AC_MSG_RESULT(no) fi +# +# Check for pam +# +have_pam=no +AC_CHECK_LIB(pam, pam_getenv, have_pam=yes) +AM_CONDITIONAL(HAVE_PAM, test x$have_pam = xyes) +AC_SUBST(HAVE_PAM) + +# +# Check if we should build the PAM module +# +msg_pam_module=no +AC_ARG_ENABLE(pam-module, [AC_HELP_STRING([--enable-pam-module], [build PAM module])],, enable_pam_module=no) +if test "x$enable_pam_module" = "xyes"; then + if test "x$have_pam" = "xno"; then + AC_MSG_ERROR([--enable-pam-module requires PAM but PAM was not found]) + fi + AC_DEFINE(ENABLE_PAM_MODULE, [], [Set if we build PAM module]) + msg_pam_module=yes +fi +AM_CONDITIONAL(ENABLE_PAM_MODULE, test "x$enable_pam_module" = "xyes") + # # Enable Debug # @@ -230,6 +255,9 @@ tools/Makefile tools/linux/Makefile data/Makefile data/ConsoleKit +libck-connector/Makefile +libck-connector/ck-connector.pc +pam-ck-connector/Makefile ]) echo " @@ -253,5 +281,6 @@ echo " Backend: ${CK_BACKEND} dbus-1 system.d dir: ${DBUS_SYS_DIR} + build PAM module: ${msg_pam_module} " -- cgit