From 43159e55a1c4351199fada21eb6be4632001d930 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sun, 12 Nov 2023 08:47:28 -0600 Subject: [PATCH] Default configure builds shared libraries Adding --enable-static now turnes off shared as it never build both at the same time --- configure.ac | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac index 863b76dec..25f53c6bf 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,23 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) ## ------------------------------ ## ## Hamlib specific configuration. ## ## ------------------------------ ## +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared], + [Enable shared libraries @<:@default=yes@:>@])], + [enable_shared=$enableval], + [enable_shared=yes]) +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static], + [Enable static libraries @<:@default=check@:>@])], + [enable_static=$enableval], + [enable_static=check]) + +AS_IF([test "x$enable_static" = "xyes"], [ + enable_shared=no +]) +AS_IF([test "x$enable_static" = "xyes" && test "x$enable_shared" = "xyes"], [ + AC_MSG_ERROR([Both --enable-static and --enable-shared cannot be enabled at the same time.]) +]) dnl New backends must be listed here! Also the new Makefile path must be dnl added to AC_CONFIG_FILES near the end of this file. See README.developer