]> git.puffer.fish Git - mirror/frr.git/commitdiff
configure: Ensure systemd development is present
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 4 Jun 2016 23:55:21 +0000 (19:55 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 10 Jun 2016 13:17:21 +0000 (09:17 -0400)
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>
configure.ac

index 151214b88fb3fea77a65c0a0afa8d5c6a2a80e0f..d9f67def40c8bfe34363ffffc7101204913bb20b 100755 (executable)
@@ -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")