1 dnl Process this file with autoconf to produce a configure script.
4 AC_CONFIG_SRCDIR([common-src/amanda.h])
5 AC_CONFIG_AUX_DIR(config)
6 AC_CANONICAL_TARGET([])
9 CONFIGURE_COMMAND="'$0'"
11 CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
13 AC_DEFINE_UNQUOTED(CONFIGURE_COMMAND,"$CONFIGURE_COMMAND",
14 [Saves the original ./configure command line arguments])
15 AC_SUBST(CONFIGURE_COMMAND)
17 AM_INIT_AUTOMAKE(amanda, 2.4.5)
18 AM_CONFIG_HEADER(config/config.h)
20 AC_PREREQ(2.59) dnl Minimum Autoconf version required.
22 if test -f "$srcdir/SNAPSHOT"; then
23 cat < "$srcdir/SNAPSHOT"
25 snapdate=`sed -n '/^Snapshot Date: \([0-9]*\)/ s//\1/p' < $srcdir/SNAPSHOT`
27 test -z "$snapdate" || VERSION="$VERSION-$snapdate"
28 SNAPSHOT_STAMP=SNAPSHOT
32 AC_SUBST(SNAPSHOT_STAMP)
34 if test -f config.local; then
35 echo "running local script ./config.local"
40 dnl Set the version number of this release of Amanda from the VERSION
41 dnl string, which is set in AM_INIT_AUTOMAKE.
44 VERSION_MAJOR=`expr "$VERSION" : '\([0-9]*\)'`
45 VERSION_MINOR=`expr "$VERSION" : '[0-9]*\.\([0-9]*\)'`
46 VERSION_PATCH=`expr "$VERSION" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
47 VERSION_COMMENT=\"`expr "$VERSION" : '[0-9]*\.[0-9]*\.[0-9]*\(.*\)'`\"
50 VERSION_SUFFIX="$VERSION"
51 AC_SUBST(VERSION_MAJOR)
52 AC_SUBST(VERSION_MINOR)
53 AC_SUBST(VERSION_PATCH)
54 AC_SUBST(VERSION_COMMENT)
55 AC_SUBST(VERSION_SUFFIX)
58 dnl runtime and compile time
60 SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd:/etc:/usr/etc"
62 test "x$prefix" = xNONE && prefix=$ac_default_prefix
63 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
64 eval echo "$libexecdir:$PATH:/usr/local/sbin:/usr/local/bin"
66 SYSLOCPATH="$SYSPATH:$LOCPATH"
67 LOCSYSPATH="$LOCPATH:$SYSPATH"
70 [ --with-includes=DIR site header files for readline, etc in DIR],
73 "" | y | ye | yes | n | no)
74 AC_MSG_ERROR([*** You must supply an argument to the --with-includes option.])
77 INCLUDE_DIRS="$withval"
80 if test "$INCLUDE_DIRS"; then
81 for dir in $INCLUDE_DIRS; do
82 if test -d "$dir"; then
83 AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS -I$dir"
85 AC_MSG_WARN([*** Include directory $dir does not exist.])
90 AC_ARG_WITH(libraries,
91 [ --with-libraries=DIR site library directories for readline, etc in DIR],
94 "" | y | ye | yes | n | no)
95 AC_MSG_ERROR([*** You must supply an argument to the --with-libraries option.])
98 LIBRARY_DIRS="$withval"
101 if test "$LIBRARY_DIRS"; then
102 for dir in $LIBRARY_DIRS; do
103 if test -d "$dir"; then
106 AMANDA_LDFLAGS="$AMANDA_LDFLAGS -R$dir"
109 AMANDA_LDFLAGS="$AMANDA_LDFLAGS -L$dir"
111 AC_MSG_WARN([*** Library directory $dir does not exist.])
116 AC_ARG_WITH(configdir,
117 [ --with-configdir=DIR runtime config files in DIR [sysconfdir/amanda]],
120 "" | y | ye | yes | n | no)
121 AC_MSG_ERROR([*** You must supply an argument to the --with-configdir option.])
123 *) CONFIG_DIR="$withval"
127 : ${CONFIG_DIR=$sysconfdir/amanda}
130 test "x$prefix" = xNONE && prefix=$ac_default_prefix
131 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
132 eval echo "$CONFIG_DIR"
134 AC_DEFINE_UNQUOTED(CONFIG_DIR,"$CONFIG_DIR",
135 [The directory in which configuration directories should be created. ])
138 AC_ARG_WITH(indexdir,
139 [ --with-indexdir deprecated, use indexdir in amanda.conf],
140 [ AC_MSG_ERROR([*** --with-indexdir is deprecated, use indexdir in amanda.conf instead.])
144 [ --with-dbdir deprecated, use infofile in amanda.conf],
145 [ AC_MSG_ERROR([*** --with-dbdir is deprecated, use infofile in amanda.conf instead.])
149 [ --with-logdir deprecated, use logfile in amanda.conf],
150 [ AC_MSG_ERROR([*** --with-logdir is deprecated, use logdir in amanda.conf instead.])
153 AC_ARG_WITH(suffixes,
154 [ --with-suffixes install binaries with version string appended to name],
155 USE_VERSION_SUFFIXES=$withval,
156 : ${USE_VERSION_SUFFIXES=no}
158 case "$USE_VERSION_SUFFIXES" in
160 AC_DEFINE(USE_VERSION_SUFFIXES, 1,
161 [Define to have programs use version suffixes when calling other programs.])
163 program_suffix="-$VERSION"
164 # This is from the output of configure.in.
165 if test "$program_transform_name" = s,x,x,; then
166 program_transform_name=
168 # Double any \ or $. echo might interpret backslashes.
169 cat <<\EOF_SED > conftestsed
170 s,\\,\\\\,g; s,\$,$$,g
172 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
175 test "$program_prefix" != NONE &&
176 program_transform_name="s,^,${program_prefix},; $program_transform_name"
177 # Use a double $ so make ignores it.
178 test "$program_suffix" != NONE &&
179 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
181 # sed with no file args requires a program.
182 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
183 # Remove empty command
184 cat <<\EOF_SED > conftestsed
185 s,\;\;,\;,g; s,\; \$,,g; s,\;$,,g
187 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
190 n | no) USE_VERSION_SUFFIXES=no
192 *) AC_MSG_ERROR([*** You must not supply an argument to --with-suffixes option.])
195 AC_SUBST(USE_VERSION_SUFFIXES)
199 CLIENT_SCRIPTS_OPT=amhpfixdevs
202 CLIENT_SCRIPTS_OPT=amsinixfixdevs
209 AC_SUBST(CLIENT_SCRIPTS_OPT)
211 AC_ARG_WITH(client-only,
212 [ --with-client-only deprecated, use --without-server],
213 [ AC_MSG_ERROR([*** --with-client-only is deprecated, use --without-server instead.])
215 AC_ARG_WITH(server-only,
216 [ --with-server-only deprecated, use --without-client],
217 [ AC_MSG_ERROR([*** --with-server-only is deprecated, use --without-client instead.])
221 [ --without-client do not build client stuff],
224 y | ye | yes) NO_CLIENT_MODE=false;;
225 n | no) NO_CLIENT_MODE=true;;
227 AC_MSG_ERROR([*** You must not supply an argument to --with-client option.])
234 [ --without-server do not build server stuff (set --without-restore)],
237 y | ye | yes) NO_SERVER_MODE=false ;;
238 n | no) NO_SERVER_MODE=true;NO_RESTORE_MODE=true;;
240 AC_MSG_ERROR([*** You must not supply an argument to --with-server option. Maybe you meant --with-index-server=$withval])
247 [ --without-restore do not build amrestore nor amidxtaped],
250 y | ye | yes) NO_RESTORE_MODE=false;;
251 n | no) NO_RESTORE_MODE=true;;
253 AC_MSG_ERROR([*** You must not supply an argument to --with-restore option.])
259 AC_ARG_WITH(amrecover,
260 [ --without-amrecover do not build amrecover],
264 if ${NO_CLIENT_MODE-false}; then
265 AC_MSG_ERROR([*** --without-client and --with-amrecover are incompatible])
267 NO_RECOVER_MODE=false;;
268 n | no) NO_RECOVER_MODE=true;;
270 AC_MSG_ERROR([*** You must not supply an argument to --with-amrecover option.])
276 AC_ARG_WITH(index-server,
277 [ --with-index-server=HOST default amanda index server [`uname -n`]],
280 "" | y | ye | yes | n | no)
281 AC_MSG_ERROR([*** You must supply an argument to the --with-index-server option.])
283 *) DEFAULT_SERVER="$withval"
287 : ${DEFAULT_SERVER=`uname -n`}
289 AC_DEFINE_UNQUOTED(DEFAULT_SERVER,"$DEFAULT_SERVER",
290 [This is the default Amanda index server. ])
291 AC_SUBST(DEFAULT_SERVER)
293 AC_ARG_WITH(force-uid,
294 [ --without-force-uid do not force the uid to --with-user],
295 FORCE_USERID="$withval",
296 : ${FORCE_USERID=yes}
298 case "$FORCE_USERID" in
299 y | ye | yes) AC_DEFINE(FORCE_USERID, 1,
300 [Define to force to another user on client machines. ])
304 *) AC_MSG_ERROR([*** You must not supply an argument to --with-force-uid option.])
308 [ --with-user=USER force execution to USER on client systems [required]],
311 "" | y | ye | yes | n | no)
312 AC_MSG_ERROR([*** You must supply an argument to the --with-user option.])
314 *) CLIENT_LOGIN="$withval"
319 if test "x${CLIENT_LOGIN+set}" != xset; then
320 AC_MSG_ERROR([*** --with-user=USER is missing])
322 AC_DEFINE_UNQUOTED(CLIENT_LOGIN,"$CLIENT_LOGIN",
323 [Define as a the user to force to on client machines. ])
324 AC_SUBST(CLIENT_LOGIN)
327 [ --with-group=GROUP group allowed to execute setuid-root programs [required]],
330 "" | y | ye | yes | n | no)
331 AC_MSG_ERROR([*** You must supply an argument to the --with-group option.])
333 *) SETUID_GROUP="$withval"
338 if test "x${SETUID_GROUP+set}" != xset; then
339 AC_MSG_ERROR([*** --with-group=GROUP is missing])
341 AC_SUBST(SETUID_GROUP)
344 [ --with-owner=USER force ownership of files to USER [default == --with-user value]],
347 "" | y | ye | yes | n | no)
348 AC_MSG_ERROR([*** You must supply an argument to the --with-owner option.])
350 *) BINARY_OWNER="$withval"
355 if test "x${BINARY_OWNER+set}" != xset ; then
356 BINARY_OWNER=$CLIENT_LOGIN
358 AC_DEFINE_UNQUOTED(BINARY_OWNER,"$BINARY_OWNER",
359 [Define as the user who owns installed binaries. ])
360 AC_SUBST(BINARY_OWNER)
363 [ --with-rundump use rundump (setuid-root) to invoke dump],
366 n | no | y | ye | yes) FORCE_USE_RUNDUMP="$withval";;
367 *) AC_MSG_ERROR([*** You must not supply an argument to --with-rundump option.]);;
373 [ --with-config=CONFIG default configuration [DailySet1]],
376 "" | y | ye | yes | n | no)
377 AC_MSG_ERROR([*** You must supply an argument to the --with-config option.])
379 *) DEFAULT_CONFIG="$withval"
383 : ${DEFAULT_CONFIG=DailySet1}
385 AC_DEFINE_UNQUOTED(DEFAULT_CONFIG,"$DEFAULT_CONFIG",
386 [This is the default Amanda configuration. ])
387 AC_SUBST(DEFAULT_CONFIG)
389 AC_ARG_WITH(tape-server,
390 [ --with-tape-server=HOST default restoring tape server is HOST [same as --with-index-server]],
393 "" | y | ye | yes | n | no)
394 AC_MSG_ERROR([*** You must supply an argument to the --with-tape-server option.])
396 *) DEFAULT_TAPE_SERVER="$withval"
400 : ${DEFAULT_TAPE_SERVER=$DEFAULT_SERVER}
402 AC_DEFINE_UNQUOTED(DEFAULT_TAPE_SERVER,"$DEFAULT_TAPE_SERVER",[This is the default restoring Amanda tape server. ])
403 AC_SUBST(DEFAULT_TAPE_SERVER)
405 AC_ARG_WITH(tape-device,
406 [ --with-tape-device=ARG restoring tape server HOST's no rewinding tape drive],
409 "" | y | ye | yes | n | no)
410 AC_MSG_ERROR([*** You must supply an argument to the --with-tape-device option.])
412 *) DEFAULT_TAPE_DEVICE="$withval"
417 if test -z "$DEFAULT_TAPE_DEVICE"; then
418 AC_MSG_CHECKING(for non-rewinding tape device)
419 dnl Check for the /dev/rmt directory and use what's in there.
420 dnl Otherwise look for tape devices in /dev. For the devices
421 dnl in /dev/rmt, we want to use the Berkeley behavior of
422 dnl reading the first record of the next tape file after 0
423 dnl bytes are returned upon reading to the next tape mark,
424 dnl instead of returning an error. Look for devices that have
425 dnl a 'b' in their name.
427 nr_tape_dev=/dev/null
428 if test -d /dev/rmt; then
430 dnl See if we can find two devices, one being the norewind
431 dnl version of the other. Devices in this directory are
432 dnl normally a digit followed by some characters. We also
433 dnl want the Berkely behavior, since Amanda needs it for
436 for num in 9 8 7 6 5 4 3 2 1 0; do
438 ntd=/dev/rmt/${num}bn
439 if test -r $td -a -r $ntd; then
445 dnl Look for tape devices in /dev.
446 for num in 9 8 7 6 5 4 3 2 1 0; do
449 if test -r $td -a -r $ntd; then
455 DEFAULT_TAPE_DEVICE=$nr_tape_dev
456 AC_MSG_RESULT($DEFAULT_TAPE_DEVICE)
461 if test -z "$DEFAULT_TAPE_DEVICE"; then
462 DEFAULT_TAPE_DEVICE=/dev/null
465 AC_DEFINE_UNQUOTED(DEFAULT_TAPE_DEVICE,"$DEFAULT_TAPE_DEVICE",[This is the default no-rewinding tape device. ])
466 AC_SUBST(DEFAULT_TAPE_DEVICE)
468 AC_ARG_WITH(ftape-raw-device,
469 [ --with-ftape-rawdevice=ARG raw device on tape server HOST's if using Linux ftape >=3.04d],
472 "" | y | ye | yes | n | no)
473 AC_MSG_ERROR([*** You must supply an argument to the --with-ftape-rawdevice option.])
475 *) DEFAULT_RAW_TAPE_DEVICE="$withval"
480 if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
481 AC_MSG_CHECKING(for raw ftape device)
482 dnl Look for tape devices in /dev.
483 raw_tape_dev=/dev/null
484 dnl Look for tape devices in /dev.
485 for num in 3 2 1 0 ; do
491 DEFAULT_RAW_TAPE_DEVICE=$raw_tape_dev
492 AC_MSG_RESULT($DEFAULT_RAW_TAPE_DEVICE)
497 if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
498 DEFAULT_RAW_TAPE_DEVICE=/dev/null
501 AC_DEFINE_UNQUOTED(DEFAULT_RAW_TAPE_DEVICE,"$DEFAULT_RAW_TAPE_DEVICE",[For Linux systems with floppy tapes:
502 * QIC volume table support via raw tape device. ])
503 AC_SUBST(DEFAULT_RAW_TAPE_DEVICE)
505 AC_ARG_WITH(rew-tape,
506 [ --with-rew-tape deprecated, use --with-tape-device],
507 [ AC_MSG_ERROR([*** --with-rew-tape is deprecated, use --with-tape-device instead.])
510 AC_ARG_WITH(norew-tape,
511 [ --with-norew-tape=ARG deprecated, use --with-tape-device],
512 [ AC_MSG_ERROR([*** --with-norew-tape is deprecated, use --with-tape-device instead.])
515 AC_ARG_WITH(changer-device,
516 [ --with-changer-device=ARG default tape changer device [/dev/ch0 if it exists]],
519 "" | y | ye | yes | n | no)
520 AC_MSG_ERROR([*** You must supply an argument to the --with-changer-device option.])
522 *) DEFAULT_CHANGER_DEVICE="$withval"
527 if test -z "$DEFAULT_CHANGER_DEVICE" &&
528 test -f /dev/ch0; then
529 DEFAULT_CHANGER_DEVICE=/dev/ch0
534 if test -z "$DEFAULT_CHANGER_DEVICE"; then
535 DEFAULT_CHANGER_DEVICE=/dev/null
538 AC_DEFINE_UNQUOTED(DEFAULT_CHANGER_DEVICE,"$DEFAULT_CHANGER_DEVICE",[This is the default changer device. ])
539 AC_SUBST(DEFAULT_CHANGER_DEVICE)
542 [ --with-fqdn use FQDN's to backup multiple networks],
548 y | ye | yes) AC_DEFINE(USE_FQDN,1,[Define for backups being done on a multiple networks and FQDNs are used. ])
550 *) AC_MSG_ERROR([*** You must not supply an argument to --with-fqdn option.])
554 AC_ARG_WITH(broken-fsf,
555 [ --with-broken-fsf only enable if tape fsf calls fail mid-file],
556 HAVE_BROKEN_FSF=$withval,
557 : ${HAVE_BROKEN_FSF=no}
559 case "$HAVE_BROKEN_FSF" in
561 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
562 * mark, for instance, if amrecover gives I/O errors when skipping.
565 *) AC_MSG_ERROR([*** You must not supply an argument to --with-broken-fsf option.])
570 [ --with-gnutar[=PROG] use PROG as GNU tar executable [default: looks for one]],
573 /*) GNUTAR="$withval";;
576 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar]);;
582 [ --with-qde use quick-and-dirty estimates for gnutar ],
583 USE_QUICK_AND_DIRTY_ESTIMATES=$withval,
584 : ${USE_QUICK_AND_DIRTY_ESTIMATES=no}
586 case "$USE_QUICK_AND_DIRTY_ESTIMATES" in
587 n | no) : USE_QUICK_AND_DIRTY_ESTIMATES=no;;
588 y | ye | yes) : USE_QUICK_AND_DIRTY_ESTIMATES=yes
589 AC_DEFINE(USE_QUICK_AND_DIRTY_ESTIMATES,1,[ Define if you want to use amqde instead of gnutar for estimates ])
591 *) AC_MSG_ERROR([*** You must not supply an argument to --with-qde option.])
596 AC_ARG_WITH(smbclient,
597 [ --with-smbclient[=PROG] use PROG as Samba's smbclient executable [default: looks for one]],
600 /*) SAMBA_CLIENT="$withval";;
602 n|no) SAMBA_CLIENT="no";;
603 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-smbclient]);;
608 AC_ARG_WITH(samba-user,
609 [ --with-samba-user was deprecated],
610 [ AC_MSG_ERROR([*** The samba-user option was deprecated, the username go in the amandapass])
614 AC_ARG_WITH(gnutar-listdir,
615 [ --with-gnutar-listdir=DIR gnutar directory lists go in DIR [localstatedir/amanda/gnutar-lists]],
618 n | no) unset GNUTAR_LISTDIR ;;
619 y | ye | yes) : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists} ;;
620 /*) GNUTAR_LISTDIR="$withval" ;;
621 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar-listdir])
624 : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists}
626 if test "$GNUTAR_LISTDIR"; then
628 test "x$prefix" = xNONE && prefix=$ac_default_prefix
629 eval echo "$GNUTAR_LISTDIR"
631 AC_DEFINE_UNQUOTED(GNUTAR_LISTED_INCREMENTAL_DIR,"$GNUTAR_LISTDIR",[The directory in which GNU tar should store directory lists for incrementals. ])
632 GNUTAR_LISTED_INCREMENTAL_DIRX=$GNUTAR_LISTDIR
634 GNUTAR_LISTED_INCREMENTAL_DIRX=
636 AC_SUBST(GNUTAR_LISTED_INCREMENTAL_DIRX)
638 AC_ARG_WITH(gnutar-listed-incremental,
639 [ --with-gnutar-listed-incremental was deprecated, use --with-gnutar-listdir],
640 [ AC_MSG_ERROR([*** The gnutar-listed-incremental option was deprecated, use gnutar-listdir instead])
644 AC_ARG_WITH(bsd-security,
645 [ --without-bsd-security do not use BSD rsh/rlogin style security],
646 BSD_SECURITY=$withval,
647 : ${BSD_SECURITY=yes}
649 case "$BSD_SECURITY" in
651 y | ye | yes) AC_DEFINE(BSD_SECURITY,1,[Define to use BSD .rhosts/.amandahosts security. ])
653 *) AC_MSG_ERROR([*** You must not supply an argument to --with-bsd-security option.])
657 AC_ARG_WITH(amandahosts,
658 [ --without-amandahosts use .rhosts instead of .amandahosts],
659 USE_AMANDAHOSTS=$withval,
660 : ${USE_AMANDAHOSTS=yes}
662 case "$USE_AMANDAHOSTS" in
665 case "$BSD_SECURITY" in
666 y | ye | yes) AC_DEFINE(USE_AMANDAHOSTS,1,[Define if you want to use the .amandahosts for BSD security. ])
670 *) AC_MSG_ERROR([*** You must not supply an argument to --with-amandahosts option.])
674 dnl Specify --with-krb4-security if Kerberos software is in somewhere
675 dnl other than the listed KRB4_SPOTS. We only compile kerberos support in
676 dnl if the right files are there.
678 : ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
680 AC_ARG_WITH(krb4-security,
681 [ --with-krb4-security=DIR Location of Kerberos software [/usr/kerberos /usr/cygnus /usr /opt/kerberos]],
682 KRB4_SECURITY="$withval",
683 : ${KRB4_SECURITY=no}
686 case "$KRB4_SECURITY" in
687 n | no) KRB4_SECURITY=no ;;
689 *) KRB4_SPOTS="$KRB4_SECURITY"
694 AC_MSG_CHECKING(for Kerberos and Amanda kerberos4 bits)
695 if test "${KRB4_SECURITY}" = yes -a -f ${srcdir-.}/common-src/krb4-security.c ; then
696 for dir in $KRB4_SPOTS; do
697 if test -f ${dir}/lib/libkrb.a -a -f ${dir}/lib/libdes.a ; then
699 # This is the original Kerberos 4.
701 AC_MSG_RESULT(found in $dir)
703 AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
704 if test -d $dir/include/kerberosIV ; then
706 # This handles BSD/OS.
708 KRB4INCLUDES=-I$dir/include/kerberosIV
710 KRB4INCLUDES=-I$dir/include
712 KRB4LDFLAGS=-L$dir/lib
713 KRB4LIBS="-lkrb -ldes"
714 if test -f ${dir}/lib/libcom_err.a ; then
715 KRB4LIBS="$KRB4LIBS -lcom_err"
717 if test -f ${dir}/lib/libroken.a ; then
718 KRB4LIBS="$KRB4LIBS -lroken"
721 elif test -f ${dir}/lib/libkrb4.a &&
722 test -f ${dir}/lib/libcrypto.a &&
723 test -f ${dir}/lib/libdes425.a ; then
725 # This is Kerberos 5 with Kerberos 4 back-support.
727 AC_MSG_RESULT(found in $dir)
729 AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
730 KRB4INCLUDES="-I$dir/include -I$dir/include/kerberosIV"
731 KRB4LDFLAGS=-L$dir/lib
732 if test -f ${dir}/lib/libkrb5.a &&
733 test -f ${dir}/lib/libcom_err.a; then
734 KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
736 KRB4LIBS="-lkrb4 -lcrypto -ldes425"
739 elif test -f ${dir}/lib/libkrb4.dylib &&
740 test -f ${dir}/lib/libcrypto.dylib &&
741 test -f ${dir}/lib/libdes425.dylib ; then
743 # This is Kerberos 5 with Kerberos 4 back-support for Mac OS X.
745 AC_MSG_RESULT(found in $dir)
747 AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
748 KRB4INCLUDES="-I$dir/include -I$dir/include/kerberosIV"
749 KRB4LDFLAGS=-L$dir/lib
750 if test -f ${dir}/lib/libkrb5.dylib &&
751 test -f ${dir}/lib/libcom_err.dylib; then
752 KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
754 KRB4LIBS="-lkrb4 -lcrypto -ldes425"
760 if test "$KRB4LDFLAGS" = "" ; then
761 AC_MSG_ERROR([*** Kerberos IV not found.])
767 AC_ARG_WITH(server-principal,
768 [ --with-server-principal=ARG server host principal ["amanda"]],
771 "" | y | ye | yes | n | no)
772 AC_MSG_ERROR([*** You must supply an argument to the --with-server-principal option.])
775 SERVER_HOST_PRINCIPLE="$withval"
779 : ${SERVER_HOST_PRINCIPLE="amanda"}
781 AC_DEFINE_UNQUOTED(SERVER_HOST_PRINCIPLE,"$SERVER_HOST_PRINCIPLE",[The Kerberos server principle. ])
783 AC_ARG_WITH(server-instance,
784 [ --with-server-instance=ARG server host instance ["amanda"]],
787 "" | y | ye | yes | n | no)
788 AC_MSG_ERROR([*** You must supply an argument to the --with-server-instance option.])
790 *) SERVER_HOST_INSTANCE="$withval"
794 : ${SERVER_HOST_INSTANCE="amanda"}
796 AC_DEFINE_UNQUOTED(SERVER_HOST_INSTANCE,"$SERVER_HOST_INSTANCE",[The Kerberos server instance. ])
798 AC_ARG_WITH(server-keyfile,
799 [ --with-server-keyfile=ARG server host key file ["/.amanda"]],
802 "" | y | ye | yes | n | no)
803 AC_MSG_ERROR([*** You must supply an argument to the --with-server-keyfile option.])
805 *) SERVER_HOST_KEY_FILE="$withval"
809 : ${SERVER_HOST_KEY_FILE="/.amanda"}
811 AC_DEFINE_UNQUOTED(SERVER_HOST_KEY_FILE,"$SERVER_HOST_KEY_FILE",[The Kerberos server key file. ])
813 AC_ARG_WITH(client-principal,
814 [ --with-client-principal=ARG client host principal ["rcmd"]],
817 "" | y | ye | yes | n | no)
818 AC_MSG_ERROR([*** You must supply an argument to the --with-client-principal option.])
820 *) CLIENT_HOST_PRINCIPLE="$withval"
824 : ${CLIENT_HOST_PRINCIPLE="rcmd"}
826 AC_DEFINE_UNQUOTED(CLIENT_HOST_PRINCIPLE,"$CLIENT_HOST_PRINCIPLE",[The Kerberos client host principle. ])
828 AC_ARG_WITH(client-instance,
829 [ --with-client-instance=ARG client host instance [HOSTNAME_INSTANCE]],
832 "" | y | ye | yes | n | no)
833 AC_MSG_ERROR([*** You must supply an argument to the --with-client-instance option.])
835 *) CLIENT_HOST_INSTANCE="$withval"
839 : ${CLIENT_HOST_INSTANCE=HOSTNAME_INSTANCE}
841 AC_DEFINE_UNQUOTED(CLIENT_HOST_INSTANCE,$CLIENT_HOST_INSTANCE,[The Kerberos client host instance. ])
843 AC_ARG_WITH(client-keyfile,
844 [ --with-client-keyfile=ARG client host key file [KEYFILE]],
847 "" | y | ye | yes | n | no)
848 AC_MSG_ERROR([*** You must supply an argument to the --with-client-keyfile option.])
850 *) CLIENT_HOST_KEY_FILE="$withval"
854 : ${CLIENT_HOST_KEY_FILE=KEYFILE}
857 # Assume it's either KEYFILE (defined in krb.h), or a string filename...
858 if test "$CLIENT_HOST_KEY_FILE" != "KEYFILE"; then
859 CLIENT_HOST_KEY_FILE="\"$CLIENT_HOST_KEY_FILE\""
862 AC_DEFINE_UNQUOTED(CLIENT_HOST_KEY_FILE,$CLIENT_HOST_KEY_FILE,[The Kerberos client host key file. ])
864 AC_ARG_WITH(ticket-lifetime,
865 [ --with-ticket-lifetime=ARG ticket lifetime [128]],
868 "" | y | ye | yes | n | no)
869 AC_MSG_ERROR([*** You must supply an argument to the --with-ticket-lifetime option.])
871 *) TICKET_LIFETIME="$withval"
875 : ${TICKET_LIFETIME=128}
877 AC_DEFINE_UNQUOTED(TICKET_LIFETIME,$TICKET_LIFETIME,[The Kerberos ticket lifetime. ])
880 AC_ARG_WITH(portrange,
881 [ --with-portrange=low,high bind unreserved TCP server sockets to ports within this range [unlimited]],
883 TCPPORTRANGE="$withval"
886 AC_ARG_WITH(tcpportrange,
887 [ --with-tcpportrange=low,high bind unreserved TCP server sockets to ports within this range [unlimited]],
889 TCPPORTRANGE="$withval"
892 if test x"${TCPPORTRANGE+set}" = x"set"; then
893 if test x`echo "$TCPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
894 AC_MSG_ERROR([*** --with-tcpportrange requires two comma-separated positive numbers])
896 min_tcp_port=`echo "$TCPPORTRANGE" | sed 's/,.*//'`
897 max_tcp_port=`echo "$TCPPORTRANGE" | sed 's/.*,//'`
898 if test $min_tcp_port -gt $max_tcp_port; then
899 AC_MSG_ERROR([*** the second TCP port number must be greater than the first in --with-tcpportrange])
901 if test $min_tcp_port -lt 1024; then
902 AC_MSG_WARN([*** the TCP port range should be 1024 or greater in --with-tcpportrange])
904 if test $max_tcp_port -ge 65536; then
905 AC_MSG_WARN([*** the TCP port range should be less than 65536 in --with-tcpportrange])
907 AC_DEFINE_UNQUOTED(TCPPORTRANGE,$TCPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
908 maximum unreserved TCP port numbers sockets should be bound to. ])
911 AC_ARG_WITH(udpportrange,
912 [ --with-udpportrange=low,high bind reserved UDP server sockets to ports within this range [unlimited]],
914 UDPPORTRANGE="$withval"
917 if test x"${UDPPORTRANGE+set}" = x"set"; then
918 if test x`echo "$UDPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
919 AC_MSG_ERROR([*** --with-udpportrange requires two comma-separated positive numbers])
921 min_udp_port=`echo "$UDPPORTRANGE" | sed 's/,.*//'`
922 max_udp_port=`echo "$UDPPORTRANGE" | sed 's/.*,//'`
923 if test $min_udp_port -gt $max_udp_port; then
924 AC_MSG_ERROR([*** the second UDP port number must be greater than the first in --with-udpportrange])
926 if test $max_udp_port -ge 1024; then
927 AC_MSG_WARN([*** the UDP port range should be less than 1024 in --with-udpportrange])
929 if test $min_udp_port -le 0; then
930 AC_MSG_WARN([*** the UDP port range should be greater than 0 in --with-udpportrange])
932 AC_DEFINE_UNQUOTED(UDPPORTRANGE,$UDPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
933 maximum reserved UDP port numbers sockets should be bound to. ])
936 AC_ARG_WITH(maxtapeblocksize,
937 [ --with-maxtapeblocksize=kb Maximum size of a tape block],
939 MAXTAPEBLOCKSIZE="$withval"
941 : ${MAXTAPEBLOCKSIZE=32}
944 AC_DEFINE_UNQUOTED(MAX_TAPE_BLOCK_KB,($MAXTAPEBLOCKSIZE),[Maximum size of a tape block in KBytes.])
945 AC_SUBST(MAXTAPEBLOCKSIZE)
948 [ --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [text]],
951 "" | y | ye | yes | n | no)
952 AC_MSG_ERROR([*** You must supply an argument to the --with-db option.])
954 *) DB_STYLE="$withval"
959 if test "$DB_STYLE"; then
961 db | dbm | gdbm | ndbm | text) ;;
963 AC_MSG_ERROR([*** Unknown argument $DB_STYLE given to --with-db. Choose from db, dbm, gdbm, ndbm, text.])
970 [ --with-mmap force use of mmap instead of shared memory support],
974 case "$FORCE_MMAP" in
975 y | ye | yes | n | no) : ;;
976 *) AC_MSG_ERROR([*** You must not supply an argument to --with-mmap.])
980 AC_ARG_WITH(buffered-dump,
981 [ --with-buffered-dump buffer the dumping sockets on the server for speed],
982 DUMPER_SOCKET_BUFFERING=$withval,
983 : ${DUMPER_SOCKET_BUFFERING=no}
985 case "$DUMPER_SOCKET_BUFFERING" in
988 y | ye | yes) AC_DEFINE(DUMPER_SOCKET_BUFFERING,1,[Define if dumper should buffer the sockets for faster throughput. ])
990 *) AC_MSG_ERROR([*** You must not supply an argument to --with-buffered-dump.])
994 AC_ARG_WITH(assertions,
995 [ --with-assertions compile assertions into code],
996 ASSERTIONS="$withval",
999 case "$ASSERTIONS" in
1001 y | ye | yes) AC_DEFINE(ASSERTIONS,1,[Define if you want assertion checking. ])
1003 *) AC_MSG_ERROR([*** You must not supply an argument to --with-assertions option.])
1008 [ --with-tmpdir[=/temp/dir] area Amanda can use for temp files [/tmp/amanda]],
1013 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1014 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1018 n | no) AC_MSG_ERROR([*** --without-tmpdir is not allowed.]);;
1020 AMANDA_TMPDIR="/tmp/amanda";;
1022 AMANDA_TMPDIR="$tmpdir";;
1023 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-tmpdir option.]);;
1025 AC_DEFINE_UNQUOTED(AMANDA_TMPDIR,"$AMANDA_TMPDIR",[The directory in which Amanda should create temporary files. ])
1026 AC_SUBST(AMANDA_TMPDIR)
1028 AC_ARG_WITH(debugging,
1029 [ --with[out]-debugging[=/debug/dir] [do not] record runtime debugging information in specified directory [--with-tmpdir]],
1030 debugging="$withval",
1034 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1035 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1036 eval echo "$debugging"
1038 case "$debugging" in
1039 n | no) AMANDA_DBGDIR="";;
1040 y | ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR" ;;
1041 /*) AMANDA_DBGDIR="$debugging" ;;
1042 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-debugging option.])
1045 case "$AMANDA_DBGDIR" in
1047 *) AC_DEFINE(DEBUG_CODE,1,[Define if you want debugging. ])
1048 AC_DEFINE_UNQUOTED(AMANDA_DBGDIR,"$AMANDA_DBGDIR",[Location of Amanda directories and files. ])
1049 AC_SUBST(AMANDA_DBGDIR);;
1052 AC_ARG_WITH(debug_days,
1053 [ --with-debug-days=NN number of days to keep debugging files [default=4]],
1054 debug_days="$withval",
1057 case "$debug_days" in
1058 n | no) AMANDA_DEBUG_DAYS=0 ;;
1059 y | ye | yes) AMANDA_DEBUG_DAYS=4 ;;
1060 [[0-9]] | [[0-9]][[0-9]] | [[0-9]][[0-9]][[0-9]]) AMANDA_DEBUG_DAYS="$debug_days" ;;
1061 *) AC_MSG_ERROR([*** --with-debug-days value not numeric or out of range.])
1064 AC_DEFINE_UNQUOTED(AMANDA_DEBUG_DAYS,$AMANDA_DEBUG_DAYS,[Number of days to keep debugging files. ])
1065 AC_SUBST(AMANDA_DEBUG_DAYS)
1067 AC_ARG_WITH(testing,
1068 [ --with-testing[=suffix] use alternate service names],
1073 n | no) SERVICE_SUFFIX="";;
1074 y | ye | yes) SERVICE_SUFFIX="-test";;
1075 *) SERVICE_SUFFIX="-$TESTING";;
1077 AMANDA_SERVICE_NAME="amanda$SERVICE_SUFFIX"
1078 KAMANDA_SERVICE_NAME="kamanda$SERVICE_SUFFIX"
1079 AC_SUBST(SERVICE_SUFFIX)
1080 AC_DEFINE_UNQUOTED(SERVICE_SUFFIX, "$SERVICE_SUFFIX",[A suffix that will be appended to service names.
1081 * Useful for testing in parallel with a working version. ])
1082 AC_DEFINE_UNQUOTED(AMANDA_SERVICE_NAME, "$AMANDA_SERVICE_NAME", [The name for the Amanda service. ])
1083 AC_DEFINE_UNQUOTED(KAMANDA_SERVICE_NAME, "$KAMANDA_SERVICE_NAME", [The name for the Kerberized Amanda service. ])
1086 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1087 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1089 tmp=`eval echo "$bindir"`
1090 AC_DEFINE_UNQUOTED(bindir,"$tmp",[Directory in which user binaries should be installed. ])
1092 tmp=`eval echo "$sbindir"`
1093 AC_DEFINE_UNQUOTED(sbindir,"$tmp",[Directory in which administrator binaries should be installed. ])
1095 tmp=`eval echo "$libexecdir"`
1096 AC_DEFINE_UNQUOTED(libexecdir,"$tmp",[Directory in which internal binaries should be installed. ])
1098 tmp=`eval echo $mandir`
1099 AC_DEFINE_UNQUOTED(mandir,"$tmp",[Directory in which man-pages should be installed])
1106 dnl Set the order of dump programs to look for. Finding the proper file
1107 dnl system dumping program is problematic. Some systems, notably HP-UX
1108 dnl and AIX, have both the backup and dump programs. HP-UX can't use the
1109 dnl the backup program while AIX systems can't use the dump program. So
1110 dnl a variable is set up here to specify the order of dump programs to
1111 dnl search for on the system.
1112 DUMP_PROGRAMS="ufsdump dump backup"
1119 AC_DEFINE(STATFS_OSF1,1,[Define on OSF1. ])
1122 DUMP_PROGRAMS="dump "$DUMP_PROGRAMS
1123 : ${USE_RUNDUMP=yes}
1134 GETCONF_LFS="XBS5_ILP32_OFFBIG"
1137 AMANDA_CPPFLAGS="-D__STDC_EXT__ $AMANDA_CPPFLAGS"
1140 AMANDA_CFLAGS="-Ae $AMANDA_CFLAGS"
1145 GETCONF_LFS="XBS5_ILP32_OFFBIG"
1146 DUMP_PROGRAMS="backup "$DUMP_PROGRAMS
1147 AC_DEFINE(AIX_TAPEIO,1,[Define on AIX. ])
1148 AC_DEFINE(AIX_BACKUP,1,[Define on AIX. ])
1150 m88k-motorola-sysv4)
1165 dnl The old cc won't work!
1179 : ${USE_RUNDUMP=yes}
1180 AC_DEFINE(STATFS_ULTRIX,1,[Define on Ultrix. ])
1184 AC_DEFINE(UWARE_TAPEIO,1,[Define on UnixWare. ])
1192 AC_DEFINE(STATFS_SCO_OS5,1,[Define on SCO OS5. ])
1200 AC_DEFINE(IGNORE_TAR_ERRORS,1,[Define on Cygwin. ])
1201 # Cygwin needs PATH to find cygwin1.dll
1202 AC_DEFINE(NEED_PATH_ENV,1,[Define on Cygwin. ])
1203 AC_DEFINE(IGNORE_UID_CHECK,1,[Define on Cygwin. ])
1204 AC_DEFINE(IGNORE_FSTAB,1,[Define on Cygwin. ])
1205 AC_DEFINE(DONT_SUID_ROOT,1,[Define on Cygwin. ])
1206 NEED_SETUID_CLIENT=false
1207 NEED_RUNTIME_PSEUDO_RELOC=true
1213 This machine, target type $target, is not known
1214 to be fully supported by this configure script. If the
1215 installation of Amanda on this system succeeds or needed
1216 any patches, please email amanda-hackers@amanda.org with
1217 the patches or an indication of the sucess or failure of
1218 the Amanda installation on your system.
1225 if test -n "$dump_returns_1"; then
1226 AC_DEFINE(DUMP_RETURNS_1,1,[Define this if this system's dump exits with 1 as a success code. ])
1229 if test -n "$xenix_tapeio"; then
1230 AC_DEFINE(XENIX_TAPEIO,1,[Define on XENIX/ISC. ])
1233 AMANDA_CFLAGS="$AMANDA_CFLAGS $KRB4INCLUDES"
1234 AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS $KRB4INCLUDES"
1235 AMANDA_LDFLAGS="$AMANDA_LDFLAGS $KRB4LDFLAGS"
1236 AMANDA_LIBS="$KRB4LIBS $AMANDA_LIBS"
1237 CFLAGS="$CFLAGS $AMANDA_CFLAGS"
1238 CPPFLAGS="$CPPFLAGS $AMANDA_CPPFLAGS"
1239 LDFLAGS="$LDFLAGS $AMANDA_LDFLAGS"
1240 LIBS="$AMANDA_LIBS $LIBS"
1243 dnl This specifies the flag for mt that tells mt the proper tape drive
1245 : ${MT_FILE_FLAG="-f"}
1246 AC_SUBST(MT_FILE_FLAG)
1247 AC_DEFINE_UNQUOTED(MT_FILE_FLAG, "$MT_FILE_FLAG",[Defined to the switch to be used when invoking mt to specify the
1250 AX_CREATE_STDINT_H(common-src/amanda-int.h)
1252 dnl Check for programs.
1253 AC_PATH_PROGS(AR,ar,,$LOCSYSPATH)
1257 if test "$amanda_cv_awk_var_assignment" = no; then
1259 AC_MSG_WARN([*** Your $awk cannot do command line variable assignment. Amplot will not be installed.])
1263 AC_PATH_PROGS(CAT,cat,,$LOCSYSPATH)
1264 if test -z "$CAT"; then
1267 AC_PATH_PROGS(COMPRESS,compress,,$LOCSYSPATH)
1268 AC_PATH_PROGS(DD,dd,,$LOCSYSPATH)
1269 AC_PATH_PROGS(EGREP,egrep,,$LOCSYSPATH)
1270 AC_PATH_PROGS(GETCONF,getconf,,$SYSPATH)
1272 AC_PATH_PROGS(GNUPLOT,gnuplot,,$LOCSYSPATH)
1273 if test -z "$GNUPLOT"; then
1275 AC_MSG_WARN([*** You do not have gnuplot. Amplot will not be installed.])
1278 AC_PATH_PROGS(GREP,grep,,$LOCSYSPATH)
1279 if test -z "$GREP"; then
1282 AC_DEFINE_UNQUOTED(GREP,"$GREP",[Define the location of the grep program. ])
1284 AC_PATH_PROGS(GNUTAR,gtar gnutar tar,,$LOCSYSPATH)
1285 if test ! -z "$GNUTAR"; then
1286 case "`\"$GNUTAR\" --version 2>&1`" in
1287 *GNU*tar* | *Free*paxutils* )
1288 AC_DEFINE_UNQUOTED(GNUTAR,"$GNUTAR",[Define to the location of Gnu tar. ])
1291 AC_MSG_WARN([*** $GNUTAR is not GNU tar, so it will not be used.])
1297 if test "x$SAMBA_CLIENT" != "xno"
1298 then AC_PATH_PROGS(SAMBA_CLIENT,smbclient,,$LOCSYSPATH)
1301 if test ! -z "$SAMBA_CLIENT"; then
1302 case "`\"$SAMBA_CLIENT\" '\\\\not.a.host.name\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in
1306 *"Connection to not.a.host.name failed"*)
1310 AC_MSG_WARN([*** $SAMBA_CLIENT does not seem to be smbclient, so it will not be used.])
1314 if test -n "$SAMBA_CLIENT"; then
1315 AC_DEFINE_UNQUOTED(SAMBA_CLIENT,"$SAMBA_CLIENT",[Define the location of smbclient for backing up Samba PC clients. ])
1316 AC_DEFINE_UNQUOTED(SAMBA_VERSION, $smbversion,
1317 [Not the actual samba version, just a number that should be increased whenever we start to rely on a new samba feature. ])
1323 AC_PATH_PROGS(GZIP,gzip,,$LOCSYSPATH)
1324 if test "$GZIP"; then
1325 AC_DEFINE(HAVE_GZIP,1,[Define if Amanda is using the gzip program. ])
1326 COMPRESS_PATH="$GZIP"
1327 COMPRESS_SUFFIX=".gz"
1328 COMPRESS_FAST_OPT="--fast"
1329 COMPRESS_BEST_OPT="--best"
1330 UNCOMPRESS_PATH="$GZIP"
1331 UNCOMPRESS_OPT="-dc"
1333 if test "$COMPRESS"; then
1334 COMPRESS_PATH="$COMPRESS"
1335 COMPRESS_SUFFIX=".Z"
1336 COMPRESS_FAST_OPT="-f"
1337 COMPRESS_BEST_OPT="-f"
1338 UNCOMPRESS_PATH="$COMPRESS"
1339 UNCOMPRESS_OPT="-dc"
1341 dnl If we have to use cat, we don't define COMPRESS_FAST_OPT,
1342 dnl COMPRESS_BEST_OPT, or UNCOMPRESS_OPT as "" since cat will look
1343 dnl look for a file by the name of "".
1344 AC_MSG_WARN([*** Cannot find either gzip or compress. Using cat. ***])
1345 COMPRESS_PATH="$CAT"
1347 COMPRESS_FAST_OPT=""
1348 COMPRESS_BEST_OPT=""
1349 UNCOMPRESS_PATH="$CAT"
1353 AC_DEFINE_UNQUOTED(COMPRESS_PATH,"$COMPRESS_PATH",[Define to the exact path to the gzip or the compress program. ])
1354 AC_DEFINE_UNQUOTED(COMPRESS_SUFFIX,"$COMPRESS_SUFFIX",[Define to the suffix for the COMPRESS_PATH compression program. ])
1355 AC_DEFINE_UNQUOTED(COMPRESS_FAST_OPT,"$COMPRESS_FAST_OPT",[Define as the command line option for fast compression. ])
1356 AC_DEFINE_UNQUOTED(COMPRESS_BEST_OPT,"$COMPRESS_BEST_OPT",[Define as the command line option for best compression. ])
1357 AC_DEFINE_UNQUOTED(UNCOMPRESS_PATH,"$UNCOMPRESS_PATH",[Define as the exact path to the gzip or compress command. ])
1358 AC_DEFINE_UNQUOTED(UNCOMPRESS_OPT,"$UNCOMPRESS_OPT",[Define as any optional arguments to get UNCOMPRESS_PATH to uncompress. ])
1360 AC_PATH_PROGS(MAILER,Mail mailx mail)
1361 if test -z "$MAILER"; then
1362 if $NO_SERVER_MODE; then
1364 AC_MSG_WARN([*** WARNING: Amanda cannot send mail reports without these programs.])
1366 AC_MSG_ERROR([Set MAILER to some program that accepts -s subject user < message_file.])
1369 AC_DEFINE_UNQUOTED(MAILER,"$MAILER",[Define to a program that understands -s "subject" user < message_file])
1371 AC_PATH_PROGS(MT,mt,mt,$LOCSYSPATH)
1373 AC_PATH_PROGS(CHIO,chio,chio,$LOCSYSPATH)
1375 AC_PATH_PROGS(CHS,chs,chs,$LOCSYSPATH)
1377 AC_PATH_PROGS(MTX,mtx,mtx,$LOCSYSPATH)
1379 AC_PATH_PROGS(MCUTIL,mcutil,mcutil,$LOCSYSPATH)
1381 AC_PATH_PROGS(PRINT, lpr lp)
1382 if test ! -z "$PRINT"; then
1383 AC_DEFINE_UNQUOTED(LPRCMD, "$PRINT",[Command for starting printing jobs. ])
1384 AC_CACHE_CHECK([which flag to use to select a printer],
1385 amanda_cv_printer_flag, [
1386 amanda_cv_printer_flag=$PRINTER_FLAG
1388 lpr|*/lpr) amanda_cv_printer_flag="-P";;
1389 lp|*/lp) amanda_cv_printer_flag="-d";;
1392 if test ! -z "$amanda_cv_printer_flag"; then
1393 AC_DEFINE_UNQUOTED(LPRFLAG, "$amanda_cv_printer_flag",[LPRCMD switch for specifying a printer name. ])
1395 AC_MSG_WARN([*** WARNING: amanda will always print to the default printer])
1399 AC_PATH_PROGS(PCAT,pcat,,$LOCSYSPATH)
1400 AC_PATH_PROGS(PERL,perl5 perl,,$LOCSYSPATH)
1402 dnl AC_PATH_PROGS(MAKEINFO,makeinfo,,$LOCSYSPATH)
1403 dnl AC_PATH_PROGS(TEXI2DVI,texi2dvi,,$LOCSYSPATH)
1405 AC_PATH_PROGS(DUMP,$DUMP_PROGRAMS,,$SYSLOCPATH)
1406 AC_PATH_PROGS(RESTORE,ufsrestore restore,,$SYSLOCPATH)
1407 if test "$DUMP" -a "$RESTORE"; then
1408 AC_DEFINE_UNQUOTED(DUMP,"$DUMP",[Define the location of the ufsdump, backup, or dump program. ])
1409 AC_DEFINE_UNQUOTED(RESTORE,"$RESTORE",[Define the location of the ufsrestore or restore program. ])
1410 if test -x $DUMP; then
1412 [whether $DUMP supports -E or -S for estimates],
1413 amanda_cv_dump_estimate,
1417 AC_TRY_COMMAND($DUMP 9Ef /dev/null /dev/null/invalid/fs 2>&1
1420 | $GREP -v Label >conftest.d-E 2>&1)
1421 cat conftest.d-E >&AS_MESSAGE_LOG_FD()
1422 AC_TRY_COMMAND($DUMP 9Sf /dev/null /dev/null/invalid/fs 2>&1
1425 | $GREP -v Label >conftest.d-S 2>&1)
1426 cat conftest.d-S >&AS_MESSAGE_LOG_FD()
1427 AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
1430 | $GREP -v Label >conftest.d 2>&1)
1431 cat conftest.d >&AS_MESSAGE_LOG_FD()
1432 if AC_TRY_COMMAND(cmp conftest.d-E conftest.d 1>&2); then
1433 amanda_cv_dump_estimate=E
1434 elif AC_TRY_COMMAND(cmp conftest.d-S conftest.d 1>&2); then
1435 amanda_cv_dump_estimate=S
1437 amanda_cv_dump_estimate=no
1439 rm -f conftest.d conftest.d-E conftest.d-S
1441 *) amanda_cv_dump_estimate=no
1446 AC_MSG_WARN([*** $DUMP is not executable, cannot run -E/-S test])
1447 amanda_cv_dump_estimate=no
1449 if test "$amanda_cv_dump_estimate" != no; then
1450 AC_DEFINE_UNQUOTED(HAVE_DUMP_ESTIMATE, "$amanda_cv_dump_estimate",[Define to the string that enables dump estimates. ])
1453 AC_ARG_WITH(dump-honor-nodump,
1454 [ --with-dump-honor-nodump if dump supports -h, use it for level0s too],
1455 [ if test -x $DUMP; then
1457 [whether $DUMP supports -h (honor nodump flag)],
1458 amanda_cv_honor_nodump,
1462 AC_TRY_COMMAND($DUMP 9hf 0 /dev/null /dev/null/invalid/fs 2>&1
1465 | $GREP -v Label >conftest.d-h 2>&1)
1466 cat conftest.d-h >&AS_MESSAGE_LOG_FD()
1467 AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
1470 | $GREP -v Label >conftest.d 2>&1)
1471 cat conftest.d >&AS_MESSAGE_LOG_FD()
1472 if AC_TRY_COMMAND(diff conftest.d-h conftest.d 1>&2); then
1473 amanda_cv_honor_nodump=yes
1475 amanda_cv_honor_nodump=no
1477 rm -f conftest.d conftest.d-h
1479 *) amanda_cv_honor_nodump=no
1484 AC_MSG_WARN([*** $DUMP is not executable, cannot run -h test])
1485 amanda_cv_honor_nodump=no
1487 if test "$amanda_cv_honor_nodump" = yes; then
1488 AC_DEFINE(HAVE_HONOR_NODUMP,1,[Define this if dump accepts -h for honoring nodump. ])
1493 AC_PATH_PROGS(XFSDUMP,xfsdump,,$SYSLOCPATH)
1494 AC_PATH_PROGS(XFSRESTORE,xfsrestore,,$SYSLOCPATH)
1495 if test "$XFSDUMP" -a "$XFSRESTORE"; then
1496 AC_DEFINE_UNQUOTED(XFSDUMP,"$XFSDUMP",[Define the location of the xfsdump program on Irix hosts. ])
1497 AC_DEFINE_UNQUOTED(XFSRESTORE,"$XFSRESTORE",[Define the location of the xfsrestore program on Irix hosts. ])
1498 AC_MSG_WARN([*** xfsdump causes the setuid-root rundump program to be enabled])
1499 AC_MSG_WARN([[*** to disable it, just #undef XFSDUMP in config/config.h]])
1502 VXSYSLOCPATH="$SYSLOCPATH:/usr/lib/fs/vxfs"
1503 AC_PATH_PROGS(VXDUMP,vxdump,,$VXSYSLOCPATH)
1504 AC_PATH_PROGS(VXRESTORE,vxrestore,,$VXSYSLOCPATH)
1505 if test "$VXDUMP" -a "$VXRESTORE"; then
1506 AC_DEFINE_UNQUOTED(VXDUMP,"$VXDUMP",[Define the location of the vxdump program on HPUX and SINIX hosts or on
1507 * other hosts where the Veritas filesystem (vxfs) has been installed. ])
1508 AC_DEFINE_UNQUOTED(VXRESTORE,"$VXRESTORE",[Define the location of the vxrestore program on HPUX and SINIX hosts or on
1509 * other hosts where the Veritas filesystem (vxfs) has been installed. ])
1512 AC_PATH_PROGS(VDUMP,vdump,,$SYSLOCPATH)
1513 AC_PATH_PROGS(VRESTORE,vrestore,,$SYSLOCPATH)
1514 if test "$VDUMP" -a "$VRESTORE"; then
1515 AC_DEFINE_UNQUOTED(VDUMP,"$VDUMP",[Define the location of the vdump program. ])
1516 AC_DEFINE_UNQUOTED(VRESTORE,"$VRESTORE",[Define the location of the vrestore program. ])
1519 dnl Handle all of the substitutions to make amplot work.
1520 if test "$PCAT"; then
1521 AMPLOT_CAT_PACK="if(o==\"z\")print \"$PCAT\"; else"
1525 if test "$COMPRESS"; then
1526 AMPLOT_COMPRESS=$COMPRESS
1527 AMPLOT_CAT_COMPRESS="if(o==\"Z\")print \"$COMPRESS -dc\"; else"
1529 AMPLOT_CAT_COMPRESS=
1531 if test "$GZIP"; then
1532 AMPLOT_COMPRESS=$GZIP
1533 AMPLOT_CAT_GZIP="if(o==\"gz\")print \"$GZIP -dc\"; else"
1537 AC_SUBST(AMPLOT_COMPRESS)
1538 AC_SUBST(AMPLOT_CAT_GZIP)
1539 AC_SUBST(AMPLOT_CAT_COMPRESS)
1540 AC_SUBST(AMPLOT_CAT_PACK)
1542 dnl Empty GZIP so that make dist works.
1545 dnl Checks for compilers, typedefs, structures, and compiler characteristics.
1546 dnl Check for large file compilation environment.
1549 [for large file compilation CFLAGS],
1550 amanda_cv_LFS_CFLAGS,
1552 amanda_cv_LFS_CFLAGS=
1553 if test "$GETCONF"; then
1554 if $GETCONF ${GETCONF_LFS}_CFLAGS >/dev/null 2>&1; then
1555 amanda_cv_LFS_CFLAGS=`$GETCONF ${GETCONF_LFS}_CFLAGS 2>/dev/null`
1562 [for large file compilation LDFLAGS],
1563 amanda_cv_LFS_LDFLAGS,
1565 amanda_cv_LFS_LDFLAGS=
1566 if test "$GETCONF"; then
1567 if $GETCONF ${GETCONF_LFS}_LDFLAGS >/dev/null 2>&1; then
1568 amanda_cv_LFS_LDFLAGS=`$GETCONF ${GETCONF_LFS}_LDFLAGS 2>/dev/null`
1575 [for large file compilation LIBS],
1579 if test "$GETCONF"; then
1580 if $GETCONF ${GETCONF_LFS}_LIBS >/dev/null 2>&1; then
1581 amanda_cv_LFS_LIBS=`$GETCONF ${GETCONF_LFS}_LIBS 2>/dev/null`
1587 if test "$need_resetofs" = yes; then
1588 AC_DEFINE(NEED_RESETOFS,1,[Define if we have to reset tape offsets when reacing 2GB. ])
1590 CFLAGS="$amanda_cv_LFS_CFLAGS $CFLAGS"
1591 CPPFLAGS="$amanda_cv_LFS_CFLAGS $CPPFLAGS"
1592 LDFLAGS="$amanda_cv_LFS_LDFLAGS $LDFLAGS"
1593 LIBS="$amanda_cv_LFS_LIBS $LIBS"
1596 AC_SUBST(LIBTOOL_DEPS)
1598 AC_PROG_GCC_TRADITIONAL
1601 AMANDA_C_UNSIGNED_LONG_CONSTANTS
1606 dnl We don't have an acconfig.h template since we moved all define templates
1607 dnl into the third argument of AC_DEFINE. However, AC_CHECK_TYPE calls
1608 dnl AC_DEFINE without such an argument, so autoheader complains about no
1609 dnl template being available. This is an ugly work-around.
1611 pushdef([AC_DEFINE_SAVED],defn([AC_DEFINE]))
1612 pushdef([AC_DEFINE],[AC_DEFINE_SAVED([$1],[$2],[Define to $2 if $1 is not defined])])
1614 AC_CHECK_TYPE(ssize_t, int)
1616 dnl there is a push to avoid depending on long longs, so in general it's
1617 dnl better to convert numbers to kilobytes for consistancies sake. This
1618 dnl is primarily checked for for client-src/amqde.c
1619 AC_CHECK_TYPES(unsigned long long)
1622 popdef([AC_DEFINE_SAVED])
1624 dnl End ugly AC_CHECK_TYPE work-around.
1631 dnl AC_CHECK_TYPE does not work for socklen_t because it does not look
1632 dnl in <sys/socket.h>, so this is a variant that adds another header.
1633 AC_DEFUN([AMANDA_CHECK_TYPE],
1634 [AC_REQUIRE([AC_HEADER_STDC])dnl
1635 AC_MSG_CHECKING(for $1)
1636 AC_CACHE_VAL(ac_cv_type_$1,
1638 changequote(<<,>>)dnl
1639 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
1640 changequote([,]), [#include <sys/types.h>
1645 #include <$3>], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
1646 AC_MSG_RESULT($ac_cv_type_$1)
1647 if test $ac_cv_type_$1 = no; then
1648 AC_DEFINE($1, $2, [Define if $1 is not a standard system type])
1651 AMANDA_CHECK_TYPE(socklen_t, int, sys/socket.h)
1653 dnl Checks for header files.
1663 cam/scsi/scsi_message.h \
1679 netinet/in_systm.h \
1681 readline/history.h \
1682 readline/readline.h \
1702 sys/scsi/impl/uscsi.h \
1703 sys/scsi/scsi/ioctl.h \
1719 AC_CHECK_HEADERS(netinet/ip.h,,,
1720 [[#include <sys/socket.h>
1721 #if HAVE_SYS_TYPES_H
1722 #include <sys/types.h>
1724 #ifdef HAVE_NETINET_IN_SYSTM_H
1725 #include <netinet/in_systm.h>
1727 #include <netinet/in.h>
1730 AC_CHECK_HEADERS(sys/mount.h,,,
1731 [[#ifdef HAVE_SYS_PARAM_H
1732 #include <sys/param.h>
1736 NO_SCSI_CHANGER_MODE=true
1737 NO_CHIO_CHANGER_MODE=true
1744 if test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
1745 AC_CACHE_CHECK([for HP/UX-like scsi changer support],
1746 amanda_cv_hpux_scsi_chio,
1747 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1748 #include <sys/scsi.h>
1750 static struct element_addresses changer_info;
1751 int i = SIOC_ELEMENT_ADDRESSES;
1752 int j = SIOC_ELEMENT_STATUS;
1753 int k = SIOC_MOVE_MEDIUM;
1754 ]])],[amanda_cv_hpux_scsi_chio=yes],[amanda_cv_hpux_scsi_chio=no])])
1755 if test x"$amanda_cv_hpux_scsi_chio" = x"yes"; then
1756 AC_DEFINE(HAVE_HPUX_SCSI_CHIO,1,[Define to enable HPUX chio based changer support. ])
1757 NO_SCSI_CHANGER_MODE=false
1762 dnl Linux SCSI based on ioctl
1764 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1765 test x"$ac_cv_header_scsi_scsi_ioctl_h" = x"yes"; then
1766 AC_CACHE_CHECK([for Linux like scsi support (ioctl)],
1767 amanda_cv_linux_scsi,
1768 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1769 #include <scsi/scsi_ioctl.h>
1770 #include <sys/mtio.h>
1774 ioctl(device, SCSI_IOCTL_SEND_COMMAND, Command);
1775 ]])],[amanda_cv_linux_scsi=yes],[amanda_cv_linux_scsi=no])])
1779 dnl Linux SCSI based on sg
1781 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1782 test x"$ac_cv_header_scsi_sg_h" = x"yes"; then
1783 AC_CACHE_CHECK([for Linux like scsi support (sg)],
1784 amanda_cv_linux_sg_scsi,
1785 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1786 #include <scsi/sg.h>
1787 #include <sys/mtio.h>
1790 struct sg_header *psg_header;
1792 write(device, buffer, 1);
1793 ]])],[amanda_cv_linux_sg_scsi=yes],[amanda_cv_linux_sg_scsi=no])])
1796 if test x"$amanda_cv_linux_scsi" = x"yes" ||
1797 test x"$amanda_cv_linux_sg_scsi" = x"yes";then
1798 AC_DEFINE(HAVE_LINUX_LIKE_SCSI,1,[Define to enable Linux tape-changer support.])
1799 NO_SCSI_CHANGER_MODE=false
1805 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1806 test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
1807 AC_CACHE_CHECK([for HP-UX like scsi support],
1808 amanda_cv_hpux_scsi,
1809 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1811 #include <sys/ioctl.h>
1812 #include <sys/scsi.h>
1813 #include <sys/mtio.h>
1817 ioctl(device, SIOC_IO, Command);
1818 ]])],[amanda_cv_hpux_scsi=yes],[amanda_cv_hpux_scsi=no])])
1819 if test x"$amanda_cv_hpux_scsi" = x"yes";then
1820 AC_DEFINE(HAVE_HPUX_LIKE_SCSI,1,[Define to enable HPUX tape-changer support. ])
1821 NO_SCSI_CHANGER_MODE=false
1822 NO_CHIO_CHANGER_MODE=false
1829 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1830 test x"$ac_cv_header_sys_dsreq_h" = x"yes"; then
1831 AC_CACHE_CHECK([for Irix like scsi support],
1832 amanda_cv_irix_scsi,
1833 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1834 #include <sys/types.h>
1835 #include <sys/dsreq.h>
1836 #include <sys/mtio.h>
1840 ioctl(device, DS_ENTER, &Command);
1841 ]])],[amanda_cv_irix_scsi=yes],[amanda_cv_irix_scsi=no])])
1842 if test x"$amanda_cv_irix_scsi" = x"yes";then
1843 AC_DEFINE(HAVE_IRIX_LIKE_SCSI,1,[Define to enable IRIX tape-changer support])
1844 NO_SCSI_CHANGER_MODE=false
1851 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1852 test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then
1853 AC_CACHE_CHECK([for Solaris like scsi support],
1854 amanda_cv_solaris_scsi,
1855 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1856 #include <sys/types.h>
1857 #include <sys/scsi/impl/uscsi.h>
1858 #include <sys/mtio.h>
1862 ioctl(device, USCSICMD, Command);
1863 ]])],[amanda_cv_solaris_scsi=yes],[amanda_cv_solaris_scsi=no])])
1864 if test x"$amanda_cv_solaris_scsi" = x"yes";then
1865 AC_DEFINE(HAVE_SOLARIS_LIKE_SCSI,1,[Define to enable Solaris tape-changer support])
1866 NO_SCSI_CHANGER_MODE=false
1873 if test x"$ac_cv_header_sys_tape_h" = x"yes" &&
1874 test x"$ac_cv_header_sys_scarray_h" = x"yes" &&
1875 test x"$ac_cv_header_sys_gscdds_h" = x"yes"; then
1876 AC_CACHE_CHECK([for AIX like scsi support],
1878 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1879 #include <sys/types.h>
1880 #include <sys/scarray.h>
1881 #include <sys/tape.h>
1885 ioctl(device, STIOCMD, Command);
1886 ]])],[amanda_cv_aix_scsi=yes],[amanda_cv_aix_scsi=no])])
1887 if test x"$amanda_cv_aix_scsi" = x"yes";then
1888 AC_DEFINE(HAVE_AIX_LIKE_SCSI,1,[Define to enable AIX tape-changer support])
1889 NO_SCSI_CHANGER_MODE=false
1895 if test x"$ac_cv_header_cam_cam_h" = x"yes";then
1896 AC_CACHE_CHECK([for CAM like scsi support],
1898 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1901 # include <cam/cam.h>
1902 # include <cam/cam_ccb.h>
1903 # include <cam/scsi/scsi_message.h>
1904 # include <cam/scsi/scsi_pass.h>
1905 # include <camlib.h>
1907 struct cam_device *curdev;
1909 curdev = cam_open_pass("", O_RDWR, NULL);
1910 ]])],[amanda_cv_cam_scsi=yes],[amanda_cv_cam_scsi=no])])
1911 if test x"$amanda_cv_cam_scsi" = x"yes";then
1912 AC_DEFINE(HAVE_CAM_LIKE_SCSI,1,[Define to enable CAM tape-changer support])
1913 NO_SCSI_CHANGER_MODE=false
1914 AC_CHECK_LIB(cam,main)
1921 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1922 test x"$ac_cv_header_sys_scsiio_h" = x"yes"; then
1923 AC_CACHE_CHECK([for BSD like scsi support],
1925 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1926 #include <sys/types.h>
1927 #include <sys/scsiio.h>
1928 #include <sys/mtio.h>
1932 ioctl(device, SCIOCCOMMAND, &Command);
1933 ]])],[amanda_cv_bsd_scsi=yes],[amanda_cv_bsd_scsi=no])])
1934 if test x"$amanda_cv_bsd_scsi" = x"yes";then
1935 AC_DEFINE(HAVE_BSD_LIKE_SCSI,1,[Define to enable BSD tape-changer support])
1936 NO_SCSI_CHANGER_MODE=false
1940 dnl Do not build chg-scsi-chio if we cannot find the needed support
1941 dnl include files for the SCSI interfaces
1942 dnl chio.h and sys/chio.h are chio based systems
1943 if test x"$ac_cv_header_chio_h" = x"yes" ||
1944 test x"$ac_cv_header_sys_chio_h" = x"yes"; then
1945 dnl chg-scsi does not support FreeBSD 3.0's chio.h; it became backward
1946 dnl incompatible with the introduction of camlib.h
1947 if test x"$ac_cv_header_camlib_h" != x"yes"; then
1948 if $NO_SCSI_CHANGER_MODE; then
1949 NO_SCSI_CHANGER_MODE=false
1951 NO_CHIO_CHANGER_MODE=false
1956 dnl cur_colr is on some HP's
1957 AC_CHECK_LIB(cur_colr,main)
1959 AC_CHECK_LIB(intl,main)
1961 dnl Make sure we don't use -lnsl and -lsun on Irix systems.
1964 AC_CHECK_LIB(socket,main)
1967 AC_CHECK_LIB(nsl,main)
1968 AC_CHECK_LIB(socket,main)
1969 AC_CHECK_LIB(sun,main)
1973 AC_CHECK_LIB(termcap,tgetent)
1974 if test "$ac_cv_lib_termcap_tgetent" != yes; then
1975 AC_CHECK_LIB(curses,tgetent)
1976 if test "$ac_cv_lib_curses_tgetent" != yes; then
1977 AC_CHECK_LIB(ncurses,tgetent)
1980 if test "$ac_cv_lib_termcap_tgetent" = yes ||
1981 test "$ac_cv_lib_curses_tgetent" = yes ||
1982 test "$ac_cv_lib_ncurses_tgetent" = yes; then
1983 AC_CHECK_LIB(readline,readline)
1984 if test "$ac_cv_lib_readline_readline" != yes; then
1985 AC_MSG_WARN([*** No readline library, no history and command line editing in amrecover!])
1988 AC_MSG_WARN([*** No terminal library, no history and command line editing in amrecover!])
1991 if test "$ac_cv_lib_readline_readline" = yes; then
1992 READLINE_LIBS=-lreadline
1993 LIBS=`echo $LIBS | sed s/-lreadline//`
1994 AC_SUBST(READLINE_LIBS)
1997 if test "$ac_cv_header_linux_zftape_h" = yes; then
1998 if test "$ac_cv_header_vtblc_h" = yes; then
1999 AC_CHECK_LIB(vtblc,main)
2000 if test "$ac_cv_lib_vtblc_main" != yes; then
2001 AC_MSG_WARN([*** vtblc library not found - no QIC volume table support!])
2004 AC_MSG_WARN([*** vtblc headers not found - no QIC volume table support!])
2008 AC_CHECK_LIB(m,modf)
2010 dnl Check for various "mt status" related structure elements.
2012 AC_MSG_CHECKING(for mt_flags mtget structure element)
2013 mt_flags_result="found"
2014 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2016 #include <sys/types.h>
2017 #include <sys/mtio.h>
2023 ]])],[AC_DEFINE(HAVE_MT_FLAGS,1,Define if the mtget structure has an mt_flags field)],[mt_flags_result="not found"])
2024 AC_MSG_RESULT($mt_flags_result)
2026 AC_MSG_CHECKING(for mt_fileno mtget structure element)
2027 mt_fileno_result="found"
2028 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2030 #include <sys/types.h>
2031 #include <sys/mtio.h>
2037 ]])],[AC_DEFINE(HAVE_MT_FILENO,1,Define if the mtget structure has an mt_fileno field)],[mt_fileno_result="not found"])
2038 AC_MSG_RESULT($mt_fileno_result)
2040 AC_MSG_CHECKING(for mt_blkno mtget structure element)
2041 mt_blkno_result="found"
2042 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2044 #include <sys/types.h>
2045 #include <sys/mtio.h>
2051 ]])],[AC_DEFINE(HAVE_MT_BLKNO,1,Define if the mtget structure has an mt_blkno field)],[mt_blkno_result="not found"])
2052 AC_MSG_RESULT($mt_blkno_result)
2054 AC_MSG_CHECKING(for mt_dsreg mtget structure element)
2055 mt_dsreg_result="found"
2056 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2058 #include <sys/types.h>
2059 #include <sys/mtio.h>
2065 ]])],[AC_DEFINE(HAVE_MT_DSREG,1,Define if the mtget structure has an mt_dsreg field)],[mt_dsreg_result="not found"])
2066 AC_MSG_RESULT($mt_dsreg_result)
2068 AC_MSG_CHECKING(for mt_erreg mtget structure element)
2069 mt_erreg_result="found"
2070 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2072 #include <sys/types.h>
2073 #include <sys/mtio.h>
2079 ]])],[AC_DEFINE(HAVE_MT_ERREG,1,Define if the mtget structure has an mt_erreg field)],[mt_erreg_result="not found"])
2080 AC_MSG_RESULT($mt_erreg_result)
2084 dnl Check if the system does support the user requested database library.
2085 dnl Begin by checking for the header file. If it is not there, then do
2086 dnl not use the library. If the header file is there, then try to link
2087 dnl against the library. If it's not there, then try to link using
2088 dnl just the -lc library. If the link against -lc fails, then do not
2089 dnl use this library.
2093 dnl Testing if libc contains the dbm_open routine is tested for a
2094 dnl lot of times below. We do it once here now.
2096 AC_CHECK_LIB(c,dbm_open)
2101 if test "$ac_cv_header_db_h" = yes; then
2102 AC_CHECK_LIB(db,main)
2103 if test "$ac_cv_lib_db_main" = yes; then
2104 AC_CHECK_LIB(db,dbm_open)
2105 if test "$ac_cv_lib_db_dbm_open" = yes; then
2110 AC_MSG_WARN([*** db database library requested but dbm_open not found in -ldb.])
2113 if test "$ac_cv_lib_c_dbm_open" = yes; then
2118 AC_MSG_WARN([*** db library requested but -ldb doesn't exist and dbm_open cannot be found.])
2123 AC_MSG_WARN([*** db database library requested but db.h not found.])
2128 if test "$ac_cv_header_dbm_h" = yes; then
2129 AC_CHECK_LIB(dbm,main)
2130 if test "$ac_cv_lib_dbm_main" = yes; then
2131 AC_CHECK_LIB(dbm,dbm_open)
2132 if test "$ac_cv_lib_dbm_dbm_open" = yes; then
2137 AC_MSG_WARN([*** dbm database library requested but dbm_open not found in -ldbm.])
2140 if test "$ac_cv_lib_c_dbm_open" = yes; then
2145 AC_MSG_WARN([*** dbm library requested but -ldbm doesn't exist and dbm_open cannot be found.])
2150 AC_MSG_WARN([*** dbm database library requested but dbm.h not found.])
2155 if test "$ac_cv_header_ndbm_h" = yes; then
2156 AC_CHECK_LIB(gdbm,main)
2157 if test "$ac_cv_lib_gdbm_main" = yes; then
2158 AC_CHECK_LIB(gdbm,dbm_open)
2159 if test "$ac_cv_lib_gdbm_dbm_open" = yes; then
2164 AC_MSG_WARN([*** gdbm database library requested but -lgdbm not found.])
2167 if test "$ac_cv_lib_c_dbm_open" = yes; then
2172 AC_MSG_WARN([*** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found.])
2177 AC_MSG_WARN([*** gdbm database library requested but ndbm.h not found.])
2182 if test "$ac_cv_header_ndbm_h" = yes; then
2183 AC_CHECK_LIB(ndbm,main)
2184 if test "$ac_cv_lib_ndbm_main" = yes; then
2185 AC_CHECK_LIB(ndbm,dbm_open)
2186 if test "$ac_cv_lib_ndbm_dbm_open" = yes; then
2191 AC_MSG_WARN([*** ndbm database library requested but -lndbm not found.])
2194 if test "$ac_cv_lib_c_dbm_open" = yes; then
2199 AC_MSG_WARN([*** ndbm library requested but -lndbm doesn't exist and dbm_open cannot be found.])
2204 AC_MSG_WARN([*** ndbm database library requested but ndbm.h not found.])
2213 dnl If a database style was not specified select an appropriate one
2215 dnl Nowadays we default to our own internal text database, but I have left
2216 dnl the code that does the testing here just in case it is needed one day.
2218 if test -z "$DB_STYLE"; then
2224 dnl if test -z "$DB_STYLE" -a "$ac_cv_header_ndbm_h" = yes; then
2225 dnl AC_CHECK_LIB(ndbm,dbm_open)
2226 dnl if test "$ac_cv_lib_ndbm_dbm_open" = yes; then
2228 dnl DB_HEADER=ndbm.h
2230 dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
2232 dnl DB_HEADER=ndbm.h
2237 dnl if test -z "$DB_STYLE" -a "$ac_cv_header_db_h" = yes; then
2238 dnl AC_CHECK_LIB(db,dbm_open)
2239 dnl if test "$ac_cv_lib_db_dbm_open" = yes; then
2243 dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
2250 dnl if test -z "$DB_STYLE" -a "$ac_cv_header_dbm_h" = yes; then
2251 dnl AC_CHECK_LIB(dbm,dbm_open)
2252 dnl if test "$ac_cv_lib_db_dbm_open" = yes; then
2256 dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
2263 dnl if test -z "$DB_STYLE" -a "$ac_cv_header_ndbm_h" = yes; then
2264 dnl AC_CHECK_LIB(gdbm,dbm_open)
2265 dnl if test "$ac_cv_lib_gdbm_dbm_open" = yes; then
2267 dnl DB_HEADER=ndbm.h
2269 dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
2271 dnl DB_HEADER=ndbm.h
2276 dnl if test -z "$DB_STYLE"; then
2277 dnl if test "$ac_cv_lib_c_dbm_open" = yes; then
2278 dnl AC_MSG_WARN([*** A dbm_open() routine was found in -lc, but no header])
2279 dnl AC_MSG_WARN([*** files exist. Please remedy the situation.])
2281 dnl AC_MSG_WARN([*** No dbm_open() routine found!])
2283 dnl AC_MSG_WARN([*** You may want to install the gdbm library from])
2284 dnl AC_MSG_WARN([*** ftp://prep.ai.mit.edu/pub/gnu/gdbm-1.7.3.tar.gz.])
2286 dnl AC_MSG_WARN([*** Using the built-in text database.])
2292 if test "$DB_STYLE" = text; then
2293 AC_DEFINE(TEXTDB,1,[Define to enable the text-based database format. ])
2295 AC_MSG_CHECKING([for database])
2296 AC_MSG_RESULT([header is $DB_HEADER, linking against -l$DB_LIB])
2298 db) AC_DEFINE(USE_DB_H,1,[Define to enable db databases. ]) ;;
2299 dbm) AC_DEFINE(USE_DBM_H,1,[Define to enable dbm databases. ]) ;;
2300 gdbm) AC_DEFINE(USE_GDBM_H,1,[Define to enable gdbm databases. ]) ;;
2301 ndbm) AC_DEFINE(USE_NDBM_H,1,[Define to enable ndbm databases. ]) ;;
2305 [for struct datum declared in header files],
2306 amanda_cv_struct_datum,
2308 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2309 #if defined(USE_DB_H)
2312 # if defined(USE_DBM_H)
2315 # if defined(USE_NDBM_H)
2322 ]])],[amanda_cv_struct_datum=yes],[amanda_cv_struct_datum=no
2325 if test "$amanda_cv_struct_datum" = yes; then
2326 AC_DEFINE(HAVE_STRUCT_DATUM,1,[Define if the database header declares struct datum. ])
2333 dbm | ndbm) DB_EXT=".dir .pag";;
2339 AC_CACHE_CHECK(whether _POSIX2_RE_DUP_MAX is defined,
2340 amanda_cv_have__posix2_re_dup_max,
2343 #ifdef _POSIX2_RE_DUP_MAX
2346 ], amanda_cv_have__posix2_re_dup_max=yes, amanda_cv_have__posix2_re_dup_max=no))
2347 if test "$amanda_cv_have__posix2_re_dup_max" = yes; then
2348 AC_DEFINE(HAVE__POSIX2_RE_DUP_MAX,1,[Define if limits.h defines _POSIX2_RE_DUP_MAX. ])
2351 AC_CACHE_CHECK(whether CHAR_MIN is defined,
2352 amanda_cv_have_char_min,
2358 ], amanda_cv_have_char_min=yes, amanda_cv_have_char_min=no))
2359 if test "$amanda_cv_have_char_min" = yes; then
2360 AC_DEFINE(HAVE_CHAR_MIN,1,[Define if limits.h defines CHAR_MIN. ])
2363 AC_CACHE_CHECK(whether CHAR_MAX is defined,
2364 amanda_cv_have_char_max,
2370 ], amanda_cv_have_char_max=yes, amanda_cv_have_char_max=no))
2371 if test "$amanda_cv_have_char_max" = yes; then
2372 AC_DEFINE(HAVE_CHAR_MAX,1,[Define if limits.h defines CHAR_MAX. ])
2375 AC_CACHE_CHECK(whether CHAR_BIT is defined,
2376 amanda_cv_have_char_bit,
2382 ], amanda_cv_have_char_bit=yes, amanda_cv_have_char_bit=no))
2383 if test "$amanda_cv_have_char_bit" = yes; then
2384 AC_DEFINE(HAVE_CHAR_BIT,1,[Define if limits.h defines CHAR_BIT. ])
2387 dnl Checks for library functions and if the function is declared in
2388 dnl an appropriate header file. Add some of the missing functions
2390 ICE_CHECK_DECL(accept,sys/types.h sys/socket.h)
2392 AC_CHECK_FUNCS(atexit)
2393 ICE_CHECK_DECL(atof,stdlib.h)
2394 AC_CHECK_FUNCS(basename)
2395 ICE_CHECK_DECL(bind,sys/types.h sys/socket.h)
2396 ICE_CHECK_DECL(bcopy,string.h strings.h stdlib.h)
2397 ICE_CHECK_DECL(bzero,string.h strings.h stdlib.h)
2398 AC_FUNC_CLOSEDIR_VOID
2399 ICE_CHECK_DECL(closelog,syslog.h)
2400 ICE_CHECK_DECL(connect,sys/types.h sys/socket.h)
2401 ICE_CHECK_DECL(dbm_open,${DB_HEADER-no/db/header/file})
2402 AC_CHECK_FUNCS(endmntent)
2403 ICE_CHECK_DECL(fclose,stdio.h)
2404 ICE_CHECK_DECL(fflush,stdio.h)
2405 ICE_CHECK_DECL(flock,sys/file.h)
2406 ICE_CHECK_DECL(fprintf,stdio.h)
2407 ICE_CHECK_DECL(fputc,stdio.h)
2408 ICE_CHECK_DECL(fputs,stdio.h)
2409 ICE_CHECK_DECL(fread,stdio.h stdlib.h)
2410 ICE_CHECK_DECL(fseek,stdio.h)
2411 ICE_CHECK_DECL(fwrite,stdio.h stdlib.h)
2412 AC_REPLACE_FUNCS(getcwd)
2413 AC_CHECK_FUNCS(getfsent)
2414 ICE_CHECK_DECL(gethostname,unistd.h)
2416 ICE_CHECK_DECL(getopt,stdlib.h unistd.h libc.h)
2417 ICE_CHECK_DECL(getpeername,sys/types.h sys/socket.h)
2418 AC_CHECK_FUNCS(getpgrp)
2420 ICE_CHECK_DECL(getsockname,sys/types.h sys/socket.h)
2421 ICE_CHECK_DECL(getsockopt,sys/types.h sys/socket.h)
2422 ICE_CHECK_DECL(gettimeofday,time.h sys/time.h)
2423 AMANDA_FUNC_GETTIMEOFDAY_ARGS
2424 AC_CHECK_FUNCS(getvfsent initgroups isascii)
2425 ICE_CHECK_DECL(initgroups,grp.h sys/types.h unistd.h libc.h)
2426 ICE_CHECK_DECL(ioctl,sys/ioctl.h unistd.h libc.h)
2427 ICE_CHECK_DECL(listen,sys/types.h sys/socket.h)
2428 ICE_CHECK_DECL(lstat,sys/types.h sys/stat.h)
2429 ICE_CHECK_DECL(malloc,stdlib.h)
2430 AC_REPLACE_FUNCS(memmove)
2431 ICE_CHECK_DECL(memmove,string.h strings.h)
2432 ICE_CHECK_DECL(memset,string.h strings.h)
2433 AC_CHECK_FUNCS(mkdir)
2434 ICE_CHECK_DECL(mktemp,stdlib.h)
2435 AC_REPLACE_FUNCS(mktime)
2436 ICE_CHECK_DECL(mktime,time.h sys/time.h)
2438 dnl atexit() is prefered, sunos (maybe others?) define on_exit
2439 AC_CHECK_FUNCS(on_exit)
2440 ICE_CHECK_DECL(openlog,syslog.h)
2441 ICE_CHECK_DECL(pclose,stdio.h)
2442 ICE_CHECK_DECL(perror,stdio.h)
2443 ICE_CHECK_DECL(printf,stdio.h)
2444 AC_CHECK_FUNCS(putenv)
2445 ICE_CHECK_DECL(puts,stdio.h)
2446 ICE_CHECK_DECL(realloc,stdlib.h)
2447 ICE_CHECK_DECL(recvfrom,sys/types.h sys/socket.h)
2448 ICE_CHECK_DECL(remove,stdio.h)
2449 ICE_CHECK_DECL(rename,stdio.h)
2450 ICE_CHECK_DECL(rewind,stdio.h)
2451 AC_CHECK_FUNCS(rmdir)
2452 ICE_CHECK_DECL(ruserok,netdb.h sys/socket.h libc.h unistd.h)
2453 ICE_CHECK_DECL(select,sys/types.h sys/socket.h sys/select.h time.h sys/time.h)
2454 AMANDA_FUNC_SELECT_ARG_TYPE
2455 ICE_CHECK_DECL(sendto,sys/types.h sys/socket.h)
2456 ICE_CHECK_DECL(setegid,unistd.h)
2457 ICE_CHECK_DECL(seteuid,unistd.h)
2458 AC_CHECK_FUNCS(setmntent)
2459 ICE_CHECK_DECL(setresgid,unistd.h)
2460 ICE_CHECK_DECL(setresuid,unistd.h)
2462 dnl arguments for setpgrp or not
2463 AC_CHECK_FUNC(setpgid, [
2464 AC_DEFINE(HAVE_SETPGID,1,[Define if setpgid() is available. ])
2465 ICE_CHECK_DECL(setpgid,sys/types.h unistd.h)
2467 AC_CHECK_FUNC(setpgrp,[AC_FUNC_SETPGRP])
2468 ICE_CHECK_DECL(setpgrp,sys/types.h unistd.h libc.h)
2470 ICE_CHECK_DECL(setsockopt,sys/types.h sys/socket.h)
2472 AC_CHECK_FUNCS(shmget,
2474 AMANDA_FUNC_SHM_ARG_TYPE
2475 case "$FORCE_MMAP" in
2477 AC_DEFINE(HAVE_SYSVSHM,1,[Define if SysV shared-memory functions are available. ])
2482 ICE_CHECK_DECL(shmat,sys/types.h sys/ipc.h sys/shm.h)
2483 ICE_CHECK_DECL(shmctl,sys/types.h sys/ipc.h sys/shm.h)
2484 ICE_CHECK_DECL(shmdt,sys/types.h sys/ipc.h sys/shm.h)
2485 ICE_CHECK_DECL(shmget,sys/types.h sys/ipc.h sys/shm.h)
2487 if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
2488 case "$FORCE_MMAP" in
2490 if test "$ac_cv_func_shmget" != yes; then
2491 AC_MSG_WARN([*** Neither shmget() nor mmap() found!])
2492 AC_MSG_WARN([*** This system will not support the Amanda server.])
2497 AC_MSG_WARN([*** --with-mmap used on a system with no mmap() support!])
2498 AC_MSG_WARN([*** This system will not support the Amanda server.])
2504 ICE_CHECK_DECL(shquote, stdlib.h)
2506 dnl Some systems have snprintf but not vsnprintf. If either snprintf or
2507 dnl vsnprintf are missing, then use the snprintf.c we provide.
2508 ICE_CHECK_DECL(snprintf,stdio.h)
2509 ICE_CHECK_DECL(vsnprintf,stdio.h)
2510 if test x"$ice_have_snprintf" != x"yes" ||
2511 test x"$ice_have_vsnprintf" != x"yes"; then
2512 AC_LIBOBJ([snprintf])
2514 dnl so that automake includes snprintf.c in the distribution
2515 AC_REPLACE_FUNCS(snprintf)
2519 AC_CHECK_FUNCS(sigaction sigemptyset sigvec)
2520 ICE_CHECK_DECL(socket,sys/types.h sys/socket.h)
2521 ICE_CHECK_DECL(socketpair,sys/types.h sys/socket.h)
2522 ICE_CHECK_DECL(sscanf,stdio.h)
2523 AC_CHECK_FUNCS(statfs statvfs)
2524 AC_REPLACE_FUNCS(strerror)
2525 ICE_CHECK_DECL(strerror,string.h strings.h)
2527 AC_REPLACE_FUNCS(strftime)
2528 ICE_CHECK_DECL(strftime,time.h sys/time.h)
2529 AC_REPLACE_FUNCS(strncasecmp)
2530 ICE_CHECK_DECL(strncasecmp,string.h strings.h)
2531 AC_REPLACE_FUNCS(strstr)
2532 ICE_CHECK_DECL(syslog,syslog.h)
2533 ICE_CHECK_DECL(system,stdlib.h)
2534 ICE_CHECK_DECL(time,time.h sys/time.h)
2535 ICE_CHECK_DECL(tolower,ctype.h)
2536 ICE_CHECK_DECL(toupper,ctype.h)
2537 ICE_CHECK_DECL(ungetc,stdio.h)
2539 ICE_CHECK_DECL(vfprintf,stdio.h stdlib.h)
2540 ICE_CHECK_DECL(vprintf,stdio.h stdlib.h)
2541 ICE_CHECK_DECL(vsprintf,stdio.h stdlib.h)
2542 AC_CHECK_FUNC(wait4)
2543 AC_REPLACE_FUNCS(waitpid)
2544 AC_REPLACE_FUNCS(strcasecmp)
2545 ICE_CHECK_DECL(strcasecmp,string.h strings.h)
2547 AC_CHECK_FUNCS(fnmatch)
2549 if test "$ac_cv_func_fnmatch" != yes -a "$USE_QUICK_AND_DIRTY_ESTIMATES" != yes ; then
2550 AC_MSG_WARN([--with-qde and no fnmatch -- gnutar exclude files will not work])
2553 dnl disk device prefixes
2554 AC_MSG_CHECKING(disk device prefixes)
2555 dnl Use df to find the mount point for the root filesystem. Use
2556 dnl the positional parameters to find the particular line from df
2557 dnl that contains the root paritition. We put it in a subshell so
2558 dnl that the original positional parameters are not messed with.
2560 df / | while read line; do
2562 while test $# -gt 0; do
2563 if test "$1" = "/"; then
2570 ) | sed 's/(//' | sed 's/)//' `
2572 dnl Search for the mount point by using expr to find the parameter
2576 while test $# -gt 0; do
2577 if expr "$1" : '.*dev' >/dev/null 2>&1; then
2585 if test "$DEV_PREFIX" && test "$RDEV_PREFIX"; then
2586 AC_MSG_RESULT((predefined) $DEV_PREFIX - $RDEV_PREFIX)
2588 if test -d /dev/dsk; then
2589 DEV_PREFIX=/dev/dsk/
2590 if test -d /dev/rdsk; then
2591 RDEV_PREFIX=/dev/rdsk/
2593 RDEV_PREFIX=/dev/dsk/
2595 elif test -d /dev; then
2598 dev_prefix=/dev/dsk/
2599 rdev_prefix=/dev/rdsk/
2600 AC_MSG_WARN("*** Run amsinixfixdevs on Sinix systems using VxFS.")
2605 # Some systems, notably Linux, do not have raw disk devices
2606 # names. Check this by trying to see if a raw disk device name
2607 # exists using the normal raw device path prepended to the
2608 # mount point of the root filesystem.
2609 if test "$mount"; then
2610 dev_name="/dev/r`basename $mount`"
2611 if test -b $dev_name -o -c $dev_name; then
2625 AC_MSG_RESULT($DEV_PREFIX - $RDEV_PREFIX)
2628 AC_DEFINE_UNQUOTED(DEV_PREFIX,"${DEV_PREFIX}",[Define as the prefix for disk devices, commonly /dev/ or /dev/dsk/ ])
2629 AC_DEFINE_UNQUOTED(RDEV_PREFIX,"${RDEV_PREFIX}",[Define as the prefix for raw disk devices, commonly /dev/r or /dev/rdsk/ ])
2633 AC_MSG_WARN("*** Run amhpfixdevs on HP-UX systems using /dev/vg??.")
2637 dnl lock/flock/fcntl
2639 [whether posix fcntl locking works],
2640 amanda_cv_posix_filelocking,
2642 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2644 #define CONFIGURE_TEST
2645 #define USE_POSIX_FCNTL
2646 #include "${srcdir-.}/common-src/amflock.c"
2648 amanda_cv_posix_filelocking=yes
2650 amanda_cv_posix_filelocking="no"
2652 amanda_cv_posix_filelocking="no (cannot run test)"
2654 rm -f /tmp/conftest.lock
2656 if test "$amanda_cv_posix_filelocking" = yes; then
2657 AC_DEFINE(USE_POSIX_FCNTL,1,[Define to use Posix fcntl for file locking.])
2658 HAS_WORKING_FILE_LOCK=1
2661 if test -z "$HAS_WORKING_FILE_LOCK"; then
2663 [whether flock locking works],
2664 amanda_cv_flock_filelocking,
2666 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2668 #define CONFIGURE_TEST
2670 #include "${srcdir-.}/common-src/amflock.c"
2672 amanda_cv_flock_filelocking="yes"
2674 amanda_cv_flock_filelocking="no"
2676 amanda_cv_flock_filelocking="no (cannot run test)"
2678 rm -f /tmp/conftest.lock
2680 if test "$amanda_cv_flock_filelocking" = yes; then
2681 AC_DEFINE(USE_FLOCK,1,[Define to use flock for file locking.])
2682 HAS_WORKING_FILE_LOCK=1
2686 if test -z "$HAS_WORKING_FILE_LOCK"; then
2688 [whether lockf locking works],
2689 amanda_cv_lockf_filelocking,
2691 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2693 #define CONFIGURE_TEST
2695 #include "${srcdir-.}/common-src/amflock.c"
2697 amanda_cv_lockf_filelocking="yes"
2699 amanda_cv_lockf_filelocking="no"
2701 amanda_cv_lockf_filelocking="no (cannot run test)"
2703 rm -f /tmp/conftest.lock
2705 if test "$amanda_cv_lockf_filelocking" = yes; then
2706 AC_DEFINE(USE_LOCKF,1,[Define to use lockf for file locking.])
2707 HAS_WORKING_FILE_LOCK=1
2711 if test -z "$HAS_WORKING_FILE_LOCK"; then
2713 [whether lnlock locking works],
2714 amanda_cv_lnlock_filelocking,
2716 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2718 #define CONFIGURE_TEST
2720 #include "${srcdir-.}/common-src/amflock.c"
2721 #include "${srcdir-.}/common-src/alloc.c"
2722 #include "${srcdir-.}/common-src/error.c"
2723 #include "${srcdir-.}/common-src/snprintf.c"
2725 amanda_cv_lnlock_filelocking="yes"
2727 amanda_cv_lnlock_filelocking="no"
2729 amanda_cv_lnlock_filelocking="no (cannot run test)"
2731 rm -f /tmp/conftest.lock
2733 if test "$amanda_cv_lnlock_filelocking" = yes; then
2734 AC_DEFINE(USE_LNLOCK,1,[Define to use a hard-link based approach for file locking.])
2735 HAS_WORKING_FILE_LOCK=1
2739 if test -z "$HAS_WORKING_FILE_LOCK"; then
2740 AC_MSG_WARN([*** No working file locking capability found!])
2741 AC_MSG_WARN([*** Be VERY VERY careful.])
2744 dnl extra substitution parameters
2751 AM_CONDITIONAL(WANT_CLIENT, test x"$NO_CLIENT_MODE" != x"true")
2752 AM_CONDITIONAL(WANT_SAMBA, test ! -z "$SAMBA_CLIENT")
2753 AM_CONDITIONAL(WANT_RESTORE, test x"$NO_RESTORE_MODE" != x"true")
2754 AM_CONDITIONAL(WANT_SERVER, test x"$NO_SERVER_MODE" != x"true")
2755 AM_CONDITIONAL(WANT_RECOVER, test x"$NO_RECOVER_MODE" != x"true" && test x"$NO_CLIENT_MODE" != x"true")
2756 AM_CONDITIONAL(WANT_TAPE, test x"$NO_SERVER_MODE" != x"true" || test x"$NO_RESTORE_MODE" != x"true")
2757 AM_CONDITIONAL(WANT_AMPLOT, test x"$NO_AMPLOT_MODE" != x"true")
2758 AM_CONDITIONAL(WANT_CHG_SCSI, test x"$NO_SCSI_CHANGER_MODE" != x"true")
2759 AM_CONDITIONAL(WANT_CHIO_SCSI, test x"$NO_CHIO_CHANGER_MODE" != x"true")
2760 AM_CONDITIONAL(WANT_RUNTIME_PSEUDO_RELOC, test x"$NEED_RUNTIME_PSEUDO_RELOC" = x"true")
2761 AM_CONDITIONAL(WANT_SETUID_CLIENT, test x"$NEED_SETUID_CLIENT" != x"false")
2763 case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in
2764 y | ye | yes) AC_DEFINE(USE_RUNDUMP,1,[Define to invoke rundump (setuid-root) instead of DUMP program directly. ]);;
2767 # This is necessary so that .o files in LIBOBJS are also built via
2768 # the ANSI2KNR-filtering rules.
2769 LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
2770 sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
2771 LTLIBOBJS=`echo "$LIB@&t@OBJS" |
2772 sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
2775 LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/g'`
2779 amplot/amcat.awk amplot/amplot.sh \
2782 changer-src/chg-manual.sh changer-src/chg-multi.sh \
2783 changer-src/chg-mtx.sh changer-src/chg-chs.sh \
2784 changer-src/chg-rth.pl changer-src/chg-chio.pl \
2785 changer-src/chg-zd-mtx.sh changer-src/Makefile \
2786 changer-src/chg-juke.sh changer-src/chg-rait.sh \
2787 changer-src/chg-null.sh changer-src/chg-mcutil.sh \
2788 changer-src/chg-disk.sh changer-src/chg-iomega.pl \
2790 client-src/patch-system.sh client-src/Makefile \
2792 common-src/versuff.c common-src/Makefile \
2794 example/amanda.conf example/Makefile \
2795 example/amanda.conf.chg-scsi example/chg-scsi-linux.conf \
2796 example/chg-scsi-solaris.conf example/chg-scsi-hpux.conf \
2797 example/chg-mcutil.conf \
2803 recover-src/Makefile \
2805 restore-src/Makefile \
2807 server-src/amcheckdb.sh server-src/amcleanup.sh \
2808 server-src/amdump.sh server-src/amfreetapes.sh \
2809 server-src/amoverview.pl server-src/amrmtape.sh \
2810 server-src/amtoc.pl server-src/amverify.sh \
2811 server-src/Makefile server-src/amstatus.pl \
2812 server-src/amverifyrun.sh \
2816 config/Makefile Makefile])