Index: Utilities/dep-build-scripts/purple_dependencies_make.sh
===================================================================
--- Utilities/dep-build-scripts/purple_dependencies_make.sh	(revision 25366)
+++ Utilities/dep-build-scripts/purple_dependencies_make.sh	(working copy)
@@ -20,7 +20,7 @@
     done
 popd > /dev/null 2>&1
 
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
 	echo "Building Meanwhile for $ARCH"
 
     export CFLAGS="$BASE_CFLAGS -arch $ARCH"
@@ -33,6 +33,9 @@
 		i386) TARGET_DIR="$TARGET_DIR_I386"
 			  export PATH="$PATH_I386"
 			  export PKG_CONFIG_PATH="$TARGET_DIR_I386/lib/pkgconfig";;
+		x86_64) TARGET_DIR="$TARGET_DIR_X86_64"
+			  export PATH="$PATH_X86_64"
+			  export PKG_CONFIG_PATH="$TARGET_DIR_X86_64/lib/pkgconfig";;
 	esac
 
     mkdir meanwhile-$ARCH || true
@@ -63,7 +66,7 @@
 popd > /dev/null 2>&1
 
 # Gadu-gadu
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
 	echo "Building Gadu-Gadu for $ARCH"
 
 	export CFLAGS="$BASE_CFLAGS -arch $ARCH"
@@ -79,6 +82,11 @@
   		      TARGET_DIR="$TARGET_DIR_I386"
 			  export PATH="$PATH_I386"
 			  export PKG_CONFIG_PATH="$TARGET_DIR_I386/lib/pkgconfig";;
+		x86_64)
+			  HOST=x86_64-apple-darwin9
+			  TARGET_DIR="$TARGET_DIR_X86_64"
+			  export PATH="$PATH_X86_64"
+			  export PKG_CONFIG_PATH="$TARGET_DIR_X86_64/lib/pkgconfig";;
 	esac
 	
 	mkdir gadu-$ARCH || true
@@ -97,7 +105,7 @@
 
 # intltool so pidgin will configure
 # need a native intltool in both ppc and i386
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64; do
 	echo "Building intltool for $ARCH"
 
     mkdir intltool-$ARCH || true
@@ -106,6 +114,7 @@
     case $ARCH in
         ppc) TARGET_DIR="$TARGET_DIR_PPC" ;;
         i386) TARGET_DIR="$TARGET_DIR_I386" ;;
+        x86_64) TARGET_DIR="$TARGET_DIR_X86_64" ;;
     esac
 
 	echo '  Configuring...'   
Index: Utilities/dep-build-scripts/general_dependencies_make.sh
===================================================================
--- Utilities/dep-build-scripts/general_dependencies_make.sh	(revision 25366)
+++ Utilities/dep-build-scripts/general_dependencies_make.sh	(working copy)
@@ -11,12 +11,13 @@
 # We only need a native pkg-config, it's not a runtime dependency,
 # but we need a native one in both directories
 #unset CFLAGS
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
 	echo "Building pkg-config for $ARCH"
 	
 	case $ARCH in
 		ppc) TARGET_DIR=$TARGET_DIR_PPC;;
 		i386) TARGET_DIR=$TARGET_DIR_I386;;
+		x86_64) TARGET_DIR=$TARGET_DIR_X86_64;;
 	esac
 	
 	mkdir pkg-config-`arch` >/dev/null 2>&1 || true
@@ -28,10 +29,40 @@
 	cd ..
 done
 
