some qt4 changes for Linux (not yet working)

This commit is contained in:
Volker Fischer 2008-01-19 17:14:56 +00:00
parent fa759cefdf
commit 27ad3b868c
15 changed files with 145 additions and 146 deletions

View file

@ -21,8 +21,7 @@ dnl Configuration Arguments
AC_ARG_ENABLE( sound,[ --enable-sound generic sound support], enable_sound=$enableval, enable_sound=yes)
AC_ARG_WITH( qtdir,[ --with-qtdir=path to QT],QTDIR=$withval)
AC_ARG_WITH( qt4dir,[ --with-qtdir=path to QT],QT4DIR=$withval)
AC_CHECK_HEADER(sys/asoundlib.h, , enable_sound=no)
@ -45,25 +44,63 @@ dnl Checks for some external libraries that need to be installed
AC_LANG(C++)
dnl QT --------------------------------------------------------------------------
if test "no$QTDIR" = "no"; then
AC_MSG_ERROR( "*** Please set QTDIR ***" )
dnl QT4 -------------------------------------------------------------------------
dnl The QT4 check code was taken from the FreeMat-3.0 code by Samit Basu
PKG_CHECK_MODULES(QT, QtCore QtGui QtNetwork >= 4.0.1, HAVE_QT4="yes", HAVE_QT4="no")
foo=`echo $QT_LIBS | sed -e 's/-L/-Wl,-rpath,/g'`
if test "x$HAVE_QT4" = "xyes"; then
dnl Check needed because in some cases the QtGui includedir
dnl doesn't contain the subsystem dir.
QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
AC_MSG_WARN([QWidget not found])))
AC_CHECK_PROGS(QT_MOC, [moc4 moc-qt4 moc], [])
AC_CHECK_PROGS(QT_RCC, [rcc4 rcc-qt4 rcc], [])
AC_CHECK_PROGS(QT_UIC, [uic4 uic-qt4 uic], [])
if (test "$QT_MOC" = ""); then
AC_MSG_ERROR([QT4 moc is required.])
fi
saved_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$QTDIR/lib"
AC_HAVE_LIBRARY(qt-mt,,exit 1)
AC_PATH_PROG(MOC, moc,, "$QTDIR/bin")
if test -z "$MOC"; then
AC_MSG_ERROR("No moc found in $QTDIR/bin");
if (test "$QT_RCC" = ""); then
AC_MSG_ERROR([QT4 rcc is required.])
fi
AC_PATH_PROG(UIC, uic,, "$QTDIR/bin")
if test -z "$UIC"; then
AC_MSG_ERROR("No uic found in $QTDIR/bin");
if (test "$QT_UIC" = ""); then
AC_MSG_ERROR([QT4 uic is required.])
fi
AC_SUBST(QTDIR)
fi
FOO=`echo $QT_LIBS | sed -e 's/-L/-Wl,-rpath,/' | sed -e 's/-L.*//'`
LDFLAGS="$LDFLAGS $FOO"
AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
AC_SUBST(QT_MOC)
AC_SUBST(QT_RCC)
AC_SUBST(QT_UIC)
dnl old QT2/QT3 code:
dnl if test "no$QTDIR" = "no"; then
dnl AC_MSG_ERROR( "*** Please set QTDIR ***" )
dnl fi
dnl
dnl saved_ldflags="$LDFLAGS"
dnl LDFLAGS="$LDFLAGS -L$QTDIR/lib"
dnl
dnl AC_HAVE_LIBRARY(qt-mt,,exit 1)
dnl
dnl AC_PATH_PROG(MOC, moc,, "$QTDIR/bin")
dnl if test -z "$MOC"; then
dnl AC_MSG_ERROR("No moc found in $QTDIR/bin");
dnl fi
dnl AC_PATH_PROG(UIC, uic,, "$QTDIR/bin")
dnl if test -z "$UIC"; then
dnl AC_MSG_ERROR("No uic found in $QTDIR/bin");
dnl fi
dnl AC_SUBST(QTDIR)
AC_CONFIG_FILES(Makefile linux/Makefile)

View file

