Linking against ODE with autoconf

View: New views
4 Messages — Rating Filter:   Alert me  

Linking against ODE with autoconf

by Sqeaky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Is there some easy macro to put in configure.ac to have autoconf/
configure verify the has libode somewhere on it? I have googled quite
a bit and I could not find how to properly include this in my project.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Linking against ODE with autoconf

by Stephen Sinclair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Thu, Nov 5, 2009 at 12:24 AM, Sqeaky <toppij@...> wrote:
>
> Is there some easy macro to put in configure.ac to have autoconf/
> configure verify the has libode somewhere on it? I have googled quite
> a bit and I could not find how to properly include this in my project.

I just do this, like any library:

AC_CHECK_LIB(ode, [dBodyCreate], [],
    AC_MSG_ERROR([Couldn't find ODE library.]))


Steve

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Linking against ODE with autoconf

by Sqeaky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks, that worked perfectly.
On Thu, Nov 5, 2009 at 9:44 AM, Stephen Sinclair <radarsat1@...> wrote:

On Thu, Nov 5, 2009 at 12:24 AM, Sqeaky <toppij@...> wrote:
>
> Is there some easy macro to put in configure.ac to have autoconf/
> configure verify the has libode somewhere on it? I have googled quite
> a bit and I could not find how to properly include this in my project.

I just do this, like any library:

AC_CHECK_LIB(ode, [dBodyCreate], [],
   AC_MSG_ERROR([Couldn't find ODE library.]))


Steve





--
- Joe Toppi
(402) 714-7539
toppij@...
http://www.assuredts.com/toppij/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Linking against ODE with autoconf

by Daniel K. O.-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Sqeaky wrote:
> Is there some easy macro to put in configure.ac to have autoconf/
> configure verify the has libode somewhere on it? I have googled quite
> a bit and I could not find how to properly include this in my project.

I would recommend to use the pkg-config macro:

PKG_CHECK_MODULES(ODE, ode)

Then use the variables ODE_CFLAGS and ODE_LIBS in your Makefiles. For
automake, it would be like this:

AM_CPPFLAGS = $(ODE_CFLAGS)
LIBS += $(ODE_LIBS)


You can also indicate which version you require, like:

PKG_CHECK_MODULES(ODE, ode >= 0.11)


BUT if your software depends on specific behaviors (say, a game), you
better distribute the specific version you need with your software. You
never know how somebody else might have built and installed ODE
system-wide. This could be done with AC_CONFIG_SUBDIRS(ode-subdir), for
example.



--
Daniel K. O.
"The only way to succeed is to build success yourself"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---