summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-08-16 17:15:36 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-08-16 17:15:36 (GMT)
commit9b594b480fea33624fcf636adfa455aba5efb97f (patch)
treed34bb0ed34d0bd19ce07b1187bfcf22fc3c0a399 /SwifTools
parent00a26ca1c2d3f753599d5608b18726996beeb4b1 (diff)
downloadswift-contrib-9b594b480fea33624fcf636adfa455aba5efb97f.zip
swift-contrib-9b594b480fea33624fcf636adfa455aba5efb97f.tar.bz2
More build system tweaks.
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/Idle/PlatformIdleQuerier.cpp9
-rw-r--r--SwifTools/SConscript5
2 files changed, 9 insertions, 5 deletions
diff --git a/SwifTools/Idle/PlatformIdleQuerier.cpp b/SwifTools/Idle/PlatformIdleQuerier.cpp
index 7213e77..a28e701 100644
--- a/SwifTools/Idle/PlatformIdleQuerier.cpp
+++ b/SwifTools/Idle/PlatformIdleQuerier.cpp
@@ -7,15 +7,14 @@
#include "SwifTools/Idle/PlatformIdleQuerier.h"
#include "Swiften/Base/Platform.h"
-#if defined(SWIFTEN_PLATFORM_MACOSX)
+#if defined(SWIFTEN_PLATFORM_MACOSX) && defined(HAVE_IOKIT)
#include "SwifTools/Idle/MacOSXIdleQuerier.h"
#elif defined(SWIFTEN_PLATFORM_WINDOWS)
#include "SwifTools/Idle/WindowsIdleQuerier.h"
#elif defined(HAVE_XSS)
#include "SwifTools/Idle/XSSIdleQuerier.h"
-#else
-#include "SwifTools/Idle/DummyIdleQuerier.h"
#endif
+#include "SwifTools/Idle/DummyIdleQuerier.h"
#include <cassert>
#include <iostream>
@@ -24,7 +23,11 @@ namespace Swift {
PlatformIdleQuerier::PlatformIdleQuerier() : querier(NULL) {
#if defined(SWIFTEN_PLATFORM_MACOSX)
+#if defined(HAVE_IOKIT)
querier = new MacOSXIdleQuerier();
+#else
+ querier = new DummyIdleQuerier();
+#endif
#elif defined(SWIFTEN_PLATFORM_WINDOWS)
querier = new WindowsIdleQuerier();
#elif defined(HAVE_XSS)
diff --git a/SwifTools/SConscript b/SwifTools/SConscript
index 18781c3..7620879 100644
--- a/SwifTools/SConscript
+++ b/SwifTools/SConscript
@@ -36,8 +36,9 @@ if env["SCONS_STAGE"] == "build" :
if myenv["PLATFORM"] == "win32" :
sources += ["Idle/WindowsIdleQuerier.cpp"]
- elif myenv["PLATFORM"] == "darwin" :
- sources += ["Idle/MacOSXIdleQuerier.cpp"]
+ elif myenv["PLATFORM"] == "darwin" and myenv.get("HAVE_IOKIT", False) :
+ myenv.Append(CPPDEFINES = ["HAVE_IOKIT"])
+ sources += ["Idle/MacOSXIdleQuerier.cpp"]
elif myenv["HAVE_XSS"] :
myenv.Append(CPPDEFINES = ["HAVE_XSS"])
sources += ["Idle/XSSIdleQuerier.cpp"]