[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5852 - in GNUnet: . src/setup/qt
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5852 - in GNUnet: . src/setup/qt |
Date: |
Sun, 9 Dec 2007 21:22:49 -0700 (MST) |
Author: grothoff
Date: 2007-12-09 21:22:48 -0700 (Sun, 09 Dec 2007)
New Revision: 5852
Added:
GNUnet/src/setup/qt/Makefile.am
Removed:
GNUnet/src/setup/qt/qt.pro.in
Modified:
GNUnet/configure.ac
Log:
auto-qt
Modified: GNUnet/configure.ac
===================================================================
--- GNUnet/configure.ac 2007-12-10 03:20:09 UTC (rev 5851)
+++ GNUnet/configure.ac 2007-12-10 04:22:48 UTC (rev 5852)
@@ -459,36 +459,50 @@
AC_LANG_PUSH([C++])
qt=1
AC_MSG_CHECKING(for Qt)
-# Verbatim from http://qtnode.net/wiki?title=Qt_with_autotools
-AC_MSG_CHECKING(QT4.1 directory)
-QTDIR=xxx
-AC_ARG_WITH([qt-dir],
- AC_HELP_STRING([--with-qt-dir=/path/to/Qt-4.1.0],
- [to specify the path to the Qt-4.1.0 directory.]),
- [QTPATHS="$withval"],
- [QTPATHS="/usr/local/Trolltech/Qt-4.1.0 /c/Qt/4.1.0"])
+AC_ARG_WITH(qt,
+ [ --with-qt=PFX Base of Qt installation],
+ [AC_MSG_RESULT([$with_qt])
+ case $with_qt in
+ no)
+ ;;
+ yes)
+ AC_CHECK_HEADERS([Qt/qpixmap.h],
+ AC_CHECK_LIB([QtGui], [_ZN7QPixmap12defaultDepthEv],
+ qt=1))
+ ;;
+ *)
+ QTLIBS="-L$with_qt/lib"
+ LDFLAGS="$QTLIBS $LDFLAGS"
+ QTINC="-I$with_qt/include -I$with_qt/include/qt4"
+ CPPFLAGS="$QTINC $CPPFLAGS"
+ AC_CHECK_HEADERS([Qt/qpixmap.h],
+ AC_CHECK_LIB([QtGui], [_ZN7QPixmap12defaultDepthEv],
+ EXT_LIB_PATH="-L$with_qt/lib $EXT_LIB_PATH"
+ qt=1))
+ ;;
+ esac
+ ],
+ [AC_MSG_RESULT([--with-qt not specified])
+ QTLIBS="-L/usr/lib"
+ LDFLAGS="$QTLIBS $LDFLAGS"
+ QTINC="-I/usr/include -I/usr/include/qt4"
+ CPPFLAGS="$QTINC $CPPFLAGS"
+ AC_CHECK_HEADERS([Qt/qpixmap.h],
+ AC_CHECK_LIB([QtGui], [_ZN7QPixmap12defaultDepthEv],
+ EXT_LIB_PATH="-L$with_qt/lib $EXT_LIB_PATH"
+ qt=1))])
-for x in $QTPATHS; do
- if test -d $x ; then
- QTDIR="$x"
- fi
-done
-if test $QTDIR = xxx ; then
- AC_MSG_RESULT(Could not locate QT 4.1)
- qt=0
-fi
-AC_MSG_RESULT($QTDIR)
-
LIBS="$LIBS $QTLIBS"
INCLUDES="$INCLUDES $QTINC"
PATH="$PATH:$QTBIN"
CXXFLAGS="$CXXFLAGS $QTINC"
AC_SUBST(QTINC)
AC_SUBST(QTLIBS)
+# Verbatim from http://qtnode.net/wiki?title=Qt_with_autotools
# Now we check whether we can actually build a Qt app.
cat > myqt.h << EOF
-#include <QObject>
+#include <Qt/qobject.h>
class Test : public QObject
{
Q_OBJECT
@@ -504,7 +518,7 @@
cat > myqt.cpp << EOF
#include "myqt.h"
-#include <QApplication>
+#include <Qt/qapplication.h>
int main( int argc, char **argv )
{
QApplication app( argc, argv );
@@ -550,6 +564,7 @@
AC_MSG_RESULT(yes)
fi
+
AC_MSG_CHECKING(for mkoctfile)
AC_TRY_EVAL(mkoctfile)
if test x"$ac_status" != x0; then
@@ -560,6 +575,7 @@
fi
rm -f moc_myqt.cpp myqt.h myqt.cpp myqt.o myqt moc_myqt.o
+AC_LANG_POP([C++])
# libmicrohttpd
Added: GNUnet/src/setup/qt/Makefile.am
===================================================================
--- GNUnet/src/setup/qt/Makefile.am (rev 0)
+++ GNUnet/src/setup/qt/Makefile.am 2007-12-10 04:22:48 UTC (rev 5852)
@@ -0,0 +1,44 @@
+INCLUDES = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/setup/lib
+plugindir = $(libdir)/GNUnet
+plugin_LTLIBRARIES = \
+ libgnunetsetup_qt.la
+
+# You have two .cpp files you wrote, myapp.cpp and another.cpp
+# Remember to include the name of the resource file with the .cpp extension.
+libgnunetsetup_qt_la_SOURCES = \
+ qtconfig.cc \
+ setupWizard.cc setupWizard.h \
+ ui_enhanced.h ui_gnunet-setup.h
+
+libgnunetsetup_qt_la_LDFLAGS = \
+ $(QTLIBS) @EXT_LIB_PATH@ @EXT_LIBS@ \
+ -export-dynamic -avoid-version -module
+
+libgnunetsetup_qt_la_CXXFLAGS = \
+ -I$(top_scrdir)/include \
+ @QTINC@ \
+ @GTK_CFLAGS@
+
+libgnunetsetup_qt_la_LIBADD = \
+ @QTLIBS@ @EXT_LIB_PATH@ @EXT_LIBS@ \
+ $(INTLLIBS) \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/setup/lib/libgnunetsetup.la
+
+
+
+EXTRA_DIST = \
+ enhanced.ui \
+ gnunet-setup.ui
+
+# This rule lets GNU make create any moc_*.cpp from the equivalent *.h
+moc_%.cpp: %.h
+ moc $< -o $@
+
+# Adjust this line according to your resources.qrc
+# resources.cpp : resources.qrc octave-gui.png
+# rcc resources.qrc -o resources.cpp
+
+# This line ensures that generated moc_*.cpp and resources.cpp files are
+# deleted when we make clean.
+CLEANFILES = $(filter moc_%.cpp,$(libgnunetsetup_qt_la_SOURCES)) resources.cpp
Deleted: GNUnet/src/setup/qt/qt.pro.in
===================================================================
--- GNUnet/src/setup/qt/qt.pro.in 2007-12-10 03:20:09 UTC (rev 5851)
+++ GNUnet/src/setup/qt/qt.pro.in 2007-12-10 04:22:48 UTC (rev 5852)
@@ -1,29 +0,0 @@
address@hidden@
-contains(BUILD_TARGET, mingw) {
- # Since this library cannot be loaded on Win32 (invalid memory access
when
- # <QApplication> is included), we build an executable
-
- TEMPLATE = app
- TARGET = gnunetsetup_qt
- CONFIG += @QT_CONFIG@
- target.path = @prefix@/bin
-} else {
- TEMPLATE = lib
- TARGET = @address@hidden
- dlltarget = $(TARGET)
- CONFIG += @QT_CONFIG@ dll
- DLLDESTDIR = .
- QMAKE_LFLAGS += -shared
- target.path = @prefix@/@DLLDIR@
-}
-QMAKE_CXXFLAGS = @CPPFLAGS@
-INCLUDEPATH = ../../include ../lib . @CPPFLAGS@ @top_builddir@
-LIBS = address@hidden@/src/util -lgnunetutil address@hidden@/src/setup/lib
-lgnunetsetup -lplibc
-QMAKE_LIBDIR += @EXT_LIB_PATH@
-
-INSTALLS += target
-
-SOURCES = qtconfig.cc \
- setupWizard.cc
-HEADERS = setupWizard.h
-FORMS = gnunet-setup.ui enhanced.ui
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5852 - in GNUnet: . src/setup/qt,
gnunet <=