[ntpsec commit] Move all configure() code to the parent configure script.
Amar Takhar
amar at ntpsec.org
Fri Oct 2 12:41:42 UTC 2015
Module: ntpsec
Branch: master
Commit: 471a4c51475f3abdc88c39b99970b733d77bb00f
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=471a4c51475f3abdc88c39b99970b733d77bb00f
Author: Amar Takhar <verm at darkbeer.org>
Date: Fri Oct 2 08:41:19 2015 -0400
Move all configure() code to the parent configure script.
This was originally done to help with porting. It's no longer needed.
---
lib/isc/wscript | 27 ---------------------------
libntp/wscript | 11 -----------
pylib/configure.py | 31 +++++++++++++++++++++++++++----
sntp/wscript | 7 -------
wscript | 2 --
5 files changed, 27 insertions(+), 51 deletions(-)
diff --git a/lib/isc/wscript b/lib/isc/wscript
index 689665c..432ed38 100644
--- a/lib/isc/wscript
+++ b/lib/isc/wscript
@@ -1,30 +1,3 @@
-def configure(ctx):
- ctx.define("ISC_PLATFORM_NORETURN_PRE", "", quote=False)
- ctx.define("ISC_PLATFORM_NORETURN_POST", "__attribute__((__noreturn__))", quote=False)
-
-
- ctx.define("ISC_PLATFORM_HAVEIFNAMETOINDEX", 1)
- ctx.define("ISC_PLATFORM_HAVEIN6PKTINFO", 1)
- ctx.define("ISC_PLATFORM_HAVEIPV6", 1)
- ctx.define("ISC_PLATFORM_HAVESALEN", 1)
- ctx.define("ISC_PLATFORM_HAVESCOPEID", 1)
- ctx.define("ISC_PLATFORM_USETHREADS", 1)
-
- ctx.define("HAVE_IFLIST_SYSCTL", 1)
-
-
-#/* #undef ISC_PLATFORM_BRACEPTHREADONCEINIT */
-#/* #undef ISC_PLATFORM_FIXIN6ISADDR */
-#/* #undef ISC_PLATFORM_HAVEIF_LADDRCONF */
-#/* #undef ISC_PLATFORM_HAVEIF_LADDRREQ */
-#/* #undef ISC_PLATFORM_NEEDIN6ADDRANY */
-#/* #undef ISC_PLATFORM_NEEDNETINET6IN6H */
-#/* #undef ISC_PLATFORM_NEEDNTOP */
-#/* #undef ISC_PLATFORM_NEEDPORTT */
-#/* #undef ISC_PLATFORM_NEEDPTON */
-
-
-
def build(ctx):
diff --git a/libntp/wscript b/libntp/wscript
index 2686d25..2ebfc10 100644
--- a/libntp/wscript
+++ b/libntp/wscript
@@ -1,14 +1,3 @@
-def configure(ctx):
- ctx.check_cc(header_name="semaphore.h", mandatory=False)
-
- # Check for directory separator
- if ctx.env.TARGET_PLATFORM == "win":
- sep = "\\"
- else:
- sep = "/"
- ctx.define("DIR_SEP", "'%s'" % sep, quote=False)
-
-
def build(ctx):
srcnode = ctx.srcnode.abspath()
diff --git a/pylib/configure.py b/pylib/configure.py
index ef9a2b0..fadee89 100644
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -92,10 +92,6 @@ def cmd_configure(ctx):
ctx.end_msg(ctx.env.NTPS_VERSION_STRING)
- ctx.recurse("lib/isc")
- ctx.recurse("libntp")
- ctx.recurse("sntp")
-
types = ["int32", "int32_t", "uint32_t", "int64_t", "uint64_t", "uint_t", "size_t", "wint_t", "pid_t", "intptr_t", "uintptr_t"]
for type in sorted(types):
@@ -213,6 +209,7 @@ def cmd_configure(ctx):
optional_headers = (
"alloca.h",
"arpa/nameser.h",
+ "dirent.h",
"dns_sd.h",
"histedit.h",
"ieeefp.h",
@@ -237,6 +234,7 @@ def cmd_configure(ctx):
"readline/readline.h",
"readline/history.h",
"resolv.h",
+ "semaphore.h",
"stdatomic.h",
"sys/audioio.h",
"sys/ioctl.h",
@@ -250,6 +248,7 @@ def cmd_configure(ctx):
"sys/soundcard.h",
"sys/sysctl.h",
"sys/systune.h",
+ "sysexits.h",
"utime.h",
)
for hdr in optional_headers:
@@ -398,6 +397,30 @@ def cmd_configure(ctx):
ctx.define("NTPS_CFLAGS", " ".join(ctx.env.CFLAGS).replace("\"", "\\\""))
ctx.define("NTPS_LDFLAGS", " ".join(ctx.env.LDFLAGS).replace("\"", "\\\""))
+
+ # Check for directory separator
+ if ctx.env.TARGET_PLATFORM == "win":
+ sep = "\\"
+ else:
+ sep = "/"
+
+ ctx.define("DIR_SEP", "'%s'" % sep, quote=False)
+
+
+ # lib/isc/
+ # XXX: Hack that needs to be fixed properly for all platforms
+ ctx.define("ISC_PLATFORM_NORETURN_PRE", "", quote=False)
+ ctx.define("ISC_PLATFORM_NORETURN_POST", "__attribute__((__noreturn__))", quote=False)
+ ctx.define("ISC_PLATFORM_HAVEIFNAMETOINDEX", 1)
+ ctx.define("ISC_PLATFORM_HAVEIN6PKTINFO", 1)
+ ctx.define("ISC_PLATFORM_HAVEIPV6", 1)
+ ctx.define("ISC_PLATFORM_HAVESALEN", 1)
+ ctx.define("ISC_PLATFORM_HAVESCOPEID", 1)
+ ctx.define("ISC_PLATFORM_USETHREADS", 1)
+ ctx.define("HAVE_IFLIST_SYSCTL", 1)
+
+
+
ctx.start_msg("Writing configuration header:")
ctx.write_config_header("config.h")
ctx.end_msg("config.h", "PINK")
diff --git a/sntp/wscript b/sntp/wscript
index dfdc01a..0d6cc73 100644
--- a/sntp/wscript
+++ b/sntp/wscript
@@ -1,10 +1,3 @@
-def configure(ctx):
- ctx.check_type("uintptr_t")
- ctx.check_cc(header_name="dirent.h", mandatory=False)
- ctx.check_cc(header_name="sysexits.h", mandatory=False)
-
-
-
def build(ctx):
srcnode = ctx.srcnode.abspath()
bldnode = ctx.bldnode.abspath()
diff --git a/wscript b/wscript
index 122efe4..e85ed2d 100644
--- a/wscript
+++ b/wscript
@@ -76,8 +76,6 @@ def configure(ctx):
ctx.define("NTPS_VERSION_REV", ctx.env.NTPS_VERSION_REV)
-
-
ctx.load('waf', tooldir='pylib/')
ctx.env.OPT_STORE = OPT_STORE
More information about the vc
mailing list