1
dnl =================================
2
dnl GGZ Gaming Zone - Zeroconf Macros
3
dnl =================================
5
dnl Looks for zeroconf library implementations and
6
dnl sets up the corresponding variables, that is,
7
dnl $zeroconf for display purposes and LIB_AVAHI/LIB_HOWL/
8
dnl AVAHI_INCLUDES/HOWL_INCLUDES depending on the choice.
10
dnl ------------------------------------------------------------------------
11
dnl Content of this file:
12
dnl ------------------------------------------------------------------------
13
dnl AC_GGZ_ZEROCONF - find a suitable zeroconf implementation
15
dnl ------------------------------------------------------------------------
16
dnl Internal functions:
17
dnl ------------------------------------------------------------------------
18
dnl AC_GGZ_ZEROCONF_HOWL - Howl library
19
dnl AC_GGZ_ZEROCONF_AVAHI - Avahi library
22
dnl Zeroconf checks for Howl and Avahi
23
dnl ==================================
24
AC_DEFUN([AC_GGZ_ZEROCONF],
26
if test "$zeroconf" = yes || test "$zeroconf" = avahi; then
29
if test "$zeroconf" = yes || test "$zeroconf" = howl; then
33
if test "$zeroconf" = "howl"; then
34
AC_DEFINE(WITH_HOWL, 1, [Use howl for zeroconf mechanism])
35
HOWL_INCLUDES="-I/usr/include/howl"
36
LIB_HOWL="-lhowl -lpthread"
37
AC_SUBST(HOWL_INCLUDES)
40
elif test "$zeroconf" = "avahi"; then
41
AC_DEFINE(WITH_AVAHI, 1, [Use avahi for zeroconf mechanism])
42
AVAHI_INCLUDES="-I/usr/include"
43
LIB_AVAHI="-lavahi-client"
44
AC_SUBST(AVAHI_INCLUDES)
47
AC_MSG_WARN([Zeroconf disabled, neither howl nor avahi found.])
52
dnl Check for zeroconf implementation Howl
53
dnl ======================================
54
AC_DEFUN([AC_GGZ_ZEROCONF_HOWL],
56
AC_CHECK_LIB(howl, sw_discovery_init,
58
AC_CHECK_HEADERS([howl/howl_config.h],
63
if test "$zeroconf" = "howl"; then
64
AC_MSG_ERROR([cannot configure howl (headers needed)])
69
if test "$zeroconf" = "howl"; then
70
AC_MSG_ERROR([cannot configure howl (library needed)])
76
dnl Check for zeroconf implementation Avahi
77
dnl =======================================
78
AC_DEFUN([AC_GGZ_ZEROCONF_AVAHI],
80
AC_CHECK_LIB(avahi-client, avahi_entry_group_add_service,
82
AC_CHECK_HEADERS([avahi-client/publish.h],
87
if test "$zeroconf" = "avahi"; then
88
AC_MSG_ERROR([cannot configure avahi (headers needed)])
93
if test "$zeroconf" = "avahi"; then
94
AC_MSG_ERROR([cannot configure avahi (library needed)])