X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=configure.in;h=e56c7b857fd69b260fe1b138ea685d12f15c76b5;hb=eefb15c5c04acb3c75f0c704ea664feb1bbae75c;hp=ff7e4901c46490a2deb720ab4f96ea92f0fafba3;hpb=bde83ad58d800ae004caccab6531234272181da2;p=debian%2Famanda diff --git a/configure.in b/configure.in index ff7e490..e56c7b8 100644 --- a/configure.in +++ b/configure.in @@ -14,10 +14,10 @@ AC_DEFINE_UNQUOTED(CONFIGURE_COMMAND,"$CONFIGURE_COMMAND", [Saves the original ./configure command line arguments]) AC_SUBST(CONFIGURE_COMMAND) -AM_INIT_AUTOMAKE(amanda, 2.4.5p1) +AM_INIT_AUTOMAKE(amanda, 2.5.0) 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" @@ -61,11 +61,22 @@ SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/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" +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.]) + ;; + esac + CFLAGS="$withval" + ]) + AC_ARG_WITH(includes, [ --with-includes=DIR site header files for readline, etc in DIR], [ @@ -102,7 +113,7 @@ if test "$LIBRARY_DIRS"; then for dir in $LIBRARY_DIRS; do if test -d "$dir"; then case "$target" in - *-solaris2*) + *-solaris2*,*-netbsd*) AMANDA_LDFLAGS="$AMANDA_LDFLAGS -R$dir" ;; esac @@ -113,8 +124,31 @@ if test "$LIBRARY_DIRS"; then done fi +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) @@ -124,7 +158,7 @@ AC_ARG_WITH(configdir, ;; esac ], - : ${CONFIG_DIR=$sysconfdir/amanda} + : ${CONFIG_DIR="$sysconfdir/amanda"} ) CONFIG_DIR=`( test "x$prefix" = xNONE && prefix=$ac_default_prefix @@ -162,7 +196,7 @@ y | ye | yes) 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. @@ -172,14 +206,14 @@ EOF_SED 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 @@ -291,7 +325,7 @@ AC_ARG_WITH(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) @@ -322,7 +356,7 @@ 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) @@ -341,7 +375,7 @@ AC_DEFINE_UNQUOTED(CLIENT_LOGIN,"$CLIENT_LOGIN", 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) @@ -358,7 +392,7 @@ fi 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) @@ -387,7 +421,7 @@ AC_ARG_WITH(rundump, ) AC_ARG_WITH(config, - [ --with-config=CONFIG default configuration [DailySet1]], + [ --with-config=CONFIG default configuration [[DailySet1]]], [ case "$withval" in "" | y | ye | yes | n | no) @@ -404,7 +438,7 @@ AC_DEFINE_UNQUOTED(DEFAULT_CONFIG,"$DEFAULT_CONFIG", 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) @@ -440,8 +474,8 @@ AC_ARG_WITH(tape-device, 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=null: + nr_tape_dev=null: if test -d /dev/rmt; then dnl See if we can find two devices, one being the norewind @@ -530,7 +564,7 @@ AC_ARG_WITH(norew-tape, ],) 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) @@ -584,7 +618,7 @@ y | ye | yes) AC_DEFINE(HAVE_BROKEN_FSF,1,[Define this if issuing a fsf on a ta 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";; @@ -595,28 +629,13 @@ AC_ARG_WITH(gnutar, ] ) -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 ] @@ -629,7 +648,7 @@ AC_ARG_WITH(samba-user, ) 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 ;; @@ -638,7 +657,7 @@ AC_ARG_WITH(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=`( @@ -657,6 +676,8 @@ AC_ARG_WITH(gnutar-listed-incremental, [ 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], @@ -688,6 +709,25 @@ y | ye | yes) : ;; 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="" + ;; +*) + DBMALLOCCFLAGS="-I$DBMALLOC -DUSE_DBMALLOC" + DBMALLOCLIBS="-L$DBMALLOC -ldbmalloc" + ;; +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. @@ -695,7 +735,7 @@ 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} ) @@ -709,7 +749,7 @@ y | ye | yes) : ;; 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 # @@ -728,12 +768,9 @@ if test "${KRB4_SECURITY}" = yes -a -f ${srcdir-.}/common-src/krb4-security.c ; 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 && @@ -753,36 +790,45 @@ if test "${KRB4_SECURITY}" = yes -a -f ${srcdir-.}/common-src/krb4-security.c ; 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(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) @@ -798,7 +844,7 @@ AC_ARG_WITH(server-principal, 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) @@ -813,7 +859,7 @@ AC_ARG_WITH(server-instance, 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) @@ -828,7 +874,7 @@ AC_ARG_WITH(server-keyfile, 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) @@ -843,7 +889,7 @@ AC_ARG_WITH(client-principal, 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) @@ -858,7 +904,7 @@ AC_ARG_WITH(client-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]], + [ --with-client-keyfile=ARG client host key file [[KEYFILE]]], [ case "$withval" in "" | y | ye | yes | n | no) @@ -872,14 +918,14 @@ AC_ARG_WITH(client-keyfile, ) # 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) @@ -893,15 +939,91 @@ AC_ARG_WITH(ticket-lifetime, ) 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 + 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 + K5CRYPTO=${k5libdir}/libk5crypto.a + else + K5CRYPTO="" + fi + KRB5_DIR_FOUND=$dir + KRB5LIBS="${k5libdir}/libgssapi_krb5.a ${k5libdir}/libkrb5.a $K5CRYPTO ${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 + +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 + 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]], + [ --with-portrange=low,high bind unreserved TCP server sockets to ports within this range [[unlimited]]], [ TCPPORTRANGE="$withval" ] ) 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" ] @@ -926,7 +1048,7 @@ if test x"${TCPPORTRANGE+set}" = x"set"; then 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" ] @@ -962,7 +1084,7 @@ AC_DEFINE_UNQUOTED(MAX_TAPE_BLOCK_KB,($MAXTAPEBLOCKSIZE),[Maximum size of a tape 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) @@ -1022,7 +1144,7 @@ y | ye | yes) AC_DEFINE(ASSERTIONS,1,[Define if you want assertion checking. ]) 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} ) @@ -1043,7 +1165,7 @@ AC_DEFINE_UNQUOTED(AMANDA_TMPDIR,"$AMANDA_TMPDIR",[The directory in which Amanda 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} ) @@ -1054,8 +1176,8 @@ debugging=`( )` 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 @@ -1067,7 +1189,7 @@ case "$AMANDA_DBGDIR" in 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} ) @@ -1082,7 +1204,7 @@ AC_DEFINE_UNQUOTED(AMANDA_DEBUG_DAYS,$AMANDA_DEBUG_DAYS,[Number of days to keep 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} ) @@ -1172,6 +1294,8 @@ case "$target" in ;; *-pc-linux-*) ;; + x86_64-*-linux-*) + ;; alpha*-*-linux-*) ;; sparc*-*-linux-*) @@ -1247,10 +1371,10 @@ if test -n "$xenix_tapeio"; then 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" @@ -1271,7 +1395,7 @@ AC_PATH_PROGS(AR,ar,,$LOCSYSPATH) 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 @@ -1311,10 +1435,7 @@ if test ! -z "$GNUTAR"; then 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"*) @@ -1333,10 +1454,8 @@ if test ! -z "$SAMBA_CLIENT"; then 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. ]) @@ -1463,7 +1582,7 @@ if test "$DUMP" -a "$RESTORE"; then 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 @@ -1501,7 +1620,7 @@ if test "$DUMP" -a "$RESTORE"; then 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 ]) @@ -1556,6 +1675,38 @@ AC_SUBST(AMPLOT_CAT_GZIP) 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 +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= @@ -1601,7 +1752,7 @@ AC_CACHE_CHECK( 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" @@ -1609,6 +1760,12 @@ CPPFLAGS="$amanda_cv_LFS_CFLAGS $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) + AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) @@ -1620,26 +1777,6 @@ AC_TYPE_OFF_T 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 @@ -1661,7 +1798,7 @@ changequote([,]), [#include #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 ]) @@ -1726,6 +1863,7 @@ AC_CHECK_HEADERS(\ sys/tape.h \ sys/time.h \ sys/types.h \ + sys/uio.h \ sys/vfs.h \ sys/vfstab.h \ syslog.h \ @@ -1868,7 +2006,7 @@ dnl Solaris SCSI 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 @@ -1933,6 +2071,7 @@ if test x"$ac_cv_header_cam_cam_h" = x"yes";then fi fi + dnl dnl BSD SCSI dnl @@ -1982,6 +2121,7 @@ case "$target" in 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) @@ -1989,33 +2129,29 @@ case "$target" in 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 - AC_CHECK_LIB(readline,readline) - if test "$ac_cv_lib_readline_readline" != 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, + READLINE_LIBS="-lreadline"; AC_SUBST(READLINE_LIBS) + ) + if test "x$ac_cv_lib_readline_readline" != xyes; then 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 @@ -2116,11 +2252,11 @@ LIBS="$save_LIBS" 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 @@ -2128,7 +2264,7 @@ case "$DB_STYLE" in 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 @@ -2143,11 +2279,11 @@ case "$DB_STYLE" in ;; 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 @@ -2155,7 +2291,7 @@ case "$DB_STYLE" in 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 @@ -2170,11 +2306,11 @@ case "$DB_STYLE" in ;; 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 @@ -2182,7 +2318,7 @@ case "$DB_STYLE" in 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 @@ -2197,11 +2333,11 @@ case "$DB_STYLE" in ;; 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 @@ -2209,7 +2345,7 @@ case "$DB_STYLE" in 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 @@ -2239,52 +2375,52 @@ if test -z "$DB_STYLE"; then 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 @@ -2292,7 +2428,7 @@ dnl fi 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 @@ -2307,7 +2443,7 @@ dnl DB_HEADER= 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]) @@ -2340,7 +2476,7 @@ else ]])],[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 @@ -2362,7 +2498,7 @@ AC_CACHE_CHECK(whether _POSIX2_RE_DUP_MAX is defined, 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 @@ -2374,7 +2510,7 @@ AC_CACHE_CHECK(whether CHAR_MIN is defined, 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 @@ -2386,7 +2522,7 @@ AC_CACHE_CHECK(whether CHAR_MAX is defined, 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 @@ -2398,7 +2534,7 @@ AC_CACHE_CHECK(whether CHAR_BIT is defined, 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 @@ -2449,6 +2585,7 @@ AC_REPLACE_FUNCS(memmove) 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) @@ -2474,6 +2611,8 @@ ICE_CHECK_DECL(sendto,sys/types.h sys/socket.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) @@ -2502,10 +2641,10 @@ ICE_CHECK_DECL(shmctl,sys/types.h sys/ipc.h sys/shm.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 @@ -2519,8 +2658,6 @@ if test "$ac_cv_func_mmap_fixed_mapped" != yes; then 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) @@ -2559,14 +2696,14 @@ ICE_CHECK_DECL(vprintf,stdio.h stdlib.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 +AC_SYS_LARGEFILE dnl disk device prefixes AC_MSG_CHECKING(disk device prefixes) @@ -2578,7 +2715,7 @@ dfline=`( 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 @@ -2671,7 +2808,7 @@ AC_CACHE_CHECK( ]) 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 @@ -2695,7 +2832,7 @@ if test -z "$HAS_WORKING_FILE_LOCK"; then ]) 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 @@ -2720,7 +2857,7 @@ if test -z "$HAS_WORKING_FILE_LOCK"; then ]) 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 @@ -2748,7 +2885,7 @@ if test -z "$HAS_WORKING_FILE_LOCK"; then ]) 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 @@ -2777,6 +2914,7 @@ AM_CONDITIONAL(WANT_CHG_SCSI, test x"$NO_SCSI_CHANGER_MODE" != x"true") 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. ]);; @@ -2793,6 +2931,44 @@ AC_SUBST(LTLIBOBJS) 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(xsltproc, + [ --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; ]) + +AC_DEFUN([AC_PATH_XSLTPROC], [AC_PATH_PROG(XSLTPROC, xsltproc)]) + +# 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 + +AM_CONDITIONAL(HAVE_XSLTPROC, test "$USE_XSLTPROC" = yes) + AC_CONFIG_FILES([\ amplot/amcat.awk amplot/amplot.sh \ amplot/Makefile \ @@ -2807,11 +2983,12 @@ AC_CONFIG_FILES([\ \ 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 \ \ man/Makefile \ @@ -2827,7 +3004,8 @@ AC_CONFIG_FILES([\ 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 \ \ tape-src/Makefile \ \