git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1152757 283d02a7-25f6-0310-bc7c-ecb5cbfe19dav3.5.13-sru
parent
42dfcbcc0f
commit
e94d831806
@ -1,17 +1,38 @@
|
|||||||
#MIN_CONFIG
|
#MIN_CONFIG
|
||||||
|
|
||||||
# Check for pkg-config manually first, as if its not installed the
|
AC_ARG_ENABLE(dnssd, [ --disable-dnssd don't require libdns_sd (browsing and publishing DNS-SD services will not be possible) ], with_dnssd=$enableval, with_dnssd=yes)
|
||||||
# PKG_PROG_PKG_CONFIG macro won't be defined.
|
if test "$with_dnssd" = "yes"; then
|
||||||
m4_pattern_allow(PKG_CONFIG_MIN_VERSION)
|
AC_MSG_CHECKING(for DNS-SD support)
|
||||||
AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
|
save_dnssdtest_LIBS="$LIBS"
|
||||||
|
save_dnssdtest_LDFLAGS="$LDFLAGS"
|
||||||
if test x"$have_pkg_config" == xno; then
|
save_dnssdtest_CPPFLAGS="$CPPFLAGS"
|
||||||
AC_MSG_ERROR(pkg-config is required to install this program)
|
LDFLAGS="$all_libraries $LDFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $all_includes"
|
||||||
|
case $host_os in
|
||||||
|
darwin*) LIBS="" ;;
|
||||||
|
*) LIBS="-ldns_sd" ;;
|
||||||
|
esac
|
||||||
|
have_libdns_sd="no"
|
||||||
|
AC_TRY_LINK( [
|
||||||
|
#include <dns_sd.h>
|
||||||
|
],[
|
||||||
|
DNSServiceRefDeallocate( (DNSServiceRef) 0);
|
||||||
|
TXTRecordDeallocate( (TXTRecordRef*) 0);
|
||||||
|
],[
|
||||||
|
AC_DEFINE(HAVE_DNSSD,1,[Define if dns-sd is available])
|
||||||
|
case $host_os in
|
||||||
|
darwin*) LIB_DNSSD="" ;;
|
||||||
|
*) LIB_DNSSD="-ldns_sd" ;;
|
||||||
|
esac
|
||||||
|
have_libdns_sd="yes"
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
LIB_DNSSD=""
|
||||||
|
])
|
||||||
|
CPPFLAGS=$save_dnssdtest_CPPFLAGS
|
||||||
|
LDFLAGS=$save_dnssdtest_LDFLAGS
|
||||||
|
LIBS=$save_dnssdtest_LIBS
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(LIB_DNSSD)
|
||||||
PKG_PROG_PKG_CONFIG
|
AM_CONDITIONAL(HAVE_DNSSD, test "$have_libdns_sd" = "yes")
|
||||||
|
|
||||||
PKG_CHECK_MODULES( AVAHI, [ avahi-qt3 >= 0.4 , avahi-client >= 0.4 ])
|
|
||||||
AC_SUBST(AVAHI_CFLAGS)
|
|
||||||
AC_SUBST(AVAHI_LIBS)
|
|
||||||
PKG_CHECK_EXISTS( [ avahi-client >= 0.6], AC_DEFINE(AVAHI_API_0_6,1,[Avahi API 0.6] ) )
|
|
||||||
|
Loading…
Reference in new issue