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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
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 commentThe 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 |
||
|
||
dnl Check PHP version is compatible with this extension | ||
AC_MSG_CHECKING([PHP version]) | ||
|
||
|
@@ -243,14 +250,14 @@ if test "$PHP_MONGODB" != "no"; then | |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | ||
AC_MSG_CHECKING(for libbson) | ||
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libbson-1.0; then | ||
if $PKG_CONFIG libbson-1.0 --atleast-version 1.23.1; then | ||
if $PKG_CONFIG libbson-1.0 --atleast-version 1.24.0; then | ||
PHP_MONGODB_BSON_CFLAGS=`$PKG_CONFIG libbson-1.0 --cflags` | ||
PHP_MONGODB_BSON_LIBS=`$PKG_CONFIG libbson-1.0 --libs` | ||
PHP_MONGODB_BSON_VERSION=`$PKG_CONFIG libbson-1.0 --modversion` | ||
PHP_MONGODB_BSON_VERSION_STRING="System ($PHP_MONGODB_BSON_VERSION)" | ||
AC_MSG_RESULT(version $PHP_MONGODB_BSON_VERSION found) | ||
else | ||
AC_MSG_ERROR(system libbson must be upgraded to version >= 1.23.1) | ||
AC_MSG_ERROR(system libbson must be upgraded to version >= 1.24.0) | ||
fi | ||
else | ||
AC_MSG_ERROR(pkgconfig and libbson must be installed) | ||
|
@@ -261,14 +268,14 @@ if test "$PHP_MONGODB" != "no"; then | |
|
||
AC_MSG_CHECKING(for libmongoc) | ||
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libmongoc-1.0; then | ||
if $PKG_CONFIG libmongoc-1.0 --atleast-version 1.23.1; then | ||
if $PKG_CONFIG libmongoc-1.0 --atleast-version 1.24.0; then | ||
PHP_MONGODB_MONGOC_CFLAGS=`$PKG_CONFIG libmongoc-1.0 --cflags` | ||
PHP_MONGODB_MONGOC_LIBS=`$PKG_CONFIG libmongoc-1.0 --libs` | ||
PHP_MONGODB_MONGOC_VERSION=`$PKG_CONFIG libmongoc-1.0 --modversion` | ||
PHP_MONGODB_MONGOC_VERSION_STRING="System ($PHP_MONGODB_MONGOC_VERSION)" | ||
AC_MSG_RESULT(version $PHP_MONGODB_MONGOC_VERSION found) | ||
else | ||
AC_MSG_ERROR(system libmongoc must be upgraded to version >= 1.23.1) | ||
AC_MSG_ERROR(system libmongoc must be upgraded to version >= 1.24.0) | ||
fi | ||
else | ||
AC_MSG_ERROR(pkgconfig and libmongoc must be installed) | ||
|
@@ -308,8 +315,7 @@ if test "$PHP_MONGODB" != "no"; then | |
|
||
if test "$PHP_MONGODB_SYSTEM_LIBS" = "no"; then | ||
PHP_MONGODB_BUNDLED_CFLAGS="$STD_CFLAGS -DBSON_COMPILATION -DMONGOC_COMPILATION" | ||
dnl TODO: MONGOCRYPT-219 makes the -std argument obsolete | ||
PHP_MONGODB_LIBMONGOCRYPT_CFLAGS="-DKMS_MSG_STATIC -DMLIB_USER -std=gnu99" | ||
PHP_MONGODB_LIBMONGOCRYPT_CFLAGS="-DKMS_MSG_STATIC -DMLIB_USER" | ||
PHP_MONGODB_ZLIB_CFLAGS="" | ||
|
||
dnl M4 doesn't know if we're building statically or as a shared module, so | ||
|
@@ -406,7 +412,7 @@ if test "$PHP_MONGODB" != "no"; then | |
PHP_MONGODB_JSONSL_SOURCES="jsonsl.c" | ||
|
||
dnl Generated with: find src/libmongoc/src/libmongoc/src/mongoc -name '*.c' -print0 | cut -sz -d / -f 7- | sort -dz | tr '\000' ' ' | ||
PHP_MONGODB_MONGOC_SOURCES="mongoc-aggregate.c mongoc-apm.c mongoc-array.c mongoc-async.c mongoc-async-cmd.c mongoc-buffer.c mongoc-bulk-operation.c mongoc-change-stream.c mongoc-client.c mongoc-client-pool.c mongoc-client-session.c mongoc-client-side-encryption.c mongoc-cluster-aws.c mongoc-cluster.c mongoc-cluster-cyrus.c mongoc-cluster-sasl.c mongoc-cluster-sspi.c mongoc-cmd.c mongoc-collection.c mongoc-compression.c mongoc-counters.c mongoc-crypt.c mongoc-crypto.c mongoc-crypto-cng.c mongoc-crypto-common-crypto.c mongoc-crypto-openssl.c mongoc-cursor-array.c mongoc-cursor.c mongoc-cursor-change-stream.c mongoc-cursor-cmd.c mongoc-cursor-cmd-deprecated.c mongoc-cursor-find.c mongoc-cursor-find-cmd.c mongoc-cursor-find-opquery.c mongoc-cursor-legacy.c mongoc-cyrus.c mongoc-database.c mongoc-error.c mongoc-find-and-modify.c mongoc-generation-map.c mongoc-gridfs-bucket.c mongoc-gridfs-bucket-file.c mongoc-gridfs.c mongoc-gridfs-file.c mongoc-gridfs-file-list.c mongoc-gridfs-file-page.c mongoc-handshake.c mongoc-host-list.c mongoc-http.c mongoc-index.c mongoc-init.c mongoc-interrupt.c mongoc-libressl.c mongoc-linux-distro-scanner.c mongoc-list.c mongoc-log.c mongoc-matcher.c mongoc-matcher-op.c mongoc-memcmp.c mongoc-ocsp-cache.c mongoc-openssl.c mongoc-optional.c mongoc-opts.c mongoc-opts-helpers.c mongoc-queue.c mongoc-rand-cng.c mongoc-rand-common-crypto.c mongoc-rand-openssl.c mongoc-read-concern.c mongoc-read-prefs.c mongoc-rpc.c mongoc-sasl.c mongoc-scram.c mongoc-secure-channel.c mongoc-secure-transport.c mongoc-server-api.c mongoc-server-description.c mongoc-server-monitor.c mongoc-server-stream.c mongoc-set.c mongoc-shared.c mongoc-socket.c mongoc-ssl.c mongoc-sspi.c mongoc-stream-buffered.c mongoc-stream.c mongoc-stream-file.c mongoc-stream-gridfs.c mongoc-stream-gridfs-download.c mongoc-stream-gridfs-upload.c mongoc-stream-socket.c mongoc-stream-tls.c mongoc-stream-tls-libressl.c mongoc-stream-tls-openssl-bio.c mongoc-stream-tls-openssl.c mongoc-stream-tls-secure-channel.c mongoc-stream-tls-secure-transport.c mongoc-timeout.c mongoc-topology-background-monitoring.c mongoc-topology.c mongoc-topology-description-apm.c mongoc-topology-description.c mongoc-topology-scanner.c mongoc-ts-pool.c mongoc-uri.c mongoc-util.c mongoc-version-functions.c mongoc-write-command.c mongoc-write-command-legacy.c mongoc-write-concern.c" | ||
PHP_MONGODB_MONGOC_SOURCES="mcd-azure.c mongoc-aggregate.c mongoc-apm.c mongoc-array.c mongoc-async.c mongoc-async-cmd.c mongoc-buffer.c mongoc-bulk-operation.c mongoc-change-stream.c mongoc-client.c mongoc-client-pool.c mongoc-client-session.c mongoc-client-side-encryption.c mongoc-cluster-aws.c mongoc-cluster.c mongoc-cluster-cyrus.c mongoc-cluster-sasl.c mongoc-cluster-sspi.c mongoc-cmd.c mongoc-collection.c mongoc-compression.c mongoc-counters.c mongoc-crypt.c mongoc-crypto.c mongoc-crypto-cng.c mongoc-crypto-common-crypto.c mongoc-crypto-openssl.c mongoc-cursor-array.c mongoc-cursor.c mongoc-cursor-change-stream.c mongoc-cursor-cmd.c mongoc-cursor-cmd-deprecated.c mongoc-cursor-find.c mongoc-cursor-find-cmd.c mongoc-cursor-find-opquery.c mongoc-cursor-legacy.c mongoc-cyrus.c mongoc-database.c mongoc-error.c mongoc-find-and-modify.c mongoc-generation-map.c mongoc-gridfs-bucket.c mongoc-gridfs-bucket-file.c mongoc-gridfs.c mongoc-gridfs-file.c mongoc-gridfs-file-list.c mongoc-gridfs-file-page.c mongoc-handshake.c mongoc-host-list.c mongoc-http.c mongoc-index.c mongoc-init.c mongoc-interrupt.c mongoc-libressl.c mongoc-linux-distro-scanner.c mongoc-list.c mongoc-log.c mongoc-matcher.c mongoc-matcher-op.c mongoc-memcmp.c mongoc-ocsp-cache.c mongoc-openssl.c mongoc-optional.c mongoc-opts.c mongoc-opts-helpers.c mongoc-queue.c mongoc-rand-cng.c mongoc-rand-common-crypto.c mongoc-rand-openssl.c mongoc-read-concern.c mongoc-read-prefs.c mongoc-rpc.c mongoc-sasl.c mongoc-scram.c mongoc-secure-channel.c mongoc-secure-transport.c mongoc-server-api.c mongoc-server-description.c mongoc-server-monitor.c mongoc-server-stream.c mongoc-set.c mongoc-shared.c mongoc-socket.c mongoc-ssl.c mongoc-sspi.c mongoc-stream-buffered.c mongoc-stream.c mongoc-stream-file.c mongoc-stream-gridfs.c mongoc-stream-gridfs-download.c mongoc-stream-gridfs-upload.c mongoc-stream-socket.c mongoc-stream-tls.c mongoc-stream-tls-libressl.c mongoc-stream-tls-openssl-bio.c mongoc-stream-tls-openssl.c mongoc-stream-tls-secure-channel.c mongoc-stream-tls-secure-transport.c mongoc-timeout.c mongoc-topology-background-monitoring.c mongoc-topology.c mongoc-topology-description-apm.c mongoc-topology-description.c mongoc-topology-scanner.c mongoc-ts-pool.c mongoc-uri.c mongoc-util.c mongoc-version-functions.c mongoc-write-command.c mongoc-write-command-legacy.c mongoc-write-concern.c service-gcp.c" | ||
|
||
dnl Generated with: find src/libmongoc/src/zlib-1.2.12 -maxdepth 1 -name '*.c' -print0 | cut -sz -d / -f 5- | sort -dz | tr '\000' ' ' | ||
PHP_MONGODB_ZLIB_SOURCES="adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c" | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. This is helpful for debugging, as we'll see if |
||
CFLAGS : $CFLAGS | ||
Extra CFLAGS : $STD_CFLAGS $EXTRA_CFLAGS | ||
Developers flags (slow) : $MAINTAINER_CFLAGS | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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. |
||
|
||
# Check that an appropriate C compiler is available. | ||
c_compiler="unknown" | ||
AC_LANG_PUSH([C]) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.23.1 | ||
1.24.0-20221129+gite507fc90ff |
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.