diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-03-07 10:29:34 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:23:22 +0100 |
commit | 6156b4779584b4bf1dc973ce988a34a1bcae1db3 (patch) | |
tree | 457e7f8cf76bf8f155369f6c73b9ddc4adbadb71 /configure.ac | |
parent | c6999740c1a68767c5397306b8d7e14e08533111 (diff) |
Add support for building elogind against musl libc
* Check whether printf.h is available and define/undef HAVE_PRINTF_H
accordingly.
* Added src/shared/parse-printf-format.[hc] by Emil Renner Berthing
<systemd@esmil.dk> that provides parse_printf_format() if printf.h
is unavailable
* Added src/basic/musl_missing.h by Juergen Buchmueller
<pullmoll@t-online.de> that implements glibc functions missing in
musl libc as macros.
* Extended src/basic/musl_missing.h and added
src/basic/musl_missing.c providing
- program_invocation_name
- program_invocation_short_name and
- elogind_set_program_name() to set the two where appropriate.
* Added calls to elogind_set_program_name() to all main() functions
where needed.
* A few other fixes to work nicely with musl libc.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 1d110c1b4..d41016246 100644 --- a/configure.ac +++ b/configure.ac @@ -114,9 +114,9 @@ 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`]) + [with_cgroupctrl=`grep "^1:name=" /proc/self/cgroup | cut -d ':' -f 2`]) AS_IF( [test -z "$with_cgroupctrl"], - AC_MSG_ERROR([No running cgroup controller found])) + [with_cgroupctrl="name=elogind"]) # ------------------------------------------------------------------------------ @@ -298,6 +298,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], [], []) |