|
|
@ -14,26 +14,21 @@ AC_DEFUN([AX_PATH_LIB_READLINE],
|
|
|
|
[no],
|
|
|
|
[no],
|
|
|
|
AC_MSG_ERROR([readline required to build]),
|
|
|
|
AC_MSG_ERROR([readline required to build]),
|
|
|
|
[yes],
|
|
|
|
[yes],
|
|
|
|
|
|
|
|
[],
|
|
|
|
[dnl
|
|
|
|
[dnl
|
|
|
|
AC_SEARCH_LIBS([readline], [readline],
|
|
|
|
|
|
|
|
[AS_VAR_SET([READLINE_LIBS], ["-lreadline"])],
|
|
|
|
|
|
|
|
[AC_MSG_ERROR([libreadline library not found])],
|
|
|
|
|
|
|
|
[$CURSES_LIB]
|
|
|
|
|
|
|
|
)dnl
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[dnl
|
|
|
|
|
|
|
|
AS_VAR_SET([READLINE_LIBS], ["$with_readline/lib/libreadline.a"])
|
|
|
|
|
|
|
|
AC_CHECK_FILE("$READLINE_LIBS", [],
|
|
|
|
|
|
|
|
AC_MSG_ERROR([readline library not found])
|
|
|
|
|
|
|
|
)dnl
|
|
|
|
|
|
|
|
AS_VAR_SET([READLINE_CFLAGS], ["-I$with_readline/include"])
|
|
|
|
AS_VAR_SET([READLINE_CFLAGS], ["-I$with_readline/include"])
|
|
|
|
AS_VAR_SET([READLINE_SAVED_LDFLAGS], ["$LDFLAGS"])
|
|
|
|
|
|
|
|
LNAV_ADDTO(CPPFLAGS, ["-I$with_readline/include"])
|
|
|
|
LNAV_ADDTO(CPPFLAGS, ["-I$with_readline/include"])
|
|
|
|
dnl We want the provided path to be the first in the search order.
|
|
|
|
dnl We want the provided path to be the first in the search order.
|
|
|
|
LDFLAGS="-L$with_readline/lib $LDFLAGS"
|
|
|
|
LDFLAGS="-L$with_readline/lib $LDFLAGS"
|
|
|
|
]dnl
|
|
|
|
]dnl
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_SEARCH_LIBS([readline], [readline],
|
|
|
|
|
|
|
|
[AS_VAR_SET([READLINE_LIBS], ["-lreadline"])],
|
|
|
|
|
|
|
|
[AC_MSG_ERROR([libreadline library not found])],
|
|
|
|
|
|
|
|
[$CURSES_LIB]
|
|
|
|
|
|
|
|
)dnl
|
|
|
|
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS([readline.h readline/readline.h],
|
|
|
|
AC_CHECK_HEADERS([readline.h readline/readline.h],
|
|
|
|
[dnl
|
|
|
|
[dnl
|
|
|
|
AS_VAR_SET([HAVE_READLINE_HEADERS], [1])
|
|
|
|
AS_VAR_SET([HAVE_READLINE_HEADERS], [1])
|
|
|
@ -49,11 +44,7 @@ AC_DEFUN([AX_PATH_LIB_READLINE],
|
|
|
|
dnl Ensure that the readline library has the required symbols.
|
|
|
|
dnl Ensure that the readline library has the required symbols.
|
|
|
|
dnl i.e. We haven't picked up editline.
|
|
|
|
dnl i.e. We haven't picked up editline.
|
|
|
|
AC_SEARCH_LIBS([history_set_history_state], [readline],
|
|
|
|
AC_SEARCH_LIBS([history_set_history_state], [readline],
|
|
|
|
[
|
|
|
|
[],
|
|
|
|
AS_VAR_SET_IF([READLINE_SAVED_LDFLAGS],
|
|
|
|
|
|
|
|
AS_VAR_SET([LDFLAGS], ["$READLINE_SAVED_LDFLAGS"])
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
AC_MSG_ERROR([libreadline does not have the required symbols. editline possibly masquerading as readline.])
|
|
|
|
AC_MSG_ERROR([libreadline does not have the required symbols. editline possibly masquerading as readline.])
|
|
|
|
[$CURSES]
|
|
|
|
[$CURSES]
|
|
|
|
)
|
|
|
|
)
|
|
|
|