]> arthur.barton.de Git - netatalk.git/commitdiff
New macro to check for AFS support.
authorsrittau <srittau>
Thu, 17 Jan 2002 05:48:51 +0000 (05:48 +0000)
committersrittau <srittau>
Thu, 17 Jan 2002 05:48:51 +0000 (05:48 +0000)
macros/Makefile.am
macros/afs-check.m4 [new file with mode: 0644]

index cc182be722bf0be0b97b33d6e972626fe8cb0e31..7b6c2d181a26cdfb5bf25e42b14151c108c6f225 100644 (file)
@@ -1,4 +1,5 @@
 EXTRA_DIST = \
+       afs-check.m4            \
        db3-check.m4            \
        pam-check.m4            \
        perl-check.m4           \
diff --git a/macros/afs-check.m4 b/macros/afs-check.m4
new file mode 100644 (file)
index 0000000..f252f7c
--- /dev/null
@@ -0,0 +1,23 @@
+dnl $Id: afs-check.m4,v 1.1 2002-01-17 05:48:51 srittau Exp $
+dnl Autoconf macro to check whether AFS support should be enabled
+
+AC_DEFUN([NETATALK_AFS_CHECK], [
+       AFS_LIBS=
+       AFS_CFLAGS=
+
+       AC_ARG_ENABLE(afs,
+               [  --enable-afs            enable AFS support],
+               [
+                       if test "x$enableval" = "xyes"; then
+                               AC_CHECK_LIB(afsauthent, pioctl, ,
+                                       AC_MSG_ERROR([AFS installation not found])
+                               )
+                               AFS_LIBS=-lafsauthent
+                               AC_DEFINE(AFS, 1)
+                       fi
+               ]
+       )
+
+       AC_SUBST(AFS_LIBS)
+       AC_SUBST(AFS_CFLAGS)
+])