WAF: use libsystemd-daemon only if linking actually succeeds
authorAlexander Bokovoy <ab@samba.org>
Thu, 5 Jun 2014 05:15:13 +0000 (08:15 +0300)
committerVolker Lendecke <vl@samba.org>
Thu, 5 Jun 2014 15:16:22 +0000 (17:16 +0200)
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jun  5 17:16:22 CEST 2014 on sn-devel-104

wscript

diff --git a/wscript b/wscript
index 58af180..cf4e93b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -204,7 +204,8 @@ def configure(conf):
         conf.CHECK_HEADERS('systemd/sd-daemon.h', lib='systemd-daemon')
         conf.CHECK_LIB('systemd-daemon', shlib=True)
 
-    if conf.CONFIG_SET('HAVE_SYSTEMD_SD_DAEMON_H'):
+    if (conf.CONFIG_SET('HAVE_SYSTEMD_SD_DAEMON_H') and
+        conf.CONFIG_SET('HAVE_LIBSYSTEMD_DAEMON')):
         conf.DEFINE('HAVE_SYSTEMD', '1')
         conf.env['ENABLE_SYSTEMD'] = True
     else: