work on MySQL server management daemon

parent a877b10c
......@@ -392,3 +392,7 @@ tags
tmp/*
vio/viotest-ssl
=6
linked_tools_sources
tools/my_vsnprintf.c
tools/mysqlmngd
tools/mysys_priv.h
......@@ -24,12 +24,14 @@ EXTRA_DIST = INSTALL-SOURCE README \
SUBDIRS = include @docs_dirs@ @readline_dir@ \
@thread_dirs@ @pstack_dirs@ @sql_client_dirs@ \
@sql_server_dirs@ @libmysqld_dirs@ scripts tests man \
@bench_dirs@ support-files @fs_dirs@
@bench_dirs@ support-files @fs_dirs@ @tools_dirs@
# Relink after clean
linked_sources = linked_client_sources linked_server_sources \
linked_libmysql_sources linked_libmysql_r_sources \
linked_libmysqld_sources linked_include_sources
linked_libmysqld_sources linked_include_sources \
linked_tools_sources
CLEANFILES = $(linked_sources)
# This is just so that the linking is done early.
......@@ -43,6 +45,11 @@ linked_client_sources: @linked_client_targets@
cd client; $(MAKE) link_sources
echo timestamp > linked_client_sources
linked_tools_sources:
cd tools; $(MAKE) link_sources
echo timestamp > linked_tools_sources
linked_libmysql_sources:
cd libmysql; $(MAKE) link_sources
echo timestamp > linked_libmysql_sources
......
......@@ -1094,11 +1094,14 @@ then
fi
fi
TOOLS_LIBS="$NON_THREADED_CLIENT_LIBS"
# Should we use named pthread library ?
AC_MSG_CHECKING("named thread libs:")
if test "$with_named_thread" != "no"
then
LIBS="$with_named_thread $LIBS $with_named_thread"
TOOLS_LIBS="$with_named_thread $TOOLS_LIBS $with_named_thread"
with_posix_threads="yes"
with_mit_threads="no"
AC_MSG_RESULT("$with_named_thread")
......@@ -1117,7 +1120,9 @@ else
then
AC_MSG_CHECKING("for pthread_create in -lpthread");
ac_save_LIBS="$LIBS"
ac_save_TOOLS_LIBS="$TOOLS_LIBS"
LIBS="$LIBS -lpthread"
TOOLS_LIBS="$TOOLS_LIBS -lpthread"
AC_TRY_LINK(
[#include <pthread.h>],
[ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
......@@ -1126,6 +1131,7 @@ else
if test "$with_posix_threads" = "no"
then
LIBS=" $ac_save_LIBS -lpthreads"
TOOLS_LIBS=" $ac_save_TOOLS_LIBS -lpthreads"
AC_MSG_CHECKING("for pthread_create in -lpthreads");
AC_TRY_LINK(
[#include <pthread.h>],
......@@ -1136,6 +1142,7 @@ else
then
# This is for FreeBSD
LIBS="$ac_save_LIBS -pthread"
TOOLS_LIBS="$ac_save_TOOLS_LIBS -pthread"
AC_MSG_CHECKING("for pthread_create in -pthread");
AC_TRY_LINK(
[#include <pthread.h>],
......@@ -1146,6 +1153,7 @@ else
then
with_mit_threads="yes"
LIBS="$ac_save_LIBS"
TOOLS_LIBS="$ac_save_TOOLS_LIBS"
fi
fi
fi
......@@ -1673,6 +1681,21 @@ AC_ARG_WITH(embedded-server,
[with_embedded_server=no]
)
AC_ARG_WITH(extra-tools,
[ --without-extra-tools Skip building utilites in the tools \
directory.],
[with_tools=$withval],
[with_tools=yes]
)
if test "$with_tools" = "yes"
then
tools_dirs="tools"
else
tools_dirs=""
fi
AC_SUBST([tools_dirs])
MYSQL_CHECK_CPU
MYSQL_CHECK_MYSQLFS
MYSQL_CHECK_VIO
......@@ -2138,6 +2161,7 @@ AC_SUBST(server_scripts)
# Some usefull subst
AC_SUBST(CC)
AC_SUBST(GXX)
AC_SUBST(TOOLS_LIBS)
# Output results
AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \
......@@ -2148,7 +2172,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \
libmysql_r/Makefile libmysqld/Makefile libmysql/Makefile client/Makefile \
pstack/Makefile sql/Makefile sql/share/Makefile \
merge/Makefile dbug/Makefile scripts/Makefile \
include/Makefile sql-bench/Makefile \
include/Makefile sql-bench/Makefile tools/Makefile \
tests/Makefile Docs/Makefile support-files/Makefile \
mysql-test/Makefile \
include/mysql_version.h
......
INCLUDES = -I$(srcdir)/../include $(openssl_includes) \
-I../include -I$(srcdir)/.. -I$(top_srcdir) \
-I..
LIBS = @TOOLS_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql_r/libmysqlclient_r.la
bin_PROGRAMS = mysqlmngd
mysqlmngd_SOURCES = mysqlmngd.c my_vsnprintf.c
mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
DEFS = -DUNDEF_THREADS_HACK
mysys_src=my_vsnprintf.c mysys_priv.h
link_sources:
for f in $(mysys_src); do \
rm -f $$f; \
@LN_CP_F@ ../mysys/$$f $$f; \
done;
# Don't update the files from bitkeeper
%::SCCS/s.%
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment