Why doesn't Readline work as a subdirectory in autoconf?
I'm trying to migrate a project to autotools, got stuck with integrating the third party libraries we use. Some work the basic way: (the following is in my configure.ac)
AC_CONFIG_SUBDIRS([thirdparty/sqlite])
AC_CONFIG_SUBDIRS([thirdparty/protobuf])
But readline doesn't:
AC_CONFIG_SUBDIRS([thirdparty/readline])
When I try autoreconf, I get this error:
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
The Readline source appears to be organized in the same way as SQLite and Protobuf - ./configure && make && make install works the same for all three. What's different about readline? (I'm using Readline version 6.2)
(Sorry if this is basic...I'm just getting started with Autotools)
I'm not familiar with the readline sources, but I'd guess that either you or readline are using an obsolete version of the autotools. That doesn't stop ./configure && make && make install
from working, since when you download the tarball you get the configure
and Makefile
s that the incompatibly-versioned autotools have already generated. But it does mean you can't generate new ones with your version of autotools.
You can probably fix it by just doing what the error message tells you: add a whole bunch of lines like
AC_DEFINE([CTYPE_NON_ASCII], [], [Description])
to thirdparty/readline/configure.ac
. Or upgrade to the latest autotools if the problem is on your end.
For more specific and effective advice, include the offending configure.ac
in your question and tell us the version of autotools you're using.
精彩评论