aboutsummaryrefslogtreecommitdiff
path: root/externals/mysql/mysql_config
diff options
context:
space:
mode:
authorXanadu <none@none>2010-07-20 02:49:28 +0200
committerXanadu <none@none>2010-07-20 02:49:28 +0200
commit79622802f397258ee0f34327ba3ae6977ca3e7ff (patch)
tree1868946c234ab9ee256a6b7766a15713eae94235 /externals/mysql/mysql_config
parent7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff)
parentf906976837502fa5aa81b982b901d1509f5aa0c4 (diff)
Merge. Revision history for source files should be all back now.
--HG-- branch : trunk rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'externals/mysql/mysql_config')
-rw-r--r--externals/mysql/mysql_config/mysql_config.c103
1 files changed, 103 insertions, 0 deletions
diff --git a/externals/mysql/mysql_config/mysql_config.c b/externals/mysql/mysql_config/mysql_config.c
new file mode 100644
index 00000000000..d930868d39d
--- /dev/null
+++ b/externals/mysql/mysql_config/mysql_config.c
@@ -0,0 +1,103 @@
+/* Copyright (C) 2009 Sun Microsystems, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include <my_global.h>
+#include <my_sys.h>
+#include <my_getopt.h>
+#include <stdio.h>
+
+#define INCLUDE "-IC:/Program Files/libmysql/include"
+#define LIBS "-LC:/Program Files/libmysql/lib -lmysql" \
+ ""
+#define CFLAGS INCLUDE
+#define VERSION "6.0.2"
+
+enum options_client
+{
+ OPT_CFLAGS= 256,
+ OPT_INCLUDE,
+ OPT_LIBS,
+ OPT_LIBS_R,
+ OPT_VERSION,
+};
+
+static struct my_option my_long_options[]=
+{
+ {"cflags", OPT_CFLAGS, "[" CFLAGS "]",
+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
+ NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"include", OPT_INCLUDE, "[" INCLUDE "]",
+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"libs", OPT_LIBS, "[" LIBS "]",
+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"libs_r", OPT_LIBS_R, "[" LIBS "]",
+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"version", OPT_VERSION, "[" VERSION "]",
+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
+};
+
+
+void usage(void)
+{
+ puts("Copyright 2009 Sun Microsystems, Inc.");
+ puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
+ puts("Get compiler flags for using the MySQL client library.");
+ printf("Usage: %s [OPTIONS]\n", my_progname);
+ my_print_help(my_long_options);
+}
+
+
+my_bool
+get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
+ char *argument)
+{
+ switch (optid) {
+ case OPT_CFLAGS:
+ puts(CFLAGS);
+ break;
+ case OPT_INCLUDE:
+ puts(INCLUDE);
+ break;
+ case OPT_LIBS:
+ case OPT_LIBS_R:
+ puts(LIBS);
+ break;
+ case OPT_VERSION:
+ puts(VERSION);
+ break;
+ }
+
+ return 0;
+}
+
+
+int main(int ac, char **av)
+{
+ int error;
+ my_progname= av[0];
+
+ if (ac <= 1)
+ {
+ usage();
+ exit(1);
+ }
+
+ if ((error= handle_options(&ac, &av, my_long_options, get_one_option)))
+ exit(error);
+
+ exit(0);
+}