I use autoconf/automake/libtool to build a shared library. I want to pass major number of library version to shared library soname.
I have the following declaration in configure.ac:
AC_INIT([libabc], [1.1.0])
And the following Makefile.am:
AM_CPPFLAGS = -I$(top_srcdir)/include -Wall -Wextra
LDADD = libabc.la
lib_LTLIBRARIES = libabc.la
nodist_libabc_la_SOURCES = $(top_srcdir)/config.h
libabc_la_SOURCES = $(top_srcdir)/src/abc.c
I am fine to have same version for configure script, sources and shared library soname. I can use VERSION or PACKAGE_VERSION defined in auto-generated config.h in sources, but this does not affect soname, which is always libabc.so.0.
Is there a way to enforce libtool to use my major version from AC_INIT directive? If not, what is the preferred way to define major/minor number?