diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-07-13 10:34:50 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-07-13 17:35:15 +0000 |
commit | 9f03aa131e851447f6c3a89b6e57ff560df0afe2 (patch) | |
tree | 74146781896611d07c324649513c8aef1ce112d8 /configure.ac | |
parent | 7b9b3d469375c9d3ac1b5f7280ca64413b4811bf (diff) |
On OS X, add an rpath for the Qt frameworks, and remove it in the app bundle.
Qt 5.5 and later have @rpath-based install names for the frameworks,
which means that, if they're not installed in some frameworks directory
searched by default (such as /Library/Frameworks) - which is the default
case with the Qt installer - they won't be found by default.
Add the directory in which the frameworks exist as an rpath in the
Wireshark binary, so that they'll be found, and then remove it from the
Wireshark binary in the app bundle, as the directory in which the
frameworks exist on the machine on which Wireshark was built is
irrelevant to the machines on which it's being deployed - the frameworks
are included in the bundle, and we already add an rpath to find them
there.
Change-Id: I54e033743e7b17eab26976064dcd7cd000f97c78
Reviewed-on: https://code.wireshark.org/review/9625
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 86558eeaba..7b7a8b72fd 100644 --- a/configure.ac +++ b/configure.ac @@ -1625,7 +1625,7 @@ if test "x$enable_wireshark" = "xyes"; then fi if test "x$with_qt" != "xno"; then # - # Qt was specified; Make sure we have a C++ compiler. + # Qt was specified; make sure we have a C++ compiler. # if test -z "$CXX"; then AC_MSG_ERROR(Need a working C++ compiler to build Wireshark with Qt) @@ -1663,6 +1663,26 @@ if test "x$enable_wireshark" = "xyes"; then AC_SUBST(MOC) AC_WIRESHARK_QT_TOOL_CHECK(RCC, rcc, "$qt_version") AC_SUBST(RCC) + + # + # On Darwin, find where the Qt frameworks are + # located, and add that to the rpath, just in + # case this is Qt 5.5 or later and the frameworks + # have an install name that begins with @rpath + # and aren't installed in a frameworks directory + # that's searched by default. + # + case "$host_os" in + darwin*) + if test $qt_version -le 4 + then + Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs QtCore | sed -e 's/-F//' -e 's/ -framework.*//'` + else + Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs Qt${qt_version}Core | sed -e 's/-F//' -e 's/ -framework.*//'` + fi + ;; + esac + AC_SUBST(Qt_LDFLAGS) ], [ case "$with_qt" in |