Commits

Scott Lawrence committed a82e5b1 Merge

merge changes for storm-34

Comments (0)

Files changed (497)

 dc6483491b4af559060bccaef8e9045a303212dd 2.4.0-beta1
 dc6483491b4af559060bccaef8e9045a303212dd 2.4.0-beta1
 3bc1f50a72e117f4d4ad8d555f0c785ea8cc201e 2.4.0-beta1
+25bd6007e3d2fc15db9326ed4b18a24a5969a46a 2.4.0-beta2
+1ed382c6a08ba3850b6ce9061bc551ddece0ea07 2.4.0-release
 viewer-beta.login_channel = "Second Life Beta Viewer"
 viewer-beta.build_debug_release_separately = true
 viewer-beta.build_viewer_update_version_manager = true
-# Settings to test new code ticket service
-viewer-beta.codeticket_server_url = "http://pdp75.lindenlab.com:8000/codeticket/linden/"
-viewer-beta.codeticket_add_context = true
 
 # ========================================
 # Viewer Release
 viewer-tut-teamcity.build_server = false
 viewer-tut-teamcity.build_server_tests = false
 
+# ========================================
+# experience
+# ========================================
+viewer-experience.public_build = false
+viewer-experience.viewer_channel = "Second Life SkyLight Viewer"
+viewer-experience.login_channel = "Second Life SkyLight Viewer"
+
+# =================================================================
+# asset delivery 2010 projects
+# =================================================================
+viewer-asset-delivery.viewer_channel = "Second Life Development"
+viewer-asset-delivery.login_channel = "Second Life Development"
+viewer-asset-delivery.build_viewer_update_version_manager = false
+viewer-asset-delivery.email = monty@lindenlab.com
+viewer-asset-delivery.build_server = false
+viewer-asset-delivery.build_server_tests = false
+
+viewer-asset-delivery-metrics.viewer_channel = "Second Life Development"
+viewer-asset-delivery-metrics.login_channel = "Second Life Development"
+viewer-asset-delivery-metrics.build_viewer_update_version_manager = false
+viewer-asset-delivery-metrics.email = monty@lindenlab.com
+viewer-asset-delivery-metrics.build_server = false
+viewer-asset-delivery-metrics.build_server_tests = false
+
 
 # eof
     -t $variant \
     -G "$cmake_generator" \
    configure \
-	-DGRID:STRING="$viewer_grid" \
+    -DGRID:STRING="$viewer_grid" \
     -DVIEWER_CHANNEL:STRING="$viewer_channel" \
     -DVIEWER_LOGIN_CHANNEL:STRING="$login_channel" \
     -DINSTALL_PROPRIETARY:BOOL=ON \
+    -DRELEASE_CRASH_REPORTING:BOOL=ON \
     -DLOCALIZESETUP:BOOL=ON \
     -DPACKAGE:BOOL=ON \
     -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
   mkdir -p "$build_dir"
   if pre_build "$variant" "$build_dir" >> "$build_log" 2>&1
   then
-    if $build_link_parallel
-    then
-      begin_section BuildParallel
-      ( build "$variant" "$build_dir" > "$build_dir/build.log" 2>&1 ) &
-      build_processes="$build_processes $!"
-      end_section BuildParallel
-    elif $build_coverity
+    if $build_coverity
     then
       mkdir -p "$build_dir/cvbuild"
       coverity_config=`cygpath --windows "$coverity_dir/config/coverity_config.xml"`
         begin_section CovAnalyze\
          &&\
         "$coverity_dir"/bin/cov-analyze\
-           --cxx\
            --security\
            --concurrency\
            --dir "$coverity_tmpdir"\
         begin_section CovCommit\
          &&\
         "$coverity_dir"/bin/cov-commit-defects\
-           --product "$coverity_product"\
+           --stream "$coverity_product"\
            --dir "$coverity_tmpdir"\
-           --remote "$coverity_server"\
+           --host "$coverity_server"\
            --strip-path "$coverity_root"\
            --target "$branch/$arch"\
            --version "$revision"\
            --description "$repo: $variant $revision"\
-           --user admin --password admin\
+           --user admin --password coverity\
           >> "$build_log" 2>&1\
           || record_failure "Coverity Build Failed"
         # since any step could have failed, rely on the enclosing block to close any pending sub-blocks
       then
         upload_item log "$build_dir"/cvbuild/build-log.txt text/plain
       fi
+    elif $build_link_parallel
+    then
+      begin_section BuildParallel
+      ( build "$variant" "$build_dir" > "$build_dir/build.log" 2>&1 ) &
+      build_processes="$build_processes $!"
+      end_section BuildParallel
     else
       begin_section "Build$variant"
       build "$variant" "$build_dir" >> "$build_log" 2>&1

doc/contributions.txt

 Alejandro Rosenthal
 	VWR-1184
 Aleric Inglewood
+	SNOW-240
 	SNOW-522
 	SNOW-626
 	SNOW-756
 	SNOW-764
 	VWR-10001
+	VWR-10579
 	VWR-10759
 	VWR-10837
 	VWR-12691
 	VWR-12984
 	VWR-13996
 	VWR-14426
+	VWR-24247
+	VWR-24251
+	VWR-24252
+	VWR-24254
+	VWR-24261
 	SNOW-84
 	SNOW-477
+	SNOW-744
 	SNOW-766
 	STORM-163
 Ales Beaumont
 Celierra Darling
 	VWR-1274
 	VWR-6975
+Cron Stardust
+	VWR-10579
 Cypren Christenson
 	STORM-417
 Dale Glass
 Joghert LeSabre
 	VWR-64
 Jonathan Yap
-	VWR-17801
+	STORM-596
+	STORM-523
 	STORM-616
 	STORM-679
