diff options
Diffstat (limited to 'storage/vp/configure.in')
-rw-r--r-- | storage/vp/configure.in | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/storage/vp/configure.in b/storage/vp/configure.in new file mode 100644 index 00000000000..b67c5513f16 --- /dev/null +++ b/storage/vp/configure.in @@ -0,0 +1,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 |