2009-06-14 20:17:10 +02:00
|
|
|
# Minix libeditline -*- Autoconf -*-
|
2010-07-18 18:57:07 +02:00
|
|
|
#
|
2013-07-08 17:01:57 +02:00
|
|
|
# Copyright (c) 2008-2013 Joachim Nilsson <troglobit()gmail!com>
|
2010-07-18 18:57:07 +02:00
|
|
|
#
|
2008-06-07 21:03:48 +02:00
|
|
|
# Process this file with autoconf to produce a configure script.
|
2010-07-18 18:57:07 +02:00
|
|
|
#
|
|
|
|
# This file is free software; as a special exception the author gives
|
|
|
|
# unlimited permission to copy and/or distribute it, with or without
|
|
|
|
# modifications, as long as this notice is preserved.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
2008-06-07 21:03:48 +02:00
|
|
|
|
|
|
|
AC_PREREQ(2.61)
|
2016-01-27 09:24:23 +01:00
|
|
|
AC_INIT(editline, 1.15.2-beta1, https://github.com/troglobit/editline/issues)
|
2015-09-25 15:10:46 +02:00
|
|
|
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz])
|
2015-09-10 12:37:03 +02:00
|
|
|
AM_SILENT_RULES([yes])
|
2008-06-07 21:03:48 +02:00
|
|
|
|
2015-09-10 12:37:03 +02:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AC_CONFIG_SRCDIR([src/editline.c])
|
|
|
|
AC_CONFIG_HEADER([config.h])
|
|
|
|
AC_CONFIG_FILES([Makefile src/Makefile include/Makefile man/Makefile examples/Makefile])
|
2010-01-16 22:42:21 +01:00
|
|
|
|
2008-06-07 21:03:48 +02:00
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
2015-09-10 12:37:03 +02:00
|
|
|
AC_PROG_INSTALL
|
2008-06-07 21:03:48 +02:00
|
|
|
|
|
|
|
# Checks for libraries.
|
2010-07-17 22:00:06 +02:00
|
|
|
LT_INIT
|
2008-06-07 21:03:48 +02:00
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_DIRENT
|
2010-07-17 21:45:39 +02:00
|
|
|
AC_HEADER_STAT
|
2008-06-07 21:03:48 +02:00
|
|
|
AC_HEADER_STDC
|
2008-06-08 23:49:32 +02:00
|
|
|
# Check for malloc.h instead of AC_FUNC_MALLOC/REALLOC AIX and others
|
|
|
|
# mess up the traditional malloc check.
|
2010-07-18 18:57:07 +02:00
|
|
|
AC_CHECK_HEADERS([malloc.h signal.h stdlib.h string.h termcap.h termio.h termios.h sgtty.h])
|
|
|
|
|
|
|
|
# In termios.h or in sys/ioctl.g?
|
|
|
|
AC_HEADER_TIOCGWINSZ
|
2008-06-07 21:03:48 +02:00
|
|
|
|
|
|
|
# Overrides and types, should be a check.
|
2008-06-08 00:32:45 +02:00
|
|
|
AC_DEFINE([SYS_UNIX], [1], [Default to UNIX backend, should be detected.])
|
2008-06-07 21:03:48 +02:00
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_CLOSEDIR_VOID
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_FUNC_STAT
|
2008-12-02 19:09:17 +01:00
|
|
|
AC_CHECK_FUNCS([strchr strdup strrchr tcgetattr perror])
|
2008-06-07 21:03:48 +02:00
|
|
|
|
2010-08-04 02:12:19 +02:00
|
|
|
AC_ARG_ENABLE(unique-history,
|
|
|
|
[AS_HELP_STRING([--disable-unique-history],
|
|
|
|
[Disable uniqify of scrollback. Default: duplicate entries are ignored. Use this to save dupes.])],
|
|
|
|
, AC_DEFINE(CONFIG_UNIQUE_HISTORY, 1, [Define to skip duplicate lines in the scrollback history.]))
|
|
|
|
|
2010-07-18 02:30:30 +02:00
|
|
|
AC_ARG_ENABLE(default-complete,
|
2010-08-04 02:39:57 +02:00
|
|
|
[AS_HELP_STRING([--disable-default-complete], [Disable default (filename) completion handler.])],
|
|
|
|
, AC_DEFINE(CONFIG_DEFAULT_COMPLETE, 1, [Define to enable the default completion handler.]))
|
2008-10-02 01:52:40 +02:00
|
|
|
|
2009-02-08 21:13:54 +01:00
|
|
|
AC_ARG_ENABLE(arrow-keys,
|
2010-08-04 02:39:57 +02:00
|
|
|
[AS_HELP_STRING([--disable-arrow-keys], [Disable ANSI arrow keys.])],
|
|
|
|
, AC_DEFINE(CONFIG_ANSI_ARROWS, 1, [Define to include ANSI arrow keys support.]))
|
2009-02-08 21:13:54 +01:00
|
|
|
|
2015-04-06 14:45:07 +02:00
|
|
|
AC_ARG_ENABLE(eof,
|
|
|
|
[AS_HELP_STRING([--disable-eof], [Disable default EOF (Ctrl-D) behavior.])],
|
|
|
|
, AC_DEFINE([CONFIG_EOF], 1, [Define to enable EOF (Ctrl-C) key.]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sigint,
|
|
|
|
[AS_HELP_STRING([--disable-sigint], [Disable default SIGINT (Ctrl-C) behavior.])],
|
|
|
|
, AC_DEFINE([CONFIG_SIGINT], 1, [Define to enable SIGINT (Ctrl-C) key.]))
|
|
|
|
|
2010-07-18 01:41:18 +02:00
|
|
|
AC_ARG_ENABLE(sigstop,
|
2015-04-06 14:45:07 +02:00
|
|
|
[AS_HELP_STRING([--enable-sigstop], [Enable SIGSTOP (Ctrl-Z) behavior.])],
|
2010-08-04 02:39:57 +02:00
|
|
|
AC_DEFINE([CONFIG_SIGSTOP], 1, [Define to enable SIGSTOP (Ctrl-Z) key.]))
|
2010-07-18 01:41:18 +02:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(terminal-bell,
|
2010-08-04 02:39:57 +02:00
|
|
|
[AS_HELP_STRING([--enable-terminal-bell], [Enable terminal bell on completion.])],
|
2015-04-06 15:22:35 +02:00
|
|
|
AC_DEFINE([CONFIG_TERMINAL_BELL], 1, [Define to enable terminal bell on completion.]))
|
2009-02-08 21:13:54 +01:00
|
|
|
|
2010-07-18 18:57:07 +02:00
|
|
|
AC_ARG_ENABLE(termcap,
|
2010-08-04 02:39:57 +02:00
|
|
|
[AS_HELP_STRING([--enable-termcap], [Use termcap library to query terminal size.])],
|
|
|
|
AC_DEFINE([CONFIG_USE_TERMCAP], 1, [Define to use the termcap library for terminal size.]))
|
2010-07-18 18:57:07 +02:00
|
|
|
|
2015-10-27 19:50:01 +01:00
|
|
|
AM_CONDITIONAL([USE_LIBTERMCAP], [test "$enable_termcap" != no])
|
2010-07-24 02:39:45 +02:00
|
|
|
AM_CFLAGS="-std=gnu99 $inline_cflags -W -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration $nopointersign_cflags -Wshadow -Wcast-qual"
|
2010-07-18 02:51:25 +02:00
|
|
|
AC_SUBST(AM_CFLAGS)
|
|
|
|
|
2015-09-10 12:37:03 +02:00
|
|
|
AC_OUTPUT
|