Hi Ralf,
I do not know if libtool is used, although I think it might be. I
simply use GNU Autotools to build the package, however I think libtool
might be used in the build process. I am also not sure why this
problem occurs with libfmod on mac os x. I think I found the solution
out after doing some google searching trying to figure out the
problem. I wish I knew the answer to your question though also, since
the whole thing doesn't make a lot of sense to me. Thanks for the
suggestion though, I'll try it out in a bit.
Regards,
Ruben
On 07/12/2007, at 6:56 AM, Ralf Wildenhues wrote:
Hello Ruben,
* Ruben Henner Zilibowitz wrote on Mon, Dec 03, 2007 at 02:13:47AM
CET:
I have a project using gnu autotools where I need to be able to
execute a
certain shell command on the executable after it has been compiled
but only
if the platform is Mac OS X. I am not too familiar with automake so
I am
unsure how to achieve this. Any instructions or assistance would be
appreciated.
To be more specific, to use the FMOD library on Mac OS X, one must
run the
following command after building an executable that links with
libfmod:
install_name_tool -change ./libfmodex.dylib <path to
libfmodex.dylib> <path
to executable>
You could put in configure.ac (untested):
AM_CONDITIONAL([ON_OS_X],
[AC_REQUIRE([AC_CANONICAL_HOST])
case $host_os in
darwin*) true ;;
*) false ;;
esac
])
and in Makefile.am:
if ON_OS_X
all-local: $(executable)
install_name_tool ...
endif
If only the installed executable is concerned, then the
install-exec-hook target should be appropriate (it need not depend on
the executable in this case).
However, I would like to know whether and why the path to libfmod is
found wrongly in the first place (and fix that then).
Do you use Libtool in your package?
Cheers,
Ralf