-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
95 lines (85 loc) · 2.54 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
AC_INIT([vp_engine], [1.0], [kentokushiba@gmail.com])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_TYPE_SIZE_T
AC_DEFUN([MYSQL_PATH_TEST],[
AC_MSG_CHECKING([mysql source path])
AC_ARG_WITH([mysql],
[AS_HELP_STRING([--with-mysql=PATH],[mysql source directory PATH])],
[
if test \
-f $withval/include/mysql/plugin.h -a \
-f $withval/include/mysql.h -a \
-f $withval/include/errmsg.h -a \
\( -f $withval/sql/mysql_priv.h -o -f $withval/sql/sql_priv.h \) ;
then
MYSQL_INC="$withval/"
AC_MSG_RESULT([yes])
plugin_vp_shared_target=""
AC_SUBST(plugin_vp_shared_target)
plugin_vp_static_target=""
AC_SUBST(plugin_vp_static_target)
PLUGIN_VP_LTLIBRARIES_TARGET="ha_vp.la"
AC_SUBST(PLUGIN_VP_LTLIBRARIES_TARGET)
PLUGIN_VP_LIBRARIES_TARGET="libvp.a"
AC_SUBST(PLUGIN_VP_LIBRARIES_TARGET)
LIBTOOL="$LIBTOOL --preserve-dup-deps"
AC_SUBST(LIBTOOL)
else
AC_MSG_ERROR([Can't find header files. Please check --with-mysql=PATH option])
fi
],
[
if test \
-f ../../include/mysql/plugin.h -a \
-f ../../include/mysql.h -a \
-f ../../include/errmsg.h -a \
\( -f ../../sql/mysql_priv.h -o ../../sql/sql_priv.h \) ;
then
MYSQL_INC="../../"
AC_MSG_RESULT([no])
else
AC_MSG_ERROR([Can't find header files. Please set --with-mysql=PATH option])
fi
]
)
])
MYSQL_PATH_TEST
AC_SUBST(MYSQL_INC)
AC_DEFUN([MYSQL_INCLUDE_PATH_TEST],[
AC_MSG_CHECKING([mysql include path])
AC_ARG_WITH([mysql-include],
[AS_HELP_STRING([--with-mysql-include=PATH],[mysql include directory PATH])],
[
if test \
-f $withval/mysql_version.h -a \
-f $withval/my_config.h ;
then
MYSQL_INCLUDE_PATH="-I $withval/"
AC_MSG_RESULT([yes])
else
AC_MSG_ERROR([Can't find "my_config.h". Please check --with-mysql-include=PATH option])
fi
],
[
if test \
-f ../../include/mysql_version.h -a \
-f ../../include/my_config.h ;
then
MYSQL_INCLUDE_PATH="-I ../../include/"
AC_MSG_RESULT([no])
else
AC_MSG_ERROR([Can't find "my_config.h". Please set --with-mysql-include=PATH option])
fi
]
)
])
MYSQL_INCLUDE_PATH_TEST
AC_SUBST(MYSQL_INCLUDE_PATH)
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
AC_CHECK_FUNCS([memset strchr strncasecmp])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT