]> 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 95fb2c2f3b621fe5a402aab93b420817f0e60a63..7044b0257b822d897db29921bd85af6b42c0681a 100644 (file)
@@ -273,27 +273,52 @@ 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) : ;;
+       no)
+         ;;
        yes|*)
          if test -f ${with_qwt}/include/qwt.h; then
             QWT_INC="${with_qwt}/include"
             QWT_LDFLAGS="-L${with_qwt}/lib"
-         else
-            echo " "
-            echo "qwt.h not found. bat turned off ..."
-            echo " "
-            BAT_DIR=
-            support_bat=no
          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)
@@ -1003,7 +1028,7 @@ AC_SUBST(piddir)
 # ------------------------------------
 # Where to place subsys "lock file"
 # ------------------------------------
-ubsysdir=/var/run/subsys
+subsysdir=/var/run/subsys
 if test -d /var/run/subsys; then
    subsysdir=/var/run/subsys
 elif test -d /var/lock/subsys; then
@@ -1899,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"
@@ -2179,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
@@ -2214,13 +2250,6 @@ chmod 755 $c/mysql
 
 chmod 755 src/win32/build-depkgs-mingw32
 
-if test "${support_bat}" = "yes" ; then
-  cd src/qt-console
-  a=`pwd`
-  chmod 755 install_conf_file build-depkgs-qt-console
-  echo "Creating bat Makefile" 
-  qmake
-fi
 
 
 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
@@ -2320,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}