Thanks very much for the hint. It would be nice if instead of that error message one got "you tried to use a tape: device but amanda is configured without tape drive support".
The problem is that the tests for the tape drive don't include the
required prereqs; I realize the rules for this differ. The following
isn't really the right fix, but make this compile and pass amcheck. I
have not checked that it is all necessary. If sys/time.h is more or
less universal (sys/types.h is already unconditionally included in some
tests), then it might be totally ok to just add them.
--- config/amanda/tape.m4.orig 2012-02-21 11:36:49.000000000 +0000
+++ config/amanda/tape.m4
@@ -34,6 +34,8 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [
# check for MTIOCTOP, an indicator of POSIX tape support
AC_CACHE_CHECK([for MTIOCTOP], amanda_cv_HAVE_MTIOCTOP,[
AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/time.h>
#ifdef HAVE_SYS_TAPE_H
# include <sys/tape.h>
#endif
@@ -66,6 +68,7 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <sys/types.h>
+#include <sys/time.h>
#include <sys/mtio.h>
]], [[
struct mtget buf;
@@ -85,6 +88,7 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <sys/types.h>
+#include <sys/time.h>
#include <sys/mtio.h>
]], [[
struct mtget buf;
@@ -139,6 +143,7 @@ AC_DEFUN([AMANDA_TAPE_DEVICE], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <sys/types.h>
+#include <sys/time.h>
#include <sys/mtio.h>
]], [[
struct mtget buf;
pgpLRNltQSDk1.pgp
Description: PGP signature
