summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--3rdParty/CAres/SConscript126
-rw-r--r--Swiften/Network/SConscript6
2 files changed, 67 insertions, 65 deletions
diff --git a/3rdParty/CAres/SConscript b/3rdParty/CAres/SConscript
index bfd9a5d..3999c97 100644
--- a/3rdParty/CAres/SConscript
+++ b/3rdParty/CAres/SConscript
@@ -1,74 +1,76 @@
Import("env")
+if env.get("CARES_BUNDLED", False) :
+
################################################################################
# Flags
################################################################################
-if env["SCONS_STAGE"] == "flags" :
- env["CARES_FLAGS"] = {
- "CPPDEFINES": ["CARES_STATICLIB"],
- "CPPPATH": [Dir("include")],
- "LIBPATH": [Dir(".")],
- "LIBS": ["CAres"],
- }
+ if env["SCONS_STAGE"] == "flags" :
+ env["CARES_FLAGS"] = {
+ "CPPDEFINES": ["CARES_STATICLIB"],
+ "CPPPATH": [Dir("include")],
+ "LIBPATH": [Dir(".")],
+ "LIBS": ["CAres"],
+ }
################################################################################
# Build
################################################################################
-if env["SCONS_STAGE"] == "build" :
- myenv = env.Clone()
- myenv.Append(CPPPATH = ["src"])
- myenv.Append(CPPDEFINES = [("CARES_STATICLIB")])
- myenv.Append(CPPPATH = ["src", "."])
- if myenv["PLATFORM"] != "win32" :
- myenv.Append(CPPDEFINES = ["HAVE_CONFIG_H"])
+ if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+ myenv.Append(CPPPATH = ["src"])
+ myenv.Append(CPPDEFINES = [("CARES_STATICLIB")])
+ myenv.Append(CPPPATH = ["src", "."])
+ if myenv["PLATFORM"] != "win32" :
+ myenv.Append(CPPDEFINES = ["HAVE_CONFIG_H"])
- myenv.Install("include", [
- "src/ares.h",
- "src/ares_version.h",
- "src/ares_build.h",
- "src/ares_rules.h"
- ])
- myenv.StaticLibrary("CAres", [
- "src/ares__close_sockets.c",
- "src/ares__get_hostent.c",
- "src/ares__read_line.c",
- "src/ares__timeval.c",
- "src/ares_cancel.c",
- "src/ares_data.c",
- "src/ares_destroy.c",
- "src/ares_expand_name.c",
- "src/ares_expand_string.c",
- "src/ares_fds.c",
- "src/ares_free_hostent.c",
- "src/ares_free_string.c",
- "src/ares_gethostbyaddr.c",
- "src/ares_gethostbyname.c",
- "src/ares_getnameinfo.c",
- "src/ares_getsock.c",
- "src/ares_init.c",
- "src/ares_library_init.c",
- "src/ares_llist.c",
- "src/ares_mkquery.c",
- "src/ares_parse_a_reply.c",
- "src/ares_parse_aaaa_reply.c",
- "src/ares_parse_ns_reply.c",
- "src/ares_parse_ptr_reply.c",
- "src/ares_parse_srv_reply.c",
- "src/ares_parse_txt_reply.c",
- "src/ares_process.c",
- "src/ares_query.c",
- "src/ares_search.c",
- "src/ares_send.c",
- "src/ares_strcasecmp.c",
- "src/ares_strdup.c",
- "src/ares_strerror.c",
- "src/ares_timeout.c",
- "src/ares_version.c",
- "src/ares_writev.c",
- "src/bitncmp.c",
- "src/inet_net_pton.c",
- "src/inet_ntop.c",
- "src/windows_port.c",
- ])
+ myenv.Install("include", [
+ "src/ares.h",
+ "src/ares_version.h",
+ "src/ares_build.h",
+ "src/ares_rules.h"
+ ])
+ myenv.StaticLibrary("CAres", [
+ "src/ares__close_sockets.c",
+ "src/ares__get_hostent.c",
+ "src/ares__read_line.c",
+ "src/ares__timeval.c",
+ "src/ares_cancel.c",
+ "src/ares_data.c",
+ "src/ares_destroy.c",
+ "src/ares_expand_name.c",
+ "src/ares_expand_string.c",
+ "src/ares_fds.c",
+ "src/ares_free_hostent.c",
+ "src/ares_free_string.c",
+ "src/ares_gethostbyaddr.c",
+ "src/ares_gethostbyname.c",
+ "src/ares_getnameinfo.c",
+ "src/ares_getsock.c",
+ "src/ares_init.c",
+ "src/ares_library_init.c",
+ "src/ares_llist.c",
+ "src/ares_mkquery.c",
+ "src/ares_parse_a_reply.c",
+ "src/ares_parse_aaaa_reply.c",
+ "src/ares_parse_ns_reply.c",
+ "src/ares_parse_ptr_reply.c",
+ "src/ares_parse_srv_reply.c",
+ "src/ares_parse_txt_reply.c",
+ "src/ares_process.c",
+ "src/ares_query.c",
+ "src/ares_search.c",
+ "src/ares_send.c",
+ "src/ares_strcasecmp.c",
+ "src/ares_strdup.c",
+ "src/ares_strerror.c",
+ "src/ares_timeout.c",
+ "src/ares_version.c",
+ "src/ares_writev.c",
+ "src/bitncmp.c",
+ "src/inet_net_pton.c",
+ "src/inet_ntop.c",
+ "src/windows_port.c",
+ ])
diff --git a/Swiften/Network/SConscript b/Swiften/Network/SConscript
index 937ab0c..b4946f9 100644
--- a/Swiften/Network/SConscript
+++ b/Swiften/Network/SConscript
@@ -2,8 +2,8 @@ Import("swiften_env")
myenv = swiften_env.Clone()
myenv.MergeFlags(myenv["LIBIDN_FLAGS"])
-if myenv["target"] == "native":
- myenv.MergeFlags(myenv["CARES_FLAGS"])
+if myenv.get("HAVE_CARES", False) :
+ myenv.MergeFlags(myenv.get("CARES_FLAGS", {}))
sourceList = [
"BoostConnection.cpp",
@@ -26,7 +26,7 @@ sourceList = [
"HostAddress.cpp",
"Timer.cpp",
"BoostTimer.cpp"]
-if myenv["target"] == "native":
+if myenv.get("HAVE_CARES", False) :
sourceList.append("CAresDomainNameResolver.cpp")