summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2013-02-11 14:23:16 +0100
committermanuel <manuel@mausz.at>2013-02-11 14:23:16 +0100
commitbcff4f2e3520eaf170c282ba03d38ba6a4fa95cf (patch)
treeae902d4d88bae4611f2391fd800cbdbc5a6a0b50 /m4
downloadmysql-table_sizes-bcff4f2e3520eaf170c282ba03d38ba6a4fa95cf.tar.gz
mysql-table_sizes-bcff4f2e3520eaf170c282ba03d38ba6a4fa95cf.tar.bz2
mysql-table_sizes-bcff4f2e3520eaf170c282ba03d38ba6a4fa95cf.zip
initial import
Diffstat (limited to 'm4')
-rw-r--r--m4/ac_mysql.m4102
1 files changed, 102 insertions, 0 deletions
diff --git a/m4/ac_mysql.m4 b/m4/ac_mysql.m4
new file mode 100644
index 0000000..7a3d484
--- /dev/null
+++ b/m4/ac_mysql.m4
@@ -0,0 +1,102 @@
1dnl ---------------------------------------------------------------------------
2dnl Macro: MYSQL_SRC_TEST
3dnl ---------------------------------------------------------------------------
4
5dir_resolve() dnl {{{
6{
7 pwd=`pwd`
8 cd "$1" 2>/dev/null || cd "${pwd}/${1}" 2>/dev/null
9 if test "$?" = "0"
10 then
11 echo `pwd -P`
12 else
13 echo "$1"
14 fi
15}
16dnl }}}
17
18AC_DEFUN([MYSQL_SRC_TEST], [
19 AC_MSG_CHECKING(for mysql source code)
20 AC_ARG_WITH(mysql,
21 [AS_HELP_STRING([--with-mysql=PATH], [MySQL src directory required to build.])],
22 [
23 ac_mysql_source_dir=`readlink -e "$withval"`
24 HEADERS="include/my_dir.h include/mysql/plugin.h include/mysql.h include/mysql_version.h include/config.h include/my_config.h"
25 for file in $HEADERS
26 do
27 if ! test -r "$ac_mysql_source_dir/$file"
28 then
29 AC_MSG_ERROR([Failed to find required header file $ac_mysql_source_dir/$file, check the path and make sure you've run './configure ..<options>.. && cd include && make' in MySQL 5.1 sources dir or 'cmake . && make' in MySQL 5.5 sources dir.])
30 fi
31 done
32 AC_DEFINE([MYSQL_SRC], [1], [Source directory for MySQL])
33 MYSQL_INC="-I$ac_mysql_source_dir/sql -I$ac_mysql_source_dir/include -I$ac_mysql_source_dir/regex -I$ac_mysql_source_dir"
34 AC_MSG_RESULT(["$ac_mysql_source_dir"])
35 ],
36 [
37 AC_MSG_ERROR(["No mysql source provided. Please specify --with-mysql=<mysql source dir>!"])
38 ]
39 )
40])
41
42dnl ---------------------------------------------------------------------------
43dnl Macro: MYSQL_PLUGIN_DIR_TEST
44dnl ---------------------------------------------------------------------------
45
46AC_DEFUN([MYSQL_PLUGIN_DIR_TEST], [
47 AC_MSG_CHECKING([for mysql plugin dir])
48 ac_mysql_plugin_dir=
49 AC_ARG_WITH([mysql-plugindir],
50 [AS_HELP_STRING([--with-mysql-plugindir=PATH], [MySQL plugin directory where plugin is to be copied to])],
51 [
52 ac_mysql_plugin_dir=`readlink -e "$withval"`
53 if test -d "$ac_mysql_plugin_dir"
54 then
55 MYSQL_PLUGIN_DIR="$ac_mysql_plugin_dir"
56 AC_MSG_RESULT([yes: Using $ac_mysql_plugin_dir])
57 else
58 AC_MSG_ERROR([invalid MySQL plugin directory : $ac_mysql_plugin_dir])
59 fi
60 ],
61 [
62 ac_mysql_plugin_dir="/usr/lib/mysql/plugin"
63 MYSQL_PLUGIN_DIR="$ac_mysql_plugin_dir"
64 AC_MSG_RESULT([--with-mysql-plugindir was not set. Using $ac_mysql_plugin_dir])
65 ]
66 )
67])
68
69dnl ---------------------------------------------------------------------------
70dnl Macro: MYSQL_LIB_SERVICES : 5.5 services lib to add to linker
71dnl ---------------------------------------------------------------------------
72
73dnl AC_DEFUN([MYSQL_LIB_SERVICES_TEST], [
74dnl AC_MSG_CHECKING([for mysql libmysqlservices])
75dnl ac_mysql_libservices=
76dnl AC_ARG_WITH([mysql-libservices],
77dnl [AS_HELP_STRING([--with-mysql-libservices=PATH], [MySQL libmysqlservices.a location (relevant for 5.5 only)])],
78dnl [
79dnl ac_mysql_libservices=`readlink -e "$withval"`
80dnl if test -f "$ac_mysql_libservices"
81dnl then
82dnl MYSQL_LIBSERVICES="$ac_mysql_libservices"
83dnl AC_MSG_RESULT([yes: Using $ac_mysql_libservices])
84dnl else
85dnl AC_MSG_ERROR([invalid MySQL libmysqlservices : $ac_mysql_libservices])
86dnl fi
87dnl ],
88dnl [
89dnl if test -f "$ac_mysql_source_dir/VERSION"
90dnl then
91dnl source "$ac_mysql_source_dir/VERSION"
92dnl if test "$MYSQL_VERSION_MAJOR.$MYSQL_VERSION_MINOR" = "5.5"
93dnl then
94dnl AC_MSG_ERROR([no mysql-libservices. Required for MySQL 5.5])
95dnl fi
96dnl fi
97dnl ac_mysql_libservices=""
98dnl MYSQL_LIBSERVICES="$ac_mysql_libservices"
99dnl AC_MSG_RESULT([--with-mysql-libservices was not set.])
100dnl ]
101dnl )
102dnl ])