Skip to content

Accept --enable and --with configure flags interchangeably #2

Description

@nikic

./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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions