diff options
author | Sven Eden <yamakuzure@gmx.net> | 2016-12-30 15:43:50 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:18:27 +0100 |
commit | 1532f28b7cf3e6e02e74691450b2b5379be6b805 (patch) | |
tree | 184d2f253b46da8658037e51c1670122983a32c8 /configure.ac | |
parent | 37570c53dc8865f07ae8ff5a9915d7ed797b951f (diff) |
Prep v222: Update build system:
- The content of the man pages directory has been overhauled
- Makefile-man.am was regenerated
- Makefile.am and configure.ac needed a few addtitions and fixes
- Some masked functions had to be unmasked
- Now superfluous files have been removed
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 80 |
1 files changed, 67 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index c8a4aff8f..5da3365c0 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([elogind], - [221], + [222], [https://github.com/elogind/elogind/issues], [elogind], [https://github.com/elogind/elogind]) @@ -95,16 +95,7 @@ AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't s M4_DEFINES= -# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line -m4_ifdef([GTK_DOC_CHECK], [ -GTK_DOC_CHECK([1.18],[--flavour no-tmpl])], - [AM_CONDITIONAL([ENABLE_GTK_DOC], [false]) - enable_gtk_doc=no]) - -AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [ - AC_MSG_ERROR([*** GTK doc requested but xsltproc not found]) -]) - +AC_CHECK_TOOL(OBJCOPY, objcopy) AC_CHECK_TOOL(GPERF, gperf) if test -z "$GPERF" ; then AC_MSG_ERROR([*** gperf not found]) @@ -234,6 +225,54 @@ AC_CHECK_SIZEOF(rlim_t,,[ ]) # ------------------------------------------------------------------------------ +# we use python to build the man page index, and for systemd-python +have_python=no +AC_ARG_WITH([python], + [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])]) + +have_lxml=no +AS_IF([test "x$with_python" != "xno"], [ + AM_PATH_PYTHON(,, [:]) + AS_IF([test "x$PYTHON" != "x:"], [ + AC_MSG_CHECKING([for python lxml module]) + AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes]) + AC_MSG_RESULT([$have_lxml]) + AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes], + [AC_MSG_WARN([*** python support requires python-lxml module installed])]) + ]) +]) +AS_IF([test "$have_python" != "yes"], [ + AS_IF([test "$with_python" = "yes"], + [AC_MSG_ERROR([*** python support requested but python support not found])]) + AS_IF([test "$with_python" != "no"], + [AC_MSG_WARN([*** python support not found, some documentation cannot be built])]) +]) + +AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) +AS_IF([test "x$PYTHON_BINARY" = "x"], + [AS_IF([test "x$have_python" = "xyes"], + [PYTHON_BINARY="$(which "$PYTHON")"], + [PYTHON_BINARY=/usr/bin/python])]) +AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts]) + +AS_IF([test "x$have_python" != "xyes" -a "x$enable_python_devel" = "xyes"], + [AC_MSG_ERROR([*** python-devel support requires --with-python])]) + +have_python_devel=no +AC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules])) +AS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [ + PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}], + [have_python_devel=yes], + [PKG_CHECK_MODULES([PYTHON_DEVEL], [python], + [have_python_devel=yes], + [have_python_devel=no])]) + AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes], + [AC_MSG_ERROR([*** python-devel support requested but libraries not found])]) + AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build) +]) +AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"]) + +# ------------------------------------------------------------------------------ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) AC_CHECK_HEADERS([linux/btrfs.h], [], []) @@ -501,8 +540,14 @@ fi AC_ARG_WITH(smack-run-label, AS_HELP_STRING([--with-smack-run-label=STRING], - [run elogind --system with a specific SMACK label]), - [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])], + [run elogind --system itself with a specific SMACK label]), + [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run elogind itself with SMACK label])], + []) + +AC_ARG_WITH(smack-default-process-label, +AS_HELP_STRING([--with-smack-default-process-label=STRING], + [default SMACK label for executed processes]), + [AC_DEFINE_UNQUOTED(SMACK_DEFAULT_PROCESS_LABEL, ["$withval"], [Default SMACK label for executed processes])], []) if test "x${have_smack}" = xyes ; then @@ -512,6 +557,15 @@ fi AM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"]) # ------------------------------------------------------------------------------ +have_logind=yes +#AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon])) +#if test "x$enable_logind" != "xno"; then +# have_logind=yes +#fi +AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"]) +AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ]) + +# ------------------------------------------------------------------------------ AC_ARG_WITH(system-uid-max, AS_HELP_STRING([--with-system-uid-max=UID] [Maximum UID for system users]), |