diff options
author | unknown <df@kahlann.erinye.com> | 2007-01-25 08:46:07 +0100 |
---|---|---|
committer | unknown <df@kahlann.erinye.com> | 2007-01-25 08:46:07 +0100 |
commit | 6cfffb500532cf8769013fc57e7140b861811632 (patch) | |
tree | 3c8c15b6e6eddd0dbfabbcb70da51e36dcfc389c /configure.in | |
parent | bb5dccf26065e07488a68dc636b8e79c059981a7 (diff) | |
download | mariadb-git-6cfffb500532cf8769013fc57e7140b861811632.tar.gz |
BUG#25530 --with-readline fails with commercial source packages
BUILD/SETUP.sh:
BUG#25530 --with-readline fails with commercial source packages
The compile-* scripts should not use --with-readline explicitly when no readline is present.
configure.in:
BUG#25530 --with-readline fails with commercial source packages
Configuring --with-readline should fail when libreadline is not bundled.
A system libreadline is only used when there is a bundled libreadline too, so the commercial source code isn't linked with GPL libreadline by accident.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/configure.in b/configure.in index cf1b4b0cd32..c6a8e20fd2f 100644 --- a/configure.in +++ b/configure.in @@ -2439,6 +2439,7 @@ readline_basedir="" readline_dir="" readline_h_ln_cmd="" readline_link="" +want_to_use_readline="no" if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null; then # For NetWare, do not need readline @@ -2463,6 +2464,7 @@ then readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a" readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline" compile_readline=yes + want_to_use_readline="yes" AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1) else # Use system readline library @@ -2472,10 +2474,12 @@ else MYSQL_CHECK_NEW_RL_INTERFACE MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY AC_LANG_RESTORE - if [test "$mysql_cv_new_rl_interface" = "yes"] + if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "./cmd-line-utils/readline"] then - # Use the new readline interface + # Use the new readline interface, but only if the package includes a bundled libreadline + # this way we avoid linking commercial source with GPL readline readline_link="-lreadline" + want_to_use_readline="yes" elif [test "$mysql_cv_libedit_interface" = "yes"]; then # Use libedit readline_link="-ledit" @@ -2485,6 +2489,15 @@ else versions of libedit or readline]) fi fi + +# if there is no readline, but we want to build with readline, we fail +if [test "$want_to_use_readline" = "yes"] && [test ! -d "./cmd-line-utils/readline"] +then + AC_MSG_ERROR([This commercially licensed MySQL source package can't + be built with libreadline. Please use --with-libedit to use + the bundled version of libedit instead.]) +fi + fi AC_SUBST(readline_dir) |