3 # Get default settings for various configuration and command-line options:
5 # define and substitute DEFAULT_SERVER
7 # define and substitute DEFAULT_CONFIG
9 # define and substitute DEFAULT_TAPE_SERVER
11 # define and substitute DEFAULT_TAPE_DEVICE; substitue EXAMPLE_TAPEDEV
13 # define and substitute DEFAULT_AMANDATES_FILE
15 AC_DEFUN([AMANDA_SETUP_DEFAULTS],
17 #allow configure CONFIG_CLOBBER_MY_CONFIG= to be used by make.
18 CONFIG_CLOBBER_MY_CONFIG=$CLOBBER_MY_CONFIG
19 AC_SUBST(CONFIG_CLOBBER_MY_CONFIG)
21 AC_ARG_WITH(index-server,
22 AS_HELP_STRING([--with-index-server=HOST],
23 [default amanda index server (default: `uname -n`)]),
26 "" | y | ye | yes | n | no)
27 AC_MSG_ERROR([*** You must supply an argument to the --with-index-server option.])
29 *) DEFAULT_SERVER="$withval"
33 : ${DEFAULT_SERVER=`uname -n`}
35 AC_DEFINE_UNQUOTED(DEFAULT_SERVER,"$DEFAULT_SERVER",
36 [This is the default Amanda index server.])
37 AC_SUBST(DEFAULT_SERVER)
40 AS_HELP_STRING([--with-config=CONFIG],
41 [default amanda configuration (default: DailySet1)]),
44 "" | y | ye | yes | n | no)
45 AC_MSG_ERROR([*** You must supply an argument to the --with-config option.])
47 *) DEFAULT_CONFIG="$withval"
51 : ${DEFAULT_CONFIG=DailySet1}
53 AC_DEFINE_UNQUOTED(DEFAULT_CONFIG,"$DEFAULT_CONFIG",
54 [This is the default Amanda configuration.])
55 AC_SUBST(DEFAULT_CONFIG)
57 AC_ARG_WITH(tape-server,
58 AS_HELP_STRING([--with-tape-server=HOST],
59 [default tape server for restore (default: same as index-server)]),
62 "" | y | ye | yes | n | no)
63 AC_MSG_ERROR([*** You must supply an argument to the --with-tape-server option.])
65 *) DEFAULT_TAPE_SERVER="$withval"
69 : ${DEFAULT_TAPE_SERVER=$DEFAULT_SERVER}
71 AC_DEFINE_UNQUOTED(DEFAULT_TAPE_SERVER,"$DEFAULT_TAPE_SERVER",
72 [This is the default restoring Amanda tape server. ])
73 AC_SUBST(DEFAULT_TAPE_SERVER)
75 AC_ARG_WITH(tape-device,
76 AS_HELP_STRING([--with-tape-device=DEVICE],
77 [default device on restore tape server]),
80 "" | y | ye | yes | n | no)
81 AC_MSG_ERROR([*** You must supply an argument to the --with-tape-device option.])
83 *) DEFAULT_TAPE_DEVICE="$withval"
89 AC_DEFINE_UNQUOTED(DEFAULT_TAPE_DEVICE,"$DEFAULT_TAPE_DEVICE",
90 [This is the default no-rewinding tape device. ])
91 AC_SUBST(DEFAULT_TAPE_DEVICE)
93 if test "${DEFAULT_TAPE_DEVICE+set}" = "set"; then
94 EXAMPLE_TAPEDEV="$DEFAULT_TAPE_DEVICE"
96 EXAMPLE_TAPEDEV="tape:/dev/YOUR-TAPE-DEVICE-HERE"
98 AC_SUBST(EXAMPLE_TAPEDEV)
100 AC_ARG_WITH(changer-device,
101 AS_HELP_STRING([--with-changer-device=DEV],
104 AMANDA_MSG_WARN([--with-changer-device is no longer used.])
108 AC_ARG_WITH(amandates,
109 AS_HELP_STRING([--with-amandates],
110 [default location for 'amandates' (default: $localstatedir/amanda/amandates)]),
113 n | no) AC_MSG_ERROR([*** --without-amandates is not allowed.]);;
114 y | ye | yes) amandates='$localstatedir/amanda/amandates' ;;
115 *) amandates="$withval";;
118 [amandates='$localstatedir/amanda/amandates']
121 AC_DEFINE_DIR([DEFAULT_AMANDATES_FILE], [amandates],
122 [Default location for 'amandates'])
124 DEFAULT_FSF_AFTER_FILEMARK="FALSE"
126 *-solaris*) DEFAULT_FSF_AFTER_FILEMARK="TRUE"
129 AC_DEFINE_UNQUOTED(DEFAULT_FSF_AFTER_FILEMARK, $DEFAULT_FSF_AFTER_FILEMARK,
130 [Define if a FSF is needed on filemark.])