diff options
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 15f08e44c27..970620d9be7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,5 +1,45 @@ # Local macros for automake & autoconf +AC_DEFUN(MYSQL_CHECK_LIBEDIT_INTERFACE,[ + AC_CACHE_CHECK([libedit variant of rl_completion_entry_function], mysql_cv_libedit_interface, + AC_TRY_COMPILE( + [ + #include "stdio.h" + #include "readline/readline.h" + ], + [ + char res= *(*rl_completion_entry_function)(0,0); + completion_matches(0,0); + ], + [ + mysql_cv_libedit_interface=yes + AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE) + ], + [mysql_cv_libedit_interface=no] + ) + ) +]) + +AC_DEFUN(MYSQL_CHECK_NEW_RL_INTERFACE,[ + AC_CACHE_CHECK([defined rl_compentry_func_t and rl_completion_func_t], mysql_cv_new_rl_interface, + AC_TRY_COMPILE( + [ + #include "stdio.h" + #include "readline/readline.h" + ], + [ + rl_completion_func_t *func1= (rl_completion_func_t*)0; + rl_compentry_func_t *func2= (rl_compentry_func_t*)0; + ], + [ + mysql_cv_new_rl_interface=yes + AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE) + ], + [mysql_cv_new_rl_interface=no] + ) + ) +]) + # A local version of AC_CHECK_SIZEOF that includes sys/types.h dnl MYSQL_CHECK_SIZEOF(TYPE [, CROSS-SIZE]) AC_DEFUN(MYSQL_CHECK_SIZEOF, |