-	STORM-596
+	STORM-737
+	STORM-726
+	STORM-812
+	VWR-17801
+	STORM-785
 Kage Pixel
 	VWR-11
 Ken March
 	VWR-9966
 Kitty Barnett
 	VWR-19699
+	STORM-288
+	STORM-799
+	STORM-800
 Kunnis Basiat
 	VWR-82
 	VWR-102
 	STORM-422
 	VWR-2488
 	VWR-9557
+	VWR-10579
 	VWR-11128
 	VWR-12533
 	VWR-12587
 	VWR-6186
 Satomi Ahn
 	STORM-501
+	STORM-229
 Scrippy Scofield
 	VWR-3748
 Seg Baphomet
 	CT-74
 Twisted Laws
 	SNOW-352
+	STORM-466
+	STORM-467
 Vadim Bigbear
 	VWR-2681
 Vector Hastings
 	STORM-143
 	STORM-255
 	STORM-256
+	STORM-288
 	STORM-535
 	STORM-544
 	STORM-654
 	STORM-674
+	STORM-776
+	STORM-825
 	VWR-20741
 	VWR-20933
 Zai Lynch

indra/CMakeLists.txt

 add_subdirectory(${LIBS_OPEN_PREFIX}llcharacter)
 add_subdirectory(${LIBS_OPEN_PREFIX}llcommon)
 add_subdirectory(${LIBS_OPEN_PREFIX}llimage)
+add_subdirectory(${LIBS_OPEN_PREFIX}llkdu)
 add_subdirectory(${LIBS_OPEN_PREFIX}llimagej2coj)
 add_subdirectory(${LIBS_OPEN_PREFIX}llinventory)
 add_subdirectory(${LIBS_OPEN_PREFIX}llmath)
 add_subdirectory(${LIBS_OPEN_PREFIX}llwindow)
 add_subdirectory(${LIBS_OPEN_PREFIX}llxml)
 
-if (EXISTS ${LIBS_CLOSED_DIR}llkdu)
-  add_subdirectory(${LIBS_CLOSED_PREFIX}llkdu)
-endif (EXISTS ${LIBS_CLOSED_DIR}llkdu)
-
 add_subdirectory(${LIBS_OPEN_PREFIX}lscript)
 
 if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)

indra/cmake/00-Common.cmake

 
 include(Variables)
 
-
 # Portable compilation flags.
-
-if (EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
-  # The release build should only offer to send crash reports if we're
-  # building from a Linden internal source tree.
-  set(release_crash_reports 1)
-else (EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
-  set(release_crash_reports 0) 
-endif (EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
-
 set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
 set(CMAKE_CXX_FLAGS_RELEASE
-    "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=${release_crash_reports} -DNDEBUG") 
+    "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DNDEBUG") 
 
 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO 
-    "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
+    "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
 
+# Configure crash reporting
+set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
+set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
+
+if(RELEASE_CRASH_REPORTING)
+  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DLL_SEND_CRASH_REPORTS=1")
+endif()
+
+if(NON_RELEASE_CRASH_REPORTING)
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DLL_SEND_CRASH_REPORTS=1")
+  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1")
+endif()  
 
 # Don't bother with a MinSizeRel build.
-
 set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
     "Supported build types." FORCE)
 

indra/cmake/BerkeleyDB.cmake

 if (STANDALONE)
   include(FindBerkeleyDB)
 else (STANDALONE)
-  set(DB_LIBRARIES db-4.2)
+  if (LINUX)
+    # Need to add dependency pthread explicitely to support ld.gold.
+    set(DB_LIBRARIES db-4.2 pthread)
+  else (LINUX)
+    set(DB_LIBRARIES db-4.2)
+  endif (LINUX)
   set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
 endif (STANDALONE)

indra/cmake/CMakeLists.txt

     FindMySQL.cmake
     FindOpenJPEG.cmake
     FindXmlRpcEpi.cmake
+    FindZLIB.cmake
     FMOD.cmake
     FreeType.cmake
     GStreamer010Plugin.cmake

indra/cmake/CURL.cmake

   use_prebuilt_binary(curl)
   if (WINDOWS)
     set(CURL_LIBRARIES 
-    debug libcurld
-    optimized libcurl)
+    debug libcurld.lib
+    optimized libcurl.lib)
   else (WINDOWS)
-    set(CURL_LIBRARIES curl)
+    set(CURL_LIBRARIES libcurl.a)
   endif (WINDOWS)
   set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
 endif (STANDALONE)

indra/cmake/Copy3rdPartyLibs.cmake

       set(release_files ${release_files} fmod.dll)
     endif (FMOD)
 
-    #*******************************
-    # LLKDU
-    set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
-    if(NOT EXISTS ${internal_llkdu_path})
-        if (EXISTS "${debug_src_dir}/llkdu.dll")
-            set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
-            set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/llkdu.dll")
-        endif (EXISTS "${debug_src_dir}/llkdu.dll")
-
-        if (EXISTS "${release_src_dir}/llkdu.dll")
-            set(release_llkdu_src "${release_src_dir}/llkdu.dll")
-            set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/llkdu.dll")
-            set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/llkdu.dll")
-        endif (EXISTS "${release_src_dir}/llkdu.dll")
-    endif (NOT EXISTS ${internal_llkdu_path})
-
 #*******************************
 # Copy MS C runtime dlls, required for packaging.
 # *TODO - Adapt this to support VC9
     # fmod is statically linked on darwin
     set(fmod_files "")
 
