cppunit默认安装目录是/usr/local,执行autoreconf -if会报错warning: macro `AM_PATH_CPPUNIT' not found in library
cppunit.m4默认在/usr/local/share/aclocal目录下,但aclocal在/usr/share/aclocal-$VERSION和/usr/share/aclocal两个目录下寻找,aclocal认为cppunit配置安装时使用--prefix=/usr指定了/usr目录,实际上默认是/usr/local/
解决方法:
1.设置ACLOCAL
ACLOCAL="aclocal -I /usr/local/share/aclocal" autoreconf -if
2.设置ACLOCAL_PATH
ACLOCAL_PATH=/usr/local/share/aclocal autoreconf -if
3.设置ACLOCAL_FLAGS
ACLOCAL_FLAGS="-I /usr/local/share/aclocal" autoreconf -if
早先版本的autoreconf不太遵循ACLOCAL_PATH或ACLOCAL_FLAGS,使用ACLOCAL是解决问题的最佳方法。
ref:https://issues.apache.org/jira/browse/ZOOKEEPER-1454
From http://www.cnblogs.com/caosiyang/