]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
After working on increasing the performance of the sql commands.
[bacula/bacula] / bacula / autoconf / configure.in
index 42fdd556f172aee8bc2ef7426ff3068e5c746748..7044b0257b822d897db29921bd85af6b42c0681a 100644 (file)
@@ -269,7 +269,61 @@ if test x$support_bat = xyes; then
      AC_MSG_ERROR(Unable to find Qt4 installation needed by bat)
   fi
 fi
+
+# 
+#  If bat is enabled, we need the qwt library
+got_qwt=no
+QWT_INC=
+QWT_LDFLAGS=
+if test x$support_bat = xyes; then
+   AC_MSG_CHECKING(for qwt support)
+   AC_ARG_WITH(qwt,
+     [ --with-qwt@<:@=DIR@:>@            specify qwt library directory],
+     [
+       case "$with_qwt" in
+       no)
+         ;;
+       yes|*)
+         if test -f ${with_qwt}/include/qwt.h; then
+            QWT_INC="${with_qwt}/include"
+            QWT_LDFLAGS="-L${with_qwt}/lib"
+         fi
+         ;;
+       esac
+     ]  
+   )
+#
+# Search in standard places, or --with-qwt not specified
+#
+   if test x$QWT_INC = x; then
+      for root in /usr /usr/local; do
+        for ver in qwt qwt5; do
+           if test -f ${root}/include/${ver}/qwt.h; then
+              QWT_INC="${root}/include/${ver}"
+              if test -d ${root}/lib64/; then
+                 QWT_LDFLAGS="-L${root}/lib64"
+              else
+                 QWT_LDFLAGS="-L${root}/lib"
+              fi
+              got_qwt=yes
+              break;
+           fi
+        done
+      done
+   fi
+   if test x$QWT_INC = x; then
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR(Unable to find qwt package needed by bat)
+      BAT_DIR=
+      support_bat=no
+   else
+      AC_MSG_RESULT(yes)
+   fi
+fi
+
 AC_SUBST(BAT_DIR)
+AC_SUBST(QWT_INC)
+AC_SUBST(QWT_LDFLAGS)
 
 
 # -------------------------------------------
@@ -830,6 +884,16 @@ if test "x$with_openssl_directory" != "x"; then
                [ ac_cv_openssl_sha2="no" ]
        )
 