@ -35,10 +35,10 @@ llcon_SOURCES = ../src/buffer.cpp \
../src/llconserverdlg.h \
../src/llconclientdlg.h \
../src/clientsettingsdlg.h \
../src/llconclientdlgbase.ui \
../src/llconserverdlgbase.ui \
../src/clientsettingsdlgbase.ui \
../src/aboutdlgbase.ui \
../src/llconclientdlg.ui \
../src/llconserverdlg.ui \
../src/clientsettingsdlg.ui \
../src/aboutdlg.ui \
sound.h
# these need to be generated before the rest can be compiled
@ -51,10 +51,10 @@ BUILT_SOURCES=moc/moc_server.cpp \
moc/moc_multicolorled.cpp \
moc/moc_audiomixerboard.cpp \
moc/moc_util.cpp \
moc/moc_llconclientdlg.cpp moc/moc_llconclientdlgbase.cpp moc/llconclientdlgbase.h moc/llconclientdlgbase.cpp \
moc/moc_clientsettingsdlg.cpp moc/moc_clientsettingsdlgbase.cpp moc/clientsettingsdlgbase.h moc/clientsettingsdlgbase.cpp \
moc/moc_llconserverdlg.cpp moc/moc_llconserverdlgbase.cpp moc/llconserverdlgbase.h moc/llconserverdlgbase.cpp \
moc/moc_aboutdlgbase.cpp moc/aboutdlgbase.h moc/aboutdlgbase.cpp
moc/moc_llconclientdlg.h \
moc/moc_clientsettingsdlg.h \
moc/moc_llconserverdlg.h \
moc/moc_aboutdlg.h
# and should be cleaned by make clean
@ -65,78 +65,41 @@ dist-hook:
mkdir $(distdir)/moc
moc/moc_server.cpp: ../src/server.h
$(MOC) ../src/server.h -o moc/moc_server.cpp
$(QT_MOC) ../src/server.h -o moc/moc_server.cpp
moc/moc_client.cpp: ../src/client.h
$(MOC) ../src/client.h -o moc/moc_client.cpp
$(QT_MOC) ../src/client.h -o moc/moc_client.cpp
moc/moc_socket.cpp: ../src/socket.h
$(MOC) ../src/socket.h -o moc/moc_socket.cpp
$(QT_MOC) ../src/socket.h -o moc/moc_socket.cpp
moc/moc_multicolorled.cpp: ../src/multicolorled.h
$(MOC) ../src/multicolorled.h -o moc/moc_multicolorled.cpp
$(QT_MOC) ../src/multicolorled.h -o moc/moc_multicolorled.cpp
moc/moc_audiomixerboard.cpp: ../src/audiomixerboard.h
$(MOC) ../src/audiomixerboard.h -o moc/moc_audiomixerboard.cpp
$(QT_MOC) ../src/audiomixerboard.h -o moc/moc_audiomixerboard.cpp
moc/moc_util.cpp: ../src/util.h
$(MOC) ../src/util.h -o moc/moc_util.cpp
$(QT_MOC) ../src/util.h -o moc/moc_util.cpp
moc/moc_protocol.cpp: ../src/protocol.h
$(MOC) ../src/protocol.h -o moc/moc_protocol.cpp
$(QT_MOC) ../src/protocol.h -o moc/moc_protocol.cpp
moc/moc_channel.cpp: ../src/channel.h
$(MOC) ../src/channel.h -o moc/moc_channel.cpp
$(QT_MOC) ../src/channel.h -o moc/moc_channel.cpp
moc/moc_aboutdlgbase.cpp: moc/aboutdlgbase.h
$(MOC) moc/aboutdlgbase.h -o moc/moc_aboutdlgbase.cpp
moc/moc_aboutdlg.h: ../src/aboutdlg.ui
$(QT_UIC) ../src/aboutdlg.ui -o moc/aboutdlg.h
moc/aboutdlgbase.h: ../src/aboutdlgbase.ui
$(UIC) ../src/aboutdlgbase.ui -o moc/aboutdlgbase.h
moc/moc_llconclientdlg.h: ../src/llconclientdlg.ui
$(QT_UIC) ../src/llconclientdlg.ui -o moc/llconclientdlg.h
moc/aboutdlgbase.cpp: ../src/aboutdlgbase.ui moc/aboutdlgbase.h
$(UIC) ../src/aboutdlgbase.ui -i moc/aboutdlgbase.h -o moc/aboutdlgbase.cpp
moc/moc_llconclientdlg.cpp: ../src/llconclientdlg.h
$(MOC) ../src/llconclientdlg.h -o moc/moc_llconclientdlg.cpp
moc/moc_llconclientdlgbase.cpp: moc/llconclientdlgbase.h
$(MOC) moc/llconclientdlgbase.h -o moc/moc_llconclientdlgbase.cpp
moc/llconclientdlgbase.h: ../src/llconclientdlgbase.ui
$(UIC) ../src/llconclientdlgbase.ui -o moc/llconclientdlgbase.h
moc/llconclientdlgbase.cpp: ../src/llconclientdlgbase.ui moc/llconclientdlgbase.h
$(UIC) ../src/llconclientdlgbase.ui -i moc/llconclientdlgbase.h -o moc/llconclientdlgbase.cpp
moc/moc_clientsettingsdlg.cpp: ../src/clientsettingsdlg.h
$(MOC) ../src/clientsettingsdlg.h -o moc/moc_clientsettingsdlg.cpp
moc/moc_clientsettingsdlgbase.cpp: moc/clientsettingsdlgbase.h
$(MOC) moc/clientsettingsdlgbase.h -o moc/moc_clientsettingsdlgbase.cpp
moc/clientsettingsdlgbase.h: ../src/clientsettingsdlgbase.ui
$(UIC) ../src/clientsettingsdlgbase.ui -o moc/clientsettingsdlgbase.h
moc/clientsettingsdlgbase.cpp: ../src/clientsettingsdlgbase.ui moc/clientsettingsdlgbase.h
$(UIC) ../src/clientsettingsdlgbase.ui -i moc/clientsettingsdlgbase.h -o moc/clientsettingsdlgbase.cpp
moc/moc_llconserverdlg.cpp: ../src/llconserverdlg.h
$(MOC) ../src/llconserverdlg.h -o moc/moc_llconserverdlg.cpp
moc/moc_llconserverdlgbase.cpp: moc/llconserverdlgbase.h
$(MOC) moc/llconserverdlgbase.h -o moc/moc_llconserverdlgbase.cpp
moc/llconserverdlgbase.h: ../src/llconserverdlgbase.ui
$(UIC) ../src/llconserverdlgbase.ui -o moc/llconserverdlgbase.h
moc/llconserverdlgbase.cpp: ../src/llconserverdlgbase.ui moc/llconserverdlgbase.h
$(UIC) ../src/llconserverdlgbase.ui -i moc/llconserverdlgbase.h -o moc/llconserverdlgbase.cpp
moc/moc_clientsettingsdlg.h: ../src/clientsettingsdlg.ui
$(QT_UIC) ../src/clientsettingsdlg.ui -o moc/clientsettingsdlg.h
moc/moc_llconserverdlg.h: ../src/llconserverdlg.ui
$(QT_UIC) ../src/llconserverdlg.ui -o moc/llconserverdlg.h
llcon_CXXFLAGS=$(QWTINCL) -I../src -I$(QTDIR)/include -DQT_THREAD_SUPPORT -D_REENTRANT -g

