2017年8月

libevent编译支持openssl

起因是这样的
近段时间新拉了台机器,手动搭建了项目运行环境,安装路径也都是自定义的
在尝试安装PHP的event扩展的时候libevent-openssl这一步,因为之前安装libevent时disable掉了openssl导致安装失败
于是尝试重新编译libevent
编译参数中居然也没有显示提供指定openssl路径的参数
无奈搜了下Makefile.in得出解决办法(假设openssl安装在/path/to/openssl)

./configure OPENSSL_CFLAGS=-I/path/to/openssl/include OPENSSL_LIBS="-L/path/to/openssl/lib -lssl -lcrypto" --prefix=/path/to/libevent

留存以作备忘