summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-12-12 16:28:16 +0100
committerSergei Golubchik <sergii@pisem.net>2011-12-12 16:28:16 +0100
commita3e8ce275c9de6e01bce1c0d4a44e0a4b9a8b867 (patch)
treebf29d3c0a129354533f74d174a65fa8a4c0adddb /config
parent6ad3179d6d7facbf55897088c7f0b4d2fcdbd675 (diff)
downloadmariadb-git-a3e8ce275c9de6e01bce1c0d4a44e0a4b9a8b867.tar.gz
new "./configure --disable-distribution" option
Diffstat (limited to 'config')
-rw-r--r--config/ac-macros/readline.m439
1 files changed, 30 insertions, 9 deletions
diff --git a/config/ac-macros/readline.m4 b/config/ac-macros/readline.m4
index e1ed8420bfb..9e62d9add3e 100644
--- a/config/ac-macros/readline.m4
+++ b/config/ac-macros/readline.m4
@@ -40,23 +40,44 @@ AC_DEFUN([MYSQL_CHECK_LIBEDIT_INTERFACE], [
])
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(
- [
+ AC_CACHE_CHECK([for system libreadline], mysql_cv_new_rl_interface,
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([
#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], [1],
- [used new readline interface (are rl_completion_func_t and rl_compentry_func_t defined)])
+ AC_PREPROC_IFELSE(
+ [AC_LANG_SOURCE([
+ #include "stdio.h"
+ #include "readline/readline.h"
+ #if RL_VERSION_MAJOR > 5
+ #error
+ #endif
+ ])], [ rl_v5=yes ], [ rl_v5=no ],
+ )
+ if [test "$rl_v5" = "yes"]
+ then
+ mysql_cv_new_rl_interface=yes
+ else
+ if [test "$enable_distribution" = "yes"]
+ then
+ mysql_cv_new_rl_interface=no
+ else
+ mysql_cv_new_rl_interface=yes
+ enable_distribution=warn
+ fi
+ fi
],
[mysql_cv_new_rl_interface=no]
)
+ if [test "$mysql_cv_new_rl_interface" = yes]
+ then
+ AC_DEFINE_UNQUOTED([USE_NEW_READLINE_INTERFACE], [1],
+ [used new readline interface (are rl_completion_func_t and rl_compentry_func_t defined)])
+ fi
)
])