Commit acbe66e6 authored by unknown's avatar unknown

Fixes problem introduced by non-portable thread library definition in client

makefile.am. Instead of adding lpthread directly it is added $CLIENT_THREAD_LIBS,
which is evaluated during configure.


client/Makefile.am:
  Added portable definition of thread libs in client makefile.am
configure.in:
  Added portable definition of thread libs for client makefile.am
parent 99ebd495
......@@ -48,7 +48,7 @@ mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c \
$(top_srcdir)/mysys/my_vle.c \
$(top_srcdir)/mysys/base64.c
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
mysqlslap_LDADD = $(LDADD) $(CXXLDFLAGS) -lpthread
mysqlslap_LDADD = $(LDADD) $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS)
mysqltestmanager_pwgen_SOURCES = mysqlmanager-pwgen.c
mysqltestmanagerc_SOURCES= mysqlmanagerc.c $(yassl_dummy_link_fix)
mysqlcheck_SOURCES= mysqlcheck.c $(yassl_dummy_link_fix)
......
......@@ -1420,6 +1420,7 @@ AC_MSG_CHECKING("named thread libs:")
if test "$with_named_thread" != "no"
then
LIBS="$with_named_thread $LIBS $with_named_thread"
CLIENT_THREAD_LIBS="$with_named_thread"
with_posix_threads="yes"
AC_MSG_RESULT("$with_named_thread")
else
......@@ -1436,6 +1437,7 @@ else
AC_MSG_CHECKING("for pthread_create in -lpthread");
ac_save_LIBS="$LIBS"
LIBS="$LIBS -lpthread"
CLIENT_THREAD_LIBS="-lpthread"
AC_TRY_LINK(
[#include <pthread.h>],
[ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
......@@ -1444,6 +1446,7 @@ else
if test "$with_posix_threads" = "no"
then
LIBS=" $ac_save_LIBS -lpthreads"
CLIENT_THREAD_LIBS="-lpthreads"
AC_MSG_CHECKING("for pthread_create in -lpthreads");
AC_TRY_LINK(
[#include <pthread.h>],
......@@ -1454,6 +1457,7 @@ else
then
# This is for FreeBSD
LIBS="$ac_save_LIBS -pthread"
CLIENT_THREAD_LIBS="-pthread"
AC_MSG_CHECKING("for pthread_create in -pthread");
AC_TRY_LINK(
[#include <pthread.h>],
......@@ -2469,6 +2473,7 @@ fi
CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
AC_SUBST(CLIENT_LIBS)
AC_SUBST(CLIENT_THREAD_LIBS)
AC_SUBST(NON_THREADED_LIBS)
AC_SUBST(STATIC_NSS_FLAGS)
AC_SUBST(sql_client_dirs)
......
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