gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH 2/3] Fixes dbus linking on non-Linux platforms.


From: Fred Wright
Subject: [gpsd-dev] [PATCH 2/3] Fixes dbus linking on non-Linux platforms.
Date: Tue, 9 Feb 2016 17:17:05 -0800

Commit 6e1d6bd6f51b3a66de029792433dcbfc9fe4a048 added "LIBPATH='.'"
overrides to most build setups, though the purpose was unclear.  The
SConstruct script already sets up LIBPATH to include the current
directory, as well as the proper directory for the dbus library when
dbus support is included, so the effect of the overrides was to undo
the latter.  This typically doesn't hurt on Linux, where the dbus
library is installed in a "system" library area which is searched by
default, but on OSX and BSD platforms it results in link errors.
Removing the overrides fixes this.

TESTED:
Tested builds and ran regression tests on all OSX versions from 10.5
through 10.11, as well as Ubuntu 14.04.1, FreeBSD 10.1, OpenBSD 5.6,
and NetBSD 6.1.5.
---
 SConstruct | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/SConstruct b/SConstruct
index 3141805..aa880e1 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1002,37 +1002,37 @@ gpsmon_sources = [
 ## Production programs
 
 gpsd = env.Program('gpsd', gpsd_sources,
-                   LIBS=['gpsd', 'gps_static'], LIBPATH='.',
+                   LIBS=['gpsd', 'gps_static'],
                    parse_flags=gpsdflags+gpsflags)
 gpsdecode = env.Program('gpsdecode', ['gpsdecode.c'],
-                        LIBS=['gpsd', 'gps_static'], LIBPATH='.',
+                        LIBS=['gpsd', 'gps_static'],
                         parse_flags=gpsdflags+gpsflags)
 gpsctl = env.Program('gpsctl', ['gpsctl.c'],
-                     LIBS=['gpsd', 'gps_static'], LIBPATH='.',
+                     LIBS=['gpsd', 'gps_static'],
                      parse_flags=gpsdflags+gpsflags)
 gpsmon = env.Program('gpsmon', gpsmon_sources,
-                     LIBS=['gpsd', 'gps_static'], LIBPATH='.',
+                     LIBS=['gpsd', 'gps_static'],
                      parse_flags=gpsdflags + gpsflags + ncurseslibs)
 gpsdctl = env.Program('gpsdctl', ['gpsdctl.c'],
-                      LIBS=['gps_static'], LIBPATH='.',
+                      LIBS=['gps_static'],
                       parse_flags=gpsflags)
 gpspipe = env.Program('gpspipe', ['gpspipe.c'],
-                      LIBS=['gps_static'], LIBPATH='.',
+                      LIBS=['gps_static'],
                       parse_flags=gpsflags)
 gps2udp = env.Program('gps2udp', ['gps2udp.c'],
-                      LIBS=['gps_static'], LIBPATH='.',
+                      LIBS=['gps_static'],
                       parse_flags=gpsflags)
 gpxlogger = env.Program('gpxlogger', ['gpxlogger.c'],
-                        LIBS=['gps_static'], LIBPATH='.',
+                        LIBS=['gps_static'],
                         parse_flags=gpsflags)
 lcdgps = env.Program('lcdgps', ['lcdgps.c'],
-                     LIBS=['gps_static'], LIBPATH='.',
+                     LIBS=['gps_static'],
                      parse_flags=gpsflags)
 cgps = env.Program('cgps', ['cgps.c'],
-                   LIBS=['gps_static'], LIBPATH='.',
+                   LIBS=['gps_static'],
                    parse_flags=gpsflags + ncurseslibs)
 ntpshmmon = env.Program('ntpshmmon', ['ntpshmmon.c'],
-                        LIBS=['gps_static'], LIBPATH='.',
+                        LIBS=['gps_static'],
                         parse_flags=gpsflags)
 
 binaries = [gpsd, gpsdecode, gpsctl, gpsdctl, gpspipe, gps2udp, gpxlogger, 
lcdgps, ntpshmmon]
@@ -1040,27 +1040,27 @@ if env["ncurses"]:
     binaries += [cgps, gpsmon]
 
 # Test programs - always link locally and statically
-test_bits = env.Program('test_bits', ['test_bits.c'],
-                        LIBS=['gps_static'], LIBPATH='.')
+test_bits = env.Program('test_bits', ['test_bits.c'], LIBS=['gps_static'])
 test_float = env.Program('test_float', ['test_float.c'])
 test_geoid = env.Program('test_geoid', ['test_geoid.c'],
                          LIBS=['gpsd', 'gps_static'],
-                         LIBPATH='.', parse_flags=gpsdflags)
+                         parse_flags=gpsdflags)
 test_matrix = env.Program('test_matrix', ['test_matrix.c'],
                           LIBS=['gpsd', 'gps_static'],
-                          LIBPATH='.', parse_flags=gpsdflags)
+                          parse_flags=gpsdflags)
 test_mktime = env.Program('test_mktime', ['test_mktime.c'],
-                          LIBS=['gps_static'], LIBPATH='.', 
parse_flags=["-lm"])
+                          LIBS=['gps_static'], parse_flags=["-lm"])
 test_packet = env.Program('test_packet', ['test_packet.c'],
                           LIBS=['gpsd', 'gps_static'],
-                          LIBPATH='.', parse_flags=gpsdflags)
+                          parse_flags=gpsdflags)
 test_timespec = env.Program('test_timespec', ['test_timespec.c'],
                           LIBS=['gpsd', 'gps_static'],
-                          LIBPATH='.', parse_flags=gpsdflags)
+                          parse_flags=gpsdflags)
 test_trig = env.Program('test_trig', ['test_trig.c'], parse_flags=["-lm"])
 # test_libgps for glibc older than 2.17
 test_libgps = env.Program('test_libgps', ['test_libgps.c'],
-                          LIBS=['gps_static'], LIBPATH='.', 
parse_flags=["-lm"] + rtlibs + dbusflags)
+                          LIBS=['gps_static'],
+                          parse_flags=["-lm"] + rtlibs + dbusflags)
 
 if not env['socket_export']:
     announce("test_json not building because socket_export is disabled")
@@ -1068,11 +1068,11 @@ if not env['socket_export']:
 else:
     test_json = env.Program(
         'test_json', ['test_json.c'],
-        LIBS=['gps_static'], LIBPATH='.',
+        LIBS=['gps_static'],
         parse_flags=["-lm"] + rtlibs + usbflags + dbusflags)
 
 test_gpsmm = env.Program('test_gpsmm', ['test_gpsmm.cpp'],
-                         LIBS=['gps_static'], LIBPATH='.', parse_flags=["-lm"])
+                         LIBS=['gps_static'], parse_flags=["-lm"])
 testprogs = [test_bits, test_float, test_geoid, test_libgps, test_matrix, 
test_mktime, test_packet, test_timespec, test_trig]
 if env['socket_export']:
     testprogs.append(test_json)
-- 
2.7.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]