From 726fe8711f44b5dc1ca98afda4038f3177c657be Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 20 Jan 2022 04:31:21 +0200 Subject: [PATCH 44/44] Fix fcdb-odbc build on non-Windows platforms Compile fixed by backporting a commit from luasql development version. Linking fixes by myself. This fixes just errors. Compile gives still warnings. See osdn #43661 Signed-off-by: Marko Lindqvist --- configure.ac | 2 +- dependencies/luasql/src/ls_odbc.c | 2 +- m4/fcdb-odbc.m4 | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 4a10b1a5ec..7922420943 100644 --- a/configure.ac +++ b/configure.ac @@ -1650,7 +1650,7 @@ if test x$enable_fcdb = xyes ; then LUASQL_LIBS="$LUASQL_LIBS \$(top_builddir)/dependencies/luasql/src/libluasql_sqlite3.la" fi LUASQL_AS_DEPENDENCY="$LUASQL_LIBS" - LUASQL_LIBS="$LUASQL_LIBS $FCDB_MYSQL_LIBS $FCDB_POSTGRES_LIBS $FCDB_SQLITE3_LIBS" + LUASQL_LIBS="$LUASQL_LIBS $FCDB_MYSQL_LIBS $FCDB_POSTGRES_LIBS $FCDB_SQLITE3_LIBS $FCDB_ODBC_LIBS" AC_SUBST([LUASQL_CFLAGS]) AC_SUBST([LUASQL_LIBS]) diff --git a/dependencies/luasql/src/ls_odbc.c b/dependencies/luasql/src/ls_odbc.c index 5d441056c0..325ba0c490 100644 --- a/dependencies/luasql/src/ls_odbc.c +++ b/dependencies/luasql/src/ls_odbc.c @@ -16,7 +16,7 @@ #include #elif defined(INFORMIX) #include "infxcli.h" -#elif defined(UNIXODBC) +#else #include "sql.h" #include "sqltypes.h" #include "sqlext.h" diff --git a/m4/fcdb-odbc.m4 b/m4/fcdb-odbc.m4 index 5d52bd29ba..c106ae54c6 100644 --- a/m4/fcdb-odbc.m4 +++ b/m4/fcdb-odbc.m4 @@ -9,7 +9,8 @@ AC_DEFUN([FC_FCDB_ODBC], AC_CHECK_LIB([odbc], [SQLConnect], [AC_CHECK_HEADERS( [sql.h sqltypes.h sqlext.h], - [AC_DEFINE([HAVE_FCDB_ODBC], [1], [Have ODBC database backend]) + [FCDB_ODBC_LIBS="-lodbc" + AC_DEFINE([HAVE_FCDB_ODBC], [1], [Have ODBC database backend]) found_odbc=yes])]) if test "x$found_odbc" != "xyes" ; then -- 2.34.1