From 5457cdcd80af2d243d86b6dbf34792191338317b Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 25 Sep 2008 03:30:08 +0000 Subject: [PATCH] Fix #503 change the boost lib detection logic to first look for -mt and if not available, fall back to regular boost lib (non-multithreaded) --- setup.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 358d9c62d..0297d1f7e 100644 --- a/setup.py +++ b/setup.py @@ -167,13 +167,11 @@ else: 'z' ] - # Modify the libs if necessary for systems with only -mt boost libs - if not os.path.exists( - os.path.join(sysconfig.PREFIX, "lib", "libboost_filesystem.so")): - # It's likely that this system doesn't have symlinks setup - # So add '-mt' to the libraries - for lib in _libraries: - if lib[:6] == "boost_": + # Modify the libs if necessary for systems with only -mt boost libs + for lib in _libraries: + if lib[:6] == "boost_": + # If there is a -mt version use that + if os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "lib" + lib + "-mt.so")): _libraries[_libraries.index(lib)] = lib + "-mt" _sources = glob.glob("./libtorrent/src/*.cpp") + \