--- embedaddon/readline/configure.ac 2014/07/30 08:16:45 1.1.1.1 +++ embedaddon/readline/configure.ac 2021/03/17 01:01:01 1.1.1.2 @@ -5,7 +5,7 @@ dnl report bugs to chet@po.cwru.edu dnl dnl Process this file with autoconf to produce a configure script. -# Copyright (C) 1987-2014 Free Software Foundation, Inc. +# Copyright (C) 1987-2020 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,9 +20,9 @@ dnl Process this file with autoconf to produce a confi # You should have received a copy of the GNU General Public License # along with this program. If not, see . -AC_REVISION([for Readline 6.3, version 2.73]) +AC_REVISION([for Readline 8.1, version 2.90]) -AC_INIT(readline, 6.3, bug-readline@gnu.org) +AC_INIT(readline, 8.1, bug-readline@gnu.org) dnl make sure we are using a recent autoconf version AC_PREREQ(2.50) @@ -32,42 +32,46 @@ AC_CONFIG_AUX_DIR(./support) AC_CONFIG_HEADERS(config.h) dnl update the value of RL_READLINE_VERSION in readline.h when this changes -LIBVERSION=6.3 +LIBVERSION=8.1 AC_CANONICAL_HOST AC_CANONICAL_BUILD dnl configure defaults opt_curses=no -opt_purify=no dnl arguments to configure AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) -AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval) if test "$opt_curses" = "yes"; then prefer_curses=yes fi -if test "$opt_purify" = yes; then - PURIFY="purify" -else - PURIFY= -fi - dnl option parsing for optional features opt_multibyte=yes opt_static_libs=yes opt_shared_libs=yes +opt_install_examples=yes +opt_bracketed_paste_default=yes AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval) AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build shared libraries [[default=YES]]]), opt_shared_libs=$enableval) AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [build static libraries [[default=YES]]]), opt_static_libs=$enableval) +AC_ARG_ENABLE(install-examples, AC_HELP_STRING([--disable-install-examples], [don't install examples [[default=install]]]), opt_install_examples=$enableval) +AC_ARG_ENABLE(bracketed-paste-default, AC_HELP_STRING([--disable-bracketed-paste-default], [disable bracketed paste by default [[default=enable]]]), opt_bracketed_paste_default=$enableval) + if test $opt_multibyte = no; then AC_DEFINE(NO_MULTIBYTE_SUPPORT) fi +if test $opt_bracketed_paste_default = yes; then + BRACKETED_PASTE='-DBRACKETED_PASTE_DEFAULT=1' +else + BRACKETED_PASTE='-DBRACKETED_PASTE_DEFAULT=0' +fi +AC_SUBST(BRACKETED_PASTE) + dnl load up the cross-building cache file -- add more cases and cache dnl files as necessary @@ -103,15 +107,18 @@ echo "Beginning configuration for readline-$LIBVERSION echo "" # We want these before the checks, so the checks can modify their values. -test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 +test -z "$CFLAGS" && want_auto_cflags=1 AC_PROG_MAKE_SET AC_PROG_CC dnl AC_AIX AC_MINIX -# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. -test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" +# If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS +if test -n "$want_auto_cflags" ; then + AUTO_CFLAGS="-g ${GCC+-O2}" + STYLE_CFLAGS="${GCC+-Wno-parentheses} ${GCC+-Wno-format-security}" +fi AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL @@ -139,18 +146,19 @@ AC_HEADER_STDC AC_HEADER_STAT AC_HEADER_DIRENT -AC_CHECK_FUNCS(fcntl kill lstat) -AC_CHECK_FUNCS(memmove putenv select setenv setlocale \ +AC_CHECK_FUNCS(fcntl kill lstat readlink) +AC_CHECK_FUNCS(fnmatch memmove pselect putenv select setenv setlocale \ strcasecmp strpbrk tcgetattr vsnprintf) AC_CHECK_FUNCS(isascii isxdigit) AC_CHECK_FUNCS(getpwent getpwnam getpwuid) +AC_FUNC_CHOWN AC_FUNC_STRCOLL AC_CHECK_HEADERS(fcntl.h unistd.h stdlib.h varargs.h stdarg.h stdbool.h \ string.h strings.h \ limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h) -AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h) +AC_CHECK_HEADERS(sys/ioctl.h sys/pte.h sys/stream.h sys/select.h sys/file.h) AC_CHECK_HEADERS(sys/ptem.h,,, [[ @@ -183,6 +191,7 @@ BASH_STRUCT_WINSIZE BASH_STRUCT_DIRENT_D_INO BASH_STRUCT_DIRENT_D_FILENO +AC_CHECK_HEADERS(libaudit.h) AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]]) dnl yuck @@ -197,7 +206,19 @@ if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; TERMCAP_LIB=-ltermcap #default fi fi +# Windows ncurses installation +if test "$TERMCAP_LIB" = "-lncurses"; then + AC_CHECK_HEADERS(ncurses/termcap.h) +fi +case "$TERMCAP_LIB" in +-ltinfo) TERMCAP_PKG_CONFIG_LIB=tinfo ;; +-lcurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;; +-lncurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;; +-ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;; +*) TERMCAP_PKG_CONFIG_LIB=termcap ;; +esac + BASH_CHECK_MULTIBYTE case "$host_cpu" in @@ -207,6 +228,7 @@ esac case "$host_os" in isc*) LOCAL_CFLAGS=-Disc386 ;; +hpux*) LOCAL_CFLAGS="-DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; esac # shared library configuration section @@ -268,6 +290,11 @@ AC_SUBST(SHARED_TARGET) AC_SUBST(STATIC_INSTALL_TARGET) AC_SUBST(SHARED_INSTALL_TARGET) +if test "$opt_install_examples" = "yes"; then + EXAMPLES_INSTALL_TARGET=install-examples +fi +AC_SUBST(EXAMPLES_INSTALL_TARGET) + case "$build_os" in msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file *) BUILD_DIR=`pwd` ;; @@ -278,9 +305,13 @@ case "$BUILD_DIR" in *) ;; esac -AC_SUBST(PURIFY) AC_SUBST(BUILD_DIR) +if test -n "$want_auto_cflags"; then + CFLAGS="$AUTO_CFLAGS" +fi +CFLAGS="$CFLAGS $STYLE_CFLAGS" + AC_SUBST(CFLAGS) AC_SUBST(LOCAL_CFLAGS) AC_SUBST(LOCAL_LDFLAGS) @@ -295,8 +326,9 @@ AC_SUBST(host_os) AC_SUBST(LIBVERSION) AC_SUBST(TERMCAP_LIB) +AC_SUBST(TERMCAP_PKG_CONFIG_LIB) -AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile], +AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc], [ # Makefile uses this timestamp file to record whether config.h is up to date. echo > stamp-h