summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-09-12 18:25:54 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-09-12 18:25:54 (GMT)
commit55a5d78d1e9e5c56173d13345e2b303422389737 (patch)
treebc2e5c287464ee1c0c2258c2b7e8b458573b57b9
parent50c339268eea3dcba3f8b8c9c745975b12bbe152 (diff)
downloadswift-contrib-55a5d78d1e9e5c56173d13345e2b303422389737.zip
swift-contrib-55a5d78d1e9e5c56173d13345e2b303422389737.tar.bz2
Don't use SQLite in non-experimental.
-rw-r--r--3rdParty/SQLite/SConscript4
-rw-r--r--3rdParty/SQLiteAsync/SConscript24
-rw-r--r--BuildTools/SCons/SConstruct33
3 files changed, 33 insertions, 28 deletions
diff --git a/3rdParty/SQLite/SConscript b/3rdParty/SQLite/SConscript
index 9b9fead..ed08716 100644
--- a/3rdParty/SQLite/SConscript
+++ b/3rdParty/SQLite/SConscript
@@ -10,10 +10,10 @@ if env.get("SQLITE_BUNDLED", False) :
env["SQLITE_FLAGS"] = {
"CPPPATH": [Dir(".")],
"LIBPATH": [Dir(".")],
- "LIBS": ["SQLite"],
+ "LIBS": ["Swiften_SQLite"],
}
if env["SCONS_STAGE"] == "build" :
myenv = env.Clone()
myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]])
- myenv.StaticLibrary("SQLite", ["sqlite3.c"], CPPPATH = ["."])
+ myenv.StaticLibrary("Swiften_SQLite", ["sqlite3.c"], CPPPATH = ["."])
diff --git a/3rdParty/SQLiteAsync/SConscript b/3rdParty/SQLiteAsync/SConscript
index 1bb4268..515c9e4 100644
--- a/3rdParty/SQLiteAsync/SConscript
+++ b/3rdParty/SQLiteAsync/SConscript
@@ -1,20 +1,20 @@
Import("env")
+if env.get("SQLITE_ASYNC_BUNDLED", False) :
################################################################################
# Flags
################################################################################
+ if env["SCONS_STAGE"] == "flags" :
+ env["SQLITE_ASYNC_FLAGS"] = {
+ "CPPPATH": [Dir(".")],
+ "LIBPATH": [Dir(".")],
+ "LIBS": ["Swiften_SQLiteAsync"],
+ }
-if env["SCONS_STAGE"] == "flags" :
- env["SQLITE_ASYNC_FLAGS"] = {
- "CPPPATH": [Dir(".")],
- "LIBPATH": [Dir(".")],
- "LIBS": ["SQLiteAsync"],
- }
-
-if env["SCONS_STAGE"] == "build" :
- myenv = env.Clone()
- myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]])
- myenv.UseFlags(env.get("SQLITE_FLAGS", {}))
- myenv.StaticLibrary("SQLiteAsync", ["sqlite3async.c"])
+ if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+ myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]])
+ myenv.UseFlags(env.get("SQLITE_FLAGS", {}))
+ myenv.StaticLibrary("Swiften_SQLiteAsync", ["sqlite3async.c"])
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 3be4bd7..ff74073 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -358,21 +358,26 @@ else :
env["LIBNATPMP_FLAGS"] = {}
# SQLite
-sqlite_conf_env = conf_env.Clone()
-sqlite_flags = {}
-if env.get("sqlite_libdir", None) :
- sqlite_flags["LIBPATH"] = [env["sqlite_libdir"]]
-if env.get("sqlite_includedir", None) :
- sqlite_flags["CPPPATH"] = [env["sqlite_includedir"]]
-sqlite_conf_env.MergeFlags(sqlite_flags)
-conf = Configure(sqlite_conf_env)
-if conf.CheckCHeader("sqlite3.h") and conf.CheckLib(env["sqlite_libname"]) and not env.get("sqlite_force_bundled", False):
- env["HAVE_SQLITE"] = 1
- env["SQLITE_FLAGS"] = { "LIBS": [env["sqlite_libname"]] }
- env["SQLITE_FLAGS"].update(sqlite_flags)
+if env["experimental"] :
+ sqlite_conf_env = conf_env.Clone()
+ sqlite_flags = {}
+ if env.get("sqlite_libdir", None) :
+ sqlite_flags["LIBPATH"] = [env["sqlite_libdir"]]
+ if env.get("sqlite_includedir", None) :
+ sqlite_flags["CPPPATH"] = [env["sqlite_includedir"]]
+ sqlite_conf_env.MergeFlags(sqlite_flags)
+ conf = Configure(sqlite_conf_env)
+ if conf.CheckCHeader("sqlite3.h") and conf.CheckLib(env["sqlite_libname"]) and not env.get("sqlite_force_bundled", False):
+ env["HAVE_SQLITE"] = 1
+ env["SQLITE_FLAGS"] = { "LIBS": [env["sqlite_libname"]] }
+ env["SQLITE_FLAGS"].update(sqlite_flags)
+ else :
+ env["SQLITE_BUNDLED"] = 1
+ env["SQLITE_ASYNC_BUNDLED"] = 1
+ conf.Finish()
else :
- env["SQLITE_BUNDLED"] = 1
-conf.Finish()
+ env["SQLITE_FLAGS"] = {}
+
# Lua
env["LUA_BUNDLED"] = 1