diff --git a/.hgtags b/.hgtags
index 9f5fc44dd646fecb6671507dd6b26c3bd5f309af..9f8d51b64e818632576ba4909621fb872696b5af 100755
--- a/.hgtags
+++ b/.hgtags
@@ -366,3 +366,4 @@ f1d3b3fcab28ed9ea532bf50db0ba96f5c8cc8e9 DRTVWR-232
 4c3460cb1fb7c6da9965e09c734d282a8e9c81f0 DRTVWR-229
 f4481df42f9a4a92bf475a80f0c51d1a4bbdfd59 DRTVWR-246
 39c5204b6e800983a41ccac8ad6dc993120197c6 DRTVWR-247
+7c7d57d393e8ae7b61623279de06eb4a62ccae6a DRTVWR-249
diff --git a/autobuild.xml b/autobuild.xml
index 9a92614dfdbcf00af82bf5a85823e15296ecde46..fb0de9feb2bcf285597a6f0376837a0c3008328e 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -186,9 +186,9 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>36aa500e13cdde61607b6e93065206ec</string>
+              <string>610d3c3790b39d44b45ed1e471f7b34d</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/261457/arch/Darwin/installer/boost-1.48.0-darwin-20120710.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/267115/arch/Darwin/installer/boost-1.52.0-darwin-20121117.tar.bz2</string>
             </map>
             <key>name</key>
             <string>darwin</string>
@@ -198,9 +198,9 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>18602d44bd435eb0d7189f436ff2cb0f</string>
+              <string>86b9108ab71bd6551365d1706e2fb178</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/261457/arch/Linux/installer/boost-1.48.0-linux-20120710.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/267115/arch/Linux/installer/boost-1.52.0-linux-20121117.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux</string>
@@ -210,9 +210,9 @@
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>dc8f5dc6be04c64bf3460b4932b18457</string>
+              <string>a3bf306ebd14036a93f7894f898a862c</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/261457/arch/CYGWIN/installer/boost-1.48.0-windows-20120710.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/267115/arch/CYGWIN/installer/boost-1.52.0-windows-20121117.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows</string>
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 2af0bc1b304d0e454d397c06b28e97586997e2f3..1acb2bbbfdfb3650cc66809d01a315e2816fec25 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -16,9 +16,9 @@ if (STANDALONE)
 else (STANDALONE)
   use_prebuilt_binary(boost)
   set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+  set(BOOST_VERSION "1.52")
 
   if (WINDOWS)
