简体   繁体   English

如何强制配置脚本生成发布makefile

[英]How to force configure script to generate release makefile

While compiling some libraries (spatialite 3.0.1, geos 3.3.3 and others) I've noticed that running ./configure results in a makefile that contains lines like this 在编译某些库(spatialite 3.0.1,geos 3.3.3和其他库)时,我注意到运行./configure会生成一个包含如下行的makefile

CFLAGS = -g -O2
CXXFLAGS = -g -O2

That means that debug symbol generation is enabled by default. 这意味着默认情况下启用调试符号生成。 What I want is to disable debug compiling mode without manual makefile editing. 我想要的是禁用调试编译模式,而无需手动编辑makefile。 I've ran ./configure --help for both of libraries mentioned above, but I have not found any option to get desired result. 我已经为上述两个库运行了./configure --help ,但是我没有找到任何获得期望结果的选项。 I feel that the solution should be very simple, but I'm stuck on this since I'm not very familiar with building software from sources. 我觉得解决方案应该非常简单,但是由于我对从源代码构建软件不是很熟悉,所以我坚持这样做。

OS: Linux Red Hat Enterprise 6 操作系统:Linux Red Hat Enterprise 6

您可以将CFLAGS和CXXFLAGS以及配置脚本一起传递

./configure CFLAGS="-O2" CXXFLAGS="-O2"

Assuming you're talking about autoconf/automake: 假设您正在谈论autoconf / automake:

Why not just keep the debugging symbols and let anybody who doesn't like them make install-strip ? 为什么不只保留调试符号,而让任何不喜欢它们的人make install-strip呢?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM