Commit 794b0e2a authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

[trac1999] handle the gtest build from source for pthreads

When built from source it uses GTEST_HAS_PTHREAD.
See $GTEST_SOURCE/include/gtest/internal/gtest-port.h
which defines it for solaris, linux, hpux (which BIND 10 doesn't know yet).
parent 8fccdf26
......@@ -827,13 +827,11 @@ GTEST_LDFLAGS=
GTEST_LDADD=
# TODO: set DISTCHECK_GTEST_CONFIGURE_FLAG for --with-gtest too
DISTCHECK_GTEST_CONFIGURE_FLAG=
if test "x$enable_gtest" = "xyes" ; then
if test -n "$with_gtest_source" ; then
# TODO: actually need to check if needs pthread
GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
if test "x$GTEST_SOURCE" = "xyes" ; then
AC_MSG_CHECKING([for gtest source])
......@@ -859,6 +857,13 @@ GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
GTEST_LDFLAGS="\$(top_builddir)/libgtest.a"
DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest-source=$GTEST_SOURCE"
GTEST_INCLUDES="-I$GTEST_SOURCE -I$GTEST_SOURCE/include"
# See $GTEST_SOURCE/include/gtest/internal/gtest-port.h
# about GTEST_HAS_PTHREAD.
case "$host" in
*-solaris*|*-linux*|*-hpux*)
GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
;;
esac
fi
if test "$gtest_path" != "no" ; then
......
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