Autorreconf and "error: possibly undefined macro: AM_NLS"

Autorreconf and "error: possibly undefined macro: AM_NLS"

我正在尝试为 systemd 制作一个 configure 脚本。

$ git clone https://github.com/systemd/systemd.git
$ cd systemd

$ autoreconf -i
configure.ac:74: warning: macro 'AM_NLS' not found in library
configure.ac:74: error: possibly undefined macro: AM_NLS
      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

我使用的是一台相当现代的机器,它已经打好了补丁。它的 Fedora 25,x86_64:

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description:    Fedora release 25 (Twenty Five)
Release:        25
Codename:       TwentyFive

我不是 Autotools 专家,搜索 "error: possibly undefined macro: AM_NLS" 没有返回对我有用的匹配项。我找到了 Linphone configuration results in multiple undefined Autotools macros, but its not exactly clear what I should do. Unix & Linux Stack Exchange has Some M4 macros don't seem to be defined,但仍然不清楚我应该如何解决这个问题。

这是什么问题,我该如何解决?

What is the problem and how do I fix it?

问题是它期待 GNU gettext, specifically on Fedora 25 gettext-devel。它位于该包中的 /usr/share/aclocal/nls.m4 中。您应该能够安装该软件包并构建。