Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to PKG_CHECK_MODULES #65

Closed
wants to merge 2 commits into from

Conversation

remicollet
Copy link
Contributor

drop --with-python-config and --with-python-dir option

also use EXTRAS_CXXFLAGS instead of changing CXXFLAGS

[Specify version of python, default is 3.11])], [no], [no])

PHP_ARG_WITH([python_config],
[path of python_config],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is necessary to retain the python-config option. When using Anaconda to manage Python, and multiple versions of Python are present, it is essential to utilize absolute paths.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even know what Anaconda is (seems very distro specific)

BTW, python-config and pkg-config will give you same results. pkg-config is used by PHP since 7.4 for most of the libraries. For non standard installation, setting PKG_CONFIG_PATH is the proper way.

Feel free to keep this PR as a sample of clean config.m4 and adapt to your needs

@matyhtf
Copy link
Member

matyhtf commented Aug 21, 2024

This commit is not forward-compatible and needs further consideration.

@matyhtf
Copy link
Member

matyhtf commented Aug 21, 2024

Refer to 59c2cb0
By checking the exit status of python-config, a value of 1 indicates that --embed flag is not supported.

drop  --with-python-config and --with-python-dir option
also use EXTRAS_CXXFLAGS instead of changing CXXFLAGS
@remicollet
Copy link
Contributor Author

remicollet commented Aug 21, 2024

Rebased, but feel free to close and consider it only as a example

Notice: default config.m4 doesn't work (as /opt/anaconda3 is used and doesn't exist)
Also /lib is hardcoded, when $PHP_LIBDIR should be used (could be /lib64)

matyhtf added a commit that referenced this pull request Aug 21, 2024
@matyhtf
Copy link
Member

matyhtf commented Aug 21, 2024

I reviewed your PR and optimized the config.m4. Here's the new commit.

632f3e8

@remicollet
Copy link
Contributor Author

so closing

@remicollet remicollet closed this Aug 21, 2024
@remicollet
Copy link
Contributor Author

FYI, for RPM build available to Fedora/RHEL/CentOS/Alma/Rocky... in my repo, I will use
https://git.remirepo.net/cgit/rpms/php/pecl/php-pecl-phpy.git/tree/phpy-pkgconfig.patch

So pkg-config will be used by default, as common practice for php extension since 7.4

@remicollet remicollet deleted the issue-pkgconfig branch September 6, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants