Reputation: 35418
I work with an autotools project an trying to add new features to the build system (adding new components, etc). While doing it, strangely I discovered that if I add a bla
option to it (in configure.ac
), but by mistake call it like:
$ ./configure --with-blabla
It silently complains that:
configure: WARNING: unrecognized options: --with-blabla
and the configuration process still continues. I would like to stop the process instead if an unrecognized --with
is encountered. Is this possible somehow?
Upvotes: 2
Views: 198
Reputation: 22318
Your 'option' will have no effect. In that sense, a warning is sufficient. Matched --with-<package>
options are enabled by a AC_ARG_WITH
, so while blabla
might be ignored now, there's no reason why --with-blabla
or --enable-blabla
might not be useful in the future.
More to the point: ./configure --help
gives a list of valid configure options. It's not about failing with an unrecognized option - which brings us to an important point:
Some packages are built recursively, when a package has several sub-packages, an option may not be relevant to all of them, and yet you want to pass it to the package that does accept the option. In short - I see no reason to disable this behaviour.
Of course, if you really want to, you can invoke autoconf
with:
autoconf --warnings=error
in generating the configure
script.
Upvotes: 1