autoconf
[Top][All Lists]
Advanced

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

Re: checking for header/library mismatch, rpath problem?


From: Adam Mercer
Subject: Re: checking for header/library mismatch, rpath problem?
Date: Tue, 22 Jun 2010 14:15:35 -0500

On Wed, Jun 16, 2010 at 12:19, Ralf Wildenhues <address@hidden> wrote:

>> Is there a way the appropriate platform-specific options can be added
>> automatically?
>
> You can use the gnulib module havelib and the macros it provides.

I've been looking at these macros and they don't seem to be setting
the platform specific link flags, from the documentation:

"The macros also set a variable LTLIB<NAME>, that should be used when
linking with libtool. Both LTLIB<NAME> and LIB<NAME> contain
essentially the same option, but where LIB<NAME> contains platform
dependent flags like ‘-Wl,-rpath’, LTLIB<NAME> contains platform
independent flags like ‘-R’."

I've added a call to the AC_LIB_LINKFLAGS() macro:

AC_LIB_LINKFLAGS([metaoio])

which results in the following extra being display during configure:

checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking for libmetaio... yes
checking how to link with libmetaio... -lmetaio

from the snippet of the documentation above, it says that LTLIBMETAIO
should include platform specific linking flags such as '-Wl,-rpath'
but LTLIBMETAIO is simpliy:

LTLIBMETAIO='-lmetaio'

so the test code is still failing to run as the linker can't find
libmetaio without LD_LIBRARY_PATH being set. Is there another way to
use these macros to get the appropriate linking flags?

Cheers

Adam



reply via email to

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