我正在尝试在 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_CPPUNI
T 在我的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/