From 987ef94079b87101562de07475a7f1983a160ed7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Jul 2007 17:39:07 +0200 Subject: [PATCH 1/3] SSL/Makefile.am mysql-test/Makefile.am: Moved CERT files to where they are used, avoids conflict between two make files trying to install the same CERTs SSL/*.pem, Move: SSL/*.pem -> mysql-test/std_data/ mysql-test/std_data/cacert.pem: Rename: SSL/cacert.pem -> mysql-test/std_data/cacert.pem mysql-test/std_data/client-cert.pem: Rename: SSL/client-cert.pem -> mysql-test/std_data/client-cert.pem mysql-test/std_data/client-key.pem: Rename: SSL/client-key.pem -> mysql-test/std_data/client-key.pem mysql-test/std_data/server-cert.pem: Rename: SSL/server-cert.pem -> mysql-test/std_data/server-cert.pem mysql-test/std_data/server-key.pem: Rename: SSL/server-key.pem -> mysql-test/std_data/server-key.pem SSL/Makefile.am: Moved CERT files to where they are used, avoids conflict between two make files trying to install the same CERTs --- SSL/Makefile.am | 4 +--- mysql-test/Makefile.am | 18 +----------------- {SSL => mysql-test/std_data}/cacert.pem | 0 {SSL => mysql-test/std_data}/client-cert.pem | 0 {SSL => mysql-test/std_data}/client-key.pem | 0 {SSL => mysql-test/std_data}/server-cert.pem | 0 {SSL => mysql-test/std_data}/server-key.pem | 0 7 files changed, 2 insertions(+), 20 deletions(-) rename {SSL => mysql-test/std_data}/cacert.pem (100%) rename {SSL => mysql-test/std_data}/client-cert.pem (100%) rename {SSL => mysql-test/std_data}/client-key.pem (100%) rename {SSL => mysql-test/std_data}/server-cert.pem (100%) rename {SSL => mysql-test/std_data}/server-key.pem (100%) diff --git a/SSL/Makefile.am b/SSL/Makefile.am index 5fc44d3a247..30a6fc3c995 100644 --- a/SSL/Makefile.am +++ b/SSL/Makefile.am @@ -15,9 +15,7 @@ ## Process this file with automake to create Makefile.in -EXTRA_DIST= NOTES cacert.pem client-cert.pem client-key.pem \ - run-client run-server server-cert.pem \ - server-key.pem +EXTRA_DIST= NOTES run-client run-server # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 1920a68b21b..439b13af779 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -37,12 +37,7 @@ EXTRA_DIST = $(EXTRA_SCRIPTS) suite GENSCRIPTS = mysql-test-run-shell mysql-test-run install_test_db mtr PRESCRIPTS = mysql-test-run.pl mysql-stress-test.pl test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS) -test_DATA = std_data/client-key.pem \ - std_data/client-cert.pem \ - std_data/cacert.pem \ - std_data/server-cert.pem \ - std_data/server-key.pem -CLEANFILES = $(GENSCRIPTS) $(test_DATA) +CLEANFILES = $(GENSCRIPTS) INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I.. @@ -111,17 +106,6 @@ install-data-local: uninstall-local: @RM@ -f -r $(DESTDIR)$(testdir) -std_data/client-key.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data -std_data/client-cert.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data -std_data/cacert.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data -std_data/server-cert.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data -std_data/server-key.pem: $(top_srcdir)/SSL/$(@F) - @RM@ -f $@; @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data - # mtr - a shortcut for executing mysql-test-run.pl mtr: $(RM) -f mtr diff --git a/SSL/cacert.pem b/mysql-test/std_data/cacert.pem similarity index 100% rename from SSL/cacert.pem rename to mysql-test/std_data/cacert.pem diff --git a/SSL/client-cert.pem b/mysql-test/std_data/client-cert.pem similarity index 100% rename from SSL/client-cert.pem rename to mysql-test/std_data/client-cert.pem diff --git a/SSL/client-key.pem b/mysql-test/std_data/client-key.pem similarity index 100% rename from SSL/client-key.pem rename to mysql-test/std_data/client-key.pem diff --git a/SSL/server-cert.pem b/mysql-test/std_data/server-cert.pem similarity index 100% rename from SSL/server-cert.pem rename to mysql-test/std_data/server-cert.pem diff --git a/SSL/server-key.pem b/mysql-test/std_data/server-key.pem similarity index 100% rename from SSL/server-key.pem rename to mysql-test/std_data/server-key.pem From 8d0526a82df90407578dfac4d57321d03f65a6f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Jul 2007 20:40:49 +0200 Subject: [PATCH 2/3] my_pthread.c: Backport of correction for Mac OS X build problem, global variable not initiated is "common" and can't be used in shared libraries, unless special flags are used (bug#26218) mysys/my_pthread.c: Backport of correction for Mac OS X build problem, global variable not initiated is "common" and can't be used in shared libraries, unless special flags are used (bug#26218) --- mysys/my_pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 14ba6aabf0e..50c0a82d2d8 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -30,7 +30,7 @@ #define SCHED_POLICY SCHED_OTHER #endif -uint thd_lib_detected; +uint thd_lib_detected= 0; #ifndef my_pthread_setprio void my_pthread_setprio(pthread_t thread_id,int prior) From 16ff419b8ae86ccbf017d19ee00141e3e1c05988 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Jul 2007 21:09:45 +0200 Subject: [PATCH 3/3] Generate "config.h" directly into the "include" directory, later copied to "my_config.h". Not to pollute the top directory, and to get more control over what is included. Made the include path for "libedit" pick up its own "config.h" first. config/ac-macros/misc.m4: aclocal in automake 1.8 can't handle AC_REQUIRE on a user macro defined in the same included file. cmd-line-utils/libedit/Makefile.am: Changed include path so that current directory is taken first, as there is a "config.h" there with the same name as the one in top "include". configure.in: Generate "config.h" directly into "include", don't pollute top directory include/Makefile.am: Copy "config.h" from current directory to "my_config.h", added note in the make file why there are two identical files with different name. scripts/make_binary_distribution.sh: Removed copy of "config.h" from top directory, it is in "include" in a source tree. --- cmd-line-utils/libedit/Makefile.am | 4 ++-- config/ac-macros/misc.m4 | 1 - configure.in | 2 +- include/Makefile.am | 7 +++++-- scripts/make_binary_distribution.sh | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd-line-utils/libedit/Makefile.am b/cmd-line-utils/libedit/Makefile.am index ae6755f1c5c..b7611193aea 100644 --- a/cmd-line-utils/libedit/Makefile.am +++ b/cmd-line-utils/libedit/Makefile.am @@ -5,8 +5,8 @@ ASRC = $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c AHDR = vi.h emacs.h common.h -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(srcdir)/../.. -I.. +# Make sure to include stuff from this directory first, to get right "config.h" +INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include noinst_LIBRARIES = libedit.a diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 index 09081fb3eac..60c0469e449 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -763,7 +763,6 @@ AC_SUBST(CXX_VERSION) ]) AC_DEFUN([MYSQL_PROG_AR], [ -AC_REQUIRE([MYSQL_CHECK_CXX_VERSION]) case $CXX_VERSION in MIPSpro*) AR=$CXX diff --git a/configure.in b/configure.in index 843837b9348..3db6d0bfb8d 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb AM_INIT_AUTOMAKE(mysql, 5.0.48) -AM_CONFIG_HEADER(config.h) +AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 DOT_FRM_VERSION=6 diff --git a/include/Makefile.am b/include/Makefile.am index 2cd72052a15..c856b6398fe 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -49,8 +49,11 @@ link_sources: @readline_h_ln_cmd@ @yassl_h_ln_cmd@ -my_config.h: ../config.h - $(CP) ../config.h my_config.h +# We want both "my_config.h" and "config.h" that are identical, as +# MySQL sources assumes the name "my_config.h", and 3rd party sources +# assumes the name "config.h". +my_config.h: config.h + $(CP) config.h my_config.h # These files should not be included in distributions since they are # generated by configure from the .h.in files diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index dab1bbec956..a87bb03526d 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -257,7 +257,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then rm -f $BASE/lib/*.la fi -copyfileto $BASE/include config.h include/* +copyfileto $BASE/include include/* rm -f $BASE/include/Makefile* $BASE/include/*.in $BASE/include/config-win.h if [ $BASE_SYSTEM != "netware" ] ; then