diff options
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/IDN/PlatformIDNConverter.cpp | 2 | ||||
-rw-r--r-- | Swiften/IDN/SConscript | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/IDN/PlatformIDNConverter.cpp b/Swiften/IDN/PlatformIDNConverter.cpp index 6d9cff7..4882b60 100644 --- a/Swiften/IDN/PlatformIDNConverter.cpp +++ b/Swiften/IDN/PlatformIDNConverter.cpp @@ -1,27 +1,29 @@ /* * Copyright (c) 2012 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #include <Swiften/IDN/PlatformIDNConverter.h> #if defined(HAVE_LIBIDN) #include <Swiften/IDN/LibIDNConverter.h> #elif defined(HAVE_ICU) #include <Swiften/IDN/ICUConverter.h> #endif namespace Swift { IDNConverter* PlatformIDNConverter::create() { #if defined(HAVE_LIBIDN) return new LibIDNConverter(); #elif defined(HAVE_ICU) return new ICUConverter(); #else +#if defined(NEED_IDN) #error "No IDN implementation" +#endif return 0; #endif } } diff --git a/Swiften/IDN/SConscript b/Swiften/IDN/SConscript index 9d3b8f9..4c1a71d 100644 --- a/Swiften/IDN/SConscript +++ b/Swiften/IDN/SConscript @@ -1,26 +1,28 @@ Import("swiften_env", "env") objects = swiften_env.SwiftenObject(["IDNConverter.cpp"]) myenv = swiften_env.Clone() +if myenv.get("NEED_IDN"): + myenv.Append(CPPDEFINES = ["NEED_IDN"]) if myenv.get("HAVE_ICU") : myenv.MergeFlags(swiften_env["ICU_FLAGS"]) myenv.Append(CPPDEFINES = ["HAVE_ICU"]) objects += myenv.SwiftenObject(["ICUConverter.cpp"]) if myenv.get("HAVE_LIBIDN") : myenv.MergeFlags(swiften_env["LIBIDN_FLAGS"]) myenv.Append(CPPDEFINES = ["HAVE_LIBIDN"]) objects += myenv.SwiftenObject(["LibIDNConverter.cpp"]) objects += myenv.SwiftenObject(["PlatformIDNConverter.cpp"]) swiften_env.Append(SWIFTEN_OBJECTS = [objects]) if env["TEST"] : test_env = myenv.Clone() test_env.UseFlags(swiften_env["CPPUNIT_FLAGS"]) env.Append(UNITTEST_OBJECTS = test_env.SwiftenObject([ File("UnitTest/IDNConverterTest.cpp"), ])) |