X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fautoconf%2Fconfigure.in;h=df417d386dbbef8c2accd3f6ca135d754bc31aa9;hb=29d169fdb241d53b13945600a743edbc082a0c79;hp=1071a6e2ba4df02fbdb2c0a697da8b005c79d782;hpb=df6083e88402cf6b623568737a3dbcb1742548de;p=bacula%2Fbacula diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 1071a6e2ba..df417d386d 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -61,10 +61,13 @@ AC_SUBST(LIBBACPY_LT_RELEASE)dnl dnl src/cats 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` +LIBBACCATS_LT_RELEASE=`sed -n -e 's/^#.*LIBBACCATS_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` LIBBACSQL_LT_RELEASE=${LIBBACSQL_LT_RELEASE:-$VERSION} +LIBBACCATS_LT_RELEASE=${LIBBACCATS_LT_RELEASE:-$VERSION} AC_SUBST(LIBBACSQL_LT_RELEASE)dnl +AC_SUBST(LIBBACCATS_LT_RELEASE)dnl dnl src/findlib dnl can be overwritten by specific values from version.h @@ -354,12 +357,6 @@ then AM_GNU_GETTEXT fi -support_mysql=no -support_sqlite=no -support_sqlite3=no -support_postgresql=no -support_ingres=no -support_dbi=no support_smartalloc=yes support_readline=yes support_conio=yes @@ -380,10 +377,8 @@ support_python=no build_client_only=no build_dird=yes build_stored=yes -cats= -db_type=Internal +db_backends="" support_lockmgr=no -DB_TYPE=bdb dnl -------------------------------------------------------------------------- dnl CHECKING COMMAND LINE OPTIONS @@ -722,8 +717,8 @@ AC_ARG_ENABLE(client-only, [ if test x$enableval = xyes; then build_client_only=yes - db_type=None - DB_TYPE=none + db_backends="None" + DB_BACKENDS="none" fi ] ) @@ -813,11 +808,12 @@ if test x$support_ipv6 = xyes; then 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_HEADER(curses.h, [ + AC_CHECK_LIB(tinfo, tgetent, [ TERM_LIB="-ltinfo" ], [ + 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, @@ -1188,7 +1184,7 @@ if test "x$with_openssl_directory" != "xno"; then 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])) + AC_CHECK_LIB(crypto, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x])) fi LIBS="${saved_LIBS}" @@ -1711,123 +1707,186 @@ AC_SUBST(SBINPERM) dnl ------------------------------------------------ dnl Bacula check for various SQL database engines dnl ------------------------------------------------ -SQL_LIB= BA_CHECK_POSTGRESQL_DB BA_CHECK_MYSQL_DB -BA_CHECK_INGRES_DB - BA_CHECK_SQLITE3_DB -# BA_CHECK_SQLITE_DB +BA_CHECK_INGRES_DB BA_CHECK_DBI_DB BA_CHECK_DBI_DRIVER -AC_SUBST(cats) -AC_SUBST(DB_TYPE) +dnl ------------------------------------------- +dnl Make sure at least one database backend is found +dnl ------------------------------------------- +if test "x${db_backends}" = "x" ; then + echo " " + echo " " + echo "You have not specified either --enable-client-only or one of the" + echo "supported databases: MySQL, PostgreSQL, Ingres, SQLite3 or DBI." + echo "This is not permitted. Please reconfigure." + echo " " + echo "Aborting the configuration ..." + echo " " + echo " " + exit 1 +fi + +dnl ------------------------------------------- +dnl See how many catalog backends are configured. +dnl ------------------------------------------- +case `echo $DB_BACKENDS | wc -w | sed -e 's/^ *//'` in + 1) + DEFAULT_DB_TYPE="${DB_BACKENDS}" + if test x$use_libtool = xno; then + SHARED_CATALOG_TARGETS="" + else + SHARED_CATALOG_TARGETS="libbaccats-${DEFAULT_DB_TYPE}.la" + fi + ;; + *) + dnl ------------------------------------------------ + dnl Set the default backend to the first backend found + dnl ------------------------------------------------ + DEFAULT_DB_TYPE=`echo ${DB_BACKENDS} | cut -d' ' -f1` + + dnl ------------------------------------------------ + dnl For multiple backend we need libtool support. + dnl ------------------------------------------------ + if test x$use_libtool = xno; then + echo " " + echo " " + echo "You have specified two or more of the" + echo "supported databases: MySQL, PostgreSQL, Ingres, SQLite3 or DBI." + echo "This is not permitted when not using libtool Please reconfigure." + echo " " + echo "Aborting the configuration ..." + echo " " + echo " " + exit 1 + fi + + SHARED_CATALOG_TARGETS="" + for db_type in ${DB_BACKENDS} + do + if test -z "${SHARED_CATALOG_TARGETS}"; then + SHARED_CATALOG_TARGETS="libbaccats-${db_type}.la" + else + SHARED_CATALOG_TARGETS="${SHARED_CATALOG_TARGETS} libbaccats-${db_type}.la" + fi + done + ;; +esac + +dnl ------------------------------------------- +dnl Unset DB_LIBS when using libtool as we link the +dnl shared library using the right database lib no need to +dnl set DB_LIBS which is only used for non shared versions +dnl of the backends. +dnl ------------------------------------------- +if test x$use_libtool = xyes; then + DB_LIBS="" +fi + +AC_SUBST(DB_BACKENDS) +AC_SUBST(DB_LIBS) +AC_SUBST(DEFAULT_DB_TYPE) +AC_SUBST(SHARED_CATALOG_TARGETS) dnl ------------------------------------------- dnl enable batch attribute DB insert (default on) dnl ------------------------------------------- -support_batch_insert=no -A=`test -f $SQL_LIB && nm $SQL_LIB | 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 - ] - ) +support_batch_insert=yes +AC_ARG_ENABLE(batch-insert, + AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=yes@:>@]), + [ + if test x$enableval = xno; then + support_batch_insert=no + fi + ] +) + +if test x$support_batch_insert = xyes; then + AC_DEFINE(USE_BATCH_FILE_INSERT, 1, [Set if DB batch insert code enabled]) +fi + +dnl ------------------------------------------- +dnl Check if mysql supports batch mode +dnl ------------------------------------------- +if test ! -z "$MYSQL_LIB"; then + AC_CHECK_LIB(mysql_r, mysql_thread_safe, AC_DEFINE(HAVE_MYSQL_THREAD_SAFE, 1, [Set if have mysql_thread_safe])) +fi + +dnl ------------------------------------------- +dnl Check if sqlite supports batch mode +dnl ------------------------------------------- +if test ! -z "SQLITE_LIB"; then + AC_CHECK_LIB(sqlite3, sqlite3_threadsafe, AC_DEFINE(HAVE_SQLITE3_THREADSAFE, 1, [Set if have sqlite3_threadsafe])) fi -dnl For postgresql checking -saved_LIBS="${LIBS}" -LIBS="${saved_LIBS} ${SQL_LFLAGS}" +dnl ------------------------------------------- +dnl Check if postgresql supports batch mode +dnl ------------------------------------------- +if test ! -z "$POSTGRESQL_LIB"; then + dnl For postgresql checking + saved_LIBS="${LIBS}" + LIBS="${saved_LIBS} ${POSTGRESQL_LIB}" -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])) - 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 + if test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"; then + if test $support_batch_insert = yes ; then + AC_DEFINE(HAVE_POSTGRESQL_BATCH_FILE_INSERT, 1, [Set if PostgreSQL DB batch insert code enabled]) + fi + fi + + if test x$ac_cv_lib_pq_PQisthreadsafe != xyes -a x$support_batch_insert = xyes + then + echo "WARNING: Your PostgreSQL client library is too old to detect " + echo "if it was compiled with --enable-thread-safety, consider to " + echo "upgrade it in order to avoid problems with Batch insert mode" + echo fi + + dnl Revert after postgresql checks + LIBS="${saved_LIBS}" fi -if test x$DB_TYPE = xdbi; then - DB_TYPE=$DB_PROG - db_type=$DB_PROG - pkg=1 +dnl ------------------------------------------- +dnl Check if dbi supports batch mode +dnl ------------------------------------------- +if test ! -z "$DBI_LIBS"; then + dnl ------------------------------------------- + dnl Push the DB_PROG onto the stack of supported database backends for DBI + dnl ------------------------------------------- + DB_BACKENDS="${DB_BACKENDS} ${DB_PROG}" + + dnl ------------------------------------------- dnl Check for batch insert + dnl ------------------------------------------- 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" pkg=$? - fi - - if test $DB_PROG = mysql; then - A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock` - pkg=$? - fi - - 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 - 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 - ] - ) + if test $pkg = 0; then + if test $support_batch_insert = yes ; then + AC_DEFINE(HAVE_DBI_BATCH_FILE_INSERT, 1, [Set if DBI DB batch insert code enabled]) + fi + fi fi else + dnl ------------------------------------------- dnl If dbi was not chosen, let the comment in file + dnl ------------------------------------------- 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 - AC_DEFINE(PROTOTYPES) dnl -------------------------------------------------------------------------- @@ -2045,6 +2104,10 @@ AC_MSG_RESULT($fstype) AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , ) +AC_LANG_PUSH(C++) +AC_CHECK_HEADERS([cxxabi.h execinfo.h], [ AC_DEFINE(HAVE_BACKTRACE,1,[Defines if your system have the cxxabi.h and execinfo.h header files for backtrace()])] , ) +AC_LANG_POP(C++) + dnl -------------------------------------------------------------------------- dnl CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS. dnl -------------------------------------------------------------------------- @@ -2340,6 +2403,9 @@ AC_CHECK_FUNCS( \ [echo 'configure: cannot find needed function.'; exit 1] ) +AC_CHECK_FUNCS(getpagesize, [AC_DEFINE(HAVE_GETPAGESIZE, 1, [Set if have getpagesize])]) +AC_CHECK_FUNCS(malloc_trim, [AC_DEFINE(HAVE_MALLOC_TRIM, 1, [Set if have malloc_trim])]) + AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)]) AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)]) AC_CHECK_FUNCS(posix_fadvise) @@ -2537,21 +2603,21 @@ if test x$support_acl = xyes -o x$support_acl = xauto; then 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 - ] + 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 @@ -2560,45 +2626,47 @@ if test x$support_acl = xyes -o x$support_acl = xauto; then dnl if test $have_acl = no; then AC_CHECK_LIB(pacl, acl_get_file, - [ + [ have_acl=yes - FDLIBS="-lpacl $FDLIBS" - ] + FDLIBS="-lpacl $FDLIBS" + ] ) fi dnl dnl Check for acltotext and acl_totext (Solaris) dnl - if test $have_acl = no; then + 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 - ] - ) - ] + 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; then + 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 - ] - ) - ] + AC_CHECK_FUNC(aclx_get, + [ + have_extended_acl=yes + ] + ) + ] ) fi @@ -2635,57 +2703,64 @@ 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, + [ + 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.]) - FDLIBS="-lutil $FDLIBS" ] ) + + 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 AIX implementation of extented attributes (EA) + dnl When running on AIX dnl - if test $have_xattr = no; then + 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, [ @@ -2709,38 +2784,30 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then fi dnl - dnl If we failed to find AIX support try the Linux or OSX implementation of xattr + 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 - 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_OSF1_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_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_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.]) ] ) - - 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 dnl - dnl If we failed to find *BSD support and the Linux or OSX implementation of xattr try the Solaris xattr implementation - dnl when we are running on an Solaris OS (checked by running uname -s) we don't just check the openat function as - dnl the posix openat, fstatat, unlinkat etc. are also available on other os-es but don't indicate xattr support is - dnl available. + 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 `uname -s` = SunOS; then + 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])] , ) @@ -2766,6 +2833,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]) @@ -2816,7 +2909,6 @@ if test x$have_gcc = xyes ; then CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti" fi LDFLAGS=${LDFLAGS--O} -DB_LIBS="${SQL_LFLAGS}" CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS" AC_SUBST(DEBUG) @@ -2828,7 +2920,6 @@ AC_SUBST(X_CFLAGS) AC_SUBST(DEFS) AC_SUBST(LIBS) AC_SUBST(DLIB) -AC_SUBST(DB_LIBS) AC_SUBST(X_LIBS) AC_SUBST(X_EXTRA_LIBS) AC_SUBST(WCFLAGS) @@ -3152,13 +3243,8 @@ fi AC_OUTPUT([autoconf/Make.common \ Makefile \ manpages/Makefile \ - scripts/startmysql \ - scripts/stopmysql \ scripts/btraceback \ - scripts/startit \ - scripts/stopit \ scripts/bconsole \ - scripts/gconsole \ scripts/bacula \ scripts/bacula-ctl-dir \ scripts/bacula-ctl-fd \ @@ -3191,6 +3277,8 @@ AC_OUTPUT([autoconf/Make.common \ src/host.h \ src/console/Makefile \ src/console/bconsole.conf \ + src/qt-console/tray-monitor/tray-monitor.pro \ + src/qt-console/tray-monitor/tray-monitor.conf \ src/qt-console/bat.conf \ src/qt-console/bat.pro \ src/qt-console/bat.pro.mingw32 \ @@ -3268,13 +3356,12 @@ if test "${support_bat}" = "yes" ; then AC_MSG_ERROR([Could not find qmake $PATH. Check your Qt installation]) fi - QMAKEBIN="qmake" cd src/qt-console echo "Creating bat Makefile" touch bat chmod 755 bat rm -f Makefile - $QMAKEBIN + $QMAKE ${MAKE:-make} clean cd ${BUILD_DIR} fi @@ -3293,9 +3380,9 @@ chmod 755 install_conf_file build-depkgs-qt-console cd ${BUILD_DIR} cd scripts -chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer +chmod 755 bacula btraceback mtx-changer chmod 755 dvd-handler dvd-simulator -chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate +chmod 755 bconsole mtx-changer devel_bacula logrotate cd .. c=updatedb @@ -3355,68 +3442,52 @@ echo "Cleaning up" echo " " ${MAKE:-make} clean -if test "x${db_type}" = "xInternal" ; then - echo " " - echo " " - echo "You have not specified either --enable-client-only or one of the" - echo " supported databases: MySQL, PostgreSQL, Ingres, SQLite3 or DBI." - echo " This is not permitted. Please reconfigure." - echo " " - echo "Aborting the configuration ..." - echo " " - echo " " - exit 1 -fi - echo " Configuration on `date`: - Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER} - Bacula version: ${BACULA} ${VERSION} (${DATE}) - Source code location: ${srcdir} - Install binaries: ${sbindir} - Install libraries: ${libdir} - Install config files: ${sysconfdir} - Scripts directory: ${scriptdir} - Archive directory: ${archivedir} - Working directory: ${working_dir} - PID directory: ${piddir} - Subsys directory: ${subsysdir} - Man directory: ${mandir} - Data directory: ${datarootdir} - Plugin directory: ${plugindir} - C Compiler: ${CC} ${CCVERSION} - C++ Compiler: ${CXX} ${CXXVERSION} - Compiler flags: ${WCFLAGS} ${CFLAGS} - Linker flags: ${WLDFLAGS} ${LDFLAGS} - Libraries: ${LIBS} - Statically Linked Tools: ${support_static_tools} - Statically Linked FD: ${support_static_fd} - Statically Linked SD: ${support_static_sd} - Statically Linked DIR: ${support_static_dir} - Statically Linked CONS: ${support_static_cons} - Database type: ${db_type} - Database port: ${db_port} - Database lib: ${DB_LIBS} - Database name: ${db_name} - Database user: ${db_user} - - Job Output Email: ${job_email} - Traceback Email: ${dump_email} - SMTP Host Address: ${smtp_host} + Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER} + Bacula version: ${BACULA} ${VERSION} (${DATE}) + Source code location: ${srcdir} + Install binaries: ${sbindir} + Install libraries: ${libdir} + Install config files: ${sysconfdir} + Scripts directory: ${scriptdir} + Archive directory: ${archivedir} + Working directory: ${working_dir} + PID directory: ${piddir} + Subsys directory: ${subsysdir} + Man directory: ${mandir} + Data directory: ${datarootdir} + Plugin directory: ${plugindir} + C Compiler: ${CC} ${CCVERSION} + C++ Compiler: ${CXX} ${CXXVERSION} + Compiler flags: ${WCFLAGS} ${CFLAGS} + Linker flags: ${WLDFLAGS} ${LDFLAGS} + Libraries: ${LIBS} + Statically Linked Tools: ${support_static_tools} + Statically Linked FD: ${support_static_fd} + Statically Linked SD: ${support_static_sd} + Statically Linked DIR: ${support_static_dir} + Statically Linked CONS: ${support_static_cons} + Database backends: ${db_backends} + Database port: ${db_port} + Database name: ${db_name} + Database user: ${db_user} - Director Port: ${dir_port} - File daemon Port: ${fd_port} - Storage daemon Port: ${sd_port} + Job Output Email: ${job_email} + Traceback Email: ${dump_email} + SMTP Host Address: ${smtp_host} - Director User: ${dir_user} - Director Group: ${dir_group} - Storage Daemon User: ${sd_user} - Storage DaemonGroup: ${sd_group} - File Daemon User: ${fd_user} - File Daemon Group: ${fd_group} + Director Port: ${dir_port} + File daemon Port: ${fd_port} + Storage daemon Port: ${sd_port} - SQL binaries Directory ${SQL_BINDIR} + Director User: ${dir_user} + Director Group: ${dir_group} + Storage Daemon User: ${sd_user} + Storage DaemonGroup: ${sd_group} + File Daemon User: ${fd_user} + File Daemon Group: ${fd_group} Large file support: $largefile_support Bacula conio support: ${got_conio} ${CONS_LIBS} @@ -3455,13 +3526,3 @@ echo __EOC__ >> scripts/bacula_config chmod 755 scripts/bacula_config cat config.out - -# Display a warning message if postgresql client lib is <= 8.1 -if test x$DB_TYPE = xpostgresql -a x$ac_cv_lib_pq_PQisthreadsafe != xyes \ - -a x$support_batch_insert = xyes -then - echo "WARNING: Your PostgreSQL client library is too old to detect " - echo " if it was compiled with --enable-thread-safety, consider to" - echo " upgrade it in order to avoid problems with Batch insert mode" - echo -fi