On Thu, Oct 04, 2007 at 11:22:20AM +0100, Stuart Henderson wrote:
> On 2007/10/04 12:59, Paul Irofti wrote:
> > On Thu, Oct 04, 2007 at 10:31:36AM +0100, Stuart Henderson wrote:
> > > On 2007/10/04 11:41, Paul Irofti wrote:
> > > > This is a patch for the /usr/local/share/examples/iodbc/Makefile so that
> > > > the test programs actually compile with the provided makefile. There was
> > > > a missing linkage with posix threads that render the build process to
> > > > fail. Attached is the extra patch file.
> > >
> > > Shouldn't that be in the output from iodbc-config instead?
> >
> > I don't know what to say about this. I thought of it myself but, as I've
> > seen on similar `pkg-config' apps they usually point to the package
> > internal libraries and their location.
>
> My understanding is that foo-config should list everything
> that's needed when you want to link against foo. I could be wrong but
> "grep pthread /usr/local/bin/*-config" seems to agree with this.
>
Yes, it seems so, thus I patched iodc-config and attached it.
--- bin/iodbc-config.in.orig Mon Jan 23 12:30:23 2006
+++ bin/iodbc-config.in Thu Oct 4 14:57:41 2007
@@ -192,16 +192,16 @@
echo "$includes"
fi
if test "$echo_libs" = "yes"; then
- libs=""
+ libs="-lpthread"
if test "$lib_iodbc" = "yes"; then
libs="$libs -liodbc -liodbcinst"
fi
echo "[EMAIL PROTECTED]@ $libs"
fi
if test "$echo_staticlibs" = "yes"; then
- libs=""
+ libs="-lpthread"
if test "$lib_iodbc" = "yes"; then
- libs="@libdir@/libiodbc.a @libdir@/libiodbcinst.a @LIBADD_DL@"
+ libs="$libs @libdir@/libiodbc.a @libdir@/libiodbcinst.a
@LIBADD_DL@"
fi
echo "$libs"
fi