]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
Updated Exchange plugin to support accurate mode
[bacula/bacula] / bacula / autoconf / configure.in
index dd52286b86f4cd61ee814f61e473c8d325691b79..2a0fb04578d9be8e87b99ccc33d13f8c3e2ef02e 100644 (file)
@@ -12,6 +12,14 @@ AC_SUBST(TOP_DIR)
 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
 
+dnl minimal Win32 stuff for "make clean"
+WIN32BUILDDIR=${BUILD_DIR}/src/win32
+WIN32MAINDIR=${BUILD_DIR}
+WIN32TOPDIR=${TOP_DIR}   
+AC_SUBST(WIN32BUILDDIR)
+AC_SUBST(WIN32MAINDIR)
+AC_SUBST(WIN32TOPDIR)
+
 dnl require a recent autoconf
 AC_PREREQ(2.61)
 
@@ -26,7 +34,7 @@ post_host=
 if test "x$BACULA" != x; then
    post_host=`echo -${BACULA} | tr 'A-Z ' 'a-z-'`
 fi
-BACULA=${BACULA-Bacula}
+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`
@@ -85,6 +93,7 @@ AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format)
 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
 AC_PATH_PROG(QMAKE, qmake, none)
 AC_PATH_PROG(QMAKEQT4, qmake-qt4, none)
+AC_PATH_PROG(GMAKE, gmake, none)
 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
 if test "x$WXCONFIG" = x; then
    WXCONFIG=wx-config
@@ -203,11 +212,6 @@ dnl Suppport for gettext (translations)
 dnl By default, $datarootdir is ${prefix}/share
 dnl --------------------------------------------------
 AM_GNU_GETTEXT([external])
-if test x${prefix} = xNONE ; then
-   if test `eval echo ${datarootdir}` = NONE/share ; then
-      datarootdir=/usr/share
-   fi
-fi
 
 dnl ------------------------------------------------------------------
 dnl If the user has not set --prefix, we set our default to nothing.
@@ -234,6 +238,9 @@ if test x${prefix} = xNONE ; then
       includedir=/usr/include
    fi
 
+   if test `eval echo ${datarootdir}` = NONE/share ; then
+      datarootdir=/usr/share
+   fi
    prefix=
 fi
 
@@ -246,6 +253,8 @@ fi
 
 sysconfdir=`eval echo ${sysconfdir}`
 datarootdir=`eval echo ${datarootdir}`
+docdir=`eval echo ${docdir}`
+htmldir=`eval echo ${htmldir}`
 libdir=`eval echo ${libdir}`
 includedir=`eval echo ${includedir}`
 localedir=`eval echo ${datarootdir}/locale`
@@ -266,6 +275,23 @@ dnl -------------------------------------------------------------------------
 if test x$mandir = x'${prefix}/man' ; then
    mandir=/usr/share/man
 fi
+
+dnl -------------------------------------------------------------------------
+dnl  If the user has not set --htmldir, we default to /usr/share/doc/bacula-xx.xx/html
+dnl -------------------------------------------------------------------------
+dnl z
+if test x$htmldir = x${docdir} ; then
+   htmldir=`eval echo ${docdir}bacula-${VERSION}/html`
+fi
+
+dnl -------------------------------------------------------------------------
+dnl  If the user has not set --docdir, we default to /usr/share/doc/
+dnl -------------------------------------------------------------------------
+dnl z
+if test x$docdir = x'/usr/share/doc/' ; then
+   docdir=`eval echo ${docdir}bacula-${VERSION}`
+fi
+
            
 AC_PATH_PROGS(MSGFMT, msgfmt, no)
 if test "$MSGFMT" = "no"
@@ -304,6 +330,7 @@ build_dird=yes
 build_stored=yes
 cats=
 db_type=Internal
+support_lockmgr=no
 DB_TYPE=bdb
 
 dnl --------------------------------------------------------------------------
@@ -459,7 +486,7 @@ if test x$support_wx_console = xyes; then
 
       AC_SUBST(WXCONS_CPPFLAGS)
       AC_SUBST(WXCONS_LDFLAGS)
-      WX_DIR=src/wx-console
+      WX_DIR="src/wx-console"
    else
       echo " "
       echo "wx-config program not found. bwx-console disabled."
@@ -516,6 +543,23 @@ if test x$support_smartalloc = xyes; then
    AC_DEFINE(SMARTALLOC, 1, [Set if you want Smartalloc enabled])
 fi
 
+dnl -------------------------------------------
+dnl Lock Manager (default off)
+dnl -------------------------------------------
+AC_ARG_ENABLE(lockmgr,
+   AC_HELP_STRING([--enable-lockmgr], [enable lock manager support @<:@default=no@:>@]),
+   [
+       if test x$enableval = xyes; then
+         support_lockmgr=yes
+       fi
+   ]
+)
+
+if test x$support_lockmgr = xyes; then
+   AC_DEFINE(_USE_LOCKMGR, 1, [Set if you want Lock Manager enabled])
+fi
+
+
 dnl -------------------------------------------
 dnl static-tools (default off)
 dnl -------------------------------------------
@@ -861,7 +905,7 @@ AC_ARG_WITH(python,
        if test "$withval" != "no"; then
          if test "$withval" = "yes"; then
             for python_root in /usr /usr/local /usr/sfw; do
-               for ver in python2.2 python2.3 python2.4 python2.5; do
+               for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python3; do
                   if test -f $python_root/include/${ver}/Python.h; then
                      PYTHON_INCDIR=-I$python_root/include/${ver}
                      if test -d $python_root/lib64/${ver}/config; then
@@ -1668,7 +1712,6 @@ AC_CHECK_HEADERS( \
    sys/time.h \
    sys/types.h \
    arpa/nameser.h \
-   resolv.h \
    mtio.h \
    sys/mtio.h \
    sys/tape.h \
@@ -1835,6 +1878,8 @@ AC_TYPE_UID_T
 AC_TYPE_SIZE_T
 AC_TYPE_PID_T
 AC_TYPE_OFF_T
+AC_TYPE_INTPTR_T
+AC_TYPE_UINTPTR_T
 AC_CHECK_TYPE(ino_t, unsigned long)
 AC_CHECK_TYPE(dev_t, unsigned long)
 AC_CHECK_TYPE(daddr_t, long)
@@ -2222,42 +2267,42 @@ if test x$support_acl = xyes; 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])] , )
    AC_CHECK_FUNC(acl_get_file,
       [
-          have_acl=yes
+         have_acl=yes
       ], [
-          AC_CHECK_LIB(acl, acl_get_file,
+         AC_CHECK_LIB(acl, acl_get_file,
             [
-                have_acl=yes;
-                FDLIBS="-lacl $FDLIBS"
+                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
-                                 ]
-                              )
-                          ]
-                       )
-                    ]
-                 )
-             ]
-          )
+                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
+                                 ]
+                              )
+                          ]
+                       )
+                   ]
+                )
+            ]
+         )
       ]
    )
    if test $have_acl = yes; then
-      AC_DEFINE(HAVE_ACL)
+      AC_DEFINE([HAVE_ACL], [], [Normal attribute support])
    fi
 
    if test $have_extended_acl = yes; then
-      AC_DEFINE(HAVE_EXTENDED_ACL)
+      AC_DEFINE([HAVE_EXTENDED_ACL], [], [Extended attribute support])
    fi
 fi
 
@@ -2269,7 +2314,7 @@ AC_ARG_ENABLE(xattr,
    AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
    [
        if test x$enableval = xno; then
-         support_acl=no
+         support_xattr=no
        fi
    ]
 )
@@ -2279,24 +2324,57 @@ if test x$support_xattr = xyes; 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)
-          AC_DEFINE(HAVE_LGETXATTR)
-          AC_DEFINE(HAVE_LSETXATTR)
-      ], [
-          AC_CHECK_FUNCS(listxattr getxattr setxattr,
-              [
-                  have_xattr=yes
-                  AC_DEFINE(HAVE_LISTXATTR)
-                  AC_DEFINE(HAVE_GETXATTR)
-                  AC_DEFINE(HAVE_SETXATTR)
-              ]
-          )
+         have_xattr=yes
+         AC_DEFINE([HAVE_LLISTXATTR], [], [LLISTXATTR support])
+         AC_DEFINE([HAVE_LGETXATTR], [], [LGETXATTR support])
+         AC_DEFINE([HAVE_LSETXATTR], [], [LSETXATTR support])
       ]
    )
 
+   #
+   # OSX specific
+   #
+   if test $have_xattr = no; then
+      AC_CHECK_FUNCS(listxattr getxattr setxattr,
+        [
+            have_xattr=yes
+            AC_DEFINE([HAVE_LLISTXATTR], [], [LLISTXATTR support])
+            AC_DEFINE([HAVE_LGETXATTR], [], [LGETXATTR support])
+            AC_DEFINE([HAVE_LSETXATTR], [], [LSETXATTR support])
+        ]
+      )
+   fi
+
+   #
+   # Solaris specific
+   #
+   if test $have_xattr = no; 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])] , )
+
+      AC_CHECK_FUNCS(openat fstatat unlinkat fchownat futimesat,
+        [
+            have_xattr=yes
+            AC_DEFINE([HAVE_OPENAT], [], [OPENAT support])
+            AC_DEFINE([HAVE_FSTATAT], [], [FSTATAT support])
+            AC_DEFINE([HAVE_UNLINKAT], [], [UNLINKAT support])
+            AC_DEFINE([HAVE_FCHOWNAT], [], [FCHOWNAT support])
+            AC_DEFINE([HAVE_FUTIMESAT], [], [FUTIMESAT support])
+        ]
+      )
+
+      if test $have_xattr = yes; then
+        AC_CHECK_LIB(nvpair, nvlist_next_nvpair,
+           [
+               FDLIBS="-lnvpair $FDLIBS"
+           ]
+        )
+      fi
+   fi
+
    if test $have_xattr = yes; then
-      AC_DEFINE(HAVE_XATTR)
+      AC_DEFINE([HAVE_XATTR], [], [XATTR support])
    fi
 fi
 
@@ -2794,7 +2872,12 @@ AC_OUTPUT([autoconf/Make.common \
           src/plugins/fd/Makefile \
           src/plugins/sd/Makefile \
           src/plugins/dir/Makefile \
+          src/win32/Makefile.inc \
           po/Makefile.in \
+          updatedb/update_mysql_tables_9_to_10 \
+          updatedb/update_sqlite3_tables_9_to_10 \
+          updatedb/update_postgresql_tables_9_to_10 \
+          updatedb/update_sqlite_tables_9_to_10 \
           updatedb/update_mysql_tables_10_to_11 \
           updatedb/update_sqlite3_tables_10_to_11 \
           updatedb/update_postgresql_tables_10_to_11 \
@@ -2816,7 +2899,6 @@ if test "${support_bat}" = "yes" ; then
    fi
   
    cd src/qt-console
-   chmod 755 install_conf_file build-depkgs-qt-console
    echo "Creating bat Makefile"
    $QMAKEBIN
    make clean
@@ -2832,6 +2914,10 @@ if test X"$GCC" = "Xyes" ; then
   ${MAKE:-make} depend
 fi
 
+cd src/qt-console
+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 dvd-handler dvd-simulator
@@ -2923,7 +3009,7 @@ Configuration on `date`:
    Subsys directory:       ${subsysdir}
    Man directory:          ${mandir}
    Data directory:         ${datarootdir}
-   Plugin directory:        ${plugindir}
+   Plugin directory:       ${plugindir}
    C Compiler:             ${CC} ${CCVERSION}
    C++ Compiler:           ${CXX} ${CXXVERSION}
    Compiler flags:         ${WCFLAGS} ${CFLAGS} 
@@ -2965,6 +3051,7 @@ Configuration on `date`:
    Encryption support:     ${support_crypto} 
    ZLIB support:           ${have_zlib}
    enable-smartalloc:      ${support_smartalloc} 
+   enable-lockmgr:         ${support_lockmgr}
    bat support:            ${support_bat} ${QWT_LDFLAGS}
    enable-gnome:           ${support_gnome} ${gnome_version}
    enable-bwx-console:     ${support_wx_console} ${wx_version}
@@ -2973,7 +3060,7 @@ Configuration on `date`:
    build-dird:             ${build_dird}
    build-stored:           ${build_stored}
    ACL support:            ${have_acl}
-   XATTR support:          ${have_xattr}
+   XATTR support:          ${have_xattr}
    Python support:         ${support_python} ${PYTHON_LIBS}
    Batch insert enabled:    ${support_batch_insert}