View file

@ -28,12 +28,12 @@
#if !defined ( MIXERBOARD_H__FD6B49E1606C2AC__INCLUDED_ )
#define MIXERBOARD_H__FD6B49E1606C2AC__INCLUDED_
#include <qframe.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qstring.h>
#include <qslider.h>
#include <qsizepolicy.h>
#include <QFrame.h>
#include <QLabel.h>
#include <QLayout.h>
#include <QString.h>
#include <QSlider.h>
#include <QSizePolicy.h>
#include "global.h"
#include "util.h"

View file

@ -25,8 +25,8 @@
#if !defined ( CHANNEL_HOIH9345KJH98_3_4344_BB23945IUHF1912__INCLUDED_ )
#define CHANNEL_HOIH9345KJH98_3_4344_BB23945IUHF1912__INCLUDED_
#include <qthread.h>
#include <qdatetime.h>
#include <QThread.h>
#include <QDateTime.h>
#include "global.h"
#include "buffer.h"
#include "audiocompr.h"

View file

@ -25,11 +25,11 @@
#if !defined ( CLIENT_HOIHGE76GEKJH98_3_43445KJIUHF1912__INCLUDED_ )
#define CLIENT_HOIHGE76GEKJH98_3_43445KJIUHF1912__INCLUDED_
#include <qthread.h>
#include <qhostaddress.h>
#include <qhostinfo.h>
#include <qstring.h>
#include <qdatetime.h>
#include <QThread.h>
#include <QHostAddress.h>
#include <QHostInfo.h>
#include <QString.h>
#include <QDateTime.h>
#include "global.h"
#include "socket.h"
#include "resample.h"

View file

@ -22,17 +22,17 @@
*
\******************************************************************************/
#include <qlabel.h>
#include <qstring.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qprogressbar.h>
#include <qwhatsthis.h>
#include <qtimer.h>
#include <qslider.h>
#include <qradiobutton.h>
#include <qmenubar.h>
#include <qlayout.h>
#include <QLabel.h>
#include <QString.h>
#include <QLineEdit.h>
#include <QPushButton.h>
#include <QProgressBar.h>
#include <QWhatsThis.h>
#include <QTimer.h>
#include <QSlider.h>
#include <QRadioButton.h>
#include <QMenuBar.h>
#include <QLayout.h>
#include "global.h"
#include "client.h"
#include "multicolorled.h"

View file

@ -25,12 +25,12 @@
#if !defined ( GLOBAL_H__3B123453_4344_BB2B_23E7A0D31912__INCLUDED_ )
#define GLOBAL_H__3B123453_4344_BB2B_23E7A0D31912__INCLUDED_
#include <QString.h>
#include <QEvent.h>
#include <QDebug.h>
#include <stdio.h>
#include <math.h>
#include <string>
#include <qstring.h>
#include <qevent.h>
#include <qdebug.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

