From: Donald Sharp Date: Sat, 4 Jun 2016 23:55:21 +0000 (-0400) Subject: configure: Ensure systemd development is present X-Git-Tag: frr-2.0-rc1~548 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3721995872e0872bda9b77cf7ac94167015c73df;p=matthieu%2Ffrr.git configure: Ensure systemd development is present If a users specifies that they should use systemd then ensure that the systemd can be compiled against it. Signed-off-by: Donald Sharp --- diff --git a/configure.ac b/configure.ac index 151214b88f..d9f67def40 100755 --- a/configure.ac +++ b/configure.ac @@ -337,10 +337,16 @@ if test x"${enable_time_check}" != x"no" ; then fi fi -if test "${enable_systemd}" = "yes" ; then - AC_DEFINE(HAVE_SYSTEMD,,Compile systemd support in) - LIBS="$LIBS -lsystemd " -fi +case "${enable_systemd}" in + "no") ;; + "yes") + AC_CHECK_LIB(systemd, sd_notify, LIBS="$LIBS -lsystemd") + if test $ac_cv_lib_systemd_sd_notify = no; then + AC_MSG_ERROR([enable systemd has been specified but systemd development env not found on your system]) + fi + ;; + "*") ;; +esac if test "${enable_poll}" = "yes" ; then AC_DEFINE(HAVE_POLL,,Compile systemd support in) @@ -707,7 +713,6 @@ dnl [TODO] on Linux, and in [TODO] on Solaris. AC_DEFINE(rl_completion_matches,completion_matches,Old readline) fi ;; - "no" ) VTYSH="";; esac AC_SUBST(LIBREADLINE) AM_CONDITIONAL(VTYSH, test "x$VTYSH" = "xvtysh")