-    #*******************************
-    # LLKDU
-    set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
-    if(NOT EXISTS ${internal_llkdu_path})
-        if (EXISTS "${debug_src_dir}/libllkdu.dylib")
-            set(debug_llkdu_src "${debug_src_dir}/libllkdu.dylib")
-            set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/libllkdu.dylib")
-        endif (EXISTS "${debug_src_dir}/libllkdu.dylib")
-
-        if (EXISTS "${release_src_dir}/libllkdu.dylib")
-            set(release_llkdu_src "${release_src_dir}/libllkdu.dylib")
-            set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.dylib")
-            set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.dylib")
-        endif (EXISTS "${release_src_dir}/libllkdu.dylib")
-    endif (NOT EXISTS ${internal_llkdu_path})
 elseif(LINUX)
     # linux is weird, multiple side by side configurations aren't supported
     # and we don't seem to have any debug shared libs built yet anyways...
       set(release_files ${release_files} "libfmod-3.75.so")
     endif (FMOD)
 
-    #*******************************
-    # LLKDU
-    set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
-    if(NOT EXISTS ${internal_llkdu_path})
-        if (EXISTS "${debug_src_dir}/libllkdu.so")
-            set(debug_llkdu_src "${debug_src_dir}/libllkdu.so")
-            set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/libllkdu.so")
-        endif (EXISTS "${debug_src_dir}/libllkdu.so")
-
-        if (EXISTS "${release_src_dir}/libllkdu.so")
-            set(release_llkdu_src "${release_src_dir}/libllkdu.so")
-            set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.so")
-            set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.so")
-        endif (EXISTS "${release_src_dir}/libllkdu.so")
-    endif(NOT EXISTS ${internal_llkdu_path})
 else(WINDOWS)
     message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
     set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
     )
 set(third_party_targets ${third_party_targets} ${out_targets})
 
-#*******************************
-# LLKDU
-set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
-if(NOT EXISTS ${internal_llkdu_path})
-    if (EXISTS "${debug_llkdu_src}")
-        ADD_CUSTOM_COMMAND(
-            OUTPUT  ${debug_llkdu_dst}
-            COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
-            DEPENDS ${debug_llkdu_src}
-            COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_DEBUG}"
-            )
-        set(third_party_targets ${third_party_targets} $} ${debug_llkdu_dst})
-    endif (EXISTS "${debug_llkdu_src}")
-
-    if (EXISTS "${release_llkdu_src}")
-        ADD_CUSTOM_COMMAND(
-            OUTPUT  ${release_llkdu_dst}
-            COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
-            DEPENDS ${release_llkdu_src}
-            COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELEASE}"
-            )
-        set(third_party_targets ${third_party_targets} ${release_llkdu_dst})
-
-        ADD_CUSTOM_COMMAND(
-            OUTPUT  ${relwithdebinfo_llkdu_dst}
-            COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
-            DEPENDS ${release_llkdu_src}
-            COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
-            )
-        set(third_party_targets ${third_party_targets} ${relwithdebinfo_llkdu_dst})
-    endif (EXISTS "${release_llkdu_src}")
-
-endif (NOT EXISTS ${internal_llkdu_path})
-
+if (FMOD_SDK_DIR)
+    copy_if_different(
+        ${FMOD_SDK_DIR} 
+        "${CMAKE_CURRENT_BINARY_DIR}/Debug"
+        out_targets 
+        ${fmod_files}
+        )
+    set(all_targets ${all_targets} ${out_targets})
+    copy_if_different(
+        ${FMOD_SDK_DIR} 
+        "${CMAKE_CURRENT_BINARY_DIR}/Release"
+        out_targets 
+        ${fmod_files}
+        )
+    set(all_targets ${all_targets} ${out_targets})
+    copy_if_different(
+        ${FMOD_SDK_DIR} 
+        "${CMAKE_CURRENT_BINARY_DIR}/RelWithDbgInfo"
+        out_targets 
+        ${fmod_files}
+        )
+    set(all_targets ${all_targets} ${out_targets})
+endif (FMOD_SDK_DIR)
 
 if(NOT STANDALONE)
   add_custom_target(

indra/cmake/FindJsonCpp.cmake

             OUTPUT_STRIP_TRAILING_WHITESPACE
             )
 
+# Try to find a library that was compiled with the same compiler version as we currently use.
 SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
+IF (STANDALONE)
+	# On standalone, assume that the system installed library was compiled with the used compiler.
+	SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
+ENDIF (STANDALONE)
 FIND_LIBRARY(JSONCPP_LIBRARY
   NAMES ${JSONCPP_NAMES}
   PATHS /usr/lib /usr/local/lib

indra/cmake/FindLLQtWebkit.cmake

+# -*- cmake -*-
+
+# - Find llqtwebkit
+# Find the llqtwebkit includes and library
+# This module defines
+#  LLQTWEBKIT_INCLUDE_DIR, where to find llqtwebkit.h, etc.
+#  LLQTWEBKIT_LIBRARY, the llqtwebkit library with full path.
+#  LLQTWEBKIT_FOUND, If false, do not try to use llqtwebkit.
+# also defined, but not for general use are
+#  LLQTWEBKIT_LIBRARIES, the libraries needed to use llqtwebkit.
+#  LLQTWEBKIT_LIBRARY_DIRS, where to find the llqtwebkit library.
+#  LLQTWEBKIT_DEFINITIONS - You should add_definitions(${LLQTWEBKIT_DEFINITIONS})
+#      before compiling code that includes llqtwebkit library files.
+
+# Try to use pkg-config first.
+# This allows to have two different libllqtwebkit packages installed:
+# one for viewer 2.x and one for viewer 1.x.
+include(FindPkgConfig)
+if (PKG_CONFIG_FOUND)
+    if (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
+        set(_PACKAGE_ARGS libllqtwebkit>=${LLQtWebkit_FIND_VERSION} REQUIRED)
+    else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
+        set(_PACKAGE_ARGS libllqtwebkit)
+    endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
+    if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8")
+      # As virtually nobody will have a pkg-config file for this, do this check always quiet.
+      # Unfortunately cmake 2.8 or higher is required for pkg_check_modules to have a 'QUIET'.
+      set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET)
+    endif ()
+    pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS})
+endif (PKG_CONFIG_FOUND)
+set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER})
+
+find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS})
+
+find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
+
+if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)	# If pkg-config couldn't find it, pretend we don't have pkg-config.
+   set(LLQTWEBKIT_LIBRARIES llqtwebkit)
+   get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH)
+endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)
+
+# Handle the QUIETLY and REQUIRED arguments and set LLQTWEBKIT_FOUND
+# to TRUE if all listed variables are TRUE.
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+  LLQTWEBKIT
+  DEFAULT_MSG
+  LLQTWEBKIT_LIBRARY
+  LLQTWEBKIT_INCLUDE_DIR
+  LLQTWEBKIT_LIBRARIES
+  LLQTWEBKIT_LIBRARY_DIRS
+  )
+
+mark_as_advanced(
+  LLQTWEBKIT_LIBRARY
+  LLQTWEBKIT_INCLUDE_DIR
+  LLQTWEBKIT_LIBRARIES
+  LLQTWEBKIT_LIBRARY_DIRS
+  LLQTWEBKIT_DEFINITIONS
+  )
+

