-AC_DEFINE_UNQUOTED(DEFAULT_CHANGER_DEVICE,"$DEFAULT_CHANGER_DEVICE",[This is the default changer device. ])
-AC_SUBST(DEFAULT_CHANGER_DEVICE)
-
-AC_ARG_WITH(fqdn,
- [ --with-fqdn use FQDN's to backup multiple networks],
- USE_FQDN=$withval,
- : ${USE_FQDN=no}
-)
-case "$USE_FQDN" in
-n | no) : ;;
-y | ye | yes) AC_DEFINE(USE_FQDN,1,[Define for backups being done on a multiple networks and FQDNs are used. ])
- ;;
-*) AC_MSG_ERROR([*** You must not supply an argument to --with-fqdn option.])
- ;;
-esac
-
-AC_ARG_WITH(broken-fsf,
- [ --with-broken-fsf only enable if tape fsf calls fail mid-file],
- HAVE_BROKEN_FSF=$withval,
- : ${HAVE_BROKEN_FSF=no}
-)
-case "$HAVE_BROKEN_FSF" in
-n | no) : ;;
-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
- * mark, for instance, if amrecover gives I/O errors when skipping.
-])
- ;;
-*) AC_MSG_ERROR([*** You must not supply an argument to --with-broken-fsf option.])
- ;;
-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]]],
- [
- case "$withval" in
- /*) GNUTAR="$withval";;
- y|ye|yes) :;;
- n|no) GNUTAR=;;
- *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar]);;
- esac
- ]
-)
-
-AC_ARG_WITH(smbclient,
- [ --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=;;
- *) AC_MSG_ERROR([*** You must supply a full pathname to --with-smbclient]);;
- esac
- ]
-)
-
-AC_ARG_WITH(samba-user,
- [ --with-samba-user was deprecated],
- [ AC_MSG_ERROR([*** The samba-user option was deprecated, the username go in the amandapass])
- ]
-)
-
-AC_ARG_WITH(gnutar-listdir,
- [ --with-gnutar-listdir=DIR gnutar directory lists go in DIR [[localstatedir/amanda/gnutar-lists]]],
- [
- case "$withval" in
- n | no) unset GNUTAR_LISTDIR ;;
- y | ye | yes) : ${GNUTAR_LISTDIR=$localstatedir/amanda/gnutar-lists} ;;
- /*) GNUTAR_LISTDIR="$withval" ;;
- *) AC_MSG_ERROR([*** You must supply a full pathname to --with-gnutar-listdir])
- esac
- ],
- : ${GNUTAR_LISTDIR="$localstatedir/amanda/gnutar-lists"}
-)
-if test "$GNUTAR_LISTDIR"; then
- GNUTAR_LISTDIR=`(
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- eval echo "$GNUTAR_LISTDIR"
- )`
- AC_DEFINE_UNQUOTED(GNUTAR_LISTED_INCREMENTAL_DIR,"$GNUTAR_LISTDIR",[The directory in which GNU tar should store directory lists for incrementals. ])
- GNUTAR_LISTED_INCREMENTAL_DIRX=$GNUTAR_LISTDIR
-else
- GNUTAR_LISTED_INCREMENTAL_DIRX=
-fi
-AC_SUBST(GNUTAR_LISTED_INCREMENTAL_DIRX)
-
-AC_ARG_WITH(gnutar-listed-incremental,
- [ --with-gnutar-listed-incremental was deprecated, use --with-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],
- BSD_SECURITY=$withval,
- : ${BSD_SECURITY=yes}
-)
-case "$BSD_SECURITY" in
-n | no) : ;;
-y | ye | yes) AC_DEFINE(BSD_SECURITY,1,[Define to use BSD .rhosts/.amandahosts security. ])
- ;;
-*) AC_MSG_ERROR([*** You must not supply an argument to --with-bsd-security option.])
- ;;
-esac
-
-AC_ARG_WITH(amandahosts,
- [ --without-amandahosts use .rhosts instead of .amandahosts],
- USE_AMANDAHOSTS=$withval,
- : ${USE_AMANDAHOSTS=yes}
-)
-case "$USE_AMANDAHOSTS" in
-n | no) : ;;
-y | ye | yes) :
- case "$BSD_SECURITY" in
- y | ye | yes) AC_DEFINE(USE_AMANDAHOSTS,1,[Define if you want to use the .amandahosts for BSD security. ])
- ;;
- esac
- ;;
-*) AC_MSG_ERROR([*** You must not supply an argument to --with-amandahosts option.])
- ;;
-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
-
-AC_ARG_WITH(ipv6,
- AS_HELP_STRING([--with-ipv6],
- [If IPv6 must be enabled (Default)])
-AS_HELP_STRING([--without-ipv6],
- [If IPv6 must be disable]),
- [
- case "$withval" in
- y | ye | yes) amanda_ipv6=true;;
- n | no) amanda_ipv6=false;;
- *)
- AC_MSG_ERROR([*** You must not supply an argument to --with-ipv6 option.])
- ;;
- 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]]],
- KRB4_SECURITY="$withval",
- : ${KRB4_SECURITY=no}
-)
-
-case "$KRB4_SECURITY" in
-n | no) KRB4_SECURITY=no ;;
-y | ye | yes) : ;;
-*) KRB4_SPOTS="$KRB4_SECURITY"
- KRB4_SECURITY=yes
- ;;
-esac
-
-AC_MSG_CHECKING(for Kerberos and Amanda kerberos4 bits)
-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
- #
- # This is the original Kerberos 4.
- #
- AC_MSG_RESULT(found in $dir)
- KRB4_SECURITY=yes
- AC_DEFINE(KRB4_SECURITY, 1, [Enable Kerberos security. ])
- if test -d $dir/include/kerberosIV ; then
- #
- # This handles BSD/OS.
- #
- KRB4INCLUDES=-I$dir/include/kerberosIV
- else
- KRB4INCLUDES=-I$dir/include
- fi
- KRB4LDFLAGS=-L$dir/lib
- KRB4LIBS="-lkrb -ldes"
- if test -f ${dir}/lib/libcom_err.a; then
- KRB4LIBS="$KRB4LIBS -lcom_err"
- fi
- break
- elif test -f ${dir}/lib/libkrb4.a &&
- test -f ${dir}/lib/libcrypto.a &&
- test -f ${dir}/lib/libdes425.a ; then
- #
- # This is Kerberos 5 with Kerberos 4 back-support.
- #
- 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.a &&
- test -f ${dir}/lib/libcom_err.a; then
- KRB4LIBS="-lkrb4 -lkrb5 -lcrypto -ldes425 -lcom_err"
- else
- KRB4LIBS="-lkrb4 -lcrypto -ldes425"
- fi
- break
- fi
- done
-
- 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 to --with-ssh-security.])
- ;;
-esac
-
-# find SSH and check for SSH options if we're using SSH security
-if test x"$SSH_SECURITY" = "xyes"; then
- AC_PATH_PROGS(SSH, ssh, , $LOCSYSPATH)
- AC_DEFINE_UNQUOTED(SSH, "$SSH", [Path to the SSH binary])
-
- AC_ARG_WITH(ssh-options,
- AS_HELP_STRING([--with-ssh-options=@<:@OPTIONS@:>@],
- [Use these ssh options for ssh security; the default should work]),
- [ SSH_OPTIONS="$withval" ],
- [ SSH_OPTIONS='' ]
- )
-
- case "$SSH_OPTIONS" in
- y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to --with-ssh-options.]);;
- *) : ;;
- esac
-
- AC_MSG_CHECKING([SSH options])
- # if we didn't get SSH options from the user, figure them out for ourselves
- if test -z "$SSH_OPTIONS"; then
- # TODO - quote these (or break them up in ssh-security??)
- case `$SSH -V 2>&1` in
- OpenSSH*) SSH_OPTIONS='-x -o BatchMode=yes -o PreferredAuthentications=publickey';;
- *) SSH_OPTIONS='-x -o BatchMode=yes'
- esac
- fi
-
- # now convert that to a comma-separated list of C strings
- eval "set dummy ${SSH_OPTIONS}"; shift
- SSH_OPTIONS=''
- for i in "${@}"; do SSH_OPTIONS="${SSH_OPTIONS}${SSH_OPTIONS:+, }\"${i/\"/\\\"}\""; done
- AC_MSG_RESULT($SSH_OPTIONS)
-
- AC_DEFINE_UNQUOTED(SSH_OPTIONS, $SSH_OPTIONS, [Arguments to ssh])
-fi
-
-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 udp 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"]]],
- [
- case "$withval" in
- "" | y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to the --with-server-principal option.])
- ;;
- *)
- SERVER_HOST_PRINCIPLE="$withval"
- ;;
- esac
- ],
- : ${SERVER_HOST_PRINCIPLE="amanda"}
-)
-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"]]],
- [
- case "$withval" in
- "" | y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to the --with-server-instance option.])
- ;;
- *) SERVER_HOST_INSTANCE="$withval"
- ;;
- esac
- ],
- : ${SERVER_HOST_INSTANCE="amanda"}
-)
-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"]]],
- [
- case "$withval" in
- "" | y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to the --with-server-keyfile option.])
- ;;
- *) SERVER_HOST_KEY_FILE="$withval"
- ;;
- esac
- ],
- : ${SERVER_HOST_KEY_FILE="/.amanda"}
-)
-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"]]],
- [
- case "$withval" in
- "" | y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to the --with-client-principal option.])
- ;;
- *) CLIENT_HOST_PRINCIPLE="$withval"
- ;;
- esac
- ],
- : ${CLIENT_HOST_PRINCIPLE="rcmd"}
-)
-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]]],
- [
- case "$withval" in
- "" | y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to the --with-client-instance option.])
- ;;
- *) CLIENT_HOST_INSTANCE="$withval"
- ;;
- esac
- ],
- : ${CLIENT_HOST_INSTANCE=HOSTNAME_INSTANCE}
-)
-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]]],
- [
- case "$withval" in
- "" | y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to the --with-client-keyfile option.])
- ;;
- *) CLIENT_HOST_KEY_FILE="$withval"
- ;;
- esac
- ],
- : ${CLIENT_HOST_KEY_FILE=KEYFILE}
-)
-
-# Assume it's either KEYFILE (defined in krb.h), or a string filename...
-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]]],
- [
- case "$withval" in
- "" | y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to the --with-ticket-lifetime option.])
- ;;
- *) TICKET_LIFETIME="$withval"
- ;;
- esac
- ],
- : ${TICKET_LIFETIME=128}
-)
-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=-lk5crypto
- elif test -f ${k5libdir}/libcrypto.a; then
- K5CRYPTO=-lcrypto
- else
- K5CRYPTO=""
- fi
- if test -f ${k5libdir}/libkrb5support.a; then
- K5SUPPORT=-lkrb5support
- else
- K5SUPPORT=""
- fi
- KRB5_DIR_FOUND=$dir
- KRB5LIBS="-lgssapi_krb5 -lkrb5 $K5CRYPTO $K5SUPPORT -lcom_err"
- KRB5CFLAGS=""
- break
- elif test -f ${k5libdir}/libkrb5.a -a -f ${k5libdir}/libasn1.a -a -f ${k5libdir}/libgssapi.a; then
- KRB5_DIR_FOUND=$dir
- KRB5LIBS="-lgssapi.a -lkrb5.a -lasn1.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(low-tcpportrange,
- [ --with-low-tcpportrange=low,high bind reserved TCP server sockets to ports within this range [unlimited] (mainly for amrecover)],
- [
- 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]]],
- [
- TCPPORTRANGE="$withval"
- ]
-)
-if test x"${TCPPORTRANGE+set}" = x"set"; then
- if test x`echo "$TCPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
- AC_MSG_ERROR([*** --with-tcpportrange requires two comma-separated positive numbers])
- fi
- min_tcp_port=`echo "$TCPPORTRANGE" | sed 's/,.*//'`
- max_tcp_port=`echo "$TCPPORTRANGE" | sed 's/.*,//'`
- if test $min_tcp_port -gt $max_tcp_port; then
- AC_MSG_ERROR([*** the second TCP port number must be greater than the first in --with-tcpportrange])
- fi
- if test $min_tcp_port -lt 1024; then
- AC_MSG_WARN([*** the TCP port range should be 1024 or greater in --with-tcpportrange])
- fi
- if test $max_tcp_port -ge 65536; then
- AC_MSG_WARN([*** the TCP port range should be less than 65536 in --with-tcpportrange])
- fi
- AC_DEFINE_UNQUOTED(TCPPORTRANGE,$TCPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
- maximum unreserved TCP port numbers sockets should be bound to. ])
-fi
-
-AC_ARG_WITH(udpportrange,
- [ --with-udpportrange=low,high bind reserved UDP server sockets to ports within this range [[unlimited]]],
- [
- UDPPORTRANGE="$withval"
- ]
-)
-if test x"${UDPPORTRANGE+set}" = x"set"; then
- if test x`echo "$UDPPORTRANGE" | sed 's/[[0-9]][[0-9]]*,[[0-9]][[0-9]]*//'` != x""; then
- AC_MSG_ERROR([*** --with-udpportrange requires two comma-separated positive numbers])
- fi
- min_udp_port=`echo "$UDPPORTRANGE" | sed 's/,.*//'`
- max_udp_port=`echo "$UDPPORTRANGE" | sed 's/.*,//'`
- if test $min_udp_port -gt $max_udp_port; then
- AC_MSG_ERROR([*** the second UDP port number must be greater than the first in --with-udpportrange])
- fi
- if test $max_udp_port -ge 1024; then
- AC_MSG_WARN([*** the UDP port range should be less than 1024 in --with-udpportrange])
- fi
- if test $min_udp_port -le 0; then
- AC_MSG_WARN([*** the UDP port range should be greater than 0 in --with-udpportrange])
- fi
- AC_DEFINE_UNQUOTED(UDPPORTRANGE,$UDPPORTRANGE,[A comma-separated list of two integers, determining the minimum and
- maximum reserved UDP port numbers sockets should be bound to. ])
-fi
-
-AC_ARG_WITH(maxtapeblocksize,
- [ --with-maxtapeblocksize=kb Maximum size of a tape block],
- [
- MAXTAPEBLOCKSIZE="$withval"
- ],
- : ${MAXTAPEBLOCKSIZE=32}
-)
-
-AC_DEFINE_UNQUOTED(MAX_TAPE_BLOCK_KB,($MAXTAPEBLOCKSIZE),[Maximum size of a tape block in KBytes.])
-AC_SUBST(MAXTAPEBLOCKSIZE)
-
-AC_ARG_WITH(db,
- [ --with-db={text,db,dbm,gdbm,ndbm} use the selected database format [[text]]],
- [
- case "$withval" in
- "" | y | ye | yes | n | no)
- AC_MSG_ERROR([*** You must supply an argument to the --with-db option.])
- ;;
- *) DB_STYLE="$withval"
- ;;
- esac
- ]
-)
-if test "$DB_STYLE"; then
- case "$DB_STYLE" in
- db | dbm | gdbm | ndbm | text) ;;
- *)
- AC_MSG_ERROR([*** Unknown argument $DB_STYLE given to --with-db. Choose from db, dbm, gdbm, ndbm, text.])
- DB_STYLE=
- ;;
- esac
-fi
-
-AC_ARG_WITH(mmap,
- [ --with-mmap force use of mmap instead of shared memory support],
- FORCE_MMAP=$withval,
- : ${FORCE_MMAP=no}
-)
-case "$FORCE_MMAP" in
-y | ye | yes | n | no) : ;;
-*) AC_MSG_ERROR([*** You must not supply an argument to --with-mmap.])
- ;;
-esac
-
-AC_ARG_WITH(buffered-dump,
- [ --with-buffered-dump buffer the dumping sockets on the server for speed],
- DUMPER_SOCKET_BUFFERING=$withval,
- : ${DUMPER_SOCKET_BUFFERING=no}
-)
-case "$DUMPER_SOCKET_BUFFERING" in
-n | no) :
- ;;
-y | ye | yes) AC_DEFINE(DUMPER_SOCKET_BUFFERING,1,[Define if dumper should buffer the sockets for faster throughput. ])
- ;;
-*) AC_MSG_ERROR([*** You must not supply an argument to --with-buffered-dump.])
- ;;
-esac
-
-AC_ARG_WITH(assertions,
- [ --with-assertions compile assertions into code],
- ASSERTIONS="$withval",
- : ${ASSERTIONS=no}
-)
-case "$ASSERTIONS" in
-n | no) : ;;
-y | ye | yes) AC_DEFINE(ASSERTIONS,1,[Define if you want assertion checking. ])
- ;;
-*) AC_MSG_ERROR([*** You must not supply an argument to --with-assertions option.])
- ;;
-esac
-
-AC_ARG_WITH(tmpdir,
- [ --with-tmpdir[=/temp/dir] area Amanda can use for temp files [[/tmp/amanda]]],
- tmpdir="$withval",
- : ${tmpdir=yes}
-)
-tmpdir=`(
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
- eval echo "$tmpdir"
-)`
-case "$tmpdir" in
-n | no) AC_MSG_ERROR([*** --without-tmpdir is not allowed.]);;
-y | ye | yes)
- AMANDA_TMPDIR="/tmp/amanda";;
-/*)
- AMANDA_TMPDIR="$tmpdir";;
-*) AC_MSG_ERROR([*** You must supply a full pathname to --with-tmpdir option.]);;
-esac
-AC_DEFINE_UNQUOTED(AMANDA_TMPDIR,"$AMANDA_TMPDIR",[The directory in which Amanda should create temporary files. ])
-AC_SUBST(AMANDA_TMPDIR)
-
-AC_ARG_WITH(debugging,
- [ --with[[out]]-debugging[[=/debug/dir]] [[do not]] record runtime debugging information in specified directory [[--with-tmpdir]]],
- debugging="$withval",
- : ${debugging=yes}
-)
-debugging=`(
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
- eval echo "$debugging"
-)`
-case "$debugging" in
-n | no) AMANDA_DBGDIR="";;
-y | ye | yes) AMANDA_DBGDIR="$AMANDA_TMPDIR";;
-/*) AMANDA_DBGDIR="$debugging";;
-*) AC_MSG_ERROR([*** You must supply a full pathname to --with-debugging option.])
- ;;
-esac
-case "$AMANDA_DBGDIR" in
-"") :;;
-*) AC_DEFINE(DEBUG_CODE,1,[Define if you want debugging. ])
- AC_DEFINE_UNQUOTED(AMANDA_DBGDIR,"$AMANDA_DBGDIR",[Location of Amanda directories and files. ])
- AC_SUBST(AMANDA_DBGDIR);;
-esac
-
-AC_ARG_WITH(debug_days,
- [ --with-debug-days=NN number of days to keep debugging files [[default=4]]],
- debug_days="$withval",
- : ${debug_days=4}
-)
-case "$debug_days" in
-n | no) AMANDA_DEBUG_DAYS=0 ;;
-y | ye | yes) AMANDA_DEBUG_DAYS=4 ;;
-[[0-9]] | [[0-9]][[0-9]] | [[0-9]][[0-9]][[0-9]]) AMANDA_DEBUG_DAYS="$debug_days" ;;
-*) AC_MSG_ERROR([*** --with-debug-days value not numeric or out of range.])
- ;;
-esac
-AC_DEFINE_UNQUOTED(AMANDA_DEBUG_DAYS,$AMANDA_DEBUG_DAYS,[Number of days to keep debugging files. ])
-AC_SUBST(AMANDA_DEBUG_DAYS)
-
-AC_ARG_WITH(testing,
- [ --with-testing[[=suffix]] use alternate service names],
- TESTING="$withval",
- : ${TESTING=no}
-)
-case "$TESTING" in
-n | no) SERVICE_SUFFIX="";;
-y | ye | yes) SERVICE_SUFFIX="-test";;
-*) SERVICE_SUFFIX="-$TESTING";;
-esac
-AMANDA_SERVICE_NAME="amanda$SERVICE_SUFFIX"
-KAMANDA_SERVICE_NAME="kamanda$SERVICE_SUFFIX"
-AC_SUBST(SERVICE_SUFFIX)
-AC_DEFINE_UNQUOTED(SERVICE_SUFFIX, "$SERVICE_SUFFIX",[A suffix that will be appended to service names.
- * Useful for testing in parallel with a working version. ])
-AC_DEFINE_UNQUOTED(AMANDA_SERVICE_NAME, "$AMANDA_SERVICE_NAME", [The name for the Amanda service. ])
-AC_DEFINE_UNQUOTED(KAMANDA_SERVICE_NAME, "$KAMANDA_SERVICE_NAME", [The name for the Kerberized Amanda service. ])
-
-(
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
-
- tmp=`eval echo "$bindir"`
- AC_DEFINE_UNQUOTED(bindir,"$tmp",[Directory in which user binaries should be installed. ])
-
- tmp=`eval echo "$sbindir"`
- AC_DEFINE_UNQUOTED(sbindir,"$tmp",[Directory in which administrator binaries should be installed. ])
-
- tmp=`eval echo "$libexecdir"`
- AC_DEFINE_UNQUOTED(libexecdir,"$tmp",[Directory in which internal binaries should be installed. ])
-
- tmp=`eval echo $mandir`
- AC_DEFINE_UNQUOTED(mandir,"$tmp",[Directory in which man-pages should be installed])
-)
-
-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
-dnl the backup program while AIX systems can't use the dump program. So
-dnl a variable is set up here to specify the order of dump programs to
-dnl search for on the system.
-DUMP_PROGRAMS="ufsdump dump backup"
-GETCONF_LFS="LFS"
-
-dump_returns_1=
-xenix_tapeio=
-case "$target" in
- *-dec-osf*)
- AC_DEFINE(STATFS_OSF1,1,[Define on OSF1. ])
- ;;
- *-dg-*)
- DUMP_PROGRAMS="dump "$DUMP_PROGRAMS
- : ${USE_RUNDUMP=yes}
- dump_returns_1=yes
- ;;
- *-netbsd*)
- ;;
- *-freebsd*)
- ;;
- *-openbsd*)
- ;;
- *-hp-*)
- MT_FILE_FLAG="-t"
- GETCONF_LFS="XBS5_ILP32_OFFBIG"
- case "$CC" in
- *gcc*)
- AMANDA_CPPFLAGS="-D__STDC_EXT__ $AMANDA_CPPFLAGS"
- ;;
- *cc*)
- AMANDA_CFLAGS="-Ae $AMANDA_CFLAGS"
- ;;
- esac
- ;;
- *-ibm-aix*)
- GETCONF_LFS="XBS5_ILP32_OFFBIG"
- DUMP_PROGRAMS="backup "$DUMP_PROGRAMS
- AC_DEFINE(AIX_TAPEIO,1,[Define on AIX. ])
- AC_DEFINE(AIX_BACKUP,1,[Define on AIX. ])
- ;;
- m88k-motorola-sysv4)
- ;;
- *-nextstep3)
- ;;
- *-pc-bsdi*)
- ;;
- *-pc-linux-*)
- ;;
- *-redhat-linux-*)
- ;;
- *-suse-linux-*)
- ;;
- x86_64-*-linux-*)
- ;;
- alpha*-*-linux-*)
- ;;
- sparc*-*-linux-*)
- ;;
- powerpc-*-linux-*)
- ;;
- *-sgi-irix3*)
- dnl The old cc won't work!
- CC=gcc
- ;;
- *-sgi-irix4*)
- ;;
- *-sgi-irix5*)
- ;;
- *-sgi-irix6*)
- ;;
- *-solaris2*)
- ;;
- *-sun-sunos4.1*)
- ;;
- *-ultrix*)
- : ${USE_RUNDUMP=yes}
- AC_DEFINE(STATFS_ULTRIX,1,[Define on Ultrix. ])
- dump_returns_1=yes
- ;;
- *-sysv4.2uw2*)
- AC_DEFINE(UWARE_TAPEIO,1,[Define on UnixWare. ])
- ;;
- *-sco3.2v4*)
- DEV_PREFIX=/dev/
- RDEV_PREFIX=/dev/
- ;;
- *-sco3.2v5*)
- xenix_tapeio=yes
- AC_DEFINE(STATFS_SCO_OS5,1,[Define on SCO OS5. ])
- ;;
- i386-pc-isc4*)
- xenix_tapeio=yes
- ;;
- *-sni-sysv4)
- ;;
- *-pc-cygwin)
- AC_DEFINE(IGNORE_TAR_ERRORS,1,[Define on Cygwin. ])
- # Cygwin needs PATH to find cygwin1.dll
- AC_DEFINE(NEED_PATH_ENV,1,[Define on Cygwin. ])
- AC_DEFINE(IGNORE_UID_CHECK,1,[Define on Cygwin. ])
- AC_DEFINE(IGNORE_FSTAB,1,[Define on Cygwin. ])
- AC_DEFINE(DONT_SUID_ROOT,1,[Define on Cygwin. ])
- NEED_SETUID_CLIENT=false
- NEED_RUNTIME_PSEUDO_RELOC=true
- BROKEN_IPV6=true
- ;;
- *)
- cat <<END
-
-*****
-This machine, target type $target, is not known
-to be fully supported by this configure script. If the
-installation of Amanda on this system succeeds or needed
-any patches, please email amanda-hackers@amanda.org with
-the patches or an indication of the sucess or failure of
-the Amanda installation on your system.
-*****
-
-END
- ;;
-esac
-
-if test -n "$dump_returns_1"; then
- AC_DEFINE(DUMP_RETURNS_1,1,[Define this if this system's dump exits with 1 as a success code. ])
-fi