Index: purple_dependencies_make.sh
===================================================================
--- purple_dependencies_make.sh	(revision 25336)
+++ 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: universalize.sh
===================================================================
--- universalize.sh	(revision 25336)
+++ 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: glibconfig.h
===================================================================
--- glibconfig.h	(revision 25336)
+++ 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: general_dependencies_make.sh
===================================================================
--- general_dependencies_make.sh	(revision 25336)
+++ 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
@@ -31,7 +32,7 @@
 #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 +43,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 +55,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 +73,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 +90,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 +101,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: libgadu.h
===================================================================
--- libgadu.h	(revision 25336)
+++ 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: common.sh
===================================================================
--- common.sh	(revision 25336)
+++ common.sh	(working copy)
@@ -28,9 +28,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"