indra/cmake/FindNDOF.cmake

+# -*- cmake -*-
+
+# - Find NDOF
+# Find the NDOF includes and library
+# This module defines
+#  NDOF_INCLUDE_DIR, where to find ndofdev_external.h, etc.
+#  NDOF_LIBRARY, the library needed to use NDOF.
+#  NDOF_FOUND, If false, do not try to use NDOF.
+
+find_path(NDOF_INCLUDE_DIR ndofdev_external.h
+  PATH_SUFFIXES ndofdev
+  )
+
+set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev)
+find_library(NDOF_LIBRARY
+  NAMES ${NDOF_NAMES}
+  )
+
+if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
+  set(NDOF_FOUND "YES")
+else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
+  set(NDOF_FOUND "NO")
+endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
+
+
+if (NDOF_FOUND)
+  if (NOT NDOF_FIND_QUIETLY)
+    message(STATUS "Found NDOF: Library in '${NDOF_LIBRARY}' and header in '${NDOF_INCLUDE_DIR}' ")
+  endif (NOT NDOF_FIND_QUIETLY)
+else (NDOF_FOUND)
+  if (NDOF_FIND_REQUIRED)
+    message(FATAL_ERROR " * * *\nCould not find NDOF library!\nIf you don't need Space Navigator Joystick support you can skip this test by configuring with -DNDOF:BOOL=OFF\n * * *")
+  endif (NDOF_FIND_REQUIRED)
+endif (NDOF_FOUND)
+
+mark_as_advanced(
+  NDOF_LIBRARY
+  NDOF_INCLUDE_DIR
+  )

indra/cmake/FindTut.cmake

 # - Find Tut
 # Find the Tut unit test framework includes and library
 # This module defines
-#  TUT_INCLUDE_DIR, where to find tut.h, etc.
+#  TUT_INCLUDE_DIR, where to find tut/tut.hpp.
 #  TUT_FOUND, If false, do not try to use Tut.
 
-find_path(TUT_INCLUDE_DIR tut.h
-    /usr/local/include/
-    /usr/include
+find_path(TUT_INCLUDE_DIR tut/tut.hpp
+    NO_SYSTEM_ENVIRONMENT_PATH
     )
 
 if (TUT_INCLUDE_DIR)

indra/cmake/FindZLIB.cmake

+# -*- cmake -*-
+
+# - Find zlib
+# Find the ZLIB includes and library
+# This module defines
+#  ZLIB_INCLUDE_DIRS, where to find zlib.h, etc.
+#  ZLIB_LIBRARIES, the libraries needed to use zlib.
+#  ZLIB_FOUND, If false, do not try to use zlib.
+#
+# This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x),
+# because it doesn't look up the version of zlib, resulting in a dramatic
+# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
+#
+# Note: Since this file is only used for standalone, the windows
+# specific parts were left out.
+
+FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
+  NO_SYSTEM_ENVIRONMENT_PATH
+  )
+
+FIND_LIBRARY(ZLIB_LIBRARY z)
+
+if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
+  SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+  SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
+  SET(ZLIB_FOUND "YES")
+else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
+  SET(ZLIB_FOUND "NO")
+endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
+
+if (ZLIB_FOUND)
+  if (NOT ZLIB_FIND_QUIETLY)
+	message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
+	SET(ZLIB_FIND_QUIETLY TRUE)
+  endif (NOT ZLIB_FIND_QUIETLY)
+else (ZLIB_FOUND)
+  if (ZLIB_FIND_REQUIRED)
+	message(FATAL_ERROR "Could not find ZLIB library")
+  endif (ZLIB_FIND_REQUIRED)
+endif (ZLIB_FOUND)
+
+mark_as_advanced(
+  ZLIB_LIBRARY
+  ZLIB_INCLUDE_DIR
+  )
+

indra/cmake/LLAddBuildTest.cmake

   endif(TEST_DEBUG)
   ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
   SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
+  if(STANDALONE)
+    SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
+  endif(STANDALONE)
 
   # Add link deps to the executable
   if(TEST_DEBUG)

indra/cmake/LLCommon.cmake

     ${Boost_INCLUDE_DIRS}
     )
 
-set(LLCOMMON_LIBRARIES llcommon)
+if (LINUX)
+    # In order to support using ld.gold on linux, we need to explicitely
+    # specify all libraries that llcommon uses.
+    # llcommon uses `clock_gettime' which is provided by librt on linux.
+    set(LLCOMMON_LIBRARIES llcommon rt)
+else (LINUX)
+    set(LLCOMMON_LIBRARIES llcommon)
+endif (LINUX)
 
 add_definitions(${TCMALLOC_FLAG})
 

