Conditionally disable shared library build
问题 I’ve written a C library that builds using Libtool, and I’d like to only build static libraries on Cygwin. To that end, I placed if test "$target_os" = "cygwin"; then AC_DISABLE_SHARED fi in my configure.ac . This does indeed disable building shared libraries on Cygwin; however, it also disables building them everywhere else. I assume this is because expanding AC_DISABLE_SHARED causes some unfortunate side effects. How can I use Libtool to avoid building shared libraries on Cygwin while still