Hi Reuben,
> My patch is incomplete: it unconditionally uses libdl.m4, meaning libdl
> will always be linked on systems that have it. I appreciate this is what
> we're trying to avoid! I'm unclear what the best way to fix this is. Should
> I move the test for which code to use (i.e. Windows, libdl or /proc) to
> configure.ac, and introduce an automake conditional to guard the addition
> of libdl to the LIBS variable?
I think you are on the right track. What I would do:
- Keep the invocation of gl_LIBDL, but don't use the value of $(LIBDL)
in lib_LDFLAGS.
- Define _GL_USE_DLADDR only if $(LIBDL) is empty.
- Use the value $(LIBDL) to decide this, in the configure.ac section of the
module. I don't know whether that will require an Automake conditional.
Bruno