X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=57bbb1d002807bf2bda36598a309046853bc4e3c;hp=1d110c1b4adcb7a47ca48b6a4e4ff52ae354b26f;hb=ebbacbdb00c1452efb4a2f4077cf25136879e53d;hpb=19cf13aa8ca2bcb9a4c895a55774e95ecc2b2aee diff --git a/configure.ac b/configure.ac index 1d110c1b4..57bbb1d00 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([elogind], - [226.2], + [226.5], [https://github.com/elogind/elogind/issues], [elogind], [https://github.com/elogind/elogind]) @@ -113,8 +113,15 @@ fi # ------------------------------------------------------------------------------ # Find running cgroup controller with_cgroupctrl= -AS_IF( [test -f /proc/self/cgroup], - [with_cgroupctrl=`grep "^1:" /proc/self/cgroup | cut -d ':' -f 2`]) +AS_IF( [test -f /proc/self/cgroup], [ + # If the init system is a cgroup controler, it will be position 1. + # Secondary controllers, like cgmanager, do not work. + with_cgroupctrl=`grep "^1:name=" /proc/self/cgroup | cut -d ':' -f 2` + AS_IF( [test -z "$with_cgroupctrl"], [ + # Try to be our own cgroup controller + with_cgroupctrl="name=elogind" + ]) +]) AS_IF( [test -z "$with_cgroupctrl"], AC_MSG_ERROR([No running cgroup controller found])) @@ -298,6 +305,13 @@ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers n AC_CHECK_HEADERS([linux/btrfs.h], [], []) AC_CHECK_HEADERS([linux/memfd.h], [], []) +AC_CHECK_HEADERS([printf.h], [have_printf_h=yes], [have_printf_h=no]) +AS_IF([test x$have_printf_h = xyes], [ + AC_DEFINE(HAVE_PRINTF_H, 1, [Define if printf.h was found]) +]) + + + # unconditionally pull-in librt with old glibc versions dnl AC_SEARCH_LIBS([clock_gettime], [rt], [], []) dnl AC_SEARCH_LIBS([mq_unlink], [rt], [], [])