indra/cmake/LLKDU.cmake

 # -*- cmake -*-
 include(Prebuilt)
 
+# USE_KDU can be set when launching cmake or develop.py as an option using the argument -DUSE_KDU:BOOL=ON
+# When building using proprietary binaries though (i.e. having access to LL private servers), we always build with KDU
 if (INSTALL_PROPRIETARY AND NOT STANDALONE)
+  set(USE_KDU ON)
+endif (INSTALL_PROPRIETARY AND NOT STANDALONE)
+
+if (USE_KDU)
   use_prebuilt_binary(kdu)
-  set(LLKDU_LIBRARY llkdu)
-endif (INSTALL_PROPRIETARY AND NOT STANDALONE)
+  if (WINDOWS)
+    set(KDU_LIBRARY kdu.lib)
+  else (WINDOWS)
+    set(KDU_LIBRARY libkdu.a)
+  endif (WINDOWS)
+  set(KDU_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/kdu)
+  set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu)
+  set(LLKDU_LIBRARIES llkdu)
+endif (USE_KDU)

indra/cmake/LLPlugin.cmake

     ${LIBS_OPEN_DIR}/llplugin
     )
 
-set(LLPLUGIN_LIBRARIES llplugin)
+if (LINUX)
+    # In order to support using ld.gold on linux, we need to explicitely
+    # specify all libraries that llplugin uses.
+	set(LLPLUGIN_LIBRARIES llplugin pthread)
+else (LINUX)
+	set(LLPLUGIN_LIBRARIES llplugin)
+endif (LINUX)

indra/cmake/NDOF.cmake

 # -*- cmake -*-
 include(Prebuilt)
 
-use_prebuilt_binary(ndofdev)
+set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
 
-if (WINDOWS OR DARWIN OR LINUX)
+if (NDOF)
+  if (STANDALONE)
+	set(NDOF_FIND_REQUIRED ON)
+	include(FindNDOF)
+  else (STANDALONE)
+	use_prebuilt_binary(ndofdev)
+
+	if (WINDOWS)
+	  set(NDOF_LIBRARY libndofdev)
+	elseif (DARWIN OR LINUX)
+	  set(NDOF_LIBRARY ndofdev)
+	endif (WINDOWS)
+
+	set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
+	set(NDOF_FOUND 1)
+  endif (STANDALONE)
+endif (NDOF)
+
+if (NDOF_FOUND)
   add_definitions(-DLIB_NDOF=1)
-endif (WINDOWS OR DARWIN OR LINUX)
+  include_directories(${NDOF_INCLUDE_DIR})
+else (NDOF_FOUND)
+  message(STATUS "Building without N-DoF joystick support")
+  set(NDOF_INCLUDE_DIR "")
+  set(NDOF_LIBRARY "")
+endif (NDOF_FOUND)
 
-if (WINDOWS)
-  set(NDOF_LIBRARY libndofdev)
-elseif (DARWIN OR LINUX)
-  set(NDOF_LIBRARY ndofdev)
-endif (WINDOWS)

indra/cmake/PulseAudio.cmake

 # -*- cmake -*-
 include(Prebuilt)
 
-set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.")
+set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.")
 
 if (PULSEAUDIO)
   if (STANDALONE)

indra/cmake/Tut.cmake

 
 if (STANDALONE)
   include(FindTut)
-  include_directories(${TUT_INCLUDE_DIR})
 else (STANDALONE)
   use_prebuilt_binary(tut)
 endif (STANDALONE)

indra/cmake/WebKitLibPlugin.cmake

 include(Prebuilt)
 
 if (STANDALONE)
+  # The minimal version, 4.4.3, is rather arbitrary: it's the version in Debian/Lenny.
+  find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED)
+  include(${QT_USE_FILE})
+  set(QTDIR $ENV{QTDIR})
+  if (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
+	message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; "
+	  "Qt is found by looking for qmake in your PATH. "
+	  "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, "
+	  "or unset QTDIR if the found Qt is correct.")
+	endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
+  find_package(LLQtWebkit REQUIRED QUIET)
+  # Add the plugins.
+  set(QT_PLUGIN_LIBRARIES)
+  foreach(qlibname qgif qjpeg)
+	find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH)
+	if (QT_PLUGIN_${qlibname})
+	  list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}})
+	else (QT_PLUGIN_${qtlibname})
+	  message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!")
+	endif (QT_PLUGIN_${qlibname})
+  endforeach(qlibname)
+  # qjpeg depends on libjpeg
+  list(APPEND QT_PLUGIN_LIBRARIES jpeg)
   set(WEBKITLIBPLUGIN OFF CACHE BOOL
       "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
 else (STANDALONE)
       )
 elseif (LINUX)
   if (STANDALONE) 
-    set(WEBKIT_PLUGIN_LIBRARIES llqtwebkit)
+    set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
   else (STANDALONE)
     set(WEBKIT_PLUGIN_LIBRARIES
         llqtwebkit

indra/integration_tests/llui_libtest/CMakeLists.txt

 include(LLCommon)
 include(LLImage)
 include(LLImageJ2COJ)   # ugh, needed for images
+include(LLKDU)
 include(LLMath)
 include(LLMessage)
 include(LLRender)
 target_link_libraries(llui_libtest
     llui
     llmessage
+    ${LLRENDER_LIBRARIES}
+    ${LLIMAGE_LIBRARIES}
+    ${LLKDU_LIBRARIES}
+    ${KDU_LIBRARY}
+    ${LLIMAGEJ2COJ_LIBRARIES}
     ${OS_LIBRARIES}
     ${GOOGLE_PERFTOOLS_LIBRARIES}
     )

indra/lib/python/indra/util/test_win32_manifest.py

         
 def find_vc_dir():
     supported_versions = (r'8.0', r'9.0')
+    supported_products = (r'VisualStudio', r'VCExpress')
     value_str = (r'ProductDir')
     
-    for version in supported_versions:
-        key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VC' %
-                   version)
-        try:
-            return get_HKLM_registry_value(key_str, value_str)
-        except WindowsError, err:
-            x64_key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
-                       version)
+    for product in supported_products:
+        for version in supported_versions:
+            key_str = (r'SOFTWARE\Microsoft\%s\%s\Setup\VC' %
+                      (product, version))
             try:
