X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=config%2Famanda%2Fdumpers.m4;h=15daed79420d602a5c89e84c567ae3c42a2e19b4;hb=66086d646c4cc92cf582b6765b315060117c6ec4;hp=3763d4e9640b94a0b46d9e9546fdf2e63834682d;hpb=79cdc4b6ea8848b21ba4a0e7d2fd3bc401e0bebe;p=debian%2Famanda diff --git a/config/amanda/dumpers.m4 b/config/amanda/dumpers.m4 index 3763d4e..15daed7 100644 --- a/config/amanda/dumpers.m4 +++ b/config/amanda/dumpers.m4 @@ -36,20 +36,25 @@ AC_DEFUN([AMANDA_PROG_GNUTAR], if test "x$GNUTAR" = "xno"; then GNUTAR= else + OLD_GNUTAR=$GNUTAR for gnutar_name in gtar gnutar tar; do AC_PATH_PROGS(GNUTAR, $gnutar_name, , $LOCSYSPATH) if test -n "$GNUTAR"; then - case "`\"$GNUTAR\" --version 2>&1`" in + case `"$GNUTAR" --version 2>&1` in *GNU*tar* | *Free*paxutils* ) # OK, it is GNU tar break ;; *) - # warning.. - AMANDA_MSG_WARN([$GNUTAR is not GNU tar, so it will not be used.]) - # reset the cache for GNUTAR so AC_PATH_PROGS will search again - GNUTAR='' - unset ac_cv_path_GNUTAR + if test -n "$OLD_GNUTAR"; then + AMANDA_MSG_WARN([$GNUTAR is not GNU tar, it will be used.]) + else + # warning.. + AMANDA_MSG_WARN([$GNUTAR is not GNU tar, so it will not be used.]) + # reset the cache for GNUTAR so AC_PATH_PROGS will search again + GNUTAR='' + unset ac_cv_path_GNUTAR + fi ;; esac fi @@ -64,6 +69,121 @@ AC_DEFUN([AMANDA_PROG_GNUTAR], AC_SUBST(GNUTAR) ]) +# SYNOPSIS +# +# AMANDA_PROG_STAR +# +# OVERVIEW +# +# Search for a 'star' binary, placing the result in the precious +# variable STAR. The discovered binary is tested to ensure it's really +# star. +# +# Also handle --with-star +# +AC_DEFUN([AMANDA_PROG_STAR], +[ + AC_REQUIRE([AMANDA_INIT_PROGS]) + + # call with + AC_ARG_WITH(star, + AS_HELP_STRING([--with-star=PROG], + [use PROG as 'star']), + [ + # check withval + case "$withval" in + /*) STAR="$withval";; + y|ye|yes) :;; + n|no) STAR=no ;; + *) AC_MSG_ERROR([*** You must supply a full pathname to --with-star]);; + esac + # done + ] + ) + + if test "x$STAR" = "xno"; then + STAR= + else + OLD_STAR=$STAR + AC_PATH_PROGS(STAR, star, , $LOCSYSPATH) + if test -n "$STAR"; then + case `"$STAR" --version 2>/dev/null` in + *star*) + # OK, it is star + break + ;; + *) + if test -n "$OLD_STAR"; then + AMANDA_MSG_WARN([$STAR is not star, it will be used.]) + else + # warning.. + AMANDA_MSG_WARN([$STAR is not star, so it will not be used.]) + # reset the cache for STAR so AC_PATH_PROGS will search again + STAR='' + unset ac_cv_path_STAR + fi + ;; + esac + fi + fi + + if test "x$STAR" != "x"; then + # define unquoted + AC_DEFINE_UNQUOTED(STAR, "$STAR", [Location of the 'star' binary]) + fi + AC_ARG_VAR(STAR, [Location of the 'star' binary]) + AC_SUBST(STAR) +]) + +# SYNOPSIS +# +# AMANDA_PROG_SUNTAR +# +# OVERVIEW +# +# Use the value given with the option --with-suntar= or the value of the +# precious variable SUNTAR to define the location of Sun's version of tar. +# Otherwise set the value to /usr/sbin/tar. Value is not checked. +# +# Also handle --with-suntar +# +AC_DEFUN([AMANDA_PROG_SUNTAR], +[ + AC_REQUIRE([AMANDA_INIT_PROGS]) + + # call with + AC_ARG_WITH(suntar, + AS_HELP_STRING([--with-suntar=PROG], + [use PROG as 'suntar']), + [ + # check withval + case "$withval" in + /*) SUNTAR="$withval";; + y|ye|yes) :;; + n|no) SUNTAR=no ;; + *) AC_MSG_ERROR([*** You must supply a full pathname to --with-suntar]);; + esac + # done + ], + [ + if test "x$SUNTAR" == "x"; then + SUNTAR="/usr/sbin/tar" + fi + ] + ) + + if test "x$SUNTAR" = "xno"; then + SUNTAR= + fi + + if test "x$SUNTAR" != "x"; then + # define unquoted + AC_DEFINE_UNQUOTED(SUNTAR, "$SUNTAR", [Location of the 'suntar' binary]) + fi + AC_ARG_VAR(SUNTAR, [Location of the 'suntar' binary]) + AC_SUBST(SUNTAR) +]) + # SYNOPSIS # # AMANDA_PROG_SAMBA_CLIENT @@ -107,7 +227,7 @@ AC_DEFUN([AMANDA_PROG_SAMBA_CLIENT], AC_PATH_PROG(SAMBA_CLIENT,smbclient,,$LOCSYSPATH) smbversion=0 if test ! -z "$SAMBA_CLIENT"; then - case "`\"$SAMBA_CLIENT\" '\\\\nosuchhost.amanda.org\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in + case `"$SAMBA_CLIENT" '\\\\nosuchhost.amanda.org\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1` in *"Unknown host"*) smbversion=1 ;; @@ -236,7 +356,7 @@ AC_DEFUN([AMANDA_PROG_DUMP_RESTORE], DUMP_PROGRAMS="ufsdump dump backup" DUMP_RETURNS_1= AIX_BACKUP= - case "$target" in + case "$host" in *-dg-*) DUMP_PROGRAMS="dump "$DUMP_PROGRAMS DUMP_RETURNS_1=1 @@ -383,7 +503,7 @@ AC_DEFUN([AMANDA_CHECK_USE_RUNDUMP], [ USE_RUNDUMP=no # some systems require rundump unconditionally - case "$target" in + case "$host" in *-ultrix*) USE_RUNDUMP=yes ;; *-dg-*) USE_RUNDUMP=yes ;; esac