Imported Upstream version 3.1.0
[debian/amanda] / config / amanda / ndmp-device.m4
1 # SYNOPSIS
2 #
3 #   AMANDA_NDMP_DEVICE
4 #
5 # OVERVIEW
6 #
7 #   Set up for the 'ndmp' device.  WANT_NDMP_DEVICE is
8 #   defined and AM_CONDITIONAL'd if the ndmp device should be supported,
9 #   and a check is made that NDMP is being built
10 #
11 AC_DEFUN([AMANDA_NDMP_DEVICE], [
12     AC_REQUIRE([AMANDA_CHECK_COMPONENTS])
13
14     AC_ARG_ENABLE([ndmp-device],
15         AS_HELP_STRING([--disable-ndmp-device],
16                        [disable the NDMP device]),
17         [ WANT_NDMP_DEVICE=$enableval ], [ WANT_NDMP_DEVICE=$WANT_NDMP ])
18
19     if test x"$WANT_NDMP" != x"true" -a x"$WANT_NDMP_DEVICE" = x"true"; then
20         AC_MSG_ERROR([NDMP support is required to build the ndmp device (--with-ndmp)])
21     fi
22
23     if test x"$WANT_NDMP_DEVICE" = x"true"; then
24         AC_DEFINE(WANT_NDMP_DEVICE, 1, [Compile NDMP device])
25     fi
26
27     AM_CONDITIONAL([WANT_NDMP_DEVICE], [test x"$WANT_NDMP_DEVICE" = x"true"])
28 ])