From e400d4b3f57e4303e5ff46f18d94b7c0f7ed589e Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Wed, 9 Dec 2015 01:32:22 +0000 Subject: build: fix systemd-journal-upload installation Fixes: $ ./configure ... --disable-microhttpd --enable-libcurl --enable-sysusers $ make && make install DESTDIR=$(pwd)/INST $ ls INST/usr/lib/sysusers.d/ basic.conf systemd.conf There is no a file with `systemd-journald-upload` --- Makefile.am | 11 ++++++----- configure.ac | 35 ++++++++++++++++++++++------------- sysusers.d/.gitignore | 1 + sysusers.d/systemd-remote.conf | 10 ---------- sysusers.d/systemd-remote.conf.m4 | 14 ++++++++++++++ 5 files changed, 43 insertions(+), 28 deletions(-) delete mode 100644 sysusers.d/systemd-remote.conf create mode 100644 sysusers.d/systemd-remote.conf.m4 diff --git a/Makefile.am b/Makefile.am index e28edfc8cb..434a5060f8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2413,6 +2413,11 @@ nodist_sysusers_DATA = \ sysusers.d/systemd.conf \ sysusers.d/basic.conf +if HAVE_REMOTE +nodist_sysusers_DATA += \ + sysusers.d/systemd-remote.conf +endif + INSTALL_DIRS += \ $(sysusersdir) endif @@ -2420,6 +2425,7 @@ endif EXTRA_DIST += \ units/systemd-sysusers.service.in \ sysusers.d/systemd.conf.m4 \ + sysusers.d/systemd-remote.conf.m4 \ sysusers.d/basic.conf.in # ------------------------------------------------------------------------------ @@ -3924,11 +3930,6 @@ systemd_journal_remote_CFLAGS = \ systemd_journal_remote_LDADD += \ $(MICROHTTPD_LIBS) -if ENABLE_SYSUSERS -dist_sysusers_DATA += \ - sysusers.d/systemd-remote.conf -endif - if ENABLE_TMPFILES dist_tmpfiles_DATA += \ tmpfiles.d/systemd-remote.conf diff --git a/configure.ac b/configure.ac index ec30ff12ae..bdb8c24914 100644 --- a/configure.ac +++ b/configure.ac @@ -838,18 +838,6 @@ if test "x$enable_qrencode" != "xno"; then fi AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"]) -# ------------------------------------------------------------------------------ -have_microhttpd=no -AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support])) -if test "x$enable_microhttpd" != "xno"; then - PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33], - [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no) - if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then - AC_MSG_ERROR([*** microhttpd support requested but libraries not found]) - fi -fi -AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"]) - # ------------------------------------------------------------------------------ have_gnutls=no AC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support])) @@ -862,18 +850,39 @@ if test "x$enable_gnutls" != "xno"; then fi AM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"]) +# ------------------------------------------------------------------------------ +have_microhttpd=no +AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support])) +if test "x$enable_microhttpd" != "xno"; then + PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33], + [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) + have_microhttpd=yes + M4_DEFINES="$M4_DEFINES -DHAVE_MICROHTTPD"], + [have_microhttpd=no]) + if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then + AC_MSG_ERROR([*** microhttpd support requested but libraries not found]) + fi +fi +AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"]) + # ------------------------------------------------------------------------------ have_libcurl=no AC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support])) if test "x$enable_libcurl" != "xno"; then PKG_CHECK_MODULES(LIBCURL, [libcurl], - [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no) + [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) + have_libcurl=yes + M4_DEFINES="$M4_DEFINES -DHAVE_LIBCURL"], + [have_libcurl=no]) if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then AC_MSG_ERROR([*** libcurl support requested but libraries not found]) fi fi AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"]) +# ------------------------------------------------------------------------------ +AM_CONDITIONAL(HAVE_REMOTE, [test "$have_microhttpd" = "yes" -o "$have_libcurl" = "yes"]) + # ------------------------------------------------------------------------------ have_libidn=no AC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support])) diff --git a/sysusers.d/.gitignore b/sysusers.d/.gitignore index bb3aaaf821..c065034d29 100644 --- a/sysusers.d/.gitignore +++ b/sysusers.d/.gitignore @@ -1,2 +1,3 @@ /basic.conf /systemd.conf +/systemd-remote.conf diff --git a/sysusers.d/systemd-remote.conf b/sysusers.d/systemd-remote.conf deleted file mode 100644 index 15969e9a97..0000000000 --- a/sysusers.d/systemd-remote.conf +++ /dev/null @@ -1,10 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -u systemd-journal-gateway - "systemd Journal Gateway" -u systemd-journal-remote - "systemd Journal Remote" -u systemd-journal-upload - "systemd Journal Upload" diff --git a/sysusers.d/systemd-remote.conf.m4 b/sysusers.d/systemd-remote.conf.m4 new file mode 100644 index 0000000000..0e9d71cdd0 --- /dev/null +++ b/sysusers.d/systemd-remote.conf.m4 @@ -0,0 +1,14 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +m4_ifdef(`HAVE_MICROHTTPD', +u systemd-journal-gateway - "systemd Journal Gateway" +u systemd-journal-remote - "systemd Journal Remote" +)m4_dnl +m4_ifdef(`HAVE_LIBCURL', +u systemd-journal-upload - "systemd Journal Upload" +)m4_dnl -- cgit v1.2.3-54-g00ecf