c++ - 为什么 Readline 在 autoconf 中不能作为子目录工作?

标签 c++ autotools autoconf readline

我正在尝试将一个项目迁移到 autotools,但无法集成我们使用的第三方库。一些工作的基本方式:(以下是我的configure.ac)

AC_CONFIG_SUBDIRS([thirdparty/sqlite])
AC_CONFIG_SUBDIRS([thirdparty/protobuf])

但是 readline 没有:

AC_CONFIG_SUBDIRS([thirdparty/readline])

当我尝试 autoreconf 时,出现此错误:

brett@Brett-Thinkpad:~/auto3$ autoreconf
autoheader: warning: missing template: CTYPE_NON_ASCII
autoheader: Use AC_DEFINE([CTYPE_NON_ASCII], [], [Description])
autoheader: warning: missing template: FIONREAD_IN_SYS_IOCTL
autoheader: warning: missing template: HAVE_BSD_SIGNALS
autoheader: warning: missing template: HAVE_GETPW_DECLS
autoheader: warning: missing template: HAVE_LANGINFO_CODESET
autoheader: warning: missing template: HAVE_MBRLEN
autoheader: warning: missing template: HAVE_MBSCMP
autoheader: warning: missing template: HAVE_MBSNRTOWCS
autoheader: warning: missing template: HAVE_MBSRTOWCS
autoheader: warning: missing template: HAVE_MBSTATE_T
autoheader: warning: missing template: HAVE_POSIX_SIGNALS
autoheader: warning: missing template: HAVE_POSIX_SIGSETJMP
autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_FILENO
autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_INO
autoheader: warning: missing template: HAVE_USG_SIGHOLD
autoheader: warning: missing template: HAVE_WCRTOMB
autoheader: warning: missing template: HAVE_WCSCOLL
autoheader: warning: missing template: HAVE_WCSDUP
autoheader: warning: missing template: HAVE_WCTYPE
autoheader: warning: missing template: HAVE_WCWIDTH
autoheader: warning: missing template: MUST_REINSTALL_SIGHANDLERS
autoheader: warning: missing template: NO_MULTIBYTE_SUPPORT
autoheader: warning: missing template: SPEED_T_IN_SYS_TYPES
autoheader: warning: missing template: STRCOLL_BROKEN
autoheader: warning: missing template: STRUCT_WINSIZE_IN_SYS_IOCTL
autoheader: warning: missing template: STRUCT_WINSIZE_IN_TERMIOS
autoheader: warning: missing template: TIOCSTAT_IN_SYS_IOCTL
autoheader: warning: missing template: VOID_SIGHANDLER
autoreconf: /usr/bin/autoheader failed with exit status: 1

Readline 源代码似乎 以与 SQLite 和 Protobuf 相同的方式组织 - ./configure && make && make install 对所有这三者的工作方式相同。 readline 有什么不同? (我使用的是 Readline 6.2 版)

(对不起,如果这是基本的...我才刚刚开始使用 Autotools)

最佳答案

我不熟悉 readline 源代码,但我猜你或 readline 使用的是自动工具的过时版本。这不会阻止 ./configure && make && make install 工作,因为当您下载 tarball 时,您会得到 configureMakefile版本不兼容的自动工具已经生成。但这确实意味着您无法使用您的 autotools 版本生成新的。

您可能只需按照错误消息告诉您的操作来修复它:添加一大堆行,例如

AC_DEFINE([CTYPE_NON_ASCII], [], [Description])

thirdparty/readline/configure.ac。或者,如果问题出在您这边,请升级到最新的 autotools。

要获得更具体和有效的建议,请在您的问题中包含有问题的 configure.ac 并告诉我们您正在使用的 autotools 的版本。

关于c++ - 为什么 Readline 在 autoconf 中不能作为子目录工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5018649/

相关文章:

自动工具临时文件

c-preprocessor - 如何使用 autoconf 为 #define 指定值?

autotools - Autoconf - config.h 在哪里?

C++在函数中传递数组指针地址

c++ - 使用访问器对 vector 对象进行排序

c++ - 将Lua状态保持在C++环境中以限制上下文切换

c++ - automake第三方库

c++ - PDB 与 .exe 不匹配

c++ - LD_LIBRARY_PATH 和 LD_LIBRARY_PATH 有什么区别?

c - AC_CHECK_LIB 与 fltk