-                return get_HKLM_registry_value(x64_key_str, value_str)
-            except:
-                print >> sys.stderr, "Didn't find MS VC version %s " % version
+                return get_HKLM_registry_value(key_str, value_str)
+            except WindowsError, err:
+                x64_key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
+                        version)
+                try:
+                    return get_HKLM_registry_value(x64_key_str, value_str)
+                except:
+                    print >> sys.stderr, "Didn't find MS %s version %s " % (product,version)
         
     raise
 

indra/llcommon/llapr.cpp

 
 #include "linden_common.h"
 #include "llapr.h"
+#include "apr_dso.h"
 
 apr_pool_t *gAPRPoolp = NULL; // Global APR memory pool
 LLVolatileAPRPool *LLAPRFile::sAPRFilePoolp = NULL ; //global volatile APR memory pool.
 {
 	if(APR_SUCCESS == status) return false;
 	char buf[MAX_STRING];	/* Flawfinder: ignore */
-	apr_strerror(status, buf, MAX_STRING);
+	apr_strerror(status, buf, sizeof(buf));
 	LL_WARNS("APR") << "APR: " << buf << LL_ENDL;
 	return true;
 }
 
+bool ll_apr_warn_status(apr_status_t status, apr_dso_handle_t *handle)
+{
+    bool result = ll_apr_warn_status(status);
+    // Despite observed truncation of actual Mac dylib load errors, increasing
+    // this buffer to more than MAX_STRING doesn't help: it appears that APR
+    // stores the output in a fixed 255-character internal buffer. (*sigh*)
+    char buf[MAX_STRING];           /* Flawfinder: ignore */
+    apr_dso_error(handle, buf, sizeof(buf));
+    LL_WARNS("APR") << "APR: " << buf << LL_ENDL;
+    return result;
+}
+
 void ll_apr_assert_status(apr_status_t status)
 {
-	llassert(ll_apr_warn_status(status) == false);
+	llassert(! ll_apr_warn_status(status));
+}
+
+void ll_apr_assert_status(apr_status_t status, apr_dso_handle_t *handle)
+{
+    llassert(! ll_apr_warn_status(status, handle));
 }
 
 //---------------------------------------------------------------------

indra/llcommon/llapr.h

 extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp;
 extern apr_thread_mutex_t* gCallStacksLogMutexp;
 
+struct apr_dso_handle_t;
+
 /** 
  * @brief initialize the common apr constructs -- apr itself, the
  * global pool, and a mutex.
  * @return Returns <code>true</code> if status is an error condition.
  */
 bool LL_COMMON_API ll_apr_warn_status(apr_status_t status);
+/// There's a whole other APR error-message function if you pass a DSO handle.
+bool LL_COMMON_API ll_apr_warn_status(apr_status_t status, apr_dso_handle_t* handle);
 
 void LL_COMMON_API ll_apr_assert_status(apr_status_t status);
+void LL_COMMON_API ll_apr_assert_status(apr_status_t status, apr_dso_handle_t* handle);
 
 extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool
 

