dnl dnl Copyright 2007 Intel Corporation dnl dnl Licensed under the Apache License, Version 2.0 (the "License"); dnl you may not use this file except in compliance with the License. dnl You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, software dnl distributed under the License is distributed on an "AS IS" BASIS, dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. dnl See the License for the specific language governing permissions and dnl limitations under the License. dnl dnl dnl Autoconf support for configuring whether Apple's Bonjour stack is dnl available on the system dnl AC_DEFUN(AC_OASYS_CONFIG_BONJOUR, [ AC_ARG_WITH(bonjour, [AC_HELP_STRING([--with-bonjour], [compile in bonjour support (default try)])], [ac_use_bonjour=$withval], [ac_use_bonjour=try]) ac_has_bonjour_lib="no" ac_has_bonjour_h="no" AC_MSG_CHECKING([whether bonjour support should be enabled]) if test "$ac_use_bonjour" = "no"; then AC_MSG_RESULT(no) else AC_MSG_RESULT($ac_use_bonjour) dnl look for the library and the header AC_SEARCH_LIBS(DNSServiceRegister, dns_sd, ac_has_bonjour_lib=yes) AC_CHECK_HEADERS([dns_sd.h], ac_has_bonjour_h=yes) dnl print the result AC_MSG_CHECKING([whether bonjour support was found]) if test "$ac_has_bonjour_lib" = yes -a "$ac_has_bonjour_h" = yes ; then AC_DEFINE(OASYS_BONJOUR_ENABLED, 1, [whether bonjour support is enabled]) AC_MSG_RESULT(yes) elif test "$ac_use_bonjour" = "try" ; then AC_MSG_RESULT(no) else AC_MSG_ERROR([can't find bonjour headers or library]) fi fi ])