Index: ODBC.m4 =================================================================== RCS file: /cvsroot/tclodbc/tclodbc/ODBC.m4,v retrieving revision 1.7 diff -u -p -u -p -r1.7 ODBC.m4 --- ODBC.m4 19 Mar 2004 20:32:21 -0000 1.7 +++ ODBC.m4 18 May 2004 11:47:26 -0000 @@ -102,46 +102,6 @@ AC_DEFUN(TCLODBC_PATH_ODBCH, [ fi dnl =============================== - dnl unixODBC or Intersolv... I have tested this - dnl =============================== - dnl Check for unixODBC headers - if test x"${ac_cv_c_odbch}" = x ; then - for i in \ - /opt/odbc/include \ - /opt/ODBC/include \ - ${prefix}/include/odbc \ - ${prefix}/include/ODBC \ - /opt/unixodbc/include \ - /opt/unixODBC/include \ - ${prefix}/include/unixodbc \ - ${prefix}/include/unixODBC \ - /usr/local/mysql/include \ - /usr/local/include \ - /usr/include \ - ${prefix}/include ; do - if test -f "$i/sql.h"; then - ac_cv_c_odbch=`(cd $i; pwd)` - ODBCTYPE=unixODBC - fi - done - fi - - dnl see if one is installed - if test x"${ac_cv_c_odbch}" = x ; then - AC_CHECK_HEADER(sql.h, ac_cv_c_odbch=installed, ac_cv_c_odbch="") - if test x"${ac_cv_c_odbch}" != x ; then - ODBCTYPE=unixODBC - fi - fi - - dnl Figure out whether this is unixODBC or Intersolv - if test x"${ODBCTYPE}" = xunixODBC ; then - if test -f "${ac_cv_c_odbch}/odbcver.h" ; then - ODBCTYPE=intersolv - fi - fi - - dnl =============================== dnl IODBC... I have not tested this a whole lot dnl =============================== dnl Check in the source tree @@ -159,6 +119,8 @@ AC_DEFUN(TCLODBC_PATH_ODBCH, [ /usr/local/include/iodbc \ /usr/local/share/iodbc \ ${prefix}/include/iodbc \ + /usr/local/include \ + /usr/include \ ${prefix}/include ; do if test -f $i/isql.h; then ac_cv_c_odbch=`(cd $i; pwd)` @@ -186,6 +148,46 @@ AC_DEFUN(TCLODBC_PATH_ODBCH, [ fi fi + dnl =============================== + dnl unixODBC or Intersolv... I have tested this + dnl =============================== + dnl Check for unixODBC headers + if test x"${ac_cv_c_odbch}" = x ; then + for i in \ + /opt/odbc/include \ + /opt/ODBC/include \ + ${prefix}/include/odbc \ + ${prefix}/include/ODBC \ + /opt/unixodbc/include \ + /opt/unixODBC/include \ + ${prefix}/include/unixodbc \ + ${prefix}/include/unixODBC \ + /usr/local/mysql/include \ + /usr/local/include \ + /usr/include \ + ${prefix}/include ; do + if test -f "$i/sql.h"; then + ac_cv_c_odbch=`(cd $i; pwd)` + ODBCTYPE=unixODBC + fi + done + fi + + dnl see if one is installed + if test x"${ac_cv_c_odbch}" = x ; then + AC_CHECK_HEADER(sql.h, ac_cv_c_odbch=installed, ac_cv_c_odbch="") + if test x"${ac_cv_c_odbch}" != x ; then + ODBCTYPE=unixODBC + fi + fi + + dnl Figure out whether this is unixODBC or Intersolv + if test x"${ODBCTYPE}" = xunixODBC ; then + if test -f "${ac_cv_c_odbch}/odbcver.h" ; then + ODBCTYPE=intersolv + fi + fi + ODBC_INCLUDE_DIR="" if test x"${ac_cv_c_odbch}" = x ; then AC_MSG_ERROR([Cannot find any ODBC headers]) @@ -250,7 +252,7 @@ AC_DEFUN(TCLODBC_PATH_ODBCLIB, [ if test x"${ODBCTYPE}" = xiodbc ; then liblist="libpsqlodbc libmysqlodbc librbodbc libiodbc iodbc" libpathlist="/usr/local/lib/iodbc ${prefix}/iodbc/lib \ - ${prefix}/lib/iodbc /usr/local/mysql/lib /usr/local/lib ${prefix}/lib" + ${prefix}/lib/iodbc /usr/local/mysql/lib /usr/local/lib /usr/lib ${prefix}/lib" elif test x"${ODBCTYPE}" = xunixODBC ; then liblist="libodbc" libpathlist="/opt/unixodbc/lib /opt/unixODBC/lib /usr/include/odbc \ @@ -326,6 +328,7 @@ AC_DEFUN(TCLODBC_PATH_ODBCLIB, [ if test x"${ODBCTYPE}" = xiodbc ; then AC_MSG_RESULT(Using IODBC driver) AC_DEFINE(HAVE_IODBC) + ODBC_LIB="$ODBC_LIB -liodbcinst" fi if test x"${ODBCTYPE}" = xunixODBC ; then Index: tclodbc.hxx =================================================================== RCS file: /cvsroot/tclodbc/tclodbc/tclodbc.hxx,v retrieving revision 1.4 diff -u -p -u -p -r1.4 tclodbc.hxx --- tclodbc.hxx 20 Mar 2004 22:14:19 -0000 1.4 +++ tclodbc.hxx 18 May 2004 11:47:26 -0000 @@ -110,7 +110,9 @@ extern "C" { #ifdef HAVE_UNIXODBC #define INCLUDE_EXTENSIONS // Uncomment this if odbc extensions available #endif -//#define INCLUDE_EXTENSIONS // Uncomment this if odbc extensions available +#ifdef HAVE_IODBC +#define INCLUDE_EXTENSIONS // Uncomment this if odbc extensions available +#endif #endif #include "tclobj.hxx" @@ -128,8 +130,7 @@ extern "C" { /* iODBC 2.12 */ #include #include -#include -#include +#include #else #include #include