Author: Daniel Rus Morales <danirus@tol-project.org>
Description: Linking with libodbcinst.so to resolv some symbols.
--- a/ODBC.m4
+++ b/ODBC.m4
@@ -31,7 +31,7 @@
 #		CXX	Command to use for the compiler
 #------------------------------------------------------------------------
 
-AC_DEFUN(TCLODBC_ENABLE_GXX, [
+AC_DEFUN([TCLODBC_ENABLE_GXX], [
     AC_ARG_ENABLE(gxx, [  --enable-gxx		allow use of g++ if available [--disable-gxx]], [ok=$enableval], [ok=no])
     if test "$ok" = "yes"; then
 	CXX=g++
@@ -63,7 +63,7 @@
 
 dnl the alternative search directory is invoked by --with-odbcinclude
 dnl and --with-odbclibrary
-AC_DEFUN(TCLODBC_PATH_ODBC, [
+AC_DEFUN([TCLODBC_PATH_ODBC], [
     if test "${TEA_PLATFORM}" = "windows" ; then
 	TEA_ADD_INCLUDES([])
 	TEA_ADD_LIBS([odbc32.lib odbccp32.lib])
@@ -77,7 +77,7 @@
 
 dnl Find the ODBC headers. This code may not work for certain
 dnl intallations.
-AC_DEFUN(TCLODBC_PATH_ODBCH, [
+AC_DEFUN([TCLODBC_PATH_ODBCH], [
     dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
     no_odbc=true
     ac_cv_c_odbch=""
@@ -220,7 +220,7 @@
 
 dnl Find the ODBC library. This code may not work for certain
 dnl intallations.
-AC_DEFUN(TCLODBC_PATH_ODBCLIB, [
+AC_DEFUN([TCLODBC_PATH_ODBCLIB], [
     dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
     no_odbc=true
     ac_cv_c_odbc_libdir=""
@@ -335,6 +335,7 @@
 	AC_MSG_RESULT(Using UnixODBC driver)
 	AC_DEFINE(HAVE_UNIXODBC)
 	AC_DEFINE(DONT_TD_VOID)
+	ODBC_LIB="${ODBC_LIB} -lodbcinst"
     fi
 
     if test x"${ODBCTYPE}" = xintersolv ; then
