On Wed, Mar 16, 2011 at 22:29:43 (CET), Sean McGovern wrote: > No, this is a patch I've had locally for ages now and just wanted to make > sure I didn't lose it and also gauge(sp?) reaction to have it committed > publicly. > > I use it when I build MPlayer OS X packages -- it saves me having to use > 'install_name_tool' manually after the build completes.
please don't top-post > -- Sean > -----Original Message----- > From: Måns Rullgård <[email protected]> > Sender: [email protected] > Date: Wed, 16 Mar 2011 21:19:30 > To: libav development<[email protected]> > Reply-To: libav development <[email protected]> > Subject: Re: [libav-devel] [PATCH 2/2] Darwin/MacOS X: allow user-specified > library install path > > Sean McGovern <[email protected]> writes: > >> 2011/3/15 Måns Rullgård <[email protected]>: >>> Sean McGovern <[email protected]> writes: >>> >>>> In Darwin/MacOS X, it is advantageous to be able to set a >>>> custom library install path when embedding a library alongside or >>>> in a path relative to it's calling binary application >>>> This allows constructions such as: >>>> @executable_path/lib >>>> which is evaluated by dyld at runtime. >>>> --- >>>> configure | 3 ++- >>>> 1 files changed, 2 insertions(+), 1 deletions(-) >>>> >>>> diff --git a/configure b/configure >>>> index 49f59e0..85c93c4 100755 >>>> --- a/configure >>>> +++ b/configure >>>> @@ -2386,7 +2386,7 @@ case $target_os in >>>> enable malloc_aligned >>>> gas="gas-preprocessor.pl $cc" >>>> enabled ppc && add_asflags -force_cpusubtype_ALL >>>> - SHFLAGS='-dynamiclib -Wl,-single_module >>>> -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)' >>>> + SHFLAGS='-dynamiclib -Wl,-single_module >>>> -Wl,-install_name,$(INSTALL_NAME_DIR)/$(SLIBNAME),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)' >>>> enabled x86_32 && SHFLAGS='$(SHFLAGS) >>>> -Wl,-read_only_relocs,suppress' >>>> strip="${strip} -x" >>>> add_ldflags -Wl,-dynamic,-search_paths_first >>>> @@ -3215,6 +3215,7 @@ INCDIR=\$(DESTDIR)$incdir >>>> BINDIR=\$(DESTDIR)$bindir >>>> DATADIR=\$(DESTDIR)$datadir >>>> MANDIR=\$(DESTDIR)$mandir >>>> +INSTALL_NAME_DIR=${INSTALL_NAME_DIR:=\$(SHLIBDIR)} >>>> SRC_PATH="$source_path" >>>> SRC_PATH_BARE=$source_path >>>> BUILD_ROOT="$PWD" >>>> -- >>>> 1.7.4 >>> >>> Could you explain what the -install_name flag does or point out some >>> documentation for same? >>> >> Sure, here's the manual page: >> http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/ld.1.html > > So it's a primitive form of the ELF SONAME field. We should probably do > something generic that covers all lib formats. I can imagine cases > where setting a custom ELF SONAME would be useful too. Do you need this > urgently? It seems pretty similar to GNU's -rpath-link option, right? If yes, I'd suggest to add some configure switch that enables this behavior transparently. -- Gruesse/greetings, Reinhard Tartler, KeyID 945348A4 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
