$NetBSD: patch-ae,v 1.9 2008/02/15 16:23:09 gdt Exp $ --- configure.in.orig 2007-06-06 19:22:24.000000000 -0400 +++ configure.in @@ -1838,6 +1838,44 @@ if test "$DUMP" -a "$RESTORE"; then AC_DEFINE(HAVE_HONOR_NODUMP,1,[Define this if dump accepts -h for honoring nodump. ]) fi ]) + AC_ARG_WITH(dump-use-snapshot, + [ --with-dump-use-snapshot if dump supports -X, use it], + [ if test -x $DUMP; then + AC_CACHE_CHECK( + [whether $DUMP supports -X (use filesystem snapshot)], + amanda_cv_use_snapshot, + [ + case "$DUMP" in + *dump) + AC_TRY_COMMAND($DUMP 9Xf /dev/null /dev/null/invalid/fs 2>&1 + | $GREP -v Dumping + | $GREP -v Date + | $GREP -v Label >conftest.d-x 2>&1) + cat conftest.d-x >&AS_MESSAGE_LOG_FD() + AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1 + | $GREP -v Dumping + | $GREP -v Date + | $GREP -v Label >conftest.d 2>&1) + cat conftest.d >&AS_MESSAGE_LOG_FD() + if AC_TRY_COMMAND(diff conftest.d-x conftest.d 1>&2); then + amanda_cv_use_snapshot=yes + else + amanda_cv_use_snapshot=no + fi + rm -f conftest.d conftest.d-x + ;; + *) amanda_cv_use_snapshot=no + ;; + esac + ]) + else + AC_MSG_WARN([*** $DUMP is not executable, cannot run -X test]) + amanda_cv_use_snapshot=no + fi + if test "$amanda_cv_use_snapshot" = yes; then + AC_DEFINE(HAVE_DUMP_SNAPSHOT,1,[Define this if dump accepts -X for using snapshots. ]) + fi + ]) fi AC_PATH_PROGS(XFSDUMP,xfsdump,,$SYSLOCPATH)