diff --git a/configure.in b/configure.in
index e374870b0a372eddf25d4eb70f933cb58da75282..1be4e7967f2efae854d5eacf54cc85c3ed92ad6b 100644
--- a/configure.in
+++ b/configure.in
@@ -396,6 +396,48 @@ then
 fi
 AC_SUBST(ODBCINSTDIR)
 
+#check for unixODBC
+
+use_unixODBC=no
+AC_ARG_WITH(unixODBC,
+[  --with-unixODBC[=DIR]   Use unixODBC located in DIR],
+[use_unixODBC=yes;unixODBC="$withval"],use_unixODBC=no)
+
+if test "x$use_unixODBC" = "xyes"
+then
+
+# default to /usr if not specified
+if test "x$unixODBC" = "x"
+then
+    unixODBC="/usr";
+fi
+
+AC_ARG_WITH(unixODBC-includes,
+    [  --with-unixODBC-includes=DIR Find unixODBC headers in DIR],
+    unixODBC_includes="$withval",unixODBC_includes="$unixODBC/include")
+
+    AC_ARG_WITH(unixODBC-libs,
+    [  --with-unixODBC-libs=DIR Find unixODBC libraries in DIR],
+    unixODBC_libs="$withval",unixODBC_libs="$unixODBC/lib")
+
+    CPPFLAGS="$CPPFLAGS -I$unixODBC_includes"
+    AC_CHECK_HEADERS(sql.h sqlext.h odbcinst.h,
+        unixODBC_ok=yes;odbc_headers="$odbc_headers $ac_hdr",unixODBC_ok=no; break)
+
+if test "x$unixODBC_ok" != "xyes"
+then
+    AC_MSG_ERROR([Unable to find the unixODBC headers in $1])
+fi
+
+save_LIBS="$LIBS"
+LIBS="-L$unixODBC_libs $LIBS"
+
+AC_CHECK_LIB(odbcinst,SQLGetPrivateProfileString,
+[AC_DEFINE(HAVE_SQLGETPRIVATEPROFILESTRING)
+LIBS="$LIBS -lodbcinst"],
+[LIBS="$save_LIBS"])
+fi
+
 dnl Unless we specify the command line options
 dnl	--enable cassert	to explicitly enable it
 dnl If you do not explicitly do it, it defaults to disabled
diff --git a/doc/TODO b/doc/TODO
index 3373059270f4d743b7757d0dc140bd98553cf9f9..5c177b0498ea332199c0f4d51461e02ff238811f 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -63,7 +63,7 @@ URGENT
 
 ADMIN
 
-* More access control over who can create tables and access the database
+* -More access control over who can create tables and use locks(Karal)
 * Test syslog functionality
 * Allow elog() to return error codes, not just messages
 * Allow international error message support and add error codes
diff --git a/src/include/config.h.in b/src/include/config.h.in
index 4b6e58cf8a36c2498f2d52e0780ecccfc99829d6..0d9131019046e91e5ded48b92a058bec0137f702 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -8,7 +8,7 @@
  * or in config.h afterwards.  Of course, if you edit config.h, then your
  * changes will be overwritten the next time you run configure.
  *
- * $Id: config.h.in,v 1.116 2000/06/04 15:06:32 petere Exp $
+ * $Id: config.h.in,v 1.117 2000/06/09 16:03:07 momjian Exp $
  */
 
 #ifndef CONFIG_H
@@ -305,6 +305,9 @@
  * Block of parameters for the ODBC code.
  */
 
+/* are we building against a libodbcinst */
+#undef HAVE_SQLGETPRIVATEPROFILESTRING
+
 /* Set to 1 if you have <pwd.h> */
 #undef HAVE_PWD_H
 
diff --git a/src/interfaces/odbc/dlg_specific.c b/src/interfaces/odbc/dlg_specific.c
index a6836563812e71f98bb69c25f4131c5fb9b4588b..ebe16c1c6e31d9225103e83f6e80f90894be98aa 100644
--- a/src/interfaces/odbc/dlg_specific.c
+++ b/src/interfaces/odbc/dlg_specific.c
@@ -23,8 +23,10 @@
 #ifndef WIN32
 #include <string.h>
 #include "gpps.h"
+#ifndef HAVE_SQLGETPRIVATEPROFILESTRING
 #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
 #define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d)
+#endif
 #ifndef HAVE_STRICMP
 #define stricmp(s1,s2)	strcasecmp(s1,s2)
 #define strnicmp(s1,s2,n)	strncasecmp(s1,s2,n)
diff --git a/src/interfaces/odbc/misc.h b/src/interfaces/odbc/misc.h
index ebe56ea9d80bf429b3682991216f7d03c00e9fc3..700e951e91725ceabe9182748a0f623758a430ac 100644
--- a/src/interfaces/odbc/misc.h
+++ b/src/interfaces/odbc/misc.h
@@ -15,9 +15,10 @@
 #endif
 
 #ifndef WIN32
-#include "gpps.h"
+#ifndef HAVE_SQLGETPRIVATEPROFILESTRING
 #define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
 #endif
+#endif
 
 #include <stdio.h>