Fix recently broken --enable-default-complete and simplify configure script.

This commit is contained in:
Joachim Nilsson 2010-07-18 02:30:30 +02:00
parent da4bd00eef
commit ad0fee03aa
5 changed files with 18 additions and 77 deletions

View File

@ -9,6 +9,9 @@
/* Define to include ANSI arrow keys support. */
#undef CONFIG_ANSI_ARROWS
/* Define to enable the default completion handler. */
#undef CONFIG_DEFAULT_COMPLETE
/* Define to enable SIGSTOP (Ctrl-Z) key. */
#undef CONFIG_SIGSTOP

50
configure vendored
View File

@ -11066,20 +11066,9 @@ done
# Check whether --enable-default-complete was given.
if test "${enable_default_complete+set}" = set; then :
enableval=$enable_default_complete;
case "${enableval}" in
yes)
complete=true
;;
no)
complete=false
;;
*)
as_fn_error "bad value ${enableval} for --enable-default-complete" "$LINENO" 5
;;
esac
else
complete=false
enableval=$enable_default_complete; complete=true;
$as_echo "#define CONFIG_DEFAULT_COMPLETE /**/" >>confdefs.h
fi
if test x$complete = xtrue; then
@ -11091,51 +11080,30 @@ else
fi
ac_enable_arrow_keys=no
# Check whether --enable-arrow-keys was given.
if test "${enable_arrow_keys+set}" = set; then :
enableval=$enable_arrow_keys; ac_enable_arrow_keys=$enableval
else
ac_enable_arrow_keys=no
fi
if test "x${ac_enable_arrow_keys}" = xyes ; then
enableval=$enable_arrow_keys;
$as_echo "#define CONFIG_ANSI_ARROWS /**/" >>confdefs.h
fi
ac_enable_sigstop=no
# Check whether --enable-sigstop was given.
if test "${enable_sigstop+set}" = set; then :
enableval=$enable_sigstop; ac_enable_sigstop=$enableval
else
ac_enable_sigstop=no
fi
if test "x${ac_enable_sigstop}" = xyes ; then
enableval=$enable_sigstop;
$as_echo "#define CONFIG_SIGSTOP /**/" >>confdefs.h
fi
ac_enable_terminal_bell=no
# Check whether --enable-terminal-bell was given.
if test "${enable_terminal_bell+set}" = set; then :
enableval=$enable_terminal_bell; ac_enable_terminal_bell=$enableval
else
ac_enable_terminal_bell=no
fi
if test "x${ac_enable_terminal_bell}" = xyes ; then
enableval=$enable_terminal_bell;
$as_echo "#define CONFIG_ANNOYING_NOISE /**/" >>confdefs.h
fi
ac_config_files="$ac_config_files Makefile src/Makefile include/Makefile man/Makefile examples/Makefile"
cat >confcache <<\_ACEOF

View File

@ -42,50 +42,22 @@ AC_PROG_GCC_TRADITIONAL
AC_FUNC_STAT
AC_CHECK_FUNCS([strchr strdup strrchr tcgetattr perror])
AC_ARG_ENABLE([default-complete],
[ --enable-default-complete Enable default completion handler.],[
case "${enableval}" in
yes)
complete=true
;;
no)
complete=false
;;
*)
AC_MSG_ERROR([bad value ${enableval} for --enable-default-complete])
;;
esac],[complete=false])
AC_ARG_ENABLE(default-complete,
[ --enable-default-complete Enable default completion handler.],
complete=true; AC_DEFINE(CONFIG_DEFAULT_COMPLETE,, [Define to enable the default completion handler.]))
AM_CONDITIONAL([CONFIG_DEFAULT_COMPLETE], [test x$complete = xtrue])
ac_enable_arrow_keys=no
AC_ARG_ENABLE(arrow-keys,
[ --enable-arrow-keys Enable ANSI arrow keys.],
[ ac_enable_arrow_keys=$enableval ], [ ac_enable_arrow_keys=no])
AC_DEFINE([CONFIG_ANSI_ARROWS],, [Define to include ANSI arrow keys support.]))
if test "x${ac_enable_arrow_keys}" = xyes ; then
AC_DEFINE([CONFIG_ANSI_ARROWS], [],
[Define to include ANSI arrow keys support.])
fi
ac_enable_sigstop=no
AC_ARG_ENABLE(sigstop,
[ --enable-sigstop Enable SIGSTOP key.],
[ ac_enable_sigstop=$enableval ], [ ac_enable_sigstop=no])
AC_DEFINE([CONFIG_SIGSTOP],, [Define to enable SIGSTOP (Ctrl-Z) key.]))
if test "x${ac_enable_sigstop}" = xyes ; then
AC_DEFINE([CONFIG_SIGSTOP], [],
[Define to enable SIGSTOP (Ctrl-Z) key.])
fi
ac_enable_terminal_bell=no
AC_ARG_ENABLE(terminal-bell,
[ --enable-terminal-bell Enable terminal bell on completion.],
[ ac_enable_terminal_bell=$enableval ], [ ac_enable_terminal_bell=no])
if test "x${ac_enable_terminal_bell}" = xyes ; then
AC_DEFINE([CONFIG_ANNOYING_NOISE], [],
[Define to enable terminal bell on completion.])
fi
AC_DEFINE([CONFIG_ANNOYING_NOISE],, [Define to enable terminal bell on completion.]))
AC_OUTPUT(Makefile src/Makefile include/Makefile man/Makefile examples/Makefile)

View File

@ -4,5 +4,4 @@ libeditline_la_SOURCES = editline.c editline.h sysunix.c unix.h
if CONFIG_DEFAULT_COMPLETE
# Built-in completion handler.
libeditline_la_SOURCES += complete.c
AM_CPPFLAGS = -DCOMPLETE
endif

View File

@ -228,7 +228,6 @@ AUTOMAKE_OPTIONS = foreign
lib_LTLIBRARIES = libeditline.la
libeditline_la_SOURCES = editline.c editline.h sysunix.c unix.h \
$(am__append_1)
@CONFIG_DEFAULT_COMPLETE_TRUE@AM_CPPFLAGS = -DCOMPLETE
all: all-am
.SUFFIXES: