1
=== added file 'patch_info/show_ccflags_configure.info'
2
--- patch_info/show_ccflags_configure.info 1970-01-01 00:00:00 +0000
3
+++ patch_info/show_ccflags_configure.info 2008-10-17 18:55:49 +0000
5
+File=show_ccflags_configure.patch
6
+Name=Adds command line option and status var to show CCFLAGS
8
+Author=Antony T Curtis <atcurtis@mac.com>
12
=== modified file 'configure.in'
13
--- configure.in 2008-10-10 11:54:46 +0000
14
+++ configure.in 2008-10-17 18:18:37 +0000
16
AC_PATH_PROG(AS, as, as)
21
# Still need ranlib for readline; local static use only so no libtool.
25
man/Makefile BUILD/Makefile vio/Makefile dnl
26
libmysql/Makefile libmysql_r/Makefile client/Makefile dnl
27
sql/Makefile sql/share/Makefile dnl
28
- sql/sql_builtin.cc sql-common/Makefile dnl
29
+ sql/sql_builtin.cc sql/mysqld.pc sql-common/Makefile dnl
30
dbug/Makefile scripts/Makefile include/Makefile dnl
31
tests/Makefile Docs/Makefile support-files/Makefile dnl
32
support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
34
=== modified file 'sql/Makefile.am'
35
--- sql/Makefile.am 2008-06-18 16:17:15 +0000
36
+++ sql/Makefile.am 2008-10-17 18:25:46 +0000
38
MYSQLBASEdir= $(prefix)
39
MYSQLLIBdir= $(pkglibdir)
40
pkgplugindir = $(pkglibdir)/plugin
41
+pkgconfigdir = $(prefix)/lib/pkgconfig
42
INCLUDES = @ZLIB_INCLUDES@ \
43
-I$(top_builddir)/include -I$(top_srcdir)/include \
44
-I$(top_srcdir)/regex -I$(srcdir) $(openssl_includes)
46
libexec_PROGRAMS = mysqld
47
EXTRA_PROGRAMS = gen_lex_hash
48
bin_PROGRAMS = mysql_tzinfo_to_sql
49
+pkgconfig_HEADERS = mysqld.pc
51
noinst_LTLIBRARIES= libndb.la \
54
=== modified file 'sql/mysqld.cc'
55
--- sql/mysqld.cc 2008-10-09 10:39:42 +0000
56
+++ sql/mysqld.cc 2008-10-17 18:45:42 +0000
61
+extern "C" const char build_ccflags_string[];
62
+extern "C" const char build_configure_string[];
64
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
66
WARNING: When adding new SQL modes don't forget to update the
68
OPT_BIND_ADDRESS, OPT_PID_FILE,
69
OPT_SKIP_PRIOR, OPT_BIG_TABLES,
70
OPT_STANDALONE, OPT_ONE_THREAD,
71
+ OPT_SHOW_CCFLAGS, OPT_SHOW_CONFIGURE,
72
OPT_CONSOLE, OPT_LOW_PRIORITY_UPDATES,
73
OPT_SKIP_HOST_CACHE, OPT_SHORT_LOG_FORMAT,
75
@@ -6282,6 +6286,12 @@
76
"Dummy option to start as a standalone program (NT).", 0, 0, 0, GET_NO_ARG,
77
NO_ARG, 0, 0, 0, 0, 0, 0},
79
+ {"cflags", OPT_SHOW_CCFLAGS,
80
+ "Display the compile flags used to build mysqld and exit.",
81
+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
82
+ {"conf-command", OPT_SHOW_CONFIGURE,
83
+ "Display the configure command used to build mysqld and exit.",
84
+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
85
{"symbolic-links", 's', "Enable symbolic link support.",
86
(uchar**) &my_use_symdir, (uchar**) &my_use_symdir, 0, GET_BOOL, NO_ARG,
89
{"Aborted_connects", (char*) &aborted_connects, SHOW_LONG},
90
{"Binlog_cache_disk_use", (char*) &binlog_cache_disk_use, SHOW_LONG},
91
{"Binlog_cache_use", (char*) &binlog_cache_use, SHOW_LONG},
92
+ {"Build_ccflags", (char*) build_ccflags_string, SHOW_CHAR},
93
+ {"Build_configure", (char*) build_configure_string, SHOW_CHAR},
94
{"Bytes_received", (char*) offsetof(STATUS_VAR, bytes_received), SHOW_LONGLONG_STATUS},
95
{"Bytes_sent", (char*) offsetof(STATUS_VAR, bytes_sent), SHOW_LONGLONG_STATUS},
96
{"Com", (char*) com_status_vars, SHOW_ARRAY},
97
@@ -7337,6 +7349,19 @@
98
{NullS, NullS, SHOW_LONG}
102
+static void print_ccflags(void)
104
+ printf("%s\n", build_ccflags_string);
108
+static void print_configure(void)
110
+ printf("%s\n", build_configure_string);
114
static void print_version(void)
116
set_server_version();
117
@@ -7697,6 +7722,12 @@
120
#include <sslopt-case.h>
121
+ case (int) OPT_SHOW_CCFLAGS:
124
+ case (int) OPT_SHOW_CONFIGURE:
131
=== added file 'sql/mysqld.pc.in'
132
--- sql/mysqld.pc.in 1970-01-01 00:00:00 +0000
133
+++ sql/mysqld.pc.in 2008-10-17 18:17:18 +0000
135
+# MySQL Storage Engines need this info
137
+exec_prefix= @exec_prefix@
139
+includedir= @includedir@
140
+pkglibdir= ${libdir}/@PACKAGE@
141
+pkguncludedir= ${includedir}/@PACKAGE@
142
+pkgplugindir= ${pkglibdir}/plugin
145
+Description: MySQL Server (@COMPILATION_COMMENT@)
147
+URL: http://www.mysql.com/
150
+Cflags: @CPPFLAGS@ @CXXFLAGS@
152
=== modified file 'sql/sql_builtin.cc.in'
153
--- sql/sql_builtin.cc.in 2006-12-31 01:29:11 +0000
154
+++ sql/sql_builtin.cc.in 2008-10-17 18:43:26 +0000
156
builtin_binlog_plugin@mysql_plugin_defs@,(struct st_mysql_plugin *)0
159
+#define DEFINE_BUILD(name,value) \
160
+const char build_ ## name ## _string[] = #value
162
+extern "C" DEFINE_BUILD(ccflags,@CPPFLAGS@ @CXXFLAGS@);
163
+extern "C" DEFINE_BUILD(configure,@CONF_COMMAND@);