+#iconv
+for ARCH in ppc i386 x86_64 ; do
+	echo "Building iconv for $ARCH"
+	export CFLAGS="$BASE_CFLAGS -arch $ARCH"
+	export CXXFLAGS="$CFLAGS"
+	export LDFLAGS="$BASE_LDFLAGS -arch $ARCH"
+	
+	case $ARCH in
+		ppc) HOST=powerpc-apple-darwin9
+			 export PATH=$PATH_PPC;;
+		i386) HOST=i686-apple-darwin9
+			  export PATH=$PATH_I386;;
+		x86_64) HOST=x86_64-apple-darwin9
+			  export PATH=$PATH_X86_64;;	
+		
+	esac
+	
+	mkdir iconv-$ARCH >/dev/null 2>&1 || true
+	cd iconv-$ARCH
+	TARGET_DIR=$TARGET_DIR_BASE-$ARCH
+	echo '  Configuring...'
+	"$SOURCEDIR/$ICONV/configure" \
+		--prefix=$TARGET_DIR \
+		--disable-static --enable-shared \
+	    --build=$HOST --target=$HOST >> $LOG_FILE 2>&1
+	echo '  make && make install'
+	make -j $NUMBER_OF_CORES >> $LOG_FILE 2>&1 && make install >> $LOG_FILE 2>&1
+	cd ..
+done
+
 #gettext
 # caveat - some of the build files in gettext appear to not respect CFLAGS
 # and are compiling to `arch` instead of $ARCH. Lame.
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
 	echo "Building gettext for $ARCH"
 	export CFLAGS="$BASE_CFLAGS -arch $ARCH"
 	export CXXFLAGS="$CFLAGS"
@@ -42,6 +73,9 @@
 			 export PATH=$PATH_PPC;;
 		i386) HOST=i686-apple-darwin9
 			  export PATH=$PATH_I386;;
+		x86_64) HOST=x86_64-apple-darwin9
+			  export PATH=$PATH_X86_64;;	
+		
 	esac
 	
 	mkdir gettext-$ARCH >/dev/null 2>&1 || true
@@ -51,7 +85,7 @@
 	"$SOURCEDIR/$GETTEXT/configure" \
 		--prefix=$TARGET_DIR \
 		--disable-static --enable-shared \
-	    --host=$HOST >> $LOG_FILE 2>&1
+	    --build=$HOST --target=$HOST >> $LOG_FILE 2>&1
 	echo '  make && make install'
 	make -j $NUMBER_OF_CORES >> $LOG_FILE 2>&1 && make install >> $LOG_FILE 2>&1
 	cd ..
@@ -69,7 +103,7 @@
 # done
 # popd > /dev/null 2>&1
 
-for ARCH in ppc i386; do
+for ARCH in ppc i386 x86_64 ; do
 	echo "Building glib for $ARCH"
 	LOCAL_BIN_DIR="$TARGET_DIR_BASE-$ARCH/bin"
 	LOCAL_LIB_DIR="$TARGET_DIR_BASE-$ARCH/lib"
@@ -86,6 +120,7 @@
 	case $ARCH in
 		ppc) HOST=powerpc-apple-darwin9;;
 		i386) HOST=i686-apple-darwin9;;
+		x86_64) HOST=x86_64-apple-darwin9;;
 	esac
 	
 	mkdir glib-$ARCH >/dev/null 2>&1 || true
@@ -96,7 +131,7 @@
 	   --prefix=$TARGET_DIR \
 	   --with-libiconv \
 	   --disable-static --enable-shared \
-	   --host=$HOST >> $LOG_FILE 2>&1
+	   --build=$HOST --target=$HOST >> $LOG_FILE 2>&1
 	echo '  make && make install'
 	make -j $NUMBER_OF_CORES >> $LOG_FILE 2>&1 && make install >> $LOG_FILE 2>&1
 	cd ..
Index: Utilities/dep-build-scripts/glibconfig.h
===================================================================
--- Utilities/dep-build-scripts/glibconfig.h	(revision 25366)
+++ Utilities/dep-build-scripts/glibconfig.h	(working copy)
@@ -2,6 +2,8 @@
 #include <glibconfig-ppc.h>
 #elif defined(__i386__)
 #include <glibconfig-i386.h>
+#elif defined(__x86_64__)
+#include <glibconfig-x86_64.h>
 #else
 #error This isn't a recognized platform.
 #endif
Index: Utilities/dep-build-scripts/universalize.sh
===================================================================
--- Utilities/dep-build-scripts/universalize.sh	(revision 25366)
+++ Utilities/dep-build-scripts/universalize.sh	(working copy)
@@ -40,6 +40,8 @@
     $UNIVERSAL_DIR/include/libglib-2.0.0/glib-2.0/glibconfig-i386.h
 cp $TARGET_DIR_PPC/lib/glib-2.0/include/glibconfig.h \
     $UNIVERSAL_DIR/include/libglib-2.0.0/glib-2.0/glibconfig-ppc.h
