[Git][NTPsec/ntpsec][master] Make sure -lscf is added to LDFLAGS when we find libscf is present

Matt Selsky gitlab at mg.gitlab.com
Mon Jan 16 02:17:06 UTC 2017


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
866eccdc by Matt Selsky at 2017-01-15T21:14:53-05:00
Make sure -lscf is added to LDFLAGS when we find libscf is present

Partially fixes GitLab issue #207 and #209

- - - - -


2 changed files:

- ntpd/wscript
- wafhelpers/configure.py


Changes:

=====================================
ntpd/wscript
=====================================
--- a/ntpd/wscript
+++ b/ntpd/wscript
@@ -132,7 +132,7 @@ def build(ctx):
 		target		= "ntpd",
 		features	= "c rtems_trace cprogram bld_include src_include libisc_include libisc_pthread_include",
 		source		= ntpd_source,
-		use		= "libntpd_obj isc ntp sodium M parse RT CAP SECCOMP PTHREAD CRYPTO DNS_SD DNS_SD_INCLUDES %s SOCKET NSL" % use_refclock,
+		use		= "libntpd_obj isc ntp sodium M parse RT CAP SECCOMP PTHREAD CRYPTO DNS_SD DNS_SD_INCLUDES %s SOCKET NSL SCF" % use_refclock,
 		includes	= [
 					"%s/host/ntpd/" % ctx.bldnode.parent.abspath(),
 					"%s/ntpd/" % srcnode,


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -377,7 +377,6 @@ def cmd_configure(ctx, config):
         ("arpa/nameser.h", ["sys/types.h"]),
         "dns_sd.h",         # NetBSD, Apple, mDNS
         ("ifaddrs.h", ["sys/types.h"]),
-        ("libscf.h", ["sys/time.h"]),  # Solaris
         ("linux/if_addr.h", ["sys/socket.h"]),
         ("linux/rtnetlink.h", ["sys/socket.h"]),
         "linux/serial.h",
@@ -424,6 +423,10 @@ def cmd_configure(ctx, config):
     from wafhelpers.check_sockaddr import check_sockaddr
     check_sockaddr(ctx)
 
+    # Check for Solaris's service configuration facility library
+    ctx.check_cc(header_name="libscf.h", lib="scf", mandatory=False,
+                 uselib_store="SCF")
+
     # Some systems don't have sys/timex.h eg OS X, OpenBSD...
     if ctx.get_define("HAVE_SYS_TIMEX_H"):
         ctx.env.HEADER_SYS_TIMEX_H = True



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/866eccdca3636a9270e12e3809ee763cd9bc7f5e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170116/d028b83e/attachment.html>


More information about the vc mailing list