From 1702970a3ea3de88f04623f69a3ab5260f77d2c5 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Thu, 8 Mar 2007 21:16:40 -0500 Subject: add a stub for docbook documentation --- configure.ac | 102 +++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 30 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 796186f..fce1ff9 100644 --- a/configure.ac +++ b/configure.ac @@ -163,6 +163,73 @@ AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris]) AC_SUBST(CK_BACKEND) +dnl --------------------------------------------------------------------------- +dnl Check for PAM +dnl --------------------------------------------------------------------------- + +have_pam=no +AC_CHECK_LIB(pam, pam_getenv, have_pam=yes) +AM_CONDITIONAL(HAVE_PAM, test x$have_pam = xyes) +if test "x$have_pam" = "xyes"; then + PAM_LIBS="${PAM_LIBS} -lpam" +fi +AC_SUBST(HAVE_PAM) +AC_SUBST(PAM_LIBS) + + +# 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") + +dnl --------------------------------------------------------------------------- +dnl - Where should we put documentation ? +dnl --------------------------------------------------------------------------- + +AC_ARG_WITH(doc-dir, + [AC_HELP_STRING([--with-doc-dir=], + [directory to install documentation])]) +if ! test -z "$with_doc_dir"; then + DOCDIR="$with_doc_dir/ConsoleKit-$VERSION" +else + DOCDIR="$datadir/doc/ConsoleKit-$VERSION" +fi +AC_SUBST(DOCDIR) + +dnl --------------------------------------------------------------------------- +dnl - DocBook Documentation +dnl --------------------------------------------------------------------------- + +AC_ARG_ENABLE(docbook-docs, [ --enable-docbook-docs build documentation (requires xmlto)],enable_docbook_docs=$enableval,enable_docbook_docs=no) +AC_PATH_PROG(XMLTO, xmlto, no) +AC_MSG_CHECKING([whether to build DocBook documentation]) +if test x$XMLTO = xno ; then + have_docbook=no +else + have_docbook=yes +fi +if test x$enable_docbook_docs = xauto ; then + if test x$have_docbook = xno ; then + enable_docbook_docs=no + else + enable_docbook_docs=yes + fi +fi +if test x$enable_docbook_docs = xyes; then + if test x$have_docbook = xno; then + AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found]) + fi +fi +AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes) +AC_MSG_RESULT(yes) + dnl --------------------------------------------------------------------------- dnl Finish dnl --------------------------------------------------------------------------- @@ -207,32 +274,6 @@ 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) -if test "x$have_pam" = "xyes"; then - PAM_LIBS="${PAM_LIBS} -lpam" -fi -AC_SUBST(HAVE_PAM) -AC_SUBST(PAM_LIBS) - -# -# 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 # @@ -266,6 +307,8 @@ tools/Makefile tools/linux/Makefile data/Makefile data/ConsoleKit +doc/Makefile +doc/ConsoleKit.xml libck-connector/Makefile libck-connector/ck-connector.pc pam-ck-connector/Makefile @@ -289,9 +332,8 @@ echo " Base libs: ${CONSOLE_KIT_LIBS} Maintainer mode: ${USE_MAINTAINER_MODE} - Backend: ${CK_BACKEND} - dbus-1 system.d dir: ${DBUS_SYS_DIR} - build PAM module: ${msg_pam_module} - + Build backend: ${CK_BACKEND} + Build PAM module: ${msg_pam_module} + Build docs: ${enable_docbook_docs} " -- cgit