changeset 194:0186ac92810c

fixes for Ubuntu 10.04
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 14 Nov 2012 09:23:53 +0100
parents a1b9d1e1497b
children 702ab4f84c5f
files OrthancServer/Internals/StoreScp.cpp OrthancServer/ServerIndex.cpp Resources/CMake/DcmtkConfiguration.cmake Resources/CMake/GoogleLogConfiguration.h Resources/CMake/SQLiteConfiguration.cmake UnitTests/Versions.cpp
diffstat 6 files changed, 25 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Internals/StoreScp.cpp	Tue Nov 13 14:02:28 2012 +0100
+++ b/OrthancServer/Internals/StoreScp.cpp	Wed Nov 14 09:23:53 2012 +0100
@@ -81,7 +81,7 @@
                                      /*opt_groupLength*/ EGL_recalcGL,
                                      /*opt_paddingType*/ EPD_withoutPadding);
 #else
-      OFCondition c = dataSet->write(ob, xfer, encodingType);
+      OFCondition c = dataSet->write(ob, xfer, encodingType, NULL);
 #endif
 
       dataSet->transferEnd();
--- a/OrthancServer/ServerIndex.cpp	Tue Nov 13 14:02:28 2012 +0100
+++ b/OrthancServer/ServerIndex.cpp	Wed Nov 14 09:23:53 2012 +0100
@@ -709,11 +709,11 @@
     switch (status)
     {
     case StoreStatus_Success:
-      LOG(WARNING) << "New instance stored";
+      LOG(INFO) << "New instance stored";
       break;
 
     case StoreStatus_AlreadyStored:
-      LOG(WARNING) << "Already stored";
+      LOG(INFO) << "Already stored";
       break;
 
     case StoreStatus_Failure:
--- a/Resources/CMake/DcmtkConfiguration.cmake	Tue Nov 13 14:02:28 2012 +0100
+++ b/Resources/CMake/DcmtkConfiguration.cmake	Wed Nov 14 09:23:53 2012 +0100
@@ -1,6 +1,3 @@
-# We always statically link against DCMTK 3.6.0, as there are many
-# differences wrt. DCMTK 3.5.x.
-
 if (${STATIC_BUILD})
   SET(DCMTK_VERSION_NUMBER 360)
   SET(DCMTK_SOURCES_DIR ${CMAKE_BINARY_DIR}/dcmtk-3.6.0)
--- a/Resources/CMake/GoogleLogConfiguration.h	Tue Nov 13 14:02:28 2012 +0100
+++ b/Resources/CMake/GoogleLogConfiguration.h	Wed Nov 14 09:23:53 2012 +0100
@@ -138,7 +138,16 @@
 #define PACKAGE_VERSION "0.3.2"
 
 /* How to access the PC from a struct ucontext */
+/*#include <ucontext.h>
+#include <sys/ucontext.h>
+#ifdef REG_RIP
 #define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP]
+#else
+#undef PC_FROM_UCONTEXT
+#endif*/
+
+// This is required for older versions of Linux
+#undef PC_FROM_UCONTEXT
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
--- a/Resources/CMake/SQLiteConfiguration.cmake	Tue Nov 13 14:02:28 2012 +0100
+++ b/Resources/CMake/SQLiteConfiguration.cmake	Wed Nov 14 09:23:53 2012 +0100
@@ -24,5 +24,16 @@
     message(FATAL_ERROR "Please install the libsqlite3-dev package")
   endif()
 
+  # Autodetection of the version of SQLite
+  file(STRINGS "/usr/include/sqlite3.h" SQLITE_VERSION_NUMBER1 REGEX "#define SQLITE_VERSION_NUMBER.*$")    
+  string(REGEX REPLACE "#define SQLITE_VERSION_NUMBER(.*)$" "\\1" SQLITE_VERSION_NUMBER ${SQLITE_VERSION_NUMBER1})
+
+  message("Detected version of SQLite: ${SQLITE_VERSION_NUMBER}")
+
+  IF (${SQLITE_VERSION_NUMBER} LESS 3007000)
+    # "sqlite3_create_function_v2" is not defined in SQLite < 3.7.0
+    message(FATAL_ERROR "SQLite version must be above 3.7.0. Please set the CMake variable USE_DYNAMIC_SQLITE to OFF.")
+  ENDIF()
+
   link_libraries(sqlite3)
 endif()
--- a/UnitTests/Versions.cpp	Tue Nov 13 14:02:28 2012 +0100
+++ b/UnitTests/Versions.cpp	Wed Nov 14 09:23:53 2012 +0100
@@ -34,7 +34,8 @@
   assert(strcmp(sqlite3_sourceid(), SQLITE_SOURCE_ID) == 0);
   assert(strcmp(sqlite3_libversion(), SQLITE_VERSION) == 0);
 
-  // Ensure that the SQLite version is above 3.7.0
+  // Ensure that the SQLite version is above 3.7.0.
+  // "sqlite3_create_function_v2" is not defined in previous versions.
   ASSERT_GE(SQLITE_VERSION_NUMBER, 3007000);
 }