summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2021-07-01 16:00:33 +0200
committerThomas Haller <thaller@redhat.com>2021-07-14 17:16:45 +0200
commit0c5adc6938447cdec62c599fe58fe48b27e1a986 (patch)
treee1d5d3874f51f76ae4be1e04f447c5ce7411a1c1 /m4
parent552e00990d9c61b3a364bd0b773047ce4c277ac4 (diff)
downloadNetworkManager-0c5adc6938447cdec62c599fe58fe48b27e1a986.tar.gz
m4: Check for history_set_history_state instead of add_history
The add_history function is available on both - libreadline and libedit. The read difference between those two libraries is that for libedit the history_set_history_state is missing. On that basis one can assess if we do have history from libreadline or from libedit.
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_lib_readline.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/ax_lib_readline.m4 b/m4/ax_lib_readline.m4
index d8090da2ac..1fcf504141 100644
--- a/m4/ax_lib_readline.m4
+++ b/m4/ax_lib_readline.m4
@@ -99,7 +99,8 @@ AC_DEFUN([AX_LIB_READLINE], [
AC_CACHE_CHECK([whether readline supports history],
ax_cv_lib_readline_history, [
ax_cv_lib_readline_history="no"
- AC_LINK_IFELSE([AC_LANG_CALL([], [add_history])], [ax_cv_lib_readline_history="yes"])
+ AC_LINK_IFELSE([AC_LANG_CALL([], [history_set_history_state])],
+ [ax_cv_lib_readline_history="yes"])
])
LIBS=$ORIG_LIBS