Index: configure.ac
===================================================================
--- configure.ac	(revision 2459)
+++ configure.ac	(working copy)
@@ -62,14 +62,37 @@
   ],
  [])
 
+dnl Checks for libs - these 2 are checked for in the source code
+AC_CHECK_LIB(clanVorbis, main)
+AC_CHECK_LIB(clanMikMod, main)
+
+dnl iconv() is defined differently on some platforms
+AM_ICONV
+if test "$am_cv_func_iconv" = yes; then
+  proto_iconv="$am_cv_proto_iconv_arg1"
+else
+  proto_iconv=""
+fi
+AC_SUBST([ICONV_LIBS], [$LIBICONV])
+AC_DEFINE_UNQUOTED(ICONV_CONST, $proto_iconv,
+  [Define as const if the declaration of iconv() needs const.])
+
+PINGUS_LDFLAGS=""
+case $host in
+  *-*-mingw32* | *-*-windows)
+    PINGUS_LDFLAGS="-export-all-symbols -mwindows" ;;
+  *-*-cygwin*)
+    PINGUS_LDFLAGS=-export-all-symbols ;;
+esac
+
 AC_SUBST(PINGUS_CFLAGS)
+AC_SUBST(PINGUS_LDFLAGS)
 AC_SUBST(PINGUS_LIBS)
 
 dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_CHECK_HEADERS(unistd.h)
-
 AC_CHECK_HEADERS(sstream)
 dnl => HAVE_SSTREAM
 if test "$ac_cv_header_sstream" = "no"; 
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 2459)
+++ src/Makefile.am	(working copy)
@@ -50,11 +50,9 @@
 xmleval_SOURCES  = xml_eval.cxx xml_eval.hxx 
 
 pingus_CPPFLAGS = @PINGUS_CFLAGS@
+pingus_LDFLAGS = @PINGUS_LDFLAGS@
 
 pingus_LDADD = \
-        @PINGUS_LIBS@ \
-        @LIBS@     \
-        \
         caimagemanipulation/libcaimagemanipulation.a \
         worldobjs/libpingus_worldobjs.a \
         actions/libpingus_actions.a      \
@@ -68,7 +66,10 @@
         input/axes/libpingus_input_axes.a \
         input/buttons/libpingus_input_buttons.a \
 	input/pointers/libpingus_input_pointers.a \
-	input/scrollers/libpingus_input_scrollers.a
+	input/scrollers/libpingus_input_scrollers.a \
+  @PINGUS_LIBS@ \
+  @LIBS@ \
+  @ICONV_LIBS@
 
 pingus_level_test_CPPFLAGS = @PINGUS_CFLAGS@
 pingus_level_test_LDADD    = @PINGUS_LIBS@
Index: src/tinygettext.cxx
===================================================================
--- src/tinygettext.cxx	(revision 2459)
+++ src/tinygettext.cxx	(working copy)
@@ -24,6 +24,7 @@
 #include <iostream>
 #include <ctype.h>
 #include <errno.h>
+#include <config.h>
 #include "tinygettext.hxx"
 #include "pingus_error.hxx"
 
@@ -86,7 +87,7 @@
 		size_t in_size = text.size();
 		size_t out_size = 4*in_size; // Worst case scenario: ASCII -> UTF-32?
 		std::string result(out_size, ' ');
-		char* in_str = &text[0];
+    ICONV_CONST char* in_str = &text[0];
 		char* out_str = &result[0];
  
 		// Try to convert the text.








