X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=config%2Famanda%2Ftape.m4;h=7636c2eefac1f9360fff9e0a23ea8cc015cd6c87;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=d08f27a9a0f0032443096c4a3c96b2a413300bdb;hpb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;p=debian%2Famanda diff --git a/config/amanda/tape.m4 b/config/amanda/tape.m4 index d08f27a..7636c2e 100644 --- a/config/amanda/tape.m4 +++ b/config/amanda/tape.m4 @@ -4,20 +4,12 @@ # # 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 @@ -26,18 +18,12 @@ AC_DEFUN([AMANDA_WITH_MAXTAPEBLOCKSIZE], [ # # 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 \ @@ -66,42 +52,13 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [ 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. # @@ -195,4 +152,9 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [ ],[ 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 ])