1 dnl Check for optional server location protocol support (used by MacOS X)
3 dnl $Id: srvloc.m4,v 1.8.6.1 2003-10-29 23:53:24 bfernhomberg Exp $
5 AC_DEFUN([NETATALK_SRVLOC], [
13 [ --enable-srvloc[[=DIR]] enable Server Location Protocol (SLP) support [[auto]]],
18 if test "x$srvloc" != "xno"; then
20 savedcppflags="$CPPFLAGS"
21 savedldflags="$LDFLAGS"
22 if test "x$srvloc" = "xyes" -o "x$srvloc" = "xtry"; then
27 CPPFLAGS="$CPPFLAGS -I$srvlocdir/include"
28 LDFLAGS="$LDFLAGS -L$srvlocdir/lib"
30 AC_MSG_CHECKING([for slp.h])
31 AC_TRY_CPP([#include <slp.h>],
41 if test "x$found_slp" = "xyes"; then
42 AC_CHECK_LIB(slp, SLPOpen, [
43 SLP_LIBS="-L$srvlocdir/lib -lslp"
44 SLP_CFLAGS="-I$srvlocdir/include"
51 CPPFLAGS="$savedcppflags"
52 LDFLAGS="$savedldflags"
56 AC_MSG_CHECKING([whether to enable srvloc (SLP) support])
57 if test "x$found_slp" = "xyes"; then
59 AC_DEFINE(USE_SRVLOC, 1, [Define to enable SLP support])
60 netatalk_cv_srvloc=yes
63 if test "x$srvloc" != "xno" -a "x$srvloc" != "xtry"; then
64 AC_MSG_ERROR([SLP installation not found])
70 LIB_REMOVE_USR_LIB(SLP_LIBS)
71 CFLAGS_REMOVE_USR_INCLUDE(SLP_CFLAGS)