diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-04 19:55:21 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-10 09:17:21 -0400 |
| commit | 3721995872e0872bda9b77cf7ac94167015c73df (patch) | |
| tree | 177fda17677daef9a792d54e3c6ef6ed42105824 | |
| parent | f4c89855b594d4b32bb3610537703215c978440e (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>
| -rwxr-xr-x | configure.ac | 15 |
1 files changed, 10 insertions, 5 deletions
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") |
