-dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([common-src/amanda.h])
[Saves the original ./configure command line arguments])
AC_SUBST(CONFIGURE_COMMAND)
-AM_INIT_AUTOMAKE(amanda, 2.4.5)
+AM_INIT_AUTOMAKE(amanda, 2.5.1p1)
AM_CONFIG_HEADER(config/config.h)
-AC_PREREQ(2.59) dnl Minimum Autoconf version required.
+AC_PREREQ(2.57) dnl Minimum Autoconf version required.
if test -f "$srcdir/SNAPSHOT"; then
cat < "$srcdir/SNAPSHOT"
AC_SUBST(VERSION_SUFFIX)
dnl
-dnl runtime and compile time
+dnl runtime and compile time paths
dnl
-SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd:/etc:/usr/etc"
+SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/opt/SUNWspro/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc"
LOCPATH=`(
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
- eval echo "$libexecdir:$PATH:/usr/local/sbin:/usr/local/bin"
+ eval echo "$libexecdir:$PATH:/usr/local/sbin:/usr/local/bin:/usr/ccs/bin"
)`
SYSLOCPATH="$SYSPATH:$LOCPATH"
LOCSYSPATH="$LOCPATH:$SYSPATH"
+dnl
+dnl Set up compiler location, basic CFLAGS, and include locations
+dnl and library locations before we start checking the system
+dnl configuration in more detail...
+dnl
+
+AC_ARG_WITH(cflags,
+ [ --with-cflags=CFLAGS arguments to the c compiler (-Wall, -g, etc)],
+ [
+ case "$withval" in
+ "" | y | ye | yes | n | no)
+ AC_MSG_ERROR([*** You must supply an argument to the --with-cflags option.])
+ ;;
+ esac
+ CFLAGS="$withval"
+ ])
+
+CFLAGS="-D_GNU_SOURCE $CFLAGS"
+
+AC_PROG_CC
+AC_OBJEXT
+AC_EXEEXT
+AC_SYS_LARGEFILE
+
+dnl
+dnl Process tool locations for tools we need right away to configure.
+dnl
+AC_PATH_PROGS(GREP,grep,,$LOCSYSPATH)
+if test -z "$GREP"; then
+ GREP=grep
+fi
+AC_DEFINE_UNQUOTED(GREP,"$GREP",[Define the location of the grep program. ])
+AC_PATH_PROGS(EGREP,egrep,,$LOCSYSPATH)
+
+AC_PATH_PROGS(AMLINT,lint,,/opt/SUNWspro/bin:$SYSLOCPATH)
+if test ! -z "$AMLINT"; then
+ $AMLINT -flags | $GREP -- '-errfmt=' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AMLINTFLAGS="-n -s -u -m -x"
+ AMLINTFLAGS="$AMLINTFLAGS -errchk=%all"
+ AMLINTFLAGS="$AMLINTFLAGS -errfmt=macro"
+ AMLINTFLAGS="$AMLINTFLAGS -errhdr=no%/usr/include"
+ AMLINTFLAGS="$AMLINTFLAGS -errhdr=%user"
+ AMLINTFLAGS="$AMLINTFLAGS -errsecurity=extended"
+ AMLINTFLAGS="$AMLINTFLAGS -errtags=yes"
+ AMLINTFLAGS="$AMLINTFLAGS -Ncheck=%all"
+ AMLINTFLAGS="$AMLINTFLAGS -Nlevel=2"
+ AMLINTFLAGS="$AMLINTFLAGS -erroff=E_ASGN_NEVER_USED"
+ AMLINTFLAGS="$AMLINTFLAGS,E_ASGN_RESET"
+ AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_CONST_TO_SMALL_INT"
+ AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_TO_SMALL_INT"
+ AMLINTFLAGS="$AMLINTFLAGS,E_CAST_UINT_TO_SIGNED_INT"
+ AMLINTFLAGS="$AMLINTFLAGS,E_CONSTANT_CONDITION"
+ AMLINTFLAGS="$AMLINTFLAGS,E_ENUM_UNUSE"
+ AMLINTFLAGS="$AMLINTFLAGS,E_EXPR_NULL_EFFECT"
+ AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_ALWAYS_IGNOR"
+ AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_MAYBE_IGNORED"
+ AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK0"
+ AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK1"
+ AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK2"
+ AMLINTFLAGS="$AMLINTFLAGS,E_INCL_MNUSD"
+ AMLINTFLAGS="$AMLINTFLAGS,E_INCL_NUSD"
+ AMLINTFLAGS="$AMLINTFLAGS,E_MCR_NODIFF"
+ AMLINTFLAGS="$AMLINTFLAGS,E_NAME_MULTIPLY_DEF"
+ AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_NULL_PSBL"
+ AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_SUSP"
+ AMLINTFLAGS="$AMLINTFLAGS,E_PTRDIFF_OVERFLOW"
+ AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_NULL_PSBL"
+ AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_SUSP"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_ACCESS_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHDIR_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHMOD_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CREAT_WITHOUT_EXCL"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_PATH"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_FOPEN_MODE"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_GETENV_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_MKDIR_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_PRINTF_VAR_FMT"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_RAND_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SCANF_VAR_FMT"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SELECT_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SHELL_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_STRNCPY_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_UMASK_WARN"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SEC_USE_AFTER_STAT"
+ AMLINTFLAGS="$AMLINTFLAGS,E_SIGN_EXTENSION_PSBL"
+ AMLINTFLAGS="$AMLINTFLAGS,E_TYPEDEF_UNUSE"
+ AMLINTFLAGS="$AMLINTFLAGS,E_UNCAL_F"
+ else
+ AMLINTFLAGS=""
+ fi
+else
+ AC_PATH_PROGS(AMLINT,splint,,$SYSLOCPATH)
+ if test ! -z "$AMLINT"; then
+ AMLINT="splint"
+ fi
+ AMLINTFLAGS='+show-scan +unixlib -weak -globs +usedef +usereleased +impouts -paramimptemp -varuse -warnposix -redef -preproc -fixedformalarray -retval -unrecog -usevarargs -formatcode'
+fi
+AC_SUBST(AMLINTFLAGS)
+
AC_ARG_WITH(includes,
[ --with-includes=DIR site header files for readline, etc in DIR],
[
for dir in $LIBRARY_DIRS; do
if test -d "$dir"; then
case "$target" in
- *-solaris2*)
+ *-solaris2*,*-netbsd*)
AMANDA_LDFLAGS="$AMANDA_LDFLAGS -R$dir"
;;
esac
done
fi
+dnl
+dnl Process configuration flags
+dnl
+
+AC_ARG_WITH(dumperdir,
+ [ --with-dumperdir=DIR where we install the dumpers [[EPREFIX/dumper]]],
+ [
+ case "$withval" in
+ "" | y | ye | yes | n | no)
+ AC_MSG_ERROR([*** You must supply an argument to the --with-dumperdir option.])
+ ;;
+ esac
+ DUMPER_DIR="$withval"
+ ], [
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
+ DUMPER_DIR=$exec_prefix/dumper
+ ]
+)
+DUMPER_DIR=`(
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
+ eval echo "$DUMPER_DIR"
+)`
+AC_DEFINE_UNQUOTED(DUMPER_DIR,"$DUMPER_DIR",[Directory in which dumper interfaces should be installed and searched. ])
+AC_SUBST(DUMPER_DIR)
+
AC_ARG_WITH(configdir,
- [ --with-configdir=DIR runtime config files in DIR [sysconfdir/amanda]],
+ [ --with-configdir=DIR runtime config files in DIR [[sysconfdir/amanda]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
;;
esac
],
- : ${CONFIG_DIR=$sysconfdir/amanda}
+ : ${CONFIG_DIR="$sysconfdir/amanda"}
)
CONFIG_DIR=`(
test "x$prefix" = xNONE && prefix=$ac_default_prefix
program_suffix="-$VERSION"
# This is from the output of configure.in.
- if test "$program_transform_name" = s,x,x,; then
+ if test "x$program_transform_name" = xs,x,x,; then
program_transform_name=
else
# Double any \ or $. echo might interpret backslashes.
program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
rm -f conftestsed
fi
- test "$program_prefix" != NONE &&
+ test "x$program_prefix" != xNONE &&
program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
- test "$program_suffix" != NONE &&
+ test "x$program_suffix" != xNONE &&
program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
# sed with no file args requires a program.
- test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+ test "x$program_transform_name" = "" && program_transform_name="xs,x,x,"
# Remove empty command
cat <<\EOF_SED > conftestsed
s,\;\;,\;,g; s,\; \$,,g; s,\;$,,g
esac
]
)
+if test "x${NO_SERVER_MODE+set}" != xset ; then
+ NO_SERVER_MODE=false
+fi
AC_ARG_WITH(restore,
[ --without-restore do not build amrestore nor amidxtaped],
esac
]
)
+if test "x${NO_RESTORE_MODE+set}" != xset ; then
+ NO_RESTORE_MODE=${NO_SERVER_MODE-false}
+fi
+
+if ${NO_SERVER_MODE-false}; then
+ if ${NO_RESTORE_MODE-false}; then
+ dnl
+ dnl --without-server and --without-restore is OK
+ dnl
+ true
+ else
+ AC_MSG_ERROR([*** --without-server requires --without-restore])
+ fi
+fi
AC_ARG_WITH(amrecover,
[ --without-amrecover do not build amrecover],
)
AC_ARG_WITH(index-server,
- [ --with-index-server=HOST default amanda index server [`uname -n`]],
+ [ --with-index-server=HOST default amanda index server [[`uname -n`]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
esac
AC_ARG_WITH(user,
- [ --with-user=USER force execution to USER on client systems [required]],
+ [ --with-user=USER force execution to USER on client systems [[required]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_SUBST(CLIENT_LOGIN)
AC_ARG_WITH(group,
- [ --with-group=GROUP group allowed to execute setuid-root programs [required]],
+ [ --with-group=GROUP group allowed to execute setuid-root programs [[required]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_SUBST(SETUID_GROUP)
AC_ARG_WITH(owner,
- [ --with-owner=USER force ownership of files to USER [default == --with-user value]],
+ [ --with-owner=USER force ownership of files to USER [[default == --with-user value]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
)
AC_ARG_WITH(config,
- [ --with-config=CONFIG default configuration [DailySet1]],
+ [ --with-config=CONFIG default configuration [[DailySet1]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_SUBST(DEFAULT_CONFIG)
AC_ARG_WITH(tape-server,
- [ --with-tape-server=HOST default restoring tape server is HOST [same as --with-index-server]],
+ [ --with-tape-server=HOST default restoring tape server is HOST [[same as --with-index-server]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
dnl bytes are returned upon reading to the next tape mark,
dnl instead of returning an error. Look for devices that have
dnl a 'b' in their name.
- tape_dev=/dev/null
- nr_tape_dev=/dev/null
+ tape_dev=
+ nr_tape_dev=
if test -d /dev/rmt; then
dnl See if we can find two devices, one being the norewind
]
)
-if test -z "$DEFAULT_TAPE_DEVICE"; then
- DEFAULT_TAPE_DEVICE=/dev/null
+if test ! -z "$DEFAULT_TAPE_DEVICE"; then
+ AC_DEFINE_UNQUOTED(DEFAULT_TAPE_DEVICE,"$DEFAULT_TAPE_DEVICE",[This is the default no-rewinding tape device. ])
+ AC_SUBST(DEFAULT_TAPE_DEVICE)
fi
-AC_DEFINE_UNQUOTED(DEFAULT_TAPE_DEVICE,"$DEFAULT_TAPE_DEVICE",[This is the default no-rewinding tape device. ])
-AC_SUBST(DEFAULT_TAPE_DEVICE)
-
AC_ARG_WITH(ftape-raw-device,
[ --with-ftape-rawdevice=ARG raw device on tape server HOST's if using Linux ftape >=3.04d],
[
],)
AC_ARG_WITH(changer-device,
- [ --with-changer-device=ARG default tape changer device [/dev/ch0 if it exists]],
+ [ --with-changer-device=ARG default tape changer device [[/dev/ch0 if it exists]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
;;
esac
+AC_ARG_WITH(reuseports,
+ [ --without-reuseaddr Don't closed network connections to be reused until full timeout period.],
+ [ case "$withval" in
+ y | ye | yes)
+ REUSEADDR=no;;
+ n | no)
+ REUSEADDR=yes;;
+ *)
+ REUSEADDR=no;;
+ esac
+ ],
+ [ REUSEADDR=yes; ])
+case "$REUSEADDR" in
+n | no) :
+ ;;
+y | ye | yes)
+ AC_DEFINE(USE_REUSEADDR,1,[Define to set SO_REUSEADDR on network connections.])
+ ;;
+*)
+ AC_MSG_ERROR([*** You must not supply an argument to --with-reuseports option.])
+ ;;
+esac
+
AC_ARG_WITH(gnutar,
- [ --with-gnutar[=PROG] use PROG as GNU tar executable [default: looks for one]],
+ [ --with-gnutar[[=PROG]] use PROG as GNU tar executable [[default: looks for one]]],
[
case "$withval" in
/*) GNUTAR="$withval";;
]
)
-AC_ARG_WITH(qde,
- [ --with-qde use quick-and-dirty estimates for gnutar ],
- USE_QUICK_AND_DIRTY_ESTIMATES=$withval,
- : ${USE_QUICK_AND_DIRTY_ESTIMATES=no}
-)
-case "$USE_QUICK_AND_DIRTY_ESTIMATES" in
-n | no) : USE_QUICK_AND_DIRTY_ESTIMATES=no;;
-y | ye | yes) : USE_QUICK_AND_DIRTY_ESTIMATES=yes
- AC_DEFINE(USE_QUICK_AND_DIRTY_ESTIMATES,1,[ Define if you want to use amqde instead of gnutar for estimates ])
- ;;
-*) AC_MSG_ERROR([*** You must not supply an argument to --with-qde option.])
- ;;
-esac
-
-
AC_ARG_WITH(smbclient,
- [ --with-smbclient[=PROG] use PROG as Samba's smbclient executable [default: looks for one]],
+ [ --with-smbclient[[=PROG]] use PROG as Samba's smbclient executable [[default: looks for one]]],
[
case "$withval" in
/*) SAMBA_CLIENT="$withval";;
y|ye|yes) :;;
- n|no) SAMBA_CLIENT="no";;
+ n|no) SAMBA_CLIENT=;;
*) AC_MSG_ERROR([*** You must supply a full pathname to --with-smbclient]);;
esac
]
)
AC_ARG_WITH(gnutar-listdir,
- [ --with-gnutar-listdir=DIR gnutar directory lists go in DIR [localstatedir/amanda/gnutar-lists]],
+ [ --with-gnutar-listdir=DIR gnutar directory lists go in DIR [[localstatedir/amanda/gnutar-lists]]],
[
case "$withval" in
n | no) unset GNUTAR_LISTDIR ;;
*) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar-listdir])
esac
],
- : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists}
+ : ${GNUTAR_LISTDIR="$localstatedir/amanda/gnutar-lists"}
)
if test "$GNUTAR_LISTDIR"; then
GNUTAR_LISTDIR=`(
[ AC_MSG_ERROR([*** The gnutar-listed-incremental option was deprecated, use gnutar-listdir instead])
]
)
+GNUTAR_LISTED_INCREMENTAL_DIR=$GNUTAR_LISTDIR
+AC_SUBST(GNUTAR_LISTED_INCREMENTAL_DIR)
AC_ARG_WITH(bsd-security,
[ --without-bsd-security do not use BSD rsh/rlogin style security],
;;
esac
+dnl Specify --with-dbmalloc if you desire dbmalloc to be linked in
+
+AC_ARG_WITH(dbmalloc,
+ [ --with-dbmalloc=DIR Location of dbmalloc libs and headers],
+ DBMALLOC="$withval",
+ : ${DBMALLOC=no}
+)
+
+case "$DBMALLOC" in
+n | no)
+ DBMALLOCCFLAGS=""
+ DBMALLOCLIBS=""
+ ;;
+*)
+ AC_CHECK_LIB(dbmalloc,malloc)
+ if test "x$ac_cv_lib_dbmalloc_malloc" != "xyes"; then
+ AC_MSG_WARN([*** dbmalloc library not found - no malloc debugging support!])
+ DBMALLOCCFLAGS=""
+ DBMALLOCLIBS=""
+ else
+ DBMALLOCCFLAGS="-I$DBMALLOC -DUSE_DBMALLOC"
+ DBMALLOCLIBS="-L$DBMALLOC -ldbmalloc"
+ fi
+ ;;
+esac
+
dnl Specify --with-krb4-security if Kerberos software is in somewhere
dnl other than the listed KRB4_SPOTS. We only compile kerberos support in
dnl if the right files are there.
: ${KRB4_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
AC_ARG_WITH(krb4-security,
- [ --with-krb4-security=DIR Location of Kerberos software [/usr/kerberos /usr/cygnus /usr /opt/kerberos]],
+ [ --with-krb4-security=DIR Location of Kerberos software [[/usr/kerberos /usr/cygnus /usr /opt/kerberos]]],
KRB4_SECURITY="$withval",
: ${KRB4_SECURITY=no}
)
esac
AC_MSG_CHECKING(for Kerberos and Amanda kerberos4 bits)
-if test "${KRB4_SECURITY}" = yes -a -f ${srcdir-.}/common-src/krb4-security.c ; then
+if test "x${KRB4_SECURITY}" = xyes -a -f ${srcdir-.}/common-src/krb4-security.c ; then
for dir in $KRB4_SPOTS; do
if test -f ${dir}/lib/libkrb.a -a -f ${dir}/lib/libdes.a ; then
#
fi
KRB4LDFLAGS=-L$dir/lib
KRB4LIBS="-lkrb -ldes"
- if test -f ${dir}/lib/libcom_err.a ; then
+ if test -f ${dir}/lib/libcom_err.a; then
KRB4LIBS="$KRB4LIBS -lcom_err"
fi
- if test -f ${dir}/lib/libroken.a ; then
- KRB4LIBS="$KRB4LIBS -lroken"
- fi
break
elif test -f ${dir}/lib/libkrb4.a &&
test -f ${dir}/lib/libcrypto.a &&
KRB4LIBS="-lkrb4 -lcrypto -ldes425"
fi
break
- elif test -f ${dir}/lib/libkrb4.dylib &&
- test -f ${dir}/lib/libcrypto.dylib &&
- test -f ${dir}/lib/libdes425.dylib ; then
- #
- # This is Kerberos 5 with Kerberos 4 back-support for Mac OS X.
- #
- AC_MSG_RESULT(found in $dir)
- KRB4_SECURITY=yes
- AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
- KRB4INCLUDES="-I$dir/include -I$dir/include/kerberosIV"
- KRB4LDFLAGS=-L$dir/lib
- if test -f ${dir}/lib/libkrb5.dylib &&
- test -f ${dir}/lib/libcom_err.dylib; then
- KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
- else
- KRB4LIBS="-lkrb4 -lcrypto -ldes425"
- fi
- break
fi
done
- if test "$KRB4LDFLAGS" = "" ; then
- AC_MSG_ERROR([*** Kerberos IV not found.])
+ if test "x$KRB4LDFLAGS" = "x" ; then
+ AC_MSG_RESULT(no libraries found)
fi
else
AC_MSG_RESULT(no)
fi
+AC_ARG_WITH(rsh-security,
+ [ --with-rsh-security use rsh as a transport],
+ RSH_SECURITY=$withval,
+ : ${RSH_SECURITY=yes}
+)
+case "$RSH_SECURITY" in
+n | no) : ;;
+y | ye | yes) AC_DEFINE(RSH_SECURITY,1,[Define if RSH transport should be enabled. ])
+ ;;
+*) AC_MSG_ERROR([*** You must not supply an argument the to --with-rsh-security option.])
+ ;;
+esac
+
+AC_ARG_WITH(ssh-security,
+ [ --with-ssh-security use ssh as a transport],
+ SSH_SECURITY=$withval,
+ : ${SSH_SECURITY=no}
+)
+case "$SSH_SECURITY" in
+n | no) : ;;
+y | ye | yes) AC_DEFINE(SSH_SECURITY,1,[Define if SSH transport should be enabled. ])
+ SSH_SECURITY_SET=true
+ ;;
+*) AC_MSG_ERROR([*** You must not supply an argument the to --with-ssh-security option.])
+ ;;
+esac
+
+AC_ARG_WITH(bsdtcp-security,
+ [ --with-bsdtcp-security use tcp as a transport],
+ BSDTCP_SECURITY=$withval,
+ : ${BSDTCP_SECURITY=yes}
+)
+case "$BSDTCP_SECURITY" in
+n | no) : ;;
+y | ye | yes) AC_DEFINE(BSDTCP_SECURITY,1,[Define if BSDTCP transport should be enabled. ])
+ BSDTCP_SECURITY_SET=true
+ ;;
+*) AC_MSG_ERROR([*** You must not supply an argument the to --with-bsdtcp-security option.])
+ ;;
+esac
+
+AC_ARG_WITH(bsdudp-security,
+ [ --with-bsdudp-security use tcp as a transport],
+ BSDUDP_SECURITY=$withval,
+ : ${BSDUDP_SECURITY=yes}
+)
+case "$BSDUDP_SECURITY" in
+n | no) : ;;
+y | ye | yes) AC_DEFINE(BSDUDP_SECURITY,1,[Define if BSDUDP transport should be enabled. ])
+ BSDUDP_SECURITY_SET=true
+ ;;
+*) AC_MSG_ERROR([*** You must not supply an argument the to --with-bsdudp-security option.])
+ ;;
+esac
+
AC_ARG_WITH(server-principal,
- [ --with-server-principal=ARG server host principal ["amanda"]],
+ [ --with-server-principal=ARG server host principal [["amanda"]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_DEFINE_UNQUOTED(SERVER_HOST_PRINCIPLE,"$SERVER_HOST_PRINCIPLE",[The Kerberos server principle. ])
AC_ARG_WITH(server-instance,
- [ --with-server-instance=ARG server host instance ["amanda"]],
+ [ --with-server-instance=ARG server host instance [["amanda"]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_DEFINE_UNQUOTED(SERVER_HOST_INSTANCE,"$SERVER_HOST_INSTANCE",[The Kerberos server instance. ])
AC_ARG_WITH(server-keyfile,
- [ --with-server-keyfile=ARG server host key file ["/.amanda"]],
+ [ --with-server-keyfile=ARG server host key file [["/.amanda"]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_DEFINE_UNQUOTED(SERVER_HOST_KEY_FILE,"$SERVER_HOST_KEY_FILE",[The Kerberos server key file. ])
AC_ARG_WITH(client-principal,
- [ --with-client-principal=ARG client host principal ["rcmd"]],
+ [ --with-client-principal=ARG client host principal [["rcmd"]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_DEFINE_UNQUOTED(CLIENT_HOST_PRINCIPLE,"$CLIENT_HOST_PRINCIPLE",[The Kerberos client host principle. ])
AC_ARG_WITH(client-instance,
- [ --with-client-instance=ARG client host instance [HOSTNAME_INSTANCE]],
+ [ --with-client-instance=ARG client host instance [[HOSTNAME_INSTANCE]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_DEFINE_UNQUOTED(CLIENT_HOST_INSTANCE,$CLIENT_HOST_INSTANCE,[The Kerberos client host instance. ])
AC_ARG_WITH(client-keyfile,
- [ --with-client-keyfile=ARG client host key file [KEYFILE]],
+ [ --with-client-keyfile=ARG client host key file [[KEYFILE]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
)
# Assume it's either KEYFILE (defined in krb.h), or a string filename...
-if test "$CLIENT_HOST_KEY_FILE" != "KEYFILE"; then
+if test "x$CLIENT_HOST_KEY_FILE" != "xKEYFILE"; then
CLIENT_HOST_KEY_FILE="\"$CLIENT_HOST_KEY_FILE\""
fi
AC_DEFINE_UNQUOTED(CLIENT_HOST_KEY_FILE,$CLIENT_HOST_KEY_FILE,[The Kerberos client host key file. ])
AC_ARG_WITH(ticket-lifetime,
- [ --with-ticket-lifetime=ARG ticket lifetime [128]],
+ [ --with-ticket-lifetime=ARG ticket lifetime [[128]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
)
AC_DEFINE_UNQUOTED(TICKET_LIFETIME,$TICKET_LIFETIME,[The Kerberos ticket lifetime. ])
+dnl Specify --with-krb5-security if Kerberos software is in somewhere
+dnl other than the listed KRB5_SPOTS. We only compile kerberos support in
+dnl if the right files are there.
+
+: ${KRB5_SPOTS="/usr/kerberos /usr/cygnus /usr /opt/kerberos"}
+
+AC_ARG_WITH(krb5-security,
+ [ --with-krb5-security=DIR Location of Kerberos V software [[/usr/kerberos /usr/cygnus /usr /opt/kerberos]]],
+ KRB5_SECURITY="$withval",
+ : ${KRB5_SECURITY=no}
+)
+
+case "$KRB5_SECURITY" in
+n | no) KRB5_SECURITY=no
+ KRB5_SPOTS=""
+ ;;
+y | ye | yes) : ;;
+*) KRB5_SPOTS="$KRB5_SECURITY"
+ KRB5_SECURITY=yes
+ ;;
+esac
+
+# if found, force the static versions of these libs (.a) by linking directly
+# with the .a files. I don't know how to get -R dependancies checked
+# in autoconf at this time. -kashmir
+AC_MSG_CHECKING(for Kerberos V)
+KRB5_DIR_FOUND=""
+KRB5_CFLAGS=""
+for dir in $KRB5_SPOTS; do
+ for lib in lib lib64; do
+ k5libdir=${dir}/${lib}
+ if test -f ${k5libdir}/libkrb5.a -a -f ${k5libdir}/libgssapi_krb5.a -a -f ${k5libdir}/libcom_err.a; then
+ if test -f ${k5libdir}/libk5crypto.a; then
+ K5CRYPTO=${k5libdir}/libk5crypto.a
+ elif test -f ${k5libdir}/libcrypto.a; then
+ K5CRYPTO=${k5libdir}/libcrypto.a
+ else
+ K5CRYPTO=""
+ fi
+ if test -f ${k5libdir}/libkrb5support.a; then
+ K5SUPPORT=${k5libdir}/libkrb5support.a
+ else
+ K5SUPPORT=""
+ fi
+ KRB5_DIR_FOUND=$dir
+ KRB5LIBS="${k5libdir}/libgssapi_krb5.a ${k5libdir}/libkrb5.a $K5CRYPTO $K5SUPPORT ${k5libdir}/libcom_err.a"
+ KRB5CFLAGS=""
+ break
+ elif test -f ${k5libdir}/libkrb5.a -a -f ${k5libdir}/libasn1.a -a -f ${k5libdir}/libgssapi.a; then
+ KRB5_DIR_FOUND=$dir
+ KRB5LIBS="${k5libdir}/libgssapi.a ${k5libdir}/libkrb5.a ${k5libdir}/libasn1.a"
+ KRB5_CFLAGS="-DKRB5_HEIMDAL_INCLUDES"
+ break
+ fi
+ done
+done
+
+if test "$KRB5_DIR_FOUND"; then
+ AC_MSG_RESULT(found in $KRB5_DIR_FOUND)
+ KRB5_SECURITY=yes
+ AC_DEFINE(KRB5_SECURITY,1,[Define if Kerberos 5 security is to be enabled. ])
+ #
+ # some OS's, such as NetBSD, stick krb5 includes out of the way...
+ # should probably just use autoconf to look for various include
+ # options and set them, but don't quite want to do that until I've
+ # dug into it a bit more.
+ #
+ if test -d "$KRB5_DIR_FOUND/krb5" ; then
+ KRB5INCLUDES="-I$KRB5_DIR_FOUND/include/krb5"
+ else
+ KRB5INCLUDES="-I$KRB5_DIR_FOUND/include"
+ fi
+ if test "$KRB5_CFLAGS" ; then
+ KRB5INCLUDES="$KRB5INCLUDES $KRB5_CFLAGS"
+ fi
+ AC_CHECK_LIB(krb5support,main)
+ KRB5LDFLAGS=-L$k5libdir
+ break
+fi
+
+if test "x$KRB5LDFLAGS" = "x" ; then
+ AC_MSG_RESULT(no krb5 system libraries found)
+fi
+
-AC_ARG_WITH(portrange,
- [ --with-portrange=low,high bind unreserved TCP server sockets to ports within this range [unlimited]],
+AC_ARG_WITH(low-tcpportrange,
+ [ --with-low-tcpportrange=low,high bind reserved TCP server sockets to ports within this range [unlimited] (mainly for amrecover)],
[
- TCPPORTRANGE="$withval"
+ LOW_TCPPORTRANGE="$withval"
]
)
+
+if test x"${LOW_TCPPORTRANGE+set}" = x"set"; then
+ if test x`echo "$LOW_TCPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
+ AC_MSG_ERROR([*** --with-low-tcpportrange requires two comma-separated positive numbers])
+ fi
+ min_low_tcp_port=`echo "$LOW_TCPPORTRANGE" | sed 's/,.*//'`
+ max_low_tcp_port=`echo "$LOW_TCPPORTRANGE" | sed 's/.*,//'`
+ if test $min_low_tcp_port -gt $max_low_tcp_port; then
+ AC_MSG_ERROR([*** the second TCP port number must be greater than the first in --with-low-tcpportrange])
+ fi
+ if test $min_low_tcp_port -lt 512; then
+ AC_MSG_WARN([*** the low TCP port range should be 512 or greater in --with-low-tcpportrange])
+ fi
+ if test $max_low_tcp_port -ge 1024; then
+ AC_MSG_WARN([*** the low TCP port range should be less than 1024 in --with-low-tcpportrange])
+ fi
+ AC_DEFINE_UNQUOTED(LOW_TCPPORTRANGE,$LOW_TCPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
+ maximum reserved TCP port numbers sockets should be bound to. (mainly for amrecover) ])
+fi
+
AC_ARG_WITH(tcpportrange,
- [ --with-tcpportrange=low,high bind unreserved TCP server sockets to ports within this range [unlimited]],
+ [ --with-tcpportrange=low,high bind unreserved TCP server sockets to ports within this range [[unlimited]]],
[
TCPPORTRANGE="$withval"
]
fi
AC_ARG_WITH(udpportrange,
- [ --with-udpportrange=low,high bind reserved UDP server sockets to ports within this range [unlimited]],
+ [ --with-udpportrange=low,high bind reserved UDP server sockets to ports within this range [[unlimited]]],
[
UDPPORTRANGE="$withval"
]
AC_SUBST(MAXTAPEBLOCKSIZE)
AC_ARG_WITH(db,
- [ --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [text]],
+ [ --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [[text]]],
[
case "$withval" in
"" | y | ye | yes | n | no)
esac
AC_ARG_WITH(tmpdir,
- [ --with-tmpdir[=/temp/dir] area Amanda can use for temp files [/tmp/amanda]],
+ [ --with-tmpdir[=/temp/dir] area Amanda can use for temp files [[/tmp/amanda]]],
tmpdir="$withval",
: ${tmpdir=yes}
)
AC_SUBST(AMANDA_TMPDIR)
AC_ARG_WITH(debugging,
- [ --with[out]-debugging[=/debug/dir] [do not] record runtime debugging information in specified directory [--with-tmpdir]],
+ [ --with[[out]]-debugging[[=/debug/dir]] [[do not]] record runtime debugging information in specified directory [[--with-tmpdir]]],
debugging="$withval",
: ${debugging=yes}
)
)`
case "$debugging" in
n | no) AMANDA_DBGDIR="";;
-y | ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR" ;;
-/*) AMANDA_DBGDIR="$debugging" ;;
+y | ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR";;
+/*) AMANDA_DBGDIR="$debugging";;
*) AC_MSG_ERROR([*** You must supply a full pathname to --with-debugging option.])
;;
esac
esac
AC_ARG_WITH(debug_days,
- [ --with-debug-days=NN number of days to keep debugging files [default=4]],
+ [ --with-debug-days=NN number of days to keep debugging files [[default=4]]],
debug_days="$withval",
: ${debug_days=4}
)
AC_SUBST(AMANDA_DEBUG_DAYS)
AC_ARG_WITH(testing,
- [ --with-testing[=suffix] use alternate service names],
+ [ --with-testing[[=suffix]] use alternate service names],
TESTING="$withval",
: ${TESTING=no}
)
AC_DEFINE_UNQUOTED(mandir,"$tmp",[Directory in which man-pages should be installed])
)
-AC_PROG_CC
-AC_OBJEXT
-AC_EXEEXT
-
dnl Set the order of dump programs to look for. Finding the proper file
dnl system dumping program is problematic. Some systems, notably HP-UX
dnl and AIX, have both the backup and dump programs. HP-UX can't use the
;;
*-pc-linux-*)
;;
+ *-redhat-linux-*)
+ ;;
+ x86_64-*-linux-*)
+ ;;
alpha*-*-linux-*)
;;
sparc*-*-linux-*)
AC_DEFINE(XENIX_TAPEIO,1,[Define on XENIX/ISC. ])
fi
-AMANDA_CFLAGS="$AMANDA_CFLAGS $KRB4INCLUDES"
-AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS $KRB4INCLUDES"
-AMANDA_LDFLAGS="$AMANDA_LDFLAGS $KRB4LDFLAGS"
-AMANDA_LIBS="$KRB4LIBS $AMANDA_LIBS"
+AMANDA_CFLAGS="$AMANDA_CFLAGS $KRB4INCLUDES $KRB5INCLUDES $DBMALLOCCFLAGS"
+AMANDA_CPPFLAGS="$AMANDA_CPPFLAGS $KRB4INCLUDES $KRB5INCLUDES $DBMALLOCINCLUDES"
+AMANDA_LDFLAGS="$AMANDA_LDFLAGS $KRB4LDFLAGS $KRB5LDFLAGS"
+AMANDA_LIBS="$KRB4LIBS $KRB5LIBS $DBMALLOCLIBS $AMANDA_LIBS"
CFLAGS="$CFLAGS $AMANDA_CFLAGS"
CPPFLAGS="$CPPFLAGS $AMANDA_CPPFLAGS"
LDFLAGS="$LDFLAGS $AMANDA_LDFLAGS"
AC_PROG_AWK
AMANDA_PROG_AWK_VAR
-if test "$amanda_cv_awk_var_assignment" = no; then
+if test "x$amanda_cv_awk_var_assignment" = xno; then
NO_AMPLOT_MODE=true
AC_MSG_WARN([*** Your $awk cannot do command line variable assignment. Amplot will not be installed.])
fi
fi
AC_PATH_PROGS(COMPRESS,compress,,$LOCSYSPATH)
AC_PATH_PROGS(DD,dd,,$LOCSYSPATH)
-AC_PATH_PROGS(EGREP,egrep,,$LOCSYSPATH)
AC_PATH_PROGS(GETCONF,getconf,,$SYSPATH)
AC_PATH_PROGS(GNUPLOT,gnuplot,,$LOCSYSPATH)
AC_MSG_WARN([*** You do not have gnuplot. Amplot will not be installed.])
fi
-AC_PATH_PROGS(GREP,grep,,$LOCSYSPATH)
-if test -z "$GREP"; then
- GREP=grep
-fi
-AC_DEFINE_UNQUOTED(GREP,"$GREP",[Define the location of the grep program. ])
-
AC_PATH_PROGS(GNUTAR,gtar gnutar tar,,$LOCSYSPATH)
if test ! -z "$GNUTAR"; then
case "`\"$GNUTAR\" --version 2>&1`" in
esac
fi
-if test "x$SAMBA_CLIENT" != "xno"
-then AC_PATH_PROGS(SAMBA_CLIENT,smbclient,,$LOCSYSPATH)
-else SAMBA_CLIENT=
-fi
+AC_PATH_PROGS(SAMBA_CLIENT,smbclient,,$LOCSYSPATH)
if test ! -z "$SAMBA_CLIENT"; then
case "`\"$SAMBA_CLIENT\" '\\\\not.a.host.name\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in
*"Unknown host"*)
AC_DEFINE_UNQUOTED(SAMBA_VERSION, $smbversion,
[Not the actual samba version, just a number that should be increased whenever we start to rely on a new samba feature. ])
fi
-
fi
-
AC_PATH_PROGS(GZIP,gzip,,$LOCSYSPATH)
if test "$GZIP"; then
AC_DEFINE(HAVE_GZIP,1,[Define if Amanda is using the gzip program. ])
AC_MSG_WARN([*** $DUMP is not executable, cannot run -E/-S test])
amanda_cv_dump_estimate=no
fi
- if test "$amanda_cv_dump_estimate" != no; then
+ if test "x$amanda_cv_dump_estimate" != xno; then
AC_DEFINE_UNQUOTED(HAVE_DUMP_ESTIMATE, "$amanda_cv_dump_estimate",[Define to the string that enables dump estimates. ])
fi
AC_MSG_WARN([*** $DUMP is not executable, cannot run -h test])
amanda_cv_honor_nodump=no
fi
- if test "$amanda_cv_honor_nodump" = yes; then
+ if test "x$amanda_cv_honor_nodump" = xyes; then
AC_DEFINE(HAVE_HONOR_NODUMP,1,[Define this if dump accepts -h for honoring nodump. ])
fi
])
AC_SUBST(AMPLOT_CAT_COMPRESS)
AC_SUBST(AMPLOT_CAT_PACK)
+# Determine the printf format characters to use when printing
+# values of type long long. This will normally be "ll", but where
+# the compiler treats "long long" as a alias for "long" and printf
+# doesn't know about "long long" use "l". Hopefully the sprintf
+# will produce a inconsistant result in the later case. If the compiler
+# fails due to seeing "%lld" we fall back to "l".
+#
+# Win32 uses "%I64d", but that's defined elsewhere since we don't use
+# configure on Win32.
+#
+AC_MSG_CHECKING(printf format modifier for 64-bit integers)
+AC_TRY_RUN([
+#include <stdio.h>
+main() {
+ long long int j = 0;
+ char buf[100];
+ buf[0] = 0;
+ sprintf(buf, "%lld", j);
+ exit((sizeof(long long int) != sizeof(long int))? 0 :
+ (strcmp(buf, "0") != 0));
+}
+],
+ [AC_MSG_RESULT(ll)
+ LL_FMT="%lld"],
+ [AC_MSG_RESULT(l)
+ LL_FMT="%ld"],
+ [AC_MSG_RESULT(assuming target platform uses ll)
+ LL_FMT="%lld"])
+AC_DEFINE_UNQUOTED(LL_FMT,"$LL_FMT",
+ [Format for a long long printf. ])
+AC_SUBST(LL_FMT)
+
dnl Empty GZIP so that make dist works.
GZIP=
fi
]
)
-if test "$need_resetofs" = yes; then
+if test "x$need_resetofs" = xyes; then
AC_DEFINE(NEED_RESETOFS,1,[Define if we have to reset tape offsets when reacing 2GB. ])
fi
+
+
CFLAGS="$amanda_cv_LFS_CFLAGS $CFLAGS"
-CPPFLAGS="$amanda_cv_LFS_CFLAGS $CPPFLAGS"
+CPPFLAGS="$amanda_cv_LFS_CPPFLAGS $CPPFLAGS"
LDFLAGS="$amanda_cv_LFS_LDFLAGS $LDFLAGS"
LIBS="$amanda_cv_LFS_LIBS $LIBS"
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(intmax_t)
+AC_CHECK_SIZEOF(off_t)
+AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(ssize_t)
+AC_CHECK_SIZEOF(time_t)
+
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_TYPE_PID_T
AC_TYPE_SIZE_T
-dnl We don't have an acconfig.h template since we moved all define templates
-dnl into the third argument of AC_DEFINE. However, AC_CHECK_TYPE calls
-dnl AC_DEFINE without such an argument, so autoheader complains about no
-dnl template being available. This is an ugly work-around.
-
-pushdef([AC_DEFINE_SAVED],defn([AC_DEFINE]))
-pushdef([AC_DEFINE],[AC_DEFINE_SAVED([$1],[$2],[Define to $2 if $1 is not defined])])
-
-AC_CHECK_TYPE(ssize_t, int)
-
-dnl there is a push to avoid depending on long longs, so in general it's
-dnl better to convert numbers to kilobytes for consistancies sake. This
-dnl is primarily checked for for client-src/amqde.c
-AC_CHECK_TYPES(unsigned long long)
-
-popdef([AC_DEFINE])
-popdef([AC_DEFINE_SAVED])
-
-dnl End ugly AC_CHECK_TYPE work-around.
-
AC_TYPE_UID_T
AC_TYPE_SIGNAL
AC_STRUCT_TM
AM_PROG_LEX
+dnl From here on we need to know about STDC_HEADERS
+AC_HEADER_STDC
+
dnl AC_CHECK_TYPE does not work for socklen_t because it does not look
dnl in <sys/socket.h>, so this is a variant that adds another header.
AC_DEFUN([AMANDA_CHECK_TYPE],
#endif
#include <$3>], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
AC_MSG_RESULT($ac_cv_type_$1)
-if test $ac_cv_type_$1 = no; then
+if test "x$ac_cv_type_$1" = xno; then
AC_DEFINE($1, $2, [Define if $1 is not a standard system type])
fi
])
AMANDA_CHECK_TYPE(socklen_t, int, sys/socket.h)
+AMANDA_CHECK_TYPE(sa_family_t, unsigned short, sys/socket.h)
dnl Checks for header files.
-AC_HEADER_STDC
AC_HEADER_DIRENT
CF_WAIT
CF_WAIT_INT
grp.h \
history.h \
libc.h \
+ libgen.h \
limits.h \
linux/zftape.h \
+ math.h \
mntent.h \
mnttab.h \
ndbm.h \
readline/readline.h \
scsi/sg.h \
scsi/scsi_ioctl.h \
+ stdarg.h \
stdlib.h \
string.h \
strings.h \
sys/tape.h \
sys/time.h \
sys/types.h \
+ sys/uio.h \
sys/vfs.h \
sys/vfstab.h \
syslog.h \
AC_CACHE_CHECK([for Linux like scsi support (sg)],
amanda_cv_linux_sg_scsi,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
#include <scsi/sg.h>
#include <sys/mtio.h>
]], [[
dnl
if test x"$ac_cv_header_sys_mtio_h" = x"yes" &&
test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then
- AC_CACHE_CHECK([for Solaris like scsi support],
+ AC_CACHE_CHECK([for Solaris-like scsi support],
amanda_cv_solaris_scsi,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
fi
fi
+
dnl
dnl BSD SCSI
dnl
AC_CHECK_LIB(socket,main)
;;
*)
+ AC_CHECK_LIB(resolv,main)
AC_CHECK_LIB(nsl,main)
AC_CHECK_LIB(socket,main)
AC_CHECK_LIB(sun,main)
esac
AC_CHECK_LIB(termcap,tgetent)
-if test "$ac_cv_lib_termcap_tgetent" != yes; then
+if test "x$ac_cv_lib_termcap_tgetent" != xyes; then
AC_CHECK_LIB(curses,tgetent)
- if test "$ac_cv_lib_curses_tgetent" != yes; then
+ if test "x$ac_cv_lib_curses_tgetent" != xyes; then
AC_CHECK_LIB(ncurses,tgetent)
fi
fi
-if test "$ac_cv_lib_termcap_tgetent" = yes ||
- test "$ac_cv_lib_curses_tgetent" = yes ||
- test "$ac_cv_lib_ncurses_tgetent" = yes; then
+if test "x$ac_cv_lib_termcap_tgetent" = xyes ||
+ test "x$ac_cv_lib_curses_tgetent" = xyes ||
+ test "x$ac_cv_lib_ncurses_tgetent" = xyes; then
AC_CHECK_LIB(readline,readline)
- if test "$ac_cv_lib_readline_readline" != yes; then
+ if test "x$ac_cv_lib_readline_readline" = xyes; then
+ READLINE_LIBS="-lreadline"
+ AC_SUBST(READLINE_LIBS)
+ else
AC_MSG_WARN([*** No readline library, no history and command line editing in amrecover!])
fi
else
AC_MSG_WARN([*** No terminal library, no history and command line editing in amrecover!])
fi
-if test "$ac_cv_lib_readline_readline" = yes; then
- READLINE_LIBS=-lreadline
- LIBS=`echo $LIBS | sed s/-lreadline//`
- AC_SUBST(READLINE_LIBS)
-fi
-
-if test "$ac_cv_header_linux_zftape_h" = yes; then
- if test "$ac_cv_header_vtblc_h" = yes; then
+if test "x$ac_cv_header_linux_zftape_h" = xyes; then
+ if test "x$ac_cv_header_vtblc_h" = xyes; then
AC_CHECK_LIB(vtblc,main)
- if test "$ac_cv_lib_vtblc_main" != yes; then
+ if test "x$ac_cv_lib_vtblc_main" != xyes; then
AC_MSG_WARN([*** vtblc library not found - no QIC volume table support!])
fi
else
case "$DB_STYLE" in
db)
- if test "$ac_cv_header_db_h" = yes; then
+ if test "x$ac_cv_header_db_h" = xyes; then
AC_CHECK_LIB(db,main)
- if test "$ac_cv_lib_db_main" = yes; then
+ if test "x$ac_cv_lib_db_main" = xyes; then
AC_CHECK_LIB(db,dbm_open)
- if test "$ac_cv_lib_db_dbm_open" = yes; then
+ if test "x$ac_cv_lib_db_dbm_open" = xyes; then
DB_HEADER=db.h
DB_LIB=db
else
AC_MSG_WARN([*** db database library requested but dbm_open not found in -ldb.])
fi
else
- if test "$ac_cv_lib_c_dbm_open" = yes; then
+ if test "x$ac_cv_lib_c_dbm_open" = xyes; then
DB_HEADER=db.h
DB_LIB=c
else
;;
dbm)
- if test "$ac_cv_header_dbm_h" = yes; then
+ if test "x$ac_cv_header_dbm_h" = xyes; then
AC_CHECK_LIB(dbm,main)
- if test "$ac_cv_lib_dbm_main" = yes; then
+ if test "x$ac_cv_lib_dbm_main" = xyes; then
AC_CHECK_LIB(dbm,dbm_open)
- if test "$ac_cv_lib_dbm_dbm_open" = yes; then
+ if test "x$ac_cv_lib_dbm_dbm_open" = xyes; then
DB_HEADER=dbm.h
DB_LIB=dbm
else
AC_MSG_WARN([*** dbm database library requested but dbm_open not found in -ldbm.])
fi
else
- if test "$ac_cv_lib_c_dbm_open" = yes; then
+ if test "x$ac_cv_lib_c_dbm_open" = xyes; then
DB_HEADER=dbm.h
DB_LIB=c
else
;;
gdbm)
- if test "$ac_cv_header_ndbm_h" = yes; then
+ if test "x$ac_cv_header_ndbm_h" = xyes; then
AC_CHECK_LIB(gdbm,main)
- if test "$ac_cv_lib_gdbm_main" = yes; then
+ if test "x$ac_cv_lib_gdbm_main" = xyes; then
AC_CHECK_LIB(gdbm,dbm_open)
- if test "$ac_cv_lib_gdbm_dbm_open" = yes; then
+ if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then
DB_HEADER=ndbm.h
DB_LIB=gdbm
else
AC_MSG_WARN([*** gdbm database library requested but -lgdbm not found.])
fi
else
- if test "$ac_cv_lib_c_dbm_open" = yes; then
+ if test "x$ac_cv_lib_c_dbm_open" = xyes; then
DB_HEADER=ndbm.h
DB_LIB=c
else
;;
ndbm)
- if test "$ac_cv_header_ndbm_h" = yes; then
+ if test "x$ac_cv_header_ndbm_h" = xyes; then
AC_CHECK_LIB(ndbm,main)
- if test "$ac_cv_lib_ndbm_main" = yes; then
+ if test "x$ac_cv_lib_ndbm_main" = xyes; then
AC_CHECK_LIB(ndbm,dbm_open)
- if test "$ac_cv_lib_ndbm_dbm_open" = yes; then
+ if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then
DB_HEADER=ndbm.h
DB_LIB=ndbm
else
AC_MSG_WARN([*** ndbm database library requested but -lndbm not found.])
fi
else
- if test "$ac_cv_lib_c_dbm_open" = yes; then
+ if test "x$ac_cv_lib_c_dbm_open" = xyes; then
DB_HEADER=ndbm.h
DB_LIB=c
else
DB_LIB=
fi
-dnl if test -z "$DB_STYLE" -a "$ac_cv_header_ndbm_h" = yes; then
+dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_ndbm_h" = xyes; then
dnl AC_CHECK_LIB(ndbm,dbm_open)
-dnl if test "$ac_cv_lib_ndbm_dbm_open" = yes; then
+dnl if test "x$ac_cv_lib_ndbm_dbm_open" = xyes; then
dnl DB_STYLE=ndbm
dnl DB_HEADER=ndbm.h
dnl DB_LIB=ndbm
-dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
+dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then
dnl DB_STYLE=ndbm
dnl DB_HEADER=ndbm.h
dnl DB_LIB=c
dnl fi
dnl fi
dnl
-dnl if test -z "$DB_STYLE" -a "$ac_cv_header_db_h" = yes; then
+dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_db_h" = xyes; then
dnl AC_CHECK_LIB(db,dbm_open)
-dnl if test "$ac_cv_lib_db_dbm_open" = yes; then
+dnl if test "x$ac_cv_lib_db_dbm_open" = xyes; then
dnl DB_STYLE=db
dnl DB_HEADER=db.h
dnl DB_LIB=db
-dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
+dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then
dnl DB_STYLE=db
dnl DB_HEADER=db.h
dnl DB_LIB=c
dnl fi
dnl fi
dnl
-dnl if test -z "$DB_STYLE" -a "$ac_cv_header_dbm_h" = yes; then
+dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_dbm_h" = xyes; then
dnl AC_CHECK_LIB(dbm,dbm_open)
-dnl if test "$ac_cv_lib_db_dbm_open" = yes; then
+dnl if test "x$ac_cv_lib_db_dbm_open" = xyes; then
dnl DB_STYLE=dbm
dnl DB_HEADER=dbm.h
dnl DB_LIB=dbm
-dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
+dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then
dnl DB_STYLE=dbm
dnl DB_HEADER=dbm.h
dnl DB_LIB=c
dnl fi
dnl fi
dnl
-dnl if test -z "$DB_STYLE" -a "$ac_cv_header_ndbm_h" = yes; then
+dnl if test -z "$DB_STYLE" -a "x$ac_cv_header_ndbm_h" = xyes; then
dnl AC_CHECK_LIB(gdbm,dbm_open)
-dnl if test "$ac_cv_lib_gdbm_dbm_open" = yes; then
+dnl if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then
dnl DB_STYLE=gdbm
dnl DB_HEADER=ndbm.h
dnl DB_LIB=gdbm
-dnl elif test "$ac_cv_lib_c_dbm_open" = yes; then
+dnl elif test "x$ac_cv_lib_c_dbm_open" = xyes; then
dnl DB_STYLE=gdbm
dnl DB_HEADER=ndbm.h
dnl DB_LIB=c
dnl fi
dnl
dnl if test -z "$DB_STYLE"; then
-dnl if test "$ac_cv_lib_c_dbm_open" = yes; then
+dnl if test "x$ac_cv_lib_c_dbm_open" = xyes; then
dnl AC_MSG_WARN([*** A dbm_open() routine was found in -lc, but no header])
dnl AC_MSG_WARN([*** files exist. Please remedy the situation.])
dnl else
dnl DB_LIB=
dnl fi
-if test "$DB_STYLE" = text; then
+if test "x$DB_STYLE" = xtext; then
AC_DEFINE(TEXTDB,1,[Define to enable the text-based database format. ])
else
AC_MSG_CHECKING([for database])
]])],[amanda_cv_struct_datum=yes],[amanda_cv_struct_datum=no
])
])
- if test "$amanda_cv_struct_datum" = yes; then
+ if test "x$amanda_cv_struct_datum" = xyes; then
AC_DEFINE(HAVE_STRUCT_DATUM,1,[Define if the database header declares struct datum. ])
fi
fi
yes
#endif
], amanda_cv_have__posix2_re_dup_max=yes, amanda_cv_have__posix2_re_dup_max=no))
-if test "$amanda_cv_have__posix2_re_dup_max" = yes; then
+if test "x$amanda_cv_have__posix2_re_dup_max" = xyes; then
AC_DEFINE(HAVE__POSIX2_RE_DUP_MAX,1,[Define if limits.h defines _POSIX2_RE_DUP_MAX. ])
fi
yes
#endif
], amanda_cv_have_char_min=yes, amanda_cv_have_char_min=no))
-if test "$amanda_cv_have_char_min" = yes; then
+if test "x$amanda_cv_have_char_min" = xyes; then
AC_DEFINE(HAVE_CHAR_MIN,1,[Define if limits.h defines CHAR_MIN. ])
fi
yes
#endif
], amanda_cv_have_char_max=yes, amanda_cv_have_char_max=no))
-if test "$amanda_cv_have_char_max" = yes; then
+if test "x$amanda_cv_have_char_max" = xyes; then
AC_DEFINE(HAVE_CHAR_MAX,1,[Define if limits.h defines CHAR_MAX. ])
fi
yes
#endif
], amanda_cv_have_char_bit=yes, amanda_cv_have_char_bit=no))
-if test "$amanda_cv_have_char_bit" = yes; then
+if test "x$amanda_cv_have_char_bit" = xyes; then
AC_DEFINE(HAVE_CHAR_BIT,1,[Define if limits.h defines CHAR_BIT. ])
fi
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(atexit)
ICE_CHECK_DECL(atof,stdlib.h)
+ICE_CHECK_DECL(atoi,stdlib.h)
+ICE_CHECK_DECL(atol,stdlib.h)
+ICE_CHECK_DECL(atoll,stdlib.h)
AC_CHECK_FUNCS(basename)
ICE_CHECK_DECL(bind,sys/types.h sys/socket.h)
ICE_CHECK_DECL(bcopy,string.h strings.h stdlib.h)
AC_CHECK_FUNCS(getvfsent initgroups isascii)
ICE_CHECK_DECL(initgroups,grp.h sys/types.h unistd.h libc.h)
ICE_CHECK_DECL(ioctl,sys/ioctl.h unistd.h libc.h)
+ICE_CHECK_DECL(isnormal,math.h)
ICE_CHECK_DECL(listen,sys/types.h sys/socket.h)
ICE_CHECK_DECL(lstat,sys/types.h sys/stat.h)
ICE_CHECK_DECL(malloc,stdlib.h)
ICE_CHECK_DECL(memmove,string.h strings.h)
ICE_CHECK_DECL(memset,string.h strings.h)
AC_CHECK_FUNCS(mkdir)
+ICE_CHECK_DECL(mkstemp,stdlib.h)
ICE_CHECK_DECL(mktemp,stdlib.h)
AC_REPLACE_FUNCS(mktime)
ICE_CHECK_DECL(mktime,time.h sys/time.h)
ICE_CHECK_DECL(setegid,unistd.h)
ICE_CHECK_DECL(seteuid,unistd.h)
AC_CHECK_FUNCS(setmntent)
+AC_CHECK_FUNCS(shquote)
+
ICE_CHECK_DECL(setresgid,unistd.h)
ICE_CHECK_DECL(setresuid,unistd.h)
ICE_CHECK_DECL(shmdt,sys/types.h sys/ipc.h sys/shm.h)
ICE_CHECK_DECL(shmget,sys/types.h sys/ipc.h sys/shm.h)
-if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
+if test "x$ac_cv_func_mmap_fixed_mapped" != xyes; then
case "$FORCE_MMAP" in
n | no)
- if test "$ac_cv_func_shmget" != yes; then
+ if test "x$ac_cv_func_shmget" != xyes; then
AC_MSG_WARN([*** Neither shmget() nor mmap() found!])
AC_MSG_WARN([*** This system will not support the Amanda server.])
NO_SERVER_MODE=true
esac
fi
-ICE_CHECK_DECL(shquote, stdlib.h)
-
dnl Some systems have snprintf but not vsnprintf. If either snprintf or
dnl vsnprintf are missing, then use the snprintf.c we provide.
ICE_CHECK_DECL(snprintf,stdio.h)
ICE_CHECK_DECL(vsprintf,stdio.h stdlib.h)
AC_CHECK_FUNC(wait4)
AC_REPLACE_FUNCS(waitpid)
+AC_REPLACE_FUNCS(writev)
+ICE_CHECK_DECL(writev, unistd.h sys/uio.h)
AC_REPLACE_FUNCS(strcasecmp)
ICE_CHECK_DECL(strcasecmp,string.h strings.h)
AC_CHECK_FUNCS(fnmatch)
-if test "$ac_cv_func_fnmatch" != yes -a "$USE_QUICK_AND_DIRTY_ESTIMATES" != yes ; then
- AC_MSG_WARN([--with-qde and no fnmatch -- gnutar exclude files will not work])
-fi
dnl disk device prefixes
AC_MSG_CHECKING(disk device prefixes)
df / | while read line; do
set -- $line
while test $# -gt 0; do
- if test "$1" = "/"; then
+ if test "x$1" = "x/"; then
echo $line
break 2
fi
])
rm -f /tmp/conftest.lock
])
-if test "$amanda_cv_posix_filelocking" = yes; then
+if test "x$amanda_cv_posix_filelocking" = xyes; then
AC_DEFINE(USE_POSIX_FCNTL,1,[Define to use Posix fcntl for file locking.])
HAS_WORKING_FILE_LOCK=1
fi
])
rm -f /tmp/conftest.lock
])
- if test "$amanda_cv_flock_filelocking" = yes; then
+ if test "x$amanda_cv_flock_filelocking" = xyes; then
AC_DEFINE(USE_FLOCK,1,[Define to use flock for file locking.])
HAS_WORKING_FILE_LOCK=1
fi
])
rm -f /tmp/conftest.lock
])
- if test "$amanda_cv_lockf_filelocking" = yes; then
+ if test "x$amanda_cv_lockf_filelocking" = xyes; then
AC_DEFINE(USE_LOCKF,1,[Define to use lockf for file locking.])
HAS_WORKING_FILE_LOCK=1
fi
])
rm -f /tmp/conftest.lock
])
- if test "$amanda_cv_lnlock_filelocking" = yes; then
+ if test "x$amanda_cv_lnlock_filelocking" = xyes; then
AC_DEFINE(USE_LNLOCK,1,[Define to use a hard-link based approach for file locking.])
HAS_WORKING_FILE_LOCK=1
fi
AM_CONDITIONAL(WANT_CHIO_SCSI, test x"$NO_CHIO_CHANGER_MODE" != x"true")
AM_CONDITIONAL(WANT_RUNTIME_PSEUDO_RELOC, test x"$NEED_RUNTIME_PSEUDO_RELOC" = x"true")
AM_CONDITIONAL(WANT_SETUID_CLIENT, test x"$NEED_SETUID_CLIENT" != x"false")
+AM_CONDITIONAL(WANT_SSH_SECURITY, test x"$SSH_SECURITY_SET" = x"true")
case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in
y | ye | yes) AC_DEFINE(USE_RUNDUMP,1,[Define to invoke rundump (setuid-root) instead of DUMP program directly. ]);;
LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/g'`
AC_SUBST(LTALLOCA)
+## This stuff is needed for the documentation.
+DOC_BUILD_DATE=`date '+%d-%m-%Y'`
+AC_SUBST(DOC_BUILD_DATE)
+
+AC_ARG_WITH(built-manpages,
+ [ --without-built-manpages Do not build manpages from XML source.],
+ [ BUILDMANPAGES=$withval; ],
+ [ BUILDMANPAGES=yes; ])
+AM_CONDITIONAL(BUILD_MAN_PAGES, test "x$BUILDMANPAGES" = "xyes")
+
+AC_PATH_PROGS(XSLTPROC,xsltproc,,$LOCSYSPATH)
+if test -z "$XSLTPROC"; then
+ USE_XSLTPROC=no
+ AC_MSG_WARN([can't find xsltproc, xsltproc support is unavailable])
+else
+ USE_XSLTPROC=yes
+ AC_DEFINE(HAVE_XSLTPROC,1,[xslt is available to generate man pages])
+fi
+AM_CONDITIONAL(HAVE_XSLTPROC, test "x$USE_XSLTPROC" = "xyes")
+
+#### Enforce amanda code cleanliness rules.
+#### Done here to allow configuration code to remain intact.
+if test "x$CC" = "xgcc"; then
+ AM_CFLAGS="$AM_CFLAGS -Wall"
+ $CC -v --help 2>&1 | $GREP -- '-Wextra ' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wextra"
+ else
+ AM_CFLAGS="$AM_CFLAGS -W"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wparentheses' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wparentheses"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wdeclaration-after-statement' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wdeclaration-after-statement"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wmissing-prototypes ' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wmissing-prototypes"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wstrict-prototypes ' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wstrict-prototypes"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wmissing-declarations ' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wmissing-declarations"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wformat' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wformat"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wsign-compare' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wsign-compare"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-fno-strict-aliasing' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -fno-strict-aliasing"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wfloat-equal' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wfloat-equal"
+ fi
+
+ $CC -v --help 2>&1 | $GREP -- '-Wold-style-definition' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wold-style-definition"
+ fi
+fi
+AC_SUBST(AM_CFLAGS)
+
AC_CONFIG_FILES([\
amplot/amcat.awk amplot/amplot.sh \
amplot/Makefile \
\
+ amandad-src/Makefile \
+ \
changer-src/chg-manual.sh changer-src/chg-multi.sh \
changer-src/chg-mtx.sh changer-src/chg-chs.sh \
changer-src/chg-rth.pl changer-src/chg-chio.pl \
\
client-src/patch-system.sh client-src/Makefile \
\
+ dumper-src/gnutar.pl dumper-src/generic-dumper.pl \
+ dumper-src/Makefile \
+ \
common-src/versuff.c common-src/Makefile \
\
example/amanda.conf example/Makefile \
- example/amanda.conf.chg-scsi example/chg-scsi-linux.conf \
- example/chg-scsi-solaris.conf example/chg-scsi-hpux.conf \
- example/chg-mcutil.conf \
+ example/chg-mcutil.conf example/amanda-client.conf \
\
man/Makefile \
\
docs/Makefile \
\
recover-src/Makefile \
+
+ oldrecover-src/Makefile \
\
restore-src/Makefile \
\
server-src/amoverview.pl server-src/amrmtape.sh \
server-src/amtoc.pl server-src/amverify.sh \
server-src/Makefile server-src/amstatus.pl \
- server-src/amverifyrun.sh \
- \
+ server-src/amverifyrun.sh server-src/amcrypt.sh \
+ server-src/amaespipe.sh server-src/amcrypt-ossl.sh \
+ server-src/amcrypt-ossl-asym.sh \
tape-src/Makefile \
\
config/Makefile Makefile])
+
AC_OUTPUT