mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
95 lines
2.6 KiB
Text
95 lines
2.6 KiB
Text
AC_INIT([spider_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
|
|
SPD_MYSQL_INC="$withval/"
|
|
AC_MSG_RESULT([yes])
|
|
plugin_spider_shared_target=""
|
|
AC_SUBST(plugin_spider_shared_target)
|
|
plugin_spider_static_target=""
|
|
AC_SUBST(plugin_spider_static_target)
|
|
PLUGIN_SPIDER_LTLIBRARIES_TARGET="ha_spider.la"
|
|
AC_SUBST(PLUGIN_SPIDER_LTLIBRARIES_TARGET)
|
|
PLUGIN_SPIDER_LIBRARIES_TARGET="libspider.a"
|
|
AC_SUBST(PLUGIN_SPIDER_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
|
|
SPD_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(SPD_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
|