jwang:~/temp/source_build$ export CC=clang jwang:~/temp/source_build$ export CFLAGS="-fPIC -pthread" jwang:~/temp/source_build/mongo-c-driver-1.5.0$ PKG_CONFIG_LIBDIR=/usr/local/custom/openssl/lib/pkgconfig ./configure --prefix=/usr/local/custom/mongodb/ --disable-shared --enable-static --enable-rdtscp --enable-ssl=openssl --disable-sasl --with-libbson=bundled configure: Current version (from VERSION_CURRENT file): 1.5.0 checking for gcc... clang checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether clang accepts -g... yes checking for clang option to accept ISO C89... none needed checking whether clang understands -c and -o together... yes checking whether we are using the GNU C++ compiler... yes checking whether clang++ accepts -g... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking for typeof syntax and keyword spelling... typeof checking for perl... /opt/local/bin/perl checking for mv... /bin/mv checking for grep... /usr/bin/grep checking how to run the C preprocessor... clang -E checking for grep that handles long lines and -e... (cached) /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for strings.h... (cached) yes checking for yelp-build... no checking for a BSD-compatible install... /usr/bin/install -c checking build system type... x86_64-apple-darwin16.1.0 checking host system type... x86_64-apple-darwin16.1.0 checking target system type... x86_64-apple-darwin16.1.0 checking how to print strings... printf checking for a sed that does not truncate output... /opt/local/bin/gsed checking for fgrep... /usr/bin/grep -F checking for ld used by clang... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking how to convert x86_64-apple-darwin16.1.0 file names to x86_64-apple-darwin16.1.0 format... func_convert_file_noop checking how to convert x86_64-apple-darwin16.1.0 file names to toolchain format... func_convert_file_noop checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... dlltool checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... ranlib checking for gawk... gawk checking command to parse /usr/bin/nm -B output from clang object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking for dlfcn.h... yes checking for objdir... .libs checking if clang supports -fno-rtti -fno-exceptions... yes checking for clang option to produce PIC... -fno-common -DPIC checking if clang PIC flag -fno-common -DPIC works... yes checking if clang static flag -static works... no checking if clang supports -c -o file.o... yes checking if clang supports -c -o file.o... (cached) yes checking whether the clang linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin16.1.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking how to run the C++ preprocessor... clang++ -E checking for ld used by clang++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking for clang++ option to produce PIC... -fno-common -DPIC checking if clang++ PIC flag -fno-common -DPIC works... yes checking if clang++ static flag -static works... no checking if clang++ supports -c -o file.o... yes checking if clang++ supports -c -o file.o... (cached) yes checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin16.1.0 dyld checking how to hardcode library paths into programs... immediate checking whether to do a debug build... no checking whether to enable tracing... no checking whether to automatic init and cleanup... yes checking whether to enable optimized builds... yes checking whether to enable shared memory performance counters... yes checking whether to enable code coverage support... no checking whether to enable debug symbols... no checking for pkg-config... /opt/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking whether to enable crypto and TLS... openssl checking whether to use system crypto profile... no checking for SSL... yes checking openssl/bio.h usability... no checking openssl/bio.h presence... no checking for openssl/bio.h... no checking openssl/ssl.h usability... no checking openssl/ssl.h presence... no checking for openssl/ssl.h... no checking openssl/err.h usability... no checking openssl/err.h presence... no checking for openssl/err.h... no checking openssl/crypto.h usability... no checking openssl/crypto.h presence... no checking for openssl/crypto.h... no configure: error: You must install the OpenSSL development headers to enable OpenSSL support. jwang:~/temp/source_build/mongo-c-driver-1.5.0$ ls /usr/local/custom/openssl/lib/pkgconfig/ libcrypto.pc libssl.pc openssl.pc jwang:~/temp/source_build/mongo-c-driver-1.5.0$ ls /usr/local/custom/openssl/include/openssl/ aes.h cmac.h dso.h hmac.h objects.h rand.h ssl.h ui_compat.h asn1.h cms.h dtls1.h idea.h ocsp.h rc2.h ssl2.h whrlpool.h asn1_mac.h comp.h e_os2.h krb5_asn.h opensslconf.h rc4.h ssl23.h x509.h asn1t.h conf.h ebcdic.h kssl.h opensslv.h ripemd.h ssl3.h x509_vfy.h bio.h conf_api.h ec.h lhash.h ossl_typ.h rsa.h stack.h x509v3.h blowfish.h crypto.h ecdh.h md4.h pem.h safestack.h symhacks.h bn.h des.h ecdsa.h md5.h pem2.h seed.h tls1.h buffer.h des_old.h engine.h mdc2.h pkcs12.h sha.h ts.h camellia.h dh.h err.h modes.h pkcs7.h srp.h txt_db.h cast.h dsa.h evp.h obj_mac.h pqueue.h srtp.h ui.h jwang:~/temp/source_build/mongo-c-driver-1.5.0$ ls /usr/local/custom/openssl/lib/ engines libcrypto.a libssl.a pkgconfig jwang:~/temp/source_build/mongo-c-driver-1.5.0$ ls /usr/local/custom/openssl/lib/pkgconfig/ libcrypto.pc libssl.pc openssl.pc NOTE: When omitting `--enable-ssl=openssl`, config defaults to `SSL: darwin` even though `PKG_CONFIG_LIBDIR` is provided: libbson 1.5.0 was configured with the following options: Build configuration: Enable debugging (slow) : no Enable extra alignment (required for 1.0 ABI) : yes Compile with debug symbols (slow) : no Enable GCC build optimization : yes Code coverage support : no Cross Compiling : no Big endian : no Link Time Optimization (experimental) : no Documentation: man : no HTML : no libmongoc 1.5.0 was configured with the following options: Build configuration: Enable debugging (slow) : no Compile with debug symbols (slow) : no Enable GCC build optimization : yes Enable automatic init and cleanup : yes DEPRECATED: use --disable-automatic-init-and-cleanup Code coverage support : no Cross Compiling : no Fast counters : yes Shared memory performance counters : yes SASL : no SSL : darwin Libbson : bundled Documentation: man : no HTML : no