diff -aurN 001/configure.ac 002/configure.ac
--- 001/configure.ac
+++ 002/configure.ac
@@ -81,7 +81,9 @@
 PURPLE_MAJOR_VERSION=purple_major_version
 PURPLE_MINOR_VERSION=purple_minor_version
 PURPLE_MICRO_VERSION=purple_micro_version
-PURPLE_VERSION=[purple_display_version]
+PURPLE_VERSION=purple_display_version
+PIDGIN_VERSION=purple_display_version
+AC_SUBST(PIDGIN_VERSION)
 AC_SUBST(PURPLE_MAJOR_VERSION)
 AC_SUBST(PURPLE_MINOR_VERSION)
 AC_SUBST(PURPLE_MICRO_VERSION)
@@ -694,7 +696,7 @@
 	if test "x$enable_consoleui" = "xyes"; then
 		dnl # Some distros put the headers in ncursesw/, some don't
 		found_ncurses_h=no
-		for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
+		for location in $ac_ncurses_includes $NCURSES_HEADERS ${prefix}/include/ncursesw ${prefix}/include
 		do
 			f="$location/ncurses.h"
 			orig_CFLAGS="$CFLAGS"
diff -aurN 001/pidgin/Makefile.am 002/pidgin/Makefile.am
--- 001/pidgin/Makefile.am
+++ 002/pidgin/Makefile.am
@@ -192,10 +192,10 @@
 	win32/gtkdocklet-win32.c \
 	win32/gtkwin32dep.c \
 	win32/untar.c \
-	win32/wspell.c \
-	win32/pidgin_dll_rc.rc
+	win32/wspell.c
 
-libpidgin_la_LDFLAGS = $(AVOID_VERSION) $(NO_UNDEFINED)
+libpidgin_la_DEPENDENCIES = win32/pidgin_dll_rc.o
+libpidgin_la_LDFLAGS = $(AVOID_VERSION) $(NO_UNDEFINED) -Wl,win32/pidgin_dll_rc.o
 libpidgin_la_LIBADD = $(common_LDADD) -lz -lwinmm -lgdi32
 
 pidgin_LDFLAGS = -mwindows
diff -aurN 001/pidgin/plugins/musicmessaging/Makefile.am 002/pidgin/plugins/musicmessaging/Makefile.am
--- 001/pidgin/plugins/musicmessaging/Makefile.am
+++ 002/pidgin/plugins/musicmessaging/Makefile.am
@@ -7,7 +7,7 @@
 musicmessagingdir = $(libdir)/pidgin
 endif
 
-musicmessaging_la_LDFLAGS = -module -avoid-version
+musicmessaging_la_LDFLAGS = -module -avoid-version -no-undefined
 
 if PLUGINS
 if ENABLE_DBUS
