on the way to compile

master
Marc Wäckerlin 9 years ago
parent 7cd3999fcc
commit 823aed41d9
  1. 41
      ax_check_qt.m4
  2. 42
      ax_init_standard_project.m4
  3. 24
      bootstrap.sh
  4. 7
      configure.ac
  5. 7
      debian/changelog.in
  6. 4
      src/authentication.hxx
  7. 22
      src/browser.hxx
  8. 6
      src/certificate.hxx
  9. 8
      src/editbookmarks.hxx
  10. 2
      src/logincertificate.hxx
  11. 2
      src/main.cxx
  12. 4
      src/pinentry.hxx
  13. 8
      src/qbrowserlib/buttonlineedit.hxx
  14. 4
      src/qbrowserlib/errorlog.hxx
  15. 22
      src/qbrowserlib/log.hxx
  16. 20
      src/qbrowserlib/makefile.am
  17. 14
      src/qbrowserlib/saveorrun.hxx
  18. 4
      src/qbrowserlib/settings.hxx
  19. 8
      src/qbrowserlib/swisswebwidget.hxx
  20. 2
      src/smartcardauth.hxx
  21. 10
      src/swisssurfer.pc.in

@ -62,16 +62,35 @@ AC_DEFUN([AX_CXX_QT_TOOLS], [
AX_CXX_QT_TOOL(LRELEASE, lrelease)
])
AC_DEFUN([AX_CXX_CHECK_QT], [
AC_DEFUN([AX_CHECK_VALID_FLAG], [
AC_MSG_CHECKING([m4_default([$2], [for valid flag in "$1"])])
save_cxxflags="$CXXFLAGS"
newflag="no"
for test_flag in $1; do
CXXFLAGS+=" ${test_flag}"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
newflag="$test_flag"
AM_CXXFLAGS+=" ${test_flag}"
CXXFLAGS="$save_cxxflags"
break;
])
CXXFLAGS="$save_cxxflags"
done
AC_SUBST(AM_CXXFLAGS)
AC_MSG_RESULT([$newflag])
])
AC_DEFUN([AX_CHECK_QT], [
qt_modules="$2"
AX_CXX_QT_TOOLS
HAVE_$1=0
PKG_CHECK_MODULES([$1], [${qt_modules//Qt/Qt5}], [
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([$1]5, [${qt_modules//Qt/Qt5}], [
HAVE_$1=1
AC_DEFINE([HAVE_$1])
AM_CPPFLAGS+=" ${$1_CFLAGS}"
AM_CXXFLAGS+=" ${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}"
AM_CPPFLAGS+=" ${[$1]5_CFLAGS}"
AM_CXXFLAGS+=" ${[$1]5_CFLAGS}"
LIBS+=" ${[$1]5_LIBS}"
], [
PKG_CHECK_MODULES([$1], [${qt_modules}], [
HAVE_$1=1
@ -82,10 +101,13 @@ AC_DEFUN([AX_CXX_CHECK_QT], [
], [HAVE_$1=0])
])
AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1)
AX_CHECK_VALID_FLAG([-fPIC -fPIE], [position independent code flag])
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CXXFLAGS)
AX_ADDITIONAL_QT_RULES_HACK='
%_ui.hxx: %.ui
#BUILT_SOURCES += $(patsubst %.ui, ui_%.hxx, $(filter %.ui, $(SOURCES))))
#BUILT_SOURCES += $(patsubst %.hxx, moc_%.cxx, $(shell grep -l Q_OBJECT $(HEADERS)))1
ui_%.hxx: %.ui
${UIC} -o [$][@] $<
moc_%.cxx: %.hxx
@ -95,3 +117,10 @@ qrc_%.cxx: %.qrc
${RCC} -o [$][@] $<'
AC_SUBST(AX_ADDITIONAL_QT_RULES_HACK)
])
AC_DEFUN([AX_REQUIRE_QT], [
AX_CHECK_QT([$1], [$2])
if ! test "$HAVE_$1" -eq 1; then
AC_MSG_ERROR([Required Qt modules not found: $2])
fi
])

@ -104,7 +104,8 @@ AC_DEFUN([AX_USE_CXX], [
AC_CONFIG_FILES([src/makefile])
AM_CPPFLAGS="-DPACKAGE_VERSION='\"${PACKAGE_VERSION}\"' -DPACKAGE_NAME='\"${PACKAGE_NAME}\"'"
AM_CPPFLAGS='-I ${top_srcdir}/src -I ${top_builddir}/src'
AM_LDFLAGS='-L ${top_srcdir}/src -I ${top_builddir}/src'
# Get rid of that stupid -O2 -g opions!
CXXFLAGS="${CXXFLAGS:-}"
@ -138,6 +139,7 @@ AC_DEFUN([AX_USE_CXX], [
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_LDFLAGS)
])
AC_DEFUN([AX_USE_CPPUNIT], [
@ -204,16 +206,6 @@ AC_DEFUN([AX_USE_DOXYGEN], [
AC_CHECK_PROG(have_doxygen, doxygen, yes, no)
AC_CHECK_PROG(have_dot, dot, yes, no)
AC_CHECK_PROG(have_mscgen, mscgen, yes, no)
AC_ARG_ENABLE(html,
[AS_HELP_STRING([--disable-html],
[disable generation of doxygen html documentation])],
[have_html="$enableval"], [have_html="no"])
AM_CONDITIONAL(HTML_DOC, test "$have_html" = "yes")
AC_ARG_ENABLE(pdf,
[AS_HELP_STRING([--enable-pdf],
[enable generation of doxygen pdf documentation])],
[have_pdf="$enableval"], [have_pdf="no"])
AM_CONDITIONAL(PDF_DOC, test "$have_pdf" = "yes")
PDF_DOC=${PACKAGE_NAME}-${PACKAGE_VERSION}.pdf
AC_SUBST(PDF_DOC)
if test "$have_doxygen" = "no"; then
@ -238,19 +230,8 @@ AC_DEFUN([AX_USE_DOXYGEN], [
AX_ADD_MAKEFILE_TARGET_DEP([.PHONY], [pdf], [doc/makefile.in])
test -f doc/makefile.in && cat >> doc/makefile.in <<EOF
#### Begin: Appended by $0
@HTML_DOC_TRUE@@PDF_DOC_TRUE@doc: doxyfile html @PDF_DOC@
@HTML_DOC_FALSE@@PDF_DOC_TRUE@doc: doxyfile @PDF_DOC@
@HTML_DOC_TRUE@@PDF_DOC_FALSE@doc: doxyfile html
@HTML_DOC_FALSE@@PDF_DOC_FALSE@doc: doxyfile
html:
doxygen -w html doxyfile
@PEDANTIC_TRUE@ test \! -s doxygen.errors
@PDF_DOC@: latex/refman.pdf
mv \${<}/refman.pdf @PDF_DOC@
latex/refman.pdf: latex
cd \$< && \${MAKE}
latex:
doxygen -w pdf doxyfile
doc: doxyfile
doxygen doxyfile
@PEDANTIC_TRUE@ test \! -s doxygen.errors
clean-documentation:
@ -270,3 +251,16 @@ uninstall-documentation:
#### End: $0
EOF
])
AC_DEFUN([AX_PKG_REQUIRE], [
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([$1], [$1], [
AM_CPPFLAGS+=" ${$1_CFLAGS}"
AM_CXXFLAGS+=" ${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}"
], [
AC_MSG_ERROR([Required package $1 not found])
])
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CXXFLAGS)
])

@ -119,10 +119,12 @@ copy() {
doxyreplace() {
echo -n "-> doxyfile: configure $1 ..."
if sed -i 's§\(^'"$1"' *=\) *§\1'" $2"'§g' doc/doxyfile.in; then
if sed -i 's|\(^'"$1"' *=\) *|\1'" $2"'|g' doc/doxyfile.in; then
echo " success"
else
echo " ignored"
echo " error"
echo "**** command: sed -i 's|\(^'"$1"' *=\) *|\1'" $2"'|g' doc/doxyfile.in;"
exit 1
fi
}
@ -163,10 +165,10 @@ echo "${HEADER}" | to --condition AX_USE_DOXYGEN doc/makefile.am
echo "${HEADER}" | to --condition AX_BUILD_EXAMPLES examples/makefile.am
if testtag AX_USE_DOXYGEN && ! test -f doc/doxyfile.in; then
run doxygen -g doc/doxyfile.in
doxyreplace PROJECT_NAME '"@PACKAGE_NAME@"'
doxyreplace PROJECT_NUMBER '"@PACKAGE_VERSION@"'
doxyreplace PROJECT_BRIEF '"@DESCRIPTION@"'
doxyreplace PROJECT_LOGO '"@PROJECT_LOGO@"'
doxyreplace PROJECT_NAME "@PACKAGE_NAME@"
doxyreplace PROJECT_NUMBER "@PACKAGE_VERSION@"
doxyreplace PROJECT_BRIEF "@DESCRIPTION@"
doxyreplace PROJECT_LOGO "@PROJECT_LOGO@"
doxyreplace INLINE_INHERITED_MEMB YES
doxyreplace MULTILINE_CPP_IS_BRIEF YES
doxyreplace TAB_SIZE 2
@ -194,7 +196,7 @@ if testtag AX_USE_DOXYGEN && ! test -f doc/doxyfile.in; then
doxyreplace GENERATE_TREEVIEW NO
doxyreplace SEARCHENGINE YES
doxyreplace GENERATE_HTML YES
doxyreplace GENERATE_LATEX YES
doxyreplace GENERATE_LATEX NO
doxyreplace LATEX_BATCHMODE YES
doxyreplace LATEX_HIDE_INDICES YES
doxyreplace COMPACT_RTF YES
@ -280,16 +282,16 @@ if ! test -f makefile.am; then
echo "${HEADER}SUBDIRS =${SUBDIRS}" | to makefile.am
fi
to --condition AX_USE_LIBTOOL src/${PACKAGE_NAME}.pc.in <<EOF
${HEADER}prefix=@PACKAGE_NAME@
exec_prefix=${prefix}
${HEADER}prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: @PACKAGE_NAME@
Description: @DESCRIPTION@
Version: @VERSION@
Libs: -L${libdir} -l@PACKAGE_NAME@
Cflags: -I${includedir}
Libs: -L${libdir} -l@PACKAGE_NAME@ @LDFLAGS@
Cflags: -I${includedir} @CPPFLAGS@
EOF
#### Cleanup If Makefile Exists ####

@ -23,7 +23,12 @@ AX_USE_RPM_PACKAGING
AX_USE_CPPUNIT
AX_BUILD_EXAMPLES
AX_CXX_CHECK_QT([QT], [QtCore QtNetwork QtWebkit])
AX_REQUIRE_QT([Qt], [QtCore QtNetwork QtWebKit])
AX_CHECK_QT([QtWidgets], [QtWidgets QtWebKitWidgets]) # optional / new in Qt5
AX_PKG_REQUIRE([libpcscxx])
AC_CONFIG_FILES([src/qbrowserlib/makefile src/designer/makefile])
# create output
AC_OUTPUT

@ -1,6 +1,5 @@
@PACKAGE@ (@VERSION@-1) unstable; urgency=low
@PACKAGE@ (@PACKAGE_VERSION@~@DISTRO@.@BUILD_NUMBER@) @DISTRO@; urgency=low
* see https://dev.swisssign.com/projects/swisssurfer for changes
* see https://dev.swisssign.com/projects/swisssurfer for changes
* Please see ChangeLog of @PACKAGE@
-- Marc Wäckerlin (SwissSign AG) <marc.waeckerlin@tech.swisssign.com> Wed, 07 Apr 2010 10:23:02 +0200
-- @AUTHOR@ @BUILD_DATE@

@ -8,8 +8,8 @@
#ifndef __AUTHENTICATION_HXX__
#define __AUTHENTICATION_HXX__
#include <ui_authentication.h>
#include <QtGui/QDialog>
#include <ui_authentication.hxx>
#include <QDialog>
#include <QtNetwork/QAuthenticator>
class Authentication: public QDialog, protected Ui::Authentication {

@ -24,7 +24,7 @@
#include <proxyface/proxy.hxx>
#include <sslclientnetworkmanager.hxx>
#include <ui_browser.h>
#include <ui_browser.hxx>
#include <qbrowserlib/buttonlineedit.hxx>
#include <qbrowserlib/filestorage.hxx>
@ -32,23 +32,23 @@
#include <qbrowserlib/settings.hxx>
#include <qbrowserlib/executor.hxx>
#include <QtGui/QMainWindow>
#include <QtGui/QProgressBar>
#include <QtGui/QComboBox>
#include <QtGui/QSlider>
#include <QtGui/QMessageBox>
#include <QtGui/QPrinter>
#include <QtGui/QPrintDialog>
#include <QtGui/QPrintPreviewDialog>
#include <QMainWindow>
#include <QProgressBar>
#include <QComboBox>
#include <QSlider>
#include <QMessageBox>
#include <QPrinter>
#include <QPrintDialog>
#include <QPrintPreviewDialog>
#include <QtWebKit/QWebFrame>
#include <QtWebKit/QWebHistory>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QSslError>
#include <QtNetwork/QNetworkProxy>
#include <QtCore/QDir>
#include <QtGui/QFileDialog>
#include <QFileDialog>
#include <QtGui/QDesktopServices>
#include <QDesktopServices>
#include <stdexcept>
#include <cassert>

@ -8,10 +8,10 @@
#ifndef CERTIFICATE_HXX
#define CERTIFICATE_HXX
#include <ui_certificate.h>
#include <ui_certificate.hxx>
#include <QtCore/QDateTime>
#include <QtGui/QTreeWidget>
#include <QtGui/QTreeWidgetItem>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QtNetwork/QSslCertificate>
#include <QtCore/QDebug>

@ -8,10 +8,10 @@
#ifndef __EDITBOOKMARKS_HXX__
#define __EDITBOOKMARKS_HXX__
#include <QtGui/QDialog>
#include <QtGui/QComboBox>
#include <QtGui/QLineEdit>
#include <ui_editbookmarks.h>
#include <QDialog>
#include <QComboBox>
#include <QLineEdit>
#include <ui_editbookmarks.hxx>
#include <QDebug>

@ -9,7 +9,7 @@
#define LOGINCERTIFICATE_HXX
#include <qbrowserlib/log.hxx>
#include <ui_logincertificate.h>
#include <ui_logincertificate.hxx>
class LoginCertificate: public QDialog, protected Ui::LoginCertificate {
public:

@ -11,7 +11,7 @@
#include <qbrowserlib/log.hxx>
#include <browser.hxx>
#include <QtGui/QApplication>
#include <QApplication>
#include <QtCore/QTranslator>
#include <QtCore/QTextCodec>
#include <QtCore/QLocale>

@ -10,8 +10,8 @@
#include <cryptoki.hxx>
#include <qbrowserlib/log.hxx>
#include <ui_pinentry.h>
#include <QtGui/QDialog>
#include <ui_pinentry.hxx>
#include <QDialog>
#include <QtCore/QDateTime>
#include <QtNetwork/QSslCertificate>

@ -9,10 +9,10 @@
#define __BUTTONLINEEDIT_HXX__
#include <qbrowserlib/log.hxx>
#include <QtGui/QLineEdit>
#include <QtGui/QToolButton>
#include <QtGui/QAction>
#include <QtGui/QStyle>
#include <QLineEdit>
#include <QToolButton>
#include <QAction>
#include <QStyle>
#include <QtCore/QDebug>
//! @addtogroup qbrowserlib

@ -9,8 +9,8 @@
#define ERRORLOG_HXX
#include <qbrowserlib/log.hxx>
#include <qbrowserlib/ui_errorlog.h>
#include <QtGui/QDialog>
#include <qbrowserlib/ui_errorlog.hxx>
#include <QDialog>
//! @addtogroup qbrowserlib
//! @{

@ -8,10 +8,8 @@
#ifndef QBROWSERLIB_LOG
#define QBROWSERLIB_LOG
#ifdef QT_GUI_LIB
#include <qbrowserlib/ui_log.h>
#include <QtGui/QDialog>
#endif
#include <qbrowserlib/ui_log.hxx>
#include <QDialog>
#include <stdexcept>
#include <sstream>
@ -122,23 +120,15 @@ namespace qbrowserlib {
bool _clean;
};
class LogDialog:
#ifdef QT_GUI_LIB
public QDialog, public Ui::LogDialog
#else
public QObject
#endif
{
class LogDialog: public QDialog, public Ui::LogDialog {
Q_OBJECT;
public:
#ifdef QT_GUI_LIB
LogDialog(QWidget* p=0): QDialog(p) {
setupUi(this);
}
#endif
template<typename TYPE> LogDialog& append(const Log& log, TYPE* arg) {
std::ostringstream ss;
@ -147,7 +137,6 @@ namespace qbrowserlib {
}
template<typename TYPE> LogDialog& append(const Log& log, TYPE arg) {
#ifdef QT_GUI_LIB
int pos(_logs->rowCount());
_logs->insertRow(pos);
_logs->setItem
@ -165,13 +154,11 @@ namespace qbrowserlib {
_logs->setItem
(pos, MESSAGE,
new QTableWidgetItem(QVariant(arg).toString()));
#endif
return *this;
}
protected Q_SLOTS:
#ifdef QT_GUI_LIB
void on__fileLine_toggled(bool checked) {
if (checked) {
_logs->showColumn(FILE);
@ -218,13 +205,12 @@ namespace qbrowserlib {
if (!items.isEmpty()) _logs->scrollToItem(items[0]);
unsetCursor();
}
#endif
private:
friend class Log;
enum {FILE, LINE, INSTANCE, FUNCTION, MESSAGE} Columns;
};
// note: template class method must be defined in the header

@ -5,14 +5,18 @@
qbrowserlibdir=${includedir}/qbrowserlib
qbrowserlib_HEADERS = buttonlineedit.hxx errorlog.hxx log.hxx \
settings.hxx swisswebwidget.hxx certs.hxx \
executor.hxx pluginfactory.hxx swisswebpage.hxx \
temporaryfile.hxx downloadmanager.hxx \
filestorage.hxx saveorrun.hxx swisswebview.hxx
qbrowserlib_HEADERS = $(libqbrowserlib_la_HEADERS)
lib_LTLIBRARIES = libqbrowserlib.la
libqbrowserlib_la_SOURCES = errorlog.ui log.ui saveorrun.ui \
settings.ui swisswebwidget.ui certs.cxx \
log.cxx
libqbrowserlib_la_MOCFILES = buttonlineedit.hxx errorlog.hxx log.hxx \
settings.hxx swisswebwidget.hxx \
certs.hxx executor.hxx pluginfactory.hxx \
swisswebpage.hxx temporaryfile.hxx \
downloadmanager.hxx filestorage.hxx \
saveorrun.hxx swisswebview.hxx
libqbrowserlib_la_UIFILES = errorlog.ui log.ui saveorrun.ui \
settings.ui swisswebwidget.ui
libqbrowserlib_la_SOURCES = certs.cxx log.cxx \
$(libqbrowserlib_la_MOCFILES:%.hxx=moc_%.hxx) \
$(libqbrowserlib_la_UIFILES:%.ui=ui_%.hxx)

@ -9,17 +9,17 @@
#define __SAVEORRUN_HXX__
#include <qbrowserlib/log.hxx>
#include <qbrowserlib/ui_saveorrun.h>
#include <qbrowserlib/ui_saveorrun.hxx>
#include <qbrowserlib/executor.hxx>
#include <QtCore/QUrl>
#include <QtNetwork/QNetworkReply>
#include <QtGui/QDialog>
#include <QtGui/QFileDialog>
#include <QtGui/QFileSystemModel>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QMessageBox>
#include <QtGui/QDesktopServices>
#include <QDialog>
#include <QFileDialog>
#include <QFileSystemModel>
#include <QDialogButtonBox>
#include <QMessageBox>
#include <QDesktopServices>
#include <memory>
#include <cassert>

@ -9,13 +9,13 @@
#define QBROWSERLIB_SETTINGS_HXX
#include <qbrowserlib/log.hxx>
#include <qbrowserlib/ui_settings.h>
#include <qbrowserlib/ui_settings.hxx>
#include <QtWebKit/QWebSettings>
#include <QtCore/QSettings>
#include <QtCore/QMap>
#include <QtCore/QList>
#include <QtGui/QLineEdit>
#include <QLineEdit>
#include <cassert>

@ -8,13 +8,13 @@
#ifndef __SWISSWEBWIDGET_HXX__
#define __SWISSWEBWIDGET_HXX__
#include <qbrowserlib/ui_swisswebwidget.h>
#include <qbrowserlib/ui_swisswebwidget.hxx>
#include <qbrowserlib/downloadmanager.hxx>
#include <qbrowserlib/errorlog.hxx>
#include <QtGui/QMainWindow>
#include <QtGui/QToolBar>
#include <QtGui/QStatusBar>
#include <QMainWindow>
#include <QToolBar>
#include <QStatusBar>
#include <QtDebug>

@ -8,7 +8,7 @@
#include <QtNetwork/QSslConfiguration>
#include <QtNetwork/QSslCertificate>
#include <QtNetwork/QSslKey>
#include <QtGui/QMessageBox>
#include <QMessageBox>
#include <pinentry.hxx>

@ -1,18 +1,18 @@
## @id $Id$
#
# This file has been added by bootstrap.sh on Fri, 13 Mar 2015 15:22:56 +0100
# This file has been added by bootstrap.sh on Sat, 14 Mar 2015 15:34:48 +0100
# Feel free to change it or even remove and rebuild it, up to your needs
#
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
prefix=@PACKAGE_NAME@
exec_prefix=
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=/lib
includedir=/include
Name: @PACKAGE_NAME@
Description: @DESCRIPTION@
Version: @VERSION@
Libs: -L -l@PACKAGE_NAME@
Cflags: -I
Libs: -L -l@PACKAGE_NAME@ @LDFLAGS@
Cflags: -I @CPPFLAGS@

Loading…
Cancel
Save