2015-02-17 215 views
5

嘗試構建libnice-0.1.10時遇到此類錯誤。對於解決方案,我正在關注possibly undefined macro: AC_MSG_ERROR,但還沒有到達那裏。AS_IF和AC_MSG_ERROR:錯誤:可能未定義宏

一些程序版本

uname: 3.5.0-23-generic 
m4: 1.4.16 
automake: 1.14.1 
autoconf: 2.69 
libtoolize: 2.4.2 

我還加ACLOCAL_FLAGS = 「 - 我/.../share/aclocal」 中的.bashrc。

以下是autogen報告的症狀。

$ ./autogen.sh 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
libtoolize: putting auxiliary files in `.'. 
libtoolize: copying file `./ltmain.sh' 
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. 
libtoolize: copying file `m4/libtool.m4' 
libtoolize: copying file `m4/ltoptions.m4' 
libtoolize: copying file `m4/ltsugar.m4' 
libtoolize: copying file `m4/ltversion.m4' 
libtoolize: copying file `m4/lt~obsolete.m4' 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:331: warning: PKG_PROG_PKG_CONFIG is m4_require'd but not m4_defun'd 
m4/gtk-doc.m4:7: GTK_DOC_CHECK is expanded from... 
configure.ac:331: the top level 
configure.ac:105: error: possibly undefined macro: AS_IF 
     If this token and others are legitimate, please use m4_pattern_allow. 
     See the Autoconf documentation. 
configure.ac:218: error: possibly undefined macro: AC_MSG_ERROR 
autoreconf: /opt/oblong/deps-64-10/bin/autoconf failed with exit status: 1 

非常感謝您的幫助!

+0

您是否安裝了['pkg-config'](http://www.freedesktop.org/wiki/Software/pkg-config/)?看看是否存在'/.../share/aclocal/pkg.m4'。不需要設置ACLOCAL_INCLUDE - 該目錄已經是autoconf的一部分,並且可能會阻止在libnice m4目錄中搜索。 – 2015-02-18 08:26:09

回答

7

這只是意味着你錯過了pkg-config(或者你也許有一箇舊版本)。只需下載並安裝。

+0

我確定安裝了pkg-config,並且在我的系統上有/usr/share/aclocal/pkg.m4。 ACX_PTHREAD([AC_DEFINE([HAVE_PTHREAD] ...)。錯誤是configure.ac:31:錯誤:可能未定義宏:AC_DEFINE。如果此標記和其他標記合法,請使用m4_pattern_allow。因此可能還有其他原因。 – 2016-12-24 20:01:19

+0

您應該詳細介紹導致「pkg-config」是問題的結論的故障排除步驟。 – jww 2018-01-04 11:05:33

相關問題