X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=0ecc71632b2ba77cf77fd974259a785c6e912b57;hp=1cffbbb7e8d40cb01cccee00644db45b3a0c6758;hb=00aa179e3944286d6837fe8534de071033e02eab;hpb=ddc77f62244bb41d5c8261517e2e1ff1b763fc94 diff --git a/configure.ac b/configure.ac index 1cffbbb7e..0ecc71632 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([systemd], - [205], + [206], [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd], [systemd], [http://www.freedesktop.org/wiki/Software/systemd]) @@ -144,11 +144,10 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ --param=ssp-buffer-size=4]) AC_SUBST([OUR_CFLAGS], $with_cflags) -AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*], [ - CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ - -Wp,-D_FORTIFY_SOURCE=2])], [ - python_extra_cflags=-Wp,-U_FORTIFY_SOURCE - AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])]) +AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*], + [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ + -Wp,-D_FORTIFY_SOURCE=2])], + [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])]) AC_SUBST([OUR_CPPFLAGS], $with_cppflags) CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ @@ -162,8 +161,6 @@ AC_SUBST([OUR_LDFLAGS], $with_ldflags) # ------------------------------------------------------------------------------ # we use python to build the man page index, and for systemd-python have_python=no -have_python_devel=no - AC_ARG_WITH([python], [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])]) @@ -178,32 +175,39 @@ AS_IF([test "x$PYTHON_BINARY" = "x"], [PYTHON_BINARY=/usr/bin/python])]) AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts]) -AS_IF([test "x$with_python" != "xno"], [ - AC_PATH_PROG(PYTHON_CONFIG, python${PYTHON_VERSION}-config) - AS_IF([test -n "$PYTHON_CONFIG"], [ - have_python_devel=yes - PYTHON_CFLAGS="$($PYTHON_CONFIG --cflags) $python_extra_cflags" - PYTHON_LIBS="$($PYTHON_CONFIG --ldflags)" - AC_SUBST(PYTHON_CFLAGS) - AC_SUBST(PYTHON_LIBS) - AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build) - ]) +have_python_devel=no +AC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules])) +AS_IF([test "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])]) ]) AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"]) # ------------------------------------------------------------------------------ -AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])]) AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])]) +AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) + +# unconditionally pull-in librt with old glibc versions +AC_SEARCH_LIBS([clock_gettime], [rt], [], []) save_LIBS="$LIBS" LIBS= AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])]) -AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) CAP_LIBS="$LIBS" -LIBS="$save_LIBS" AC_SUBST(CAP_LIBS) +LIBS= +AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])]) +RT_LIBS="$LIBS" +AC_SUBST(RT_LIBS) +LIBS="$save_LIBS" + AC_CHECK_FUNCS([fanotify_init fanotify_mark]) AC_CHECK_FUNCS([__secure_getenv secure_getenv]) AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include @@ -911,6 +915,10 @@ AC_ARG_WITH([bashcompletiondir], with_bashcompletiondir=${datadir}/bash-completion/completions ])]) +AC_ARG_WITH([zshcompletiondir], + AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]), + [], [with_zshcompletiondir=${datadir}/zsh/site-functions]) + AC_ARG_WITH([rootprefix], AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), [], [with_rootprefix=${ac_default_prefix}]) @@ -955,6 +963,7 @@ AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir]) AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir]) AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir]) AC_SUBST([bashcompletiondir], [$with_bashcompletiondir]) +AC_SUBST([zshcompletiondir], [$with_zshcompletiondir]) AC_SUBST([pamlibdir], [$with_pamlibdir]) AC_SUBST([rootprefix], [$with_rootprefix]) AC_SUBST([rootlibdir], [$with_rootlibdir]) @@ -1005,7 +1014,6 @@ AC_MSG_RESULT([ nss-myhostname: ${have_myhostname} gudev: ${enable_gudev} gintrospection: ${enable_introspection} - keymap: ${enable_keymap} Python: ${have_python} Python Headers: ${have_python_devel} man pages: ${have_manpages} @@ -1033,6 +1041,7 @@ AC_MSG_RESULT([ D-Bus system dir: ${with_dbussystemservicedir} D-Bus interfaces dir: ${with_dbusinterfacedir} Bash completions dir: ${with_bashcompletiondir} + Zsh completions dir: ${with_zshcompletiondir} Extra start script: ${RC_LOCAL_SCRIPT_PATH_START} Extra stop script: ${RC_LOCAL_SCRIPT_PATH_STOP} Debug shell: ${SUSHELL} @ ${DEBUGTTY} @@ -1040,6 +1049,6 @@ AC_MSG_RESULT([ CFLAGS: ${OUR_CFLAGS} ${CFLAGS} CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS} - PYTHON_CFLAGS: ${PYTHON_CFLAGS} - PYTHON_LIBS: ${PYTHON_LIBS} + PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS} + PYTHON_LIBS: ${PYTHON_DEVEL_LIBS} ])