indra/llcommon/llevents.cpp

 *****************************************************************************/
 bool LLEventStream::post(const LLSD& event)
 {
-    if (! mEnabled)
+    if (! mEnabled || !mSignal)
     {
         return false;
     }
 
 void LLEventQueue::flush()
 {
+	if(!mSignal) return;
+		
     // Consider the case when a given listener on this LLEventQueue posts yet
     // another event on the same queue. If we loop over mEventQueue directly,
     // we'll end up processing all those events during the same flush() call

indra/llcommon/llprocesslauncher.cpp

 	delete[] fake_argv;
 	
 	mProcessID = id;
-	
-	// At this point, the child process will have been created (since that's how vfork works -- the child borrowed our execution context until it forked)
-	// If the process doesn't exist at this point, the exec failed.
-	if(!isRunning())
-	{
-		result = -1;
-	}
-	
+
 	return result;
 }
 

indra/llcommon/llqueuedthread.h

 	void waitOnPending();
 	void printQueueStats();
 
-	S32 getPending();
+	virtual S32 getPending();
 	bool getThreaded() { return mThreaded ? true : false; }
 
 	// Request accessors

indra/llcommon/llversionviewer.h

 const char * const LL_CHANNEL = "Second Life Developer";
 
 #if LL_DARWIN
-const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.snowglobe.viewer";
+const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer";
 #endif
 
 #endif

indra/llimage/CMakeLists.txt

 project(llimage)
 
 include(00-Common)
-include(LLAddBuildTest)
 include(LLCommon)
 include(LLImage)
 include(LLMath)
 include(LLVFS)
 include(ZLIB)
+include(LLAddBuildTest)
+include(Tut)
 
 include_directories(
     ${LLCOMMON_INCLUDE_DIRS}
 # Sort by high-level to low-level
 target_link_libraries(llimage
     llcommon
-    llimagej2coj        # *HACK: In theory a noop for KDU builds?
     ${JPEG_LIBRARIES}
     ${PNG_LIBRARIES}
     ${ZLIB_LIBRARIES}
     )
 
 # Add tests
-#ADD_BUILD_TEST(llimageworker llimage)
+if (LL_TESTS)
+  SET(llimage_TEST_SOURCE_FILES
+    llimageworker.cpp
+    )
+  LL_ADD_PROJECT_UNIT_TESTS(llimage "${llimage_TEST_SOURCE_FILES}")
+endif (LL_TESTS)
+
+
+

indra/llimage/llimage.cpp

 void LLImage::initClass()
 {
 	sMutex = new LLMutex(NULL);
-	LLImageJ2C::openDSO();
 }
 
 //static
 void LLImage::cleanupClass()
 {
-	LLImageJ2C::closeDSO();
 	delete sMutex;
 	sMutex = NULL;
 }

indra/llimage/llimagej2c.cpp

  */
 #include "linden_common.h"
 
-#include "apr_pools.h"
-#include "apr_dso.h"
-
 #include "lldir.h"
 #include "llimagej2c.h"
 #include "llmemtype.h"
 typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*);
 typedef const char* (*EngineInfoLLImageJ2CFunction)();
 
-//some "private static" variables so we only attempt to load
-//dynamic libaries once
-CreateLLImageJ2CFunction j2cimpl_create_func;
-DestroyLLImageJ2CFunction j2cimpl_destroy_func;
-EngineInfoLLImageJ2CFunction j2cimpl_engineinfo_func;
-apr_pool_t *j2cimpl_dso_memory_pool;
-apr_dso_handle_t *j2cimpl_dso_handle;
-
-//Declare the prototype for theses functions here, their functionality
-//will be implemented in other files which define a derived LLImageJ2CImpl
-//but only ONE static library which has the implementation for this
-//function should ever be included
+// Declare the prototype for theses functions here. Their functionality
+// will be implemented in other files which define a derived LLImageJ2CImpl
+// but only ONE static library which has the implementation for these
+// functions should ever be included.
 LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl();
 void fallbackDestroyLLImageJ2CImpl(LLImageJ2CImpl* impl);
 const char* fallbackEngineInfoLLImageJ2CImpl();
 const std::string sTesterName("ImageCompressionTester");
 
 //static
-//Loads the required "create", "destroy" and "engineinfo" functions needed
-void LLImageJ2C::openDSO()
-{
-	//attempt to load a DSO and get some functions from it
-	std::string dso_name;
-	std::string dso_path;
-
-	bool all_functions_loaded = false;
-	apr_status_t rv;
-
-#if LL_WINDOWS
-	dso_name = "llkdu.dll";
-#elif LL_DARWIN
-	dso_name = "libllkdu.dylib";
-#else
-	dso_name = "libllkdu.so";
-#endif
-
-	dso_path = gDirUtilp->findFile(dso_name,
-								   gDirUtilp->getAppRODataDir(),
-								   gDirUtilp->getExecutableDir());
-
-	j2cimpl_dso_handle      = NULL;
-	j2cimpl_dso_memory_pool = NULL;
-
-	//attempt to load the shared library
-	apr_pool_create(&j2cimpl_dso_memory_pool, NULL);
-	rv = apr_dso_load(&j2cimpl_dso_handle,
-					  dso_path.c_str(),
-					  j2cimpl_dso_memory_pool);
-
-	//now, check for success
-	if ( rv == APR_SUCCESS )
-	{
-		//found the dynamic library
-		//now we want to load the functions we're interested in
-		CreateLLImageJ2CFunction  create_func = NULL;
-		DestroyLLImageJ2CFunction dest_func = NULL;
-		EngineInfoLLImageJ2CFunction engineinfo_func = NULL;
-
-		rv = apr_dso_sym((apr_dso_handle_sym_t*)&create_func,
-						 j2cimpl_dso_handle,
-						 "createLLImageJ2CKDU");
-		if ( rv == APR_SUCCESS )
-		{
-			//we've loaded the create function ok
-			//we need to delete via the DSO too
-			//so lets check for a destruction function
-			rv = apr_dso_sym((apr_dso_handle_sym_t*)&dest_func,
-							 j2cimpl_dso_handle,
-							 "destroyLLImageJ2CKDU");
-			if ( rv == APR_SUCCESS )
-			{
-				//we've loaded the destroy function ok
-				rv = apr_dso_sym((apr_dso_handle_sym_t*)&engineinfo_func,
-						 j2cimpl_dso_handle,
-						 "engineInfoLLImageJ2CKDU");
-				if ( rv == APR_SUCCESS )
-				{
-					//ok, everything is loaded alright
-					j2cimpl_create_func  = create_func;
-					j2cimpl_destroy_func = dest_func;
-					j2cimpl_engineinfo_func = engineinfo_func;
-					all_functions_loaded = true;
-				}
-			}
-		}
-	}
-
-	if ( !all_functions_loaded )
-	{
-		//something went wrong with the DSO or function loading..
-		//fall back onto our satefy impl creation function
-
-#if 0
-		// precious verbose debugging, sadly we can't use our
-		// 'llinfos' stream etc. this early in the initialisation seq.
-		char errbuf[256];
-		fprintf(stderr, "failed to load syms from DSO %s (%s)\n",
-			dso_name.c_str(), dso_path.c_str());
-		apr_strerror(rv, errbuf, sizeof(errbuf));
-		fprintf(stderr, "error: %d, %s\n", rv, errbuf);
-		apr_dso_error(j2cimpl_dso_handle, errbuf, sizeof(errbuf));
-		fprintf(stderr, "dso-error: %d, %s\n", rv, errbuf);
-#endif
-
-		if ( j2cimpl_dso_handle )
-		{
-			apr_dso_unload(j2cimpl_dso_handle);
-			j2cimpl_dso_handle = NULL;
-		}
-
-		if ( j2cimpl_dso_memory_pool )
-		{
-			apr_pool_destroy(j2cimpl_dso_memory_pool);
-			j2cimpl_dso_memory_pool = NULL;
-		}
-	}
-}
-
-//static
-void LLImageJ2C::closeDSO()
-{
-	if ( j2cimpl_dso_handle ) apr_dso_unload(j2cimpl_dso_handle);
-	if (j2cimpl_dso_memory_pool) apr_pool_destroy(j2cimpl_dso_memory_pool);
-}
-
-//static
 std::string LLImageJ2C::getEngineInfo()
 {
-	if (!j2cimpl_engineinfo_func)
-		j2cimpl_engineinfo_func = fallbackEngineInfoLLImageJ2CImpl;
-
-	return j2cimpl_engineinfo_func();
+    return fallbackEngineInfoLLImageJ2CImpl();
 }
 
 LLImageJ2C::LLImageJ2C() : 	LLImageFormatted(IMG_CODEC_J2C),
 							mReversible(FALSE),
 							mAreaUsedForDataSizeCalcs(0)
 {
-	//We assume here that if we wanted to create via
-	//a dynamic library that the approriate open calls were made
-	//before any calls to this constructor.
-
-	//Therefore, a NULL creation function pointer here means
-	//we either did not want to create using functions from the dynamic
-	//library or there were issues loading it, either way
-	//use our fall back
-	if ( !j2cimpl_create_func )
-	{
-		j2cimpl_create_func = fallbackCreateLLImageJ2CImpl;
-	}
-
-	mImpl = j2cimpl_create_func();
+	mImpl = fallbackCreateLLImageJ2CImpl();
 
 	// Clear data size table
 	for( S32 i = 0; i <= MAX_DISCARD_LEVEL; i++)
 // virtual
 LLImageJ2C::~LLImageJ2C()
 {
-	//We assume here that if we wanted to destroy via
-	//a dynamic library that the approriate open calls were made
-	//before any calls to this destructor.
-
-	//Therefore, a NULL creation function pointer here means
-	//we either did not want to destroy using functions from the dynamic
-	//library or there were issues loading it, either way
-	//use our fall back
-	if ( !j2cimpl_destroy_func )
-	{
-		j2cimpl_destroy_func = fallbackDestroyLLImageJ2CImpl;
-	}
-
 	if ( mImpl )
 	{
-		j2cimpl_destroy_func(mImpl);
+        fallbackDestroyLLImageJ2CImpl(mImpl);
 	}
 }
 

indra/llimage/llimagej2c.h

 	static S32 calcHeaderSizeJ2C();
 	static S32 calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 rate = 0.f);
 
-	static void openDSO();
-	static void closeDSO();
 	static std::string getEngineInfo();
 
 protected:

indra/llimage/tests/llimageworker_test.cpp

  */
 
 // Precompiled header: almost always required for newview cpp files
-#include <list>
-#include <map>
-#include <algorithm>
-// Class to test
+#include "linden_common.h"
+// Class to test 
 #include "../llimageworker.h"
 // For timer class
 #include "../llcommon/lltimer.h"
 // * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code)
 // * A simulator for a class can be implemented here. Please comment and document thoroughly.
 
-LLImageBase::LLImageBase() {}
+LLImageBase::LLImageBase() 
+: mData(NULL),
+mDataSize(0),
+mWidth(0),
+mHeight(0),
+mComponents(0),
+mBadBufferAllocation(false),
+mAllowOverSize(false),
+mMemType(LLMemType::MTYPE_IMAGEBASE)
+{
+}
 LLImageBase::~LLImageBase() {}
 void LLImageBase::dump() { }
 void LLImageBase::sanityCheck() { }

indra/llimagej2coj/llimagej2coj.cpp

 	lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl;
 }
 
