mirror of
https://github.com/haiwen/ccnet-server.git
synced 2025-08-31 12:26:45 +00:00
Enabled msyql on windows.
This commit is contained in:
81
configure.ac
81
configure.ac
@@ -208,7 +208,7 @@ AC_SUBST(LIBEVENT_LIBS)
|
|||||||
|
|
||||||
if test x${compile_python} = xyes; then
|
if test x${compile_python} = xyes; then
|
||||||
AM_PATH_PYTHON([2.6])
|
AM_PATH_PYTHON([2.6])
|
||||||
if test "$bwin32" = true; then
|
if test "$bwin32" = "true"; then
|
||||||
if test x$PYTHON_DIR != x; then
|
if test x$PYTHON_DIR != x; then
|
||||||
# set pyexecdir to somewhere like /c/Python26/Lib/site-packages
|
# set pyexecdir to somewhere like /c/Python26/Lib/site-packages
|
||||||
pyexecdir=${PYTHON_DIR}/Lib/site-packages
|
pyexecdir=${PYTHON_DIR}/Lib/site-packages
|
||||||
@@ -220,54 +220,63 @@ if test x${compile_python} = xyes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mysql="yes"
|
mysql="yes"
|
||||||
check_mysql_config()
|
if test "$bwin32" != "true"; then
|
||||||
{
|
AC_MSG_CHECKING(for mysql in unix)
|
||||||
|
check_mysql_config()
|
||||||
|
{
|
||||||
AC_PATH_PROG([MYSQLCONFIG], [mysql_config], [no], [$PATH:/usr/local/bin:/usr/local/mysql/bin])
|
AC_PATH_PROG([MYSQLCONFIG], [mysql_config], [no], [$PATH:/usr/local/bin:/usr/local/mysql/bin])
|
||||||
if test "x$MYSQLCONFIG" = "xno"
|
if test "x$MYSQLCONFIG" = "xno"
|
||||||
then
|
then
|
||||||
AC_MSG_WARN([mysql_config is required to build seafile server with mysql])
|
AC_MSG_WARN([mysql_config is required to build seafile server with mysql])
|
||||||
mysql="no"
|
mysql="no"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
AC_MSG_CHECKING(for mysql)
|
AC_ARG_WITH([mysql],
|
||||||
AC_ARG_WITH([mysql],
|
AS_HELP_STRING([--with-mysql(=<path>)],
|
||||||
AS_HELP_STRING([--with-mysql(=<path>)],
|
[Path is optional and if given should specify the full path to the MySQL
|
||||||
[Path is optional and if given should specify the full path to the MySQL
|
configure script, mysql_config. E.g. --with-mysql=/<path>/mysql_config]),
|
||||||
configure script, mysql_config. E.g. --with-mysql=/<path>/mysql_config]),
|
[
|
||||||
[
|
if test "xno" = "x$with_mysql"; then
|
||||||
if test "xno" = "x$with_mysql"; then
|
AC_MSG_RESULT([no])
|
||||||
AC_MSG_RESULT([no])
|
mysql="no"
|
||||||
mysql="no"
|
else
|
||||||
else
|
AC_MSG_RESULT([yes])
|
||||||
AC_MSG_RESULT([yes])
|
AC_CHECK_FILE([$with_mysql], [MYSQLCONFIG=$with_mysql], [check_mysql_config])
|
||||||
AC_CHECK_FILE([$with_mysql], [MYSQLCONFIG=$with_mysql], [check_mysql_config])
|
fi
|
||||||
fi
|
],
|
||||||
],
|
[
|
||||||
[
|
AC_MSG_RESULT([yes])
|
||||||
AC_MSG_RESULT([yes])
|
check_mysql_config
|
||||||
check_mysql_config
|
])
|
||||||
])
|
if test "xyes" = "x$mysql"; then
|
||||||
if test "xyes" = "x$mysql"; then
|
|
||||||
tmp_CPPFLAGS=$CPPFLAGS
|
tmp_CPPFLAGS=$CPPFLAGS
|
||||||
tmp_LDFLAGS=$LDFLAGS
|
tmp_LDFLAGS=$LDFLAGS
|
||||||
CPPFLAGS="`$MYSQLCONFIG --include` $CPPFLAGS"
|
CPPFLAGS="`$MYSQLCONFIG --include` $CPPFLAGS"
|
||||||
LDFLAGS="`$MYSQLCONFIG --libs` $LDFLAGS"
|
LDFLAGS="`$MYSQLCONFIG --libs` $LDFLAGS"
|
||||||
AC_CHECK_HEADERS([mysql.h], [], [mysql="no"])
|
AC_CHECK_HEADERS([mysql.h], [], [mysql="no"])
|
||||||
if test "xyes" = "x$mysql"; then
|
if test "xyes" = "x$mysql"; then
|
||||||
echo "found mysql client library"
|
echo "found mysql client library"
|
||||||
MYSQL_CFLAGS=`$MYSQLCONFIG --include`
|
MYSQL_CFLAGS=`$MYSQLCONFIG --include`
|
||||||
MYSQL_LIBS=`$MYSQLCONFIG --libs`
|
MYSQL_LIBS=`$MYSQLCONFIG --libs`
|
||||||
AC_SUBST(MYSQL_CFLAGS)
|
AC_SUBST(MYSQL_CFLAGS)
|
||||||
AC_SUBST(MYSQL_LIBS)
|
AC_SUBST(MYSQL_LIBS)
|
||||||
AC_DEFINE([HAVE_MYSQL], 1, [Define to 1 to enable mysql])
|
AC_DEFINE([HAVE_MYSQL], 1, [Define to 1 to enable mysql])
|
||||||
fi
|
fi
|
||||||
CPPFLAGS=$tmp_CPPFLAGS
|
CPPFLAGS=$tmp_CPPFLAGS
|
||||||
LDFLAGS=$tmp_LDFLAGS
|
LDFLAGS=$tmp_LDFLAGS
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_MSG_CHECKING(for mysql in windows)
|
||||||
|
AC_CHECK_HEADERS([mysql.h], [], [mysql="no"])
|
||||||
|
if test "xyes" = "x$mysql"; then
|
||||||
|
AC_DEFINE([HAVE_MYSQL], 1, [Define to 1 to enable mysql])
|
||||||
|
LDFLAGS="$LDFLAGS -lmysql -lws2_32"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL([WITH_MYSQL], test "xyes" = "x$mysql")
|
AM_CONDITIONAL([WITH_MYSQL], test "xyes" = "x$mysql")
|
||||||
|
|
||||||
postgresql="yes"
|
postgresql="yes"
|
||||||
check_postgres_config()
|
check_postgres_config()
|
||||||
{
|
{
|
||||||
AC_PATH_PROG([PGCONFIG], [pg_config], [no], [$PATH:/usr/local/bin:/usr/local/pgsql/bin])
|
AC_PATH_PROG([PGCONFIG], [pg_config], [no], [$PATH:/usr/local/bin:/usr/local/pgsql/bin])
|
||||||
if test "x$PGCONFIG" = "xno"
|
if test "x$PGCONFIG" = "xno"
|
||||||
@@ -277,10 +286,10 @@ check_postgres_config()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
AC_MSG_CHECKING(for postgresql)
|
AC_MSG_CHECKING(for postgresql)
|
||||||
AC_ARG_WITH([postgresql],
|
AC_ARG_WITH([postgresql],
|
||||||
AS_HELP_STRING([--with-postgresql(=<path>)],
|
AS_HELP_STRING([--with-postgresql(=<path>)],
|
||||||
[Path is optional and if given should specify the full path to the PostgreSQL
|
[Path is optional and if given should specify the full path to the PostgreSQL
|
||||||
configure script, pg_config. E.g. --with-postgresql=/<path>/pg_config]),
|
configure script, pg_config. E.g. --with-postgresql=/<path>/pg_config]),
|
||||||
[
|
[
|
||||||
if test "xno" = "x$with_postgresql"; then
|
if test "xno" = "x$with_postgresql"; then
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
|
Reference in New Issue
Block a user