From 93c4e5081a26097a1c7840998f34bb631df73245 Mon Sep 17 00:00:00 2001
From: chrfranke <chrfranke@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Sat, 26 Feb 2022 18:18:03 +0000
Subject: [PATCH] configure.ac: Print 'deprecated' warning for
 '--with-signal-func'.

git-svn-id: https://svn.code.sf.net/p/smartmontools/code/trunk@5335 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 smartmontools/ChangeLog    |  4 ++++
 smartmontools/configure.ac | 11 +++++++++++
 2 files changed, 15 insertions(+)

diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog
index ce9dcdfcc..62379726a 100644
--- a/smartmontools/ChangeLog
+++ b/smartmontools/ChangeLog
@@ -1,5 +1,9 @@
 $Id$
 
+2022-02-26  Christian Franke  <franke@computer.org>
+
+	configure.ac: Print 'deprecated' warning for '--with-signal-func'.
+
 2022-02-25  Douglas Gilbert  <dgilbert@interlog.com>
 
 	NEWS: update for changes in previous commit
diff --git a/smartmontools/configure.ac b/smartmontools/configure.ac
index deddb0582..8279e0a71 100644
--- a/smartmontools/configure.ac
+++ b/smartmontools/configure.ac
@@ -421,6 +421,7 @@ available in the SVN repository.])
     ;;
 esac
 
+# TODO: Remove after smartmontools 7.4
 AC_ARG_WITH(signal-func,
   [AS_HELP_STRING([--with-signal-func=@<:@sigaction|sigset|signal@:>@],
     [Function to set signal(2) action [sigaction]])],
@@ -1009,6 +1010,16 @@ still needed, please inform $PACKAGE_BUGREPORT.
 ])
 fi
 
+# TODO: Remove after smartmontools 7.4
+case "$host:$with_signal_func" in
+  *-*-mingw*:*|*:sigaction) ;;
+  *) AC_MSG_WARN([
+The option '--with-signal-func=$with_signal_func' is deprecated and will be
+removed in a future version of smartmontools.  If this option is
+still needed, please inform $PACKAGE_BUGREPORT.
+]) ;;
+esac
+
 case "$host_os:$with_libsystemd:$use_libsystemd:$PKG_CONFIG" in
   linux*:auto:no:?*)
     if $PKG_CONFIG systemd >/dev/null 2>&1; then
-- 
GitLab