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. One of the conditionals WANT_TAPE_XENIX,
22 # WANT_TAPE_AIX, WANT_TAPE_UWARE, and WANT_TAPE_POSIX will be true; the
23 # corresponding symbols are also DEFINEd. Finally, WANT_TAPE_DEVICE is
24 # defined nad AM_CONDITIONAL'd if the tape device should be supported (if
25 # at least one of the backends is available).
27 # If 'struct mtget' fields mt_flags, mt_fileno, mt_blkno, mt_dsreg, and
28 # mt_erreg, the corresponding HAVE_MT_* is DEFINEd.
30 AC_DEFUN([AMANDA_TAPE_DEVICE], [
37 # check for MTIOCTOP, an indicator of POSIX tape support
38 AC_CACHE_CHECK([for MTIOCTOP], amanda_cv_HAVE_MTIOCTOP,[
40 #ifdef HAVE_SYS_TAPE_H
41 # include <sys/tape.h>
43 #ifdef HAVE_SYS_MTIO_H
44 # include <sys/mtio.h>
47 #error MTIOCTOP not defined
51 amanda_cv_HAVE_MTIOCTOP=yes,
52 amanda_cv_HAVE_MTIOCTOP=no,
53 amanda_cv_HAVE_MTIOCTOP=no)]
55 HAVE_MTIOCTOP=$amanda_cv_HAVE_MTIOCTOP
58 # decide which tape device to compile (arranged in such a way that
59 # only one actually gets compiled)
61 *-ibm-aix*) aix_tapeio=yes ;;
62 *-sysv4.2uw2*) uware_tapeio=yes ;;
63 *-sco3.2v5*) xenix_tapeio=yes ;;
64 i386-pc-isc4*) xenix_tapeio=yes ;;
67 # maybe we have no tape device at all (e.g., Mac OS X)?
68 if test -n "$xenix_tapeio" ||
69 test -n "$aix_tapeio" ||
70 test -n "$uware_tapeio" ||
71 test -n "$HAVE_MTIOCTOP"; then
73 AC_DEFINE(WANT_TAPE_DEVICE, 1, [Define if the tape-device will be built])
76 AM_CONDITIONAL(WANT_TAPE_XENIX, test -n "$xenix_tapeio")
77 AM_CONDITIONAL(WANT_TAPE_AIX, test -n "$aix_tapeio")
78 AM_CONDITIONAL(WANT_TAPE_UWARE, test -n "$uware_tapeio")
79 AM_CONDITIONAL(WANT_TAPE_POSIX, test -n "$HAVE_MTIOCTOP")
80 AM_CONDITIONAL(WANT_TAPE_DEVICE, test -n "$want_tape_device")
82 if test -n "$xenix_tapeio"; then
83 AC_DEFINE(WANT_TAPE_XENIX,1,[Define on XENIX/ISC. ])
86 if test -n "$aix_tapeio"; then
87 AC_DEFINE(WANT_TAPE_AIX,1,[Define on AIX. ])
90 if test -n "$uware_tapeio"; then
91 AC_DEFINE(WANT_TAPE_UWARE,1,[Define on UnixWare. ])
95 # Check for various "mt status" related structure elements.
97 AC_MSG_CHECKING([for mt_flags mtget structure element])
98 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
100 #include <sys/types.h>
101 #include <sys/mtio.h>
109 AC_DEFINE(HAVE_MT_FLAGS,1,
110 [Define if the mtget structure has an mt_flags field])
115 AC_MSG_CHECKING([for mt_fileno mtget structure element])
116 mt_fileno_result="found"
117 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
119 #include <sys/types.h>
120 #include <sys/mtio.h>
128 AC_DEFINE(HAVE_MT_FILENO,1,
129 [Define if the mtget structure has an mt_fileno field])
134 AC_MSG_CHECKING(for mt_blkno mtget structure element)
135 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
137 #include <sys/types.h>
138 #include <sys/mtio.h>
146 AC_DEFINE(HAVE_MT_BLKNO,1,
147 [Define if the mtget structure has an mt_blkno field])
152 AC_MSG_CHECKING(for mt_dsreg mtget structure element)
153 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
155 #include <sys/types.h>
156 #include <sys/mtio.h>
164 AC_DEFINE(HAVE_MT_DSREG,1,
165 [Define if the mtget structure has an mt_dsreg field])
170 AC_MSG_CHECKING(for mt_erreg mtget structure element)
171 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
173 #include <sys/types.h>
174 #include <sys/mtio.h>
182 AC_DEFINE(HAVE_MT_ERREG,1,
183 [Define if the mtget structure has an mt_erreg field])
189 *linux*) AC_DEFINE(DEFAULT_TAPE_NON_BLOCKING_OPEN,1,
190 [Define if open of tape device require O_NONBLOCK]);;