changeset 58458:4fa5becf6cb3

8241254: Simplify usage of UTIL_DEPRECATED_ARG_ENABLE Reviewed-by: erikj
author ihse
date Thu, 19 Mar 2020 17:17:49 +0100
parents 06146be26035
children d780dd664f6c
files make/autoconf/util.m4
diffstat 1 files changed, 2 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/make/autoconf/util.m4	Thu Mar 19 14:18:27 2020 +0100
+++ b/make/autoconf/util.m4	Thu Mar 19 17:17:49 2020 +0100
@@ -275,20 +275,11 @@
 ###############################################################################
 # Register a --enable argument but mark it as deprecated
 # $1: The name of the with argument to deprecate, not including --enable-
-# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
-# $3: Messages to user.
 AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE],
 [
   AC_ARG_ENABLE($1, [AS_HELP_STRING([--enable-$1],
-      [Deprecated. Option is kept for backwards compatibility and is ignored])])
-  if test "x$enable_$2" != x; then
-    AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])
-
-    if test "x$3" != x; then
-      AC_MSG_WARN([$3])
-    fi
-
-  fi
+      [Deprecated. Option is kept for backwards compatibility and is ignored])],
+      [AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])])
 ])
 
 ###############################################################################