]> arthur.barton.de Git - netatalk.git/blob - macros/afs-check.m4
Merge master
[netatalk.git] / macros / afs-check.m4
1 dnl $Id: afs-check.m4,v 1.4 2005-08-11 20:15:35 didg Exp $
2 dnl Autoconf macro to check whether AFS support should be enabled
3
4 AC_DEFUN([AC_NETATALK_AFS_CHECK], [
5         AFS_LIBS=
6         AFS_CFLAGS=
7
8         netatalk_cv_afs=no
9         AC_ARG_ENABLE(afs,
10                 [  --enable-afs            enable AFS support],
11                 [
12                         if test "x$enableval" = "xyes"; then
13                                 AC_CHECK_LIB(afsauthent, pioctl, netatalk_cv_afs=yes,
14                                         AC_MSG_ERROR([AFS installation not found])
15                                 )
16                                 AFS_LIBS=-lresolv -lafsrpc -lafsauthent
17                                 AC_DEFINE(AFS, 1, [Define if AFS should be used])
18                         fi
19                 ]
20         )
21
22         AC_MSG_CHECKING([whether to enable AFS support])        
23         if test x"$netatalk_cv_afs" = x"yes"; then
24                 AC_MSG_RESULT([yes])
25         else
26                 AC_MSG_RESULT([no])
27         fi
28
29         AC_SUBST(AFS_LIBS)
30         AC_SUBST(AFS_CFLAGS)
31 ])