Index: config/gdlib-config.in
--- config/gdlib-config.in.orig	2007-02-03 02:41:00 +0100
+++ config/gdlib-config.in	2007-02-07 11:51:43 +0100
@@ -68,10 +68,10 @@
 	echo @GDLIB_REVISION@
 	;;
     --ldflags)
-	echo @LDFLAGS@
+	echo -L@libdir@ @LDFLAGS@
 	;;
     --libs)
-	echo @LIBS@ @LIBICONV@
+	echo -lgd @LIBS@ @LIBICONV@
 	;;
     --cflags|--includes)
 	echo -I@includedir@
@@ -83,8 +83,8 @@
 	echo "GD library  @VERSION@"
 	echo "includedir: $includedir"
 	echo "cflags:     -I@includedir@"
-	echo "ldflags:    @LDFLAGS@"
-	echo "libs:       @LIBS@ @LIBICONV@"
+	echo "ldflags:    -L@libdir@ @LDFLAGS@"
+	echo "libs:       -lgd @LIBS@ @LIBICONV@"
 	echo "libdir:     $libdir"
 	echo "features:   @FEATURES@"
 	;;
Index: gdhelpers.h
--- gdhelpers.h.orig	2007-02-03 02:41:00 +0100
+++ gdhelpers.h	2007-02-07 11:50:37 +0100
@@ -38,7 +38,7 @@
 #define gdMutexLock(x) EnterCriticalSection(&x)
 #define gdMutexUnlock(x) LeaveCriticalSection(&x)
 #else
-#ifdef HAVE_PTHREAD
+#if 0
 #include <pthread.h>
 #define gdMutexDeclare(x) pthread_mutex_t x
 #define gdMutexSetup(x) pthread_mutex_init(&x, 0)
Index: gdkanji.c
--- gdkanji.c.orig	2007-02-03 02:41:00 +0100
+++ gdkanji.c	2007-02-07 11:50:37 +0100
@@ -26,29 +26,32 @@
 
 #ifndef HAVE_ICONV
 #define ICONV_CONST /**/
-  iconv_t iconv_open (const char *, const char *);
-size_t iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
-int iconv_close (iconv_t);
+static iconv_t my_iconv_open (const char *, const char *);
+static size_t my_iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
+static int my_iconv_close (iconv_t);
 
-iconv_t
-iconv_open (const char *tocode, const char *fromcode)
+static iconv_t
+my_iconv_open (const char *tocode, const char *fromcode)
 {
   return (iconv_t) (-1);
 }
 
-size_t
-iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
+static size_t
+my_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
        char **outbuf, size_t * outbytesleft)
 {
   return 0;
 }
 
-int
-iconv_close (iconv_t cd)
+static int
+my_iconv_close (iconv_t cd)
 {
   return 0;
 }
-
+#else
+#define my_iconv_open iconv_open
+#define my_iconv iconv
+#define my_iconv_close iconv_close
 #endif /* !HAVE_ICONV */
 
 #define LIBNAME "any2eucjp()"
@@ -378,7 +381,7 @@
   iconv_t cd;
   size_t from_len, to_len;
 
-  if ((cd = iconv_open (EUCSTR, code)) == (iconv_t) - 1)
+  if ((cd = my_iconv_open (EUCSTR, code)) == (iconv_t) - 1)
     {
       error ("iconv_open() error");
 #ifdef HAVE_ERRNO_H
@@ -392,7 +395,7 @@
   from_len = strlen ((const char *)from) + 1;
   to_len = BUFSIZ;
 
-  if ((int) (iconv (cd, (char **)from_p, &from_len, (char **)to_p, &to_len))
+  if ((int) (my_iconv (cd, (char **)from_p, &from_len, (char **)to_p, &to_len))
       == -1)
     {
 #ifdef HAVE_ERRNO_H
@@ -409,7 +412,7 @@
       return;
     }
 
-  if (iconv_close (cd) != 0)
+  if (my_iconv_close (cd) != 0)
     {
       error ("iconv_close() error");
     }
