@ -90,6 +90,43 @@ dnl *** Show that we are doing as requested. ***
AC_MSG_NOTICE([Not attempting to configure MySQL as requested])
fi
if test "$compile_mysql_plugin" = "yes"; then
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -I$mysql_incdir"
AC_MSG_CHECKING([if mysql has st_mysql struct])
AC_TRY_COMPILE(
[
#include <mysql.h>
typedef struct st_mysql MYSQL;
],
[],
AC_MSG_RESULT( yes )
mysql_struct=st_mysql,
AC_MSG_RESULT( no )
[
AC_MSG_CHECKING([if mysql has MYSQL struct])
AC_TRY_COMPILE(
[
#include <mysql.h>
typedef struct MYSQL MYSQL;
],
[],
AC_MSG_RESULT( yes )
mysql_struct=MYSQL,
AC_MSG_RESULT( no )
compile_mysql_plugin=no
)
]
)
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_RESTORE
fi
AC_DEFINE_UNQUOTED(MYSQL_STRUCT, $mysql_struct, [struct type name for MySql])
AM_CONDITIONAL(compile_mysql_plugin, test "$compile_mysql_plugin" = "yes")
dnl ========================================