如何静态链接使用./configure的Linux软件? [英] How to static link Linux software that uses ./configure?

查看:484
本文介绍了如何静态链接使用./configure的Linux软件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编译 NRPE 是静态的,因此我可以将编译后的二进制文件复制到不希望安装gcc的OmniOS服务器上.我希望从存储库中安装具有SSl支持的NRPE,但是这种接缝不存在,所以我想自己编译它.但是./configure脚本不包含它缝的静态选项

I would like to compile NRPE static, so I can copy the compiled binary to an OmniOS server, where I don't want gcc to be installed on. I would prefer to install NRPE with SSl support from a repository, but such doesn't seam to exist, so I would like to compile it myself. However the ./configure script doesn't contain a static option it seams

~/nrpe-2.15# ./configure --help | grep static
~/nrpe-2.15# ./configure --help | grep share
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]

问题

如何编译静态使用configure的程序?

How do I compile a program that uses configure statically?

推荐答案

尝试一下:

./configure LDFLAGS="-static"

这篇关于如何静态链接使用./configure的Linux软件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