Open nikic opened 4 years ago
In my opinion, this makes sense, especially since this distinction never made sense on Windows, where only few options take a path anyway (one notable exception is --enable-object-out-dir
;). I don't know what would need to be changed for non Windows systems, but there the following patch should do to accept either variant.
Probably @petk would know about autotools?
./configure
currently distinguishes between--enable-extname
and--with-extname
flags, where--enable
is used for extensions without dependencies, and--with
for those with dependencies.In practice, the actual usage is very inconsistent, and there's plenty of edge cases (what about extensions that have a dependency, but the dependency is bundled?) Since the pkg-config migration in PHP 7.4, most
--with
options don't even accept a library directory anymore, so the difference between these flags eroded further.In PHP 7.4, we tried to normalize the usage of
--enable
and--with
somewhat, but this only went partway, and I think was a pretty bad idea in hindsight, because it just broke existing configure scripts without much benefit.I think it would be better to give up on this distinction entirely, make all extensions enabled via
--enable-extname
(in docs), but accept--with-extname
as an alias.I'm not sure how this would be done technically, but the right starting point is probably the macro definitions starting at https://github.com/php/php-src/blob/c260613c6f166dc25d7c3a4ed090df5c08735491/build/php.m4#L684.