源碼編譯libcurl的時候,由于使用的不是默認系統上的ssl庫(開發服務器上有很多個版本),為了避免動態庫鏈接問題,必須定制SSL。
根據其源碼里邊的說明,
只需要在./configure 后邊加上 --with-ssl=<path>即可。
開始的時候,沒留意這個,因為粗略掃描了一下 --help, 后邊這么說了:
--with-libssh2=PATH Where to look for libssh2, PATH points to the
LIBSSH2 installation (default: /usr/local/lib); when
possible, set the PKG_CONFIG_PATH environment
variable instead of using this option
我的目標庫的確就是在/usr/local/ssl下邊了,當時編譯之后,鏈接起來總是提示找不到對應版本的libssl.so.0.9.7.
后來才發現(將環境變量做小幅調整、改動來探測),這個default在Solaris上邊并不是真的default,必須顯示指定為/usr/local/ssl,否則找到的居然是/usr/sfw/。