I have a library A, that I develop. When I deploy it on a machine, the corresponding libA.so and libA-X.Y.Z.so are put in /usr/lib (X.Y.Z being the version number).
Now I develop a library B, which uses A. When I link B, I use the flag -lA. Then "ldd libB.so" gives me :
(...)
libA-X.Y.Z.so => /usr/lib/libA-X.Y.Z.so
(...)
My problem is that when I release a new version of A (X.Y.ZZ), I also have to release a new version of B. Otherwise, someone installing the latest A won't be able to install B which will be looking for the version X.Y.Z which doesn't exist.
How do I solve this problem ? How can I tell B to look for libA.so and not libA-X.Y.Z.so ? Or is it wrong to do so ? even unsafe ?
Update 1 : library A (that I inherited from someone else) uses autotools.
Update 2 : when I build library A, I can see : "-Wl,-soname -Wl,libA-0.6.1.so". If I understand properly that means that we are forcing the soname to be libA-0.6.1.so. Is that right ? Now my problem is that I have no clue how to modify this behaviour in a project which uses autotools. I googled for a while but can't find any useful information. Should I modify configure.in or a Makefile.am ?