Hi,

if I remember correctly, you need to pass both --enable-static and 
--enable-shared to get both.

On many systems, both are built with -fPIC now, to allow use of static 
libraries in position-independent executables, I'm not sure if libtool handles 
this efficiently, but it mostly means longer build time.

   Simon

8 Apr 2025 08:52:45 Nate Bargmann <n...@n0nb.us>:

> Hi All.
> 
> I've been involved with the Hamlib project for many years.  I seem to
> recall that at one time both .so and .a libraries were built by libtool.
> The project uses Autoconf, Automake, and Libtool, so I think this list
> is the obvious choice to ask my question.
> 
> I recent years I have observed that only .so binaries are built unless
> --enable-static is passed to the 'configure' script.  The result is that
> .a libraries are built but no .so libraries and all of the user
> executable programs are static linked to the new libraries.
> 
> In 'configure.ac' the following macros are used:
> 
> LT_PREREQ([2.2.6b])
> LT_INIT([win32-dll])
> LT_LANG([Windows Resource])
> 
> As a test I tried with just a bare LT_INIT request and saw no change
> with only .so libraries being built by default.
> 
> I am working through a list of issues of the project and one is a
> request to build both .so and .a libraries by default.  Hence the
> motivation for this email.
> 
> I am building Hamlib on Debian GNU/Linux 12 with libtool 2.4.7.  I also
> do separate builds for MS Windows, but I don't that is a part of this
> discussion.  I can provide links to files for examination if requested.
> 
> - Nate
> 
> -- 
> "The optimist proclaims that we live in the best of all
> possible worlds.  The pessimist fears this is true."
> Web: https://www.n0nb.us
> Projects: https://github.com/N0NB
> GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
> NIT([win32-dll])

Reply via email to