]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 't/rl_free_keymap'
authorAndre Noll <maan@systemlinux.org>
Tue, 22 Apr 2014 00:30:02 +0000 (02:30 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 22 Apr 2014 00:30:02 +0000 (02:30 +0200)
Cooking since 2014-03-10.

* t/rl_free_keymap:
  build: Check whether rl_free_keymap is declared.

configure.ac
interactive.c

index 07ecffdd71f31e1246d8262bda5fbdd762212f99..30bce8ee400858cb099c3bc7d1d2593c4f842225 100644 (file)
@@ -757,7 +757,15 @@ if test "$have_readline" = "yes"; then
 fi
 
 if test "$have_readline" = "yes"; then
-       :
+       AC_CHECK_DECL(
+               [rl_free_keymap],
+               [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)],
+               [],
+               [
+                       #include <stdio.h>
+                       #include <readline/readline.h>
+               ]
+       )
        AC_SUBST(readline_cppflags)
        AC_SUBST(readline_ldflags)
        AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
index ee953bf12a26377bb02efb3fc96e1b3cf3e7b0e9..9f2b71953c90f3148d17af0becf0b6a9f3eeaecd 100644 (file)
@@ -227,6 +227,7 @@ static void wipe_bottom_line(void)
        fprintf(i9ep->stderr_stream, "\r");
 }
 
+#ifndef RL_FREE_KEYMAP_DECLARED
 /**
  * Free all storage associated with a keymap.
  *
@@ -237,6 +238,7 @@ static void wipe_bottom_line(void)
  * \param keymap The keymap to deallocate.
  */
 void rl_free_keymap(Keymap keymap);
+#endif
 
 /**
  * Reset the terminal and save the in-memory command line history.