Skip to content
Permalink
Browse files
8241254: Simplify usage of UTIL_DEPRECATED_ARG_ENABLE
Reviewed-by: erikj
  • Loading branch information
magicus committed Mar 19, 2020
1 parent d3bf915 commit 9dc15f17ea2c0991e31f45ca8eedc5883e81de36
Showing with 2 additions and 11 deletions.
  1. +2 −11 make/autoconf/util.m4
@@ -275,20 +275,11 @@ AC_DEFUN([UTIL_DEPRECATED_ARG_WITH],
###############################################################################
# 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.])])
])

###############################################################################

0 comments on commit 9dc15f1

Please sign in to comment.