Index: configure
--- configure.orig	2008-04-15 18:20:29 +0200
+++ configure	2008-04-17 08:08:03 +0200
@@ -20226,7 +20226,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lodbcinst  $LIBS"
+LIBS="-lodbcinst -lodbc $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
Index: util/Makefile.in
--- util/Makefile.in.orig	2008-04-15 18:20:26 +0200
+++ util/Makefile.in	2008-04-17 08:09:36 +0200
@@ -49,7 +49,8 @@
 @ODBCINSTLINK_TRUE@	MYODBCUtilReadDriver.c \
 @ODBCINSTLINK_TRUE@	MYODBCUtilWriteDataSource.c \
 @ODBCINSTLINK_TRUE@	MYODBCUtilWriteDataSourceStr.c \
-@ODBCINSTLINK_TRUE@	MYODBCUtilWriteDriver.c
+@ODBCINSTLINK_TRUE@	MYODBCUtilWriteDriver.c \
+@ODBCINSTLINK_TRUE@	strndup.c
 
 subdir = util
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@ -74,7 +75,7 @@
 	MYODBCUtilDSNExists.c MYODBCUtilReadDataSource.c \
 	MYODBCUtilReadDataSourceStr.c MYODBCUtilReadDriver.c \
 	MYODBCUtilWriteDataSource.c MYODBCUtilWriteDataSourceStr.c \
-	MYODBCUtilWriteDriver.c
+	MYODBCUtilWriteDriver.c strndup.c
 @ODBCINSTLINK_TRUE@am__objects_1 = MYODBCUtilGetDataSourceNames.lo \
 @ODBCINSTLINK_TRUE@	MYODBCUtilGetDriverNames.lo \
 @ODBCINSTLINK_TRUE@	MYODBCUtilGetIniFileName.lo \
@@ -84,7 +85,8 @@
 @ODBCINSTLINK_TRUE@	MYODBCUtilReadDriver.lo \
 @ODBCINSTLINK_TRUE@	MYODBCUtilWriteDataSource.lo \
 @ODBCINSTLINK_TRUE@	MYODBCUtilWriteDataSourceStr.lo \
-@ODBCINSTLINK_TRUE@	MYODBCUtilWriteDriver.lo
+@ODBCINSTLINK_TRUE@	MYODBCUtilWriteDriver.lo \
+@ODBCINSTLINK_TRUE@	strndup.lo
 am_libmyodbc3u_la_OBJECTS = stringutil.lo installer.lo odbcinstw.lo \
 	unicode_transcode.lo MYODBCUtilAllocDataSource.lo \
 	MYODBCUtilAllocDriver.lo MYODBCUtilClearDataSource.lo \
@@ -340,6 +342,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MYODBCUtilWriteDataSource.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MYODBCUtilWriteDataSourceStr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MYODBCUtilWriteDriver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/installer.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odbcinstw.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringutil.Plo@am__quote@
Index: util/strndup.c
--- /dev/null	2008-04-17 08:08:44 +0200
+++ util/strndup.c	2008-04-17 08:08:03 +0200
@@ -0,0 +1,15 @@
+
+#include <stdio.h>
+
+char *strndup(const char *src, size_t len)
+{
+    char *dst;
+
+    if (src == NULL)
+        return NULL;
+    if (dst = (char *)calloc(len + 1, sizeof(char)) == NULL)
+        return NULL;
+    strncpy(dst, src, len);
+    return dst;
+}
+
