From 08d36171a9e535fac9d33e7cbb9a2770a72bfd0b Mon Sep 17 00:00:00 2001 From: "tim@cane.mysql.fi" <> Date: Fri, 19 Jan 2001 02:46:13 +0200 Subject: [PATCH] Add --with-server-suffix (MYSQL_SERVER_SUFFIX). --- configure.in | 8 ++++++++ include/mysql_version.h.in | 1 + myisam/Makefile.am | 1 + mysql-test/Makefile.am | 1 + scripts/Makefile.am | 1 + scripts/mysqlbug.sh | 2 +- sql-bench/Makefile.am | 1 + sql/mysqld.cc | 1 + support-files/Makefile.am | 1 + 9 files changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 923a10211f5..fe81a5a39ea 100644 --- a/configure.in +++ b/configure.in @@ -389,6 +389,14 @@ then AC_MSG_ERROR([MySQL requiers a ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.]) fi +AC_ARG_WITH(server-suffix, + [ --with-server-suffix Append value to the version string.], + # I heard that 'cut' isn't portable. Isn't there a better way? + [ MYSQL_SERVER_SUFFIX=`echo "$withval" | sed -e 's/^\(...................................\)..*$/\1/'` ], + [ MYSQL_SERVER_SUFFIX= ] + ) +AC_SUBST(MYSQL_SERVER_SUFFIX) + # Set flags if we wants to have MIT threads. AC_ARG_WITH(mit-threads, [ --with-mit-threads Always use included thread lib.], diff --git a/include/mysql_version.h.in b/include/mysql_version.h.in index 7cfef34176e..8a4bff7a284 100644 --- a/include/mysql_version.h.in +++ b/include/mysql_version.h.in @@ -8,6 +8,7 @@ #else #define PROTOCOL_VERSION @PROTOCOL_VERSION@ #define MYSQL_SERVER_VERSION "@VERSION@" +#define MYSQL_SERVER_SUFFIX "@MYSQL_SERVER_SUFFIX@" #define FRM_VER @DOT_FRM_VERSION@ #define MYSQL_VERSION_ID @MYSQL_VERSION_ID@ #define MYSQL_PORT @MYSQL_TCP_PORT@ diff --git a/myisam/Makefile.am b/myisam/Makefile.am index edb801f12fd..a18ff55ba9e 100644 --- a/myisam/Makefile.am +++ b/myisam/Makefile.am @@ -83,6 +83,7 @@ SUFFIXES = .sh -e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\ -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\ -e 's!@''VERSION''@!@VERSION@!' \ + -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \ -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \ -e 's!@''HOSTNAME''@!@HOSTNAME@!' \ diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 74154ecffa4..93804c4699b 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -62,6 +62,7 @@ SUFFIXES = .sh -e 's!@''libexecdir''@!$(libexecdir)!g' \ -e 's!@''PERL''@!@PERL@!' \ -e 's!@''VERSION''@!@VERSION@!' \ + -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ $< > $@-t @CHMOD@ +x $@-t @MV@ $@-t $@ diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 5b3347081c4..45fbe275476 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -96,6 +96,7 @@ SUFFIXES = .sh -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\ -e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \ -e 's!@''VERSION''@!@VERSION@!' \ + -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \ -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \ -e 's!@''HOSTNAME''@!@HOSTNAME@!' \ diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh index 77744777c1c..bd5cb497e59 100644 --- a/scripts/mysqlbug.sh +++ b/scripts/mysqlbug.sh @@ -4,7 +4,7 @@ echo "Finding system information for a MySQL bug report" -VERSION="@VERSION@" +VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@" COMPILATION_COMMENT="@COMPILATION_COMMENT@" BUGmysql="mysql@lists.mysql.com" # This is set by configure diff --git a/sql-bench/Makefile.am b/sql-bench/Makefile.am index 2db43536fa1..278ea516910 100644 --- a/sql-bench/Makefile.am +++ b/sql-bench/Makefile.am @@ -78,6 +78,7 @@ SUFFIXES = .sh -e 's!@''libexecdir''@!$(libexecdir)!g' \ -e 's!@''PERL''@!@PERL@!' \ -e 's!@''VERSION''@!@VERSION@!' \ + -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ $< > $@-t @CHMOD@ +x $@-t @MV@ $@-t $@ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b6caa6c492c..d2d18f09696 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1471,6 +1471,7 @@ int main(int argc, char **argv) strmov(glob_hostname,"mysql"); strmov(pidfile_name,glob_hostname); strmov(strcend(pidfile_name,'.'),".pid"); // Add extension + strcat(server_version, MYSQL_SERVER_SUFFIX); #ifdef DEMO_VERSION strcat(server_version,"-demo"); #endif diff --git a/support-files/Makefile.am b/support-files/Makefile.am index a9d5aac7f9e..2f997526e05 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -71,6 +71,7 @@ SUFFIXES = .sh -e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\ -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\ -e 's!@''VERSION''@!@VERSION@!' \ + -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \ -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \ -e 's!@''HOSTNAME''@!@HOSTNAME@!' \