Skip to content

Define HAVE_ZLIB for myslnd #5655

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

Closed
wants to merge 1 commit into from
Closed

Conversation

jtojnar
Copy link

@jtojnar jtojnar commented Jun 2, 2020

When building just the mysqlnd extension, HAVE_ZLIB might not be set, leading to a missing compression support.

When building just the mysqlnd extension, HAVE_ZLIB might not be set, leading to a missing compression support.
PKG_CHECK_MODULES([ZLIB], [zlib])
PKG_CHECK_MODULES([ZLIB], [zlib], [
AC_DEFINE(HAVE_ZLIB, 1, "ZLIB support")
])
PHP_EVAL_LIBLINE($ZLIB_LIBS, MYSQLND_SHARED_LIBADD)
PHP_EVAL_INCLINE($ZLIB_CFLAGS)
AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support])
Copy link
Member

Choose a reason for hiding this comment

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

This looks unnecessarily complicated. I'd instead replace MYSQLND_COMPRESSION_WANTED here with MYSQLND_COMPRESSION_ENABLED and then drop the block at

#if defined(MYSQLND_COMPRESSION_WANTED) && defined(HAVE_ZLIB)
#define MYSQLND_COMPRESSION_ENABLED 1
#endif

There's no reason why we need both MYSQLND_COMPRESSION_WANTED and HAVE_ZLIB here. (Keep in mind that PKG_CHECK_MODULES is going to hard error if zlib is not found.)

@jtojnar
Copy link
Author

jtojnar commented Jun 3, 2020

Superseded by: #5658

@jtojnar jtojnar closed this Jun 3, 2020
@jtojnar jtojnar deleted the mysqlnd-zlib branch June 3, 2020 19:52
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