8000 Revert "Allow --with-bonjour to work with non-macOS implementations o… · koderP/postgres@3b04eb9 · GitHub
[go: up one dir, main page]

Skip to content
  • Commit 3b04eb9

    Browse files
    committed
    Revert "Allow --with-bonjour to work with non-macOS implementations of Bonjour."
    Upon further review, our Bonjour code doesn't actually work with the Avahi not-too-compatible compatibility library. While you can get it to work on non-macOS platforms if you link to Apple's own mDNSResponder code, there don't seem to be many people who care about that. Leaving in the AC_SEARCH_LIBS call seems more likely to encourage people to build broken configurations than to do anything very useful. Hence, remove the AC_SEARCH_LIBS call and put in a warning comment instead. Discussion: https://postgr.es/m/2D8331C5-D64F-44C1-8717-63EDC6EAF7EB@brightforge.com
    1 parent 0e9294a commit 3b04eb9

    File tree

    2 files changed

    +6
    -60
    lines changed

    2 files changed

    +6
    -60
    lines changed

    configure

    Lines changed: 0 additions & 58 deletions
    Original file line numberDiff line numberDiff line change
    @@ -9848,64 +9848,6 @@ else
    98489848
    fi
    98499849

    98509850

    9851-
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRefSockFD" >&5
    9852-
    $as_echo_n "checking for library containing DNSServiceRefSockFD... " >&6; }
    9853-
    if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
    9854-
    $as_echo_n "(cached) " >&6
    9855-
    else
    9856-
    ac_func_search_save_LIBS=$LIBS
    9857-
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    9858-
    /* end confdefs.h. */
    9859-
    9860-
    /* Override any GCC internal prototype to avoid an error.
    9861-
    Use char because int might match the return type of a GCC
    9862-
    builtin and then its argument prototype would still apply. */
    9863-
    #ifdef __cplusplus
    9864-
    extern "C"
    9865-
    #endif
    9866-
    char DNSServiceRefSockFD ();
    9867-
    int
    9868-
    main ()
    9869-
    {
    9870-
    return DNSServiceRefSockFD ();
    9871-
    ;
    9872-
    return 0;
    9873-
    }
    9874-
    _ACEOF
    9875-
    for ac_lib in '' dns_sd; do
    9876-
    if test -z "$ac_lib"; then
    9877-
    ac_res="none required"
    9878-
    else
    9879-
    ac_res=-l$ac_lib
    9880-
    LIBS="-l$ac_lib $ac_func_search_save_LIBS"
    9881-
    fi
    9882-
    if ac_fn_c_try_link "$LINENO"; then :
    9883-
    ac_cv_search_DNSServiceRefSockFD=$ac_res
    9884-
    fi
    9885-
    rm -f core conftest.err conftest.$ac_objext \
    9886-
    conftest$ac_exeext
    9887-
    if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
    9888-
    break
    9889-
    fi
    9890-
    done
    9891-
    if ${ac_cv_search_DNSServiceRefSockFD+:} false; then :
    9892-
    9893-
    else
    9894-
    ac_cv_search_DNSServiceRefSockFD=no
    9895-
    fi
    9896-
    rm conftest.$ac_ext
    9897-
    LIBS=$ac_func_search_save_LIBS
    9898-
    fi
    9899-
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRefSockFD" >&5
    9900-
    $as_echo "$ac_cv_search_DNSServiceRefSockFD" >&6; }
    9901-
    ac_res=$ac_cv_search_DNSServiceRefSockFD
    9902-
    if test "$ac_res" != no; then :
    9903-
    test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
    9904-
    9905-
    else
    9906-
    as_fn_error $? "could not find function 'DNSServiceRefSockFD' required for Bonjour" "$LINENO" 5
    9907-
    fi
    9908-
    99099851
    fi
    99109852

    99119853
    # for contrib/uuid-ossp

    configure.in

    Lines changed: 6 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1203,8 +1203,12 @@ fi
    12031203

    12041204
    if test "$with_bonjour" = yes ; then
    12051205
    AC_CHECK_HEADER(dns_sd.h, [], [AC_MSG_ERROR([header file <dns_sd.h> is required for Bonjour])])
    1206-
    AC_SEARCH_LIBS(DNSServiceRefSockFD, dns_sd, [],
    1207-
    [AC_MSG_ERROR([could not find function 'DNSServiceRefSockFD' required for Bonjour])])
    1206+
    dnl At some point we might add something like
    1207+
    dnl AC_SEARCH_LIBS(DNSServiceRegister, dns_sd)
    1208+
    dnl but right now, what that would mainly accomplish is to encourage
    1209+
    dnl people to try to use the avahi implementation, which does not work.
    1210+
    dnl If you want to use Apple's own Bonjour code on another platform,
    1211+
    dnl just add -ldns_sd to LIBS manually.
    12081212
    fi
    12091213

    12101214
    # for contrib/uuid-ossp

    0 commit comments

    Comments
     (0)
    0