From f5f4e9e4a918e932f559b2af8aed4d5bdb7a9c46 Mon Sep 17 00:00:00 2001 From: Shuai Lin Date: Fri, 23 Dec 2016 18:07:47 +0800 Subject: [PATCH 1/3] Fixed ldap on msys2. --- net/server/user-mgr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/server/user-mgr.c b/net/server/user-mgr.c index e967a97..0ae9d00 100644 --- a/net/server/user-mgr.c +++ b/net/server/user-mgr.c @@ -25,6 +25,10 @@ #include #else #include + #include + #ifndef LDAP_OPT_SUCCESS + #define LDAP_OPT_SUCCESS LDAP_SUCCESS + #endif #endif #endif @@ -1557,7 +1561,7 @@ ccnet_user_manager_filter_emailusers_by_emails(CcnetUserManager *manager, g_free (copy); g_string_free (sql, TRUE); - + return g_list_reverse (ret); } #endif From d0f0ce7125521e0ada4873cff1ff7a9fc194692f Mon Sep 17 00:00:00 2001 From: Shuai Lin Date: Fri, 23 Dec 2016 23:31:36 +0800 Subject: [PATCH 2/3] Improved python installation on win32. --- configure.ac | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 5235d5f..12b0277 100644 --- a/configure.ac +++ b/configure.ac @@ -207,17 +207,16 @@ AC_SUBST(LIBEVENT_CFLAGS) AC_SUBST(LIBEVENT_LIBS) if test x${compile_python} = xyes; then - AM_PATH_PYTHON([2.6]) - - if test "$bwin32" = true; then - # set pyexecdir to somewhere like /c/Python26/Lib/site-packages - pyexecdir=${PYTHON_DIR}/Lib/site-packages - pythondir=${pyexecdir} - pkgpyexecdir=${pyexecdir}/${PACKAGE} - pkgpythondir=${pythondir}/${PACKAGE} - - fi # end for bwin32 - + AM_PATH_PYTHON([2.6]) + if test "$bwin32" = true; then + if test x$PYTHON_DIR != x; then + # set pyexecdir to somewhere like /c/Python26/Lib/site-packages + pyexecdir=${PYTHON_DIR}/Lib/site-packages + pythondir=${pyexecdir} + pkgpyexecdir=${pyexecdir}/${PACKAGE} + pkgpythondir=${pythondir}/${PACKAGE} + fi + fi fi mysql="yes" From 1e979d70ebf5c32241459cec17315c4753d5fc97 Mon Sep 17 00:00:00 2001 From: Shuai Lin Date: Tue, 27 Dec 2016 15:04:37 +0800 Subject: [PATCH 3/3] Enabled msyql on windows. --- configure.ac | 81 +++++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/configure.ac b/configure.ac index 12b0277..7d599f7 100644 --- a/configure.ac +++ b/configure.ac @@ -208,7 +208,7 @@ AC_SUBST(LIBEVENT_LIBS) if test x${compile_python} = xyes; then AM_PATH_PYTHON([2.6]) - if test "$bwin32" = true; then + if test "$bwin32" = "true"; then if test x$PYTHON_DIR != x; then # set pyexecdir to somewhere like /c/Python26/Lib/site-packages pyexecdir=${PYTHON_DIR}/Lib/site-packages @@ -220,54 +220,63 @@ if test x${compile_python} = xyes; then fi 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]) - if test "x$MYSQLCONFIG" = "xno" + if test "x$MYSQLCONFIG" = "xno" then - AC_MSG_WARN([mysql_config is required to build seafile server with mysql]) - mysql="no" + AC_MSG_WARN([mysql_config is required to build seafile server with mysql]) + mysql="no" fi -} -AC_MSG_CHECKING(for mysql) -AC_ARG_WITH([mysql], - AS_HELP_STRING([--with-mysql(=)], - [Path is optional and if given should specify the full path to the MySQL - configure script, mysql_config. E.g. --with-mysql=//mysql_config]), - [ - if test "xno" = "x$with_mysql"; then - AC_MSG_RESULT([no]) - mysql="no" - else - AC_MSG_RESULT([yes]) - AC_CHECK_FILE([$with_mysql], [MYSQLCONFIG=$with_mysql], [check_mysql_config]) - fi - ], - [ - AC_MSG_RESULT([yes]) - check_mysql_config - ]) -if test "xyes" = "x$mysql"; then + } + AC_ARG_WITH([mysql], + AS_HELP_STRING([--with-mysql(=)], + [Path is optional and if given should specify the full path to the MySQL + configure script, mysql_config. E.g. --with-mysql=//mysql_config]), + [ + if test "xno" = "x$with_mysql"; then + AC_MSG_RESULT([no]) + mysql="no" + else + AC_MSG_RESULT([yes]) + AC_CHECK_FILE([$with_mysql], [MYSQLCONFIG=$with_mysql], [check_mysql_config]) + fi + ], + [ + AC_MSG_RESULT([yes]) + check_mysql_config + ]) + if test "xyes" = "x$mysql"; then tmp_CPPFLAGS=$CPPFLAGS tmp_LDFLAGS=$LDFLAGS CPPFLAGS="`$MYSQLCONFIG --include` $CPPFLAGS" LDFLAGS="`$MYSQLCONFIG --libs` $LDFLAGS" AC_CHECK_HEADERS([mysql.h], [], [mysql="no"]) if test "xyes" = "x$mysql"; then - echo "found mysql client library" - MYSQL_CFLAGS=`$MYSQLCONFIG --include` - MYSQL_LIBS=`$MYSQLCONFIG --libs` - AC_SUBST(MYSQL_CFLAGS) - AC_SUBST(MYSQL_LIBS) - AC_DEFINE([HAVE_MYSQL], 1, [Define to 1 to enable mysql]) + echo "found mysql client library" + MYSQL_CFLAGS=`$MYSQLCONFIG --include` + MYSQL_LIBS=`$MYSQLCONFIG --libs` + AC_SUBST(MYSQL_CFLAGS) + AC_SUBST(MYSQL_LIBS) + AC_DEFINE([HAVE_MYSQL], 1, [Define to 1 to enable mysql]) fi CPPFLAGS=$tmp_CPPFLAGS 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 AM_CONDITIONAL([WITH_MYSQL], test "xyes" = "x$mysql") postgresql="yes" -check_postgres_config() +check_postgres_config() { AC_PATH_PROG([PGCONFIG], [pg_config], [no], [$PATH:/usr/local/bin:/usr/local/pgsql/bin]) if test "x$PGCONFIG" = "xno" @@ -277,10 +286,10 @@ check_postgres_config() fi } AC_MSG_CHECKING(for postgresql) -AC_ARG_WITH([postgresql], - AS_HELP_STRING([--with-postgresql(=)], +AC_ARG_WITH([postgresql], + AS_HELP_STRING([--with-postgresql(=)], [Path is optional and if given should specify the full path to the PostgreSQL - configure script, pg_config. E.g. --with-postgresql=//pg_config]), + configure script, pg_config. E.g. --with-postgresql=//pg_config]), [ if test "xno" = "x$with_postgresql"; then AC_MSG_RESULT([no])