View file

@ -22,17 +22,17 @@
*
\******************************************************************************/
#include <qlabel.h>
#include <qstring.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qprogressbar.h>
#include <qwhatsthis.h>
#include <qtimer.h>
#include <qslider.h>
#include <qradiobutton.h>
#include <qmenubar.h>
#include <qlayout.h>
#include <QLabel.h>
#include <QString.h>
#include <QLineEdit.h>
#include <QPushButton.h>
#include <QProgressBar.h>
#include <QWhatsThis.h>
#include <QTimer.h>
#include <QSlider.h>
#include <QRadioButton.h>
#include <QMenuBar.h>
#include <QLayout.h>
#include "global.h"
#include "client.h"
#include "multicolorled.h"

View file

@ -22,14 +22,14 @@
*
\******************************************************************************/
#include <qlabel.h>
#include <QLabel.h>
#include <qlistview.h>
#include <qtimer.h>
#include <qpixmap.h>
#include <qthread.h>
#include <qslider.h>
#include <qmenubar.h>
#include <qlayout.h>
#include <QTimer.h>
#include <QPixmap.h>
#include <QThread.h>
#include <QSlider.h>
#include <QMenuBar.h>
#include <QLayout.h>
#include "global.h"
#include "server.h"
#include "multicolorled.h"

View file

@ -33,9 +33,9 @@
#if !defined ( AFX_MULTCOLORLED_H__FD6B49B5_87DF_48DD_A873_804E1606C2AC__INCLUDED_ )
#define AFX_MULTCOLORLED_H__FD6B49B5_87DF_48DD_A873_804E1606C2AC__INCLUDED_
#include <qlabel.h>
#include <qpixmap.h>
#include <qtimer.h>
#include <QLabel.h>
#include <QPixmap.h>
#include <QTimer.h>
#include <qtreewidget.h>
#include <qicon.h>
#include "global.h"

View file

@ -25,9 +25,9 @@
#if !defined ( PROTOCOL_H__3B123453_4344_BB2392354455IUHF1912__INCLUDED_ )
#define PROTOCOL_H__3B123453_4344_BB2392354455IUHF1912__INCLUDED_
#include <qglobal.h>
#include <qmutex.h>
#include <qtimer.h>
#include <QGlobal.h>
#include <QMutex.h>
#include <QTimer.h>
#include <list>
#include "global.h"
#include "util.h"

View file

@ -25,11 +25,10 @@
#if !defined ( SERVER_HOIHGE7LOKIH83JH8_3_43445KJIUHF1912__INCLUDED_ )
#define SERVER_HOIHGE7LOKIH83JH8_3_43445KJIUHF1912__INCLUDED_
#include <qobject.h>
#include <qtimer.h>
#include <qdatetime.h>
#include <qhostaddress.h>
#include <qdatetime.h>
#include <QObject.h>
#include <QTimer.h>
#include <QDateTime.h>
#include <QHostAddress.h>
#include "global.h"
#include "socket.h"
#include "channel.h"

View file

@ -25,11 +25,11 @@
#if !defined ( SETTINGS_H__3B0BA660_DGEG56G456G9876D31912__INCLUDED_ )
#define SETTINGS_H__3B0BA660_DGEG56G456G9876D31912__INCLUDED_
#include "global.h"
#include "client.h"
#include <map>
#include <string>
#include <fstream>
#include "global.h"
#include "client.h"
/* Definitions ****************************************************************/

View file

@ -25,11 +25,11 @@
#if !defined ( SOCKET_HOIHGE76GEKJH98_3_4344_BB23945IUHF1912__INCLUDED_ )
#define SOCKET_HOIHGE76GEKJH98_3_4344_BB23945IUHF1912__INCLUDED_
#include <QObject.h>
#include <QMessageBox.h>
#include <QUdpSocket.h>
#include <QSocketNotifier.h>
#include <vector>
#include <qobject.h>
#include <qmessagebox.h>
#include <qudpsocket.h>
#include <qsocketnotifier.h>
#include "global.h"
#include "channel.h"
#include "util.h"

View file

@ -25,12 +25,12 @@
#if !defined ( UTIL_HOIH934256GEKJH98_3_43445KJIUHF1912__INCLUDED_ )
#define UTIL_HOIH934256GEKJH98_3_43445KJIUHF1912__INCLUDED_
#include <qhostaddress.h>
#include <qmenu.h>
#include <qwhatsthis.h>
#include <qtextbrowser.h>
#include <qlabel.h>
#include <qdatetime.h>
#include <QHostAddress.h>
#include <QMenu.h>
#include <QWhatsThis.h>
#include <QTextBrowser.h>
#include <QLabel.h>
#include <QDateTime.h>
#include <vector>
#include "global.h"
using namespace std; // because of the library: "vector"