LIBTOOL is undefined 解决方法 张立坤的博客 我的搜狐

LIBTOOL is undefined 解决方法 - 张立坤的博客 - 我的搜狐

最近老是发生这个问题, 终于知道发生的根本原因, 特定记下来,以便后来方便

Libtool library used but `LIBTOOL' is undefined
The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
to `configure.ac' and run `aclocal' and `autoconf' again.
If `AC_PROG_LIBTOOL' is in `configure.ac', make sure
its definition is in aclocal's search path.


原因分析
aclocal是个扫描程序, 负责扫描configure.ac中所有的宏定义并展开,
上面产生的原因就是找不到LIBTOOL宏的定义之处造成的.


原因就是aclocal与libtool没有安装在一个相同目录下面

aclocal是去默认 安装目录 /usr/share/aclocal下面搜索所有的.m4文件找所定义的宏,

但是由于安装了多个aclocal,可能aclocal目录不存在,实际目录为/usr/share/aclocal1.10等,
这就造成了aclocal找不到m4文件的情况, 解决办法就是将文件夹aclocal1.10重命名为aclocal.

或者显示指定路径 aclocal -I /usr/share/aclocal1.10 -I /usr/share/libtool/m4 --install

或者把/usr/share/libtool/m4下面的文件都copy至/usr/share/aclocal1.10中.

原文地址:https://www.cnblogs.com/lexus/p/2888698.html