c - 如何静态编译lighttpd模块

标签 c lighttpd autoconf automake libtool

我目前已经从源码编译了lighttpd

./configure --prefix=/home/lighttpd \
--without-pcre \
--without-zlib \
--without-bzip2

我还尝试了 -enable-static --disable-shared 选项,但模块仍然从 lib 目录加载

我想将所有 lighttpd 模块编译为单个二进制文件,而不是从 lib 目录加载,该怎么做?

最佳答案

交叉发布到https://redmine.lighttpd.net/boards/3/topics/6615

Lighttpd 可以使用 SCons 或使用 make 静态构建。简而言之:

缺点:
$ scons -j 4 build_static=1 build_dynamic=0 prefix=/custom/inst/path install

品牌:

# 编辑 src/Makefile.am 并在“if LIGHTTPD_STATIC”下的部分中,使用要包含在静态构建中的每个模块更新 lighttpd_SOURCES,或者仅使用已有的整个列表

$ LIGHTTPD_STATIC=yes ./configure -C --enable-static=yes
$ 制作

更多详细信息请参见https://redmine.lighttpd.net/boards/3/topics/5912

[编辑] 要使用“make”静态构建,请使用lighttpd git master分支或lighttpd 1.4.40+

关于c - 如何静态编译lighttpd模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37077497/

相关文章:

c - setlocale() 没有按预期工作

apache - Magento:Lighttpd 与 Nginx

django - lighttpd mod_rewrite 与 Django 和 FastCGI 的 apache mod_rewrite

c++ - 使用 autoconf 找不到 boost 库 1.52

javascript - 如何在 Javascript 中循环十六进制?

c - 为什么 scanf_s 在 vi​​sual studio 以外的地方不起作用?

c - C 中的外部结构

ip - lighttpd 设置和有效负载文件夹 - 正常还是攻击向量?

c - 如何自动生成C源文件

makefile - Autotools 的默认编译器标志