From 6331709fd6fd015dd8eb8aac8a0ebf3cc4411ca2 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Fri, 9 Dec 2022 23:32:51 -0600 Subject: [PATCH] Add --disable-parallel configure option https://github.com/Hamlib/Hamlib/issues/1181 --- configure.ac | 10 ++++++++++ rotators/fodtrack/fodtrack.c | 2 ++ src/parallel.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 6014b3911..a8527b8e3 100644 --- a/configure.ac +++ b/configure.ac @@ -694,6 +694,15 @@ AC_ARG_ENABLE([winradio], [cf_with_winradio="yes" AC_DEFINE([HAVE_WINRADIO],[1],[Define if winradio backend is built])]) AC_MSG_RESULT([$cf_with_winradio]) +dnl Parallel port device disable +AC_MSG_CHECKING([whether to build parallel port devices]) +AC_ARG_ENABLE([parallel], + [AS_HELP_STRING([--disable-parallel], + [do not build parallel devices @<:@default=yes@:>@])], + [cf_with_parallel="no"], + [cf_with_parallel="yes" AC_DEFINE([HAVE_PARALLEL],[1],[Define if parallel devices are to be built])]) +AC_MSG_RESULT([$cf_with_parallel]) + DL_LIBS="" AS_IF([test x"${cf_with_winradio}" = "xyes"], @@ -914,6 +923,7 @@ echo \ Enable HTML rig feature matrix ${cf_enable_html_matrix} Enable WinRadio ${cf_with_winradio} + Enable Parallel ${cf_with_parallel} Enable USRP ${cf_with_usrp} Enable USB backends ${cf_with_libusb} Enable shared libs ${enable_shared} diff --git a/rotators/fodtrack/fodtrack.c b/rotators/fodtrack/fodtrack.c index ad9e58500..9f6006ceb 100644 --- a/rotators/fodtrack/fodtrack.c +++ b/rotators/fodtrack/fodtrack.c @@ -26,9 +26,11 @@ #include #endif +#ifdef HAVE_PARALLEL #ifdef HAVE_LINUX_PARPORT_H #include #endif +#endif #include "hamlib/rotator.h" #include "parallel.h" diff --git a/src/parallel.h b/src/parallel.h index c676ee439..0cdc1f0bf 100644 --- a/src/parallel.h +++ b/src/parallel.h @@ -26,9 +26,11 @@ #include #include "iofunc.h" +#ifdef HAVE_PARALLEL #ifdef HAVE_LINUX_PARPORT_H # include #endif +#endif #ifndef PARPORT_CONTROL_STROBE # define PARPORT_CONTROL_STROBE 0x1