+// Divide a by 2 to the power of b and round upwards
+int ceildivpow2(int a, int b)
+{
+	return (a + (1 << b) - 1) >> b;
+}
+
 
 LLImageJ2COJ::LLImageJ2COJ()
 	: LLImageJ2CImpl()

indra/llimagej2coj/llimagej2coj.h

 public:
 	LLImageJ2COJ();
 	virtual ~LLImageJ2COJ();
-
 protected:
 	/*virtual*/ BOOL getMetadata(LLImageJ2C &base);
 	/*virtual*/ BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count);
 	/*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
 								BOOL reversible = FALSE);
-	int ceildivpow2(int a, int b)
-	{
-		// Divide a by b to the power of 2 and round upwards.
-		return (a + (1 << b) - 1) >> b;
-	}
 };
 
 #endif

indra/llinventory/llnotecard.cpp

 		return FALSE;
 	}
 
-	if(text_len > mMaxText)
+	if(text_len > mMaxText || text_len < 0)
 	{
 		llwarns << "Invalid Linden text length: " << text_len << llendl;
 		return FALSE;

indra/llkdu/CMakeLists.txt

+# -*- cmake -*-
+
+project(llkdu)
+
+# Visual Studio 2005 has a dumb bug that causes it to fail compilation
+# of KDU if building with both optimisation and /WS (treat warnings as
+# errors), even when the specific warnings that make it croak are
+# disabled.
+
+#set(VS_DISABLE_FATAL_WARNINGS ON)
+
+include(00-Common)
+include(LLCommon)
+include(LLImage)
+include(LLKDU)
+include(LLMath)
+
+include_directories(
+    ${LLCOMMON_INCLUDE_DIRS}
+    ${LLIMAGE_INCLUDE_DIRS}
+    ${KDU_INCLUDE_DIR}
+    ${LLMATH_INCLUDE_DIRS}
+    )
+
+set(llkdu_SOURCE_FILES
+    llimagej2ckdu.cpp
+    llkdumem.cpp
+    )
+
+set(llkdu_HEADER_FILES
+    CMakeLists.txt
+	
+    llimagej2ckdu.h
+    llkdumem.h
+    )