diff options
author | rillig <rillig@pkgsrc.org> | 2019-04-03 19:10:26 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2019-04-03 19:10:26 +0000 |
commit | 6f4704b5f685a9f7e39f0bb7499ac21f2e8a6aeb (patch) | |
tree | 603c130b4701c89daf476777a1402710f299021e | |
parent | 906426c5d46e28a6c5737d0e4b66dd29dbbc97c8 (diff) | |
download | pkgsrc-6f4704b5f685a9f7e39f0bb7499ac21f2e8a6aeb.tar.gz |
mk/configure: allow strict option checking for GNU configure scripts
When a GNU configure script is run with unknown --enable, --disable,
--with or --without options, it doesn't fail but just prints a warning.
This hides outdated package definitions that may still pass options that
have been removed already.
See https://mail-index.netbsd.org/pkgsrc-users/2019/04/02/msg028272.html
for a recent case.
The default behavior doesn't change. After a period of testing this new
check, the check is expected to become enabled by default so that future
problems like this are prevented.
-rw-r--r-- | mk/configure/gnu-configure.mk | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/mk/configure/gnu-configure.mk b/mk/configure/gnu-configure.mk index 2503abe6dec..257fd280455 100644 --- a/mk/configure/gnu-configure.mk +++ b/mk/configure/gnu-configure.mk @@ -1,8 +1,25 @@ -# $NetBSD: gnu-configure.mk,v 1.17 2014/08/23 03:00:18 obache Exp $ +# $NetBSD: gnu-configure.mk,v 1.18 2019/04/03 19:10:26 rillig Exp $ +# +# Package-settable variables: +# +# GNU_CONFIGURE +# Whether the package has a GNU-style configure script as the +# primary means of configuring itself to the platform. +# +# Possible: yes no +# Default: undefined +# +# GNU_CONFIGURE_STRICT +# Whether unknown --enable/--disable/--with/--without options make +# the package fail immediately. +# +# Possible: yes no +# Default: no _VARGROUPS+= gnu-configure _USER_VARS.gnu-configure= # none -_PKG_VARS.gnu-configure= GNU_CONFIGURE GNU_CONFIGURE_PREFIX \ +_PKG_VARS.gnu-configure= \ + GNU_CONFIGURE GNU_CONFIGURE_STRICT GNU_CONFIGURE_PREFIX \ SET_LIBDIR GNU_CONFIGURE_LIBSUBDIR \ GNU_CONFIGURE_LIBDIR GNU_CONFIGURE_INFODIR GNU_CONFIGURE_MANDIR \ CONFIGURE_HAS_LIBDIR CONFIGURE_HAS_MANDIR CONFIGURE_HAS_INFODIR \ @@ -173,3 +190,6 @@ configure-scripts-osdep: depth=`${EXPR} $$depth + 1`; pattern="*/$$pattern"; \ done .endif + +GNU_CONFIGURE_STRICT?= no +CONFIGURE_ARGS+= ${"${GNU_CONFIGURE_STRICT:M[yY][eE][sS]}":?--enable-option-checking=fatal:} |