[Kde-bindings] KDE/kdebindings/smoke/qt
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Jun 19 08:50:11 UTC 2006
SVN commit 552829 by rdale:
* Added the QtUiTools/quiloader.h header and accompanying lib to the
Smoke lib code generation
* Added optional configuration for qtdbus and qwt, and autoconf tests
CCMAIL: kde-bindings at kde.org
M +4 -3 Makefile.am
M +119 -1 configure.in.in
M +38 -0 generate.pl.in
M +1 -0 header_list
A qtdbus_header_list
A qwt_header_list
--- trunk/KDE/kdebindings/smoke/qt/Makefile.am #552828:552829
@@ -1,7 +1,7 @@
lib_LTLIBRARIES = libsmokeqt.la
# set the include path for X, qt and KDE
-INCLUDES = -I$(srcdir)/.. $(all_includes)
+INCLUDES = -I$(srcdir)/.. $(all_includes) -I$(qt_includes)/QtUiTools
EXTRA_DIST=generate.pl.in qtguess.pl.in qt_smoke.h Makefile.am
@@ -10,8 +10,9 @@
# the libraries to link against.
libsmokeqt_la_LIBADD = $(LIB_QTCORE) $(LIB_QTGUI) $(LIB_QTNETWORK) \
- $(LIB_QTOPENGL) $(LIB_QTSQL) $(LIB_QTCORE) $(LIB_QTXML) $(LIB_QTSVG) \
- $(GLLIB) $(LIBQSCINTILLA) -lQtSvg
+ $(LIB_QTOPENGL) $(LIB_QTSQL) $(LIB_QTCORE) $(LIB_QTXML) \
+ $(GLLIB) $(LIBQSCINTILLA) \
+ -lQtSvg -lQtUiTools $(LIBQTDBUS) $(LIBQWT)
x_sources = x_1.cpp x_2.cpp x_3.cpp x_4.cpp x_5.cpp x_6.cpp x_7.cpp \
x_8.cpp x_9.cpp x_10.cpp x_11.cpp x_12.cpp x_13.cpp x_14.cpp x_15.cpp \
--- trunk/KDE/kdebindings/smoke/qt/configure.in.in #552828:552829
@@ -33,7 +33,7 @@
AC_ARG_ENABLE(
qscintilla,
[ --enable-qscintilla@<:@=yes|no@:>@ Smoke: build Smoke with QScintilla extention for qt @<:@default:no@:>@],
- [ qtextscintilla="$withval" ],
+ [ qtextscintilla="$enableval" ],
[ qtextscintilla="no" ]
)
AC_SUBST(qtextscintilla)
@@ -80,3 +80,121 @@
if test "X$qtextscintilla" = "Xyes" ; then
AC_FIND_QSCINTILLA
fi
+
+dnl -------
+dnl Test for libdbus-qt4-1 (D-Bus support)
+dnl -------
+
+AC_ARG_ENABLE(
+ qtdbus,
+ [ --enable-qtdbus@<:@=yes|no@:>@ Smoke: build Smoke with QtDbus extention for qt @<:@default:no@:>@],
+ [ qtdbus="$enableval" ],
+ [ qtdbus="no" ]
+)
+AC_SUBST(qtdbus)
+
+AC_DEFUN([AC_FIND_QTDBUS],
+[
+AC_MSG_CHECKING([for libdbus-qt4-1])
+AC_CACHE_VAL(ac_cv_lib_qtdbus,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+ kde_ldflags_save="$LDFLAGS"
+ kde_libs_save="$LIBS"
+ kde_cxxflags_save="$CXXFLAGS"
+
+ LIBS="-ldbus-1 -ldbus-qt4-1 -ldbus-glib-1 $LIB_QTCORE $LIB_QTXML $LIBS"
+ CXXFLAGS="$CXXFLAGS $all_includes -DDBUS_COMPILATION"
+ LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
+
+AC_TRY_LINK([
+ #include <dbus-1.0/dbus/qdbus.h>
+],
+[
+ QDBusConnection& b = QDBus::sessionBus();
+],
+ eval "ac_cv_lib_qtdbus='-ldbus-1 -ldbus-qt4-1 -ldbus-glib-1'",
+ eval "ac_cv_lib_qtdbus=no")
+
+ LDFLAGS=$kde_ldflags_save
+ LIBS=$kde_libs_save
+ CXXFLAGS=$kde_cxxflags_save
+AC_LANG_RESTORE
+])
+
+if test ! "$ac_cv_lib_qtdbus" = no; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBQTDBUS, 1, [Define if you have libdbus-qt4-1])
+ LIBQTDBUS="$ac_cv_lib_qtdbus"
+ AC_MSG_RESULT($ac_cv_lib_qtdbus)
+else
+ AC_MSG_ERROR(not found.
+ Check your installation and look into config.log)
+ LIBQTDBUS=""
+fi
+AC_SUBST(LIBQTDBUS)
+])
+
+if test "X$qtdbus" = "Xyes" ; then
+ AC_FIND_QTDBUS
+fi
+
+dnl -------
+dnl Test for libqwt (Scientific Plotting library)
+dnl -------
+
+AC_ARG_ENABLE(
+ qwt,
+ [ --enable-qwt@<:@=yes|no@:>@ Smoke: build Smoke with Qwt extention for qt @<:@default:no@:>@],
+ [ qwt="$enableval" ],
+ [ qwt="no" ]
+)
+AC_SUBST(qwt)
+
+AC_DEFUN([AC_FIND_QWT],
+[
+AC_MSG_CHECKING([for libqwt])
+AC_CACHE_VAL(ac_cv_lib_qwt,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+ kde_ldflags_save="$LDFLAGS"
+ kde_libs_save="$LIBS"
+ kde_cxxflags_save="$CXXFLAGS"
+
+ LIBS="-lqwt $LIB_QTCORE $LIB_QTXML $LIBS"
+ CXXFLAGS="$CXXFLAGS $all_includes"
+ LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
+
+AC_TRY_LINK([
+ #include <qwt_plot.h>
+],
+[
+ QwtPlot p;
+],
+ eval "ac_cv_lib_qwt='-lqwt'",
+ eval "ac_cv_lib_qwt=no")
+
+ LDFLAGS=$kde_ldflags_save
+ LIBS=$kde_libs_save
+ CXXFLAGS=$kde_cxxflags_save
+AC_LANG_RESTORE
+])
+
+if test ! "$ac_cv_lib_qwt" = no; then
+ AC_DEFINE_UNQUOTED(HAVE_LIBQWT, 1, [Define if you have libqwt])
+ LIBQWT="$ac_cv_lib_qwt"
+ AC_MSG_RESULT($ac_cv_lib_qwt)
+else
+ AC_MSG_ERROR(not found.
+ Check your installation and look into config.log)
+ LIBQWT=""
+fi
+AC_SUBST(LIBQWT)
+])
+
+if test "X$qwt" = "Xyes" ; then
+ AC_FIND_QWT
+fi
--- trunk/KDE/kdebindings/smoke/qt/generate.pl.in #552828:552829
@@ -20,6 +20,8 @@
my $headerlistpath = "$here/$headerlist";
my $qscintilla_headerlist = "";
my $qscintilla_headerlistpath = "";
+my $qtdbus_headerlist = "";
+my $qtdbus_headerlistpath = "";
if("@qtextscintilla@" eq "yes")
{
@@ -27,12 +29,34 @@
$qscintilla_headerlistpath = "$here/$qscintilla_headerlist";
}
+if("@qtdbus@" eq "yes")
+{
+ $qtdbus_headerlist = "./qtdbus_header_list";
+ $qtdbus_headerlistpath = "$here/$qtdbus_headerlist";
+}
+
+if("@qwt@" eq "yes")
+{
+ $qwt_headerlist = "./qwt_header_list";
+ $qwt_headerlistpath = "$here/$qwt_headerlist";
+}
+
## If srcdir != builddir, use headerlist from src
$headerlistpath = $headerlist if ($headerlist =~ /^\//);
if("@qtextscintilla@" eq "yes")
{
$qscintilla_headerlistpath = $qscintilla_headerlist if ($qscintilla_headerlist =~ /^\//);
}
+
+if("@qtdbus@" eq "yes")
+{
+ $qtdbus_headerlistpath = $qtdbus_headerlist if ($qtdbus_headerlist =~ /^\//);
+}
+
+if("@qwt@" eq "yes")
+{
+ $qwt_headerlistpath = $qwt_headerlist if ($qwt_headerlist =~ /^\//);
+}
## Note: outdir and finaloutdir should NOT be the same dir!
# Delete all x_*.cpp files under outdir (or create outdir if nonexistent)
@@ -95,6 +119,20 @@
map { chomp ; $includes{$_} = 1 } <HEADERS>;
close HEADERS;
}
+
+if("@qtdbus@" eq "yes")
+{
+ open(HEADERS, $qtdbus_headerlistpath) or die "Couldn't open $qtdbus_headerlistpath: $!\n";
+ map { chomp ; $includes{$_} = 1 } <HEADERS>;
+ close HEADERS;
+}
+
+if("@qwt@" eq "yes")
+{
+ open(HEADERS, $qwt_headerlistpath) or die "Couldn't open $qwt_headerlistpath: $!\n";
+ map { chomp ; $includes{$_} = 1 } <HEADERS>;
+ close HEADERS;
+}
# Can we compile the OpenGl module ?
if("@KDE_HAVE_GL@" eq "yes")
--- trunk/KDE/kdebindings/smoke/qt/header_list #552828:552829
@@ -262,5 +262,6 @@
QtSql/qsqltablemodel.h
QtSvg/qsvgrenderer.h
QtSvg/qsvgwidget.h
+QtUiTools/quiloader.h
QtXml/qdom.h
QtXml/qxml.h
More information about the Kde-bindings
mailing list