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