Allow the i386-part of OSX Universal Binaries to be built with MMX/SSE/SSE2 optimizations.

git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1468 05730e5d-ab1b-0410-a4ac-84af385074fa
This commit is contained in:
Mikkel Krautz 2009-01-22 01:09:16 +00:00
parent ae08a5e79d
commit b6cd05dfd0
3 changed files with 32 additions and 11 deletions

15
INSTALL
View File

@ -33,6 +33,13 @@ Detailed build instructions are available at
http://mumble.sourceforge.net/BuildingWindows and it is highly recommended
to follow them to the letter.
Mac OS X pre-requisites
=======================
Detailed build instructions are available at
http://mumble.sourceforge.net/BuildingMacOSX and it is highly recommended
to follow them to the letter.
Linux pre-requisites
====================
@ -63,10 +70,10 @@ So, to build without the server and without ASIO, the above line would be
qmake main.pro CONFIG+=no-server CONFIG+=no-asio -recursive
CONFIG+=no-client
Don't build the client (mumble)
Don't build the client (Mumble)
CONFIG+=no-server
Don't build the server (murmur)
Don't build the server (Murmur)
CONFIG+=no-bundled-speex
Don't use the included version of Speex, but look for one on the system.
@ -77,6 +84,10 @@ CONFIG+=optimize
Build a heavily optimized version, specific to the machine it's being
compiled on.
CONFIG+=no-gcc42 (OSX)
Do not build with GCC 4.2 specific optimizations (MMX/SSE/SSE2 for
Universal Binaries), even though GCC 4.2 is availble on the system.
CONFIG+=no-dbus (Mumble)
Don't include DBus support on Mumble. This has no effect on Murmur, which
requires DBus to work.

View File

@ -87,13 +87,7 @@ macx {
CONFIG += no-universal
}
CONFIG(no-universal) {
ARCH=$$system(uname -m)
contains(ARCH, 'i386') {
QMAKE_CFLAGS += -mmmx -msse
QMAKE_CXXFLAGS += -mmmx -msse
}
} else {
!CONFIG(no-universal) {
CONFIG += x86 ppc
# Precompiled headers are broken when using Makefiles.
@ -101,7 +95,22 @@ macx {
CONFIG += no-pch
}
}
}
ARCH=$$system(uname -m)
GCC42=$$system(readlink /usr/bin/gcc | grep "gcc-4.[2-9][.0-9]*")
!isEmpty(GCC42):!CONFIG(no-gcc42) {
QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk
contains(ARCH, 'i386') {
QMAKE_CFLAGS += -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
QMAKE_CXXFLAGS += -Xarch_i386 -mmmx -Xarch_i386 -msse -Xarch_i386 -msse2
}
} else {
CONFIG(no-universal):contains(ARCH, 'i386') {
QMAKE_CFLAGS += -mmmx -msse -msse2
QMAKE_CXXFLAGS += -mmmx -msse -msse2
}
}
}
}
CONFIG(no-pch) {

View File

@ -83,6 +83,7 @@ CGEventRef EventTapCallback(CGEventTapProxy proxy, CGEventType type,
unsigned int keycode;
bool suppress = false;
bool down = false;
int64_t repeat = 0;
switch (type) {
case kCGEventLeftMouseDown:
@ -102,7 +103,7 @@ CGEventRef EventTapCallback(CGEventTapProxy proxy, CGEventType type,
case kCGEventKeyDown:
down = true;
case kCGEventKeyUp:
int64_t repeat = CGEventGetIntegerValueField(event, kCGKeyboardEventAutorepeat);
repeat = CGEventGetIntegerValueField(event, kCGKeyboardEventAutorepeat);
if (! repeat) {
keycode = static_cast<unsigned int>(CGEventGetIntegerValueField(event, kCGKeyboardEventKeycode));
suppress = gs->handleButton(keycode, down);