[patch] fix build with iconv

Mark Brand <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
We use this configuration building FreeTDS in mingw-cross-env:

./configure \
        --prefix='$(PREFIX)/$(TARGET)' \
        --host='$(TARGET)' \
        --disable-rpath \
        --disable-dependency-tracking \
        --disable-shared \
        --enable-static \
        --enable-libiconv \
        --enable-msdblib \
        --with-tdsver=8.0

freetds-0.83.dev.20100122 fails to link a few executables.

This patch fixes the problems by adding iconv where it's missing in the
Makefile.am files.

By the way, do you recommend building with iconv for MinGW?

-Mark

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
freetds-1-iconv.patch (text/x-patch, 1.5 KB)
diff -urN a/src/apps/Makefile.am b/src/apps/Makefile.am
--- a/src/apps/Makefile.am	2009-01-09 05:59:58.000000000 +0100
+++ b/src/apps/Makefile.am	2010-01-27 01:35:35.595655463 +0100
@@ -16,7 +16,7 @@
 
 dist_bin_SCRIPTS = osql
 
-freebcp_LDADD	= ../dblib/libsybdb.la ../replacements/libreplacements.la $(NETWORK_LIBS)
+freebcp_LDADD	= ../dblib/libsybdb.la ../replacements/libreplacements.la $(LIBICONV) $(NETWORK_LIBS)
 freebcp_SOURCES = freebcp.c freebcp.h
 
 tsql_LDADD	= ../tds/libtds.la \
diff -urN a/src/pool/Makefile.am b/src/pool/Makefile.am
--- a/src/pool/Makefile.am	2006-03-27 09:22:54.000000000 +0200
+++ b/src/pool/Makefile.am	2010-01-27 01:37:55.778613137 +0100
@@ -4,7 +4,7 @@
 
 tdspool_SOURCES	=	config.c main.c member.c user.c util.c pool.h
 SERVERDIR	=	../server
-LDADD		=	../server/libtdssrv.la $(NETWORK_LIBS)
+LDADD		=	../server/libtdssrv.la $(LIBICONV) $(NETWORK_LIBS)
 EXTRA_DIST	=	BUGS pool.conf
 
 ETC	=	$(DESTDIR)$(sysconfdir)
diff -urN a/src/server/Makefile.am b/src/server/Makefile.am
--- a/src/server/Makefile.am	2007-03-12 14:28:51.000000000 +0100
+++ b/src/server/Makefile.am	2010-01-27 01:36:24.475645279 +0100
@@ -4,5 +4,5 @@
 libtdssrv_la_SOURCES=	query.c server.c login.c
 libtdssrv_la_LIBADD =	../tds/libtds.la ../replacements/libreplacements.la $(NETWORK_LIBS) $(LIBICONV) $(FREETDS_LIBGCC)
 noinst_PROGRAMS	= tdssrv
-tdssrv_LDADD	= libtdssrv.la $(NETWORK_LIBS)
+tdssrv_LDADD	= libtdssrv.la $(LIBICONV) $(NETWORK_LIBS)
 tdssrv_SOURCES	= unittest.c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.