在编译spice库函数pixman时,出现:
pixman/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
pixman/Makefile.am:1: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
pixman/Makefile.am:1: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
pixman/Makefile.am:1: If 'LT_INIT' is in 'configure.ac', make sure
pixman/Makefile.am:1: its definition is in aclocal's search path.
test/Makefile.am:5: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
意思是:configure.ac中定义了LT_INIT,但是aclocal搜索不到。而configure.ac是存在于libtool文件中。aclocal搜索configure.ac的途径是通过libtool.m4文件。
解决方法:
1)使aclocal文件夹和libtool文件夹在同一个目录下,且aclocal中包含libtool.m4,起到搭桥的作用;
2)在满足aclocal中有libtool.m4文件,且aclocal与libtool文件在同一目录下的同时,还需要检查aclocal的搜索路径是否定位到aclocal的父目录。
我的是搜索路径是:/usr/local/share/aclocal,但是我的aclocal与libtool的父目录是:/usr/share/aclocal。两者不同。
所有,要把搜索路径改了或者是在当前搜索路径下添加相应的文件。
1)修改搜索路径,发现改不了:
2)选择在当前搜索路径中添加相应的文件,重新编译后:
成功!