3 # AMANDA_CHECK_COMPRESSION
7 # Find a suitable compression program and define the following:
17 AC_DEFUN([AMANDA_CHECK_COMPRESSION],
19 AC_REQUIRE([AMANDA_PROG_CAT])
20 AC_REQUIRE([AMANDA_PROG_COMPRESS])
21 AC_REQUIRE([AMANDA_PROG_GZIP])
24 AC_DEFINE(HAVE_GZIP,1,
25 [Define if Amanda is using the gzip program. ])
28 COMPRESS_FAST_OPT="--fast"
29 COMPRESS_BEST_OPT="--best"
30 UNCOMPRESS_PATH="$GZIP"
33 if test "$COMPRESS"; then
34 COMPRESS_PATH="$COMPRESS"
36 COMPRESS_FAST_OPT="-f"
37 COMPRESS_BEST_OPT="-f"
38 UNCOMPRESS_PATH="$COMPRESS"
41 # If we have to use cat, we don't define COMPRESS_FAST_OPT,
42 # COMPRESS_BEST_OPT, or UNCOMPRESS_OPT as "" since cat will look
43 # look for a file by the name of "".
44 # XXX is the above true? --dustin
46 AMANDA_MSG_WARN([Cannot find either gzip or compress. Using cat.])
51 UNCOMPRESS_PATH="$CAT"
56 AC_DEFINE_UNQUOTED(COMPRESS_PATH,"$COMPRESS_PATH",
57 [Define to the exact path to the gzip or the compress program. ])
58 AC_DEFINE_UNQUOTED(COMPRESS_SUFFIX,"$COMPRESS_SUFFIX",
59 [Define to the suffix for the COMPRESS_PATH compression program. ])
60 AC_DEFINE_UNQUOTED(COMPRESS_FAST_OPT,"$COMPRESS_FAST_OPT",
61 [Define as the command line option for fast compression. ])
62 AC_DEFINE_UNQUOTED(COMPRESS_BEST_OPT,"$COMPRESS_BEST_OPT",
63 [Define as the command line option for best compression. ])
64 AC_DEFINE_UNQUOTED(UNCOMPRESS_PATH,"$UNCOMPRESS_PATH",
65 [Define as the exact path to the gzip or compress command. ])
66 AC_DEFINE_UNQUOTED(UNCOMPRESS_OPT,"$UNCOMPRESS_OPT",
67 [Define as any optional arguments to get UNCOMPRESS_PATH to uncompress. ])
69 # Empty GZIP so that make dist works.