Re: [HACKERS] Pg V10: Patch for bug in bonjour support - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Pg V10: Patch for bug in bonjour support
Date
Msg-id 20002.1510178579@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Pg V10: Patch for bug in bonjour support  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: [HACKERS] Pg V10: Patch for bug in bonjour support
List pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> On Thu, Nov 9, 2017 at 10:05 AM, Luke Lonergan <luke@brightforge.com> wrote:
>> +   AC_CHECK_LIB(dns_sd, DNSServiceRefSockFD, [], [AC_MSG_ERROR([library
>> 'dns_sd' is required for Bonjour])])

> It lives in libSystem.dylib (implicitly linked) on macOS, so that
> would break the build there.  We'd need something a bit more
> conditional, but I don't know what.

A quick look at the Autoconf manual finds:
    `AC_CHECK_LIB' requires some care in usage, and should be avoided    in some common cases.  Many standard functions
like`gethostbyname'    appear in the standard C library on some hosts, and in special    libraries like `nsl' on other
hosts. On some hosts the special    libraries contain variant implementations that you may not want to    use.  These
daysit is normally better to use    `AC_SEARCH_LIBS([gethostbyname], [nsl])' instead of    `AC_CHECK_LIB([nsl],
[gethostbyname])'.

If Luke wants to check that that works for him, I can check it on
macOS.
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Lucas B
Date:
Subject: Re: [HACKERS] Early locking option to parallel backup
Next
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] Small improvement to compactify_tuples