List:Commits« Previous MessageNext Message »
From:Daniel Fischer Date:January 25 2007 7:46am
Subject:bk commit into 5.0 tree (df:1.2387) BUG#25530
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of df. When df does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-01-25 08:46:07+01:00, df@stripped +2 -0
  BUG#25530 --with-readline fails with commercial source packages

  BUILD/SETUP.sh@stripped, 2007-01-25 08:46:04+01:00, df@stripped +10 -1
    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@stripped, 2007-01-25 08:46:04+01:00, df@stripped +15 -2
    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.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	df
# Host:	kahlann.erinye.com
# Root:	/home/df/mysql/build/mysql-5.0-build-work-25530

--- 1.421/configure.in	2007-01-22 10:28:23 +01:00
+++ 1.422/configure.in	2007-01-25 08:46:04 +01:00
@@ -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)

--- 1.61/BUILD/SETUP.sh	2006-11-20 21:41:35 +01:00
+++ 1.62/BUILD/SETUP.sh	2007-01-25 08:46:04 +01:00
@@ -84,7 +84,16 @@ debug_extra_cflags="-O1 -Wuninitialized"
 base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
 amd64_cxxflags=""				# If dropping '--with-big-tables', add here  "-DBIG_TABLES"
 
-base_configs="$prefix_configs --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-readline --with-big-tables"
+base_configs="$prefix_configs --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables"
+
+if test -d "$path/../cmd-line-utils/readline"
+then
+    base_configs="$base_configs --with-readline"
+elif test -d "$path/../cmd-line-utils/libedit"
+then
+    base_configs="$base_configs --with-libedit"
+fi
+
 static_link="--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static"
 amd64_configs=""
 alpha_configs=""	# Not used yet
Thread
bk commit into 5.0 tree (df:1.2387) BUG#25530Daniel Fischer25 Jan