+       # Solaris disables greater than 128+ bit encryption in their OpenSSL
+       # implementation, presumably for export reasons. If 192bit AES
+       # is available, we assume that we're running with a 'non-export'
+       # openssl library.
+       AC_TRY_LINK([ #include <openssl/evp.h> ],
+               [ EVP_aes_192_cbc(); ],
+               [ ac_cv_openssl_export="no" ],
+               [ ac_cv_openssl_export="yes" ]
+       )
+
        LIBS="${saved_LIBS}"
        CFLAGS="${saved_CFLAGS}"
 
@@ -842,6 +906,10 @@ if test "x$with_openssl_directory" != "x"; then
        if test "$ac_cv_openssl_sha2" = "yes"; then
                AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
        fi
+
+       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
 else
        support_tls="no"
        support_crypto="no"
@@ -961,6 +1029,13 @@ AC_SUBST(piddir)
 # Where to place subsys "lock file"
 # ------------------------------------
 subsysdir=/var/run/subsys
+if test -d /var/run/subsys; then
+   subsysdir=/var/run/subsys
+elif test -d /var/lock/subsys; then
+   subsysdir=/var/lock/subsys
+else
+   subsysdir=/var/run/subsys
+fi
 AC_ARG_WITH(subsys-dir,
     [  --with-subsys-dir=PATH   specify location of Bacula subsys file],
     [
@@ -1210,9 +1285,6 @@ AC_ARG_WITH(fd_group,
     ]
 )
 
-
-
-
 AC_SUBST(dir_user)
 AC_SUBST(dir_group)
 AC_SUBST(sd_user)
@@ -1238,6 +1310,7 @@ AC_SUBST(SBINPERM)
 # ------------------------------------------------
 # Bacula check for various SQL database engines
 # ------------------------------------------------
+SQL_LIB=
 BA_CHECK_POSTGRESQL_DB
 
 BA_CHECK_MYSQL_DB
@@ -1249,6 +1322,28 @@ BA_CHECK_SQLITE_DB
 AC_SUBST(cats)
 AC_SUBST(DB_TYPE)
 
+# -------------------------------------------
+# enable batch attribute DB insert (default on)
+# -------------------------------------------
+support_batch_insert=no
+A=`nm $SQL_LIB | grep pthread_mutex_lock`
+pkg=$?
+if test $pkg = 0; then
+   support_batch_insert=yes
+   AC_ARG_ENABLE(batch-insert,
+     [ --enable-batch-insert       enable the DB batch insert code [disabled]],
+     [if test x$enableval = xno; then
+       support_batch_insert=no
+      else
+       support_batch_insert=yes
+     fi])
+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# --------------------------------------------------------------------------
@@ -1619,6 +1714,7 @@ AC_CHECK_FUNCS( \
 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
 AC_CHECK_FUNCS(posix_fadvise)
+AC_CHECK_FUNCS(fdatasync)
 
 AC_CHECK_FUNCS(chflags) 
 
@@ -1828,7 +1924,7 @@ freebsd)
        largefile_support="yes"
   ;;
 hpux)
-       PSCMD="UNIX95=1 ps -e -o pid,comm"
+       PSCMD="UNIX95=1; ps -e -o pid,comm"
        CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
        DISTVER=`uname -r`
        TAPEDRIVE="/dev/rmt/0hnb"
@@ -2039,9 +2135,10 @@ AC_OUTPUT([autoconf/Make.common \
           scripts/wxconsole.console_apps \
           scripts/wxconsole.desktop.consolehelper \
           scripts/wxconsole.desktop.xsu \
-           scripts/bat.desktop.in \
-           scripts/bat.desktop.xsu.in \
-           scripts/bat.console_apps.in \
+          scripts/bat.desktop \
+          scripts/bat.desktop.xsu \
+          scripts/bat.desktop.consolehelper \
+          scripts/bat.console_apps \
           src/Makefile \
           src/host.h \
           src/console/Makefile \
@@ -2107,9 +2204,20 @@ AC_OUTPUT([autoconf/Make.common \
           src/tools/Makefile \
           po/Makefile.in \
           $PFILES ],  
-         [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
+         [ ]
 )
 
+if test "${support_bat}" = "yes" ; then
+  cd src/qt-console
+  chmod 755 install_conf_file build-depkgs-qt-console
+  echo "Creating bat Makefile" 
+  qmake
+  cd ${BUILD_DIR}
+fi
+
+echo "Doing make of dependencies"
+${MAKE:-make} depend
+
 cd scripts
 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
 chmod 755 dvd-handler dvd-simulator
@@ -2142,11 +2250,6 @@ chmod 755 $c/mysql
 
 chmod 755 src/win32/build-depkgs-mingw32
 
-if test "${support_bat}" = "yes" ; then
-cd src/qt-console
-chmod 755 install_conf_file
-qmake
-fi
 
 
 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
@@ -2246,7 +2349,7 @@ Configuration on `date`:
   Encryption support:        ${support_crypto} 
   ZLIB support:              ${have_zlib}
   enable-smartalloc:         ${support_smartalloc} 
-  enable-bat:                ${support_bat}
+  bat support:               ${support_bat} ${QWT_LDFLAGS}
   enable-gnome:              ${support_gnome} ${gnome_version}
   enable-bwx-console:        ${support_wx_console} ${wx_version}
   enable-tray-monitor:       ${support_tray_monitor}
@@ -2255,6 +2358,7 @@ Configuration on `date`:
   build-stored:              ${build_stored}
   ACL support:               ${have_acl}
   Python support:            ${support_python} ${PYTHON_LIBS}
+  Batch insert enabled:       ${support_batch_insert}
 
   " > config.out