From 1b7d94138cd9492b4bfda28fad7129bcac6355fc Mon Sep 17 00:00:00 2001
From: "Charles W. Ross" <15680744+cwross@users.noreply.github.com>
Date: Tue, 14 Jul 2020 13:55:34 -0600
Subject: Fix detection of libnetwork


diff --git a/configure.ac b/configure.ac
index 7a2d410..0c9cf73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1085,11 +1085,9 @@ AC_MSG_NOTICE([checking for networking options])
 # ELF runtime link paths), then link will fail and LDAP support won't
 # be detected.
 #
-AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
-	[NETLIBS="-lnsl $NETLIBS"]))
-AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
-	[NETLIBS="-lsocket $NETLIBS"]))
-
+AC_SEARCH_LIBS(gethostbyname, nsl network)
+AC_SEARCH_LIBS(setsockopt, network socket)
+NETLIBS="$LIBS"
 
 #
 # Check standard resolver functions.
@@ -1102,8 +1100,8 @@ if test "$build_dirmngr" = "yes"; then
   # the dirmngr option --standard-resolver.
 
   # the double underscore thing is a glibc-ism?
-  AC_SEARCH_LIBS(res_query,resolv bind,,
-                 AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
+  AC_SEARCH_LIBS(res_query,resolv network bind socket,,
+            AC_SEARCH_LIBS(__res_query,resolv network bind socket,,have_resolver=no))
   AC_SEARCH_LIBS(dn_expand,resolv bind,,
                  AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
 
-- 
2.30.0


From 0f99ded0e89ffb11d07584259ee6367949e0967e Mon Sep 17 00:00:00 2001
From: "Charles W. Ross" <15680744+cwross@users.noreply.github.com>
Date: Tue, 14 Jul 2020 13:59:24 -0600
Subject: Add settings path for Haiku


diff --git a/configure.ac b/configure.ac
index 0c9cf73..6f53cb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -503,6 +503,8 @@ AH_BOTTOM([
 # endif
 #elif defined(__VMS)
 #define GNUPG_DEFAULT_HOMEDIR "/SYS$LOGIN/gnupg"
+#elif defined(__HAIKU__)
+#define GNUPG_DEFAULT_HOMEDIR "~/config/settings/gnupg"
 #else
 #define GNUPG_DEFAULT_HOMEDIR "~/.gnupg"
 #endif
-- 
2.30.0

