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
Bump to libmongoc to 1.24-dev #1388
Conversation
06b1180
to
da55719
Compare
da55719
to
7b3560d
Compare
@@ -5,6 +5,13 @@ PHP_ARG_ENABLE([mongodb], | |||
[Enable MongoDB support])]) | |||
|
|||
if test "$PHP_MONGODB" != "no"; then | |||
dnl Enable C99 (required for libmongoc 1.24+) | |||
AC_PROG_CC_C99 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this was deprecated in autoconf-2.70 but is still usable. See autoconf-2.60 docs for details about how it works.
|
||
if test "$ac_cv_prog_cc_c99" = no; then | ||
AC_MSG_ERROR([Compiler does not support C99]) | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the approach taken in php/php-src#6317.
Note: C99 was added to php-src in php/php-src@b51a99a
@@ -537,6 +543,7 @@ if test "$PHP_MONGODB" != "no"; then | |||
mongodb was configured with the following options: | |||
|
|||
Build configuration: | |||
CC : $CC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is helpful for debugging, as we'll see if -std=gnu99
(or something else) was added to the compiler command.
@@ -11,6 +11,10 @@ fi | |||
AC_PROG_CC | |||
AC_PROG_CXX | |||
|
|||
dnl AC_PROG_CC_C99 is previously called in config.m4, but AC_PROG_CC resets CC | |||
dnl so call it once more to ensure C99 remains enabled | |||
AC_PROG_CC_C99 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file dates back to libmongoc's old Autotools configs. I'm not sure that it's still necessary, since we do inherit some context from PHP's own Autotools configuration, but this didn't seem like the time to remove the file entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Note: this introduced a Windows build failure (shame on me for focusing on Evergreen and overlooking GitHub CI). After mongodb/mongo-c-driver#1154 is merged I'll open a new PR to bump the submodule and get that resolved. |
Will be required for PHPLIB-1042, among other issues.
Patch build: https://spruce.mongodb.com/version/6386decfe3c331496f01b0c2/tasks