Enabled use of libedit as alternative to libreadline
This commit is contained in:
@ -144,6 +144,56 @@ iconv_close(cd);
|
||||
])
|
||||
|
||||
|
||||
dnl LIBBURNIA_TRY_EDITLINE is by Thomas Schmitt, libburnia project
|
||||
dnl It performs the actual test compilation for editline.
|
||||
dnl Variable LIBS has to be set by the caller.
|
||||
AC_DEFUN([LIBBURNIA_TRY_EDITLINE],
|
||||
[
|
||||
AC_TRY_LINK([
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <histedit.h>],
|
||||
[EditLine *editline_handle; History *editline_history; HistEvent ev; int count;
|
||||
editline_handle= el_init("dummy", stdin, stdout, stderr);
|
||||
el_set(editline_handle, EL_EDITOR, "emacs");
|
||||
editline_history= history_init();
|
||||
history(editline_history, &ev, H_SETSIZE, 1000);
|
||||
el_gets(editline_handle, &count);
|
||||
], [editline_test="yes"], [editline_test="no"]
|
||||
)
|
||||
])
|
||||
|
||||
dnl LIBBURNIA_ASSERT_EDITLINE is by Thomas Schmitt, libburnia project
|
||||
dnl It disables xorriso editline if not all needed functions are present
|
||||
AC_DEFUN([LIBBURNIA_ASSERT_EDITLINE],
|
||||
[
|
||||
if test x$XORRISO_ASSUME_EDITLINE = x
|
||||
then
|
||||
dnl Check for the essential gestures of xorriso/text_io.c
|
||||
AC_MSG_CHECKING([for desired functions in libedit])
|
||||
libburnia_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -ledit"
|
||||
LIBBURNIA_TRY_EDITLINE
|
||||
if test x$editline_test = xno
|
||||
then
|
||||
LIBS="$libburnia_save_LIBS"
|
||||
LIBS="$LIBS -ledit"
|
||||
LIBBURNIA_TRY_EDITLINE
|
||||
fi
|
||||
if test x$editline_test = xno
|
||||
then
|
||||
READLINE_DEF=
|
||||
LIBS="$libburnia_save_LIBS"
|
||||
fi
|
||||
AC_MSG_RESULT([$editline_test $editline_msg])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl LIBBURNIA_TRY_READLINE is by Thomas Schmitt, libburnia project
|
||||
dnl It performs the actual test compilation for readline.
|
||||
dnl Variable LIBS has to be set by the caller.
|
||||
@ -166,14 +216,13 @@ hl= history_list();
|
||||
)
|
||||
])
|
||||
|
||||
|
||||
dnl LIBBURNIA_ASSERT_READLINE is by Thomas Schmitt, libburnia project
|
||||
dnl It disables xorriso readline if not all needed functions are present
|
||||
AC_DEFUN([LIBBURNIA_ASSERT_READLINE],
|
||||
[
|
||||
if test x$XORRISO_ASSUME_READLINE = x
|
||||
then
|
||||
dnl Check for the essential gestures of libisofs/util.c
|
||||
dnl Check for the essential gestures of xorriso/text_io.c
|
||||
AC_MSG_CHECKING([for desired functions in libreadline])
|
||||
readline_msg=
|
||||
libburnia_save_LIBS="$LIBS"
|
||||
|
Reference in New Issue
Block a user