+cp $TARGET_DIR_X86_64/lib/glib-2.0/include/glibconfig.h \
+    $UNIVERSAL_DIR/include/libglib-2.0.0/glib-2.0/glibconfig-x86_64.h
 cp $SCRIPT_DIR/glibconfig.h $UNIVERSAL_DIR/include/libglib-2.0.0/glib-2.0
 
 mkdir libgmodule-2.0.0 || true
@@ -58,6 +60,7 @@
 # Another hack: we need libgadu.h
 cp $TARGET_DIR_I386/include/libgadu.h $UNIVERSAL_DIR/include/$PURPLE_FOLDER/libgadu-i386.h
 cp $TARGET_DIR_PPC/include/libgadu.h $UNIVERSAL_DIR/include/$PURPLE_FOLDER/libgadu-ppc.h
+cp $TARGET_DIR_X86_64/include/libgadu.h $UNIVERSAL_DIR/include/$PURPLE_FOLDER/libgadu-x86_64.h
 cp $SCRIPT_DIR/libgadu.h $UNIVERSAL_DIR/include/$PURPLE_FOLDER/
 cd ..
 
Index: Utilities/dep-build-scripts/libgadu.h
===================================================================
--- Utilities/dep-build-scripts/libgadu.h	(revision 25366)
+++ Utilities/dep-build-scripts/libgadu.h	(working copy)
@@ -2,6 +2,8 @@
 #include "libgadu-ppc.h"
 #elif defined(__i386__)
 #include "libgadu-i386.h"
+#elif defined(__x86_64__)
+#include "libgadu-x86_64.h"
 #else
 #error This isn't a recognized platform.
 #endif
Index: Utilities/dep-build-scripts/common.sh
===================================================================
--- Utilities/dep-build-scripts/common.sh	(revision 25366)
+++ Utilities/dep-build-scripts/common.sh	(working copy)
@@ -8,7 +8,8 @@
 # Package Versions - if a package is changed also update urls.txt
 PKGCONFIG=pkg-config-0.22
 GETTEXT=gettext-0.16.1
-GLIB=glib-2.15.4
+ICONV=libiconv-1.12
+GLIB=glib-2.18.1
 MEANWHILE=meanwhile-1.0.2
 GADU=libgadu-1.7.1
 INTLTOOL=intltool-0.36.2
@@ -28,9 +29,11 @@
 export CC=/usr/bin/gcc-4.2
 TARGET_DIR_PPC="$BUILDDIR/root-ppc"
 TARGET_DIR_I386="$BUILDDIR/root-i386"
+TARGET_DIR_X86_64="$BUILDDIR/root-x86_64"
 TARGET_DIR_BASE="$BUILDDIR/root"
 export PATH_PPC="$TARGET_DIR_PPC/bin:$PATH"
 export PATH_I386="$TARGET_DIR_I386/bin:$PATH"
+export PATH_X86_64="$TARGET_DIR_X86_64/bin:$PATH"
 
 SDK_ROOT="/Developer/SDKs/MacOSX10.5.sdk"
 BASE_CFLAGS="-mmacosx-version-min=10.5 -isysroot $SDK_ROOT"
Index: Utilities/dep-build-scripts/urls.txt
===================================================================
--- Utilities/dep-build-scripts/urls.txt	(revision 25366)
+++ Utilities/dep-build-scripts/urls.txt	(working copy)
@@ -8,8 +8,9 @@
 http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.19.tar.gz
 http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.8.tar.gz
 http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.7.tar.gz
+ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.12.tar.gz
 http://mirrors.kernel.org/gnu/gettext/gettext-0.16.1.tar.gz
-ftp://ftp.gtk.org/pub/glib/2.15/glib-2.15.4.tar.gz
+ftp://ftp.gtk.org/pub/glib/2.18/glib-2.18.1.tar.gz
 ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/sasl/cyrus-sasl-2.1.18.tar.gz
 http://toxygen.net/libgadu/files/libgadu-1.7.1.tar.gz
 http://superb-east.dl.sourceforge.net/sourceforge/meanwhile/meanwhile-1.0.2.tar.gz
