【问题标题】:Error: AC_DEFINE() is not found to autoreconf --force --install错误:在 autoreconf --force --install 中找不到 AC_DEFINE()
【发布时间】:2013-11-20 07:08:40
【问题描述】:

说明: 我正在为 tacacs+ 服务器开源代码进行定制。包装的同时 我正在尝试运行 configure 来生成 Makefile。

注意:在开源 tacacs+ tar 中使用 autoconf 2.63 并且在我的构建机器上使用 2.67 自动配置版本。只有这个环境差异。

但得到如下 AC_DEFINE() 未定义错误:

d001:~/srcsvn/workspace_main_7.40_04102013_64bit/NMD2/64bit/os/usr.local/tacplus_merger/src/tacacs+-4.0.4.19.orig$ autoreconf --force --install
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `cfgaux'.
libtoolize: copying file `cfgaux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.in:45: error: possibly undefined macro: AC_DEFINE
      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

【问题讨论】:

    标签: configure autoconf


    【解决方案1】:

    检查文件configure.in在第45行及以上并扫描pkg-config调用。

    然后检查您是否安装了它(只需输入pkg-config)。如果这失败了,那么您缺少 pkg-config。应用您的发行版安装软件的方式(rpm、apt-get、pacman、bee)并安装缺少的pkg-config 包。

    【讨论】:

    • 很好,这也是我遇到错误的原因,谢谢!
    【解决方案2】:

    当与它无关的东西错误地引用了宏的用法时,这种情况经常发生。

    虽然不知道configure.ac 的样子并没有多大帮助,但您应该观察围绕 45 行的行,而不是在该行上,以找出问题所在。有时它可能只是一个错误的[] 引用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-28
      • 1970-01-01
      • 2021-07-22
      • 2019-10-21
      • 2016-12-23
      • 2021-12-23
      • 2021-08-01
      相关资源
      最近更新 更多