[The following was observed on Mac OS X, but I believe it applies to any platform.]
I've been building Serf 1.3.8 on OSX for a while (as part of a closed-source project). Recently I noticed that the shared lib refers to the system default OpenSSL (0.9.8f) instead of the one installed by Homebrew (1.0.2g). That made me a bit unhappy because I'd explicitly told the Scons about the path to Homebrew's OpenSSL. The really scary part is that I don't have the 0.9.8f headers anywhere in /usr/include; just the shared libs in /usr/lib. After rummaging in SConstruct, I came up with the following patch for 1.3.8 which fixes the problem for me on OSX and also continues to work on Linux; I did not try to build on Windows, but can't see any reason why it wouldn't work. Assuming everyone agrees this is the correct approach, I'll create patches for trunk and the 1.3.x branch. -- Brane [[[ Put OpenSSL include and library paths first in their respective lists to make sure the compiler and linker find the requested versions. ]]] [[[ Index: SConstruct =================================================================== --- SConstruct (revision 1487) +++ SConstruct (working copy) @@ -318,14 +318,14 @@ if sys.platform == 'win32': # openssl env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) if not env.get('SOURCE_LAYOUT', None): - env.Append(CPPPATH='$OPENSSL/include/openssl', - LIBPATH='$OPENSSL/lib') + env.Prepend(CPPPATH='$OPENSSL/include/openssl', + LIBPATH='$OPENSSL/lib') elif 0: # opensslstatic: - env.Append(CPPPATH='$OPENSSL/inc32', - LIBPATH='$OPENSSL/out32') + env.Prepend(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32') else: - env.Append(CPPPATH='$OPENSSL/inc32', - LIBPATH='$OPENSSL/out32dll') + env.Prepend(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32dll') else: if os.path.isdir(apr): apr = os.path.join(apr, 'bin', 'apr-1-config') @@ -351,8 +351,8 @@ else: apr_libs = '' apu_libs = '' - env.Append(CPPPATH='$OPENSSL/include') - env.Append(LIBPATH='$OPENSSL/lib') + env.Prepend(CPPPATH='$OPENSSL/include') + env.Prepend(LIBPATH='$OPENSSL/lib') # If build with gssapi, get its information and define SERF_HAVE_GSSAPI ]]]