1 Return-Path: <blakej@foo.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 184DE431FB6
\r
6 for <notmuch@notmuchmail.org>; Sat, 3 Nov 2012 20:24:19 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id edyioyUum41W for <notmuch@notmuchmail.org>;
\r
16 Sat, 3 Nov 2012 20:24:18 -0700 (PDT)
\r
17 Received: from foo.net (70-36-235-136.dsl.static.sonic.net [70.36.235.136])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 7B22C431FAE
\r
21 for <notmuch@notmuchmail.org>; Sat, 3 Nov 2012 20:24:18 -0700 (PDT)
\r
22 Received: from foo.net (localhost [127.0.0.1])
\r
23 by foo.net (8.14.5+Sun/8.14.5) with ESMTP id qA43GEIQ025666;
\r
24 Sat, 3 Nov 2012 20:16:14 -0700 (PDT)
\r
25 Received: (from blakej@localhost)
\r
26 by foo.net (8.14.5+Sun/8.14.5/Submit) id qA43GEpO025665;
\r
27 Sat, 3 Nov 2012 20:16:14 -0700 (PDT)
\r
28 From: Blake Jones <blakej@foo.net>
\r
29 To: notmuch@notmuchmail.org
\r
30 Subject: [PATCH 03/10] gethostbyname: check for libnsl (Solaris support)
\r
31 Date: Sat, 3 Nov 2012 20:15:55 -0700
\r
32 Message-Id: <1351998962-25135-4-git-send-email-blakej@foo.net>
\r
33 X-Mailer: git-send-email 1.7.3.2
\r
34 In-Reply-To: <1351998962-25135-1-git-send-email-blakej@foo.net>
\r
35 References: <1351998962-25135-1-git-send-email-blakej@foo.net>
\r
36 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2
\r
37 (foo.net [127.0.0.1]); Sat, 03 Nov 2012 20:16:14 -0700 (PDT)
\r
38 X-Mailman-Approved-At: Sun, 04 Nov 2012 01:30:19 -0800
\r
39 Cc: Blake Jones <blakej@foo.net>
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Sun, 04 Nov 2012 03:24:19 -0000
\r
54 Add a check to "configure" to see whether -lnsl is needed for programs
\r
55 that are using gethostbyname(). This change also adds the file
\r
56 "compat/check_ghbn.c", which configure uses to perform its check.
\r
58 compat/check_ghbn.c | 8 ++++++++
\r
59 configure | 17 ++++++++++++++++-
\r
60 2 files changed, 24 insertions(+), 1 deletion(-)
\r
61 create mode 100644 compat/check_ghbn.c
\r
63 diff --git a/compat/check_ghbn.c b/compat/check_ghbn.c
\r
64 new file mode 100644
\r
65 index 0000000..ec5f227
\r
67 +++ b/compat/check_ghbn.c
\r
73 + (void) gethostbyname(NULL);
\r
77 diff --git a/configure b/configure
\r
78 index 047c011..28d4110 100755
\r
81 @@ -534,6 +534,17 @@ else
\r
83 rm -f compat/check_asctime
\r
85 +printf "Checking whether libnsl is needed for gethostbyname... "
\r
86 +if ${CC} -o compat/check_ghbn "$srcdir"/compat/check_ghbn.c > /dev/null 2>&1
\r
92 + libnsl_ldflags="-lnsl"
\r
94 +rm -f compat/check_ghbn
\r
96 printf "int main(void){return 0;}\n" > minimal.c
\r
98 printf "Checking for rpath support... "
\r
99 @@ -723,6 +734,9 @@ GMIME_LDFLAGS = ${gmime_ldflags}
\r
100 TALLOC_CFLAGS = ${talloc_cflags}
\r
101 TALLOC_LDFLAGS = ${talloc_ldflags}
\r
103 +# Flags needed to get gethostbyname() at link time
\r
104 +LIBNSL_LDFLAGS = ${libnsl_ldflags}
\r
106 # Flags needed to have linker set rpath attribute
\r
107 RPATH_LDFLAGS = ${rpath_ldflags}
\r
109 @@ -757,5 +771,6 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
\r
110 -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\
\r
111 -DSTD_GETPWUID=\$(STD_GETPWUID) \\
\r
112 -DSTD_ASCTIME=\$(STD_ASCTIME)
\r
113 -CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)
\r
114 +CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS) \\
\r
115 + \$(LIBNSL_LDFLAGS)
\r