From c9c6a869184662263f8eb4758926b18868bf80ee Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 1 Oct 2013 16:08:55 +0000 Subject: [PATCH] Install wxrc with proper library dependencies under OS X. In addition to changing the libraries themselves to point to the dependencies in their installed location, we also need to do the same thing for wxrc when installing it under OS X, otherwise it wouldn't run once the libraries are not available in their original location any more. Closes #15452. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 12 +++++++----- configure.in | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/configure b/configure index fb6bd0dd31..25d63b8492 100755 --- a/configure +++ b/configure @@ -29324,15 +29324,17 @@ rm -f core conftest.err conftest.$ac_objext \ cat <change-install-names #!/bin/sh libnames=\`cd \${2} ; ls -1 | grep '\.[0-9][0-9]*\.dylib\$'\` +changes='' +for dep in \${libnames} ; do + changes="\${changes} -change \${4}/\${dep} \${3}/\${dep}" +done for i in \${libnames} ; do - ${HOST_PREFIX}install_name_tool -id \${3}/\${i} \${1}/\${i} - for dep in \${libnames} ; do - ${HOST_PREFIX}install_name_tool -change \${2}/\${dep} \${3}/\${dep} \${1}/\${i} - done + ${HOST_PREFIX}install_name_tool \${changes} -id \${3}/\${i} \${1}/\${i} done +${HOST_PREFIX}install_name_tool \${changes} \${2}/wxrc-${WX_RELEASE} EOF chmod +x change-install-names - DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \$(wx_top_builddir)/lib \${libdir}" + DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \${DESTDIR}\${bindir} \${libdir} \$(wx_top_builddir)/lib" fi HEADER_PAD_OPTION="-headerpad_max_install_names" diff --git a/configure.in b/configure.in index 4ae4fc3e65..75cadafa06 100644 --- a/configure.in +++ b/configure.in @@ -3789,15 +3789,17 @@ if test "$wxUSE_SHARED" = "yes"; then cat <change-install-names #!/bin/sh libnames=\`cd \${2} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\` +changes='' +for dep in \${libnames} ; do + changes="\${changes} -change \${4}/\${dep} \${3}/\${dep}" +done for i in \${libnames} ; do - ${HOST_PREFIX}install_name_tool -id \${3}/\${i} \${1}/\${i} - for dep in \${libnames} ; do - ${HOST_PREFIX}install_name_tool -change \${2}/\${dep} \${3}/\${dep} \${1}/\${i} - done + ${HOST_PREFIX}install_name_tool \${changes} -id \${3}/\${i} \${1}/\${i} done +${HOST_PREFIX}install_name_tool \${changes} \${2}/wxrc-${WX_RELEASE} EOF chmod +x change-install-names - DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \$(wx_top_builddir)/lib \${libdir}" + DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \${DESTDIR}\${bindir} \${libdir} \$(wx_top_builddir)/lib" fi dnl the HEADER_PAD_OPTION is required by some wx samples to avoid the error: -- 2.45.2