Don't accept nonsensical --without-<toolkit> options in configure

Only --with-<toolkit> options make sense, something like --without-x11
couldn't possibly be useful and was actually actively harmful as it set
wxUSE_UNIVERSAL to 1 as a side effect.

Closes #2306.
This commit is contained in:
Vadim Zeitlin
2017-05-27 14:11:07 +02:00
parent aa7e10bb09
commit a7ae3de703
3 changed files with 118 additions and 24 deletions

View File

@@ -394,6 +394,16 @@ AC_DEFUN([WX_ARG_WITH],
dnl same as WX_ARG_WITH but makes it clear that the option is enabled by default
AC_DEFUN([WX_ARG_WITHOUT], [WX_ARG_WITH($1, [$2], $3, without)])
dnl variant of AC_ARG_WITH which doesn't accept --without-xxx varient
AC_DEFUN([WX_ARG_ONLY_WITH], [
AC_ARG_WITH($1, [$2], [
if test "$withval" != yes; then
AC_MSG_ERROR([Option --with-$1 doesn't accept any arguments])
fi
$3
])
])
dnl like WX_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH
dnl usage: WX_ARG_ENABLE(option, helpmessage, var, [enablestring], [default])
dnl