From 9d2d28bfa7cbbdfef179c5fb4a29e777c092bf8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 16 Nov 2014 14:50:17 +0100 Subject: [PATCH 1/2] configure.ac: Haiku does have a thread-safe getenv Also force HAVE_PTHREAD. --- configure.ac | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 0ffe847..890b682 100644 --- a/configure.ac +++ b/configure.ac @@ -186,11 +186,12 @@ case "${host}" in AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]), build_w32_qt=$enableval) ;; + *-haiku*) + have_thread_safe_getenv=yes + AC_CHECK_FUNC(pthread_create,have_pthread=yes) + ;; *) AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes) - if test "$have_pthread" = yes; then - AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) - fi # XXX: Probably use exec-prefix here? # GPG_DEFAULT='/usr/bin/gpg' @@ -200,6 +201,10 @@ case "${host}" in ;; esac +if test "$have_pthread" = yes; then + AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) +fi + if test "$have_dosish_system" = yes; then AC_DEFINE(HAVE_DOSISH_SYSTEM,1, [Defined if we run on some of the PCDOS like systems -- 1.8.3.4 From 3914cec87c354b9726af7612ed23f945bdab5092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 19 Nov 2014 21:52:09 +0100 Subject: [PATCH 2/2] Makefile.am: remove hardcoded -lpthread --- src/Makefile.am | 2 +- tests/gpg/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index b7ddbc1..258aab8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -185,7 +185,7 @@ libgpgme_pthread_la_LDFLAGS = $(no_undefined) $(export_symbols) \ @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@ libgpgme_pthread_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers libgpgme_pthread_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \ - -lpthread @GPG_ERROR_LIBS@ + @LIBS@ @GPG_ERROR_LIBS@ if BUILD_W32_GLIB libgpgme_glib_la_LDFLAGS = $(no_undefined) \ diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am index 5c1266e..484226f 100644 --- a/tests/gpg/Makefile.am +++ b/tests/gpg/Makefile.am @@ -61,7 +61,7 @@ INCLUDES = -I$(top_builddir)/src AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ LDADD = ../../src/libgpgme.la -t_thread1_LDADD = ../../src/libgpgme-pthread.la -lpthread +t_thread1_LDADD = ../../src/libgpgme-pthread.la @LIBS@ # We don't run t-genkey in the test suite, because it takes too long noinst_PROGRAMS = $(c_tests) t-genkey -- 1.8.3.4