summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-06-04 19:55:21 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-06-15 07:36:41 -0400
commit97da92655c3de967742564ca6d27485688fc61f1 (patch)
tree1e311dd45f9793dae3653228288092c575f0fb3d
parent8c05b72b5a3714b714f0883937f796fccc664955 (diff)
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 <sharpd@cumulusnetworks.com> Conflicts: configure.ac
-rwxr-xr-xconfigure.ac14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 30fa7bd023..6719580976 100755
--- a/configure.ac
+++ b/configure.ac
@@ -328,10 +328,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)