-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.5.0p2)
+AM_INIT_AUTOMAKE(amanda, 2.5.1p3)
AM_CONFIG_HEADER(config/config.h)
AC_PREREQ(2.57) dnl Minimum Autoconf version required.
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}
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-includes option.])
+ 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],
[
done
fi
+dnl
+dnl Process configuration flags
+dnl
+
AC_ARG_WITH(dumperdir,
[ --with-dumperdir=DIR where we install the dumpers [[EPREFIX/dumper]]],
[
*) DEFAULT_TAPE_DEVICE="$withval"
;;
esac
- ],
- [
- if test -z "$DEFAULT_TAPE_DEVICE"; then
- AC_MSG_CHECKING(for non-rewinding tape device)
- dnl Check for the /dev/rmt directory and use what's in there.
- dnl Otherwise look for tape devices in /dev. For the devices
- dnl in /dev/rmt, we want to use the Berkeley behavior of
- dnl reading the first record of the next tape file after 0
- 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=null:
- nr_tape_dev=null:
- if test -d /dev/rmt; then
-
- dnl See if we can find two devices, one being the norewind
- dnl version of the other. Devices in this directory are
- dnl normally a digit followed by some characters. We also
- dnl want the Berkely behavior, since Amanda needs it for
- dnl amrestore.
-
- for num in 9 8 7 6 5 4 3 2 1 0; do
- td=/dev/rmt/${num}b
- ntd=/dev/rmt/${num}bn
- if test -r $td -a -r $ntd; then
- tape_dev=$td
- nr_tape_dev=$ntd
- fi
- done
- else
- dnl Look for tape devices in /dev.
- for num in 9 8 7 6 5 4 3 2 1 0; do
- td=/dev/rst${num}
- ntd=/dev/nrst${num}
- if test -r $td -a -r $ntd; then
- tape_dev=$td
- nr_tape_dev=$ntd
- fi
- done
- fi
- DEFAULT_TAPE_DEVICE=$nr_tape_dev
- AC_MSG_RESULT($DEFAULT_TAPE_DEVICE)
- fi
]
)
-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],
[
[
if test -z "$DEFAULT_RAW_TAPE_DEVICE"; then
AC_MSG_CHECKING(for raw ftape device)
- dnl Look for tape devices in /dev.
+ dnl Look for tape devices in /dev.
raw_tape_dev=/dev/null
dnl Look for tape devices in /dev.
for num in 3 2 1 0 ; do
;;
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]]],
[
DBMALLOCLIBS=""
;;
*)
- DBMALLOCCFLAGS="-I$DBMALLOC -DUSE_DBMALLOC"
- DBMALLOCLIBS="-L$DBMALLOC -ldbmalloc"
+ 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.
;;
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 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"]]],
[
KRB5_DIR_FOUND=""
KRB5_CFLAGS=""
for dir in $KRB5_SPOTS; do
- k5libdir=${dir}/lib
+ 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}/libcrypto.a; then
- K5CRYPTO=${k5libdir}/libcrypto.a
- elif test -f ${k5libdir}/libk5crypto.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 ${k5libdir}/libcom_err.a"
+ 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_CFLAGS="-DKRB5_HEIMDAL_INCLUDES"
break
fi
+ done
done
if test "$KRB5_DIR_FOUND"; then
if test "$KRB5_CFLAGS" ; then
KRB5INCLUDES="$KRB5INCLUDES $KRB5_CFLAGS"
fi
+ AC_CHECK_LIB(krb5support,main)
KRB5LDFLAGS=-L$k5libdir
break
fi
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]]],
[
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-*)
AC_DEFINE(DONT_SUID_ROOT,1,[Define on Cygwin. ])
NEED_SETUID_CLIENT=false
NEED_RUNTIME_PSEUDO_RELOC=true
+ BROKEN_IPV6=true
;;
*)
cat <<END
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
AC_DEFINE_UNQUOTED(UNCOMPRESS_PATH,"$UNCOMPRESS_PATH",[Define as the exact path to the gzip or compress command. ])
AC_DEFINE_UNQUOTED(UNCOMPRESS_OPT,"$UNCOMPRESS_OPT",[Define as any optional arguments to get UNCOMPRESS_PATH to uncompress. ])
+AC_PATH_PROGS(SORT,sort,,$LOCSYSPATH)
+if test -z "$SORT"; then
+ if $NO_SERVER_MODE; then
+ SORT="NONE"
+ else
+ AC_MSG_ERROR([Set SORT to the path of the sort program.])
+ fi
+fi
+AC_DEFINE_UNQUOTED(SORT_PATH,"$SORT",[Define to the exact path to the sort program. ])
+
AC_PATH_PROGS(MAILER,Mail mailx mail)
if test -z "$MAILER"; then
if $NO_SERVER_MODE; then
}
],
[AC_MSG_RESULT(ll)
- LL_FMT="%lld"],
+ LL_FMT="%lld"; LL_RFMT="lld"],
[AC_MSG_RESULT(l)
- LL_FMT="%ld"],
+ LL_FMT="%ld"; LL_RFMT="ld"],
[AC_MSG_RESULT(assuming target platform uses ll)
- LL_FMT="%lld"])
+ LL_FMT="%lld"; LL_RFMT="lld"])
AC_DEFINE_UNQUOTED(LL_FMT,"$LL_FMT",
[Format for a long long printf. ])
+AC_DEFINE_UNQUOTED(LL_RFMT,"$LL_RFMT",
+ [Format for a long long printf. ])
AC_SUBST(LL_FMT)
+AC_SUBST(LL_RFMT)
dnl Empty GZIP so that make dist works.
GZIP=
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(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_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],
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 \
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,
- READLINE_LIBS="-lreadline"; AC_SUBST(READLINE_LIBS)
- )
- if test "x$ac_cv_lib_readline_readline" != xyes; then
+ AC_CHECK_LIB(readline,readline)
+ 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_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)
+ICE_CHECK_DECL(strtol,stdlib.h)
+ICE_CHECK_DECL(strtoll,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)
AC_CHECK_FUNCS(fnmatch)
-AC_SYS_LARGEFILE
dnl disk device prefixes
AC_MSG_CHECKING(disk device prefixes)
DOC_BUILD_DATE=`date '+%d-%m-%Y'`
AC_SUBST(DOC_BUILD_DATE)
-AC_ARG_WITH(xsltproc,
+AC_ARG_WITH(built-manpages,
[ --without-built-manpages Do not build manpages from XML source.],
- [ case "$withval" in
- y | ye | yes)
- USE_XSLTPROC=yes;;
- n | no)
- USE_XSLTPROC=no;;
- *)
- USE_XSLTPROC=yes;
- XSLTPROC="$withval";;
- esac
- ],
- [ USE_XSLTPROC=maybe; ])
+ [ 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
-AC_DEFUN([AC_PATH_XSLTPROC], [AC_PATH_PROG(XSLTPROC, xsltproc)])
+ $CC -v --help 2>&1 | $GREP -- '-Wparentheses' 2>&1 > /dev/null
+ if test $? -eq 0; then
+ AM_CFLAGS="$AM_CFLAGS -Wparentheses"
+ fi
-# This looks bad, but && and || have equal precedence in shells, so
-# actually it's all OK.
-if test "$USE_XSLTPROC" = "yes" || test "$USE_XSLTPROC" = "maybe" && \
- test -z "$XSLTPROC"; then
- AC_PATH_XSLTPROC
- if test -n "$XSLTPROC"; then
- USE_XSLTPROC=yes;
- else
- if test "$USE_XSLTPROC" = yes; then
- AC_MSG_ERROR([can't find xsltproc, but running with --with-xsltproc.])
- else
- USE_XSLTPROC=no;
- fi
- fi
-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
-AM_CONDITIONAL(HAVE_XSLTPROC, test "$USE_XSLTPROC" = yes)
+ $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 \
common-src/versuff.c common-src/Makefile \
\
example/amanda.conf example/Makefile \
- 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/amtoc.pl server-src/amverify.sh \
server-src/Makefile server-src/amstatus.pl \
server-src/amverifyrun.sh server-src/amcrypt.sh \
- server-src/amaespipe.sh \
- \
+ server-src/amaespipe.sh server-src/amcrypt-ossl.sh \
+ server-src/amcrypt-ossl-asym.sh \
tape-src/Makefile \
\
config/Makefile Makefile])
+
AC_OUTPUT