Changes required to compile Qt4 under Linux.

git-svn-id: http://yate.null.ro/svn/yate/trunk@1595 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2008-01-07 20:39:39 +00:00
parent cb074008ed
commit 166e0b5d3c
8 changed files with 131 additions and 1 deletions

View File

@ -24,12 +24,23 @@ MENUFILES :=
DESKFILES :=
GTKCLIENT := gtk2/libgtk2client.a
QTCLIENT := qt4/libqt4client.a
ifneq (@HAVE_GTK2@,no)
SUBDIRS := $(SUBDIRS) gtk2
PROGS := $(PROGS) yate-gtk2
MENUFILES := $(MENUFILES) yate-gtk2.menu
DESKFILES := $(DESKFILES) yate-gtk2.desktop
endif
ifneq (@HAVE_QT4@,no)
SUBDIRS := $(SUBDIRS) qt4
PROGS := $(PROGS) yate-qt4
MENUFILES := $(MENUFILES) yate-qt4.menu
DESKFILES := $(DESKFILES) yate-qt4.desktop
endif
ifneq (@HAVE_GTK2@_@HAVE_QT4@,no_no)
ICONFILES := $(ICONFILES) null_team-16.png null_team-32.png null_team-48.png
endif
@ -138,3 +149,11 @@ yate-gtk2: LOCALLIBS = @GTK2_LIB@
$(GTKCLIENT):
$(MAKE) -C gtk2
yate-qt4: $(QTCLIENT)
yate-qt4: LDFLAGS := $(QTCLIENT) $(LDFLAGS)
yate-qt4: LOCALFLAGS = @QT4_INC@
yate-qt4: LOCALLIBS = @QT4_LIB@
$(QTCLIENT):
$(MAKE) -C qt4

9
clients/qt4/.cvsignore Normal file
View File

@ -0,0 +1,9 @@
Makefile
YateLocal*
core*
*.moc
*.o
*.a
*.orig
*~
.*.swp

57
clients/qt4/Makefile.in Normal file
View File

@ -0,0 +1,57 @@
# Makefile
# This file holds the make rules for the Gtk2 client support
# override DEBUG at compile time to enable full debug or remove it all
DEBUG :=
CXX := @CXX@ -Wall
AR := ar
MOC := moc
DEFS:=
INCLUDES:=-I. -I@srcdir@ -I@top_srcdir@ @QT4_INC@
CXXFLAGS:=$(CXXFLAGS) @MODULE_CPPFLAGS@ @INLINE_FLAGS@
LDFLAGS:= -L../.. -lyate
INCFILES := @top_srcdir@/yateclass.h @top_srcdir@/yatecbase.h @srcdir@/qt4client.h
PROJECT = libqt4client.a
SOURCES = qt4client.cpp
OBJECTS = $(SOURCES:.cpp=.o) qt4client.moc.o
COMPILE = $(CXX) $(DEFS) $(DEBUG) $(INCLUDES) $(CXXFLAGS)
prefix = @prefix@
exec_prefix = @exec_prefix@
# include optional local make rules
-include YateLocal.mak
.PHONY: all debug ddebug xdebug clean install uninstall
all: $(PROJECT)
debug:
$(MAKE) all DEBUG=-g3
ddebug:
$(MAKE) all DEBUG='-g3 -DDEBUG'
xdebug:
$(MAKE) all DEBUG='-g3 -DXDEBUG'
clean:
@-$(RM) $(PROJECT) $(OBJECTS)
$(PROJECT): $(OBJECTS)
$(AR) rcs $@ $^
%.o: @srcdir@/%.cpp $(INCFILES)
$(COMPILE) -c $<
%.moc.o: %.moc $(INCFILES)
$(COMPILE) -o $@ -c -x c++ $<
%.moc: @srcdir@/%.h
$(MOC) $(DEFS) $(INCLUDES) -o $@ $<
Makefile: @srcdir@/Makefile.in ../../config.status
cd ../.. && ./config.status

View File

@ -938,7 +938,7 @@ void QtWindow::populate()
QVBoxLayout *layout = new QVBoxLayout;
layout->setSpacing(0);
layout->setContentsMargins(0,0,0,0);
//layout->setContentsMargins(0,0,0,0);
layout->addWidget(formWidget);
setLayout(layout);
setWindowTitle(formWidget->windowTitle());

14
clients/yate-qt4.desktop Normal file
View File

@ -0,0 +1,14 @@
[Desktop Entry]
Encoding=UTF-8
Name=Yate
Name[ro]=Yate
GenericName=VoIP Phone
GenericName[ro]=Telefon VoIP
Comment=Place phone calls over the Internet
Comment[ro]=Apeluri telefonice peste Internet
Exec=yate-qt4
TryExec=yate-qt4
StartupNotify=true
Terminal=false
Type=Application
Categories=Application;Network;Qt

1
clients/yate-qt4.menu Normal file
View File

@ -0,0 +1 @@
?package(yate-client): needs=X11 section="Internet" title="Yate" longtitle="VoIP soft phone" command="/usr/bin/yate-qt4" icon="yate.png"

View File

@ -0,0 +1,5 @@
; This minimal file is here just to set the default skin.
; You can replace it with a more complete version from yate.conf.sample
[localsym]
h323chan.yate=yes

View File

@ -674,6 +674,30 @@ AC_SUBST(HAVE_GMOZ)
AC_SUBST(GMOZ_INC)
AC_SUBST(GMOZ_LIB)
HAVE_QT4=no
QT4_INC=""
QT4_LIB=""
AC_ARG_WITH(libqt4,AC_HELP_STRING([--with-libqt4],[use Qt for graphical clients (default)]),[ac_cv_use_libqt4=$withval],[ac_cv_use_libqt4=yes])
if [[ "x$ac_cv_use_libqt4" = "xyes" ]]; then
AC_MSG_CHECKING([for Qt4 using pkg-config])
verqt=`pkg-config --modversion QtCore 2>/dev/null`
incqt=`pkg-config --cflags QtCore QtGui QtXml QtNetwork 2>/dev/null | sed 's/QtNetwork/QtUiTools/'`
libqt=`pkg-config --libs QtCore QtGui QtXml QtNetwork 2>/dev/null | sed 's/QtNetwork/QtUiTools/'`
if [[ "x$incqt" != "x" -a "x$libqt" != "x" ]]; then
HAVE_QT4=yes
QT4_INC="$incqt"
QT4_LIB="$libqt"
ac_cv_use_libqt="no"
else
verqt="no"
fi
AC_MSG_RESULT([$verqt])
fi
AC_SUBST(HAVE_QT4)
AC_SUBST(QT4_INC)
AC_SUBST(QT4_LIB)
AC_ARG_WITH(libgtk2,AC_HELP_STRING([--with-libgtk2],[use Gtk for graphical clients (default)]),[ac_cv_use_libgtk2=$withval],[ac_cv_use_libgtk2=yes])
HAVE_COREDUMPER=no
COREDUMPER_INC=""
COREDUMPER_LIB=""
@ -783,6 +807,7 @@ AC_CONFIG_FILES([packing/rpm/yate.spec
modules/test/Makefile
clients/Makefile
clients/gtk2/Makefile
clients/qt4/Makefile
libs/ilbc/Makefile
libs/ysip/Makefile
libs/yrtp/Makefile