I'm building a project using the gnu autotools on the mac. Everything compiles fine but I'm having issues linking in with dynamic libraries. How do I specify install_name in my Makefile.am scripts. I thought it might be something like the following:
lib_LTLIBRARIES = libphysics.la
libphysics_la_SOURCES = PhysicsEngine.cpp\
PointMass.cpp\
Spring.cpp\
WaterForceGenerator.cpp
AM_CPPFLAGS= @CXXFLAGS@\
-I../include\
-Iinclude\
-I../evolutionaryStuff/include\
-I../geom/include\
-I../model/include\
-I../paramsReader/include\
-I../ctrnn/include\
-I../simulationSystem/include
AM_LDFLAGS= @LDFLAGS@ \
-install_name "./.libs/libphysics.0.dylib"
...yet when I do:
otool -D libphysics.0.dylib
in the .libs directory I get
/usr/local/lib/libphysics.0.dylib
(but I want it to something like .libs/libphysics.0.dylib)
I know it must be something simple, any ideas?
Thanks,
Ben.