Loading acinclude.m4 +23 −0 Original line number Diff line number Diff line # Local macros for automake & autoconf AC_DEFUN(MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY,[ AC_CACHE_CHECK([HIST_ENTRY is declared in readline/readline.h], mysql_cv_hist_entry_declared, AC_TRY_COMPILE( [ #include "stdio.h" #undef __P // readline-4.2 declares own __P #include "readline/readline.h" ], [ HIST_ENTRY entry; ], [ mysql_cv_hist_entry_declared=yes AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY) ], [mysql_cv_libedit_interface=no] ) ) ]) 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" #undef __P // readline-4.2 declares own __P #include "readline/readline.h" ], [ Loading @@ -26,6 +48,7 @@ AC_DEFUN(MYSQL_CHECK_NEW_RL_INTERFACE,[ AC_TRY_COMPILE( [ #include "stdio.h" #undef __P // readline-4.2 declares own __P #include "readline/readline.h" ], [ Loading client/mysql.cc +2 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ extern "C" { #if defined( __WIN__) || defined(OS2) #include <conio.h> #elif !defined(__NETWARE__) #undef __P // readline-4.2 declares own __P #include <readline/readline.h> #define HAVE_READLINE #endif Loading Loading @@ -294,7 +295,7 @@ static const char *server_default_groups[]= HIST_ENTRY is defined for libedit, but not for the real readline Need to redefine it for real readline to find it */ #if !defined(USE_LIBEDIT_INTERFACE) #if !defined(HAVE_HIST_ENTRY) typedef struct _hist_entry { const char *line; const char *data; Loading cmd-line-utils/Makefile.am +17 −0 Original line number Diff line number Diff line # Copyright (C) 2004 MySQL AB # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA ## Process this file with automake to create Makefile.in SUBDIRS= @readline_basedir@ Loading configure.in +19 −0 Original line number Diff line number Diff line Loading @@ -2303,6 +2303,20 @@ AC_ARG_WITH(libedit, [ with_libedit=undefined ] ) # # We support next variants of compilation: # --with-readline # | yes | no | undefined # --with-libedit | | | # ---------------+----------------+------+---------------------------------- # yes | ERROR! | use libedit from mysql sources # ---------------+----------------+------+---------------------------------- # no | use readline | use system readline or external libedit # | from mysql | according to results of m4 tests # ---------------+ sources (if it + +---------------------------------- # undefined | is presented) | | use libedit from mysql sources compile_readline="no" compile_libedit="no" Loading Loading @@ -2330,6 +2344,7 @@ then readline_link="\$(top_builddir)/cmd-line-utils/libedit/liblibedit.a" readline_h_ln_cmd="\$(LN) -s \$(top_builddir)/cmd-line-utils/libedit/readline readline" compile_libedit=yes AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY) AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE, 1) elif test "$with_readline" = "yes" then Loading @@ -2341,8 +2356,12 @@ then compile_readline=yes AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1) else AC_LANG_SAVE AC_LANG_CPLUSPLUS MYSQL_CHECK_LIBEDIT_INTERFACE MYSQL_CHECK_NEW_RL_INTERFACE MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY AC_LANG_RESTORE if [test "$mysql_cv_new_rl_interface" = "yes"] || [test "$mysql_cv_libedit_interface" = "no"] then readline_link="-lreadline" Loading Loading
acinclude.m4 +23 −0 Original line number Diff line number Diff line # Local macros for automake & autoconf AC_DEFUN(MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY,[ AC_CACHE_CHECK([HIST_ENTRY is declared in readline/readline.h], mysql_cv_hist_entry_declared, AC_TRY_COMPILE( [ #include "stdio.h" #undef __P // readline-4.2 declares own __P #include "readline/readline.h" ], [ HIST_ENTRY entry; ], [ mysql_cv_hist_entry_declared=yes AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY) ], [mysql_cv_libedit_interface=no] ) ) ]) 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" #undef __P // readline-4.2 declares own __P #include "readline/readline.h" ], [ Loading @@ -26,6 +48,7 @@ AC_DEFUN(MYSQL_CHECK_NEW_RL_INTERFACE,[ AC_TRY_COMPILE( [ #include "stdio.h" #undef __P // readline-4.2 declares own __P #include "readline/readline.h" ], [ Loading
client/mysql.cc +2 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ extern "C" { #if defined( __WIN__) || defined(OS2) #include <conio.h> #elif !defined(__NETWARE__) #undef __P // readline-4.2 declares own __P #include <readline/readline.h> #define HAVE_READLINE #endif Loading Loading @@ -294,7 +295,7 @@ static const char *server_default_groups[]= HIST_ENTRY is defined for libedit, but not for the real readline Need to redefine it for real readline to find it */ #if !defined(USE_LIBEDIT_INTERFACE) #if !defined(HAVE_HIST_ENTRY) typedef struct _hist_entry { const char *line; const char *data; Loading
cmd-line-utils/Makefile.am +17 −0 Original line number Diff line number Diff line # Copyright (C) 2004 MySQL AB # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA ## Process this file with automake to create Makefile.in SUBDIRS= @readline_basedir@ Loading
configure.in +19 −0 Original line number Diff line number Diff line Loading @@ -2303,6 +2303,20 @@ AC_ARG_WITH(libedit, [ with_libedit=undefined ] ) # # We support next variants of compilation: # --with-readline # | yes | no | undefined # --with-libedit | | | # ---------------+----------------+------+---------------------------------- # yes | ERROR! | use libedit from mysql sources # ---------------+----------------+------+---------------------------------- # no | use readline | use system readline or external libedit # | from mysql | according to results of m4 tests # ---------------+ sources (if it + +---------------------------------- # undefined | is presented) | | use libedit from mysql sources compile_readline="no" compile_libedit="no" Loading Loading @@ -2330,6 +2344,7 @@ then readline_link="\$(top_builddir)/cmd-line-utils/libedit/liblibedit.a" readline_h_ln_cmd="\$(LN) -s \$(top_builddir)/cmd-line-utils/libedit/readline readline" compile_libedit=yes AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY) AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE, 1) elif test "$with_readline" = "yes" then Loading @@ -2341,8 +2356,12 @@ then compile_readline=yes AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1) else AC_LANG_SAVE AC_LANG_CPLUSPLUS MYSQL_CHECK_LIBEDIT_INTERFACE MYSQL_CHECK_NEW_RL_INTERFACE MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY AC_LANG_RESTORE if [test "$mysql_cv_new_rl_interface" = "yes"] || [test "$mysql_cv_libedit_interface" = "no"] then readline_link="-lreadline" Loading