静态链接openssl库

在Linux上缺省select的最大句柄数为1024。为突破这个限制,需要修改在一些头文件中__FD_SETSIZE的大小,例如,将 /usr/include/linux/posix_types.h 和 /usr/include/bits/typesizes.h 中__FD_SETSIZE的值改为8192。然后需要重新编译使用select的函数库和应用程序。不过,Linux 2.4和2.6的内核不需要重新编译。

由于我们的程序用到openssl,而openssl中用到select,所以我们需要重新rebuild openssl rpm。为了使得部署更简单一些(不想在每个平台上安装重新编译openssl rpm),我们可以考虑应用程序静态链接这个openssl库。

经过一番周折,在configure.ac中写了链接这些库,才链接成功。
LIBS="$LIBS l/usr/lib/ibssl.a /usr/lib/libcrypto.a /usr/kerberos/lib/libkrb5.a /usr/kerberos/lib/libcom_err.a /usr/kerberos/lib/libk5crypto.a"

randomness