autoconf - 如何将 autoconf/automake 指向非标准包

标签 autoconf configure automake apache-zookeeper

我正在尝试在 RedHat Linux 机器上构建 ZooKeeper。 (ZooKeeper 到底是什么可能并不重要:-)

当我按照包装说明进行操作时,我得到:

 $ autoreconf -if
aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library
aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in library
configure.ac:33: error: possibly undefined macro: AM_PATH_CPPUNIT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

我无法在标准位置安装 CPPPUNIT。 (没有root权限,系统团队 有“不偏离”标准配置的政策。)

我通过注释掉对的引用解决了这个问题 AM_PATH_CPPUNIT 在我的configure.ac 文件中,但是我真正想做的 是在我的个人目录中安装 CPPPUNIT 并指向它,但我 在弄清楚如何告诉 autoconf/auotmake 方面没有取得太大进展 系统在非标准位置寻找它。任何人有任何提示 如何做到这一点?

最佳答案

您想要设置环境变量 ACLOCAL_PATH。

ACLOCAL_PATH="/home/YOU/path/to/share/aclocal" autoreconf -if

要确定需要将 ACLOCAL_PATH 指向哪个目录,您必须找到包含定义 AM_PATH_CPPUNIT 的 .m4 文件的目录。

关于autoconf - 如何将 autoconf/automake 指向非标准包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1429896/

相关文章:

c++ - 在 C++ 中使用另一个项目中的类

c - 如何告诉自动工具在不同的文件夹中使用不同的实现

boost - 在配置脚本/Autotools 中设置配置选项,并将 Boost 安装在不寻常的位置(EPEL 替代 boost 安装)

python - Autotools:在 ./configure.sh 中包含 python 脚本

Homebrew 安装到主目录 - 如何链接到 autoconf 中的库?

ubuntu - 在 Linux 上安装 WordNet (Ubuntu trusty)

c++ - 如何使用具有 C++0x 特性的 autoconf

为交叉编译配置 Mono,什么进入 --host?

cmake - ExternalProject_Add autogen 项目防止在重建时配置

autotools - 使用 Automake 在固定位置安装任意数据文件?