[ntpsec commit] Only set include/lib for FreeBSD and OS X as nessicary.

Amar Takhar amar at ntpsec.org
Fri Oct 9 14:22:58 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    8aad95007cdf844e99b46fa033523d15189ed1af
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=8aad95007cdf844e99b46fa033523d15189ed1af

Author:    Amar Takhar <verm at darkbeer.org>
Date:      Fri Oct  9 10:22:42 2015 -0400

Only set include/lib for FreeBSD and OS X as nessicary.

---

 pylib/configure.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/pylib/configure.py b/pylib/configure.py
index b46c2de..281eb91 100644
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -46,13 +46,23 @@ def cmd_configure(ctx):
 	from sys import platform
 	if platform == "win32":
 		ctx.env.PLATFORM_TARGET = "win"
-	if platform == "darwin":
+	elif platform == "darwin":
 		ctx.env.PLATFORM_TARGET = "osx"
+	elif platform.startswith("freebsd"):
+		ctx.env.PLATFORM_TARGET = "freebsd"
 	else:
 		ctx.env.PLATFORM_TARGET = "unix"
 	ctx.end_msg(ctx.env.PLATFORM_TARGET	)
 
 
+	# XXX: hack
+	if ctx.env.PLATFORM_TARGET == "freebsd":
+		ctx.env.PLATFORM_INCLUDES = ["/usr/local/include"]
+		ctx.env.PLATFORM_LIBPATH = ["/usr/local/lib"]
+	elif ctx.env.PLATFORM_TARGET == "osx":
+		ctx.env.PLATFORM_INCLUDES = ["/opt/local/include"]
+		ctx.env.PLATFORM_LIBPATH = ["/opt/local/lib"]
+
 
 	# Wipe out and override flags with those from the commandline
 	for flag in ctx.env.OPT_STORE:
@@ -119,10 +129,6 @@ def cmd_configure(ctx):
 	for (f, s, h) in structure_fields:
 		ctx.check_structfield(f, s, h)
 
-	# XXX: hack
-	ctx.env.PLATFORM_INCLUDES = ["/usr/local/include"]
-	ctx.env.PLATFORM_LIBPATH = ["/usr/local/lib"]
-
 	sizeofs = [
 		("time.h",		"time_t"),
 		(None,			"int"),



More information about the vc mailing list