3 # AMANDA_WITH_MAXTAPEBLOCKSIZE
7 # Implement the deprecated --with-maxtapeblocksize option.
9 AC_DEFUN([AMANDA_WITH_MAXTAPEBLOCKSIZE], [
10 AC_ARG_WITH(maxtapeblocksize, [(deprecated)],
11 [ AMANDA_MSG_WARN([--with-maxtapeblocksize is no longer needed]) ]
21 # Set up for the 'tape' device. WANT_TAPE_DEVICE is defined and
22 # AM_CONDITIONAL'd if the tape device should be supported.
24 # If 'struct mtget' fields mt_flags, mt_fileno, mt_blkno, mt_dsreg, and
25 # mt_erreg, the corresponding HAVE_MT_* is DEFINEd.
27 AC_DEFUN([AMANDA_TAPE_DEVICE], [
34 # check for MTIOCTOP, an indicator of POSIX tape support
35 AC_CACHE_CHECK([for MTIOCTOP], amanda_cv_HAVE_MTIOCTOP,[
37 #ifdef HAVE_SYS_TAPE_H
38 # include <sys/tape.h>
40 #ifdef HAVE_SYS_MTIO_H
41 # include <sys/mtio.h>
44 #error MTIOCTOP not defined
48 amanda_cv_HAVE_MTIOCTOP=yes,
49 amanda_cv_HAVE_MTIOCTOP=no,
50 amanda_cv_HAVE_MTIOCTOP=no)]
52 HAVE_MTIOCTOP=$amanda_cv_HAVE_MTIOCTOP
55 # maybe we have no tape device at all (e.g., Mac OS X)?
56 if test x"$HAVE_MTIOCTOP" = x"yes"; then
58 AC_DEFINE(WANT_TAPE_DEVICE, 1, [Define if the tape-device will be built])
60 AM_CONDITIONAL(WANT_TAPE_DEVICE, test -n "$want_tape_device")
63 # Check for various "mt status" related structure elements.
65 AC_MSG_CHECKING([for mt_flags mtget structure element])
66 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
68 #include <sys/types.h>
77 AC_DEFINE(HAVE_MT_FLAGS,1,
78 [Define if the mtget structure has an mt_flags field])
83 AC_MSG_CHECKING([for mt_fileno mtget structure element])
84 mt_fileno_result="found"
85 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
87 #include <sys/types.h>
96 AC_DEFINE(HAVE_MT_FILENO,1,
97 [Define if the mtget structure has an mt_fileno field])
102 AC_MSG_CHECKING(for mt_blkno mtget structure element)
103 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
105 #include <sys/types.h>
106 #include <sys/mtio.h>
114 AC_DEFINE(HAVE_MT_BLKNO,1,
115 [Define if the mtget structure has an mt_blkno field])
120 AC_MSG_CHECKING(for mt_dsreg mtget structure element)
121 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
123 #include <sys/types.h>
124 #include <sys/mtio.h>
132 AC_DEFINE(HAVE_MT_DSREG,1,
133 [Define if the mtget structure has an mt_dsreg field])
138 AC_MSG_CHECKING(for mt_erreg mtget structure element)
139 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
141 #include <sys/types.h>
142 #include <sys/mtio.h>
150 AC_DEFINE(HAVE_MT_ERREG,1,
151 [Define if the mtget structure has an mt_erreg field])
157 *linux*) AC_DEFINE(DEFAULT_TAPE_NON_BLOCKING_OPEN,1,
158 [Define if open of tape device require O_NONBLOCK]);;