I am the maintainer of twolame, a MPEG Audio Layer 2 encoding library. It is built using autoconf/automake/libtool.
As part of the build/test process I would like to get a list of visible/exported symbols and compare it to a version controlled file, to ensure that only the expected symbols are visible.
On Mac OS, I can use nm -g libtwolame/.libs/libtwolame.dylib
to successfully get a list of the symbols. I intend to then write a script to extract the symbols from the nm
output and compare it to a file as part of the make check
target.
But am not sure how to calculate the path of the binary library in a script. Is there a way to ask libtool
, to take libtwolame/libtwolame.la
and return libtwolame/.libs/libtwolame.dylib
(or libtwolame/.libs/libtwolame.so
on Linux)?
Or anything that can be done with automake macros?