2020-02-23 23:39:48 +08:00
|
|
|
AC_INIT(editline, 1.17.1, https://github.com/troglobit/editline/issues)
|
2020-02-23 23:39:08 +08:00
|
|
|
AC_CONFIG_AUX_DIR(aux)
|
2020-02-23 23:38:25 +08:00
|
|
|
AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
|
2015-09-10 18:37:03 +08:00
|
|
|
AM_SILENT_RULES([yes])
|
2008-06-08 03:03:48 +08:00
|
|
|
|
2015-09-10 18:37:03 +08:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AC_CONFIG_SRCDIR([src/editline.c])
|
|
|
|
AC_CONFIG_HEADER([config.h])
|
2016-06-07 02:04:35 +08:00
|
|
|
AC_CONFIG_FILES([Makefile libeditline.pc src/Makefile include/Makefile man/Makefile examples/Makefile])
|
2010-01-17 05:42:21 +08:00
|
|
|
|
2008-06-08 03:03:48 +08:00
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
2015-09-10 18:37:03 +08:00
|
|
|
AC_PROG_INSTALL
|
2008-06-08 03:03:48 +08:00
|
|
|
|
|
|
|
# Checks for libraries.
|
2010-07-18 04:00:06 +08:00
|
|
|
LT_INIT
|
2008-06-08 03:03:48 +08:00
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_DIRENT
|
2010-07-18 03:45:39 +08:00
|
|
|
AC_HEADER_STAT
|
2008-06-08 03:03:48 +08:00
|
|
|
AC_HEADER_STDC
|
2008-06-09 05:49:32 +08:00
|
|
|
# Check for malloc.h instead of AC_FUNC_MALLOC/REALLOC AIX and others
|
|
|
|
# mess up the traditional malloc check.
|
2017-12-03 04:15:17 +08:00
|
|
|
AC_CHECK_HEADERS([malloc.h signal.h stdlib.h string.h termcap.h termio.h termios.h sgtty.h unistd.h])
|
2010-07-19 00:57:07 +08:00
|
|
|
|
|
|
|
# In termios.h or in sys/ioctl.g?
|
|
|
|
AC_HEADER_TIOCGWINSZ
|
2008-06-08 03:03:48 +08:00
|
|
|
|
|
|
|
# Overrides and types, should be a check.
|
2008-06-08 06:32:45 +08:00
|
|
|
AC_DEFINE([SYS_UNIX], [1], [Default to UNIX backend, should be detected.])
|
2008-06-08 03:03:48 +08:00
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_CLOSEDIR_VOID
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_FUNC_STAT
|
2008-12-03 02:09:17 +08:00
|
|
|
AC_CHECK_FUNCS([strchr strdup strrchr tcgetattr perror])
|
2008-06-08 03:03:48 +08:00
|
|
|
|
2017-03-30 06:36:21 +08:00
|
|
|
#
|
|
|
|
# Available features
|
|
|
|
#
|
2010-08-04 08:12:19 +08:00
|
|
|
AC_ARG_ENABLE(unique-history,
|
|
|
|
[AS_HELP_STRING([--disable-unique-history],
|
2017-03-30 06:36:21 +08:00
|
|
|
[Disable uniqify of scrollback. Default: duplicate entries are ignored. Use this to save dupes.])])
|
2010-08-04 08:12:19 +08:00
|
|
|
|
2009-02-09 04:13:54 +08:00
|
|
|
AC_ARG_ENABLE(arrow-keys,
|
2017-03-30 06:36:21 +08:00
|
|
|
[AS_HELP_STRING([--disable-arrow-keys], [Disable ANSI arrow keys.])])
|
2009-02-09 04:13:54 +08:00
|
|
|
|
2015-04-06 20:45:07 +08:00
|
|
|
AC_ARG_ENABLE(eof,
|
2017-03-30 06:36:21 +08:00
|
|
|
[AS_HELP_STRING([--disable-eof], [Disable default EOF (Ctrl-D) behavior.])])
|
2015-04-06 20:45:07 +08:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(sigint,
|
2017-03-30 06:36:21 +08:00
|
|
|
[AS_HELP_STRING([--disable-sigint], [Disable default SIGINT (Ctrl-C) behavior.])])
|
2015-04-06 20:45:07 +08:00
|
|
|
|
2010-07-18 07:41:18 +08:00
|
|
|
AC_ARG_ENABLE(sigstop,
|
2017-03-30 06:36:21 +08:00
|
|
|
[AS_HELP_STRING([--enable-sigstop], [Enable SIGSTOP (Ctrl-Z) behavior.])])
|
2010-07-18 07:41:18 +08:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(terminal-bell,
|
2017-03-30 06:36:21 +08:00
|
|
|
[AS_HELP_STRING([--enable-terminal-bell], [Enable terminal bell on completion.])])
|
2009-02-09 04:13:54 +08:00
|
|
|
|
2010-07-19 00:57:07 +08:00
|
|
|
AC_ARG_ENABLE(termcap,
|
2017-03-30 04:06:56 +08:00
|
|
|
AS_HELP_STRING([--enable-termcap], [Use termcap library to query terminal size.]))
|
2010-07-19 00:57:07 +08:00
|
|
|
|
2020-06-09 00:46:38 +08:00
|
|
|
AC_ARG_ENABLE([examples],
|
|
|
|
[AC_HELP_STRING([--enable-examples], [Build examples/ directory])],
|
|
|
|
[], [enable_examples=no])
|
|
|
|
|
2017-03-30 06:36:21 +08:00
|
|
|
#
|
|
|
|
# Check what features have been enabled
|
|
|
|
#
|
2023-12-24 03:17:19 +08:00
|
|
|
AS_IF([test "x$enable_unique_history" != "xno"], [
|
|
|
|
AC_DEFINE(CONFIG_UNIQUE_HISTORY, 1, [Define to skip duplicate lines in the scrollback history.])])
|
2017-03-30 06:36:21 +08:00
|
|
|
|
2023-12-24 03:17:19 +08:00
|
|
|
AS_IF([test "x$enable_terminal_bell" != "xno"], [
|
|
|
|
AC_DEFINE(CONFIG_ANSI_ARROWS, 1, [Define to include ANSI arrow keys support.])])
|
2017-03-30 06:36:21 +08:00
|
|
|
|
2023-12-24 03:17:19 +08:00
|
|
|
AS_IF([test "x$enable_eof" != "xno"], [
|
|
|
|
AC_DEFINE(CONFIG_EOF, 1, [Define to enable EOF (Ctrl-D) key.])])
|
2017-03-30 06:36:21 +08:00
|
|
|
|
2023-12-24 03:17:19 +08:00
|
|
|
AS_IF([test "x$enable_sigint" != "xno"], [
|
|
|
|
AC_DEFINE(CONFIG_SIGINT, 1, [Define to enable SIGINT (Ctrl-C) key.])])
|
2017-03-30 06:36:21 +08:00
|
|
|
|
2023-12-24 03:17:19 +08:00
|
|
|
AS_IF([test "x$enable_sigstop" = "xyes"], [
|
|
|
|
AC_DEFINE(CONFIG_SIGSTOP, 1, [Define to enable SIGSTOP (Ctrl-Z) key.])])
|
2017-03-30 06:36:21 +08:00
|
|
|
|
2023-12-24 03:17:19 +08:00
|
|
|
AS_IF([test "x$enable_terminal_bell" = "xyes"], [
|
|
|
|
AC_DEFINE(CONFIG_TERMINAL_BELL, 1, [Define to enable terminal bell on completion.])])
|
2017-03-30 06:36:21 +08:00
|
|
|
|
2020-06-09 00:46:38 +08:00
|
|
|
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "$enable_examples" = yes])
|
|
|
|
|
2016-06-01 13:14:11 +08:00
|
|
|
# Check for a termcap compatible library if enabled
|
2023-12-24 03:12:42 +08:00
|
|
|
AS_IF([test "x$enable_termcap" = "xyes"], [
|
2017-03-30 06:36:21 +08:00
|
|
|
AC_DEFINE(CONFIG_USE_TERMCAP, 1, [Define to use the termcap library for terminal size.])
|
2017-03-30 06:35:13 +08:00
|
|
|
AC_CHECK_LIB(terminfo, tgetent, , [
|
|
|
|
AC_CHECK_LIB(termcap, tgetent, , [
|
|
|
|
AC_CHECK_LIB(tinfo, tgetent, , [
|
|
|
|
AC_CHECK_LIB(curses, tgetent, , [
|
|
|
|
AC_CHECK_LIB(ncurses, tgetent, , [
|
|
|
|
AC_MSG_ERROR([Cannot find a termcap capable library, try installing Ncurses.])])
|
|
|
|
])
|
2017-03-30 04:06:56 +08:00
|
|
|
])
|
|
|
|
])
|
2023-12-24 03:12:42 +08:00
|
|
|
])])
|
2017-03-30 04:06:56 +08:00
|
|
|
|
|
|
|
# Generate all files
|
2015-09-10 18:37:03 +08:00
|
|
|
AC_OUTPUT
|