summaryrefslogtreecommitdiffstats
path: root/dnssd/configure.in.in
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /dnssd/configure.in.in
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dnssd/configure.in.in')
-rw-r--r--dnssd/configure.in.in38
1 files changed, 38 insertions, 0 deletions
diff --git a/dnssd/configure.in.in b/dnssd/configure.in.in
new file mode 100644
index 000000000..022ffe871
--- /dev/null
+++ b/dnssd/configure.in.in
@@ -0,0 +1,38 @@
+#MIN_CONFIG
+
+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)
+if test "$with_dnssd" = "yes"; then
+AC_MSG_CHECKING(for DNS-SD support)
+save_dnssdtest_LIBS="$LIBS"
+save_dnssdtest_LDFLAGS="$LDFLAGS"
+save_dnssdtest_CPPFLAGS="$CPPFLAGS"
+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
+AC_SUBST(LIB_DNSSD)
+AM_CONDITIONAL(HAVE_DNSSD, test "$have_libdns_sd" = "yes")