#
# OVERVIEW
#
-# Implement the --with-maxtapeblocksize option, and DEFINE and SUBST the
-# result in MAX_TAPE_BLOCk_KB and MAXTAPEBLOCKSIZE, respectively.
+# Implement the deprecated --with-maxtapeblocksize option.
#
AC_DEFUN([AMANDA_WITH_MAXTAPEBLOCKSIZE], [
- AC_ARG_WITH(maxtapeblocksize,
- AS_HELP_STRING([--with-maxtapeblocksize=kb],
- [Maximum size of a tape block (default: 32)]),
- [ MAXTAPEBLOCKSIZE="$withval" ],
- [ MAXTAPEBLOCKSIZE=32 ]
+ AC_ARG_WITH(maxtapeblocksize, [(deprecated)],
+ [ AMANDA_MSG_WARN([--with-maxtapeblocksize is no longer needed]) ]
)
-
- AC_DEFINE_UNQUOTED(MAX_TAPE_BLOCK_KB,($MAXTAPEBLOCKSIZE),
- [Maximum size of a tape block in KBytes.])
- AC_SUBST(MAXTAPEBLOCKSIZE)
])
# SYNOPSIS
#
# OVERVIEW
#
-# Set up for the 'tape' device. One of the conditionals WANT_TAPE_XENIX,
-# WANT_TAPE_AIX, WANT_TAPE_UWARE, and WANT_TAPE_POSIX will be true; the
-# corresponding symbols are also DEFINEd. Finally, WANT_TAPE_DEVICE is
-# defined nad AM_CONDITIONAL'd if the tape device should be supported (if
-# at least one of the backends is available).
+# Set up for the 'tape' device. WANT_TAPE_DEVICE is defined and
+# AM_CONDITIONAL'd if the tape device should be supported.
#
# If 'struct mtget' fields mt_flags, mt_fileno, mt_blkno, mt_dsreg, and
# mt_erreg, the corresponding HAVE_MT_* is DEFINEd.
#
-# Not that most of the checks in this section correspond to the older
-# tapeio (in tape-src/), rather than the new tape device.
-#
AC_DEFUN([AMANDA_TAPE_DEVICE], [
AC_CHECK_HEADERS( \
linux/zftape.h \
HAVE_MTIOCTOP=$amanda_cv_HAVE_MTIOCTOP
)
- # decide which tape device to compile (arranged in such a way that
- # only one actually gets compiled)
- case "$target" in
- *-ibm-aix*) aix_tapeio=yes ;;
- *-sysv4.2uw2*) uware_tapeio=yes ;;
- *-sco3.2v5*) xenix_tapeio=yes ;;
- i386-pc-isc4*) xenix_tapeio=yes ;;
- esac
-
# maybe we have no tape device at all (e.g., Mac OS X)?
- if test -n "$xenix_tapeio" ||
- test -n "$aix_tapeio" ||
- test -n "$uware_tapeio" ||
- test -n "$HAVE_MTIOCTOP"; then
+ if test x"$HAVE_MTIOCTOP" = x"yes"; then
want_tape_device=yes
AC_DEFINE(WANT_TAPE_DEVICE, 1, [Define if the tape-device will be built])
fi
-
- AM_CONDITIONAL(WANT_TAPE_XENIX, test -n "$xenix_tapeio")
- AM_CONDITIONAL(WANT_TAPE_AIX, test -n "$aix_tapeio")
- AM_CONDITIONAL(WANT_TAPE_UWARE, test -n "$uware_tapeio")
- AM_CONDITIONAL(WANT_TAPE_POSIX, test -n "$HAVE_MTIOCTOP")
AM_CONDITIONAL(WANT_TAPE_DEVICE, test -n "$want_tape_device")
- if test -n "$xenix_tapeio"; then
- AC_DEFINE(WANT_TAPE_XENIX,1,[Define on XENIX/ISC. ])
- fi
-
- if test -n "$aix_tapeio"; then
- AC_DEFINE(WANT_TAPE_AIX,1,[Define on AIX. ])
- fi
-
- if test -n "$uware_tapeio"; then
- AC_DEFINE(WANT_TAPE_UWARE,1,[Define on UnixWare. ])
- fi
-
#
# Check for various "mt status" related structure elements.
#
],[
AC_MSG_RESULT(no)
])
+
+ case "$host" in
+ *linux*) AC_DEFINE(DEFAULT_TAPE_NON_BLOCKING_OPEN,1,
+ [Define if open of tape device require O_NONBLOCK]);;
+ esac
])