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

retrieve build options from pkg-config #73

Merged
merged 2 commits into from
Nov 7, 2018

Conversation

remicollet
Copy link
Contributor

@remicollet remicollet commented Nov 7, 2018

Detects library during configure to fail early and avoid build error

/home/rpmbuild/SPECS/remirepo/php/php-maxminddb/MaxMind-DB-Reader-php-e042b4f8a2dff41e19019faf16427178b07fbd58/ext/maxminddb.c:23:10: erreur fatale: maxminddb.h : Aucun fichier ou dossier de ce type
 #include <maxminddb.h>

I kept the old way (default path) as fallback, but raise a warning.

@remicollet
Copy link
Contributor Author

In this PR, minimal library version is set to 0, can be raised later according to needs.

I run test with 1.1.1 (RHEL-6) and 1.2.0 (RHEL-7), both are ok.

ext/config.m4 Outdated
AC_MSG_CHECKING(for libmaxminddb)
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libmaxminddb; then
dnl retrieve build options from pkg-config
if $PKG_CONFIG libzip --atleast-version 0; then
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean libmaxminddb here? I think we could probably require at least 1.0.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed (so you know where I copy/past the code from ;)

Fixed

Copy link
Member

@oschwald oschwald left a comment

Choose a reason for hiding this comment

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

👍

@oschwald oschwald merged commit d14b80b into maxmind:master Nov 7, 2018
oschwald added a commit that referenced this pull request Nov 8, 2018
oschwald added a commit that referenced this pull request Nov 9, 2018
PatrickCronin added a commit that referenced this pull request Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants