From 66da202f765c8843bf61bc83fb5e7f81c2cb0a65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Thu, 3 Jun 2010 21:03:47 +0200
Subject: Remove SQLite and SQLiteHistoryManager.


diff --git a/3rdParty/SQLite/SConscript b/3rdParty/SQLite/SConscript
index 75b1d97..9b9fead 100644
--- a/3rdParty/SQLite/SConscript
+++ b/3rdParty/SQLite/SConscript
@@ -1,17 +1,19 @@
 Import("env")
 
+if env.get("SQLITE_BUNDLED", False) :
+
 ################################################################################
 # Flags
 ################################################################################
 
-if env["SCONS_STAGE"] == "flags" :
-	env["SQLITE_FLAGS"] = {
-			"CPPPATH": [Dir(".")],
-			"LIBPATH": [Dir(".")],
-			"LIBS": ["SQLite"],
-		}
+	if env["SCONS_STAGE"] == "flags" :
+		env["SQLITE_FLAGS"] = {
+				"CPPPATH": [Dir(".")],
+				"LIBPATH": [Dir(".")],
+				"LIBS": ["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 = ["."])
+	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 = ["."])
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 8a58f5e..80e3d56 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -30,7 +30,7 @@ if myenv["HAVE_SPARKLE"] :
 myenv.MergeFlags(env["SWIFTEN_FLAGS"])
 myenv.MergeFlags(env["LIBIDN_FLAGS"])
 myenv.MergeFlags(env["BOOST_FLAGS"])
-myenv.MergeFlags(env["SQLITE_FLAGS"])
+myenv.MergeFlags(env.get("SQLITE_FLAGS", {}))
 myenv.MergeFlags(env["ZLIB_FLAGS"])
 myenv.MergeFlags(env["OPENSSL_FLAGS"])
 myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
diff --git a/Swiften/Examples/ConnectivityTest/SConscript b/Swiften/Examples/ConnectivityTest/SConscript
index 55a0b36..6563ded 100644
--- a/Swiften/Examples/ConnectivityTest/SConscript
+++ b/Swiften/Examples/ConnectivityTest/SConscript
@@ -4,7 +4,7 @@ myenv = env.Clone()
 myenv.MergeFlags(myenv["SWIFTEN_FLAGS"])
 myenv.MergeFlags(myenv["LIBIDN_FLAGS"])
 myenv.MergeFlags(myenv["BOOST_FLAGS"])
-myenv.MergeFlags(myenv["SQLITE_FLAGS"])
+myenv.MergeFlags(myenv.get("SQLITE_FLAGS", {}))
 myenv.MergeFlags(myenv["ZLIB_FLAGS"])
 myenv.MergeFlags(myenv["OPENSSL_FLAGS"])
 myenv.MergeFlags(myenv.get("LIBXML_FLAGS", ""))
diff --git a/Swiften/Examples/LinkLocalTool/SConscript b/Swiften/Examples/LinkLocalTool/SConscript
index 0feceae..0756d68 100644
--- a/Swiften/Examples/LinkLocalTool/SConscript
+++ b/Swiften/Examples/LinkLocalTool/SConscript
@@ -4,9 +4,9 @@ myenv = env.Clone()
 myenv.MergeFlags(myenv["SWIFTEN_FLAGS"])
 myenv.MergeFlags(myenv["LIBIDN_FLAGS"])
 myenv.MergeFlags(myenv["BOOST_FLAGS"])
-myenv.MergeFlags(myenv["SQLITE_FLAGS"])
 myenv.MergeFlags(myenv["ZLIB_FLAGS"])
 myenv.MergeFlags(myenv["OPENSSL_FLAGS"])
+myenv.MergeFlags(myenv.get("SQLITE_FLAGS", {}))
 myenv.MergeFlags(myenv.get("LIBXML_FLAGS", {}))
 myenv.MergeFlags(myenv.get("EXPAT_FLAGS", {}))
 myenv.MergeFlags(myenv.get("AVAHI_FLAGS", {}))
diff --git a/Swiften/Examples/SendMessage/SConscript b/Swiften/Examples/SendMessage/SConscript
index c3f325e..bc9bde2 100644
--- a/Swiften/Examples/SendMessage/SConscript
+++ b/Swiften/Examples/SendMessage/SConscript
@@ -4,9 +4,9 @@ myenv = env.Clone()
 myenv.MergeFlags(myenv["SWIFTEN_FLAGS"])
 myenv.MergeFlags(myenv["LIBIDN_FLAGS"])
 myenv.MergeFlags(myenv["BOOST_FLAGS"])
-myenv.MergeFlags(myenv["SQLITE_FLAGS"])
 myenv.MergeFlags(myenv["ZLIB_FLAGS"])
 myenv.MergeFlags(myenv["OPENSSL_FLAGS"])
+myenv.MergeFlags(myenv.get("SQLITE_FLAGS", {}))
 myenv.MergeFlags(myenv.get("LIBXML_FLAGS", ""))
 myenv.MergeFlags(myenv.get("EXPAT_FLAGS", ""))
 tester = myenv.Program("SendMessage", ["SendMessage.cpp"])
diff --git a/Swiften/History/SConscript b/Swiften/History/SConscript
index bc80780..c197653 100644
--- a/Swiften/History/SConscript
+++ b/Swiften/History/SConscript
@@ -1,11 +1,11 @@
 Import("swiften_env")
 
-myenv = swiften_env.Clone()
-if myenv["target"] == "native":
-   myenv.MergeFlags(swiften_env["SQLITE_FLAGS"])
-
-objects = myenv.StaticObject([
-			"HistoryManager.cpp",
-			"SQLiteHistoryManager.cpp",
-		])
-swiften_env.Append(SWIFTEN_OBJECTS = [objects])
+#myenv = swiften_env.Clone()
+#if myenv["target"] == "native":
+#   myenv.MergeFlags(swiften_env.get("SQLITE_FLAGS", {}))
+#
+#objects = myenv.StaticObject([
+#			"HistoryManager.cpp",
+#			"SQLiteHistoryManager.cpp",
+#		])
+#swiften_env.Append(SWIFTEN_OBJECTS = [objects])
-- 
cgit v0.10.2-6-g49f6