天天看點

Ubuntu 下編譯 VLC-Win32

步驟http://www.rosoo.net/a/201212/16406.html

到  ./bootstrap時報錯

 m4/with_pkg.m4:34: PKG_WITH_MODULES is expanded from...

m4/with_pkg.m4:83: PKG_ENABLE_MODULES_VLC is expanded from...

configure.ac:4030: the top level

configure.ac:1: error: possibly undefined macro: dnl

      If this token and others are legitimate, please use m4_pattern_allow.

      See the Autoconf documentation.

configure.ac:38: error: possibly undefined macro: AS_IF

configure.ac:57: error: possibly undefined macro: AC_DEFINE

configure.ac:203: error: possibly undefined macro: AC_MSG_ERROR

configure.ac:323: error: possibly undefined macro: AC_PREPROC_IFELSE

configure.ac:323: error: possibly undefined macro: AC_LANG_PROGRAM

configure.ac:464: error: possibly undefined macro: AC_CHECK_LIB

configure.ac:474: error: possibly undefined macro: AC_CACHE_CHECK

configure.ac:636: error: possibly undefined macro: AC_COMPILE_IFELSE

configure.ac:745: error: possibly undefined macro: AC_CHECK_HEADERS

configure.ac:839: error: possibly undefined macro: AC_MSG_WARN

configure.ac:865: error: possibly undefined macro: AC_LANG_PUSH

configure.ac:867: error: possibly undefined macro: AC_LANG_POP

configure.ac:1527: error: possibly undefined macro: AC_PATH_PROGS

configure.ac:1956: error: possibly undefined macro: AC_CHECK_HEADER

configure.ac:2326: error: possibly undefined macro: AC_MSG_NOTICE

configure.ac:3348: error: possibly undefined macro: AC_PATH_PROG

configure:15408: error: possibly undefined macro: m4_n

autoreconf: /usr/local/bin/autoconf failed with exit status: 1 

解決辦法參照 https://forum.videolan.org/viewtopic.php?f=13&t=39983 

 Your autotools probably can't see certain m4 macros. I had the exact same error message as you. The problem in my case was that the macros for pkg-config could not be found. So I added "-I /opt/pkg-config/share/aclocal" (pkg-config is installed under /opt/pkg-config on my system) to the contents of the environment variable "ACLOCAL_ARGS", re-ran bootstrap and it worked.

The macros mentioned in the error message, "dnl", "AS_IF", etc., had nothing to do with my problem. The error messages produced by the autotools appear to be useless. They should just print "Something went wrong, I don't know what." That would at least be honest, and arguably more helpful. 

找到 vlc目錄下的 bootstrap 檔案,打開編輯-> 将 “ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"  這一行改為   ”ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS} -I /usr/share/aclocal"  (/usr/share/aclocal 是我的aclocal目錄所在位置) 儲存再./bootstrap。即可成功