diff --git a/INSTALL b/INSTALL index a60347fc3..f994c4b17 100644 --- a/INSTALL +++ b/INSTALL @@ -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. diff --git a/compiler.pri b/compiler.pri index 8f7421c4f..1add08461 100644 --- a/compiler.pri +++ b/compiler.pri @@ -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) { diff --git a/src/mumble/GlobalShortcut_macx.cpp b/src/mumble/GlobalShortcut_macx.cpp index 45a4e8634..0a54e3d89 100644 --- a/src/mumble/GlobalShortcut_macx.cpp +++ b/src/mumble/GlobalShortcut_macx.cpp @@ -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(CGEventGetIntegerValueField(event, kCGKeyboardEventKeycode)); suppress = gs->handleButton(keycode, down);