Hello Braden, Russell,
* Braden McDaniel wrote on Sun, Aug 05, 2007 at 08:27:07PM CEST:
On Mon, 2007-08-06 at 03:49 +1000, Russell Shaw wrote:
I want it to be like:
System_LTLIBRARIES = modules/System/system.la
modules_System_system_la_SOURCES = modules/System/system.c
modules_System_system_la_LDFLAGS = -module
That makes "modules/System/system.la" ok, but it still puts
system.o and system.lo in the top level src directory.
The latter feature is governed by the Automake option subdir-objects.
Note that the option has existed for a long time, but its functionality
has been improved lately, e.g., for non-C sources. See the NEWS file
for details.
Look again. That's entirely inconsistent with my experience with
automake's (1.10) behavior. The object file generated from the above
should be "modules/System/modules_System_system_la-system.lo".
Then you have subdir-objects set.
That means the program won't work in the uninstalled state,
because dlopen is looking for system.o as modules/System/system.o.
That seems unlikely. dlopen should be looking for system.so. I don't
imagine it cares about the location of system.o.
I agree with Braden here, dlopen should not care about object positions
and things should work with subdir-objects and without. If you have a
failure setup, please show us how to reproduce it.