I just got done hacking out a build using clang under FreeBSD which seems to at least basically work. I like to build certain dependencies which I consider to be critical from source as well. These included OpenSSL, Boost, and BerkeleyDB.
I'm pretty 'old school' and don't currently use or understand some of the newer tools like 'brew'. So, I dunno how much my comments will help you.
There is a nice config flag which seems to work for Boost, but not (yet) one for OpenSSL. After struggling with providing reference to my Bitcoin-specific OpenSSL in standard ways, I eventually capitulated and used pkg_config (which is not native to my system and which I don't care much for because I don't understand it.) It took the following form:
...
PKG_CONFIG_PATH="${tp}/lib/pkgconfig" \
./configure \
--without-gui \
...
From looking at the new config system (Hurrah for this finally!) it looks to me like it is pretty pkg_config-centric wrt OpenSSL.
In case anyone is interested, the other issues I ran into included a situation where my build of BDB (which was -fPIC) did not link correctly when with -fPIE associated with stack smashing (or whatever). For this reason I had to use --disable-hardening.
- Edit: I might have mentioned in case it is not clear that my ${tp} is stand for 'Third Party' and it is the base of where I installed my special build of OpenSSL (among other things.) Presumably most package management systems will have installed 'pkgconfig' entries in some spot and the install of OpenSSL will have populated it. Some Linii packages seem to have both dev and non-dev variants, the former with the requisite libraries, header files, etc needed to compile against them. I've never touched a Mac and have no idea what options may exist in which of their package management systems. It's pretty rare to use OpenSSL in raw form though so I would think that any install would be 'dev' as it were.
BTW, pkgconfig (a directory) was installed by the standard gmake install target of OpenSSL in my case since it didn't already exist.