aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index d454591f08..e954ad9417 100755
--- a/configure
+++ b/configure
@@ -3667,6 +3667,25 @@ fi
if test "$_readline" = yes ; then
LIBS="$LIBS $READLINE_LIBS $_READLINE_LIBS"
INCLUDES="$INCLUDES $READLINE_CFLAGS"
+
+ #
+ # Check the type of rl_completion_entry_function.
+ # It can be int(*)(const char *, int) or char *(*)(const char *, int).
+ #
+ cat > $TMPC << EOF
+#include <stdio.h>
+#include <readline/readline.h>
+#include <readline/history.h>
+
+int readline_completionFunction(const char *, int);
+
+int main(void) {
+ char *x = readline("");
+ rl_completion_entry_function = &readline_completionFunction;
+}
+EOF
+ cc_check -c && add_line_to_config_h '#define USE_READLINE_INT_COMPLETION'
+
fi
define_in_config_h_if_yes "$_readline" 'USE_READLINE'