]> git.sur5r.net Git - bacula/bacula/commitdiff
Add configure bat QWT libraries, so that bat can be built
authorKern Sibbald <kern@sibbald.com>
Mon, 12 May 2008 09:32:54 +0000 (09:32 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 12 May 2008 09:32:54 +0000 (09:32 +0000)
     with or without the QWT libaries.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6956 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/config.h.in
bacula/autoconf/configure.in
bacula/configure
bacula/src/qt-console/bat.h
bacula/src/qt-console/bat.pro.in
bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/joblist/joblist.h
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/mainwin.h
bacula/src/version.h
bacula/technotes-2.1

index 1c3a0aff6997f7b6c799bf023afc2fcf77098caa..260b0398d0b89dcfa6fd1c9c9515e9f5c1d6276a 100644 (file)
 /* Define to 1 if you have the <pwd.h> header file. */
 #undef HAVE_PWD_H
 
+/* Set if bat QWT library found */
+#undef HAVE_QWT
+
 /* Define to 1 if you have the `readdir_r' function. */
 #undef HAVE_READDIR_R
 
index b0338e7b40f8a52f5c7d2c25db62e95588599d46..4b004db18294ebec95ef0b3859ad09387cd8e08c 100644 (file)
@@ -272,6 +272,8 @@ fi
 got_qwt=no
 QWT_INC=
 QWT_LDFLAGS=
+QWT_LIB=
+QWT=
 if test x$support_bat = xyes; then
    AC_MSG_CHECKING(for qwt support)
    AC_ARG_WITH(qwt,
@@ -284,6 +286,8 @@ if test x$support_bat = xyes; then
          if test -f ${with_qwt}/include/qwt.h; then
             QWT_INC="${with_qwt}/include"
             QWT_LDFLAGS="-L${with_qwt}/lib"
+            QWT_LIB="-lqwt"
+            QWT="qwt"
          fi
          ;;
        esac
@@ -302,6 +306,8 @@ if test x$support_bat = xyes; then
               else
                  QWT_LDFLAGS="-L${root}/lib"
               fi
+              QWT_LIB="-lqwt"
+              QWT="qwt"
               got_qwt=yes
               break;
            fi
@@ -310,10 +316,8 @@ if test x$support_bat = xyes; then
    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_DEFINE(HAVE_QWT, 1, [Set if bat QWT library found])
       AC_MSG_RESULT(yes)
    fi
 fi
@@ -321,6 +325,8 @@ fi
 AC_SUBST(BAT_DIR)
 AC_SUBST(QWT_INC)
 AC_SUBST(QWT_LDFLAGS)
+AC_SUBST(QWT_LIB)
+AC_SUBST(QWT)
 
 
 # -------------------------------------------
index 55cf39024f017585ca4e0758752d39839ffe3c02..ce0bed17a1a3d37c14339aea67267bb174de01d2 100755 (executable)
@@ -774,6 +774,8 @@ GNOME_DIR
 BAT_DIR
 QWT_INC
 QWT_LDFLAGS
+QWT_LIB
+QWT
 WXCONS_CPPFLAGS
 WXCONS_LDFLAGS
 WX_DIR
@@ -13512,6 +13514,8 @@ fi
 got_qwt=no
 QWT_INC=
 QWT_LDFLAGS=
+QWT_LIB=
+QWT=
 if test x$support_bat = xyes; then
    { echo "$as_me:$LINENO: checking for qwt support" >&5
 echo $ECHO_N "checking for qwt support... $ECHO_C" >&6; }
@@ -13526,6 +13530,8 @@ if test "${with_qwt+set}" = set; then
          if test -f ${with_qwt}/include/qwt.h; then
             QWT_INC="${with_qwt}/include"
             QWT_LDFLAGS="-L${with_qwt}/lib"
+            QWT_LIB="-lqwt"
+            QWT="qwt"
          fi
          ;;
        esac
@@ -13546,6 +13552,8 @@ fi
               else
                  QWT_LDFLAGS="-L${root}/lib"
               fi
+              QWT_LIB="-lqwt"
+              QWT="qwt"
               got_qwt=yes
               break;
            fi
    if test x$QWT_INC = x; then
       { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-      { { echo "$as_me:$LINENO: error: Unable to find qwt package needed by bat" >&5
-echo "$as_me: error: Unable to find qwt package needed by bat" >&2;}
-   { (exit 1); exit 1; }; }
-      BAT_DIR=
-      support_bat=no
    else
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_QWT 1
+_ACEOF
+
       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
    fi
@@ -13571,6 +13579,8 @@ fi
 
 
 
+
+
 # -------------------------------------------
 # bwx-console (default off)
 # -------------------------------------------
@@ -31048,6 +31058,8 @@ GNOME_DIR!$GNOME_DIR$ac_delim
 BAT_DIR!$BAT_DIR$ac_delim
 QWT_INC!$QWT_INC$ac_delim
 QWT_LDFLAGS!$QWT_LDFLAGS$ac_delim
+QWT_LIB!$QWT_LIB$ac_delim
+QWT!$QWT$ac_delim
 WXCONS_CPPFLAGS!$WXCONS_CPPFLAGS$ac_delim
 WXCONS_LDFLAGS!$WXCONS_LDFLAGS$ac_delim
 WX_DIR!$WX_DIR$ac_delim
@@ -31076,8 +31088,6 @@ PYTHON_INCDIR!$PYTHON_INCDIR$ac_delim
 OPENSSL_LIBS!$OPENSSL_LIBS$ac_delim
 OPENSSL_INC!$OPENSSL_INC$ac_delim
 working_dir!$working_dir$ac_delim
-archivedir!$archivedir$ac_delim
-scriptdir!$scriptdir$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -31119,6 +31129,8 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+archivedir!$archivedir$ac_delim
+scriptdir!$scriptdir$ac_delim
 dump_email!$dump_email$ac_delim
 job_email!$job_email$ac_delim
 smtp_host!$smtp_host$ac_delim
@@ -31174,7 +31186,7 @@ DISTVER!$DISTVER$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 53; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 55; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 5b66229b8a6e3e97a1812bec872662a6a77da95c..308f1e05cb3843e2a7c7908b672f13501fc356d4 100644 (file)
  *   Kern Sibbald, January 2007
  */
 
+#include "config.h"
 #include <QtGui>
 #include <QtCore>
 #include "mainwin.h"
-#include "config.h"
 #include "bacula.h"
 #include "bat_conf.h"
 #include "jcr.h"
index acb80cf356047608d7b9c887d9bb306f66dc9cbe..341dcd1480ef18abcdac3c61bdf9e73d067aae7e 100644 (file)
@@ -7,7 +7,7 @@
 #
 #   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 #    
-CONFIG += qt debug
+CONFIG += qt debug @QWT@
 
 bins.path = /$(DESTDIR)@sbindir@
 bins.files = ./bat
@@ -20,7 +20,7 @@ DEPENDPATH  += .
 INCLUDEPATH += .. . ./console ./restore ./select
 INCLUDEPATH += @QWT_INC@ 
 LIBS        += -L../lib -lbac @OPENSSL_LIBS@
-LIBS        += @QWT_LDFLAGS@ -lqwt
+LIBS        += @QWT_LDFLAGS@ @QWT_LIB@
 
 RESOURCES    = main.qrc
 MOC_DIR      = moc
@@ -42,7 +42,9 @@ FORMS += medialist/medialist.ui mediaedit/mediaedit.ui joblist/joblist.ui
 FORMS += clients/clients.ui storage/storage.ui fileset/fileset.ui
 FORMS += joblog/joblog.ui jobs/jobs.ui
 FORMS += help/help.ui
-FORMS += jobgraphs/jobplotcontrols.ui
+qwt {
+   FORMS += jobgraphs/jobplotcontrols.ui
+}
 
 # Main directory
 HEADERS += mainwin.h bat.h bat_conf.h qstd.h pages.h
@@ -117,8 +119,10 @@ HEADERS += restore/restoretree.h
 SOURCES += restore/restoretree.cpp
 
 ## Job Step Graphs
-HEADERS += jobgraphs/jobplot.h
-SOURCES += jobgraphs/jobplot.cpp
+qwt {
+  HEADERS += jobgraphs/jobplot.h
+  SOURCES += jobgraphs/jobplot.cpp
+}
 
 # Help dialog
 HEADERS += help/help.h
index dc2495579a57c694b2bd9679521c082c5890f860..d04f01d91c3c10b69de4cfdacf54757d1af1d141 100644 (file)
@@ -37,7 +37,9 @@
 #include "joblist.h"
 #include "restore.h"
 #include "joblog/joblog.h"
+#ifdef HAVE_QWT
 #include "jobgraphs/jobplot.h"
+#endif
 
 /*
  * Constructor for the class
@@ -403,7 +405,11 @@ void JobList::createConnections()
    connect(actionRefreshJobList, SIGNAL(triggered()), this,
                 SLOT(populateTable()));
    connect(refreshButton, SIGNAL(pressed()), this, SLOT(populateTable()));
+#ifdef HAVE_QWT
    connect(graphButton, SIGNAL(pressed()), this, SLOT(graphTable()));
+#else
+   graphButton->setEnabled(false);
+#endif
    /* for the tableItemChanged to maintain m_currentJob */
    connect(mp_tableWidget, SIGNAL(
            currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)),
@@ -568,6 +574,7 @@ void JobList::consoleCancelJob()
 /*
  * Graph this table
  */
+#ifdef HAVE_QWT
 void JobList::graphTable()
 {
    JobPlotPass pass;
@@ -586,6 +593,8 @@ void JobList::graphTable()
    QTreeWidgetItem* pageSelectorTreeWidgetItem = mainWin->getFromHash(this);
    new JobPlot(pageSelectorTreeWidgetItem, pass);
 }
+#endif
+
 /*
  * Save user settings associated with this page
  */
index f16fbd9e02bfa206f7dd613f9a38b41f3e6c78e8..27e65e4e96745a9540e1a996deedfbcf3bb883a0 100644 (file)
@@ -67,7 +67,9 @@ private slots:
    void preRestoreFromTime();
    void showLogForJob();
    void consoleCancelJob();
+#ifdef HAVE_QWT
    void graphTable();
+#endif
 
 private:
    void createConnections();
index 5ce2baf2d18ed230dd935b58a8da6d5b8afee5cc..3dbc1146e870b761bf26eb886ee56096786867d1 100644 (file)
@@ -50,7 +50,9 @@
 #include "restore/restoretree.h"
 #include "help/help.h"
 #include "jobs/jobs.h"
+#ifdef HAVE_QWT
 #include "jobgraphs/jobplot.h"
+#endif
 
 /* 
  * Daemon message callback
@@ -144,9 +146,12 @@ void MainWin::createPages()
       new FileSet();
       new Jobs();
       createPageJobList("", "", "", "", NULL);
+
+#ifdef HAVE_QWT
       JobPlotPass pass;
       pass.use = false;
       new JobPlot(NULL, pass);
+#endif
       new MediaList();
       new Storage();
       new restoreTree();
@@ -233,7 +238,9 @@ void MainWin::createConnections()
    connect(actionRun, SIGNAL(triggered()), this,  SLOT(runButtonClicked()));
    connect(actionEstimate, SIGNAL(triggered()), this,  SLOT(estimateButtonClicked()));
    connect(actionBrowse, SIGNAL(triggered()), this,  SLOT(browseButtonClicked()));
+#ifdef HAVE_QWT
    connect(actionJobPlot, SIGNAL(triggered()), this,  SLOT(jobPlotButtonClicked()));
+#endif
    connect(actionRestore, SIGNAL(triggered()), this,  SLOT(restoreButtonClicked()));
    connect(actionUndock, SIGNAL(triggered()), this,  SLOT(undockWindowButton()));
    connect(actionToggleDock, SIGNAL(triggered()), this,  SLOT(toggleDockContextWindow()));
@@ -434,12 +441,14 @@ void MainWin::restoreButtonClicked()
    new prerestorePage();
 }
 
+#ifdef HAVE_QWT
 void MainWin::jobPlotButtonClicked()
 {
    JobPlotPass pass;
    pass.use = false;
    new JobPlot(NULL, pass);
 }
+#endif
 
 /*
  * The user just finished typing a line in the command line edit box
index 1db143c3a1c134e9117cb390842c60917d1888d2..4cee8da0f6d25a02d4c0e278dfb463495e9491b9 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -106,7 +106,9 @@ public slots:
    void runButtonClicked();
    void estimateButtonClicked();
    void browseButtonClicked();
+#ifdef HAVE_QWT
    void jobPlotButtonClicked();
+#endif
    void restoreButtonClicked();
    void undockWindowButton();
    void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
index cf68646fc70471d4df6ab7936c7ec4de1c182364..49260476dea8315a38d70629ab6ada9bb7e23344 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.2.10-b3"
-#define BDATE   "11 May 2008"
-#define LSMDATE "11May08"
+#define BDATE   "12 May 2008"
+#define LSMDATE "12May08"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2008"       /* year for copyright messages in progs */
index 95ebf71c0a6918b1f474c7e35c81ac7db35212db..071125d9a8ef35fc4f5c7b04efea1eea55190961 100644 (file)
@@ -2,6 +2,9 @@
 
 General:
 
+12May08
+kes  Add configure bat QWT libraries, so that bat can be built
+     with or without the QWT libaries.
 11May08
 kes  Apply batfix bat cleanup patch from Riccardo.
 kes  Make sure we unload the right slot when swapping.