3 AC_CONFIG_SRCDIR([common-src/amanda.h])
4 AC_CONFIG_AUX_DIR(config)
5 AC_CANONICAL_TARGET([])
8 CONFIGURE_COMMAND="'$0'"
10 CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
12 AC_DEFINE_UNQUOTED(CONFIGURE_COMMAND,"$CONFIGURE_COMMAND",
13 [Saves the original ./configure command line arguments])
14 AC_SUBST(CONFIGURE_COMMAND)
16 AM_INIT_AUTOMAKE(amanda, 2.5.2p1)
17 AM_CONFIG_HEADER(config/config.h)
19 AC_PREREQ(2.59) dnl Minimum Autoconf version required.
21 if test -f "$srcdir/SNAPSHOT"; then
22 cat < "$srcdir/SNAPSHOT"
24 snapdate=`sed -n '/^Snapshot Date: \([0-9]*\)/ s//\1/p' < $srcdir/SNAPSHOT`
26 test -z "$snapdate" || VERSION="$VERSION-$snapdate"
27 SNAPSHOT_STAMP=SNAPSHOT
31 AC_SUBST(SNAPSHOT_STAMP)
33 if test -f config.local; then
34 echo "running local script ./config.local"
39 dnl Set the version number of this release of Amanda from the VERSION
40 dnl string, which is set in AM_INIT_AUTOMAKE.
43 VERSION_MAJOR=`expr "$VERSION" : '\([0-9]*\)'`
44 VERSION_MINOR=`expr "$VERSION" : '[0-9]*\.\([0-9]*\)'`
45 VERSION_PATCH=`expr "$VERSION" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
46 VERSION_COMMENT=\"`expr "$VERSION" : '[0-9]*\.[0-9]*\.[0-9]*\(.*\)'`\"
49 VERSION_SUFFIX="$VERSION"
50 AC_SUBST(VERSION_MAJOR)
51 AC_SUBST(VERSION_MINOR)
52 AC_SUBST(VERSION_PATCH)
53 AC_SUBST(VERSION_COMMENT)
54 AC_SUBST(VERSION_SUFFIX)
57 dnl runtime and compile time paths
59 SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/opt/SUNWspro/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc"
61 test "x$prefix" = xNONE && prefix=$ac_default_prefix
62 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
63 eval echo "$libexecdir:$PATH:/usr/local/sbin:/usr/local/bin:/usr/ccs/bin"
65 SYSLOCPATH="$SYSPATH:$LOCPATH"
66 LOCSYSPATH="$LOCPATH:$SYSPATH"
69 dnl Set up compiler location, basic CFLAGS, and include locations
70 dnl and library locations before we start checking the system
71 dnl configuration in more detail...
75 [ --with-cflags=CFLAGS arguments to the c compiler (-Wall, -g, etc)],
78 "" | y | ye | yes | n | no)
79 AC_MSG_ERROR([*** You must supply an argument to the --with-cflags option.])
85 CFLAGS="-D_GNU_SOURCE $CFLAGS"
95 dnl Process tool locations for tools we need right away to configure.
97 AC_PATH_PROGS(GREP,grep,,$LOCSYSPATH)
98 if test -z "$GREP"; then
101 AC_DEFINE_UNQUOTED(GREP,"$GREP",[Define the location of the grep program. ])
102 AC_PATH_PROGS(EGREP,egrep,,$LOCSYSPATH)
104 AC_PATH_PROGS(AMLINT,lint,,/opt/SUNWspro/bin:$SYSLOCPATH)
105 if test ! -z "$AMLINT"; then
106 $AMLINT -flags | $GREP -- '-errfmt=' 2>&1 > /dev/null
107 if test $? -eq 0; then
108 AMLINTFLAGS="-n -s -u -m -x"
109 AMLINTFLAGS="$AMLINTFLAGS -errchk=%all"
110 AMLINTFLAGS="$AMLINTFLAGS -errfmt=macro"
111 AMLINTFLAGS="$AMLINTFLAGS -errhdr=no%/usr/include"
112 AMLINTFLAGS="$AMLINTFLAGS -errhdr=%user"
113 AMLINTFLAGS="$AMLINTFLAGS -errsecurity=extended"
114 AMLINTFLAGS="$AMLINTFLAGS -errtags=yes"
115 AMLINTFLAGS="$AMLINTFLAGS -Ncheck=%all"
116 AMLINTFLAGS="$AMLINTFLAGS -Nlevel=2"
117 AMLINTFLAGS="$AMLINTFLAGS -erroff=E_ASGN_NEVER_USED"
118 AMLINTFLAGS="$AMLINTFLAGS,E_ASGN_RESET"
119 AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_CONST_TO_SMALL_INT"
120 AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_TO_SMALL_INT"
121 AMLINTFLAGS="$AMLINTFLAGS,E_CAST_UINT_TO_SIGNED_INT"
122 AMLINTFLAGS="$AMLINTFLAGS,E_CONSTANT_CONDITION"
123 AMLINTFLAGS="$AMLINTFLAGS,E_ENUM_UNUSE"
124 AMLINTFLAGS="$AMLINTFLAGS,E_EXPR_NULL_EFFECT"
125 AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_ALWAYS_IGNOR"
126 AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_MAYBE_IGNORED"
127 AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK0"
128 AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK1"
129 AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK2"
130 AMLINTFLAGS="$AMLINTFLAGS,E_INCL_MNUSD"
131 AMLINTFLAGS="$AMLINTFLAGS,E_INCL_NUSD"
132 AMLINTFLAGS="$AMLINTFLAGS,E_MCR_NODIFF"
133 AMLINTFLAGS="$AMLINTFLAGS,E_NAME_MULTIPLY_DEF"
134 AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_NULL_PSBL"
135 AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_SUSP"
136 AMLINTFLAGS="$AMLINTFLAGS,E_PTRDIFF_OVERFLOW"
137 AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_NULL_PSBL"
138 AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_SUSP"
139 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_ACCESS_WARN"
140 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHDIR_WARN"
141 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHMOD_WARN"
142 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CREAT_WITHOUT_EXCL"
143 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_PATH"
144 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_WARN"
145 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_FOPEN_MODE"
146 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_GETENV_WARN"
147 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_MKDIR_WARN"
148 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_PRINTF_VAR_FMT"
149 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_RAND_WARN"
150 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SCANF_VAR_FMT"
151 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SELECT_WARN"
152 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SHELL_WARN"
153 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_STRNCPY_WARN"
154 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_UMASK_WARN"
155 AMLINTFLAGS="$AMLINTFLAGS,E_SEC_USE_AFTER_STAT"
156 AMLINTFLAGS="$AMLINTFLAGS,E_SIGN_EXTENSION_PSBL"
157 AMLINTFLAGS="$AMLINTFLAGS,E_TYPEDEF_UNUSE"
158 AMLINTFLAGS="$AMLINTFLAGS,E_UNCAL_F"
163 AC_PATH_PROGS(AMLINT,splint,,$SYSLOCPATH)
164 if test ! -z "$AMLINT"; then
167 AMLINTFLAGS='+show-scan +unixlib -weak -globs +usedef +usereleased +impouts -paramimptemp -varuse -warnposix -redef -preproc -fixedformalarray -retval -unrecog -usevarargs -formatcode'
169 AC_SUBST(AMLINTFLAGS)
171 AC_ARG_WITH(includes,
172 [ --with-includes=DIR site header files for readline, etc in DIR],
175 "" | y | ye | yes | n | no)
176 AC_MSG_ERROR([*** You must supply an argument to the --with-includes option.])
179 INCLUDE_DIRS="$withval"
182 if test "$INCLUDE_DIRS"; then
183 for dir in $INCLUDE_DIRS; do
184 if test -d "$dir"; then
185 AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS -I$dir"
187 AC_MSG_WARN([*** Include directory $dir does not exist.])
192 AC_ARG_WITH(libraries,
193 [ --with-libraries=DIR site library directories for readline, etc in DIR],
196 "" | y | ye | yes | n | no)
197 AC_MSG_ERROR([*** You must supply an argument to the --with-libraries option.])
200 LIBRARY_DIRS="$withval"
203 if test "$LIBRARY_DIRS"; then
204 for dir in $LIBRARY_DIRS; do
205 if test -d "$dir"; then
207 *-solaris2*,*-netbsd*)
208 AMANDA_LDFLAGS="$AMANDA_LDFLAGS -R$dir"
211 AMANDA_LDFLAGS="$AMANDA_LDFLAGS -L$dir"
213 AC_MSG_WARN([*** Library directory $dir does not exist.])
219 dnl Process configuration flags
222 AC_ARG_WITH(dumperdir,
223 [ --with-dumperdir=DIR where we install the dumpers [[EPREFIX/dumper]]],
226 "" | y | ye | yes | n | no)
227 AC_MSG_ERROR([*** You must supply an argument to the --with-dumperdir option.])
230 DUMPER_DIR="$withval"
232 test "x$prefix" = xNONE && prefix=$ac_default_prefix
233 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
234 DUMPER_DIR=$exec_prefix/dumper
238 test "x$prefix" = xNONE && prefix=$ac_default_prefix
239 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
240 eval echo "$DUMPER_DIR"
242 AC_DEFINE_UNQUOTED(DUMPER_DIR,"$DUMPER_DIR",[Directory in which dumper interfaces should be installed and searched. ])
245 AC_ARG_WITH(configdir,
246 [ --with-configdir=DIR runtime config files in DIR [[sysconfdir/amanda]]],
249 "" | y | ye | yes | n | no)
250 AC_MSG_ERROR([*** You must supply an argument to the --with-configdir option.])
252 *) CONFIG_DIR="$withval"
256 : ${CONFIG_DIR="$sysconfdir/amanda"}
259 test "x$prefix" = xNONE && prefix=$ac_default_prefix
260 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
261 eval echo "$CONFIG_DIR"
263 AC_DEFINE_UNQUOTED(CONFIG_DIR,"$CONFIG_DIR",
264 [The directory in which configuration directories should be created. ])
267 AC_ARG_WITH(indexdir,
268 [ --with-indexdir deprecated, use indexdir in amanda.conf],
269 [ AC_MSG_ERROR([*** --with-indexdir is deprecated, use indexdir in amanda.conf instead.])
273 [ --with-dbdir deprecated, use infofile in amanda.conf],
274 [ AC_MSG_ERROR([*** --with-dbdir is deprecated, use infofile in amanda.conf instead.])
278 [ --with-logdir deprecated, use logfile in amanda.conf],
279 [ AC_MSG_ERROR([*** --with-logdir is deprecated, use logdir in amanda.conf instead.])
282 AC_ARG_WITH(suffixes,
283 [ --with-suffixes install binaries with version string appended to name],
284 USE_VERSION_SUFFIXES=$withval,
285 : ${USE_VERSION_SUFFIXES=no}
287 case "$USE_VERSION_SUFFIXES" in
289 AC_DEFINE(USE_VERSION_SUFFIXES, 1,
290 [Define to have programs use version suffixes when calling other programs.])
292 program_suffix="-$VERSION"
293 # This is from the output of configure.in.
294 if test "x$program_transform_name" = xs,x,x,; then
295 program_transform_name=
297 # Double any \ or $. echo might interpret backslashes.
298 cat <<\EOF_SED > conftestsed
299 s,\\,\\\\,g; s,\$,$$,g
301 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
304 test "x$program_prefix" != xNONE &&
305 program_transform_name="s,^,${program_prefix},; $program_transform_name"
306 # Use a double $ so make ignores it.
307 test "x$program_suffix" != xNONE &&
308 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
310 # sed with no file args requires a program.
311 test "x$program_transform_name" = "" && program_transform_name="xs,x,x,"
312 # Remove empty command
313 cat <<\EOF_SED > conftestsed
314 s,\;\;,\;,g; s,\; \$,,g; s,\;$,,g
316 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
319 n | no) USE_VERSION_SUFFIXES=no
321 *) AC_MSG_ERROR([*** You must not supply an argument to --with-suffixes option.])
324 AC_SUBST(USE_VERSION_SUFFIXES)
328 CLIENT_SCRIPTS_OPT=amhpfixdevs
331 CLIENT_SCRIPTS_OPT=amsinixfixdevs
338 AC_SUBST(CLIENT_SCRIPTS_OPT)
340 AC_ARG_WITH(client-only,
341 [ --with-client-only deprecated, use --without-server],
342 [ AC_MSG_ERROR([*** --with-client-only is deprecated, use --without-server instead.])
344 AC_ARG_WITH(server-only,
345 [ --with-server-only deprecated, use --without-client],
346 [ AC_MSG_ERROR([*** --with-server-only is deprecated, use --without-client instead.])
350 [ --without-client do not build client stuff],
353 y | ye | yes) NO_CLIENT_MODE=false;;
354 n | no) NO_CLIENT_MODE=true;;
356 AC_MSG_ERROR([*** You must not supply an argument to --with-client option.])
363 [ --without-server do not build server stuff (set --without-restore)],
366 y | ye | yes) NO_SERVER_MODE=false ;;
367 n | no) NO_SERVER_MODE=true;NO_RESTORE_MODE=true;;
369 AC_MSG_ERROR([*** You must not supply an argument to --with-server option. Maybe you meant --with-index-server=$withval])
374 if test "x${NO_SERVER_MODE+set}" != xset ; then
379 [ --without-restore do not build amrestore nor amidxtaped],
382 y | ye | yes) NO_RESTORE_MODE=false;;
383 n | no) NO_RESTORE_MODE=true;;
385 AC_MSG_ERROR([*** You must not supply an argument to --with-restore option.])
390 if test "x${NO_RESTORE_MODE+set}" != xset ; then
391 NO_RESTORE_MODE=${NO_SERVER_MODE-false}
394 if ${NO_SERVER_MODE-false}; then
395 if ${NO_RESTORE_MODE-false}; then
397 dnl --without-server and --without-restore is OK
401 AC_MSG_ERROR([*** --without-server requires --without-restore])
405 AC_ARG_WITH(amrecover,
406 [ --without-amrecover do not build amrecover],
410 if ${NO_CLIENT_MODE-false}; then
411 AC_MSG_ERROR([*** --without-client and --with-amrecover are incompatible])
413 NO_RECOVER_MODE=false;;
414 n | no) NO_RECOVER_MODE=true;;
416 AC_MSG_ERROR([*** You must not supply an argument to --with-amrecover option.])
422 AC_ARG_WITH(index-server,
423 [ --with-index-server=HOST default amanda index server [[`uname -n`]]],
426 "" | y | ye | yes | n | no)
427 AC_MSG_ERROR([*** You must supply an argument to the --with-index-server option.])
429 *) DEFAULT_SERVER="$withval"
433 : ${DEFAULT_SERVER=`uname -n`}
435 AC_DEFINE_UNQUOTED(DEFAULT_SERVER,"$DEFAULT_SERVER",
436 [This is the default Amanda index server. ])
437 AC_SUBST(DEFAULT_SERVER)
439 AC_ARG_WITH(force-uid,
440 [ --without-force-uid do not force the uid to --with-user],
441 FORCE_USERID="$withval",
442 : ${FORCE_USERID=yes}
444 case "$FORCE_USERID" in
445 y | ye | yes) AC_DEFINE(FORCE_USERID, 1,
446 [Define to force to another user on client machines. ])
450 *) AC_MSG_ERROR([*** You must not supply an argument to --with-force-uid option.])
454 [ --with-user=USER force execution to USER on client systems [[required]]],
457 "" | y | ye | yes | n | no)
458 AC_MSG_ERROR([*** You must supply an argument to the --with-user option.])
460 *) CLIENT_LOGIN="$withval"
465 if test "x${CLIENT_LOGIN+set}" != xset; then
466 AC_MSG_ERROR([*** --with-user=USER is missing])
468 AC_DEFINE_UNQUOTED(CLIENT_LOGIN,"$CLIENT_LOGIN",
469 [Define as a the user to force to on client machines. ])
470 AC_SUBST(CLIENT_LOGIN)
473 [ --with-group=GROUP group allowed to execute setuid-root programs [[required]]],
476 "" | y | ye | yes | n | no)
477 AC_MSG_ERROR([*** You must supply an argument to the --with-group option.])
479 *) SETUID_GROUP="$withval"
484 if test "x${SETUID_GROUP+set}" != xset; then
485 AC_MSG_ERROR([*** --with-group=GROUP is missing])
487 AC_SUBST(SETUID_GROUP)
490 [ --with-owner=USER force ownership of files to USER [[default == --with-user value]]],
493 "" | y | ye | yes | n | no)
494 AC_MSG_ERROR([*** You must supply an argument to the --with-owner option.])
496 *) BINARY_OWNER="$withval"
501 if test "x${BINARY_OWNER+set}" != xset ; then
502 BINARY_OWNER=$CLIENT_LOGIN
504 AC_DEFINE_UNQUOTED(BINARY_OWNER,"$BINARY_OWNER",
505 [Define as the user who owns installed binaries. ])
506 AC_SUBST(BINARY_OWNER)
509 [ --with-rundump use rundump (setuid-root) to invoke dump],
512 n | no | y | ye | yes) FORCE_USE_RUNDUMP="$withval";;
513 *) AC_MSG_ERROR([*** You must not supply an argument to --with-rundump option.]);;
519 [ --with-config=CONFIG default configuration [[DailySet1]]],
522 "" | y | ye | yes | n | no)
523 AC_MSG_ERROR([*** You must supply an argument to the --with-config option.])
525 *) DEFAULT_CONFIG="$withval"
529 : ${DEFAULT_CONFIG=DailySet1}
531 AC_DEFINE_UNQUOTED(DEFAULT_CONFIG,"$DEFAULT_CONFIG",
532 [This is the default Amanda configuration. ])
533 AC_SUBST(DEFAULT_CONFIG)
535 AC_ARG_WITH(tape-server,
536 [ --with-tape-server=HOST default restoring tape server is HOST [[same as --with-index-server]]],
539 "" | y | ye | yes | n | no)
540 AC_MSG_ERROR([*** You must supply an argument to the --with-tape-server option.])
542 *) DEFAULT_TAPE_SERVER="$withval"
546 : ${DEFAULT_TAPE_SERVER=$DEFAULT_SERVER}
548 AC_DEFINE_UNQUOTED(DEFAULT_TAPE_SERVER,"$DEFAULT_TAPE_SERVER",[This is the default restoring Amanda tape server. ])
549 AC_SUBST(DEFAULT_TAPE_SERVER)
551 AC_ARG_WITH(tape-device,
552 [ --with-tape-device=ARG restoring tape server HOST's no rewinding tape drive],
555 "" | y | ye | yes | n | no)
556 AC_MSG_ERROR([*** You must supply an argument to the --with-tape-device option.])
558 *) DEFAULT_TAPE_DEVICE="$withval"
564 if test ! -z "$DEFAULT_TAPE_DEVICE"; then
565 AC_DEFINE_UNQUOTED(DEFAULT_TAPE_DEVICE,"$DEFAULT_TAPE_DEVICE",[This is the default no-rewinding tape device. ])
566 AC_SUBST(DEFAULT_TAPE_DEVICE)
567 EXAMPLE_TAPEDEV=$DEFAULT_TAPE_DEVICE
569 EXAMPLE_TAPEDEV="/dev/null"
571 AC_SUBST(EXAMPLE_TAPEDEV)
573 AC_ARG_WITH(ftape-raw-device,
574 [ --with-ftape-rawdevice=ARG raw device on tape server HOST's if using Linux ftape >=3.04d],
577 "" | y | ye | yes | n | no)
578 AC_MSG_ERROR([*** You must supply an argument to the --with-ftape-rawdevice option.])
580 *) DEFAULT_RAW_TAPE_DEVICE="$withval"
585 if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
586 AC_MSG_CHECKING(for raw ftape device)
587 dnl Look for tape devices in /dev.
588 raw_tape_dev=/dev/null
589 dnl Look for tape devices in /dev.
590 for num in 3 2 1 0 ; do
596 DEFAULT_RAW_TAPE_DEVICE=$raw_tape_dev
597 AC_MSG_RESULT($DEFAULT_RAW_TAPE_DEVICE)
602 if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
603 DEFAULT_RAW_TAPE_DEVICE=/dev/null
606 AC_DEFINE_UNQUOTED(DEFAULT_RAW_TAPE_DEVICE,"$DEFAULT_RAW_TAPE_DEVICE",[For Linux systems with floppy tapes:
607 * QIC volume table support via raw tape device. ])
608 AC_SUBST(DEFAULT_RAW_TAPE_DEVICE)
610 AC_ARG_WITH(rew-tape,
611 [ --with-rew-tape deprecated, use --with-tape-device],
612 [ AC_MSG_ERROR([*** --with-rew-tape is deprecated, use --with-tape-device instead.])
615 AC_ARG_WITH(norew-tape,
616 [ --with-norew-tape=ARG deprecated, use --with-tape-device],
617 [ AC_MSG_ERROR([*** --with-norew-tape is deprecated, use --with-tape-device instead.])
620 AC_ARG_WITH(changer-device,
621 [ --with-changer-device=ARG default tape changer device [[/dev/ch0 if it exists]]],
624 "" | y | ye | yes | n | no)
625 AC_MSG_ERROR([*** You must supply an argument to the --with-changer-device option.])
627 *) DEFAULT_CHANGER_DEVICE="$withval"
632 if test -z "$DEFAULT_CHANGER_DEVICE" &&
633 test -f /dev/ch0; then
634 DEFAULT_CHANGER_DEVICE=/dev/ch0
639 if test -z "$DEFAULT_CHANGER_DEVICE"; then
640 DEFAULT_CHANGER_DEVICE=/dev/null
643 AC_DEFINE_UNQUOTED(DEFAULT_CHANGER_DEVICE,"$DEFAULT_CHANGER_DEVICE",[This is the default changer device. ])
644 AC_SUBST(DEFAULT_CHANGER_DEVICE)
647 [ --with-fqdn use FQDN's to backup multiple networks],
653 y | ye | yes) AC_DEFINE(USE_FQDN,1,[Define for backups being done on a multiple networks and FQDNs are used. ])
655 *) AC_MSG_ERROR([*** You must not supply an argument to --with-fqdn option.])
659 AC_ARG_WITH(broken-fsf,
660 [ --with-broken-fsf only enable if tape fsf calls fail mid-file],
661 HAVE_BROKEN_FSF=$withval,
662 : ${HAVE_BROKEN_FSF=no}
664 case "$HAVE_BROKEN_FSF" in
666 y | ye | yes) AC_DEFINE(HAVE_BROKEN_FSF,1,[Define this if issuing a fsf on a tape fails when you are not at a tape
667 * mark, for instance, if amrecover gives I/O errors when skipping.
670 *) AC_MSG_ERROR([*** You must not supply an argument to --with-broken-fsf option.])
674 AC_ARG_WITH(reuseports,
675 [ --without-reuseaddr Don't closed network connections to be reused until full timeout period.],
690 AC_DEFINE(USE_REUSEADDR,1,[Define to set SO_REUSEADDR on network connections.])
693 AC_MSG_ERROR([*** You must not supply an argument to --with-reuseports option.])
698 [ --with-gnutar[[=PROG]] use PROG as GNU tar executable [[default: looks for one]]],
701 /*) GNUTAR="$withval";;
704 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar]);;
709 AC_ARG_WITH(smbclient,
710 [ --with-smbclient[[=PROG]] use PROG as Samba's smbclient executable [[default: looks for one]]],
713 /*) SAMBA_CLIENT="$withval";;
715 n|no) SAMBA_CLIENT=;;
716 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-smbclient]);;
721 AC_ARG_WITH(samba-user,
722 [ --with-samba-user was deprecated],
723 [ AC_MSG_ERROR([*** The samba-user option was deprecated, the username go in the amandapass])
727 AC_ARG_WITH(gnutar-listdir,
728 [ --with-gnutar-listdir=DIR gnutar directory lists go in DIR [[localstatedir/amanda/gnutar-lists]]],
731 n | no) unset GNUTAR_LISTDIR ;;
732 y | ye | yes) : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists} ;;
733 /*) GNUTAR_LISTDIR="$withval" ;;
734 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar-listdir])
737 : ${GNUTAR_LISTDIR="$localstatedir/amanda/gnutar-lists"}
739 if test "$GNUTAR_LISTDIR"; then
741 test "x$prefix" = xNONE && prefix=$ac_default_prefix
742 eval echo "$GNUTAR_LISTDIR"
744 AC_DEFINE_UNQUOTED(GNUTAR_LISTED_INCREMENTAL_DIR,"$GNUTAR_LISTDIR",[The directory in which GNU tar should store directory lists for incrementals. ])
745 GNUTAR_LISTED_INCREMENTAL_DIRX=$GNUTAR_LISTDIR
747 GNUTAR_LISTED_INCREMENTAL_DIRX=
749 AC_SUBST(GNUTAR_LISTED_INCREMENTAL_DIRX)
751 AC_ARG_WITH(gnutar-listed-incremental,
752 [ --with-gnutar-listed-incremental was deprecated, use --with-gnutar-listdir],
753 [ AC_MSG_ERROR([*** The gnutar-listed-incremental option was deprecated, use gnutar-listdir instead])
756 GNUTAR_LISTED_INCREMENTAL_DIR=$GNUTAR_LISTDIR
757 AC_SUBST(GNUTAR_LISTED_INCREMENTAL_DIR)
759 AC_ARG_WITH(bsd-security,
760 [ --without-bsd-security do not use BSD rsh/rlogin style security],
761 BSD_SECURITY=$withval,
762 : ${BSD_SECURITY=yes}
764 case "$BSD_SECURITY" in
766 y | ye | yes) AC_DEFINE(BSD_SECURITY,1,[Define to use BSD .rhosts/.amandahosts security. ])
768 *) AC_MSG_ERROR([*** You must not supply an argument to --with-bsd-security option.])
772 AC_ARG_WITH(amandahosts,
773 [ --without-amandahosts use .rhosts instead of .amandahosts],
774 USE_AMANDAHOSTS=$withval,
775 : ${USE_AMANDAHOSTS=yes}
777 case "$USE_AMANDAHOSTS" in
780 case "$BSD_SECURITY" in
781 y | ye | yes) AC_DEFINE(USE_AMANDAHOSTS,1,[Define if you want to use the .amandahosts for BSD security. ])
785 *) AC_MSG_ERROR([*** You must not supply an argument to --with-amandahosts option.])
789 dnl Specify --with-dbmalloc if you desire dbmalloc to be linked in
791 AC_ARG_WITH(dbmalloc,
792 [ --with-dbmalloc=DIR Location of dbmalloc libs and headers],
803 AC_CHECK_LIB(dbmalloc,malloc)
804 if test "x$ac_cv_lib_dbmalloc_malloc" != "xyes"; then
805 AC_MSG_WARN([*** dbmalloc library not found - no malloc debugging support!])
809 DBMALLOCCFLAGS="-I$DBMALLOC -DUSE_DBMALLOC"
810 DBMALLOCLIBS="-L$DBMALLOC -ldbmalloc"
816 AS_HELP_STRING([--with-ipv6],
817 [If IPv6 must be enabled (Default)])
818 AS_HELP_STRING([--without-ipv6],
819 [If IPv6 must be disable]),
822 y | ye | yes) amanda_ipv6=true;;
823 n | no) amanda_ipv6=false;;
825 AC_MSG_ERROR([*** You must not supply an argument to --with-ipv6 option.])
831 dnl Specify --with-krb4-security if Kerberos software is in somewhere
832 dnl other than the listed KRB4_SPOTS. We only compile kerberos support in
833 dnl if the right files are there.
835 : ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
837 AC_ARG_WITH(krb4-security,
838 [ --with-krb4-security=DIR Location of Kerberos software [[/usr/kerberos /usr/cygnus /usr /opt/kerberos]]],
839 KRB4_SECURITY="$withval",
840 : ${KRB4_SECURITY=no}
843 case "$KRB4_SECURITY" in
844 n | no) KRB4_SECURITY=no ;;
846 *) KRB4_SPOTS="$KRB4_SECURITY"
851 AC_MSG_CHECKING(for Kerberos and Amanda kerberos4 bits)
852 if test "x${KRB4_SECURITY}" = xyes -a -f ${srcdir-.}/common-src/krb4-security.c ; then
853 for dir in $KRB4_SPOTS; do
854 if test -f ${dir}/lib/libkrb.a -a -f ${dir}/lib/libdes.a ; then
856 # This is the original Kerberos 4.
858 AC_MSG_RESULT(found in $dir)
860 AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
861 if test -d $dir/include/kerberosIV ; then
863 # This handles BSD/OS.
865 KRB4INCLUDES=-I$dir/include/kerberosIV
867 KRB4INCLUDES=-I$dir/include
869 KRB4LDFLAGS=-L$dir/lib
870 KRB4LIBS="-lkrb -ldes"
871 if test -f ${dir}/lib/libcom_err.a; then
872 KRB4LIBS="$KRB4LIBS -lcom_err"
875 elif test -f ${dir}/lib/libkrb4.a &&
876 test -f ${dir}/lib/libcrypto.a &&
877 test -f ${dir}/lib/libdes425.a ; then
879 # This is Kerberos 5 with Kerberos 4 back-support.
881 AC_MSG_RESULT(found in $dir)
883 AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
884 KRB4INCLUDES="-I$dir/include -I$dir/include/kerberosIV"
885 KRB4LDFLAGS=-L$dir/lib
886 if test -f ${dir}/lib/libkrb5.a &&
887 test -f ${dir}/lib/libcom_err.a; then
888 KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
890 KRB4LIBS="-lkrb4 -lcrypto -ldes425"
896 if test "x$KRB4LDFLAGS" = "x" ; then
897 AC_MSG_RESULT(no libraries found)
903 AC_ARG_WITH(rsh-security,
904 [ --with-rsh-security use rsh as a transport],
905 RSH_SECURITY=$withval,
906 : ${RSH_SECURITY=yes}
908 case "$RSH_SECURITY" in
910 y | ye | yes) AC_DEFINE(RSH_SECURITY,1,[Define if RSH transport should be enabled. ])
912 *) AC_MSG_ERROR([*** You must not supply an argument the to --with-rsh-security option.])
916 AC_ARG_WITH(ssh-security,
917 [ --with-ssh-security use ssh as a transport],
918 SSH_SECURITY=$withval,
921 case "$SSH_SECURITY" in
923 y | ye | yes) AC_DEFINE(SSH_SECURITY,1,[Define if SSH transport should be enabled. ])
924 SSH_SECURITY_SET=true
926 *) AC_MSG_ERROR([*** You must not supply an argument to --with-ssh-security.])
930 # find SSH and check for SSH options if we're using SSH security
931 if test x"$SSH_SECURITY" = "xyes"; then
932 AC_PATH_PROGS(SSH, ssh, , $LOCSYSPATH)
933 AC_DEFINE_UNQUOTED(SSH, "$SSH", [Path to the SSH binary])
935 AC_ARG_WITH(ssh-options,
936 AS_HELP_STRING([--with-ssh-options=@<:@OPTIONS@:>@],
937 [Use these ssh options for ssh security; the default should work]),
938 [ SSH_OPTIONS="$withval" ],
942 case "$SSH_OPTIONS" in
943 y | ye | yes | n | no)
944 AC_MSG_ERROR([*** You must supply an argument to --with-ssh-options.]);;
948 AC_MSG_CHECKING([SSH options])
949 # if we didn't get SSH options from the user, figure them out for ourselves
950 if test -z "$SSH_OPTIONS"; then
951 # TODO - quote these (or break them up in ssh-security??)
952 case `$SSH -V 2>&1` in
953 OpenSSH*) SSH_OPTIONS='-x -o BatchMode=yes -o PreferredAuthentications=publickey';;
954 *) SSH_OPTIONS='-x -o BatchMode=yes'
958 # now convert that to a comma-separated list of C strings
959 eval "set dummy ${SSH_OPTIONS}"; shift
961 for i in "${@}"; do SSH_OPTIONS="${SSH_OPTIONS}${SSH_OPTIONS:+, }\"${i/\"/\\\"}\""; done
962 AC_MSG_RESULT($SSH_OPTIONS)
964 AC_DEFINE_UNQUOTED(SSH_OPTIONS, $SSH_OPTIONS, [Arguments to ssh])
967 AC_ARG_WITH(bsdtcp-security,
968 [ --with-bsdtcp-security use tcp as a transport],
969 BSDTCP_SECURITY=$withval,
970 : ${BSDTCP_SECURITY=yes}
972 case "$BSDTCP_SECURITY" in
974 y | ye | yes) AC_DEFINE(BSDTCP_SECURITY,1,[Define if BSDTCP transport should be enabled. ])
975 BSDTCP_SECURITY_SET=true
977 *) AC_MSG_ERROR([*** You must not supply an argument the to --with-bsdtcp-security option.])
981 AC_ARG_WITH(bsdudp-security,
982 [ --with-bsdudp-security use udp as a transport],
983 BSDUDP_SECURITY=$withval,
984 : ${BSDUDP_SECURITY=yes}
986 case "$BSDUDP_SECURITY" in
988 y | ye | yes) AC_DEFINE(BSDUDP_SECURITY,1,[Define if BSDUDP transport should be enabled. ])
989 BSDUDP_SECURITY_SET=true
991 *) AC_MSG_ERROR([*** You must not supply an argument the to --with-bsdudp-security option.])
995 AC_ARG_WITH(server-principal,
996 [ --with-server-principal=ARG server host principal [["amanda"]]],
999 "" | y | ye | yes | n | no)
1000 AC_MSG_ERROR([*** You must supply an argument to the --with-server-principal option.])
1003 SERVER_HOST_PRINCIPLE="$withval"
1007 : ${SERVER_HOST_PRINCIPLE="amanda"}
1009 AC_DEFINE_UNQUOTED(SERVER_HOST_PRINCIPLE,"$SERVER_HOST_PRINCIPLE",[The Kerberos server principle. ])
1011 AC_ARG_WITH(server-instance,
1012 [ --with-server-instance=ARG server host instance [["amanda"]]],
1015 "" | y | ye | yes | n | no)
1016 AC_MSG_ERROR([*** You must supply an argument to the --with-server-instance option.])
1018 *) SERVER_HOST_INSTANCE="$withval"
1022 : ${SERVER_HOST_INSTANCE="amanda"}
1024 AC_DEFINE_UNQUOTED(SERVER_HOST_INSTANCE,"$SERVER_HOST_INSTANCE",[The Kerberos server instance. ])
1026 AC_ARG_WITH(server-keyfile,
1027 [ --with-server-keyfile=ARG server host key file [["/.amanda"]]],
1030 "" | y | ye | yes | n | no)
1031 AC_MSG_ERROR([*** You must supply an argument to the --with-server-keyfile option.])
1033 *) SERVER_HOST_KEY_FILE="$withval"
1037 : ${SERVER_HOST_KEY_FILE="/.amanda"}
1039 AC_DEFINE_UNQUOTED(SERVER_HOST_KEY_FILE,"$SERVER_HOST_KEY_FILE",[The Kerberos server key file. ])
1041 AC_ARG_WITH(client-principal,
1042 [ --with-client-principal=ARG client host principal [["rcmd"]]],
1045 "" | y | ye | yes | n | no)
1046 AC_MSG_ERROR([*** You must supply an argument to the --with-client-principal option.])
1048 *) CLIENT_HOST_PRINCIPLE="$withval"
1052 : ${CLIENT_HOST_PRINCIPLE="rcmd"}
1054 AC_DEFINE_UNQUOTED(CLIENT_HOST_PRINCIPLE,"$CLIENT_HOST_PRINCIPLE",[The Kerberos client host principle. ])
1056 AC_ARG_WITH(client-instance,
1057 [ --with-client-instance=ARG client host instance [[HOSTNAME_INSTANCE]]],
1060 "" | y | ye | yes | n | no)
1061 AC_MSG_ERROR([*** You must supply an argument to the --with-client-instance option.])
1063 *) CLIENT_HOST_INSTANCE="$withval"
1067 : ${CLIENT_HOST_INSTANCE=HOSTNAME_INSTANCE}
1069 AC_DEFINE_UNQUOTED(CLIENT_HOST_INSTANCE,$CLIENT_HOST_INSTANCE,[The Kerberos client host instance. ])
1071 AC_ARG_WITH(client-keyfile,
1072 [ --with-client-keyfile=ARG client host key file [[KEYFILE]]],
1075 "" | y | ye | yes | n | no)
1076 AC_MSG_ERROR([*** You must supply an argument to the --with-client-keyfile option.])
1078 *) CLIENT_HOST_KEY_FILE="$withval"
1082 : ${CLIENT_HOST_KEY_FILE=KEYFILE}
1085 # Assume it's either KEYFILE (defined in krb.h), or a string filename...
1086 if test "x$CLIENT_HOST_KEY_FILE" != "xKEYFILE"; then
1087 CLIENT_HOST_KEY_FILE="\"$CLIENT_HOST_KEY_FILE\""
1090 AC_DEFINE_UNQUOTED(CLIENT_HOST_KEY_FILE,$CLIENT_HOST_KEY_FILE,[The Kerberos client host key file. ])
1092 AC_ARG_WITH(ticket-lifetime,
1093 [ --with-ticket-lifetime=ARG ticket lifetime [[128]]],
1096 "" | y | ye | yes | n | no)
1097 AC_MSG_ERROR([*** You must supply an argument to the --with-ticket-lifetime option.])
1099 *) TICKET_LIFETIME="$withval"
1103 : ${TICKET_LIFETIME=128}
1105 AC_DEFINE_UNQUOTED(TICKET_LIFETIME,$TICKET_LIFETIME,[The Kerberos ticket lifetime. ])
1107 dnl Specify --with-krb5-security if Kerberos software is in somewhere
1108 dnl other than the listed KRB5_SPOTS. We only compile kerberos support in
1109 dnl if the right files are there.
1111 : ${KRB5_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
1113 AC_ARG_WITH(krb5-security,
1114 [ --with-krb5-security=DIR Location of Kerberos V software [[/usr/kerberos /usr/cygnus /usr /opt/kerberos]]],
1115 KRB5_SECURITY="$withval",
1116 : ${KRB5_SECURITY=no}
1119 case "$KRB5_SECURITY" in
1120 n | no) KRB5_SECURITY=no
1124 *) KRB5_SPOTS="$KRB5_SECURITY"
1129 # if found, force the static versions of these libs (.a) by linking directly
1130 # with the .a files. I don't know how to get -R dependancies checked
1131 # in autoconf at this time. -kashmir
1132 AC_MSG_CHECKING(for Kerberos V)
1135 for dir in $KRB5_SPOTS; do
1136 for lib in lib lib64; do
1137 k5libdir=${dir}/${lib}
1138 if test -f ${k5libdir}/libkrb5.a -a -f ${k5libdir}/libgssapi_krb5.a -a -f ${k5libdir}/libcom_err.a; then
1139 if test -f ${k5libdir}/libk5crypto.a; then
1141 elif test -f ${k5libdir}/libcrypto.a; then
1146 if test -f ${k5libdir}/libkrb5support.a; then
1147 K5SUPPORT=-lkrb5support
1152 KRB5LIBS="-lgssapi_krb5 -lkrb5 $K5CRYPTO $K5SUPPORT -lcom_err"
1155 elif test -f ${k5libdir}/libkrb5.a -a -f ${k5libdir}/libasn1.a -a -f ${k5libdir}/libgssapi.a; then
1157 KRB5LIBS="-lgssapi.a -lkrb5.a -lasn1.a"
1158 KRB5_CFLAGS="-DKRB5_HEIMDAL_INCLUDES"
1164 if test "$KRB5_DIR_FOUND"; then
1165 AC_MSG_RESULT(found in $KRB5_DIR_FOUND)
1167 AC_DEFINE(KRB5_SECURITY,1,[Define if Kerberos 5 security is to be enabled. ])
1169 # some OS's, such as NetBSD, stick krb5 includes out of the way...
1170 # should probably just use autoconf to look for various include
1171 # options and set them, but don't quite want to do that until I've
1172 # dug into it a bit more.
1174 if test -d "$KRB5_DIR_FOUND/krb5" ; then
1175 KRB5INCLUDES="-I$KRB5_DIR_FOUND/include/krb5"
1177 KRB5INCLUDES="-I$KRB5_DIR_FOUND/include"
1179 if test "$KRB5_CFLAGS" ; then
1180 KRB5INCLUDES="$KRB5INCLUDES $KRB5_CFLAGS"
1182 AC_CHECK_LIB(krb5support,main)
1183 KRB5LDFLAGS=-L$k5libdir
1187 if test "x$KRB5LDFLAGS" = "x" ; then
1188 AC_MSG_RESULT(no krb5 system libraries found)
1192 AC_ARG_WITH(low-tcpportrange,
1193 [ --with-low-tcpportrange=low,high bind reserved TCP server sockets to ports within this range [unlimited] (mainly for amrecover)],
1195 LOW_TCPPORTRANGE="$withval"
1199 if test x"${LOW_TCPPORTRANGE+set}" = x"set"; then
1200 if test x`echo "$LOW_TCPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
1201 AC_MSG_ERROR([*** --with-low-tcpportrange requires two comma-separated positive numbers])
1203 min_low_tcp_port=`echo "$LOW_TCPPORTRANGE" | sed 's/,.*//'`
1204 max_low_tcp_port=`echo "$LOW_TCPPORTRANGE" | sed 's/.*,//'`
1205 if test $min_low_tcp_port -gt $max_low_tcp_port; then
1206 AC_MSG_ERROR([*** the second TCP port number must be greater than the first in --with-low-tcpportrange])
1208 if test $min_low_tcp_port -lt 512; then
1209 AC_MSG_WARN([*** the low TCP port range should be 512 or greater in --with-low-tcpportrange])
1211 if test $max_low_tcp_port -ge 1024; then
1212 AC_MSG_WARN([*** the low TCP port range should be less than 1024 in --with-low-tcpportrange])
1214 AC_DEFINE_UNQUOTED(LOW_TCPPORTRANGE,$LOW_TCPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
1215 maximum reserved TCP port numbers sockets should be bound to. (mainly for amrecover) ])
1218 AC_ARG_WITH(tcpportrange,
1219 [ --with-tcpportrange=low,high bind unreserved TCP server sockets to ports within this range [[unlimited]]],
1221 TCPPORTRANGE="$withval"
1224 if test x"${TCPPORTRANGE+set}" = x"set"; then
1225 if test x`echo "$TCPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
1226 AC_MSG_ERROR([*** --with-tcpportrange requires two comma-separated positive numbers])
1228 min_tcp_port=`echo "$TCPPORTRANGE" | sed 's/,.*//'`
1229 max_tcp_port=`echo "$TCPPORTRANGE" | sed 's/.*,//'`
1230 if test $min_tcp_port -gt $max_tcp_port; then
1231 AC_MSG_ERROR([*** the second TCP port number must be greater than the first in --with-tcpportrange])
1233 if test $min_tcp_port -lt 1024; then
1234 AC_MSG_WARN([*** the TCP port range should be 1024 or greater in --with-tcpportrange])
1236 if test $max_tcp_port -ge 65536; then
1237 AC_MSG_WARN([*** the TCP port range should be less than 65536 in --with-tcpportrange])
1239 AC_DEFINE_UNQUOTED(TCPPORTRANGE,$TCPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
1240 maximum unreserved TCP port numbers sockets should be bound to. ])
1243 AC_ARG_WITH(udpportrange,
1244 [ --with-udpportrange=low,high bind reserved UDP server sockets to ports within this range [[unlimited]]],
1246 UDPPORTRANGE="$withval"
1249 if test x"${UDPPORTRANGE+set}" = x"set"; then
1250 if test x`echo "$UDPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
1251 AC_MSG_ERROR([*** --with-udpportrange requires two comma-separated positive numbers])
1253 min_udp_port=`echo "$UDPPORTRANGE" | sed 's/,.*//'`
1254 max_udp_port=`echo "$UDPPORTRANGE" | sed 's/.*,//'`
1255 if test $min_udp_port -gt $max_udp_port; then
1256 AC_MSG_ERROR([*** the second UDP port number must be greater than the first in --with-udpportrange])
1258 if test $max_udp_port -ge 1024; then
1259 AC_MSG_WARN([*** the UDP port range should be less than 1024 in --with-udpportrange])
1261 if test $min_udp_port -le 0; then
1262 AC_MSG_WARN([*** the UDP port range should be greater than 0 in --with-udpportrange])
1264 AC_DEFINE_UNQUOTED(UDPPORTRANGE,$UDPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
1265 maximum reserved UDP port numbers sockets should be bound to. ])
1268 AC_ARG_WITH(maxtapeblocksize,
1269 [ --with-maxtapeblocksize=kb Maximum size of a tape block],
1271 MAXTAPEBLOCKSIZE="$withval"
1273 : ${MAXTAPEBLOCKSIZE=32}
1276 AC_DEFINE_UNQUOTED(MAX_TAPE_BLOCK_KB,($MAXTAPEBLOCKSIZE),[Maximum size of a tape block in KBytes.])
1277 AC_SUBST(MAXTAPEBLOCKSIZE)
1280 [ --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [[text]]],
1283 "" | y | ye | yes | n | no)
1284 AC_MSG_ERROR([*** You must supply an argument to the --with-db option.])
1286 *) DB_STYLE="$withval"
1291 if test "$DB_STYLE"; then
1293 db | dbm | gdbm | ndbm | text) ;;
1295 AC_MSG_ERROR([*** Unknown argument $DB_STYLE given to --with-db. Choose from db, dbm, gdbm, ndbm, text.])
1302 [ --with-mmap force use of mmap instead of shared memory support],
1303 FORCE_MMAP=$withval,
1306 case "$FORCE_MMAP" in
1307 y | ye | yes | n | no) : ;;
1308 *) AC_MSG_ERROR([*** You must not supply an argument to --with-mmap.])
1312 AC_ARG_WITH(buffered-dump,
1313 [ --with-buffered-dump buffer the dumping sockets on the server for speed],
1314 DUMPER_SOCKET_BUFFERING=$withval,
1315 : ${DUMPER_SOCKET_BUFFERING=no}
1317 case "$DUMPER_SOCKET_BUFFERING" in
1320 y | ye | yes) AC_DEFINE(DUMPER_SOCKET_BUFFERING,1,[Define if dumper should buffer the sockets for faster throughput. ])
1322 *) AC_MSG_ERROR([*** You must not supply an argument to --with-buffered-dump.])
1326 AC_ARG_WITH(assertions,
1327 [ --with-assertions compile assertions into code],
1328 ASSERTIONS="$withval",
1331 case "$ASSERTIONS" in
1333 y | ye | yes) AC_DEFINE(ASSERTIONS,1,[Define if you want assertion checking. ])
1335 *) AC_MSG_ERROR([*** You must not supply an argument to --with-assertions option.])
1340 [ --with-tmpdir[=/temp/dir] area Amanda can use for temp files [[/tmp/amanda]]],
1345 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1346 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1350 n | no) AC_MSG_ERROR([*** --without-tmpdir is not allowed.]);;
1352 AMANDA_TMPDIR="/tmp/amanda";;
1354 AMANDA_TMPDIR="$tmpdir";;
1355 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-tmpdir option.]);;
1357 AC_DEFINE_UNQUOTED(AMANDA_TMPDIR,"$AMANDA_TMPDIR",[The directory in which Amanda should create temporary files. ])
1358 AC_SUBST(AMANDA_TMPDIR)
1360 AC_ARG_WITH(debugging,
1361 [ --with[[out]]-debugging[[=/debug/dir]] [[do not]] record runtime debugging information in specified directory [[--with-tmpdir]]],
1362 debugging="$withval",
1366 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1367 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1368 eval echo "$debugging"
1370 case "$debugging" in
1371 n | no) AMANDA_DBGDIR="";;
1372 y | ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR";;
1373 /*) AMANDA_DBGDIR="$debugging";;
1374 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-debugging option.])
1377 case "$AMANDA_DBGDIR" in
1379 *) AC_DEFINE(DEBUG_CODE,1,[Define if you want debugging. ])
1380 AC_DEFINE_UNQUOTED(AMANDA_DBGDIR,"$AMANDA_DBGDIR",[Location of Amanda directories and files. ])
1381 AC_SUBST(AMANDA_DBGDIR);;
1384 AC_ARG_WITH(debug_days,
1385 [ --with-debug-days=NN number of days to keep debugging files [[default=4]]],
1386 debug_days="$withval",
1389 case "$debug_days" in
1390 n | no) AMANDA_DEBUG_DAYS=0 ;;
1391 y | ye | yes) AMANDA_DEBUG_DAYS=4 ;;
1392 [[0-9]] | [[0-9]][[0-9]] | [[0-9]][[0-9]][[0-9]]) AMANDA_DEBUG_DAYS="$debug_days" ;;
1393 *) AC_MSG_ERROR([*** --with-debug-days value not numeric or out of range.])
1396 AC_DEFINE_UNQUOTED(AMANDA_DEBUG_DAYS,$AMANDA_DEBUG_DAYS,[Number of days to keep debugging files. ])
1397 AC_SUBST(AMANDA_DEBUG_DAYS)
1399 AC_ARG_WITH(testing,
1400 [ --with-testing[[=suffix]] use alternate service names],
1405 n | no) SERVICE_SUFFIX="";;
1406 y | ye | yes) SERVICE_SUFFIX="-test";;
1407 *) SERVICE_SUFFIX="-$TESTING";;
1409 AMANDA_SERVICE_NAME="amanda$SERVICE_SUFFIX"
1410 KAMANDA_SERVICE_NAME="kamanda$SERVICE_SUFFIX"
1411 AC_SUBST(SERVICE_SUFFIX)
1412 AC_DEFINE_UNQUOTED(SERVICE_SUFFIX, "$SERVICE_SUFFIX",[A suffix that will be appended to service names.
1413 * Useful for testing in parallel with a working version. ])
1414 AC_DEFINE_UNQUOTED(AMANDA_SERVICE_NAME, "$AMANDA_SERVICE_NAME", [The name for the Amanda service. ])
1415 AC_DEFINE_UNQUOTED(KAMANDA_SERVICE_NAME, "$KAMANDA_SERVICE_NAME", [The name for the Kerberized Amanda service. ])
1418 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1419 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1421 tmp=`eval echo "$bindir"`
1422 AC_DEFINE_UNQUOTED(bindir,"$tmp",[Directory in which user binaries should be installed. ])
1424 tmp=`eval echo "$sbindir"`
1425 AC_DEFINE_UNQUOTED(sbindir,"$tmp",[Directory in which administrator binaries should be installed. ])
1427 tmp=`eval echo "$libexecdir"`
1428 AC_DEFINE_UNQUOTED(libexecdir,"$tmp",[Directory in which internal binaries should be installed. ])
1430 tmp=`eval echo $mandir`
1431 AC_DEFINE_UNQUOTED(mandir,"$tmp",[Directory in which man-pages should be installed])
1434 dnl Set the order of dump programs to look for. Finding the proper file
1435 dnl system dumping program is problematic. Some systems, notably HP-UX
1436 dnl and AIX, have both the backup and dump programs. HP-UX can't use the
1437 dnl the backup program while AIX systems can't use the dump program. So
1438 dnl a variable is set up here to specify the order of dump programs to
1439 dnl search for on the system.
1440 DUMP_PROGRAMS="ufsdump dump backup"
1447 AC_DEFINE(STATFS_OSF1,1,[Define on OSF1. ])
1450 DUMP_PROGRAMS="dump "$DUMP_PROGRAMS
1451 : ${USE_RUNDUMP=yes}
1462 GETCONF_LFS="XBS5_ILP32_OFFBIG"
1465 AMANDA_CPPFLAGS="-D__STDC_EXT__ $AMANDA_CPPFLAGS"
1468 AMANDA_CFLAGS="-Ae $AMANDA_CFLAGS"
1473 GETCONF_LFS="XBS5_ILP32_OFFBIG"
1474 DUMP_PROGRAMS="backup "$DUMP_PROGRAMS
1475 AC_DEFINE(AIX_TAPEIO,1,[Define on AIX. ])
1476 AC_DEFINE(AIX_BACKUP,1,[Define on AIX. ])
1478 m88k-motorola-sysv4)
1499 dnl The old cc won't work!
1513 : ${USE_RUNDUMP=yes}
1514 AC_DEFINE(STATFS_ULTRIX,1,[Define on Ultrix. ])
1518 AC_DEFINE(UWARE_TAPEIO,1,[Define on UnixWare. ])
1526 AC_DEFINE(STATFS_SCO_OS5,1,[Define on SCO OS5. ])
1534 AC_DEFINE(IGNORE_TAR_ERRORS,1,[Define on Cygwin. ])
1535 # Cygwin needs PATH to find cygwin1.dll
1536 AC_DEFINE(NEED_PATH_ENV,1,[Define on Cygwin. ])
1537 AC_DEFINE(IGNORE_UID_CHECK,1,[Define on Cygwin. ])
1538 AC_DEFINE(IGNORE_FSTAB,1,[Define on Cygwin. ])
1539 AC_DEFINE(DONT_SUID_ROOT,1,[Define on Cygwin. ])
1540 NEED_SETUID_CLIENT=false
1541 NEED_RUNTIME_PSEUDO_RELOC=true
1548 This machine, target type $target, is not known
1549 to be fully supported by this configure script. If the
1550 installation of Amanda on this system succeeds or needed
1551 any patches, please email amanda-hackers@amanda.org with
1552 the patches or an indication of the sucess or failure of
1553 the Amanda installation on your system.
1560 if test -n "$dump_returns_1"; then
1561 AC_DEFINE(DUMP_RETURNS_1,1,[Define this if this system's dump exits with 1 as a success code. ])
1564 if test -n "$xenix_tapeio"; then
1565 AC_DEFINE(XENIX_TAPEIO,1,[Define on XENIX/ISC. ])
1568 AMANDA_CFLAGS="$AMANDA_CFLAGS $KRB4INCLUDES $KRB5INCLUDES $DBMALLOCCFLAGS"
1569 AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS $KRB4INCLUDES $KRB5INCLUDES $DBMALLOCINCLUDES"
1570 AMANDA_LDFLAGS="$AMANDA_LDFLAGS $KRB4LDFLAGS $KRB5LDFLAGS"
1571 AMANDA_LIBS="$KRB4LIBS $KRB5LIBS $DBMALLOCLIBS $AMANDA_LIBS"
1572 CFLAGS="$CFLAGS $AMANDA_CFLAGS"
1573 CPPFLAGS="$CPPFLAGS $AMANDA_CPPFLAGS"
1574 LDFLAGS="$LDFLAGS $AMANDA_LDFLAGS"
1575 LIBS="$AMANDA_LIBS $LIBS"
1578 dnl This specifies the flag for mt that tells mt the proper tape drive
1580 : ${MT_FILE_FLAG="-f"}
1581 AC_SUBST(MT_FILE_FLAG)
1582 AC_DEFINE_UNQUOTED(MT_FILE_FLAG, "$MT_FILE_FLAG",[Defined to the switch to be used when invoking mt to specify the
1585 AX_CREATE_STDINT_H(common-src/amanda-int.h)
1587 dnl Check for programs.
1588 AC_PATH_PROGS(AR,ar,,$LOCSYSPATH)
1592 AC_PATH_PROGS(CAT,cat,,$LOCSYSPATH)
1593 if test -z "$CAT"; then
1596 AC_PATH_PROGS(COMPRESS,compress,,$LOCSYSPATH)
1597 AC_PATH_PROGS(DD,dd,,$LOCSYSPATH)
1598 AC_PATH_PROGS(GETCONF,getconf,,$SYSPATH)
1600 AC_ARG_WITH(gnuplot,
1601 AS_HELP_STRING([--with-gnuplot=PATH],
1602 [use gnuplot executable at PATH in amplot]),
1603 [ ac_with_gnuplot=$withval; ],
1604 [ ac_with_gnuplot=maybe; ])
1606 if test "$ac_with_gnuplot" = "yes" -o "$ac_with_gnuplot" = "maybe"; then
1607 AC_PATH_PROGS(GNUPLOT,gnuplot,,$LOCSYSPATH)
1609 if test "$ac_with_gnuplot" != "no"; then
1610 if test -x "$ac_with_gnuplot"; then
1611 GNUPLOT="$ac_with_gnuplot";
1613 AC_MSG_WARN([Specified gnuplot of $ac_with_gnuplot isn't])
1614 AC_MSG_WARN([executable, searching for an alternative.])
1615 AC_PATH_PROGS(GNUPLOT,gnuplot,,$LOCSYSPATH)
1621 AC_PATH_PROGS(GNUTAR,gtar gnutar tar,,$LOCSYSPATH)
1622 if test ! -z "$GNUTAR"; then
1623 case "`\"$GNUTAR\" --version 2>&1`" in
1624 *GNU*tar* | *Free*paxutils* )
1625 AC_DEFINE_UNQUOTED(GNUTAR,"$GNUTAR",[Define to the location of Gnu tar. ])
1628 AC_MSG_WARN([*** $GNUTAR is not GNU tar, so it will not be used.])
1634 AC_PATH_PROGS(SAMBA_CLIENT,smbclient,,$LOCSYSPATH)
1635 if test ! -z "$SAMBA_CLIENT"; then
1636 case "`\"$SAMBA_CLIENT\" '\\\\not.a.host.name\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in
1640 *"Connection to not.a.host.name failed"*)
1644 AC_MSG_WARN([*** $SAMBA_CLIENT does not seem to be smbclient, so it will not be used.])
1648 if test -n "$SAMBA_CLIENT"; then
1649 AC_DEFINE_UNQUOTED(SAMBA_CLIENT,"$SAMBA_CLIENT",[Define the location of smbclient for backing up Samba PC clients. ])
1650 AC_DEFINE_UNQUOTED(SAMBA_VERSION, $smbversion,
1651 [Not the actual samba version, just a number that should be increased whenever we start to rely on a new samba feature. ])
1655 AC_PATH_PROGS(GZIP,gzip,,$LOCSYSPATH)
1656 if test "$GZIP"; then
1657 AC_DEFINE(HAVE_GZIP,1,[Define if Amanda is using the gzip program. ])
1658 COMPRESS_PATH="$GZIP"
1659 COMPRESS_SUFFIX=".gz"
1660 COMPRESS_FAST_OPT="--fast"
1661 COMPRESS_BEST_OPT="--best"
1662 UNCOMPRESS_PATH="$GZIP"
1663 UNCOMPRESS_OPT="-dc"
1665 if test "$COMPRESS"; then
1666 COMPRESS_PATH="$COMPRESS"
1667 COMPRESS_SUFFIX=".Z"
1668 COMPRESS_FAST_OPT="-f"
1669 COMPRESS_BEST_OPT="-f"
1670 UNCOMPRESS_PATH="$COMPRESS"
1671 UNCOMPRESS_OPT="-dc"
1673 dnl If we have to use cat, we don't define COMPRESS_FAST_OPT,
1674 dnl COMPRESS_BEST_OPT, or UNCOMPRESS_OPT as "" since cat will look
1675 dnl look for a file by the name of "".
1676 AC_MSG_WARN([*** Cannot find either gzip or compress. Using cat. ***])
1677 COMPRESS_PATH="$CAT"
1679 COMPRESS_FAST_OPT=""
1680 COMPRESS_BEST_OPT=""
1681 UNCOMPRESS_PATH="$CAT"
1685 AC_DEFINE_UNQUOTED(COMPRESS_PATH,"$COMPRESS_PATH",[Define to the exact path to the gzip or the compress program. ])
1686 AC_DEFINE_UNQUOTED(COMPRESS_SUFFIX,"$COMPRESS_SUFFIX",[Define to the suffix for the COMPRESS_PATH compression program. ])
1687 AC_DEFINE_UNQUOTED(COMPRESS_FAST_OPT,"$COMPRESS_FAST_OPT",[Define as the command line option for fast compression. ])
1688 AC_DEFINE_UNQUOTED(COMPRESS_BEST_OPT,"$COMPRESS_BEST_OPT",[Define as the command line option for best compression. ])
1689 AC_DEFINE_UNQUOTED(UNCOMPRESS_PATH,"$UNCOMPRESS_PATH",[Define as the exact path to the gzip or compress command. ])
1690 AC_DEFINE_UNQUOTED(UNCOMPRESS_OPT,"$UNCOMPRESS_OPT",[Define as any optional arguments to get UNCOMPRESS_PATH to uncompress. ])
1692 AC_PATH_PROGS(SORT,sort,,$LOCSYSPATH)
1693 if test -z "$SORT"; then
1694 if $NO_SERVER_MODE; then
1697 AC_MSG_ERROR([Set SORT to the path of the sort program.])
1700 AC_DEFINE_UNQUOTED(SORT_PATH,"$SORT",[Define to the exact path to the sort program. ])
1702 AC_PATH_PROGS(MAILER,Mail mailx mail)
1703 if test -z "$MAILER"; then
1704 if $NO_SERVER_MODE; then
1706 AC_MSG_WARN([*** WARNING: Amanda cannot send mail reports without these programs.])
1708 AC_MSG_ERROR([Set MAILER to some program that accepts -s subject user < message_file.])
1711 AC_DEFINE_UNQUOTED(MAILER,"$MAILER",[Define to a program that understands -s "subject" user < message_file])
1713 AC_PATH_PROGS(MT,mt,mt,$LOCSYSPATH)
1715 AC_PATH_PROGS(CHIO,chio,chio,$LOCSYSPATH)
1717 AC_PATH_PROGS(CHS,chs,chs,$LOCSYSPATH)
1719 AC_PATH_PROGS(MTX,mtx,mtx,$LOCSYSPATH)
1721 AC_PATH_PROGS(MCUTIL,mcutil,mcutil,$LOCSYSPATH)
1723 AC_PATH_PROGS(PRINT, lpr lp)
1724 if test ! -z "$PRINT"; then
1725 AC_DEFINE_UNQUOTED(LPRCMD, "$PRINT",[Command for starting printing jobs. ])
1726 AC_CACHE_CHECK([which flag to use to select a printer],
1727 amanda_cv_printer_flag, [
1728 amanda_cv_printer_flag=$PRINTER_FLAG
1730 lpr|*/lpr) amanda_cv_printer_flag="-P";;
1731 lp|*/lp) amanda_cv_printer_flag="-d";;
1734 if test ! -z "$amanda_cv_printer_flag"; then
1735 AC_DEFINE_UNQUOTED(LPRFLAG, "$amanda_cv_printer_flag",[LPRCMD switch for specifying a printer name. ])
1737 AC_MSG_WARN([*** WARNING: amanda will always print to the default printer])
1741 AC_PATH_PROGS(PCAT,pcat,,$LOCSYSPATH)
1742 AC_PATH_PROGS(PERL,perl5 perl,,$LOCSYSPATH)
1744 dnl AC_PATH_PROGS(MAKEINFO,makeinfo,,$LOCSYSPATH)
1745 dnl AC_PATH_PROGS(TEXI2DVI,texi2dvi,,$LOCSYSPATH)
1747 AC_PATH_PROGS(DUMP,$DUMP_PROGRAMS,,$SYSLOCPATH)
1748 if test -n "$DUMP"; then
1749 if test "`basename $DUMP`" = "backup"; then
1750 backup_gnutar=`$DUMP --version | $GREP "GNU tar"`
1751 if test $? -eq 0; then
1756 AC_PATH_PROGS(RESTORE,ufsrestore restore,,$SYSLOCPATH)
1757 if test "$DUMP" -a "$RESTORE"; then
1758 AC_DEFINE_UNQUOTED(DUMP,"$DUMP",[Define the location of the ufsdump, backup, or dump program. ])
1759 AC_DEFINE_UNQUOTED(RESTORE,"$RESTORE",[Define the location of the ufsrestore or restore program. ])
1760 if test -x $DUMP; then
1762 [whether $DUMP supports -E or -S for estimates],
1763 amanda_cv_dump_estimate,
1767 AC_TRY_COMMAND($DUMP 9Ef /dev/null /dev/null/invalid/fs 2>&1
1770 | $GREP -v Label >conftest.d-E 2>&1)
1771 cat conftest.d-E >&AS_MESSAGE_LOG_FD()
1772 AC_TRY_COMMAND($DUMP 9Sf /dev/null /dev/null/invalid/fs 2>&1
1775 | $GREP -v Label >conftest.d-S 2>&1)
1776 cat conftest.d-S >&AS_MESSAGE_LOG_FD()
1777 AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
1780 | $GREP -v Label >conftest.d 2>&1)
1781 cat conftest.d >&AS_MESSAGE_LOG_FD()
1782 if AC_TRY_COMMAND(cmp conftest.d-E conftest.d 1>&2); then
1783 amanda_cv_dump_estimate=E
1784 elif AC_TRY_COMMAND(cmp conftest.d-S conftest.d 1>&2); then
1785 amanda_cv_dump_estimate=S
1787 amanda_cv_dump_estimate=no
1789 rm -f conftest.d conftest.d-E conftest.d-S
1791 *) amanda_cv_dump_estimate=no
1796 AC_MSG_WARN([*** $DUMP is not executable, cannot run -E/-S test])
1797 amanda_cv_dump_estimate=no
1799 if test "x$amanda_cv_dump_estimate" != xno; then
1800 AC_DEFINE_UNQUOTED(HAVE_DUMP_ESTIMATE, "$amanda_cv_dump_estimate",[Define to the string that enables dump estimates. ])
1803 AC_ARG_WITH(dump-honor-nodump,
1804 [ --with-dump-honor-nodump if dump supports -h, use it for level0s too],
1805 [ if test -x $DUMP; then
1807 [whether $DUMP supports -h (honor nodump flag)],
1808 amanda_cv_honor_nodump,
1812 AC_TRY_COMMAND($DUMP 9hf 0 /dev/null /dev/null/invalid/fs 2>&1
1815 | $GREP -v Label >conftest.d-h 2>&1)
1816 cat conftest.d-h >&AS_MESSAGE_LOG_FD()
1817 AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
1820 | $GREP -v Label >conftest.d 2>&1)
1821 cat conftest.d >&AS_MESSAGE_LOG_FD()
1822 if AC_TRY_COMMAND(diff conftest.d-h conftest.d 1>&2); then
1823 amanda_cv_honor_nodump=yes
1825 amanda_cv_honor_nodump=no
1827 rm -f conftest.d conftest.d-h
1829 *) amanda_cv_honor_nodump=no
1834 AC_MSG_WARN([*** $DUMP is not executable, cannot run -h test])
1835 amanda_cv_honor_nodump=no
1837 if test "x$amanda_cv_honor_nodump" = xyes; then
1838 AC_DEFINE(HAVE_HONOR_NODUMP,1,[Define this if dump accepts -h for honoring nodump. ])
1843 AC_PATH_PROGS(XFSDUMP,xfsdump,,$SYSLOCPATH)
1844 AC_PATH_PROGS(XFSRESTORE,xfsrestore,,$SYSLOCPATH)
1845 if test "$XFSDUMP" -a "$XFSRESTORE"; then
1846 AC_DEFINE_UNQUOTED(XFSDUMP,"$XFSDUMP",[Define the location of the xfsdump program on Irix hosts. ])
1847 AC_DEFINE_UNQUOTED(XFSRESTORE,"$XFSRESTORE",[Define the location of the xfsrestore program on Irix hosts. ])
1848 AC_MSG_WARN([*** xfsdump causes the setuid-root rundump program to be enabled])
1849 AC_MSG_WARN([[*** to disable it, just #undef XFSDUMP in config/config.h]])
1852 VXSYSLOCPATH="$SYSLOCPATH:/usr/lib/fs/vxfs"
1853 AC_PATH_PROGS(VXDUMP,vxdump,,$VXSYSLOCPATH)
1854 AC_PATH_PROGS(VXRESTORE,vxrestore,,$VXSYSLOCPATH)
1855 if test "$VXDUMP" -a "$VXRESTORE"; then
1856 AC_DEFINE_UNQUOTED(VXDUMP,"$VXDUMP",[Define the location of the vxdump program on HPUX and SINIX hosts or on
1857 * other hosts where the Veritas filesystem (vxfs) has been installed. ])
1858 AC_DEFINE_UNQUOTED(VXRESTORE,"$VXRESTORE",[Define the location of the vxrestore program on HPUX and SINIX hosts or on
1859 * other hosts where the Veritas filesystem (vxfs) has been installed. ])
1862 AC_PATH_PROGS(VDUMP,vdump,,$SYSLOCPATH)
1863 AC_PATH_PROGS(VRESTORE,vrestore,,$SYSLOCPATH)
1864 if test "$VDUMP" -a "$VRESTORE"; then
1865 AC_DEFINE_UNQUOTED(VDUMP,"$VDUMP",[Define the location of the vdump program. ])
1866 AC_DEFINE_UNQUOTED(VRESTORE,"$VRESTORE",[Define the location of the vrestore program. ])
1869 dnl Handle all of the substitutions to make amplot work.
1870 if test "$PCAT"; then
1871 AMPLOT_CAT_PACK="if(o==\"z\")print \"$PCAT\"; else"
1875 if test "$COMPRESS"; then
1876 AMPLOT_COMPRESS=$COMPRESS
1877 AMPLOT_CAT_COMPRESS="if(o==\"Z\")print \"$COMPRESS -dc\"; else"
1879 AMPLOT_CAT_COMPRESS=
1881 if test "$GZIP"; then
1882 AMPLOT_COMPRESS=$GZIP
1883 AMPLOT_CAT_GZIP="if(o==\"gz\")print \"$GZIP -dc\"; else"
1887 AC_SUBST(AMPLOT_COMPRESS)
1888 AC_SUBST(AMPLOT_CAT_GZIP)
1889 AC_SUBST(AMPLOT_CAT_COMPRESS)
1890 AC_SUBST(AMPLOT_CAT_PACK)
1894 # Determine the printf format characters to use when printing
1895 # values of type long long. This will normally be "ll", but where
1896 # the compiler treats "long long" as a alias for "long" and printf
1897 # doesn't know about "long long" use "l". Hopefully the sprintf
1898 # will produce a inconsistant result in the later case. If the compiler
1899 # fails due to seeing "%lld" we fall back to "l".
1901 # Win32 uses "%I64d", but that's defined elsewhere since we don't use
1902 # configure on Win32.
1904 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
1908 long long int j = 0;
1911 sprintf(buf, "%lld", j);
1912 exit((sizeof(long long int) != sizeof(long int))? 0 :
1913 (strcmp(buf, "0") != 0));
1917 LL_FMT="%lld"; LL_RFMT="lld"],
1919 LL_FMT="%ld"; LL_RFMT="ld"],
1920 [AC_MSG_RESULT(assuming target platform uses ll)
1921 LL_FMT="%lld"; LL_RFMT="lld"])
1922 AC_DEFINE_UNQUOTED(LL_FMT,"$LL_FMT",
1923 [Format for a long long printf. ])
1924 AC_DEFINE_UNQUOTED(LL_RFMT,"$LL_RFMT",
1925 [Format for a long long printf. ])
1929 dnl Empty GZIP so that make dist works.
1932 dnl Checks for compilers, typedefs, structures, and compiler characteristics.
1933 dnl Check for large file compilation environment.
1936 [for large file compilation CFLAGS],
1937 amanda_cv_LFS_CFLAGS,
1939 amanda_cv_LFS_CFLAGS=
1940 if test "$GETCONF"; then
1941 if $GETCONF ${GETCONF_LFS}_CFLAGS >/dev/null 2>&1; then
1942 amanda_cv_LFS_CFLAGS=`$GETCONF ${GETCONF_LFS}_CFLAGS 2>/dev/null`
1949 [for large file compilation LDFLAGS],
1950 amanda_cv_LFS_LDFLAGS,
1952 amanda_cv_LFS_LDFLAGS=
1953 if test "$GETCONF"; then
1954 if $GETCONF ${GETCONF_LFS}_LDFLAGS >/dev/null 2>&1; then
1955 amanda_cv_LFS_LDFLAGS=`$GETCONF ${GETCONF_LFS}_LDFLAGS 2>/dev/null`
1962 [for large file compilation LIBS],
1966 if test "$GETCONF"; then
1967 if $GETCONF ${GETCONF_LFS}_LIBS >/dev/null 2>&1; then
1968 amanda_cv_LFS_LIBS=`$GETCONF ${GETCONF_LFS}_LIBS 2>/dev/null`
1974 if test "x$need_resetofs" = xyes; then
1975 AC_DEFINE(NEED_RESETOFS,1,[Define if we have to reset tape offsets when reacing 2GB. ])
1979 CFLAGS="$amanda_cv_LFS_CFLAGS $CFLAGS"
1980 CPPFLAGS="$amanda_cv_LFS_CPPFLAGS $CPPFLAGS"
1981 LDFLAGS="$amanda_cv_LFS_LDFLAGS $LDFLAGS"
1982 LIBS="$amanda_cv_LFS_LIBS $LIBS"
1984 AC_CHECK_SIZEOF(int)
1985 AC_CHECK_SIZEOF(long)
1986 AC_CHECK_SIZEOF(long long)
1987 AC_CHECK_SIZEOF(intmax_t)
1988 AC_CHECK_SIZEOF(off_t)
1989 AC_CHECK_SIZEOF(size_t)
1990 AC_CHECK_SIZEOF(ssize_t)
1991 AC_CHECK_SIZEOF(time_t)
1994 AC_SUBST(LIBTOOL_DEPS)
1996 AC_PROG_GCC_TRADITIONAL
1998 AMANDA_C_UNSIGNED_LONG_CONSTANTS
2008 dnl From here on we need to know about STDC_HEADERS
2011 dnl AC_CHECK_TYPE does not work for socklen_t because it does not look
2012 dnl in <sys/socket.h>, so this is a variant that adds another header.
2013 AC_DEFUN([AMANDA_CHECK_TYPE],
2014 [AC_REQUIRE([AC_HEADER_STDC])dnl
2015 AC_MSG_CHECKING(for $1)
2016 AC_CACHE_VAL(ac_cv_type_$1,
2018 changequote(<<,>>)dnl
2019 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
2020 changequote([,]), [#include <sys/types.h>
2025 #include <$3>], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
2026 AC_MSG_RESULT($ac_cv_type_$1)
2027 if test "x$ac_cv_type_$1" = xno; then
2028 AC_DEFINE($1, $2, [Define if $1 is not a standard system type])
2031 AMANDA_CHECK_TYPE(socklen_t, int, sys/socket.h)
2032 AMANDA_CHECK_TYPE(sa_family_t, unsigned short, sys/socket.h)
2034 dnl Checks for header files.
2043 cam/scsi/scsi_message.h \
2061 netinet/in_systm.h \
2063 readline/history.h \
2064 readline/readline.h \
2085 sys/scsi/impl/uscsi.h \
2086 sys/scsi/scsi/ioctl.h \
2103 AC_CHECK_HEADERS(netinet/ip.h,,,
2104 [[#include <sys/socket.h>
2105 #if HAVE_SYS_TYPES_H
2106 #include <sys/types.h>
2108 #ifdef HAVE_NETINET_IN_SYSTM_H
2109 #include <netinet/in_systm.h>
2111 #include <netinet/in.h>
2114 AC_CHECK_HEADERS(sys/mount.h,,,
2115 [[#ifdef HAVE_SYS_PARAM_H
2116 #include <sys/param.h>
2120 NO_SCSI_CHANGER_MODE=true
2121 NO_CHIO_CHANGER_MODE=true
2128 if test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
2129 AC_CACHE_CHECK([for HP/UX-like scsi changer support],
2130 amanda_cv_hpux_scsi_chio,
2131 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2132 #include <sys/scsi.h>
2134 static struct element_addresses changer_info;
2135 int i = SIOC_ELEMENT_ADDRESSES;
2136 int j = SIOC_ELEMENT_STATUS;
2137 int k = SIOC_MOVE_MEDIUM;
2138 ]])],[amanda_cv_hpux_scsi_chio=yes],[amanda_cv_hpux_scsi_chio=no])])
2139 if test x"$amanda_cv_hpux_scsi_chio" = x"yes"; then
2140 AC_DEFINE(HAVE_HPUX_SCSI_CHIO,1,[Define to enable HPUX chio based changer support. ])
2141 NO_SCSI_CHANGER_MODE=false
2146 dnl Linux SCSI based on ioctl
2148 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
2149 test x"$ac_cv_header_scsi_scsi_ioctl_h" = x"yes"; then
2150 AC_CACHE_CHECK([for Linux like scsi support (ioctl)],
2151 amanda_cv_linux_scsi,
2152 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2153 #include <scsi/scsi_ioctl.h>
2154 #include <sys/mtio.h>
2158 ioctl(device, SCSI_IOCTL_SEND_COMMAND, Command);
2159 ]])],[amanda_cv_linux_scsi=yes],[amanda_cv_linux_scsi=no])])
2163 dnl Linux SCSI based on sg
2165 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
2166 test x"$ac_cv_header_scsi_sg_h" = x"yes"; then
2167 AC_CACHE_CHECK([for Linux like scsi support (sg)],
2168 amanda_cv_linux_sg_scsi,
2169 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2170 #include <sys/types.h>
2171 #include <scsi/sg.h>
2172 #include <sys/mtio.h>
2175 struct sg_header *psg_header;
2177 write(device, buffer, 1);
2178 ]])],[amanda_cv_linux_sg_scsi=yes],[amanda_cv_linux_sg_scsi=no])])
2181 if test x"$amanda_cv_linux_scsi" = x"yes" ||
2182 test x"$amanda_cv_linux_sg_scsi" = x"yes";then
2183 AC_DEFINE(HAVE_LINUX_LIKE_SCSI,1,[Define to enable Linux tape-changer support.])
2184 NO_SCSI_CHANGER_MODE=false
2190 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
2191 test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
2192 AC_CACHE_CHECK([for HP-UX like scsi support],
2193 amanda_cv_hpux_scsi,
2194 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2196 #include <sys/ioctl.h>
2197 #include <sys/scsi.h>
2198 #include <sys/mtio.h>
2202 ioctl(device, SIOC_IO, Command);
2203 ]])],[amanda_cv_hpux_scsi=yes],[amanda_cv_hpux_scsi=no])])
2204 if test x"$amanda_cv_hpux_scsi" = x"yes";then
2205 AC_DEFINE(HAVE_HPUX_LIKE_SCSI,1,[Define to enable HPUX tape-changer support. ])
2206 NO_SCSI_CHANGER_MODE=false
2207 NO_CHIO_CHANGER_MODE=false
2214 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
2215 test x"$ac_cv_header_sys_dsreq_h" = x"yes"; then
2216 AC_CACHE_CHECK([for Irix like scsi support],
2217 amanda_cv_irix_scsi,
2218 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2219 #include <sys/types.h>
2220 #include <sys/dsreq.h>
2221 #include <sys/mtio.h>
2225 ioctl(device, DS_ENTER, &Command);
2226 ]])],[amanda_cv_irix_scsi=yes],[amanda_cv_irix_scsi=no])])
2227 if test x"$amanda_cv_irix_scsi" = x"yes";then
2228 AC_DEFINE(HAVE_IRIX_LIKE_SCSI,1,[Define to enable IRIX tape-changer support])
2229 NO_SCSI_CHANGER_MODE=false
2236 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
2237 test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then
2238 AC_CACHE_CHECK([for Solaris-like scsi support],
2239 amanda_cv_solaris_scsi,
2240 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2241 #include <sys/types.h>
2242 #include <sys/scsi/impl/uscsi.h>
2243 #include <sys/mtio.h>
2247 ioctl(device, USCSICMD, Command);
2248 ]])],[amanda_cv_solaris_scsi=yes],[amanda_cv_solaris_scsi=no])])
2249 if test x"$amanda_cv_solaris_scsi" = x"yes";then
2250 AC_DEFINE(HAVE_SOLARIS_LIKE_SCSI,1,[Define to enable Solaris tape-changer support])
2251 NO_SCSI_CHANGER_MODE=false
2258 if test x"$ac_cv_header_sys_tape_h" = x"yes" &&
2259 test x"$ac_cv_header_sys_scarray_h" = x"yes" &&
2260 test x"$ac_cv_header_sys_gscdds_h" = x"yes"; then
2261 AC_CACHE_CHECK([for AIX like scsi support],
2263 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2264 #include <sys/types.h>
2265 #include <sys/scarray.h>
2266 #include <sys/tape.h>
2270 ioctl(device, STIOCMD, Command);
2271 ]])],[amanda_cv_aix_scsi=yes],[amanda_cv_aix_scsi=no])])
2272 if test x"$amanda_cv_aix_scsi" = x"yes";then
2273 AC_DEFINE(HAVE_AIX_LIKE_SCSI,1,[Define to enable AIX tape-changer support])
2274 NO_SCSI_CHANGER_MODE=false
2280 if test x"$ac_cv_header_cam_cam_h" = x"yes";then
2281 AC_CACHE_CHECK([for CAM like scsi support],
2283 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2286 # include <cam/cam.h>
2287 # include <cam/cam_ccb.h>
2288 # include <cam/scsi/scsi_message.h>
2289 # include <cam/scsi/scsi_pass.h>
2290 # include <camlib.h>
2292 struct cam_device *curdev;
2294 curdev = cam_open_pass("", O_RDWR, NULL);
2295 ]])],[amanda_cv_cam_scsi=yes],[amanda_cv_cam_scsi=no])])
2296 if test x"$amanda_cv_cam_scsi" = x"yes";then
2297 AC_DEFINE(HAVE_CAM_LIKE_SCSI,1,[Define to enable CAM tape-changer support])
2298 NO_SCSI_CHANGER_MODE=false
2299 AC_CHECK_LIB(cam,main)
2307 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
2308 test x"$ac_cv_header_sys_scsiio_h" = x"yes"; then
2309 AC_CACHE_CHECK([for BSD like scsi support],
2311 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2312 #include <sys/types.h>
2313 #include <sys/scsiio.h>
2314 #include <sys/mtio.h>
2318 ioctl(device, SCIOCCOMMAND, &Command);
2319 ]])],[amanda_cv_bsd_scsi=yes],[amanda_cv_bsd_scsi=no])])
2320 if test x"$amanda_cv_bsd_scsi" = x"yes";then
2321 AC_DEFINE(HAVE_BSD_LIKE_SCSI,1,[Define to enable BSD tape-changer support])
2322 NO_SCSI_CHANGER_MODE=false
2326 dnl Do not build chg-scsi-chio if we cannot find the needed support
2327 dnl include files for the SCSI interfaces
2328 dnl chio.h and sys/chio.h are chio based systems
2329 if test x"$ac_cv_header_chio_h" = x"yes" ||
2330 test x"$ac_cv_header_sys_chio_h" = x"yes"; then
2331 dnl chg-scsi does not support FreeBSD 3.0's chio.h; it became backward
2332 dnl incompatible with the introduction of camlib.h
2333 if test x"$ac_cv_header_camlib_h" != x"yes"; then
2334 if $NO_SCSI_CHANGER_MODE; then
2335 NO_SCSI_CHANGER_MODE=false
2337 NO_CHIO_CHANGER_MODE=false
2342 dnl cur_colr is on some HP's
2343 AC_CHECK_LIB(cur_colr,main)
2345 AC_CHECK_LIB(intl,main)
2347 dnl Make sure we don't use -lnsl and -lsun on Irix systems.
2350 AC_CHECK_LIB(socket,main)
2353 AC_CHECK_LIB(resolv,main)
2354 AC_CHECK_LIB(nsl,main)
2355 AC_CHECK_LIB(socket,main)
2356 AC_CHECK_LIB(sun,main)
2360 AC_CHECK_LIB(termcap,tgetent)
2361 if test "x$ac_cv_lib_termcap_tgetent" != xyes; then
2362 AC_CHECK_LIB(curses,tgetent)
2363 if test "x$ac_cv_lib_curses_tgetent" != xyes; then
2364 AC_CHECK_LIB(ncurses,tgetent)
2367 if test "x$ac_cv_lib_termcap_tgetent" = xyes ||
2368 test "x$ac_cv_lib_curses_tgetent" = xyes ||
2369 test "x$ac_cv_lib_ncurses_tgetent" = xyes; then
2370 AC_CHECK_LIB(readline,readline)
2371 if test "x$ac_cv_lib_readline_readline" = xyes; then
2372 READLINE_LIBS="-lreadline"
2373 AC_SUBST(READLINE_LIBS)
2375 AC_MSG_WARN([*** No readline library, no history and command line editing in amrecover!])
2378 AC_MSG_WARN([*** No terminal library, no history and command line editing in amrecover!])
2381 if test "x$ac_cv_header_linux_zftape_h" = xyes; then
2382 if test "x$ac_cv_header_vtblc_h" = xyes; then
2383 AC_CHECK_LIB(vtblc,main)
2384 if test "x$ac_cv_lib_vtblc_main" != xyes; then
2385 AC_MSG_WARN([*** vtblc library not found - no QIC volume table support!])
2388 AC_MSG_WARN([*** vtblc headers not found - no QIC volume table support!])
2392 AC_CHECK_LIB(m,modf)
2394 dnl Check for various "mt status" related structure elements.
2396 AC_MSG_CHECKING(for mt_flags mtget structure element)
2397 mt_flags_result="found"
2398 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2400 #include <sys/types.h>
2401 #include <sys/mtio.h>
2407 ]])],[AC_DEFINE(HAVE_MT_FLAGS,1,Define if the mtget structure has an mt_flags field)],[mt_flags_result="not found"])
2408 AC_MSG_RESULT($mt_flags_result)
2410 AC_MSG_CHECKING(for mt_fileno mtget structure element)
2411 mt_fileno_result="found"
2412 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2414 #include <sys/types.h>
2415 #include <sys/mtio.h>
2421 ]])],[AC_DEFINE(HAVE_MT_FILENO,1,Define if the mtget structure has an mt_fileno field)],[mt_fileno_result="not found"])
2422 AC_MSG_RESULT($mt_fileno_result)
2424 AC_MSG_CHECKING(for mt_blkno mtget structure element)
2425 mt_blkno_result="found"
2426 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2428 #include <sys/types.h>
2429 #include <sys/mtio.h>
2435 ]])],[AC_DEFINE(HAVE_MT_BLKNO,1,Define if the mtget structure has an mt_blkno field)],[mt_blkno_result="not found"])
2436 AC_MSG_RESULT($mt_blkno_result)
2438 AC_MSG_CHECKING(for mt_dsreg mtget structure element)
2439 mt_dsreg_result="found"
2440 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2442 #include <sys/types.h>
2443 #include <sys/mtio.h>
2449 ]])],[AC_DEFINE(HAVE_MT_DSREG,1,Define if the mtget structure has an mt_dsreg field)],[mt_dsreg_result="not found"])
2450 AC_MSG_RESULT($mt_dsreg_result)
2452 AC_MSG_CHECKING(for mt_erreg mtget structure element)
2453 mt_erreg_result="found"
2454 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2456 #include <sys/types.h>
2457 #include <sys/mtio.h>
2463 ]])],[AC_DEFINE(HAVE_MT_ERREG,1,Define if the mtget structure has an mt_erreg field)],[mt_erreg_result="not found"])
2464 AC_MSG_RESULT($mt_erreg_result)
2468 dnl Check if the system does support the user requested database library.
2469 dnl Begin by checking for the header file. If it is not there, then do
2470 dnl not use the library. If the header file is there, then try to link
2471 dnl against the library. If it's not there, then try to link using
2472 dnl just the -lc library. If the link against -lc fails, then do not
2473 dnl use this library.
2477 dnl Testing if libc contains the dbm_open routine is tested for a
2478 dnl lot of times below. We do it once here now.
2480 AC_CHECK_LIB(c,dbm_open)
2485 if test "x$ac_cv_header_db_h" = xyes; then
2486 AC_CHECK_LIB(db,main)
2487 if test "x$ac_cv_lib_db_main" = xyes; then
2488 AC_CHECK_LIB(db,dbm_open)
2489 if test "x$ac_cv_lib_db_dbm_open" = xyes; then
2494 AC_MSG_WARN([*** db database library requested but dbm_open not found in -ldb.])
2497 if test "x$ac_cv_lib_c_dbm_open" = xyes; then
2502 AC_MSG_WARN([*** db library requested but -ldb doesn't exist and dbm_open cannot be found.])
2507 AC_MSG_WARN([*** db database library requested but db.h not found.])
2512 if test "x$ac_cv_header_dbm_h" = xyes; then
2513 AC_CHECK_LIB(dbm,main)
2514 if test "x$ac_cv_lib_dbm_main" = xyes; then
2515 AC_CHECK_LIB(dbm,dbm_open)
2516 if test "x$ac_cv_lib_dbm_dbm_open" = xyes; then
2521 AC_MSG_WARN([*** dbm database library requested but dbm_open not found in -ldbm.])
2524 if test "x$ac_cv_lib_c_dbm_open" = xyes; then
2529 AC_MSG_WARN([*** dbm library requested but -ldbm doesn't exist and dbm_open cannot be found.])
2534 AC_MSG_WARN([*** dbm database library requested but dbm.h not found.])
2539 if test "x$ac_cv_header_ndbm_h" = xyes; then
2540 AC_CHECK_LIB(gdbm,main)
2541 if test "x$ac_cv_lib_gdbm_main" = xyes; then
2542 AC_CHECK_LIB(gdbm,dbm_open)
2543 if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then
2548 AC_MSG_WARN([*** gdbm database library requested but -lgdbm not found.])
2551 if test "x$ac_cv_lib_c_dbm_open" = xyes; then
2556 AC_MSG_WARN([*** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found.])
2561 AC_MSG_WARN([*** gdbm database library requested but ndbm.h not found.])
2566 if test "x$ac_cv_header_ndbm_h" = xyes; then
2567 AC_CHECK_LIB(ndbm,main)
2568 if test "x$ac_cv_lib_ndbm_main" = xyes; then
2569 AC_CHECK_LIB(ndbm,dbm_open)
2570 if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then
2575 AC_MSG_WARN([*** ndbm database library requested but -lndbm not found.])
2578 if test "x$ac_cv_lib_c_dbm_open" = xyes; then
2583 AC_MSG_WARN([*** ndbm library requested but -lndbm doesn't exist and dbm_open cannot be found.])
2588 AC_MSG_WARN([*** ndbm database library requested but ndbm.h not found.])
2597 dnl If a database style was not specified select an appropriate one
2599 dnl Nowadays we default to our own internal text database, but I have left
2600 dnl the code that does the testing here just in case it is needed one day.
2602 if test -z "$DB_STYLE"; then
2608 dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_ndbm_h" = xyes; then
2609 dnl AC_CHECK_LIB(ndbm,dbm_open)
2610 dnl if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then
2612 dnl DB_HEADER=ndbm.h
2614 dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then
2616 dnl DB_HEADER=ndbm.h
2621 dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_db_h" = xyes; then
2622 dnl AC_CHECK_LIB(db,dbm_open)
2623 dnl if test "x$ac_cv_lib_db_dbm_open" = xyes; then
2627 dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then
2634 dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_dbm_h" = xyes; then
2635 dnl AC_CHECK_LIB(dbm,dbm_open)
2636 dnl if test "x$ac_cv_lib_db_dbm_open" = xyes; then
2640 dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then
2647 dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_ndbm_h" = xyes; then
2648 dnl AC_CHECK_LIB(gdbm,dbm_open)
2649 dnl if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then
2651 dnl DB_HEADER=ndbm.h
2653 dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then
2655 dnl DB_HEADER=ndbm.h
2660 dnl if test -z "$DB_STYLE"; then
2661 dnl if test "x$ac_cv_lib_c_dbm_open" = xyes; then
2662 dnl AC_MSG_WARN([*** A dbm_open() routine was found in -lc, but no header])
2663 dnl AC_MSG_WARN([*** files exist. Please remedy the situation.])
2665 dnl AC_MSG_WARN([*** No dbm_open() routine found!])
2667 dnl AC_MSG_WARN([*** You may want to install the gdbm library from])
2668 dnl AC_MSG_WARN([*** ftp://prep.ai.mit.edu/pub/gnu/gdbm-1.7.3.tar.gz.])
2670 dnl AC_MSG_WARN([*** Using the built-in text database.])
2676 if test "x$DB_STYLE" = xtext; then
2677 AC_DEFINE(TEXTDB,1,[Define to enable the text-based database format. ])
2679 AC_MSG_CHECKING([for database])
2680 AC_MSG_RESULT([header is $DB_HEADER, linking against -l$DB_LIB])
2682 db) AC_DEFINE(USE_DB_H,1,[Define to enable db databases. ]) ;;
2683 dbm) AC_DEFINE(USE_DBM_H,1,[Define to enable dbm databases. ]) ;;
2684 gdbm) AC_DEFINE(USE_GDBM_H,1,[Define to enable gdbm databases. ]) ;;
2685 ndbm) AC_DEFINE(USE_NDBM_H,1,[Define to enable ndbm databases. ]) ;;
2689 [for struct datum declared in header files],
2690 amanda_cv_struct_datum,
2692 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2693 #if defined(USE_DB_H)
2696 # if defined(USE_DBM_H)
2699 # if defined(USE_NDBM_H)
2706 ]])],[amanda_cv_struct_datum=yes],[amanda_cv_struct_datum=no
2709 if test "x$amanda_cv_struct_datum" = xyes; then
2710 AC_DEFINE(HAVE_STRUCT_DATUM,1,[Define if the database header declares struct datum. ])
2717 dbm | ndbm) DB_EXT=".dir .pag";;
2723 AC_CACHE_CHECK(whether _POSIX2_RE_DUP_MAX is defined,
2724 amanda_cv_have__posix2_re_dup_max,
2727 #ifdef _POSIX2_RE_DUP_MAX
2730 ], amanda_cv_have__posix2_re_dup_max=yes, amanda_cv_have__posix2_re_dup_max=no))
2731 if test "x$amanda_cv_have__posix2_re_dup_max" = xyes; then
2732 AC_DEFINE(HAVE__POSIX2_RE_DUP_MAX,1,[Define if limits.h defines _POSIX2_RE_DUP_MAX. ])
2735 AC_CACHE_CHECK(whether CHAR_MIN is defined,
2736 amanda_cv_have_char_min,
2742 ], amanda_cv_have_char_min=yes, amanda_cv_have_char_min=no))
2743 if test "x$amanda_cv_have_char_min" = xyes; then
2744 AC_DEFINE(HAVE_CHAR_MIN,1,[Define if limits.h defines CHAR_MIN. ])
2747 AC_CACHE_CHECK(whether CHAR_MAX is defined,
2748 amanda_cv_have_char_max,
2754 ], amanda_cv_have_char_max=yes, amanda_cv_have_char_max=no))
2755 if test "x$amanda_cv_have_char_max" = xyes; then
2756 AC_DEFINE(HAVE_CHAR_MAX,1,[Define if limits.h defines CHAR_MAX. ])
2759 AC_CACHE_CHECK(whether CHAR_BIT is defined,
2760 amanda_cv_have_char_bit,
2766 ], amanda_cv_have_char_bit=yes, amanda_cv_have_char_bit=no))
2767 if test "x$amanda_cv_have_char_bit" = xyes; then
2768 AC_DEFINE(HAVE_CHAR_BIT,1,[Define if limits.h defines CHAR_BIT. ])
2771 dnl Checks for library functions and if the function is declared in
2772 dnl an appropriate header file. Add some of the missing functions
2774 ICE_CHECK_DECL(accept,sys/types.h sys/socket.h)
2776 AC_CHECK_FUNCS(atexit)
2777 ICE_CHECK_DECL(atof,stdlib.h)
2778 ICE_CHECK_DECL(atoi,stdlib.h)
2779 ICE_CHECK_DECL(atol,stdlib.h)
2780 ICE_CHECK_DECL(atoll,stdlib.h)
2781 ICE_CHECK_DECL(strtol,stdlib.h)
2782 ICE_CHECK_DECL(strtoll,stdlib.h)
2783 AC_CHECK_FUNCS(basename)
2784 ICE_CHECK_DECL(bind,sys/types.h sys/socket.h)
2785 ICE_CHECK_DECL(bcopy,string.h strings.h stdlib.h)
2786 ICE_CHECK_DECL(bzero,string.h strings.h stdlib.h)
2787 AC_FUNC_CLOSEDIR_VOID
2788 ICE_CHECK_DECL(closelog,syslog.h)
2789 ICE_CHECK_DECL(connect,sys/types.h sys/socket.h)
2790 ICE_CHECK_DECL(dbm_open,${DB_HEADER-no/db/header/file})
2791 AC_CHECK_FUNCS(endmntent)
2792 ICE_CHECK_DECL(fclose,stdio.h)
2793 ICE_CHECK_DECL(fflush,stdio.h)
2794 ICE_CHECK_DECL(flock,sys/file.h)
2795 ICE_CHECK_DECL(fprintf,stdio.h)
2796 ICE_CHECK_DECL(fputc,stdio.h)
2797 ICE_CHECK_DECL(fputs,stdio.h)
2798 ICE_CHECK_DECL(fread,stdio.h stdlib.h)
2799 ICE_CHECK_DECL(fseek,stdio.h)
2800 ICE_CHECK_DECL(fwrite,stdio.h stdlib.h)
2801 AC_CHECK_FUNCS(getfsent)
2802 ICE_CHECK_DECL(gethostname,unistd.h)
2804 ICE_CHECK_DECL(getopt,stdlib.h unistd.h libc.h)
2805 ICE_CHECK_DECL(getpeername,sys/types.h sys/socket.h)
2806 AC_CHECK_FUNCS(getpgrp)
2808 ICE_CHECK_DECL(getsockname,sys/types.h sys/socket.h)
2809 ICE_CHECK_DECL(getsockopt,sys/types.h sys/socket.h)
2810 ICE_CHECK_DECL(gettimeofday,time.h sys/time.h)
2811 AMANDA_FUNC_GETTIMEOFDAY_ARGS
2812 AC_CHECK_FUNCS(getvfsent initgroups isascii)
2813 ICE_CHECK_DECL(initgroups,grp.h sys/types.h unistd.h libc.h)
2814 ICE_CHECK_DECL(ioctl,sys/ioctl.h unistd.h libc.h)
2815 ICE_CHECK_DECL(isnormal,math.h)
2816 ICE_CHECK_DECL(listen,sys/types.h sys/socket.h)
2817 ICE_CHECK_DECL(lstat,sys/types.h sys/stat.h)
2818 ICE_CHECK_DECL(malloc,stdlib.h)
2819 ICE_CHECK_DECL(memmove,string.h strings.h)
2820 ICE_CHECK_DECL(memset,string.h strings.h)
2821 AC_CHECK_FUNCS(mkdir)
2822 ICE_CHECK_DECL(mkstemp,stdlib.h)
2823 ICE_CHECK_DECL(mktemp,stdlib.h)
2824 ICE_CHECK_DECL(mktime,time.h sys/time.h)
2826 dnl atexit() is prefered, sunos (maybe others?) define on_exit
2827 AC_CHECK_FUNCS(on_exit)
2828 ICE_CHECK_DECL(openlog,syslog.h)
2829 ICE_CHECK_DECL(pclose,stdio.h)
2830 ICE_CHECK_DECL(perror,stdio.h)
2831 ICE_CHECK_DECL(printf,stdio.h)
2832 AC_CHECK_FUNCS(putenv)
2833 ICE_CHECK_DECL(puts,stdio.h)
2834 ICE_CHECK_DECL(realloc,stdlib.h)
2835 ICE_CHECK_DECL(recvfrom,sys/types.h sys/socket.h)
2836 ICE_CHECK_DECL(remove,stdio.h)
2837 ICE_CHECK_DECL(rename,stdio.h)
2838 ICE_CHECK_DECL(rewind,stdio.h)
2839 AC_CHECK_FUNCS(rmdir)
2840 ICE_CHECK_DECL(ruserok,netdb.h sys/socket.h libc.h unistd.h)
2841 ICE_CHECK_DECL(select,sys/types.h sys/socket.h sys/select.h time.h sys/time.h)
2842 AMANDA_FUNC_SELECT_ARG_TYPE
2843 ICE_CHECK_DECL(sendto,sys/types.h sys/socket.h)
2844 ICE_CHECK_DECL(setegid,unistd.h)
2845 ICE_CHECK_DECL(seteuid,unistd.h)
2846 AC_CHECK_FUNCS(setmntent)
2847 AC_CHECK_FUNCS(shquote)
2849 ICE_CHECK_DECL(setresgid,unistd.h)
2850 ICE_CHECK_DECL(setresuid,unistd.h)
2851 ICE_CHECK_DECL(snprintf,stdio.h)
2852 ICE_CHECK_DECL(vsnprintf,stdio.h)
2854 dnl arguments for setpgrp or not
2855 AC_CHECK_FUNC(setpgid, [
2856 AC_DEFINE(HAVE_SETPGID,1,[Define if setpgid() is available. ])
2857 ICE_CHECK_DECL(setpgid,sys/types.h unistd.h)
2859 AC_CHECK_FUNC(setpgrp,[AC_FUNC_SETPGRP])
2860 ICE_CHECK_DECL(setpgrp,sys/types.h unistd.h libc.h)
2862 ICE_CHECK_DECL(setsockopt,sys/types.h sys/socket.h)
2864 AC_CHECK_FUNCS(shmget,
2866 AMANDA_FUNC_SHM_ARG_TYPE
2867 case "$FORCE_MMAP" in
2869 AC_DEFINE(HAVE_SYSVSHM,1,[Define if SysV shared-memory functions are available. ])
2874 ICE_CHECK_DECL(shmat,sys/types.h sys/ipc.h sys/shm.h)
2875 ICE_CHECK_DECL(shmctl,sys/types.h sys/ipc.h sys/shm.h)
2876 ICE_CHECK_DECL(shmdt,sys/types.h sys/ipc.h sys/shm.h)
2877 ICE_CHECK_DECL(shmget,sys/types.h sys/ipc.h sys/shm.h)
2879 if test "x$ac_cv_func_mmap_fixed_mapped" != xyes; then
2880 case "$FORCE_MMAP" in
2882 if test "x$ac_cv_func_shmget" != xyes; then
2883 AC_MSG_WARN([*** Neither shmget() nor mmap() found!])
2884 AC_MSG_WARN([*** This system will not support the Amanda server.])
2889 AC_MSG_WARN([*** --with-mmap used on a system with no mmap() support!])
2890 AC_MSG_WARN([*** This system will not support the Amanda server.])
2896 AC_CHECK_FUNCS(sigaction sigemptyset sigvec)
2897 ICE_CHECK_DECL(socket,sys/types.h sys/socket.h)
2898 ICE_CHECK_DECL(socketpair,sys/types.h sys/socket.h)
2899 ICE_CHECK_DECL(sscanf,stdio.h)
2900 AC_CHECK_FUNCS(statfs statvfs)
2901 ICE_CHECK_DECL(strerror,string.h strings.h)
2903 ICE_CHECK_DECL(strftime,time.h sys/time.h)
2904 ICE_CHECK_DECL(strncasecmp,string.h strings.h)
2905 ICE_CHECK_DECL(syslog,syslog.h)
2906 ICE_CHECK_DECL(system,stdlib.h)
2907 ICE_CHECK_DECL(time,time.h sys/time.h)
2908 ICE_CHECK_DECL(tolower,ctype.h)
2909 ICE_CHECK_DECL(toupper,ctype.h)
2910 ICE_CHECK_DECL(ungetc,stdio.h)
2912 ICE_CHECK_DECL(vfprintf,stdio.h stdlib.h)
2913 ICE_CHECK_DECL(vprintf,stdio.h stdlib.h)
2914 ICE_CHECK_DECL(vsprintf,stdio.h stdlib.h)
2915 AC_CHECK_FUNC(wait4)
2916 #AC_REPLACE_FUNCS(writev)
2917 ICE_CHECK_DECL(writev, unistd.h sys/uio.h)
2918 ICE_CHECK_DECL(strcasecmp,string.h strings.h)
2920 AC_CHECK_FUNCS(fnmatch)
2923 dnl disk device prefixes
2924 AC_MSG_CHECKING(disk device prefixes)
2925 dnl Use df to find the mount point for the root filesystem. Use
2926 dnl the positional parameters to find the particular line from df
2927 dnl that contains the root paritition. We put it in a subshell so
2928 dnl that the original positional parameters are not messed with.
2930 df / | while read line; do
2932 while test $# -gt 0; do
2933 if test "x$1" = "x/"; then
2940 ) | sed 's/(//' | sed 's/)//' `
2942 dnl Search for the mount point by using expr to find the parameter
2946 while test $# -gt 0; do
2947 if expr "$1" : '.*dev' >/dev/null 2>&1; then
2955 if test "$DEV_PREFIX" && test "$RDEV_PREFIX"; then
2956 AC_MSG_RESULT((predefined) $DEV_PREFIX - $RDEV_PREFIX)
2958 if test -d /dev/dsk; then
2959 DEV_PREFIX=/dev/dsk/
2960 if test -d /dev/rdsk; then
2961 RDEV_PREFIX=/dev/rdsk/
2963 RDEV_PREFIX=/dev/dsk/
2965 elif test -d /dev; then
2968 dev_prefix=/dev/dsk/
2969 rdev_prefix=/dev/rdsk/
2970 AC_MSG_WARN("*** Run amsinixfixdevs on Sinix systems using VxFS.")
2975 # Some systems, notably Linux, do not have raw disk devices
2976 # names. Check this by trying to see if a raw disk device name
2977 # exists using the normal raw device path prepended to the
2978 # mount point of the root filesystem.
2979 if test "$mount"; then
2980 dev_name="/dev/r`basename $mount`"
2981 if test -b $dev_name -o -c $dev_name; then
2995 AC_MSG_RESULT($DEV_PREFIX - $RDEV_PREFIX)
2998 AC_DEFINE_UNQUOTED(DEV_PREFIX,"${DEV_PREFIX}",[Define as the prefix for disk devices, commonly /dev/ or /dev/dsk/ ])
2999 AC_DEFINE_UNQUOTED(RDEV_PREFIX,"${RDEV_PREFIX}",[Define as the prefix for raw disk devices, commonly /dev/r or /dev/rdsk/ ])
3003 AC_MSG_WARN("*** Run amhpfixdevs on HP-UX systems using /dev/vg??.")
3007 dnl lock/flock/fcntl
3009 [whether posix fcntl locking works],
3010 amanda_cv_posix_filelocking,
3012 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3014 #define CONFIGURE_TEST
3015 #define USE_POSIX_FCNTL
3016 #include "${srcdir-.}/common-src/amflock.c"
3018 amanda_cv_posix_filelocking=yes
3020 amanda_cv_posix_filelocking="no"
3022 amanda_cv_posix_filelocking="no (cannot run test)"
3024 rm -f /tmp/conftest.lock
3026 if test "x$amanda_cv_posix_filelocking" = xyes; then
3027 AC_DEFINE(USE_POSIX_FCNTL,1,[Define to use Posix fcntl for file locking.])
3028 HAS_WORKING_FILE_LOCK=1
3031 if test -z "$HAS_WORKING_FILE_LOCK"; then
3033 [whether flock locking works],
3034 amanda_cv_flock_filelocking,
3036 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3038 #define CONFIGURE_TEST
3040 #include "${srcdir-.}/common-src/amflock.c"
3042 amanda_cv_flock_filelocking="yes"
3044 amanda_cv_flock_filelocking="no"
3046 amanda_cv_flock_filelocking="no (cannot run test)"
3048 rm -f /tmp/conftest.lock
3050 if test "x$amanda_cv_flock_filelocking" = xyes; then
3051 AC_DEFINE(USE_FLOCK,1,[Define to use flock for file locking.])
3052 HAS_WORKING_FILE_LOCK=1
3056 if test -z "$HAS_WORKING_FILE_LOCK"; then
3058 [whether lockf locking works],
3059 amanda_cv_lockf_filelocking,
3061 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3063 #define CONFIGURE_TEST
3065 #include "${srcdir-.}/common-src/amflock.c"
3067 amanda_cv_lockf_filelocking="yes"
3069 amanda_cv_lockf_filelocking="no"
3071 amanda_cv_lockf_filelocking="no (cannot run test)"
3073 rm -f /tmp/conftest.lock
3075 if test "x$amanda_cv_lockf_filelocking" = xyes; then
3076 AC_DEFINE(USE_LOCKF,1,[Define to use lockf for file locking.])
3077 HAS_WORKING_FILE_LOCK=1
3081 if test -z "$HAS_WORKING_FILE_LOCK"; then
3083 [whether lnlock locking works],
3084 amanda_cv_lnlock_filelocking,
3086 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3088 #define CONFIGURE_TEST
3090 #include "${srcdir-.}/common-src/amflock.c"
3091 #include "${srcdir-.}/common-src/alloc.c"
3092 #include "${srcdir-.}/common-src/error.c"
3093 #include "${srcdir-.}/common-src/snprintf.c"
3095 amanda_cv_lnlock_filelocking="yes"
3097 amanda_cv_lnlock_filelocking="no"
3099 amanda_cv_lnlock_filelocking="no (cannot run test)"
3101 rm -f /tmp/conftest.lock
3103 if test "x$amanda_cv_lnlock_filelocking" = xyes; then
3104 AC_DEFINE(USE_LNLOCK,1,[Define to use a hard-link based approach for file locking.])
3105 HAS_WORKING_FILE_LOCK=1
3109 if test -z "$HAS_WORKING_FILE_LOCK"; then
3110 AC_MSG_WARN([*** No working file locking capability found!])
3111 AC_MSG_WARN([*** Be VERY VERY careful.])
3114 dnl extra substitution parameters
3121 AM_CONDITIONAL(WANT_CLIENT, test x"$NO_CLIENT_MODE" != x"true")
3122 AM_CONDITIONAL(WANT_SAMBA, test ! -z "$SAMBA_CLIENT")
3123 AM_CONDITIONAL(WANT_RESTORE, test x"$NO_RESTORE_MODE" != x"true")
3124 AM_CONDITIONAL(WANT_SERVER, test x"$NO_SERVER_MODE" != x"true")
3125 AM_CONDITIONAL(WANT_RECOVER, test x"$NO_RECOVER_MODE" != x"true" && test x"$NO_CLIENT_MODE" != x"true")
3126 AM_CONDITIONAL(WANT_TAPE, test x"$NO_SERVER_MODE" != x"true" || test x"$NO_RESTORE_MODE" != x"true")
3127 AM_CONDITIONAL(WANT_AMPLOT, test x"$NO_AMPLOT_MODE" != x"true")
3128 AM_CONDITIONAL(WANT_CHG_SCSI, test x"$NO_SCSI_CHANGER_MODE" != x"true")
3129 AM_CONDITIONAL(WANT_CHIO_SCSI, test x"$NO_CHIO_CHANGER_MODE" != x"true")
3130 AM_CONDITIONAL(WANT_RUNTIME_PSEUDO_RELOC, test x"$NEED_RUNTIME_PSEUDO_RELOC" = x"true")
3131 AM_CONDITIONAL(WANT_SETUID_CLIENT, test x"$NEED_SETUID_CLIENT" != x"false")
3132 AM_CONDITIONAL(WANT_SSH_SECURITY, test x"$SSH_SECURITY_SET" = x"true")
3134 case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in
3135 y | ye | yes) AC_DEFINE(USE_RUNDUMP,1,[Define to invoke rundump (setuid-root) instead of DUMP program directly. ]);;
3138 # This is necessary so that .o files in LIBOBJS are also built via
3139 # the ANSI2KNR-filtering rules.
3140 LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
3141 sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
3142 LTLIBOBJS=`echo "$LIB@&t@OBJS" |
3143 sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
3146 LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/g'`
3149 ## This stuff is needed for the documentation.
3150 DOC_BUILD_DATE=`date '+%d-%m-%Y'`
3151 AC_SUBST(DOC_BUILD_DATE)
3153 AC_ARG_ENABLE(manpage-build,
3154 AS_HELP_STRING([--enable-manpage-build],
3155 [Build the manpages from their XML source (shipped manpages are usually sufficient)]),
3156 [ ENABLE_MANPAGE_BUILD=$enableval ],
3157 [ ENABLE_MANPAGE_BUILD=no ])
3159 AC_PROG_XSLTPROC([--nonet])
3160 AC_CHECK_DOCBOOK_XSLT([1.72.0])
3161 AC_CHECK_DOCBOOK_DTD([4.1.2])
3162 AC_CHECK_DOCBOOK_DTD([4.2])
3164 # and ensure that everything docbook-related is OK if we'll be using it
3165 if test "x$ENABLE_MANPAGE_BUILD" = "xyes"; then
3166 if test -z "$XSLTPROC"; then
3167 AC_MSG_ERROR([Cannot build manpages: 'xsltproc' was not found.])
3170 if test "x$HAVE_DOCBOOK_XSLT_1_72_0" = "xno"; then
3171 AC_MSG_ERROR([Cannot build manpages: docbook version 1.72.0 was not found.])
3174 if test "x$HAVE_DOCBOOK_DTD_4_1_2" = "xno" || test "x$HAVE_DOCBOOK_DTD_4_2" = "xno"; then
3175 AC_MSG_WARN([Docbook DTD versions 4.1.2 and 4.2 are required for manpage validation; disabling validation])
3176 XSLTPROC_FLAGS="$XSLTPROC_FLAGS --novalid"
3179 AM_CONDITIONAL(ENABLE_MANPAGE_BUILD, test "x$ENABLE_MANPAGE_BUILD" = "xyes")
3181 AC_CACHE_CHECK([for working IPv6],
3182 amanda_working_ipv6,
3183 [AC_TRY_RUN([#include <sys/types.h>
3184 #ifdef HAVE_SYS_SOCKET_H
3185 #include <sys/socket.h>
3187 #ifdef HAVE_NETINET_IN_H
3188 #include <netinet/in.h>
3190 #ifdef HAVE_WINSOCK2_H
3191 #include <winsock2.h>
3193 #include <sys/socket.h>
3194 #include <netinet/in.h>
3200 aa = socket(AF_INET6, SOCK_STREAM, 0);
3201 if (aa > 0) return 0;
3203 }],amanda_working_ipv6=yes,
3204 amanda_working_ipv6=no,
3205 amanda_working_ipv6=yes
3210 if test "$BROKEN_IPV6" = true; then
3211 amanda_working_ipv6=no;
3214 if test "$amanda_working_ipv6" = yes; then
3215 if test "$amanda_ipv6" != false; then
3216 AC_DEFINE(WORKING_IPV6,1,[Define if IPv6 is working. ])
3219 if test "$amanda_ipv6" = true; then
3220 AC_MSG_ERROR([Asked for IPv6 but it is not working.])
3224 AM_CONDITIONAL([GCC_COMPILER], [test "x$CC" = "xgcc"])
3226 #### Enforce amanda code cleanliness rules.
3227 #### Done here to allow configuration code to remain intact.
3228 if test "x$CC" = "xgcc"; then
3229 AM_CFLAGS="$AM_CFLAGS -Wall"
3230 $CC -v --help 2>&1 | $GREP -- '-Wextra ' 2>&1 > /dev/null
3231 if test $? -eq 0; then
3232 AM_CFLAGS="$AM_CFLAGS -Wextra"
3234 AM_CFLAGS="$AM_CFLAGS -W"
3237 $CC -v --help 2>&1 | $GREP -- '-Wparentheses' 2>&1 > /dev/null
3238 if test $? -eq 0; then
3239 AM_CFLAGS="$AM_CFLAGS -Wparentheses"
3242 $CC -v --help 2>&1 | $GREP -- '-Wdeclaration-after-statement' 2>&1 > /dev/null
3243 if test $? -eq 0; then
3244 AM_CFLAGS="$AM_CFLAGS -Wdeclaration-after-statement"
3247 $CC -v --help 2>&1 | $GREP -- '-Wmissing-prototypes ' 2>&1 > /dev/null
3248 if test $? -eq 0; then
3249 AM_CFLAGS="$AM_CFLAGS -Wmissing-prototypes"
3252 $CC -v --help 2>&1 | $GREP -- '-Wstrict-prototypes ' 2>&1 > /dev/null
3253 if test $? -eq 0; then
3254 AM_CFLAGS="$AM_CFLAGS -Wstrict-prototypes"
3257 $CC -v --help 2>&1 | $GREP -- '-Wmissing-declarations ' 2>&1 > /dev/null
3258 if test $? -eq 0; then
3259 AM_CFLAGS="$AM_CFLAGS -Wmissing-declarations"
3262 $CC -v --help 2>&1 | $GREP -- '-Wformat' 2>&1 > /dev/null
3263 if test $? -eq 0; then
3264 AM_CFLAGS="$AM_CFLAGS -Wformat"
3267 $CC -v --help 2>&1 | $GREP -- '-Wsign-compare' 2>&1 > /dev/null
3268 if test $? -eq 0; then
3269 AM_CFLAGS="$AM_CFLAGS -Wsign-compare"
3272 $CC -v --help 2>&1 | $GREP -- '-fno-strict-aliasing' 2>&1 > /dev/null
3273 if test $? -eq 0; then
3274 AM_CFLAGS="$AM_CFLAGS -fno-strict-aliasing"
3277 $CC -v --help 2>&1 | $GREP -- '-Wfloat-equal' 2>&1 > /dev/null
3278 if test $? -eq 0; then
3279 AM_CFLAGS="$AM_CFLAGS -Wfloat-equal"
3282 $CC -v --help 2>&1 | $GREP -- '-Wold-style-definition' 2>&1 > /dev/null
3283 if test $? -eq 0; then
3284 AM_CFLAGS="$AM_CFLAGS -Wold-style-definition"
3292 amplot/amcat.awk amplot/amplot.sh \
3295 amandad-src/Makefile \
3297 changer-src/chg-manual.sh changer-src/chg-multi.sh \
3298 changer-src/chg-mtx.sh changer-src/chg-chs.sh \
3299 changer-src/chg-rth.pl changer-src/chg-chio.pl \
3300 changer-src/chg-zd-mtx.sh changer-src/Makefile \
3301 changer-src/chg-juke.sh changer-src/chg-rait.sh \
3302 changer-src/chg-null.sh changer-src/chg-mcutil.sh \
3303 changer-src/chg-disk.sh changer-src/chg-iomega.pl \
3304 changer-src/chg-lib.sh \
3306 client-src/patch-system.sh client-src/Makefile \
3308 dumper-src/amgtar.pl dumper-src/generic-dumper.pl \
3309 dumper-src/Makefile \
3311 common-src/versuff.c common-src/Makefile \
3313 example/amanda.conf example/Makefile \
3314 example/chg-mcutil.conf example/amanda-client.conf \
3320 recover-src/Makefile \
3322 oldrecover-src/Makefile \
3324 restore-src/Makefile \
3326 server-src/amcheckdb.sh server-src/amcleanup.sh \
3327 server-src/amdump.sh server-src/amfreetapes.sh \
3328 server-src/amoverview.pl server-src/amrmtape.sh \
3329 server-src/amtoc.pl server-src/amverify.sh \
3330 server-src/Makefile server-src/amstatus.pl \
3331 server-src/amverifyrun.sh server-src/amcrypt.sh \
3332 server-src/amaespipe.sh server-src/amcrypt-ossl.sh \
3333 server-src/amcrypt-ossl-asym.sh \
3336 config/Makefile Makefile])