-    set(BOOST_VERSION 1_48)
     if(MSVC80)
       set(BOOST_PROGRAM_OPTIONS_LIBRARY 
           optimized libboost_program_options-vc80-mt-${BOOST_VERSION}
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index a5483ba678e79d0048287f8d966b1b8b46a3ee6f..c32e357da3dc9714fa048a03ebc8fdb0777fda30 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -254,12 +254,12 @@ elseif(LINUX)
         libapr-1.so.0
         libaprutil-1.so.0
         libatk-1.0.so
-        libboost_program_options-mt.so.1.48.0
-        libboost_regex-mt.so.1.48.0
-        libboost_thread-mt.so.1.48.0
-        libboost_filesystem-mt.so.1.48.0
-        libboost_signals-mt.so.1.48.0
-        libboost_system-mt.so.1.48.0
+        libboost_program_options-mt.so.${BOOST_VERSION}.0
+        libboost_regex-mt.so.${BOOST_VERSION}.0
+        libboost_thread-mt.so.${BOOST_VERSION}.0
+        libboost_filesystem-mt.so.${BOOST_VERSION}.0
+        libboost_signals-mt.so.${BOOST_VERSION}.0
+        libboost_system-mt.so.${BOOST_VERSION}.0
         libbreakpad_client.so.0
         libcollada14dom.so
         libcrypto.so.1.0.0
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 36a8319189c6069eee94b7f9c6721b0c9074f41a..66e2bc90950506475fd5c9f05ac15b6d0885a277 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -116,6 +116,7 @@ set(llcommon_HEADER_FILES
     bitpack.h
     ctype_workaround.h
     doublelinkedlist.h
+    fix_macros.h
     imageids.h
     indra_constants.h
     linden_common.h
diff --git a/indra/llcommon/fix_macros.h b/indra/llcommon/fix_macros.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef959decffeb755146927b15a4b4c93c13599faa
--- /dev/null
+++ b/indra/llcommon/fix_macros.h
@@ -0,0 +1,25 @@
+/**
+ * @file   fix_macros.h
+ * @author Nat Goodspeed
+ * @date   2012-11-16
+ * @brief  The Mac system headers seem to #define macros with obnoxiously
+ *         generic names, preventing any library from using those names. We've
+ *         had to fix these in so many places that it's worth making a header
+ *         file to handle it.
+ * 
+ * $LicenseInfo:firstyear=2012&license=viewerlgpl$
+ * Copyright (c) 2012, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+// DON'T use an #include guard: every time we encounter this header, #undef
+// these macros all over again.
+
+// who injects MACROS with such generic names?! Grr.
+#ifdef equivalent
+#undef equivalent
+#endif 
+
+#ifdef check
+#undef check
+#endif
diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h
index f0a5603d06ca537a510f6572f64ff55ddb031e43..5cfcdab41cd331c43df806e628e0ace851492b89 100644
--- a/indra/llcommon/linden_common.h
+++ b/indra/llcommon/linden_common.h
@@ -59,8 +59,4 @@
 #include "llerror.h"
 #include "llfile.h"
 
-// Boost 1.45 had version 2 as the default for the filesystem library,
-// 1.48 has version 3 as the default.  Keep compatibility for now.
-#define BOOST_FILESYSTEM_VERSION		2
-
 #endif
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index 8632a2b72234d4e435fe2b6b4b3caee8aefa866b..82fb3f0d4e3bb10dd96a0b5f2f4d0425997aea52 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -130,6 +130,7 @@ if (LL_TESTS)
       ${CARES_LIBRARIES}
       ${OPENSSL_LIBRARIES}
       ${CRYPTO_LIBRARIES}
+      ${BOOST_SYSTEM_LIBRARY}
       ${BOOST_THREAD_LIBRARY}
       )
 
@@ -157,6 +158,7 @@ if (LL_TESTS)
       ${CARES_LIBRARIES}
       ${OPENSSL_LIBRARIES}
       ${CRYPTO_LIBRARIES}
+      ${BOOST_SYSTEM_LIBRARY}
       ${BOOST_THREAD_LIBRARY}
       )
 
diff --git a/indra/llcorehttp/_refcounted.h b/indra/llcorehttp/_refcounted.h
index a96c65fb6b90a6b7c6de2e746f056eff323a2432..21a916b13b1dd0a6bf75ca04d3642ee3757274f6 100644
--- a/indra/llcorehttp/_refcounted.h
+++ b/indra/llcorehttp/_refcounted.h
@@ -30,6 +30,7 @@
 
 #include "linden_common.h"
 
+#include "fix_macros.h"
 #include <boost/thread.hpp>
 
 #include "llapr.h"
diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp
index ff92cbb7fde4fa011fc678d53b92126168d03881..460d2a8b4fb70757cea4ce18e2b23ecb35b855d0 100644
--- a/indra/llvfs/lldiriterator.cpp
+++ b/indra/llvfs/lldiriterator.cpp
@@ -26,6 +26,7 @@
 
 #include "lldiriterator.h"
 
+#include "fix_macros.h"
 #include <boost/filesystem.hpp>
 #include <boost/regex.hpp>
 
@@ -59,7 +60,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
 	{
 		is_dir = fs::is_directory(dir_path);
 	}
-	catch (fs::basic_filesystem_error<fs::path>& e)
+	catch (const fs::filesystem_error& e)
 	{
 		llwarns << e.what() << llendl;
 		return;
@@ -76,7 +77,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
 	{
 		mIter = fs::directory_iterator(dir_path);
 	}
-	catch (fs::basic_filesystem_error<fs::path>& e)
+	catch (const fs::filesystem_error& e)
 	{
 		llwarns << e.what() << llendl;
 		return;
@@ -121,7 +122,7 @@ bool LLDirIterator::Impl::next(std::string &fname)
 	while (mIter != end_itr && !found)
 	{
 		boost::smatch match;
-		std::string name = mIter->path().filename();
+		std::string name = mIter->path().filename().string();
 		if (found = boost::regex_match(name, match, mFilterExp))
 		{
 			fname = name;
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 52ba8b3bf3eb7f43c7044f08317aacc920887482..af83b5009767cc5db48b6d5c8aaf4b121c52dc4d 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -36,8 +36,8 @@
 #include <AGL/agl.h>
 
 // AssertMacros.h does bad things.
+#include "fix_macros.h"
 #undef verify
-#undef check
 #undef require
 
 
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index 4e2a269ea33b4587c903662e55106c05e22d8a8d..c5ce892a042c9d0ea423610d07b5875b6d23cea5 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -41,8 +41,8 @@
 #endif
 
 // AssertMacros.h does bad things.
+#include "fix_macros.h"
 #undef verify
-#undef check
 #undef require
 
 
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 99c7ffcb6af7979a0ee67cbee283fdb2cb780afa..f6213598cf5dc88d184b669fcf9587d6ae5e0eff 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -2079,6 +2079,12 @@ if (LL_TESTS)
     LL_TEST_ADDITIONAL_LIBRARIES "${JSONCPP_LIBRARIES}"
   )
 
+  set_source_files_properties(
+    lllogininstance.cpp
+    PROPERTIES
+    LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
+  )
+
   ##################################################
   # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
   ##################################################
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index 2188b7edd0447caec684c73f1c5c387130af1e64..682f9d64769863332a6aede81b133483fbc236f2 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -37,8 +37,8 @@
 #include <Carbon/Carbon.h>
 
 // AssertMacros.h does bad things.
+#include "fix_macros.h"
 #undef verify
-#undef check
 #undef require
 
 #include <vector>
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index 55c665b9c76a812efa9123d0826078d8a8291d24..4f602f63f13afb50aae9d8934d9af0f6a1b35dad 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -39,8 +39,8 @@
 #include <Carbon/Carbon.h>
 
 // AssertMacros.h does bad things.
+#include "fix_macros.h"
 #undef verify
-#undef check
 #undef require
 
 #include <vector>
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 459e52c4f4e6f7844b17e664d1e9aa20a738d888..97ba5b634a1f99c83541bc6f7ac9f1d5b1d396cf 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -32,9 +32,7 @@
 #include "lllocalbitmaps.h"
 
 /* boost: will not compile unless equivalent is undef'd, beware. */
-#ifdef equivalent
-#undef equivalent
-#endif 
+#include "fix_macros.h"
 #include <boost/filesystem.hpp>
 
 /* image compression headers. */
diff --git a/indra/newview/macutil_Prefix.h b/indra/newview/macutil_Prefix.h
index fd8e927a0862056632cb7aad6afcb463eae8f2e3..b54a764a624fd76876790a6ac1b8ef96d28bdb80 100644
--- a/indra/newview/macutil_Prefix.h
+++ b/indra/newview/macutil_Prefix.h
@@ -33,7 +33,7 @@
  */
 
 #include <Carbon/Carbon.h>
+#include "fix_macros.h"
 
-#undef check
 #undef verify
 #undef require
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 86f978faf1f9dd380d6e9dfa83855c868486bbad..ea75d4f4f6c808c3d996502a065a5ee3f73b2684 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -1065,12 +1065,12 @@ class Linux_i686Manifest(LinuxManifest):
             self.path("libaprutil-1.so")
             self.path("libaprutil-1.so.0")
             self.path("libaprutil-1.so.0.4.1")
-            self.path("libboost_program_options-mt.so.1.48.0")
-            self.path("libboost_regex-mt.so.1.48.0")
-            self.path("libboost_thread-mt.so.1.48.0")
-            self.path("libboost_filesystem-mt.so.1.48.0")
-            self.path("libboost_signals-mt.so.1.48.0")
-            self.path("libboost_system-mt.so.1.48.0")
+            self.path("libboost_program_options-mt.so.*")
+            self.path("libboost_regex-mt.so.*")
+            self.path("libboost_thread-mt.so.*")
+            self.path("libboost_filesystem-mt.so.*")
+            self.path("libboost_signals-mt.so.*")
+            self.path("libboost_system-mt.so.*")
             self.path("libbreakpad_client.so.0.0.0")
             self.path("libbreakpad_client.so.0")
             self.path("libbreakpad_client.so")