build/win32/libcdr.vcproj  |    4 ++--
 build/win32/libcdr.vcxproj |    4 ++--
 configure.ac               |   12 ++++++------
 src/lib/libcdr_utils.cpp   |    6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit cda00fa23d8519a11007e5240996ec5c5db27ac5
Author: Fridrich Å trba <[email protected]>
Date:   Wed Jan 23 11:21:19 2013 +0100

    More general configure option, since we will use icu for charset conversion 
too

diff --git a/build/win32/libcdr.vcproj b/build/win32/libcdr.vcproj
index 8ee406e..eb41309 100755
--- a/build/win32/libcdr.vcproj
+++ b/build/win32/libcdr.vcproj
@@ -42,7 +42,7 @@
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                
AdditionalIncludeDirectories="$(LIBWPD_INCLUDE_DIR),$(LIBWPG_INCLUDE_DIR),$(LCMS2_INCLUDE_DIR),$(ZLIB_INCLUDE_DIR),$(ICU_INCLUDE_DIR)"
-                               
PreprocessorDefinitions="_DEBUG;DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;ENABLE_LANGUAGE_GUESSING"
+                               
PreprocessorDefinitions="_DEBUG;DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;USE_ICU"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="3"
                                TreatWChar_tAsBuiltInType="false"
@@ -117,7 +117,7 @@
                                Optimization="2"
                                InlineFunctionExpansion="1"
                                
AdditionalIncludeDirectories="$(LIBWPD_INCLUDE_DIR),$(LIBWPG_INCLUDE_DIR),$(LCMS2_INCLUDE_DIR),$(ZLIB_INCLUDE_DIR),$(ICU_INCLUDE_DIR)"
-                               
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;ENABLE_LANGUAGE_GUESSING"
+                               
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;USE_ICU"
                                StringPooling="true"
                                RuntimeLibrary="2"
                                EnableFunctionLevelLinking="true"
diff --git a/build/win32/libcdr.vcxproj b/build/win32/libcdr.vcxproj
index 46be0de..4a4c679 100755
--- a/build/win32/libcdr.vcxproj
+++ b/build/win32/libcdr.vcxproj
@@ -44,7 +44,7 @@
     <ClCompile>
       <Optimization>Disabled</Optimization>
       
<AdditionalIncludeDirectories>$(LIBWPD_INCLUDE_DIR);$(LIBWPG_INCLUDE_DIR);$(LCMS2_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);$(ICU_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      
<PreprocessorDefinitions>_DEBUG;DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;ENABLE_LANGUAGE_GUESSING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      
<PreprocessorDefinitions>_DEBUG;DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;USE_ICU;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
@@ -75,7 +75,7 @@
       <Optimization>MaxSpeed</Optimization>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       
<AdditionalIncludeDirectories>$(LIBWPD_INCLUDE_DIR);$(LIBWPG_INCLUDE_DIR);$(LCMS2_INCLUDE_DIR);$(ZLIB_INCLUDE_DIR);$(ICU_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      
<PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;ENABLE_LANGUAGE_GUESSING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      
<PreprocessorDefinitions>NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;USE_ICU;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <FunctionLevelLinking>true</FunctionLevelLinking>
diff --git a/configure.ac b/configure.ac
index 8807a1a..dc26908 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,23 +62,23 @@ PKG_CHECK_MODULES([ZLIB],[zlib],[],[
 AC_SUBST(ZLIB_CFLAGS)
 AC_SUBST(ZLIB_LIBS)
 
-AC_ARG_ENABLE([language-guessing],
-       [AS_HELP_STRING([--disable-language-guessing], [Disable language 
guessing using ICU])],
-       [enable_language_guessing="$enableval"],
-       [enable_language_guessing=yes]
+AC_ARG_WITH([icu],
+       [AS_HELP_STRING([--without-icu], [Disable the use of ICU])],
+       [with_icu="$enableval"],
+       [with_icu=yes]
 )
 
 # ========
 # Find icu
 # ========
-AS_IF([test x$enable_language_guessing = xyes], [
+AS_IF([test x$with_icu = xyes], [
        AC_PATH_PROG([ICU_CONFIG],[icu-config])
        AC_MSG_CHECKING([ICU installation])
        if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then
                ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath`
                ICU_LIBS=`${ICU_CONFIG} --ldflags`
                AC_MSG_RESULT([found])
-               AC_DEFINE([ENABLE_LANGUAGE_GUESSING], [1], [Enable language 
guessing using ICU])
+               AC_DEFINE([USE_ICU], [1], [Enable the use of ICU])
        else
                AC_MSG_ERROR([libicu config program icu-config not found])
        fi],
diff --git a/src/lib/libcdr_utils.cpp b/src/lib/libcdr_utils.cpp
index 76b7116..ab9452a 100644
--- a/src/lib/libcdr_utils.cpp
+++ b/src/lib/libcdr_utils.cpp
@@ -31,7 +31,7 @@
 
 #include "libcdr_utils.h"
 
-#ifdef ENABLE_LANGUAGE_GUESSING
+#ifdef USE_ICU
 #include <unicode/ucsdet.h>
 #endif
 
@@ -41,7 +41,7 @@
 
 namespace
 {
-#ifdef ENABLE_LANGUAGE_GUESSING
+#ifdef USE_ICU
 static unsigned short getEncodingFromICUName(const char *name)
 {
   // ANSI
@@ -534,7 +534,7 @@ void libcdr::appendCharacters(WPXString &text, 
std::vector<unsigned char> charac
     0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF
   };
 
-#ifdef ENABLE_LANGUAGE_GUESSING
+#ifdef USE_ICU
   if (!charset && characters.size())
     charset = getEncoding(&characters[0], characters.size());
 #endif
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to