summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-10-29 05:33:47 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-10-29 05:33:47 -0400
commit6cc1e983b83c8ecca0db70db172d493b530689cd (patch)
treea8ccf75a8d0fed360f3270789176421012a13e1c /SConstruct
parente07c0e3e516c9e9c555933e0d8b53eab287cda3b (diff)
downloadgpsd-6cc1e983b83c8ecca0db70db172d493b530689cd.tar.gz
Crap out sooner if chrpath is not present.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct34
1 files changed, 17 insertions, 17 deletions
diff --git a/SConstruct b/SConstruct
index 4115f6a1..2620e905 100644
--- a/SConstruct
+++ b/SConstruct
@@ -373,6 +373,23 @@ config = Configure(env, custom_tests = { 'CheckPKG' : CheckPKG,
'CheckExecutable' : CheckExecutable,
'CheckXsltproc' : CheckXsltproc})
+# The build is fragile when chrpath is not present, so we've made it
+# mandatory. Unfortunately, of version 0.13, chrpath can only edit binaries
+# for the host it's running on. There's an unmerged patch to fix this at:
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502259
+#
+if config.CheckExecutable('$CHRPATH -v', 'chrpath'):
+ # Tell generated binaries to look in the current directory for
+ # shared libraries so we can run tests without hassle. Should be
+ # handled sanely by scons on all systems. Not good to use '.' or
+ # a relative path here; it's a security risk. At install time we
+ # use chrpath to edit this out of RPATH.
+ env.Prepend(LIBPATH=[os.path.realpath(os.curdir)])
+ env.Prepend(RPATH=[os.path.realpath(os.curdir)])
+else:
+ print "The chrpath utility is required for GPSD to build."
+ quit()
+
confdefs = ["/* gpsd_config.h. Generated by scons, do not hand-hack. */\n"]
confdefs.append('#define VERSION "%s"\n' % gpsd_version)
@@ -450,23 +467,6 @@ for f in ("daemon", "strlcpy", "strlcat", "clock_gettime"):
else:
confdefs.append("/* #undef HAVE_%s */\n" % f.upper())
-# The build is fragile when chrpath is not present, so we've made it
-# mandatory. Unfortunately, of version 0.13, chrpath can only edit binaries
-# for the host it's running on. There's an unmerged patch to fix this at:
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502259
-#
-if config.CheckExecutable('$CHRPATH -v', 'chrpath'):
- # Tell generated binaries to look in the current directory for
- # shared libraries so we can run tests without hassle. Should be
- # handled sanely by scons on all systems. Not good to use '.' or
- # a relative path here; it's a security risk. At install time we
- # use chrpath to edit this out of RPATH.
- env.Prepend(LIBPATH=[os.path.realpath(os.curdir)])
- env.Prepend(RPATH=[os.path.realpath(os.curdir)])
-else:
- print "The chrpath utility is required for GPSD to build."
- quit()
-
# Map options to libraries required to support them that might be absent.
optionrequires = {
"bluez": ["libbluetooth"],