Yeah you just...link to static libraries. Which have usually already been built and installed alongside the shared libraries.
Also why would you be using autotools in 2022? CMake has been the de facto standard for about a decade now.
Also why would you be using autotools in 2022? CMake has been the de facto standard for about a decade now.