From f4cebd5339ce813ab2eba541bc5eca835db240c1 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Thu, 3 Jul 2025 23:19:26 +0200 Subject: [PATCH] Do not compile rigs/winradio if disabled in configure To disable: ./configure --disable-winradio --- Makefile.am | 1 + configure.ac | 17 ++++++----------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index 816478151..3b8f332c0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,7 @@ SUBDIRS = \ ## Static list of distributed directories. DIST_SUBDIRS = \ + $(RIG_BACKEND_OPTIONAL_LIST) \ $(SUBDIRS) \ android \ bindings \ diff --git a/configure.ac b/configure.ac index c1cbf9749..1eee8c083 100644 --- a/configure.ac +++ b/configure.ac @@ -66,7 +66,8 @@ dnl added to AC_CONFIG_FILES near the end of this file. See README.developer dnl Beware of duplication should a backend directory include both rig and dnl rotor definitions, e.g. "dummy". Optional backends will not be listed dnl here but will be added later, e.g. "winradio". -RIG_BACKEND_LIST="rigs/adat rigs/alinco rigs/aor rigs/barrett rigs/codan rigs/dorji rigs/drake rigs/dummy rigs/elad rigs/flexradio rigs/icom rigs/icmarine rigs/jrc rigs/kachina rigs/kenwood rigs/kit rigs/lowe rigs/pcr rigs/prm80 rigs/racal rigs/rft rigs/rs rigs/skanti rigs/tapr rigs/tentec rigs/tuner rigs/uniden rigs/winradio rigs/wj rigs/yaesu rigs/gomspace rigs/mds rigs/anytone rigs/motorola rigs/commradio rigs/guohetec" +RIG_BACKEND_LIST="rigs/adat rigs/alinco rigs/aor rigs/barrett rigs/codan rigs/dorji rigs/drake rigs/dummy rigs/elad rigs/flexradio rigs/icom rigs/icmarine rigs/jrc rigs/kachina rigs/kenwood rigs/kit rigs/lowe rigs/pcr rigs/prm80 rigs/racal rigs/rft rigs/rs rigs/skanti rigs/tapr rigs/tentec rigs/tuner rigs/uniden rigs/wj rigs/yaesu rigs/gomspace rigs/mds rigs/anytone rigs/motorola rigs/commradio rigs/guohetec" +RIG_BACKEND_OPTIONAL_LIST="" ROT_BACKEND_LIST="rotators/amsat rotators/apex rotators/ars rotators/celestron rotators/cnctrk rotators/grbltrk rotators/easycomm rotators/ether6 rotators/flir rotators/fodtrack rotators/gs232a rotators/heathkit rotators/m2 rotators/meade rotators/rotorez rotators/sartek rotators/saebrtrack rotators/spid rotators/ts7400 rotators/prosistel rotators/ioptron rotators/satel rotators/skywatcher rotators/radant" # Amplifiers are all in the amplifiers directory AMP_BACKEND_LIST="amplifiers/elecraft amplifiers/gemini amplifiers/expert" @@ -778,19 +779,12 @@ AC_MSG_RESULT([$cf_with_parallel]) DL_LIBS="" AS_IF([test x"${cf_with_winradio}" = "xyes"], - [RIGS_BACKEND_LIST="$RIGS_BACKEND_LIST rigs/winradio" + [RIG_BACKEND_LIST="$RIG_BACKEND_LIST rigs/winradio" dnl Check for libdl and set DL_LIBS if found--used for linradio WR-G313 backend. AC_CHECK_LIB([dl], [dlopen], [DL_LIBS="-ldl"], [AC_MSG_WARN([dlopen was not found in libdl--linradio backend will be disabled])]) - ]) - -# Still need -ldl if we have it -AS_IF([test x"${cf_with_winradio}" = "xno"], - [RIGS_BACKEND_LIST="$RIGS_BACKEND_LIST" -dnl Check for libdl and set DL_LIBS if found--used for linradio WR-G313 backend. - AC_CHECK_LIB([dl], [dlopen], [DL_LIBS="-ldl"], - [AC_MSG_WARN([dlopen was not found in libdl--linradio backend will be disabled])]) - ]) + ], + [RIG_BACKEND_OPTIONAL_LIST="$RIG_BACKEND_OPTIONAL_LIST rigs/winradio"]) dnl Set conditional compilation for G-313. AS_CASE(["$host_os"], @@ -850,6 +844,7 @@ for be in ${RIG_BACKEND_LIST} ; do RIG_BACKENDEPS="${RIG_BACKENDEPS} \$(top_builddir)/rigs/${RIGDIR}/libhamlib-${RIGDIR}.la" done +AC_SUBST([RIG_BACKEND_OPTIONAL_LIST]) AC_SUBST([RIG_BACKEND_LIST]) AC_SUBST([RIG_BACKENDEPS])