automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell commands


From: Ralf Wildenhues
Subject: Re: shell commands
Date: Thu, 6 Dec 2007 20:56:30 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]