From e99df6fd02fff7a06d7b5ed02b2a58378d88d27e Mon Sep 17 00:00:00 2001 From: "kent@mysql.com/kent-amd64.(none)" <> Date: Mon, 30 Jul 2007 20:40:49 +0200 Subject: [PATCH 1/2] 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 a9d2569cba4ff0e9c419d26d4e2005337e047984 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com/kent-amd64.(none)" <> Date: Mon, 30 Jul 2007 21:09:45 +0200 Subject: [PATCH 2/2] 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. --- 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