Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables 自动工具:设置';有影响的环境变量';_Variables_Environment_Configure_Autotools - Fatal编程技术网

Variables 自动工具:设置';有影响的环境变量';

Variables 自动工具:设置';有影响的环境变量';,variables,environment,configure,autotools,Variables,Environment,Configure,Autotools,运行“./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 dir

运行“./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.
一些有影响的环境变量:
CC编译器命令
CFLAGS C编译器标志
LDFLAGS链接器标志,例如,-L,如果在
非标准目录
要传递给链接器的LIBS库,例如-l
CPPFLAGS(目标)C/C++预处理器标志,例如-I if
在非标准目录中有标题
CXC++编译命令
CXFLAGS C++编译器标志
cppc预处理器
CXCPP C++预处理器
打包配置实用程序的打包配置路径
包装配置路径
要添加到pkg config的搜索路径的目录
软件包配置库目录
路径覆盖pkg配置的内置搜索路径
lib_CFLAGS的C编译器标志,重写pkg config
的lib_LIBS链接器标志,覆盖pkg config
使用这些变量覆盖“配置”所做的选择或帮助
查找具有非标准名称/位置的库和程序非常困难。
如何在上面的列表中添加自定义变量?我知道这是可能的,PKG_CHECK_MODULES()就是这样做的。查看pkg.m4(它定义pkg_CHECK_模块),我看到宏还设置pkg_cv_lib_CFLAGS和ac_cv_env_lib_CFLAGS

我用自定义的“ac_cv_env_…”和“pkg_cv_…”变量尝试了一下,但没有成功。我能做什么

提前感谢

您可以使用添加“珍贵”变量

您可以使用添加“珍贵”变量

您可以使用添加“珍贵”变量

您可以使用添加“珍贵”变量

AC_ARG_VAR([FOO],[FOO does something])