TestNetscapePlugin fails to link on OS X, with the following error: g++ -headerpad_max_install_names -arch x86_64 -single_module -dynamiclib -Xarch_x86_64 -mmacosx-version-min=10.5 -o TestNetscapePlugIn PluginObjectMac.o PluginObject.o PluginTest.o TestObject.o DocumentOpenInDestroyStream.o EvaluateJSAfterRemovingPluginElement.o GetUserAgentWithNullNPPFromNPPNew.o NPRuntimeObjectFromDestroyedPlugin.o NPRuntimeRemoveProperty.o NullNPPGetValuePointer.o PassDifferentNPPStruct.o PluginScriptableNPObjectInvokeDefault.o main.o -F/Users/jhanssen/dev/WebKit/WebKitBuild-qt/Debug/lib -F/Users/jhanssen/dev/qt/lib -L/Users/jhanssen/dev/WebKit/WebKitBuild-qt/Debug/lib -L/Users/jhanssen/dev/qt/lib -framework QtWebKit -framework Carbon -framework Cocoa -framework QuartzCore -lX11 -framework QtGui -L/Users/jhanssen/dev/qt/lib -F/Users/jhanssen/dev/qt/lib -framework QtCore ld: library not found for -lX11 collect2: ld returned 1 exit status The problem is that r74776 (from bug 51700) introduced a dependency on libX11 for all Unix platforms, and Qt considers OS X a unix platform. I'll upload a patch shortly that addresses this problem.
Created attachment 78033 [details] Patch
Comment on attachment 78033 [details] Patch re=me
Comment on attachment 78033 [details] Patch Apparently it needs more exclusion. r- meanwhile
Created attachment 78060 [details] Patch
Comment on attachment 78060 [details] Patch re=me
Comment on attachment 78060 [details] Patch Clearing flags on attachment: 78060 Committed r75134: <http://trac.webkit.org/changeset/75134>
All reviewed patches have been landed. Closing bug.
I don't agree with this patch. If platform does not match win32, embedded, mac, and symbian, it does not mean that this platform uses X11 (e.g., it will break Haiku) I think that the most correct expression is unix:!mac It it was CMake, I'd used Q_WS_X11, but I don't know if it's available in QMake
(In reply to comment #8) > I don't agree with this patch. If platform does not match win32, embedded, mac, and symbian, it does not mean that this platform uses X11 (e.g., it will break Haiku) > > I think that the most correct expression is > > unix:!mac That won't work for Qt Embedded, which is still Unix but doesn't use X11. The expression from my last patch is already used by Qt (see $QTDIR/src/gui/gui.pro). If there is a CONFIG option for haiku then we might have to add that to the list.
(In reply to comment #9) I don't know anything about Haiku, I only thought that it's erroneous to assume that everything "unknown" uses X11. Inside Tools/DumpRenderTree/qt/main.cpp Q_WS_X11 macro is used. For example it will be defined if Qt on Mac is compiled with X11 support. "Exotic" platforms may add patches to make Q_WS_X11 and related macros work properly. Unfortunately I don't know how to check for Q_WS_X11 in qmake (in CMake it's trivial). Let it be:)