diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-04-07 23:18:19 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-04-08 00:04:26 +0200 |
commit | a0fa4628c6fc31150621c685d99c7683a768872a (patch) | |
tree | 61ad450fa5a3cb1b5f5fbc49ebb10d50b5ebbd92 | |
parent | afd9a2e2826a901d26448b3754ebcdf5aad8cbcc (diff) | |
download | gnutls-a0fa4628c6fc31150621c685d99c7683a768872a.tar.gz |
avoid checking or linking with libpthread in windows
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | lib/Makefile.am | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index cb804631ea..6025d9a89d 100644 --- a/configure.ac +++ b/configure.ac @@ -145,15 +145,18 @@ AC_C_BIGENDIAN dnl No fork on MinGW, disable some self-tests until we fix them. dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs) -AC_CHECK_FUNCS([fork getrusage getpwuid_r nanosleep daemon getpid clock_gettime pthread_mutex_lock iconv localtime vasprintf],,) +AC_CHECK_FUNCS([fork getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf],,) AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no") AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h> #include <signal.h> ], [timer_create (0,0,0);]) -if test "$ac_cv_func_pthread_mutex_lock" != "yes";then - AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);]) +if test "$have_win" != "yes";then + if test "$ac_cv_func_pthread_mutex_lock" != "yes";then + AC_CHECK_FUNCS([pthread_mutex_lock],,) + AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);]) + fi fi if test "$ac_cv_func_nanosleep" != "yes";then diff --git a/lib/Makefile.am b/lib/Makefile.am index 3abf259315..92e3e2335a 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -129,13 +129,17 @@ libgnutls_la_LIBADD = ../gl/libgnu.la x509/libgnutls_x509.la \ auth/libgnutls_auth.la algorithms/libgnutls_alg.la \ extras/libgnutls_extras.la thirdparty_libadd = $(LTLIBZ) $(LTLIBINTL) $(LIBSOCKET) \ - $(LTLIBPTHREAD) $(LTLIBICONV) $(P11_KIT_LIBS) $(LIB_SELECT) $(TSS_LIBS) \ + $(LTLIBICONV) $(P11_KIT_LIBS) $(LIB_SELECT) $(TSS_LIBS) \ $(LTLIBICONV) if ENABLE_NETTLE libgnutls_la_LIBADD += accelerated/libaccelerated.la endif +if !WINDOWS +thirdparty_libadd += $(LTLIBPTHREAD) +endif + if NEEDS_LIBRT thirdparty_libadd += $(LTLIBRT) endif |