一、问题描述。
ubuntu下,交叉编译tslib-1.22,在执行./autogen.sh时报错如下:
ms@ubuntu:~/work/code/tslib/tslib-1.22$ ./autogen.sh
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4/internal'.
libtoolize: copying file 'm4/internal/libtool.m4'
libtoolize: copying file 'm4/internal/ltoptions.m4'
libtoolize: copying file 'm4/internal/ltsugar.m4'
libtoolize: copying file 'm4/internal/ltversion.m4'
libtoolize: copying file 'm4/internal/lt~obsolete.m4'
configure:13646: error: possibly undefined macro: AC_MSG_ERROR
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
ms@ubuntu:~/work/code/tslib/tslib-1.22$
二、问题分析。
缺少宏相关的文件。
三、解决方案。
安装pkg-config包,即可解决。
sudo apt-get install pkg-config -y