【发布时间】:2014-01-02 13:47:03
【问题描述】:
当运行 './configure --help' 时,最后你会得到类似这样的输出:
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
CXXCPP C++ preprocessor
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
lib_CFLAGS C compiler flags for <lib>, overriding pkg-config
lib_LIBS linker flags for <lib>, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
如何在上面的列表中添加自定义变量?我知道这是可能的, PKG_CHECK_MODULES() 这样做。查看 pkg.m4(它定义了 PKG_CHECK_MODULES),我看到宏还设置了 pkg_cv_lib_CFLAGS 和 ac_cv_env_lib_CFLAGS。
我尝试使用自定义 'ac_cv_env_...' 和 'pkg_cv_...' 变量,但我没有运气。我能做什么?
提前致谢
【问题讨论】:
标签: variables environment configure autotools