X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fautoconf%2Fconfigure.in;h=77c491959d476587f469ad527222ddbabd8fb0dc;hb=3a3b0037ebfd322a2a60517c99703c63e45f2431;hp=b85a63eccec5a133f7d65d1daa8228944fb54af3;hpb=7d1cfa51227dd7e6081d65bcee06541791b17e65;p=bacula%2Fbacula diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index b85a63ecce..77c491959d 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -36,48 +36,43 @@ BACULA=${BACULA:-Bacula} VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` +BDB_VERSION=`sed -n -e 's/^.*BDB_VERSION \(.*\)$/\1/p' ${srcdir}/src/cats/cats.h` AC_SUBST(VERSION)dnl AC_SUBST(DATE)dnl AC_SUBST(LSMDATE)dnl AC_SUBST(BACULA)dnl AC_SUBST(post_host)dnl +AC_SUBST(BDB_VERSION)dnl dnl src/lib -LIBBAC_LT_CURRENT=`sed -n -e 's/^.*LIBBAC_LT_CURRENT *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBAC_LT_REVISION=`sed -n -e 's/^.*LIBBAC_LT_REVISION *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBAC_LT_AGE=`sed -n -e 's/^.*LIBBAC_LT_AGE *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACCFG_LT_CURRENT=`sed -n -e 's/^.*LIBBACCFG_LT_CURRENT *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACCFG_LT_REVISION=`sed -n -e 's/^.*LIBBACCFG_LT_REVISION *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACCFG_LT_AGE=`sed -n -e 's/^.*LIBBACCFG_LT_AGE *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACPY_LT_CURRENT=`sed -n -e 's/^.*LIBBACPY_LT_CURRENT *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACPY_LT_REVISION=`sed -n -e 's/^.*LIBBACPY_LT_REVISION *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACPY_LT_AGE=`sed -n -e 's/^.*LIBBACPY_LT_AGE *\(.*\)$/\1/p' ${srcdir}/src/version.h` - -AC_SUBST(LIBBAC_LT_CURRENT)dnl -AC_SUBST(LIBBAC_LT_REVISION)dnl -AC_SUBST(LIBBAC_LT_AGE)dnl -AC_SUBST(LIBBACCFG_LT_CURRENT)dnl -AC_SUBST(LIBBACCFG_LT_REVISION)dnl -AC_SUBST(LIBBACCFG_LT_AGE)dnl -AC_SUBST(LIBBACPY_LT_CURRENT)dnl -AC_SUBST(LIBBACPY_LT_REVISION)dnl -AC_SUBST(LIBBACPY_LT_AGE)dnl +dnl can be overwritten by specific values from version.h +LIBBAC_LT_RELEASE=`sed -n -e 's/^#.*LIBBAC_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` +LIBBACCFG_LT_RELEASE=`sed -n -e 's/^#.*LIBBACCFG_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` +LIBBACPY_LT_RELEASE=`sed -n -e 's/^#.*LIBBACPY_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` + +LIBBAC_LT_RELEASE=${LIBBAC_LT_RELEASE:-$VERSION} +LIBBACCFG_LT_RELEASE=${LIBBACCFG_LT_RELEASE:-$VERSION} +LIBBACPY_LT_RELEASE=${LIBBACPY_LT_RELEASE:-$VERSION} + +AC_SUBST(LIBBAC_LT_RELEASE)dnl +AC_SUBST(LIBBACCFG_LT_RELEASE)dnl +AC_SUBST(LIBBACPY_LT_RELEASE)dnl dnl src/cats -LIBBACSQL_LT_CURRENT=`sed -n -e 's/^.*LIBBACSQL_LT_CURRENT *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACSQL_LT_REVISION=`sed -n -e 's/^.*LIBBACSQL_LT_REVISION *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACSQL_LT_AGE=`sed -n -e 's/^.*LIBBACSQL_LT_AGE *\(.*\)$/\1/p' ${srcdir}/src/version.h` -AC_SUBST(LIBBACSQL_LT_CURRENT)dnl -AC_SUBST(LIBBACSQL_LT_REVISION)dnl -AC_SUBST(LIBBACSQL_LT_AGE)dnl +dnl can be overwritten by specific values from version.h +LIBBACSQL_LT_RELEASE=`sed -n -e 's/^#.*LIBBACSQL_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` + +LIBBACSQL_LT_RELEASE=${LIBBACSQL_LT_RELEASE:-$VERSION} + +AC_SUBST(LIBBACSQL_LT_RELEASE)dnl dnl src/findlib -LIBBACFIND_LT_CURRENT=`sed -n -e 's/^.*LIBBACFIND_LT_CURRENT *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACFIND_LT_REVISION=`sed -n -e 's/^.*LIBBACFIND_LT_REVISION *\(.*\)$/\1/p' ${srcdir}/src/version.h` -LIBBACFIND_LT_AGE=`sed -n -e 's/^.*LIBBACFIND_LT_AGE *\(.*\)$/\1/p' ${srcdir}/src/version.h` -AC_SUBST(LIBBACFIND_LT_CURRENT)dnl -AC_SUBST(LIBBACFIND_LT_REVISION)dnl -AC_SUBST(LIBBACFIND_LT_AGE)dnl +dnl can be overwritten by specific values from version.h +LIBBACFIND_LT_RELEASE=`sed -n -e 's/^#.*LIBBACFIND_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` + +LIBBACFIND_LT_RELEASE=${LIBBACFIND_LT_RELEASE:-$VERSION} + +AC_SUBST(LIBBACFIND_LT_RELEASE)dnl echo "configuring for ${BACULA} $VERSION ($DATE)" @@ -817,45 +812,33 @@ if test x$support_ipv6 = xyes; then AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support]) fi +TERM_LIB="" +AC_CHECK_HEADER(curses.h, + [ AC_CHECK_LIB(ncurses, tgetent, + [ TERM_LIB="-lncurses" ], + [ AC_CHECK_LIB(termcap, tgetent, [ TERM_LIB="-ltermcap" ]) + ]) + ], + [ AC_CHECK_HEADERS(curses.h) + AC_CHECK_HEADER(term.h, + [ AC_CHECK_LIB(curses, tgetent, + [ TERM_LIB="-lcurses" ] ) + ]) + ]) + + got_conio="no" if test x$support_conio = xyes; then - AC_CHECK_HEADER(termcap.h, - [ AC_CHECK_LIB(termcap, tgetent, - [ CONS_LIBS="-ltermcap" - CONS_OBJ="conio.o" - CONS_SRC="conio.c" - got_conio="yes" - support_readline=no - AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) - ], - [ AC_CHECK_LIB(ncurses, tgetent, - [ CONS_LIBS="-lncurses" + if test x$TERM_LIB != x; then + CONS_LIBS=$TERM_LIB CONS_OBJ="conio.o" CONS_SRC="conio.c" got_conio="yes" support_readline=no AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) - ]) - ]) - ], - [ - AC_CHECK_HEADERS(curses.h) - AC_CHECK_HEADER(term.h, - [ AC_CHECK_LIB(curses, tgetent, - [ CONS_LIBS="-lcurses" - CONS_OBJ="conio.o" - CONS_SRC="conio.c" - got_conio="yes" - support_readline=no - AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) - ]) - ], - [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "], -[#if HAVE_CURSES_H -#include -#endif -]) - ]) + else + echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "], + fi fi @@ -871,6 +854,9 @@ AC_ARG_ENABLE(readline, fi ] ) +if test x$TERM_LIB = x ; then + support_readline=no +fi got_readline="no" READLINE_SRC= @@ -897,7 +883,7 @@ if test x$support_readline = xyes; then AC_CHECK_HEADER(${with_readline}/readline.h, [ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support]) - CONS_LIBS="-lreadline -lhistory -ltermcap" + CONS_LIBS="-lreadline -lhistory $TERM_LIB" got_readline="yes" ], [ echo " " @@ -914,7 +900,7 @@ if test x$support_readline = xyes; then AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support]) got_readline="yes" CONS_INC="-I/usr/include/readline" - CONS_LIBS="-lreadline -ltermcap" + CONS_LIBS="-lreadline $TERM_LIB" ], [ dnl Did not find standard library, so try Bacula's default AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h, @@ -922,7 +908,7 @@ if test x$support_readline = xyes; then AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support]) got_readline="yes" CONS_INC="-I${TOP_DIR}/depkgs/readline" - CONS_LIBS="-lreadline -lhistory -ltermcap" + CONS_LIBS="-lreadline -lhistory $TERM_LIB" CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline" PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline" ], [ @@ -1187,9 +1173,6 @@ if test "x$with_openssl_directory" != "xno"; then ] ) - LIBS="${saved_LIBS}" - CFLAGS="${saved_CFLAGS}" - if test "$support_tls" = "yes"; then AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available]) AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled]) @@ -1203,12 +1186,20 @@ if test "x$with_openssl_directory" != "xno"; then if test "$ac_cv_openssl_export" = "yes"; then AC_DEFINE(HAVE_OPENSSL_EXPORT_LIBRARY, 1, [Define if the OpenSSL library is export-contrained to 128bit ciphers]) fi + + if test "$support_crypto" = "yes"; then + AC_CHECK_LIB(ssl, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x])) + fi + + LIBS="${saved_LIBS}" + CFLAGS="${saved_CFLAGS}" else support_tls="no" support_crypto="no" OPENSSL_LIBS="" OPENSSL_INC="" fi +AC_MSG_RESULT([$support_tls]) if test "$support_tls" = "no"; then OPENSSL_LIBS="" @@ -1219,7 +1210,6 @@ if test "$support_crypto" = "no"; then OPENSSL_INC="" fi -AC_MSG_RESULT([$support_tls]) AC_SUBST(OPENSSL_LIBS) AC_SUBST(OPENSSL_INC) @@ -1706,9 +1696,9 @@ AC_SUBST(fd_group) dnl dnl allow setting default executable permissions dnl -SBINPERM=0754 +SBINPERM=0750 AC_ARG_WITH(sbin-perm, - AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0754@:>@]), + AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0750@:>@]), [ if test "x$withval" != "x" ; then SBINPERM=$withval @@ -1758,14 +1748,49 @@ if test $pkg = 0; then ] ) fi + +if test x$support_batch_insert = xno; then + if test x$DB_TYPE = xmysql; then + A=`test -f $MYSQL_LIBDIR/libmysqlclient_r.so && nm -D $MYSQL_LIBDIR/libmysqlclient_r.so | grep pthread_mutex_lock` + pkg=$? + if test $pkg = 0; then + support_batch_insert=yes + AC_ARG_ENABLE(batch-insert, + AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]), + [ + if test x$enableval = xno; then + support_batch_insert=no + else + support_batch_insert=yes + fi + ] + ) + fi + fi +fi + +dnl For postgresql checking +saved_LIBS="${LIBS}" +LIBS="${saved_LIBS} ${SQL_LFLAGS}" -dnl Check if postgresql can support batch mode +dnl Check if postgresql can support batch mode if test x$DB_TYPE = xpostgresql; then + support_batch_insert=yes AC_CHECK_LIB(pq, PQisthreadsafe, AC_DEFINE(HAVE_PQISTHREADSAFE, 1, [Set if have PQisthreadsafe])) AC_CHECK_LIB(pq, PQputCopyData, AC_DEFINE(HAVE_PQ_COPY, 1, [Set if have PQputCopyData])) - if test "x$ac_cv_lib_pq_PQputCopyData" != "xyes" - then - support_batch_insert=no + test "x$ac_cv_lib_pq_PQputCopyData" = "xyes" + pkg=$? + if test $pkg = 0; then + AC_ARG_ENABLE(batch-insert, + AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]), + [ + if test x$enableval = xno; then + support_batch_insert=no + fi + ] + ) + else + support_batch_insert=no fi fi @@ -1777,7 +1802,7 @@ if test x$DB_TYPE = xdbi; then if test $DB_PROG = postgresql; then AC_CHECK_LIB(pq, PQisthreadsafe, AC_DEFINE(HAVE_PQISTHREADSAFE)) AC_CHECK_LIB(pq, PQputCopyData, AC_DEFINE(HAVE_PQ_COPY)) - test "x$ac_cv_lib_pq_PQputCopyData" != "xyes" + test "x$ac_cv_lib_pq_PQputCopyData" = "xyes" pkg=$? fi @@ -1789,6 +1814,7 @@ if test x$DB_TYPE = xdbi; then if test $DB_PROG = sqlite3; then A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock` pkg=$? + AC_CHECK_LIB(sqlite3, sqlite3_threadsafe, AC_DEFINE(HAVE_SQLITE3_THREADSAFE, 1, [Set if have sqlite3_threadsafe])) fi if test $pkg = 0; then @@ -1808,8 +1834,16 @@ else uncomment_dbi="#" fi +dnl revert after postgresql checks +LIBS="${saved_LIBS}" + AC_SUBST(uncomment_dbi) +dnl For Ingres always enable batch inserts. +if test x$DB_TYPE = xingres; then + support_batch_insert=yes +fi + if test $support_batch_insert = yes ; then AC_DEFINE(HAVE_BATCH_FILE_INSERT, 1, [Set if DB batch insert code enabled]) fi @@ -1974,6 +2008,8 @@ AC_LANG_POP(C++) AC_C_CONST +AC_C_BIGENDIAN([AC_DEFINE([HAVE_BIG_ENDIAN], [1], [Big Endian])], [AC_DEFINE([HAVE_LITTLE_ENDIAN], [1], [Little Endian])]) + dnl -------------------------------------------------------------------------- dnl CHECKING FOR FILESYSTEM TYPE dnl -------------------------------------------------------------------------- @@ -2393,6 +2429,7 @@ AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_FUNC_ALLOCA AC_FUNC_GETMNTENT +AC_CHECK_FUNCS(getmntinfo, [AC_DEFINE(HAVE_GETMNTINFO)]) AC_FUNC_CLOSEDIR_VOID AC_FUNC_SETPGRP dnl check for BSD setpgrp. # AC_FUNC_FNMATCH dnl use local version @@ -2402,12 +2439,89 @@ AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"]) AC_CHECK_LIB(sun, getpwnam) AC_CHECK_HEADERS(zlib.h) -AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"]) +AC_CHECK_LIB(z, deflate, [ZLIBS="-lz"]) have_zlib=no -if test x$FDLIBS = x-lz; then +if test x$ZLIBS = x-lz; then AC_DEFINE(HAVE_LIBZ) have_zlib=yes fi +AC_SUBST(ZLIBS) + +dnl +dnl Check if we have AFS on this system +dnl +AFS_CFLAGS="" +AFS_LIBS="" +support_afs=auto +AC_ARG_ENABLE(afs, + AC_HELP_STRING([--disable-afs], [disable afs support @<:@default=auto@:>@]), + [ + if test x$enableval = xyes; then + support_afs=yes + elif test x$enableval = xno; then + support_afs=no + fi + ] +) + +have_afs=no +if test x$support_afs = xyes -o x$support_afs = xauto; then + AC_ARG_WITH(afsdir, + AC_HELP_STRING([--with-afsdir@<:@=DIR@:>@], [Directory holding AFS includes/libs]), + with_afsdir=$withval + ) + + dnl + dnl Search in standard places, or --with-afsdir not specified + dnl + if test x$with_afsdir = x; then + for root in /usr /usr/local; do + if test -d ${root}/include/afs/ ; then + with_afsdir=${root} + break + fi + done + fi + + AFS_CFLAGS="-I${with_afsdir}/include" + + saved_CFLAGS="${CFLAGS}" + CFLAGS="${AFS_CFLAGS} ${saved_CFLAGS}" + + AC_CHECK_HEADERS(afs/stds.h) + + CFLAGS="${saved_CFLAGS}" + + dnl + dnl See if we can find a libsys with the pioctl symbol in there + dnl + for dir in ${with_afsdir}/lib ${with_afsdir}/lib/afs + do + for arch_type in .a .so + do + A=`test -f ${dir}/libsys${arch_type} && nm ${dir}/libsys${arch_type} | grep pioctl` + pkg=$? + if test $pkg = 0; then + have_afs=yes + AFS_LIBS="-L${dir} -lsys -lrx -llwp ${dir}/util.a" + break + fi + done + done + + if test x$support_afs = xyes -a $have_afs != yes; then + AC_MSG_ERROR([afs support explicitly enabled but no supported afs implementation found, + please either load the afs libraries or rerun configure without --enable-afs]) + else + if test $have_afs = yes; then + AC_DEFINE([HAVE_AFS],1,[Defines if your system has AFS support]) + AC_DEFINE([HAVE_AFS_ACL],1,[Andrew FileSystem ACL support]) + fi + fi +fi + +AC_SUBST(AFS_CFLAGS) +AC_SUBST(AFS_LIBS) dnl dnl Check for ACL support and libraries @@ -2428,39 +2542,88 @@ have_acl=no have_extended_acl=no if test x$support_acl = xyes -o x$support_acl = xauto; then AC_CHECK_HEADER(sys/acl.h, [ AC_DEFINE(HAVE_SYS_ACL_H,1,[Defines if your system have the sys/acl.h header file])] , ) + + dnl + dnl First check for acl_get_file in libc + dnl AC_CHECK_FUNC(acl_get_file, [ have_acl=yes - ], [ - AC_CHECK_LIB(acl, acl_get_file, - [ - have_acl=yes; - FDLIBS="-lacl $FDLIBS" - ], [ - AC_CHECK_LIB(pacl, acl_get_file, - [ - have_acl=yes; - FDLIBS="-lpacl $FDLIBS" - ], [ - AC_CHECK_LIB(sec, acltotext, - [ - have_acl=yes; - FDLIBS="-lsec $FDLIBS" - - AC_CHECK_LIB(sec, acl_totext, - [ - have_extended_acl=yes - ] - ) - ] - ) - ] - ) - ] - ) ] ) + dnl + dnl Check for acl_get_file in libacl (Linux) + dnl + if test $have_acl = no; then + AC_CHECK_LIB(acl, acl_get_file, + [ + have_acl=yes + if test $have_afs = yes; then + dnl + dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!! + dnl + if test -d /usr/lib64/; then + FDLIBS="-L/usr/lib64 -lacl $FDLIBS" + else + FDLIBS="-L/usr/lib -lacl $FDLIBS" + fi + else + FDLIBS="-lacl $FDLIBS" + fi + ] + ) + fi + + dnl + dnl Check for acl_get_file in libpacl (OSF1) + dnl + if test $have_acl = no; then + AC_CHECK_LIB(pacl, acl_get_file, + [ + have_acl=yes + FDLIBS="-lpacl $FDLIBS" + ] + ) + fi + + dnl + dnl Check for acltotext and acl_totext (Solaris) + dnl + if test $have_acl = no -a \ + x${HAVE_SUN_OS}_TRUE = x; then + AC_CHECK_LIB(sec, acltotext, + [ + have_acl=yes + FDLIBS="-lsec $FDLIBS" + + AC_CHECK_LIB(sec, acl_totext, + [ + have_extended_acl=yes + ] + ) + ] + ) + fi + + dnl + dnl Check for acl_get and aclx_get (AIX) + dnl + if test $have_acl = no -a \ + x${HAVE_AIX_OS}_TRUE = x; then + AC_CHECK_FUNC(acl_get, + [ + have_acl=yes + + AC_CHECK_FUNC(aclx_get, + [ + have_extended_acl=yes + ] + ) + ] + ) + fi + if test x$support_acl = xyes -a $have_acl != yes; then AC_MSG_ERROR([acl support explicitly enabled but no supported acl implementation found, please either load the acl libraries or rerun configure without --enable-acl]) @@ -2494,83 +2657,111 @@ have_xattr=no if test x$support_xattr = xyes -o x$support_xattr = xauto; then dnl dnl First check for *BSD support + dnl When running on a BSD variant dnl - AC_CHECK_HEADER(sys/extattr.h, [ AC_DEFINE(HAVE_SYS_EXTATTR_H,1,[Defines if your system have the sys/extattr.h header file])] , ) - AC_CHECK_HEADER(libutil.h, [ AC_DEFINE(HAVE_LIBUTIL_H,1,[Defines if your system have the libutil.h header file])] , ) - AC_CHECK_FUNCS(extattr_get_link extattr_set_link extattr_list_link, - [ - have_xattr=yes - AC_DEFINE([HAVE_EXTATTR_GET_LINK],1,[Define to 1 if you have the 'extattr_get_link' function.]) - AC_DEFINE([HAVE_EXTATTR_SET_LINK],1,[Define to 1 if you have the 'extattr_set_link' function.]) - AC_DEFINE([HAVE_EXTATTR_LIST_LINK],1,[Define to 1 if you have the 'extattr_list_link' function.]) - ] - ) - - if test $have_xattr = no; then - AC_CHECK_FUNCS(extattr_get_file extattr_set_file extattr_list_file, - [ + if test x${HAVE_FREEBSD_OS}_TRUE = x -o \ + x${HAVE_NETBSD_OS}_TRUE = x -o \ + x${HAVE_OPENBSD_OS}_TRUE = x; then + AC_CHECK_HEADER(sys/extattr.h, [ AC_DEFINE(HAVE_SYS_EXTATTR_H,1,[Defines if your system have the sys/extattr.h header file])] , ) + AC_CHECK_HEADER(libutil.h, [ AC_DEFINE(HAVE_LIBUTIL_H,1,[Defines if your system have the libutil.h header file])] , ) + AC_CHECK_FUNCS(extattr_get_link extattr_set_link extattr_list_link, + [ have_xattr=yes - AC_DEFINE([HAVE_EXTATTR_GET_FILE],1,[Define to 1 if you have the 'extattr_get_file' function.]) - AC_DEFINE([HAVE_EXTATTR_SET_FILE],1,[Define to 1 if you have the 'extattr_set_file' function.]) - AC_DEFINE([HAVE_EXTATTR_LIST_FILE],1,[Define to 1 if you have the 'extattr_list_file' function.]) - ] + AC_DEFINE([HAVE_EXTATTR_GET_LINK],1,[Define to 1 if you have the 'extattr_get_link' function.]) + AC_DEFINE([HAVE_EXTATTR_SET_LINK],1,[Define to 1 if you have the 'extattr_set_link' function.]) + AC_DEFINE([HAVE_EXTATTR_LIST_LINK],1,[Define to 1 if you have the 'extattr_list_link' function.]) + ] ) - fi - if test $have_xattr = yes; then - have_extattr_string_in_libc=no - AC_CHECK_FUNCS(extattr_namespace_to_string extattr_string_to_namespace, - [ - have_extattr_string_in_libc=yes - AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.]) - AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.]) - ] - ) - - dnl - dnl If extattr_namespace_to_string and extattr_string_to_namespace are not in libc see if they are in libutil - dnl - if test $have_extattr_string_in_libc = no; then - AC_CHECK_LIB(util, extattr_namespace_to_string extattr_string_to_namespace, + if test $have_xattr = no; then + AC_CHECK_FUNCS(extattr_get_file extattr_set_file extattr_list_file, [ - AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.]) - AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.]) - FDLIBS="-lutil $FDLIBS" + have_xattr=yes + AC_DEFINE([HAVE_EXTATTR_GET_FILE],1,[Define to 1 if you have the 'extattr_get_file' function.]) + AC_DEFINE([HAVE_EXTATTR_SET_FILE],1,[Define to 1 if you have the 'extattr_set_file' function.]) + AC_DEFINE([HAVE_EXTATTR_LIST_FILE],1,[Define to 1 if you have the 'extattr_list_file' function.]) ] - ) + ) + fi + + if test $have_xattr = yes; then + have_extattr_string_in_libc=no + AC_CHECK_FUNCS(extattr_namespace_to_string extattr_string_to_namespace, + [ + have_extattr_string_in_libc=yes + AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.]) + AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.]) + ] + ) + + dnl + dnl If extattr_namespace_to_string and extattr_string_to_namespace are not in libc see if they are in libutil + dnl + if test $have_extattr_string_in_libc = no; then + AC_CHECK_LIB(util, extattr_namespace_to_string extattr_string_to_namespace, + [ + AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.]) + AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.]) + FDLIBS="-lutil $FDLIBS" + ] + ) + fi fi fi dnl - dnl If we failed to find *BSD support try the Linux or OSX implementation of xattr + dnl If we failed to find *BSD support try the AIX implementation of extented attributes (EA) + dnl When running on AIX dnl - if test $have_xattr = no; then - AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , ) - AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr, + if test $have_xattr = no -a \ + x${HAVE_AIX_OS}_TRUE = x; then + AC_CHECK_HEADER(sys/ea.h, [ AC_DEFINE(HAVE_SYS_EA_H,1,[Defines if your system have the sys/ea.h header file])] , ) + AC_CHECK_FUNCS(llistea lgetea lsetea, [ have_xattr=yes - AC_DEFINE([HAVE_LLISTXATTR],1,[Define to 1 if you have the 'llistxattr' function.]) - AC_DEFINE([HAVE_LGETXATTR],1,[Define to 1 if you have the 'lgetxattr' function.]) - AC_DEFINE([HAVE_LSETXATTR],1,[Define to 1 if you have the 'lsetxattr' function.]) + AC_DEFINE([HAVE_LLISTEA],1,[Define to 1 if you have the 'llistea' function.]) + AC_DEFINE([HAVE_LGETEA],1,[Define to 1 if you have the 'lgetea' function.]) + AC_DEFINE([HAVE_LSETEA],1,[Define to 1 if you have the 'lsetea' function.]) ] ) if test $have_xattr = no; then - AC_CHECK_FUNCS(listxattr getxattr setxattr, + AC_CHECK_FUNCS(listea getea setea, [ have_xattr=yes - AC_DEFINE([HAVE_LISTXATTR],1,[Define to 1 if you have the 'listxattr' function.]) - AC_DEFINE([HAVE_GETXATTR],1,[Define to 1 if you have the 'getxattr' function.]) - AC_DEFINE([HAVE_SETXATTR],1,[Define to 1 if you have the 'setxattr' function.]) + AC_DEFINE([HAVE_LISTEA],1,[Define to 1 if you have the 'listea' function.]) + AC_DEFINE([HAVE_GETEA],1,[Define to 1 if you have the 'getea' function.]) + AC_DEFINE([HAVE_SETEA],1,[Define to 1 if you have the 'setea' function.]) ] ) fi fi dnl - dnl If we failed to find *BSD support and the Linux or OSX implementation of xattr try the Solaris xattr implementation + dnl If we failed to find AIX support try the TRU64 implementation of extented attributes + dnl when running on a TRU64 OS. dnl - if test $have_xattr = no; then + if test $have_xattr = no -a \ + x${HAVE_TRU64_OS}_TRUE = x; then + AC_CHECK_HEADER(sys/proplist.h, [ AC_DEFINE(HAVE_SYS_PROPLIST_H,1,[Defines if your system have the sys/proplist.h header file])] , ) + AC_CHECK_FUNCS(getproplist get_proplist_entry sizeof_proplist_entry add_proplist_entry setproplist, + [ + have_xattr=yes + AC_DEFINE([HAVE_GETPROPLIST],1,[Define to 1 if you have the 'getproplist' function.]) + AC_DEFINE([HAVE_GET_PROPLIST_ENTRY],1,[Define to 1 if you have the 'get_proplist_entry' function.]) + AC_DEFINE([HAVE_SIZEOF_PROPLIST_ENTRY],1,[Define to 1 if you have the 'sizeof_proplist_entry' function.]) + AC_DEFINE([HAVE_ADD_PROPLIST_ENTRY],1,[Define to 1 if you have the 'add_proplist_entry' function.]) + AC_DEFINE([HAVE_SETPROPLIST],1,[Define to 1 if you have the 'setproplist' function.]) + ] + ) + fi + + dnl + dnl If we failed to find TRU64 support try the SOLARIS implementation of extented and extensible attributes + dnl when running on a Solaris. + dnl + if test $have_xattr = no -a \ + x${HAVE_SUN_OS}_TRUE = x; then AC_CHECK_HEADER(sys/attr.h, [ AC_DEFINE(HAVE_SYS_ATTR_H,1,[Defines if your system have the sys/attr.h header file])] , ) AC_CHECK_HEADER(sys/nvpair.h, [ AC_DEFINE(HAVE_SYS_NVPAIR_H,1,[Defines if your system have the sys/nvpair.h header file])] , ) AC_CHECK_HEADER(attr.h, [ AC_DEFINE(HAVE_ATTR_H,1,[Defines if your system have the attr.h header file])] , ) @@ -2596,6 +2787,32 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then fi fi + dnl + dnl If we failed to find Solaris support try the generic xattr support code + dnl + if test $have_xattr = no; then + AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , ) + AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr, + [ + have_xattr=yes + AC_DEFINE([HAVE_LLISTXATTR],1,[Define to 1 if you have the 'llistxattr' function.]) + AC_DEFINE([HAVE_LGETXATTR],1,[Define to 1 if you have the 'lgetxattr' function.]) + AC_DEFINE([HAVE_LSETXATTR],1,[Define to 1 if you have the 'lsetxattr' function.]) + ] + ) + + if test $have_xattr = no; then + AC_CHECK_FUNCS(listxattr getxattr setxattr, + [ + have_xattr=yes + AC_DEFINE([HAVE_LISTXATTR],1,[Define to 1 if you have the 'listxattr' function.]) + AC_DEFINE([HAVE_GETXATTR],1,[Define to 1 if you have the 'getxattr' function.]) + AC_DEFINE([HAVE_SETXATTR],1,[Define to 1 if you have the 'setxattr' function.]) + ] + ) + fi + fi + if test x$support_xattr = xyes -a $have_xattr != yes; then AC_MSG_ERROR([xattr support explicitly enabled but no supported xattr implementation found, please either load the xattr libraries or rerun configure without --enable-xattr]) @@ -2878,7 +3095,6 @@ mandrake) platforms/mandrake/bacula-fd \ platforms/mandrake/bacula-sd \ platforms/mandrake/bacula-dir \ - platforms/mandrake/bacula.spec \ " ;; gentoo) @@ -2915,7 +3131,7 @@ solaris) if test x$DISTVER = x5.6 ; then AC_DEFINE(HAVE_OLD_SOCKOPT) fi - LIBS="$LIBS -lresolv" + LIBS="$LIBS -lresolv -lrt" ;; suse) DISTVER=`cat /etc/SuSE-release |grep VERSION|\ @@ -2927,8 +3143,7 @@ suse) platforms/suse/bacula-fd \ platforms/suse/bacula-sd \ platforms/suse/bacula-dir \ - platforms/suse/bacula \ - platforms/suse/bacula.spec" + platforms/suse/bacula" ;; suse5) DISTNAME=suse @@ -3068,12 +3283,6 @@ AC_OUTPUT([autoconf/Make.common \ src/cats/drop_ingres_database \ src/cats/sqlite \ src/cats/mysql \ - src/cats/create_bdb_database \ - src/cats/update_bdb_tables \ - src/cats/make_bdb_tables \ - src/cats/grant_bdb_privileges \ - src/cats/drop_bdb_tables \ - src/cats/drop_bdb_database \ src/cats/create_bacula_database \ src/cats/update_bacula_tables \ src/cats/grant_bacula_privileges \ @@ -3093,6 +3302,9 @@ AC_OUTPUT([autoconf/Make.common \ updatedb/update_mysql_tables_10_to_11 \ updatedb/update_sqlite3_tables_10_to_11 \ updatedb/update_postgresql_tables_10_to_11 \ + updatedb/update_mysql_tables_11_to_12 \ + updatedb/update_sqlite3_tables_11_to_12 \ + updatedb/update_postgresql_tables_11_to_12 \ examples/nagios/check_bacula/Makefile \ $PFILES ], [ ] @@ -3136,15 +3348,15 @@ cd .. c=updatedb chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11 chmod 755 $c/update_postgresql_tables_10_to_11 +chmod 755 $c/update_mysql_tables_11_to_12 $c/update_sqlite3_tables_11_to_12 +chmod 755 $c/update_postgresql_tables_11_to_12 + c=src/cats chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database -chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables -chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database - chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database @@ -3270,6 +3482,7 @@ Configuration on `date`: build-dird: ${build_dird} build-stored: ${build_stored} Plugin support: ${have_plugins} + AFS support: ${have_afs} ACL support: ${have_acl} XATTR support: ${have_xattr} Python support: ${support_python} ${PYTHON_LIBS}