Index: include/Makefile.in
--- include/Makefile.in.orig	2009-01-19 17:40:38 +0100
+++ include/Makefile.in	2009-02-07 19:03:05 +0100
@@ -387,15 +387,15 @@
 			decimal.h errmsg.h my_global.h my_net.h \
 			my_getopt.h sslopt-longopts.h my_dir.h \
 			sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
-			m_ctype.h my_attribute.h $(HEADERS_GEN_CONFIGURE) \
+			m_ctype.h my_attribute.h rijndael.h sha1.h my_aes.h $(HEADERS_GEN_CONFIGURE) \
 			$(HEADERS_GEN_MAKE)
 
 noinst_HEADERS = config-win.h config-netware.h my_bit.h \
 			heap.h my_bitmap.h my_uctype.h \
 			myisam.h myisampack.h myisammrg.h ft_global.h\
 			mysys_err.h my_base.h help_start.h help_end.h \
-			my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
-			my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
+			my_nosys.h my_alarm.h queues.h \
+			my_tree.h my_trie.h hash.h thr_alarm.h \
 			thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
 			my_handler.h my_time.h \
 			my_vle.h my_user.h my_atomic.h atomic/nolock.h \
Index: mysys/default.c
--- mysys/default.c.orig	2009-01-19 17:29:59 +0100
+++ mysys/default.c	2009-02-07 18:38:28 +0100
@@ -1086,8 +1086,7 @@
 
 #else
 
-  errors += add_directory(alloc, "/etc/", dirs);
-  errors += add_directory(alloc, "/etc/mysql/", dirs);
+  errors += add_directory(alloc, "@l_prefix@/etc/mysql/", dirs);
 
 #if defined(DEFAULT_SYSCONFDIR)
   if (DEFAULT_SYSCONFDIR != "")
Index: scripts/mysql_config.sh
--- scripts/mysql_config.sh.orig	2009-01-19 17:30:55 +0100
+++ scripts/mysql_config.sh	2009-02-07 19:05:12 +0100
@@ -104,9 +104,9 @@
 
 # Create options 
 # We intentionally add a space to the beginning and end of lib strings, simplifies replace later
-libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
+libs=" $ldflags -L$pkglibdir -lmysqlclient -lmysys @ZLIB_DEPS@ @NON_THREADED_LIBS@"
 libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
-libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@ "
+libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r -lmysys @ZLIB_DEPS@ @LIBS@ @openssl_libs@ "
 embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@ @openssl_libs@ "
 
 if [ -r "$pkglibdir/libmygcc.a" ]; then
Index: scripts/mysql_system_tables_data.sql
--- scripts/mysql_system_tables_data.sql.orig	2009-01-19 17:30:55 +0100
+++ scripts/mysql_system_tables_data.sql	2009-02-07 18:38:28 +0100
@@ -11,8 +11,6 @@
 -- Fill "db" table with default grants for anyone to
 -- access database 'test' and 'test_%' if "db" table didn't exist
 CREATE TEMPORARY TABLE tmp_db LIKE db;
-INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
-INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
 INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
 DROP TABLE tmp_db;
 
Index: sql/Makefile.in
--- sql/Makefile.in.orig	2009-01-19 17:40:45 +0100
+++ sql/Makefile.in	2009-02-07 18:38:28 +0100
@@ -520,7 +520,7 @@
 			$(top_builddir)/strings/libmystrings.a
 
 mysqld_DEPENDENCIES = @mysql_plugin_libs@ $(SUPPORTING_LIBS) libndb.la
-LDADD = $(SUPPORTING_LIBS) @ZLIB_LIBS@ @NDB_SCI_LIBS@
+LDADD = $(SUPPORTING_LIBS) @NDB_SCI_LIBS@
 mysqld_LDADD = libndb.la \
 			@MYSQLD_EXTRA_LDFLAGS@ \
 			@pstack_libs@ \
