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.5p1)
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])
245 if test "x${NO_SERVER_MODE+set}" != xset ; then
250 [ --without-restore do not build amrestore nor amidxtaped],
253 y | ye | yes) NO_RESTORE_MODE=false;;
254 n | no) NO_RESTORE_MODE=true;;
256 AC_MSG_ERROR([*** You must not supply an argument to --with-restore option.])
261 if test "x${NO_RESTORE_MODE+set}" != xset ; then
262 NO_RESTORE_MODE=${NO_SERVER_MODE-false}
265 if ${NO_SERVER_MODE-false}; then
266 if ${NO_RESTORE_MODE-false}; then
268 dnl --without-server and --without-restore is OK
272 AC_MSG_ERROR([*** --without-server requires --without-restore])
276 AC_ARG_WITH(amrecover,
277 [ --without-amrecover do not build amrecover],
281 if ${NO_CLIENT_MODE-false}; then
282 AC_MSG_ERROR([*** --without-client and --with-amrecover are incompatible])
284 NO_RECOVER_MODE=false;;
285 n | no) NO_RECOVER_MODE=true;;
287 AC_MSG_ERROR([*** You must not supply an argument to --with-amrecover option.])
293 AC_ARG_WITH(index-server,
294 [ --with-index-server=HOST default amanda index server [`uname -n`]],
297 "" | y | ye | yes | n | no)
298 AC_MSG_ERROR([*** You must supply an argument to the --with-index-server option.])
300 *) DEFAULT_SERVER="$withval"
304 : ${DEFAULT_SERVER=`uname -n`}
306 AC_DEFINE_UNQUOTED(DEFAULT_SERVER,"$DEFAULT_SERVER",
307 [This is the default Amanda index server. ])
308 AC_SUBST(DEFAULT_SERVER)
310 AC_ARG_WITH(force-uid,
311 [ --without-force-uid do not force the uid to --with-user],
312 FORCE_USERID="$withval",
313 : ${FORCE_USERID=yes}
315 case "$FORCE_USERID" in
316 y | ye | yes) AC_DEFINE(FORCE_USERID, 1,
317 [Define to force to another user on client machines. ])
321 *) AC_MSG_ERROR([*** You must not supply an argument to --with-force-uid option.])
325 [ --with-user=USER force execution to USER on client systems [required]],
328 "" | y | ye | yes | n | no)
329 AC_MSG_ERROR([*** You must supply an argument to the --with-user option.])
331 *) CLIENT_LOGIN="$withval"
336 if test "x${CLIENT_LOGIN+set}" != xset; then
337 AC_MSG_ERROR([*** --with-user=USER is missing])
339 AC_DEFINE_UNQUOTED(CLIENT_LOGIN,"$CLIENT_LOGIN",
340 [Define as a the user to force to on client machines. ])
341 AC_SUBST(CLIENT_LOGIN)
344 [ --with-group=GROUP group allowed to execute setuid-root programs [required]],
347 "" | y | ye | yes | n | no)
348 AC_MSG_ERROR([*** You must supply an argument to the --with-group option.])
350 *) SETUID_GROUP="$withval"
355 if test "x${SETUID_GROUP+set}" != xset; then
356 AC_MSG_ERROR([*** --with-group=GROUP is missing])
358 AC_SUBST(SETUID_GROUP)
361 [ --with-owner=USER force ownership of files to USER [default == --with-user value]],
364 "" | y | ye | yes | n | no)
365 AC_MSG_ERROR([*** You must supply an argument to the --with-owner option.])
367 *) BINARY_OWNER="$withval"
372 if test "x${BINARY_OWNER+set}" != xset ; then
373 BINARY_OWNER=$CLIENT_LOGIN
375 AC_DEFINE_UNQUOTED(BINARY_OWNER,"$BINARY_OWNER",
376 [Define as the user who owns installed binaries. ])
377 AC_SUBST(BINARY_OWNER)
380 [ --with-rundump use rundump (setuid-root) to invoke dump],
383 n | no | y | ye | yes) FORCE_USE_RUNDUMP="$withval";;
384 *) AC_MSG_ERROR([*** You must not supply an argument to --with-rundump option.]);;
390 [ --with-config=CONFIG default configuration [DailySet1]],
393 "" | y | ye | yes | n | no)
394 AC_MSG_ERROR([*** You must supply an argument to the --with-config option.])
396 *) DEFAULT_CONFIG="$withval"
400 : ${DEFAULT_CONFIG=DailySet1}
402 AC_DEFINE_UNQUOTED(DEFAULT_CONFIG,"$DEFAULT_CONFIG",
403 [This is the default Amanda configuration. ])
404 AC_SUBST(DEFAULT_CONFIG)
406 AC_ARG_WITH(tape-server,
407 [ --with-tape-server=HOST default restoring tape server is HOST [same as --with-index-server]],
410 "" | y | ye | yes | n | no)
411 AC_MSG_ERROR([*** You must supply an argument to the --with-tape-server option.])
413 *) DEFAULT_TAPE_SERVER="$withval"
417 : ${DEFAULT_TAPE_SERVER=$DEFAULT_SERVER}
419 AC_DEFINE_UNQUOTED(DEFAULT_TAPE_SERVER,"$DEFAULT_TAPE_SERVER",[This is the default restoring Amanda tape server. ])
420 AC_SUBST(DEFAULT_TAPE_SERVER)
422 AC_ARG_WITH(tape-device,
423 [ --with-tape-device=ARG restoring tape server HOST's no rewinding tape drive],
426 "" | y | ye | yes | n | no)
427 AC_MSG_ERROR([*** You must supply an argument to the --with-tape-device option.])
429 *) DEFAULT_TAPE_DEVICE="$withval"
434 if test -z "$DEFAULT_TAPE_DEVICE"; then
435 AC_MSG_CHECKING(for non-rewinding tape device)
436 dnl Check for the /dev/rmt directory and use what's in there.
437 dnl Otherwise look for tape devices in /dev. For the devices
438 dnl in /dev/rmt, we want to use the Berkeley behavior of
439 dnl reading the first record of the next tape file after 0
440 dnl bytes are returned upon reading to the next tape mark,
441 dnl instead of returning an error. Look for devices that have
442 dnl a 'b' in their name.
444 nr_tape_dev=/dev/null
445 if test -d /dev/rmt; then
447 dnl See if we can find two devices, one being the norewind
448 dnl version of the other. Devices in this directory are
449 dnl normally a digit followed by some characters. We also
450 dnl want the Berkely behavior, since Amanda needs it for
453 for num in 9 8 7 6 5 4 3 2 1 0; do
455 ntd=/dev/rmt/${num}bn
456 if test -r $td -a -r $ntd; then
462 dnl Look for tape devices in /dev.
463 for num in 9 8 7 6 5 4 3 2 1 0; do
466 if test -r $td -a -r $ntd; then
472 DEFAULT_TAPE_DEVICE=$nr_tape_dev
473 AC_MSG_RESULT($DEFAULT_TAPE_DEVICE)
478 if test -z "$DEFAULT_TAPE_DEVICE"; then
479 DEFAULT_TAPE_DEVICE=/dev/null
482 AC_DEFINE_UNQUOTED(DEFAULT_TAPE_DEVICE,"$DEFAULT_TAPE_DEVICE",[This is the default no-rewinding tape device. ])
483 AC_SUBST(DEFAULT_TAPE_DEVICE)
485 AC_ARG_WITH(ftape-raw-device,
486 [ --with-ftape-rawdevice=ARG raw device on tape server HOST's if using Linux ftape >=3.04d],
489 "" | y | ye | yes | n | no)
490 AC_MSG_ERROR([*** You must supply an argument to the --with-ftape-rawdevice option.])
492 *) DEFAULT_RAW_TAPE_DEVICE="$withval"
497 if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
498 AC_MSG_CHECKING(for raw ftape device)
499 dnl Look for tape devices in /dev.
500 raw_tape_dev=/dev/null
501 dnl Look for tape devices in /dev.
502 for num in 3 2 1 0 ; do
508 DEFAULT_RAW_TAPE_DEVICE=$raw_tape_dev
509 AC_MSG_RESULT($DEFAULT_RAW_TAPE_DEVICE)
514 if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
515 DEFAULT_RAW_TAPE_DEVICE=/dev/null
518 AC_DEFINE_UNQUOTED(DEFAULT_RAW_TAPE_DEVICE,"$DEFAULT_RAW_TAPE_DEVICE",[For Linux systems with floppy tapes:
519 * QIC volume table support via raw tape device. ])
520 AC_SUBST(DEFAULT_RAW_TAPE_DEVICE)
522 AC_ARG_WITH(rew-tape,
523 [ --with-rew-tape deprecated, use --with-tape-device],
524 [ AC_MSG_ERROR([*** --with-rew-tape is deprecated, use --with-tape-device instead.])
527 AC_ARG_WITH(norew-tape,
528 [ --with-norew-tape=ARG deprecated, use --with-tape-device],
529 [ AC_MSG_ERROR([*** --with-norew-tape is deprecated, use --with-tape-device instead.])
532 AC_ARG_WITH(changer-device,
533 [ --with-changer-device=ARG default tape changer device [/dev/ch0 if it exists]],
536 "" | y | ye | yes | n | no)
537 AC_MSG_ERROR([*** You must supply an argument to the --with-changer-device option.])
539 *) DEFAULT_CHANGER_DEVICE="$withval"
544 if test -z "$DEFAULT_CHANGER_DEVICE" &&
545 test -f /dev/ch0; then
546 DEFAULT_CHANGER_DEVICE=/dev/ch0
551 if test -z "$DEFAULT_CHANGER_DEVICE"; then
552 DEFAULT_CHANGER_DEVICE=/dev/null
555 AC_DEFINE_UNQUOTED(DEFAULT_CHANGER_DEVICE,"$DEFAULT_CHANGER_DEVICE",[This is the default changer device. ])
556 AC_SUBST(DEFAULT_CHANGER_DEVICE)
559 [ --with-fqdn use FQDN's to backup multiple networks],
565 y | ye | yes) AC_DEFINE(USE_FQDN,1,[Define for backups being done on a multiple networks and FQDNs are used. ])
567 *) AC_MSG_ERROR([*** You must not supply an argument to --with-fqdn option.])
571 AC_ARG_WITH(broken-fsf,
572 [ --with-broken-fsf only enable if tape fsf calls fail mid-file],
573 HAVE_BROKEN_FSF=$withval,
574 : ${HAVE_BROKEN_FSF=no}
576 case "$HAVE_BROKEN_FSF" in
578 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
579 * mark, for instance, if amrecover gives I/O errors when skipping.
582 *) AC_MSG_ERROR([*** You must not supply an argument to --with-broken-fsf option.])
587 [ --with-gnutar[=PROG] use PROG as GNU tar executable [default: looks for one]],
590 /*) GNUTAR="$withval";;
593 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar]);;
599 [ --with-qde use quick-and-dirty estimates for gnutar ],
600 USE_QUICK_AND_DIRTY_ESTIMATES=$withval,
601 : ${USE_QUICK_AND_DIRTY_ESTIMATES=no}
603 case "$USE_QUICK_AND_DIRTY_ESTIMATES" in
604 n | no) : USE_QUICK_AND_DIRTY_ESTIMATES=no;;
605 y | ye | yes) : USE_QUICK_AND_DIRTY_ESTIMATES=yes
606 AC_DEFINE(USE_QUICK_AND_DIRTY_ESTIMATES,1,[ Define if you want to use amqde instead of gnutar for estimates ])
608 *) AC_MSG_ERROR([*** You must not supply an argument to --with-qde option.])
613 AC_ARG_WITH(smbclient,
614 [ --with-smbclient[=PROG] use PROG as Samba's smbclient executable [default: looks for one]],
617 /*) SAMBA_CLIENT="$withval";;
619 n|no) SAMBA_CLIENT="no";;
620 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-smbclient]);;
625 AC_ARG_WITH(samba-user,
626 [ --with-samba-user was deprecated],
627 [ AC_MSG_ERROR([*** The samba-user option was deprecated, the username go in the amandapass])
631 AC_ARG_WITH(gnutar-listdir,
632 [ --with-gnutar-listdir=DIR gnutar directory lists go in DIR [localstatedir/amanda/gnutar-lists]],
635 n | no) unset GNUTAR_LISTDIR ;;
636 y | ye | yes) : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists} ;;
637 /*) GNUTAR_LISTDIR="$withval" ;;
638 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar-listdir])
641 : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists}
643 if test "$GNUTAR_LISTDIR"; then
645 test "x$prefix" = xNONE && prefix=$ac_default_prefix
646 eval echo "$GNUTAR_LISTDIR"
648 AC_DEFINE_UNQUOTED(GNUTAR_LISTED_INCREMENTAL_DIR,"$GNUTAR_LISTDIR",[The directory in which GNU tar should store directory lists for incrementals. ])
649 GNUTAR_LISTED_INCREMENTAL_DIRX=$GNUTAR_LISTDIR
651 GNUTAR_LISTED_INCREMENTAL_DIRX=
653 AC_SUBST(GNUTAR_LISTED_INCREMENTAL_DIRX)
655 AC_ARG_WITH(gnutar-listed-incremental,
656 [ --with-gnutar-listed-incremental was deprecated, use --with-gnutar-listdir],
657 [ AC_MSG_ERROR([*** The gnutar-listed-incremental option was deprecated, use gnutar-listdir instead])
661 AC_ARG_WITH(bsd-security,
662 [ --without-bsd-security do not use BSD rsh/rlogin style security],
663 BSD_SECURITY=$withval,
664 : ${BSD_SECURITY=yes}
666 case "$BSD_SECURITY" in
668 y | ye | yes) AC_DEFINE(BSD_SECURITY,1,[Define to use BSD .rhosts/.amandahosts security. ])
670 *) AC_MSG_ERROR([*** You must not supply an argument to --with-bsd-security option.])
674 AC_ARG_WITH(amandahosts,
675 [ --without-amandahosts use .rhosts instead of .amandahosts],
676 USE_AMANDAHOSTS=$withval,
677 : ${USE_AMANDAHOSTS=yes}
679 case "$USE_AMANDAHOSTS" in
682 case "$BSD_SECURITY" in
683 y | ye | yes) AC_DEFINE(USE_AMANDAHOSTS,1,[Define if you want to use the .amandahosts for BSD security. ])
687 *) AC_MSG_ERROR([*** You must not supply an argument to --with-amandahosts option.])
691 dnl Specify --with-krb4-security if Kerberos software is in somewhere
692 dnl other than the listed KRB4_SPOTS. We only compile kerberos support in
693 dnl if the right files are there.
695 : ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
697 AC_ARG_WITH(krb4-security,
698 [ --with-krb4-security=DIR Location of Kerberos software [/usr/kerberos /usr/cygnus /usr /opt/kerberos]],
699 KRB4_SECURITY="$withval",
700 : ${KRB4_SECURITY=no}
703 case "$KRB4_SECURITY" in
704 n | no) KRB4_SECURITY=no ;;
706 *) KRB4_SPOTS="$KRB4_SECURITY"
711 AC_MSG_CHECKING(for Kerberos and Amanda kerberos4 bits)
712 if test "${KRB4_SECURITY}" = yes -a -f ${srcdir-.}/common-src/krb4-security.c ; then
713 for dir in $KRB4_SPOTS; do
714 if test -f ${dir}/lib/libkrb.a -a -f ${dir}/lib/libdes.a ; then
716 # This is the original Kerberos 4.
718 AC_MSG_RESULT(found in $dir)
720 AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
721 if test -d $dir/include/kerberosIV ; then
723 # This handles BSD/OS.
725 KRB4INCLUDES=-I$dir/include/kerberosIV
727 KRB4INCLUDES=-I$dir/include
729 KRB4LDFLAGS=-L$dir/lib
730 KRB4LIBS="-lkrb -ldes"
731 if test -f ${dir}/lib/libcom_err.a ; then
732 KRB4LIBS="$KRB4LIBS -lcom_err"
734 if test -f ${dir}/lib/libroken.a ; then
735 KRB4LIBS="$KRB4LIBS -lroken"
738 elif test -f ${dir}/lib/libkrb4.a &&
739 test -f ${dir}/lib/libcrypto.a &&
740 test -f ${dir}/lib/libdes425.a ; then
742 # This is Kerberos 5 with Kerberos 4 back-support.
744 AC_MSG_RESULT(found in $dir)
746 AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
747 KRB4INCLUDES="-I$dir/include -I$dir/include/kerberosIV"
748 KRB4LDFLAGS=-L$dir/lib
749 if test -f ${dir}/lib/libkrb5.a &&
750 test -f ${dir}/lib/libcom_err.a; then
751 KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
753 KRB4LIBS="-lkrb4 -lcrypto -ldes425"
756 elif test -f ${dir}/lib/libkrb4.dylib &&
757 test -f ${dir}/lib/libcrypto.dylib &&
758 test -f ${dir}/lib/libdes425.dylib ; then
760 # This is Kerberos 5 with Kerberos 4 back-support for Mac OS X.
762 AC_MSG_RESULT(found in $dir)
764 AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
765 KRB4INCLUDES="-I$dir/include -I$dir/include/kerberosIV"
766 KRB4LDFLAGS=-L$dir/lib
767 if test -f ${dir}/lib/libkrb5.dylib &&
768 test -f ${dir}/lib/libcom_err.dylib; then
769 KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
771 KRB4LIBS="-lkrb4 -lcrypto -ldes425"
777 if test "$KRB4LDFLAGS" = "" ; then
778 AC_MSG_ERROR([*** Kerberos IV not found.])
784 AC_ARG_WITH(server-principal,
785 [ --with-server-principal=ARG server host principal ["amanda"]],
788 "" | y | ye | yes | n | no)
789 AC_MSG_ERROR([*** You must supply an argument to the --with-server-principal option.])
792 SERVER_HOST_PRINCIPLE="$withval"
796 : ${SERVER_HOST_PRINCIPLE="amanda"}
798 AC_DEFINE_UNQUOTED(SERVER_HOST_PRINCIPLE,"$SERVER_HOST_PRINCIPLE",[The Kerberos server principle. ])
800 AC_ARG_WITH(server-instance,
801 [ --with-server-instance=ARG server host instance ["amanda"]],
804 "" | y | ye | yes | n | no)
805 AC_MSG_ERROR([*** You must supply an argument to the --with-server-instance option.])
807 *) SERVER_HOST_INSTANCE="$withval"
811 : ${SERVER_HOST_INSTANCE="amanda"}
813 AC_DEFINE_UNQUOTED(SERVER_HOST_INSTANCE,"$SERVER_HOST_INSTANCE",[The Kerberos server instance. ])
815 AC_ARG_WITH(server-keyfile,
816 [ --with-server-keyfile=ARG server host key file ["/.amanda"]],
819 "" | y | ye | yes | n | no)
820 AC_MSG_ERROR([*** You must supply an argument to the --with-server-keyfile option.])
822 *) SERVER_HOST_KEY_FILE="$withval"
826 : ${SERVER_HOST_KEY_FILE="/.amanda"}
828 AC_DEFINE_UNQUOTED(SERVER_HOST_KEY_FILE,"$SERVER_HOST_KEY_FILE",[The Kerberos server key file. ])
830 AC_ARG_WITH(client-principal,
831 [ --with-client-principal=ARG client host principal ["rcmd"]],
834 "" | y | ye | yes | n | no)
835 AC_MSG_ERROR([*** You must supply an argument to the --with-client-principal option.])
837 *) CLIENT_HOST_PRINCIPLE="$withval"
841 : ${CLIENT_HOST_PRINCIPLE="rcmd"}
843 AC_DEFINE_UNQUOTED(CLIENT_HOST_PRINCIPLE,"$CLIENT_HOST_PRINCIPLE",[The Kerberos client host principle. ])
845 AC_ARG_WITH(client-instance,
846 [ --with-client-instance=ARG client host instance [HOSTNAME_INSTANCE]],
849 "" | y | ye | yes | n | no)
850 AC_MSG_ERROR([*** You must supply an argument to the --with-client-instance option.])
852 *) CLIENT_HOST_INSTANCE="$withval"
856 : ${CLIENT_HOST_INSTANCE=HOSTNAME_INSTANCE}
858 AC_DEFINE_UNQUOTED(CLIENT_HOST_INSTANCE,$CLIENT_HOST_INSTANCE,[The Kerberos client host instance. ])
860 AC_ARG_WITH(client-keyfile,
861 [ --with-client-keyfile=ARG client host key file [KEYFILE]],
864 "" | y | ye | yes | n | no)
865 AC_MSG_ERROR([*** You must supply an argument to the --with-client-keyfile option.])
867 *) CLIENT_HOST_KEY_FILE="$withval"
871 : ${CLIENT_HOST_KEY_FILE=KEYFILE}
874 # Assume it's either KEYFILE (defined in krb.h), or a string filename...
875 if test "$CLIENT_HOST_KEY_FILE" != "KEYFILE"; then
876 CLIENT_HOST_KEY_FILE="\"$CLIENT_HOST_KEY_FILE\""
879 AC_DEFINE_UNQUOTED(CLIENT_HOST_KEY_FILE,$CLIENT_HOST_KEY_FILE,[The Kerberos client host key file. ])
881 AC_ARG_WITH(ticket-lifetime,
882 [ --with-ticket-lifetime=ARG ticket lifetime [128]],
885 "" | y | ye | yes | n | no)
886 AC_MSG_ERROR([*** You must supply an argument to the --with-ticket-lifetime option.])
888 *) TICKET_LIFETIME="$withval"
892 : ${TICKET_LIFETIME=128}
894 AC_DEFINE_UNQUOTED(TICKET_LIFETIME,$TICKET_LIFETIME,[The Kerberos ticket lifetime. ])
897 AC_ARG_WITH(portrange,
898 [ --with-portrange=low,high bind unreserved TCP server sockets to ports within this range [unlimited]],
900 TCPPORTRANGE="$withval"
903 AC_ARG_WITH(tcpportrange,
904 [ --with-tcpportrange=low,high bind unreserved TCP server sockets to ports within this range [unlimited]],
906 TCPPORTRANGE="$withval"
909 if test x"${TCPPORTRANGE+set}" = x"set"; then
910 if test x`echo "$TCPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
911 AC_MSG_ERROR([*** --with-tcpportrange requires two comma-separated positive numbers])
913 min_tcp_port=`echo "$TCPPORTRANGE" | sed 's/,.*//'`
914 max_tcp_port=`echo "$TCPPORTRANGE" | sed 's/.*,//'`
915 if test $min_tcp_port -gt $max_tcp_port; then
916 AC_MSG_ERROR([*** the second TCP port number must be greater than the first in --with-tcpportrange])
918 if test $min_tcp_port -lt 1024; then
919 AC_MSG_WARN([*** the TCP port range should be 1024 or greater in --with-tcpportrange])
921 if test $max_tcp_port -ge 65536; then
922 AC_MSG_WARN([*** the TCP port range should be less than 65536 in --with-tcpportrange])
924 AC_DEFINE_UNQUOTED(TCPPORTRANGE,$TCPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
925 maximum unreserved TCP port numbers sockets should be bound to. ])
928 AC_ARG_WITH(udpportrange,
929 [ --with-udpportrange=low,high bind reserved UDP server sockets to ports within this range [unlimited]],
931 UDPPORTRANGE="$withval"
934 if test x"${UDPPORTRANGE+set}" = x"set"; then
935 if test x`echo "$UDPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
936 AC_MSG_ERROR([*** --with-udpportrange requires two comma-separated positive numbers])
938 min_udp_port=`echo "$UDPPORTRANGE" | sed 's/,.*//'`
939 max_udp_port=`echo "$UDPPORTRANGE" | sed 's/.*,//'`
940 if test $min_udp_port -gt $max_udp_port; then
941 AC_MSG_ERROR([*** the second UDP port number must be greater than the first in --with-udpportrange])
943 if test $max_udp_port -ge 1024; then
944 AC_MSG_WARN([*** the UDP port range should be less than 1024 in --with-udpportrange])
946 if test $min_udp_port -le 0; then
947 AC_MSG_WARN([*** the UDP port range should be greater than 0 in --with-udpportrange])
949 AC_DEFINE_UNQUOTED(UDPPORTRANGE,$UDPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
950 maximum reserved UDP port numbers sockets should be bound to. ])
953 AC_ARG_WITH(maxtapeblocksize,
954 [ --with-maxtapeblocksize=kb Maximum size of a tape block],
956 MAXTAPEBLOCKSIZE="$withval"
958 : ${MAXTAPEBLOCKSIZE=32}
961 AC_DEFINE_UNQUOTED(MAX_TAPE_BLOCK_KB,($MAXTAPEBLOCKSIZE),[Maximum size of a tape block in KBytes.])
962 AC_SUBST(MAXTAPEBLOCKSIZE)
965 [ --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [text]],
968 "" | y | ye | yes | n | no)
969 AC_MSG_ERROR([*** You must supply an argument to the --with-db option.])
971 *) DB_STYLE="$withval"
976 if test "$DB_STYLE"; then
978 db | dbm | gdbm | ndbm | text) ;;
980 AC_MSG_ERROR([*** Unknown argument $DB_STYLE given to --with-db. Choose from db, dbm, gdbm, ndbm, text.])
987 [ --with-mmap force use of mmap instead of shared memory support],
991 case "$FORCE_MMAP" in
992 y | ye | yes | n | no) : ;;
993 *) AC_MSG_ERROR([*** You must not supply an argument to --with-mmap.])
997 AC_ARG_WITH(buffered-dump,
998 [ --with-buffered-dump buffer the dumping sockets on the server for speed],
999 DUMPER_SOCKET_BUFFERING=$withval,
1000 : ${DUMPER_SOCKET_BUFFERING=no}
1002 case "$DUMPER_SOCKET_BUFFERING" in
1005 y | ye | yes) AC_DEFINE(DUMPER_SOCKET_BUFFERING,1,[Define if dumper should buffer the sockets for faster throughput. ])
1007 *) AC_MSG_ERROR([*** You must not supply an argument to --with-buffered-dump.])
1011 AC_ARG_WITH(assertions,
1012 [ --with-assertions compile assertions into code],
1013 ASSERTIONS="$withval",
1016 case "$ASSERTIONS" in
1018 y | ye | yes) AC_DEFINE(ASSERTIONS,1,[Define if you want assertion checking. ])
1020 *) AC_MSG_ERROR([*** You must not supply an argument to --with-assertions option.])
1025 [ --with-tmpdir[=/temp/dir] area Amanda can use for temp files [/tmp/amanda]],
1030 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1031 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1035 n | no) AC_MSG_ERROR([*** --without-tmpdir is not allowed.]);;
1037 AMANDA_TMPDIR="/tmp/amanda";;
1039 AMANDA_TMPDIR="$tmpdir";;
1040 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-tmpdir option.]);;
1042 AC_DEFINE_UNQUOTED(AMANDA_TMPDIR,"$AMANDA_TMPDIR",[The directory in which Amanda should create temporary files. ])
1043 AC_SUBST(AMANDA_TMPDIR)
1045 AC_ARG_WITH(debugging,
1046 [ --with[out]-debugging[=/debug/dir] [do not] record runtime debugging information in specified directory [--with-tmpdir]],
1047 debugging="$withval",
1051 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1052 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1053 eval echo "$debugging"
1055 case "$debugging" in
1056 n | no) AMANDA_DBGDIR="";;
1057 y | ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR" ;;
1058 /*) AMANDA_DBGDIR="$debugging" ;;
1059 *) AC_MSG_ERROR([*** You must supply a full pathname to --with-debugging option.])
1062 case "$AMANDA_DBGDIR" in
1064 *) AC_DEFINE(DEBUG_CODE,1,[Define if you want debugging. ])
1065 AC_DEFINE_UNQUOTED(AMANDA_DBGDIR,"$AMANDA_DBGDIR",[Location of Amanda directories and files. ])
1066 AC_SUBST(AMANDA_DBGDIR);;
1069 AC_ARG_WITH(debug_days,
1070 [ --with-debug-days=NN number of days to keep debugging files [default=4]],
1071 debug_days="$withval",
1074 case "$debug_days" in
1075 n | no) AMANDA_DEBUG_DAYS=0 ;;
1076 y | ye | yes) AMANDA_DEBUG_DAYS=4 ;;
1077 [[0-9]] | [[0-9]][[0-9]] | [[0-9]][[0-9]][[0-9]]) AMANDA_DEBUG_DAYS="$debug_days" ;;
1078 *) AC_MSG_ERROR([*** --with-debug-days value not numeric or out of range.])
1081 AC_DEFINE_UNQUOTED(AMANDA_DEBUG_DAYS,$AMANDA_DEBUG_DAYS,[Number of days to keep debugging files. ])
1082 AC_SUBST(AMANDA_DEBUG_DAYS)
1084 AC_ARG_WITH(testing,
1085 [ --with-testing[=suffix] use alternate service names],
1090 n | no) SERVICE_SUFFIX="";;
1091 y | ye | yes) SERVICE_SUFFIX="-test";;
1092 *) SERVICE_SUFFIX="-$TESTING";;
1094 AMANDA_SERVICE_NAME="amanda$SERVICE_SUFFIX"
1095 KAMANDA_SERVICE_NAME="kamanda$SERVICE_SUFFIX"
1096 AC_SUBST(SERVICE_SUFFIX)
1097 AC_DEFINE_UNQUOTED(SERVICE_SUFFIX, "$SERVICE_SUFFIX",[A suffix that will be appended to service names.
1098 * Useful for testing in parallel with a working version. ])
1099 AC_DEFINE_UNQUOTED(AMANDA_SERVICE_NAME, "$AMANDA_SERVICE_NAME", [The name for the Amanda service. ])
1100 AC_DEFINE_UNQUOTED(KAMANDA_SERVICE_NAME, "$KAMANDA_SERVICE_NAME", [The name for the Kerberized Amanda service. ])
1103 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1104 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1106 tmp=`eval echo "$bindir"`
1107 AC_DEFINE_UNQUOTED(bindir,"$tmp",[Directory in which user binaries should be installed. ])
1109 tmp=`eval echo "$sbindir"`
1110 AC_DEFINE_UNQUOTED(sbindir,"$tmp",[Directory in which administrator binaries should be installed. ])
1112 tmp=`eval echo "$libexecdir"`
1113 AC_DEFINE_UNQUOTED(libexecdir,"$tmp",[Directory in which internal binaries should be installed. ])
1115 tmp=`eval echo $mandir`
1116 AC_DEFINE_UNQUOTED(mandir,"$tmp",[Directory in which man-pages should be installed])
1123 dnl Set the order of dump programs to look for. Finding the proper file
1124 dnl system dumping program is problematic. Some systems, notably HP-UX
1125 dnl and AIX, have both the backup and dump programs. HP-UX can't use the
1126 dnl the backup program while AIX systems can't use the dump program. So
1127 dnl a variable is set up here to specify the order of dump programs to
1128 dnl search for on the system.
1129 DUMP_PROGRAMS="ufsdump dump backup"
1136 AC_DEFINE(STATFS_OSF1,1,[Define on OSF1. ])
1139 DUMP_PROGRAMS="dump "$DUMP_PROGRAMS
1140 : ${USE_RUNDUMP=yes}
1151 GETCONF_LFS="XBS5_ILP32_OFFBIG"
1154 AMANDA_CPPFLAGS="-D__STDC_EXT__ $AMANDA_CPPFLAGS"
1157 AMANDA_CFLAGS="-Ae $AMANDA_CFLAGS"
1162 GETCONF_LFS="XBS5_ILP32_OFFBIG"
1163 DUMP_PROGRAMS="backup "$DUMP_PROGRAMS
1164 AC_DEFINE(AIX_TAPEIO,1,[Define on AIX. ])
1165 AC_DEFINE(AIX_BACKUP,1,[Define on AIX. ])
1167 m88k-motorola-sysv4)
1182 dnl The old cc won't work!
1196 : ${USE_RUNDUMP=yes}
1197 AC_DEFINE(STATFS_ULTRIX,1,[Define on Ultrix. ])
1201 AC_DEFINE(UWARE_TAPEIO,1,[Define on UnixWare. ])
1209 AC_DEFINE(STATFS_SCO_OS5,1,[Define on SCO OS5. ])
1217 AC_DEFINE(IGNORE_TAR_ERRORS,1,[Define on Cygwin. ])
1218 # Cygwin needs PATH to find cygwin1.dll
1219 AC_DEFINE(NEED_PATH_ENV,1,[Define on Cygwin. ])
1220 AC_DEFINE(IGNORE_UID_CHECK,1,[Define on Cygwin. ])
1221 AC_DEFINE(IGNORE_FSTAB,1,[Define on Cygwin. ])
1222 AC_DEFINE(DONT_SUID_ROOT,1,[Define on Cygwin. ])
1223 NEED_SETUID_CLIENT=false
1224 NEED_RUNTIME_PSEUDO_RELOC=true
1230 This machine, target type $target, is not known
1231 to be fully supported by this configure script. If the
1232 installation of Amanda on this system succeeds or needed
1233 any patches, please email amanda-hackers@amanda.org with
1234 the patches or an indication of the sucess or failure of
1235 the Amanda installation on your system.
1242 if test -n "$dump_returns_1"; then
1243 AC_DEFINE(DUMP_RETURNS_1,1,[Define this if this system's dump exits with 1 as a success code. ])
1246 if test -n "$xenix_tapeio"; then
1247 AC_DEFINE(XENIX_TAPEIO,1,[Define on XENIX/ISC. ])
1250 AMANDA_CFLAGS="$AMANDA_CFLAGS $KRB4INCLUDES"
1251 AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS $KRB4INCLUDES"
1252 AMANDA_LDFLAGS="$AMANDA_LDFLAGS $KRB4LDFLAGS"
1253 AMANDA_LIBS="$KRB4LIBS $AMANDA_LIBS"
1254 CFLAGS="$CFLAGS $AMANDA_CFLAGS"
1255 CPPFLAGS="$CPPFLAGS $AMANDA_CPPFLAGS"
1256 LDFLAGS="$LDFLAGS $AMANDA_LDFLAGS"
1257 LIBS="$AMANDA_LIBS $LIBS"
1260 dnl This specifies the flag for mt that tells mt the proper tape drive
1262 : ${MT_FILE_FLAG="-f"}
1263 AC_SUBST(MT_FILE_FLAG)
1264 AC_DEFINE_UNQUOTED(MT_FILE_FLAG, "$MT_FILE_FLAG",[Defined to the switch to be used when invoking mt to specify the
1267 AX_CREATE_STDINT_H(common-src/amanda-int.h)
1269 dnl Check for programs.
1270 AC_PATH_PROGS(AR,ar,,$LOCSYSPATH)
1274 if test "$amanda_cv_awk_var_assignment" = no; then
1276 AC_MSG_WARN([*** Your $awk cannot do command line variable assignment. Amplot will not be installed.])
1280 AC_PATH_PROGS(CAT,cat,,$LOCSYSPATH)
1281 if test -z "$CAT"; then
1284 AC_PATH_PROGS(COMPRESS,compress,,$LOCSYSPATH)
1285 AC_PATH_PROGS(DD,dd,,$LOCSYSPATH)
1286 AC_PATH_PROGS(EGREP,egrep,,$LOCSYSPATH)
1287 AC_PATH_PROGS(GETCONF,getconf,,$SYSPATH)
1289 AC_PATH_PROGS(GNUPLOT,gnuplot,,$LOCSYSPATH)
1290 if test -z "$GNUPLOT"; then
1292 AC_MSG_WARN([*** You do not have gnuplot. Amplot will not be installed.])
1295 AC_PATH_PROGS(GREP,grep,,$LOCSYSPATH)
1296 if test -z "$GREP"; then
1299 AC_DEFINE_UNQUOTED(GREP,"$GREP",[Define the location of the grep program. ])
1301 AC_PATH_PROGS(GNUTAR,gtar gnutar tar,,$LOCSYSPATH)
1302 if test ! -z "$GNUTAR"; then
1303 case "`\"$GNUTAR\" --version 2>&1`" in
1304 *GNU*tar* | *Free*paxutils* )
1305 AC_DEFINE_UNQUOTED(GNUTAR,"$GNUTAR",[Define to the location of Gnu tar. ])
1308 AC_MSG_WARN([*** $GNUTAR is not GNU tar, so it will not be used.])
1314 if test "x$SAMBA_CLIENT" != "xno"
1315 then AC_PATH_PROGS(SAMBA_CLIENT,smbclient,,$LOCSYSPATH)
1318 if test ! -z "$SAMBA_CLIENT"; then
1319 case "`\"$SAMBA_CLIENT\" '\\\\not.a.host.name\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in
1323 *"Connection to not.a.host.name failed"*)
1327 AC_MSG_WARN([*** $SAMBA_CLIENT does not seem to be smbclient, so it will not be used.])
1331 if test -n "$SAMBA_CLIENT"; then
1332 AC_DEFINE_UNQUOTED(SAMBA_CLIENT,"$SAMBA_CLIENT",[Define the location of smbclient for backing up Samba PC clients. ])
1333 AC_DEFINE_UNQUOTED(SAMBA_VERSION, $smbversion,
1334 [Not the actual samba version, just a number that should be increased whenever we start to rely on a new samba feature. ])
1340 AC_PATH_PROGS(GZIP,gzip,,$LOCSYSPATH)
1341 if test "$GZIP"; then
1342 AC_DEFINE(HAVE_GZIP,1,[Define if Amanda is using the gzip program. ])
1343 COMPRESS_PATH="$GZIP"
1344 COMPRESS_SUFFIX=".gz"
1345 COMPRESS_FAST_OPT="--fast"
1346 COMPRESS_BEST_OPT="--best"
1347 UNCOMPRESS_PATH="$GZIP"
1348 UNCOMPRESS_OPT="-dc"
1350 if test "$COMPRESS"; then
1351 COMPRESS_PATH="$COMPRESS"
1352 COMPRESS_SUFFIX=".Z"
1353 COMPRESS_FAST_OPT="-f"
1354 COMPRESS_BEST_OPT="-f"
1355 UNCOMPRESS_PATH="$COMPRESS"
1356 UNCOMPRESS_OPT="-dc"
1358 dnl If we have to use cat, we don't define COMPRESS_FAST_OPT,
1359 dnl COMPRESS_BEST_OPT, or UNCOMPRESS_OPT as "" since cat will look
1360 dnl look for a file by the name of "".
1361 AC_MSG_WARN([*** Cannot find either gzip or compress. Using cat. ***])
1362 COMPRESS_PATH="$CAT"
1364 COMPRESS_FAST_OPT=""
1365 COMPRESS_BEST_OPT=""
1366 UNCOMPRESS_PATH="$CAT"
1370 AC_DEFINE_UNQUOTED(COMPRESS_PATH,"$COMPRESS_PATH",[Define to the exact path to the gzip or the compress program. ])
1371 AC_DEFINE_UNQUOTED(COMPRESS_SUFFIX,"$COMPRESS_SUFFIX",[Define to the suffix for the COMPRESS_PATH compression program. ])
1372 AC_DEFINE_UNQUOTED(COMPRESS_FAST_OPT,"$COMPRESS_FAST_OPT",[Define as the command line option for fast compression. ])
1373 AC_DEFINE_UNQUOTED(COMPRESS_BEST_OPT,"$COMPRESS_BEST_OPT",[Define as the command line option for best compression. ])
1374 AC_DEFINE_UNQUOTED(UNCOMPRESS_PATH,"$UNCOMPRESS_PATH",[Define as the exact path to the gzip or compress command. ])
1375 AC_DEFINE_UNQUOTED(UNCOMPRESS_OPT,"$UNCOMPRESS_OPT",[Define as any optional arguments to get UNCOMPRESS_PATH to uncompress. ])
1377 AC_PATH_PROGS(MAILER,Mail mailx mail)
1378 if test -z "$MAILER"; then
1379 if $NO_SERVER_MODE; then
1381 AC_MSG_WARN([*** WARNING: Amanda cannot send mail reports without these programs.])
1383 AC_MSG_ERROR([Set MAILER to some program that accepts -s subject user < message_file.])
1386 AC_DEFINE_UNQUOTED(MAILER,"$MAILER",[Define to a program that understands -s "subject" user < message_file])
1388 AC_PATH_PROGS(MT,mt,mt,$LOCSYSPATH)
1390 AC_PATH_PROGS(CHIO,chio,chio,$LOCSYSPATH)
1392 AC_PATH_PROGS(CHS,chs,chs,$LOCSYSPATH)
1394 AC_PATH_PROGS(MTX,mtx,mtx,$LOCSYSPATH)
1396 AC_PATH_PROGS(MCUTIL,mcutil,mcutil,$LOCSYSPATH)
1398 AC_PATH_PROGS(PRINT, lpr lp)
1399 if test ! -z "$PRINT"; then
1400 AC_DEFINE_UNQUOTED(LPRCMD, "$PRINT",[Command for starting printing jobs. ])
1401 AC_CACHE_CHECK([which flag to use to select a printer],
1402 amanda_cv_printer_flag, [
1403 amanda_cv_printer_flag=$PRINTER_FLAG
1405 lpr|*/lpr) amanda_cv_printer_flag="-P";;
1406 lp|*/lp) amanda_cv_printer_flag="-d";;
1409 if test ! -z "$amanda_cv_printer_flag"; then
1410 AC_DEFINE_UNQUOTED(LPRFLAG, "$amanda_cv_printer_flag",[LPRCMD switch for specifying a printer name. ])
1412 AC_MSG_WARN([*** WARNING: amanda will always print to the default printer])
1416 AC_PATH_PROGS(PCAT,pcat,,$LOCSYSPATH)
1417 AC_PATH_PROGS(PERL,perl5 perl,,$LOCSYSPATH)
1419 dnl AC_PATH_PROGS(MAKEINFO,makeinfo,,$LOCSYSPATH)
1420 dnl AC_PATH_PROGS(TEXI2DVI,texi2dvi,,$LOCSYSPATH)
1422 AC_PATH_PROGS(DUMP,$DUMP_PROGRAMS,,$SYSLOCPATH)
1423 AC_PATH_PROGS(RESTORE,ufsrestore restore,,$SYSLOCPATH)
1424 if test "$DUMP" -a "$RESTORE"; then
1425 AC_DEFINE_UNQUOTED(DUMP,"$DUMP",[Define the location of the ufsdump, backup, or dump program. ])
1426 AC_DEFINE_UNQUOTED(RESTORE,"$RESTORE",[Define the location of the ufsrestore or restore program. ])
1427 if test -x $DUMP; then
1429 [whether $DUMP supports -E or -S for estimates],
1430 amanda_cv_dump_estimate,
1434 AC_TRY_COMMAND($DUMP 9Ef /dev/null /dev/null/invalid/fs 2>&1
1437 | $GREP -v Label >conftest.d-E 2>&1)
1438 cat conftest.d-E >&AS_MESSAGE_LOG_FD()
1439 AC_TRY_COMMAND($DUMP 9Sf /dev/null /dev/null/invalid/fs 2>&1
1442 | $GREP -v Label >conftest.d-S 2>&1)
1443 cat conftest.d-S >&AS_MESSAGE_LOG_FD()
1444 AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
1447 | $GREP -v Label >conftest.d 2>&1)
1448 cat conftest.d >&AS_MESSAGE_LOG_FD()
1449 if AC_TRY_COMMAND(cmp conftest.d-E conftest.d 1>&2); then
1450 amanda_cv_dump_estimate=E
1451 elif AC_TRY_COMMAND(cmp conftest.d-S conftest.d 1>&2); then
1452 amanda_cv_dump_estimate=S
1454 amanda_cv_dump_estimate=no
1456 rm -f conftest.d conftest.d-E conftest.d-S
1458 *) amanda_cv_dump_estimate=no
1463 AC_MSG_WARN([*** $DUMP is not executable, cannot run -E/-S test])
1464 amanda_cv_dump_estimate=no
1466 if test "$amanda_cv_dump_estimate" != no; then
1467 AC_DEFINE_UNQUOTED(HAVE_DUMP_ESTIMATE, "$amanda_cv_dump_estimate",[Define to the string that enables dump estimates. ])
1470 AC_ARG_WITH(dump-honor-nodump,
1471 [ --with-dump-honor-nodump if dump supports -h, use it for level0s too],
1472 [ if test -x $DUMP; then
1474 [whether $DUMP supports -h (honor nodump flag)],
1475 amanda_cv_honor_nodump,
1479 AC_TRY_COMMAND($DUMP 9hf 0 /dev/null /dev/null/invalid/fs 2>&1
1482 | $GREP -v Label >conftest.d-h 2>&1)
1483 cat conftest.d-h >&AS_MESSAGE_LOG_FD()
1484 AC_TRY_COMMAND($DUMP 9f /dev/null /dev/null/invalid/fs 2>&1
1487 | $GREP -v Label >conftest.d 2>&1)
1488 cat conftest.d >&AS_MESSAGE_LOG_FD()
1489 if AC_TRY_COMMAND(diff conftest.d-h conftest.d 1>&2); then
1490 amanda_cv_honor_nodump=yes
1492 amanda_cv_honor_nodump=no
1494 rm -f conftest.d conftest.d-h
1496 *) amanda_cv_honor_nodump=no
1501 AC_MSG_WARN([*** $DUMP is not executable, cannot run -h test])
1502 amanda_cv_honor_nodump=no
1504 if test "$amanda_cv_honor_nodump" = yes; then
1505 AC_DEFINE(HAVE_HONOR_NODUMP,1,[Define this if dump accepts -h for honoring nodump. ])
1510 AC_PATH_PROGS(XFSDUMP,xfsdump,,$SYSLOCPATH)
1511 AC_PATH_PROGS(XFSRESTORE,xfsrestore,,$SYSLOCPATH)
1512 if test "$XFSDUMP" -a "$XFSRESTORE"; then
1513 AC_DEFINE_UNQUOTED(XFSDUMP,"$XFSDUMP",[Define the location of the xfsdump program on Irix hosts. ])
1514 AC_DEFINE_UNQUOTED(XFSRESTORE,"$XFSRESTORE",[Define the location of the xfsrestore program on Irix hosts. ])
1515 AC_MSG_WARN([*** xfsdump causes the setuid-root rundump program to be enabled])
1516 AC_MSG_WARN([[*** to disable it, just #undef XFSDUMP in config/config.h]])
1519 VXSYSLOCPATH="$SYSLOCPATH:/usr/lib/fs/vxfs"
1520 AC_PATH_PROGS(VXDUMP,vxdump,,$VXSYSLOCPATH)
1521 AC_PATH_PROGS(VXRESTORE,vxrestore,,$VXSYSLOCPATH)
1522 if test "$VXDUMP" -a "$VXRESTORE"; then
1523 AC_DEFINE_UNQUOTED(VXDUMP,"$VXDUMP",[Define the location of the vxdump program on HPUX and SINIX hosts or on
1524 * other hosts where the Veritas filesystem (vxfs) has been installed. ])
1525 AC_DEFINE_UNQUOTED(VXRESTORE,"$VXRESTORE",[Define the location of the vxrestore program on HPUX and SINIX hosts or on
1526 * other hosts where the Veritas filesystem (vxfs) has been installed. ])
1529 AC_PATH_PROGS(VDUMP,vdump,,$SYSLOCPATH)
1530 AC_PATH_PROGS(VRESTORE,vrestore,,$SYSLOCPATH)
1531 if test "$VDUMP" -a "$VRESTORE"; then
1532 AC_DEFINE_UNQUOTED(VDUMP,"$VDUMP",[Define the location of the vdump program. ])
1533 AC_DEFINE_UNQUOTED(VRESTORE,"$VRESTORE",[Define the location of the vrestore program. ])
1536 dnl Handle all of the substitutions to make amplot work.
1537 if test "$PCAT"; then
1538 AMPLOT_CAT_PACK="if(o==\"z\")print \"$PCAT\"; else"
1542 if test "$COMPRESS"; then
1543 AMPLOT_COMPRESS=$COMPRESS
1544 AMPLOT_CAT_COMPRESS="if(o==\"Z\")print \"$COMPRESS -dc\"; else"
1546 AMPLOT_CAT_COMPRESS=
1548 if test "$GZIP"; then
1549 AMPLOT_COMPRESS=$GZIP
1550 AMPLOT_CAT_GZIP="if(o==\"gz\")print \"$GZIP -dc\"; else"
1554 AC_SUBST(AMPLOT_COMPRESS)
1555 AC_SUBST(AMPLOT_CAT_GZIP)
1556 AC_SUBST(AMPLOT_CAT_COMPRESS)
1557 AC_SUBST(AMPLOT_CAT_PACK)
1559 dnl Empty GZIP so that make dist works.
1562 dnl Checks for compilers, typedefs, structures, and compiler characteristics.
1563 dnl Check for large file compilation environment.
1566 [for large file compilation CFLAGS],
1567 amanda_cv_LFS_CFLAGS,
1569 amanda_cv_LFS_CFLAGS=
1570 if test "$GETCONF"; then
1571 if $GETCONF ${GETCONF_LFS}_CFLAGS >/dev/null 2>&1; then
1572 amanda_cv_LFS_CFLAGS=`$GETCONF ${GETCONF_LFS}_CFLAGS 2>/dev/null`
1579 [for large file compilation LDFLAGS],
1580 amanda_cv_LFS_LDFLAGS,
1582 amanda_cv_LFS_LDFLAGS=
1583 if test "$GETCONF"; then
1584 if $GETCONF ${GETCONF_LFS}_LDFLAGS >/dev/null 2>&1; then
1585 amanda_cv_LFS_LDFLAGS=`$GETCONF ${GETCONF_LFS}_LDFLAGS 2>/dev/null`
1592 [for large file compilation LIBS],
1596 if test "$GETCONF"; then
1597 if $GETCONF ${GETCONF_LFS}_LIBS >/dev/null 2>&1; then
1598 amanda_cv_LFS_LIBS=`$GETCONF ${GETCONF_LFS}_LIBS 2>/dev/null`
1604 if test "$need_resetofs" = yes; then
1605 AC_DEFINE(NEED_RESETOFS,1,[Define if we have to reset tape offsets when reacing 2GB. ])
1607 CFLAGS="$amanda_cv_LFS_CFLAGS $CFLAGS"
1608 CPPFLAGS="$amanda_cv_LFS_CFLAGS $CPPFLAGS"
1609 LDFLAGS="$amanda_cv_LFS_LDFLAGS $LDFLAGS"
1610 LIBS="$amanda_cv_LFS_LIBS $LIBS"
1613 AC_SUBST(LIBTOOL_DEPS)
1615 AC_PROG_GCC_TRADITIONAL
1618 AMANDA_C_UNSIGNED_LONG_CONSTANTS
1623 dnl We don't have an acconfig.h template since we moved all define templates
1624 dnl into the third argument of AC_DEFINE. However, AC_CHECK_TYPE calls
1625 dnl AC_DEFINE without such an argument, so autoheader complains about no
1626 dnl template being available. This is an ugly work-around.
1628 pushdef([AC_DEFINE_SAVED],defn([AC_DEFINE]))
1629 pushdef([AC_DEFINE],[AC_DEFINE_SAVED([$1],[$2],[Define to $2 if $1 is not defined])])
1631 AC_CHECK_TYPE(ssize_t, int)
1633 dnl there is a push to avoid depending on long longs, so in general it's
1634 dnl better to convert numbers to kilobytes for consistancies sake. This
1635 dnl is primarily checked for for client-src/amqde.c
1636 AC_CHECK_TYPES(unsigned long long)
1639 popdef([AC_DEFINE_SAVED])
1641 dnl End ugly AC_CHECK_TYPE work-around.
1648 dnl AC_CHECK_TYPE does not work for socklen_t because it does not look
1649 dnl in <sys/socket.h>, so this is a variant that adds another header.
1650 AC_DEFUN([AMANDA_CHECK_TYPE],
1651 [AC_REQUIRE([AC_HEADER_STDC])dnl
1652 AC_MSG_CHECKING(for $1)
1653 AC_CACHE_VAL(ac_cv_type_$1,
1655 changequote(<<,>>)dnl
1656 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
1657 changequote([,]), [#include <sys/types.h>
1662 #include <$3>], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
1663 AC_MSG_RESULT($ac_cv_type_$1)
1664 if test $ac_cv_type_$1 = no; then
1665 AC_DEFINE($1, $2, [Define if $1 is not a standard system type])
1668 AMANDA_CHECK_TYPE(socklen_t, int, sys/socket.h)
1670 dnl Checks for header files.
1680 cam/scsi/scsi_message.h \
1696 netinet/in_systm.h \
1698 readline/history.h \
1699 readline/readline.h \
1719 sys/scsi/impl/uscsi.h \
1720 sys/scsi/scsi/ioctl.h \
1736 AC_CHECK_HEADERS(netinet/ip.h,,,
1737 [[#include <sys/socket.h>
1738 #if HAVE_SYS_TYPES_H
1739 #include <sys/types.h>
1741 #ifdef HAVE_NETINET_IN_SYSTM_H
1742 #include <netinet/in_systm.h>
1744 #include <netinet/in.h>
1747 AC_CHECK_HEADERS(sys/mount.h,,,
1748 [[#ifdef HAVE_SYS_PARAM_H
1749 #include <sys/param.h>
1753 NO_SCSI_CHANGER_MODE=true
1754 NO_CHIO_CHANGER_MODE=true
1761 if test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
1762 AC_CACHE_CHECK([for HP/UX-like scsi changer support],
1763 amanda_cv_hpux_scsi_chio,
1764 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1765 #include <sys/scsi.h>
1767 static struct element_addresses changer_info;
1768 int i = SIOC_ELEMENT_ADDRESSES;
1769 int j = SIOC_ELEMENT_STATUS;
1770 int k = SIOC_MOVE_MEDIUM;
1771 ]])],[amanda_cv_hpux_scsi_chio=yes],[amanda_cv_hpux_scsi_chio=no])])
1772 if test x"$amanda_cv_hpux_scsi_chio" = x"yes"; then
1773 AC_DEFINE(HAVE_HPUX_SCSI_CHIO,1,[Define to enable HPUX chio based changer support. ])
1774 NO_SCSI_CHANGER_MODE=false
1779 dnl Linux SCSI based on ioctl
1781 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1782 test x"$ac_cv_header_scsi_scsi_ioctl_h" = x"yes"; then
1783 AC_CACHE_CHECK([for Linux like scsi support (ioctl)],
1784 amanda_cv_linux_scsi,
1785 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1786 #include <scsi/scsi_ioctl.h>
1787 #include <sys/mtio.h>
1791 ioctl(device, SCSI_IOCTL_SEND_COMMAND, Command);
1792 ]])],[amanda_cv_linux_scsi=yes],[amanda_cv_linux_scsi=no])])
1796 dnl Linux SCSI based on sg
1798 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1799 test x"$ac_cv_header_scsi_sg_h" = x"yes"; then
1800 AC_CACHE_CHECK([for Linux like scsi support (sg)],
1801 amanda_cv_linux_sg_scsi,
1802 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1803 #include <sys/types.h>
1804 #include <scsi/sg.h>
1805 #include <sys/mtio.h>
1808 struct sg_header *psg_header;
1810 write(device, buffer, 1);
1811 ]])],[amanda_cv_linux_sg_scsi=yes],[amanda_cv_linux_sg_scsi=no])])
1814 if test x"$amanda_cv_linux_scsi" = x"yes" ||
1815 test x"$amanda_cv_linux_sg_scsi" = x"yes";then
1816 AC_DEFINE(HAVE_LINUX_LIKE_SCSI,1,[Define to enable Linux tape-changer support.])
1817 NO_SCSI_CHANGER_MODE=false
1823 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1824 test x"$ac_cv_header_sys_scsi_h" = x"yes"; then
1825 AC_CACHE_CHECK([for HP-UX like scsi support],
1826 amanda_cv_hpux_scsi,
1827 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1829 #include <sys/ioctl.h>
1830 #include <sys/scsi.h>
1831 #include <sys/mtio.h>
1835 ioctl(device, SIOC_IO, Command);
1836 ]])],[amanda_cv_hpux_scsi=yes],[amanda_cv_hpux_scsi=no])])
1837 if test x"$amanda_cv_hpux_scsi" = x"yes";then
1838 AC_DEFINE(HAVE_HPUX_LIKE_SCSI,1,[Define to enable HPUX tape-changer support. ])
1839 NO_SCSI_CHANGER_MODE=false
1840 NO_CHIO_CHANGER_MODE=false
1847 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1848 test x"$ac_cv_header_sys_dsreq_h" = x"yes"; then
1849 AC_CACHE_CHECK([for Irix like scsi support],
1850 amanda_cv_irix_scsi,
1851 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1852 #include <sys/types.h>
1853 #include <sys/dsreq.h>
1854 #include <sys/mtio.h>
1858 ioctl(device, DS_ENTER, &Command);
1859 ]])],[amanda_cv_irix_scsi=yes],[amanda_cv_irix_scsi=no])])
1860 if test x"$amanda_cv_irix_scsi" = x"yes";then
1861 AC_DEFINE(HAVE_IRIX_LIKE_SCSI,1,[Define to enable IRIX tape-changer support])
1862 NO_SCSI_CHANGER_MODE=false
1869 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1870 test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then
1871 AC_CACHE_CHECK([for Solaris like scsi support],
1872 amanda_cv_solaris_scsi,
1873 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1874 #include <sys/types.h>
1875 #include <sys/scsi/impl/uscsi.h>
1876 #include <sys/mtio.h>
1880 ioctl(device, USCSICMD, Command);
1881 ]])],[amanda_cv_solaris_scsi=yes],[amanda_cv_solaris_scsi=no])])
1882 if test x"$amanda_cv_solaris_scsi" = x"yes";then
1883 AC_DEFINE(HAVE_SOLARIS_LIKE_SCSI,1,[Define to enable Solaris tape-changer support])
1884 NO_SCSI_CHANGER_MODE=false
1891 if test x"$ac_cv_header_sys_tape_h" = x"yes" &&
1892 test x"$ac_cv_header_sys_scarray_h" = x"yes" &&
1893 test x"$ac_cv_header_sys_gscdds_h" = x"yes"; then
1894 AC_CACHE_CHECK([for AIX like scsi support],
1896 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1897 #include <sys/types.h>
1898 #include <sys/scarray.h>
1899 #include <sys/tape.h>
1903 ioctl(device, STIOCMD, Command);
1904 ]])],[amanda_cv_aix_scsi=yes],[amanda_cv_aix_scsi=no])])
1905 if test x"$amanda_cv_aix_scsi" = x"yes";then
1906 AC_DEFINE(HAVE_AIX_LIKE_SCSI,1,[Define to enable AIX tape-changer support])
1907 NO_SCSI_CHANGER_MODE=false
1913 if test x"$ac_cv_header_cam_cam_h" = x"yes";then
1914 AC_CACHE_CHECK([for CAM like scsi support],
1916 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1919 # include <cam/cam.h>
1920 # include <cam/cam_ccb.h>
1921 # include <cam/scsi/scsi_message.h>
1922 # include <cam/scsi/scsi_pass.h>
1923 # include <camlib.h>
1925 struct cam_device *curdev;
1927 curdev = cam_open_pass("", O_RDWR, NULL);
1928 ]])],[amanda_cv_cam_scsi=yes],[amanda_cv_cam_scsi=no])])
1929 if test x"$amanda_cv_cam_scsi" = x"yes";then
1930 AC_DEFINE(HAVE_CAM_LIKE_SCSI,1,[Define to enable CAM tape-changer support])
1931 NO_SCSI_CHANGER_MODE=false
1932 AC_CHECK_LIB(cam,main)
1939 if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
1940 test x"$ac_cv_header_sys_scsiio_h" = x"yes"; then
1941 AC_CACHE_CHECK([for BSD like scsi support],
1943 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1944 #include <sys/types.h>
1945 #include <sys/scsiio.h>
1946 #include <sys/mtio.h>
1950 ioctl(device, SCIOCCOMMAND, &Command);
1951 ]])],[amanda_cv_bsd_scsi=yes],[amanda_cv_bsd_scsi=no])])
1952 if test x"$amanda_cv_bsd_scsi" = x"yes";then
1953 AC_DEFINE(HAVE_BSD_LIKE_SCSI,1,[Define to enable BSD tape-changer support])
1954 NO_SCSI_CHANGER_MODE=false
1958 dnl Do not build chg-scsi-chio if we cannot find the needed support
1959 dnl include files for the SCSI interfaces
1960 dnl chio.h and sys/chio.h are chio based systems
1961 if test x"$ac_cv_header_chio_h" = x"yes" ||
1962 test x"$ac_cv_header_sys_chio_h" = x"yes"; then
1963 dnl chg-scsi does not support FreeBSD 3.0's chio.h; it became backward
1964 dnl incompatible with the introduction of camlib.h
1965 if test x"$ac_cv_header_camlib_h" != x"yes"; then
1966 if $NO_SCSI_CHANGER_MODE; then
1967 NO_SCSI_CHANGER_MODE=false
1969 NO_CHIO_CHANGER_MODE=false
1974 dnl cur_colr is on some HP's
1975 AC_CHECK_LIB(cur_colr,main)
1977 AC_CHECK_LIB(intl,main)
1979 dnl Make sure we don't use -lnsl and -lsun on Irix systems.
1982 AC_CHECK_LIB(socket,main)
1985 AC_CHECK_LIB(nsl,main)
1986 AC_CHECK_LIB(socket,main)
1987 AC_CHECK_LIB(sun,main)
1991 AC_CHECK_LIB(termcap,tgetent)
1992 if test "$ac_cv_lib_termcap_tgetent" != yes; then
1993 AC_CHECK_LIB(curses,tgetent)
1994 if test "$ac_cv_lib_curses_tgetent" != yes; then
1995 AC_CHECK_LIB(ncurses,tgetent)
1998 if test "$ac_cv_lib_termcap_tgetent" = yes ||
1999 test "$ac_cv_lib_curses_tgetent" = yes ||
2000 test "$ac_cv_lib_ncurses_tgetent" = yes; then
2001 AC_CHECK_LIB(readline,readline)
2002 if test "$ac_cv_lib_readline_readline" != yes; then
2003 AC_MSG_WARN([*** No readline library, no history and command line editing in amrecover!])
2006 AC_MSG_WARN([*** No terminal library, no history and command line editing in amrecover!])
2009 if test "$ac_cv_lib_readline_readline" = yes; then
2010 READLINE_LIBS=-lreadline
2011 LIBS=`echo $LIBS | sed s/-lreadline//`
2012 AC_SUBST(READLINE_LIBS)
2015 if test "$ac_cv_header_linux_zftape_h" = yes; then
2016 if test "$ac_cv_header_vtblc_h" = yes; then
2017 AC_CHECK_LIB(vtblc,main)
2018 if test "$ac_cv_lib_vtblc_main" != yes; then
2019 AC_MSG_WARN([*** vtblc library not found - no QIC volume table support!])
2022 AC_MSG_WARN([*** vtblc headers not found - no QIC volume table support!])
2026 AC_CHECK_LIB(m,modf)
2028 dnl Check for various "mt status" related structure elements.
2030 AC_MSG_CHECKING(for mt_flags mtget structure element)
2031 mt_flags_result="found"
2032 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2034 #include <sys/types.h>
2035 #include <sys/mtio.h>
2041 ]])],[AC_DEFINE(HAVE_MT_FLAGS,1,Define if the mtget structure has an mt_flags field)],[mt_flags_result="not found"])
2042 AC_MSG_RESULT($mt_flags_result)
2044 AC_MSG_CHECKING(for mt_fileno mtget structure element)
2045 mt_fileno_result="found"
2046 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2048 #include <sys/types.h>
2049 #include <sys/mtio.h>
2055 ]])],[AC_DEFINE(HAVE_MT_FILENO,1,Define if the mtget structure has an mt_fileno field)],[mt_fileno_result="not found"])
2056 AC_MSG_RESULT($mt_fileno_result)
2058 AC_MSG_CHECKING(for mt_blkno mtget structure element)
2059 mt_blkno_result="found"
2060 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2062 #include <sys/types.h>
2063 #include <sys/mtio.h>
2069 ]])],[AC_DEFINE(HAVE_MT_BLKNO,1,Define if the mtget structure has an mt_blkno field)],[mt_blkno_result="not found"])
2070 AC_MSG_RESULT($mt_blkno_result)
2072 AC_MSG_CHECKING(for mt_dsreg mtget structure element)
2073 mt_dsreg_result="found"
2074 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2076 #include <sys/types.h>
2077 #include <sys/mtio.h>
2083 ]])],[AC_DEFINE(HAVE_MT_DSREG,1,Define if the mtget structure has an mt_dsreg field)],[mt_dsreg_result="not found"])
2084 AC_MSG_RESULT($mt_dsreg_result)
2086 AC_MSG_CHECKING(for mt_erreg mtget structure element)
2087 mt_erreg_result="found"
2088 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2090 #include <sys/types.h>
2091 #include <sys/mtio.h>
2097 ]])],[AC_DEFINE(HAVE_MT_ERREG,1,Define if the mtget structure has an mt_erreg field)],[mt_erreg_result="not found"])
2098 AC_MSG_RESULT($mt_erreg_result)
2102 dnl Check if the system does support the user requested database library.
2103 dnl Begin by checking for the header file. If it is not there, then do
2104 dnl not use the library. If the header file is there, then try to link
2105 dnl against the library. If it's not there, then try to link using
2106 dnl just the -lc library. If the link against -lc fails, then do not
2107 dnl use this library.
2111 dnl Testing if libc contains the dbm_open routine is tested for a
2112 dnl lot of times below. We do it once here now.
2114 AC_CHECK_LIB(c,dbm_open)
2119 if test "$ac_cv_header_db_h" = yes; then
2120 AC_CHECK_LIB(db,main)
2121 if test "$ac_cv_lib_db_main" = yes; then
2122 AC_CHECK_LIB(db,dbm_open)
2123 if test "$ac_cv_lib_db_dbm_open" = yes; then
2128 AC_MSG_WARN([*** db database library requested but dbm_open not found in -ldb.])
2131 if test "$ac_cv_lib_c_dbm_open" = yes; then
2136 AC_MSG_WARN([*** db library requested but -ldb doesn't exist and dbm_open cannot be found.])
2141 AC_MSG_WARN([*** db database library requested but db.h not found.])
2146 if test "$ac_cv_header_dbm_h" = yes; then
2147 AC_CHECK_LIB(dbm,main)
2148 if test "$ac_cv_lib_dbm_main" = yes; then
2149 AC_CHECK_LIB(dbm,dbm_open)
2150 if test "$ac_cv_lib_dbm_dbm_open" = yes; then
2155 AC_MSG_WARN([*** dbm database library requested but dbm_open not found in -ldbm.])
2158 if test "$ac_cv_lib_c_dbm_open" = yes; then
2163 AC_MSG_WARN([*** dbm library requested but -ldbm doesn't exist and dbm_open cannot be found.])
2168 AC_MSG_WARN([*** dbm database library requested but dbm.h not found.])
2173 if test "$ac_cv_header_ndbm_h" = yes; then
2174 AC_CHECK_LIB(gdbm,main)
2175 if test "$ac_cv_lib_gdbm_main" = yes; then
2176 AC_CHECK_LIB(gdbm,dbm_open)
2177 if test "$ac_cv_lib_gdbm_dbm_open" = yes; then
2182 AC_MSG_WARN([*** gdbm database library requested but -lgdbm not found.])
2185 if test "$ac_cv_lib_c_dbm_open" = yes; then
2190 AC_MSG_WARN([*** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found.])
2195 AC_MSG_WARN([*** gdbm database library requested but ndbm.h not found.])
2200 if test "$ac_cv_header_ndbm_h" = yes; then
2201 AC_CHECK_LIB(ndbm,main)
2202 if test "$ac_cv_lib_ndbm_main" = yes; then
2203 AC_CHECK_LIB(ndbm,dbm_open)
2204 if test "$ac_cv_lib_ndbm_dbm_open" = yes; then
2209 AC_MSG_WARN([*** ndbm database library requested but -lndbm not found.])
2212 if test "$ac_cv_lib_c_dbm_open" = yes; then
2217 AC_MSG_WARN([*** ndbm library requested but -lndbm doesn't exist and dbm_open cannot be found.])
2222 AC_MSG_WARN([*** ndbm database library requested but ndbm.h not found.])
2231 dnl If a database style was not specified select an appropriate one
2233 dnl Nowadays we default to our own internal text database, but I have left
2234 dnl the code that does the testing here just in case it is needed one day.
2236 if test -z "$DB_STYLE"; then
2242 dnl if test -z "$DB_STYLE" -a "$ac_cv_header_ndbm_h" = yes; then
2243 dnl AC_CHECK_LIB(ndbm,dbm_open)
2244 dnl if test "$ac_cv_lib_ndbm_dbm_open" = yes; then
2246 dnl DB_HEADER=ndbm.h
2248 dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
2250 dnl DB_HEADER=ndbm.h
2255 dnl if test -z "$DB_STYLE" -a "$ac_cv_header_db_h" = yes; then
2256 dnl AC_CHECK_LIB(db,dbm_open)
2257 dnl if test "$ac_cv_lib_db_dbm_open" = yes; then
2261 dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
2268 dnl if test -z "$DB_STYLE" -a "$ac_cv_header_dbm_h" = yes; then
2269 dnl AC_CHECK_LIB(dbm,dbm_open)
2270 dnl if test "$ac_cv_lib_db_dbm_open" = yes; then
2274 dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
2281 dnl if test -z "$DB_STYLE" -a "$ac_cv_header_ndbm_h" = yes; then
2282 dnl AC_CHECK_LIB(gdbm,dbm_open)
2283 dnl if test "$ac_cv_lib_gdbm_dbm_open" = yes; then
2285 dnl DB_HEADER=ndbm.h
2287 dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
2289 dnl DB_HEADER=ndbm.h
2294 dnl if test -z "$DB_STYLE"; then
2295 dnl if test "$ac_cv_lib_c_dbm_open" = yes; then
2296 dnl AC_MSG_WARN([*** A dbm_open() routine was found in -lc, but no header])
2297 dnl AC_MSG_WARN([*** files exist. Please remedy the situation.])
2299 dnl AC_MSG_WARN([*** No dbm_open() routine found!])
2301 dnl AC_MSG_WARN([*** You may want to install the gdbm library from])
2302 dnl AC_MSG_WARN([*** ftp://prep.ai.mit.edu/pub/gnu/gdbm-1.7.3.tar.gz.])
2304 dnl AC_MSG_WARN([*** Using the built-in text database.])
2310 if test "$DB_STYLE" = text; then
2311 AC_DEFINE(TEXTDB,1,[Define to enable the text-based database format. ])
2313 AC_MSG_CHECKING([for database])
2314 AC_MSG_RESULT([header is $DB_HEADER, linking against -l$DB_LIB])
2316 db) AC_DEFINE(USE_DB_H,1,[Define to enable db databases. ]) ;;
2317 dbm) AC_DEFINE(USE_DBM_H,1,[Define to enable dbm databases. ]) ;;
2318 gdbm) AC_DEFINE(USE_GDBM_H,1,[Define to enable gdbm databases. ]) ;;
2319 ndbm) AC_DEFINE(USE_NDBM_H,1,[Define to enable ndbm databases. ]) ;;
2323 [for struct datum declared in header files],
2324 amanda_cv_struct_datum,
2326 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2327 #if defined(USE_DB_H)
2330 # if defined(USE_DBM_H)
2333 # if defined(USE_NDBM_H)
2340 ]])],[amanda_cv_struct_datum=yes],[amanda_cv_struct_datum=no
2343 if test "$amanda_cv_struct_datum" = yes; then
2344 AC_DEFINE(HAVE_STRUCT_DATUM,1,[Define if the database header declares struct datum. ])
2351 dbm | ndbm) DB_EXT=".dir .pag";;
2357 AC_CACHE_CHECK(whether _POSIX2_RE_DUP_MAX is defined,
2358 amanda_cv_have__posix2_re_dup_max,
2361 #ifdef _POSIX2_RE_DUP_MAX
2364 ], amanda_cv_have__posix2_re_dup_max=yes, amanda_cv_have__posix2_re_dup_max=no))
2365 if test "$amanda_cv_have__posix2_re_dup_max" = yes; then
2366 AC_DEFINE(HAVE__POSIX2_RE_DUP_MAX,1,[Define if limits.h defines _POSIX2_RE_DUP_MAX. ])
2369 AC_CACHE_CHECK(whether CHAR_MIN is defined,
2370 amanda_cv_have_char_min,
2376 ], amanda_cv_have_char_min=yes, amanda_cv_have_char_min=no))
2377 if test "$amanda_cv_have_char_min" = yes; then
2378 AC_DEFINE(HAVE_CHAR_MIN,1,[Define if limits.h defines CHAR_MIN. ])
2381 AC_CACHE_CHECK(whether CHAR_MAX is defined,
2382 amanda_cv_have_char_max,
2388 ], amanda_cv_have_char_max=yes, amanda_cv_have_char_max=no))
2389 if test "$amanda_cv_have_char_max" = yes; then
2390 AC_DEFINE(HAVE_CHAR_MAX,1,[Define if limits.h defines CHAR_MAX. ])
2393 AC_CACHE_CHECK(whether CHAR_BIT is defined,
2394 amanda_cv_have_char_bit,
2400 ], amanda_cv_have_char_bit=yes, amanda_cv_have_char_bit=no))
2401 if test "$amanda_cv_have_char_bit" = yes; then
2402 AC_DEFINE(HAVE_CHAR_BIT,1,[Define if limits.h defines CHAR_BIT. ])
2405 dnl Checks for library functions and if the function is declared in
2406 dnl an appropriate header file. Add some of the missing functions
2408 ICE_CHECK_DECL(accept,sys/types.h sys/socket.h)
2410 AC_CHECK_FUNCS(atexit)
2411 ICE_CHECK_DECL(atof,stdlib.h)
2412 AC_CHECK_FUNCS(basename)
2413 ICE_CHECK_DECL(bind,sys/types.h sys/socket.h)
2414 ICE_CHECK_DECL(bcopy,string.h strings.h stdlib.h)
2415 ICE_CHECK_DECL(bzero,string.h strings.h stdlib.h)
2416 AC_FUNC_CLOSEDIR_VOID
2417 ICE_CHECK_DECL(closelog,syslog.h)
2418 ICE_CHECK_DECL(connect,sys/types.h sys/socket.h)
2419 ICE_CHECK_DECL(dbm_open,${DB_HEADER-no/db/header/file})
2420 AC_CHECK_FUNCS(endmntent)
2421 ICE_CHECK_DECL(fclose,stdio.h)
2422 ICE_CHECK_DECL(fflush,stdio.h)
2423 ICE_CHECK_DECL(flock,sys/file.h)
2424 ICE_CHECK_DECL(fprintf,stdio.h)
2425 ICE_CHECK_DECL(fputc,stdio.h)
2426 ICE_CHECK_DECL(fputs,stdio.h)
2427 ICE_CHECK_DECL(fread,stdio.h stdlib.h)
2428 ICE_CHECK_DECL(fseek,stdio.h)
2429 ICE_CHECK_DECL(fwrite,stdio.h stdlib.h)
2430 AC_REPLACE_FUNCS(getcwd)
2431 AC_CHECK_FUNCS(getfsent)
2432 ICE_CHECK_DECL(gethostname,unistd.h)
2434 ICE_CHECK_DECL(getopt,stdlib.h unistd.h libc.h)
2435 ICE_CHECK_DECL(getpeername,sys/types.h sys/socket.h)
2436 AC_CHECK_FUNCS(getpgrp)
2438 ICE_CHECK_DECL(getsockname,sys/types.h sys/socket.h)
2439 ICE_CHECK_DECL(getsockopt,sys/types.h sys/socket.h)
2440 ICE_CHECK_DECL(gettimeofday,time.h sys/time.h)
2441 AMANDA_FUNC_GETTIMEOFDAY_ARGS
2442 AC_CHECK_FUNCS(getvfsent initgroups isascii)
2443 ICE_CHECK_DECL(initgroups,grp.h sys/types.h unistd.h libc.h)
2444 ICE_CHECK_DECL(ioctl,sys/ioctl.h unistd.h libc.h)
2445 ICE_CHECK_DECL(listen,sys/types.h sys/socket.h)
2446 ICE_CHECK_DECL(lstat,sys/types.h sys/stat.h)
2447 ICE_CHECK_DECL(malloc,stdlib.h)
2448 AC_REPLACE_FUNCS(memmove)
2449 ICE_CHECK_DECL(memmove,string.h strings.h)
2450 ICE_CHECK_DECL(memset,string.h strings.h)
2451 AC_CHECK_FUNCS(mkdir)
2452 ICE_CHECK_DECL(mktemp,stdlib.h)
2453 AC_REPLACE_FUNCS(mktime)
2454 ICE_CHECK_DECL(mktime,time.h sys/time.h)
2456 dnl atexit() is prefered, sunos (maybe others?) define on_exit
2457 AC_CHECK_FUNCS(on_exit)
2458 ICE_CHECK_DECL(openlog,syslog.h)
2459 ICE_CHECK_DECL(pclose,stdio.h)
2460 ICE_CHECK_DECL(perror,stdio.h)
2461 ICE_CHECK_DECL(printf,stdio.h)
2462 AC_CHECK_FUNCS(putenv)
2463 ICE_CHECK_DECL(puts,stdio.h)
2464 ICE_CHECK_DECL(realloc,stdlib.h)
2465 ICE_CHECK_DECL(recvfrom,sys/types.h sys/socket.h)
2466 ICE_CHECK_DECL(remove,stdio.h)
2467 ICE_CHECK_DECL(rename,stdio.h)
2468 ICE_CHECK_DECL(rewind,stdio.h)
2469 AC_CHECK_FUNCS(rmdir)
2470 ICE_CHECK_DECL(ruserok,netdb.h sys/socket.h libc.h unistd.h)
2471 ICE_CHECK_DECL(select,sys/types.h sys/socket.h sys/select.h time.h sys/time.h)
2472 AMANDA_FUNC_SELECT_ARG_TYPE
2473 ICE_CHECK_DECL(sendto,sys/types.h sys/socket.h)
2474 ICE_CHECK_DECL(setegid,unistd.h)
2475 ICE_CHECK_DECL(seteuid,unistd.h)
2476 AC_CHECK_FUNCS(setmntent)
2477 ICE_CHECK_DECL(setresgid,unistd.h)
2478 ICE_CHECK_DECL(setresuid,unistd.h)
2480 dnl arguments for setpgrp or not
2481 AC_CHECK_FUNC(setpgid, [
2482 AC_DEFINE(HAVE_SETPGID,1,[Define if setpgid() is available. ])
2483 ICE_CHECK_DECL(setpgid,sys/types.h unistd.h)
2485 AC_CHECK_FUNC(setpgrp,[AC_FUNC_SETPGRP])
2486 ICE_CHECK_DECL(setpgrp,sys/types.h unistd.h libc.h)
2488 ICE_CHECK_DECL(setsockopt,sys/types.h sys/socket.h)
2490 AC_CHECK_FUNCS(shmget,
2492 AMANDA_FUNC_SHM_ARG_TYPE
2493 case "$FORCE_MMAP" in
2495 AC_DEFINE(HAVE_SYSVSHM,1,[Define if SysV shared-memory functions are available. ])
2500 ICE_CHECK_DECL(shmat,sys/types.h sys/ipc.h sys/shm.h)
2501 ICE_CHECK_DECL(shmctl,sys/types.h sys/ipc.h sys/shm.h)
2502 ICE_CHECK_DECL(shmdt,sys/types.h sys/ipc.h sys/shm.h)
2503 ICE_CHECK_DECL(shmget,sys/types.h sys/ipc.h sys/shm.h)
2505 if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
2506 case "$FORCE_MMAP" in
2508 if test "$ac_cv_func_shmget" != yes; then
2509 AC_MSG_WARN([*** Neither shmget() nor mmap() found!])
2510 AC_MSG_WARN([*** This system will not support the Amanda server.])
2515 AC_MSG_WARN([*** --with-mmap used on a system with no mmap() support!])
2516 AC_MSG_WARN([*** This system will not support the Amanda server.])
2522 ICE_CHECK_DECL(shquote, stdlib.h)
2524 dnl Some systems have snprintf but not vsnprintf. If either snprintf or
2525 dnl vsnprintf are missing, then use the snprintf.c we provide.
2526 ICE_CHECK_DECL(snprintf,stdio.h)
2527 ICE_CHECK_DECL(vsnprintf,stdio.h)
2528 if test x"$ice_have_snprintf" != x"yes" ||
2529 test x"$ice_have_vsnprintf" != x"yes"; then
2530 AC_LIBOBJ([snprintf])
2532 dnl so that automake includes snprintf.c in the distribution
2533 AC_REPLACE_FUNCS(snprintf)
2537 AC_CHECK_FUNCS(sigaction sigemptyset sigvec)
2538 ICE_CHECK_DECL(socket,sys/types.h sys/socket.h)
2539 ICE_CHECK_DECL(socketpair,sys/types.h sys/socket.h)
2540 ICE_CHECK_DECL(sscanf,stdio.h)
2541 AC_CHECK_FUNCS(statfs statvfs)
2542 AC_REPLACE_FUNCS(strerror)
2543 ICE_CHECK_DECL(strerror,string.h strings.h)
2545 AC_REPLACE_FUNCS(strftime)
2546 ICE_CHECK_DECL(strftime,time.h sys/time.h)
2547 AC_REPLACE_FUNCS(strncasecmp)
2548 ICE_CHECK_DECL(strncasecmp,string.h strings.h)
2549 AC_REPLACE_FUNCS(strstr)
2550 ICE_CHECK_DECL(syslog,syslog.h)
2551 ICE_CHECK_DECL(system,stdlib.h)
2552 ICE_CHECK_DECL(time,time.h sys/time.h)
2553 ICE_CHECK_DECL(tolower,ctype.h)
2554 ICE_CHECK_DECL(toupper,ctype.h)
2555 ICE_CHECK_DECL(ungetc,stdio.h)
2557 ICE_CHECK_DECL(vfprintf,stdio.h stdlib.h)
2558 ICE_CHECK_DECL(vprintf,stdio.h stdlib.h)
2559 ICE_CHECK_DECL(vsprintf,stdio.h stdlib.h)
2560 AC_CHECK_FUNC(wait4)
2561 AC_REPLACE_FUNCS(waitpid)
2562 AC_REPLACE_FUNCS(strcasecmp)
2563 ICE_CHECK_DECL(strcasecmp,string.h strings.h)
2565 AC_CHECK_FUNCS(fnmatch)
2567 if test "$ac_cv_func_fnmatch" != yes -a "$USE_QUICK_AND_DIRTY_ESTIMATES" != yes ; then
2568 AC_MSG_WARN([--with-qde and no fnmatch -- gnutar exclude files will not work])
2571 dnl disk device prefixes
2572 AC_MSG_CHECKING(disk device prefixes)
2573 dnl Use df to find the mount point for the root filesystem. Use
2574 dnl the positional parameters to find the particular line from df
2575 dnl that contains the root paritition. We put it in a subshell so
2576 dnl that the original positional parameters are not messed with.
2578 df / | while read line; do
2580 while test $# -gt 0; do
2581 if test "$1" = "/"; then
2588 ) | sed 's/(//' | sed 's/)//' `
2590 dnl Search for the mount point by using expr to find the parameter
2594 while test $# -gt 0; do
2595 if expr "$1" : '.*dev' >/dev/null 2>&1; then
2603 if test "$DEV_PREFIX" && test "$RDEV_PREFIX"; then
2604 AC_MSG_RESULT((predefined) $DEV_PREFIX - $RDEV_PREFIX)
2606 if test -d /dev/dsk; then
2607 DEV_PREFIX=/dev/dsk/
2608 if test -d /dev/rdsk; then
2609 RDEV_PREFIX=/dev/rdsk/
2611 RDEV_PREFIX=/dev/dsk/
2613 elif test -d /dev; then
2616 dev_prefix=/dev/dsk/
2617 rdev_prefix=/dev/rdsk/
2618 AC_MSG_WARN("*** Run amsinixfixdevs on Sinix systems using VxFS.")
2623 # Some systems, notably Linux, do not have raw disk devices
2624 # names. Check this by trying to see if a raw disk device name
2625 # exists using the normal raw device path prepended to the
2626 # mount point of the root filesystem.
2627 if test "$mount"; then
2628 dev_name="/dev/r`basename $mount`"
2629 if test -b $dev_name -o -c $dev_name; then
2643 AC_MSG_RESULT($DEV_PREFIX - $RDEV_PREFIX)
2646 AC_DEFINE_UNQUOTED(DEV_PREFIX,"${DEV_PREFIX}",[Define as the prefix for disk devices, commonly /dev/ or /dev/dsk/ ])
2647 AC_DEFINE_UNQUOTED(RDEV_PREFIX,"${RDEV_PREFIX}",[Define as the prefix for raw disk devices, commonly /dev/r or /dev/rdsk/ ])
2651 AC_MSG_WARN("*** Run amhpfixdevs on HP-UX systems using /dev/vg??.")
2655 dnl lock/flock/fcntl
2657 [whether posix fcntl locking works],
2658 amanda_cv_posix_filelocking,
2660 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2662 #define CONFIGURE_TEST
2663 #define USE_POSIX_FCNTL
2664 #include "${srcdir-.}/common-src/amflock.c"
2666 amanda_cv_posix_filelocking=yes
2668 amanda_cv_posix_filelocking="no"
2670 amanda_cv_posix_filelocking="no (cannot run test)"
2672 rm -f /tmp/conftest.lock
2674 if test "$amanda_cv_posix_filelocking" = yes; then
2675 AC_DEFINE(USE_POSIX_FCNTL,1,[Define to use Posix fcntl for file locking.])
2676 HAS_WORKING_FILE_LOCK=1
2679 if test -z "$HAS_WORKING_FILE_LOCK"; then
2681 [whether flock locking works],
2682 amanda_cv_flock_filelocking,
2684 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2686 #define CONFIGURE_TEST
2688 #include "${srcdir-.}/common-src/amflock.c"
2690 amanda_cv_flock_filelocking="yes"
2692 amanda_cv_flock_filelocking="no"
2694 amanda_cv_flock_filelocking="no (cannot run test)"
2696 rm -f /tmp/conftest.lock
2698 if test "$amanda_cv_flock_filelocking" = yes; then
2699 AC_DEFINE(USE_FLOCK,1,[Define to use flock for file locking.])
2700 HAS_WORKING_FILE_LOCK=1
2704 if test -z "$HAS_WORKING_FILE_LOCK"; then
2706 [whether lockf locking works],
2707 amanda_cv_lockf_filelocking,
2709 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2711 #define CONFIGURE_TEST
2713 #include "${srcdir-.}/common-src/amflock.c"
2715 amanda_cv_lockf_filelocking="yes"
2717 amanda_cv_lockf_filelocking="no"
2719 amanda_cv_lockf_filelocking="no (cannot run test)"
2721 rm -f /tmp/conftest.lock
2723 if test "$amanda_cv_lockf_filelocking" = yes; then
2724 AC_DEFINE(USE_LOCKF,1,[Define to use lockf for file locking.])
2725 HAS_WORKING_FILE_LOCK=1
2729 if test -z "$HAS_WORKING_FILE_LOCK"; then
2731 [whether lnlock locking works],
2732 amanda_cv_lnlock_filelocking,
2734 AC_RUN_IFELSE([AC_LANG_SOURCE([[
2736 #define CONFIGURE_TEST
2738 #include "${srcdir-.}/common-src/amflock.c"
2739 #include "${srcdir-.}/common-src/alloc.c"
2740 #include "${srcdir-.}/common-src/error.c"
2741 #include "${srcdir-.}/common-src/snprintf.c"
2743 amanda_cv_lnlock_filelocking="yes"
2745 amanda_cv_lnlock_filelocking="no"
2747 amanda_cv_lnlock_filelocking="no (cannot run test)"
2749 rm -f /tmp/conftest.lock
2751 if test "$amanda_cv_lnlock_filelocking" = yes; then
2752 AC_DEFINE(USE_LNLOCK,1,[Define to use a hard-link based approach for file locking.])
2753 HAS_WORKING_FILE_LOCK=1
2757 if test -z "$HAS_WORKING_FILE_LOCK"; then
2758 AC_MSG_WARN([*** No working file locking capability found!])
2759 AC_MSG_WARN([*** Be VERY VERY careful.])
2762 dnl extra substitution parameters
2769 AM_CONDITIONAL(WANT_CLIENT, test x"$NO_CLIENT_MODE" != x"true")
2770 AM_CONDITIONAL(WANT_SAMBA, test ! -z "$SAMBA_CLIENT")
2771 AM_CONDITIONAL(WANT_RESTORE, test x"$NO_RESTORE_MODE" != x"true")
2772 AM_CONDITIONAL(WANT_SERVER, test x"$NO_SERVER_MODE" != x"true")
2773 AM_CONDITIONAL(WANT_RECOVER, test x"$NO_RECOVER_MODE" != x"true" && test x"$NO_CLIENT_MODE" != x"true")
2774 AM_CONDITIONAL(WANT_TAPE, test x"$NO_SERVER_MODE" != x"true" || test x"$NO_RESTORE_MODE" != x"true")
2775 AM_CONDITIONAL(WANT_AMPLOT, test x"$NO_AMPLOT_MODE" != x"true")
2776 AM_CONDITIONAL(WANT_CHG_SCSI, test x"$NO_SCSI_CHANGER_MODE" != x"true")
2777 AM_CONDITIONAL(WANT_CHIO_SCSI, test x"$NO_CHIO_CHANGER_MODE" != x"true")
2778 AM_CONDITIONAL(WANT_RUNTIME_PSEUDO_RELOC, test x"$NEED_RUNTIME_PSEUDO_RELOC" = x"true")
2779 AM_CONDITIONAL(WANT_SETUID_CLIENT, test x"$NEED_SETUID_CLIENT" != x"false")
2781 case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in
2782 y | ye | yes) AC_DEFINE(USE_RUNDUMP,1,[Define to invoke rundump (setuid-root) instead of DUMP program directly. ]);;
2785 # This is necessary so that .o files in LIBOBJS are also built via
2786 # the ANSI2KNR-filtering rules.
2787 LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
2788 sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
2789 LTLIBOBJS=`echo "$LIB@&t@OBJS" |
2790 sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
2793 LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/g'`
2797 amplot/amcat.awk amplot/amplot.sh \
2800 changer-src/chg-manual.sh changer-src/chg-multi.sh \
2801 changer-src/chg-mtx.sh changer-src/chg-chs.sh \
2802 changer-src/chg-rth.pl changer-src/chg-chio.pl \
2803 changer-src/chg-zd-mtx.sh changer-src/Makefile \
2804 changer-src/chg-juke.sh changer-src/chg-rait.sh \
2805 changer-src/chg-null.sh changer-src/chg-mcutil.sh \
2806 changer-src/chg-disk.sh changer-src/chg-iomega.pl \
2808 client-src/patch-system.sh client-src/Makefile \
2810 common-src/versuff.c common-src/Makefile \
2812 example/amanda.conf example/Makefile \
2813 example/amanda.conf.chg-scsi example/chg-scsi-linux.conf \
2814 example/chg-scsi-solaris.conf example/chg-scsi-hpux.conf \
2815 example/chg-mcutil.conf \
2821 recover-src/Makefile \
2823 restore-src/Makefile \
2825 server-src/amcheckdb.sh server-src/amcleanup.sh \
2826 server-src/amdump.sh server-src/amfreetapes.sh \
2827 server-src/amoverview.pl server-src/amrmtape.sh \
2828 server-src/amtoc.pl server-src/amverify.sh \
2829 server-src/Makefile server-src/amstatus.pl \
2830 server-src/amverifyrun.sh \
2834 config/Makefile Makefile])