mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
126 lines
3.7 KiB
Plaintext
126 lines
3.7 KiB
Plaintext
From ce6d32b33fa2385e4627239a10c12ac7d18a66c5 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
|
Date: Sun, 16 Nov 2014 14:50:17 +0100
|
|
Subject: [PATCH 1/3] configure.ac: Haiku does have a thread-safe getenv
|
|
|
|
Also force HAVE_PTHREAD.
|
|
---
|
|
configure.ac | 19 +++++++++++++++----
|
|
1 file changed, 15 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 0ffe847..0f33189 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -141,6 +141,7 @@ GPG_DEFAULT=no
|
|
GPGSM_DEFAULT=no
|
|
GPGCONF_DEFAULT=no
|
|
G13_DEFAULT=no
|
|
+PTHREAD_LIBS=""
|
|
component_system=None
|
|
have_dosish_system=no
|
|
have_android_system=no
|
|
@@ -186,11 +187,16 @@ case "${host}" in
|
|
AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]),
|
|
build_w32_qt=$enableval)
|
|
;;
|
|
+ *-haiku*)
|
|
+ have_thread_safe_getenv=yes
|
|
+ # Haiku has it in libroot
|
|
+ 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
|
|
+ save_LIBS="$LIBS"
|
|
+ AC_SEARCH_LIBS(pthread_create,pthread,have_pthread=yes)
|
|
+ PTHREAD_LIBS="$LIBS"
|
|
+ LIBS="$save_LIBS"
|
|
|
|
# XXX: Probably use exec-prefix here?
|
|
# GPG_DEFAULT='/usr/bin/gpg'
|
|
@@ -200,6 +206,11 @@ case "${host}" in
|
|
;;
|
|
esac
|
|
|
|
+if test "$have_pthread" = yes; then
|
|
+ AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
|
|
+fi
|
|
+AC_SUBST(PTHREAD_LIBS)
|
|
+
|
|
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 24a23b475810c5a5fba58f3d6615b2811cf07392 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
|
Date: Wed, 19 Nov 2014 21:52:09 +0100
|
|
Subject: [PATCH 2/3] Makefile.am: replace hardcoded -lpthread by an AC_SUBST
|
|
|
|
---
|
|
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..5ac20de 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@
|
|
+ @PTHREAD_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..5261da2 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 @PTHREAD_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
|
|
|
|
|
|
From 82e7a0cfbfea15ffee496882e5fd3cf93325a948 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
|
|
Date: Wed, 26 Nov 2014 02:24:03 +0100
|
|
Subject: [PATCH 3/3] gpgme-config.in: replace hardcoded -lpthread by an
|
|
AC_SUBST
|
|
|
|
---
|
|
src/gpgme-config.in | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/gpgme-config.in b/src/gpgme-config.in
|
|
index 4be1e08..bf83deb 100644
|
|
--- a/src/gpgme-config.in
|
|
+++ b/src/gpgme-config.in
|
|
@@ -33,7 +33,7 @@ gpg_error_libs="@GPG_ERROR_LIBS@"
|
|
thread_modules=""
|
|
|
|
@HAVE_PTHREAD_TRUE@thread_modules="$thread_modules pthread"
|
|
-libs_pthread="-lpthread"
|
|
+libs_pthread="@PTHREAD_LIBS@"
|
|
cflags_pthread=""
|
|
|
|
# Configure glib.
|
|
--
|
|
1.8.3.4
|
|
|