/* 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
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,
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
else
QWT_LDFLAGS="-L${root}/lib"
fi
+ QWT_LIB="-lqwt"
+ QWT="qwt"
got_qwt=yes
break;
fi
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
AC_SUBST(BAT_DIR)
AC_SUBST(QWT_INC)
AC_SUBST(QWT_LDFLAGS)
+AC_SUBST(QWT_LIB)
+AC_SUBST(QWT)
# -------------------------------------------
BAT_DIR
QWT_INC
QWT_LDFLAGS
+QWT_LIB
+QWT
WXCONS_CPPFLAGS
WXCONS_LDFLAGS
WX_DIR
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; }
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
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
+
+
# -------------------------------------------
# bwx-console (default off)
# -------------------------------------------
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
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
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
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
* 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"
#
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#
-CONFIG += qt debug
+CONFIG += qt debug @QWT@
bins.path = /$(DESTDIR)@sbindir@
bins.files = ./bat
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
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
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
#include "joblist.h"
#include "restore.h"
#include "joblog/joblog.h"
+#ifdef HAVE_QWT
#include "jobgraphs/jobplot.h"
+#endif
/*
* Constructor for the class
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 *)),
/*
* Graph this table
*/
+#ifdef HAVE_QWT
void JobList::graphTable()
{
JobPlotPass pass;
QTreeWidgetItem* pageSelectorTreeWidgetItem = mainWin->getFromHash(this);
new JobPlot(pageSelectorTreeWidgetItem, pass);
}
+#endif
+
/*
* Save user settings associated with this page
*/
void preRestoreFromTime();
void showLogForJob();
void consoleCancelJob();
+#ifdef HAVE_QWT
void graphTable();
+#endif
private:
void createConnections();
#include "restore/restoretree.h"
#include "help/help.h"
#include "jobs/jobs.h"
+#ifdef HAVE_QWT
#include "jobgraphs/jobplot.h"
+#endif
/*
* Daemon message callback
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();
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()));
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
/*
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.
void runButtonClicked();
void estimateButtonClicked();
void browseButtonClicked();
+#ifdef HAVE_QWT
void jobPlotButtonClicked();
+#endif
void restoreButtonClicked();
void undockWindowButton();
void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
#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 */
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.