File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,13 @@ PHP_ARG_ENABLE([mongodb],
5
5
[ Enable MongoDB support] ) ] )
6
6
7
7
if test "$PHP_MONGODB" != "no"; then
8
+ dnl Enable C99 (required for libmongoc 1.24+)
9
+ AC_PROG_CC_C99
10
+
11
+ if test "$ac_cv_prog_cc_c99" = no; then
12
+ AC_MSG_ERROR ( [ Compiler does not support C99] )
13
+ fi
14
+
8
15
dnl Check PHP version is compatible with this extension
9
16
AC_MSG_CHECKING ( [ PHP version] )
10
17
@@ -308,8 +315,7 @@ if test "$PHP_MONGODB" != "no"; then
308
315
309
316
if test "$PHP_MONGODB_SYSTEM_LIBS" = "no"; then
310
317
PHP_MONGODB_BUNDLED_CFLAGS="$STD_CFLAGS -DBSON_COMPILATION -DMONGOC_COMPILATION"
311
- dnl TODO: MONGOCRYPT-219 makes the -std argument obsolete
312
- PHP_MONGODB_LIBMONGOCRYPT_CFLAGS="-DKMS_MSG_STATIC -DMLIB_USER -std=gnu99"
318
+ PHP_MONGODB_LIBMONGOCRYPT_CFLAGS="-DKMS_MSG_STATIC -DMLIB_USER"
313
319
PHP_MONGODB_ZLIB_CFLAGS=""
314
320
315
321
dnl M4 doesn't know if we're building statically or as a shared module, so
@@ -537,6 +543,7 @@ if test "$PHP_MONGODB" != "no"; then
537
543
mongodb was configured with the following options:
538
544
539
545
Build configuration:
546
+ CC : $CC
540
547
CFLAGS : $CFLAGS
541
548
Extra CFLAGS : $STD_CFLAGS $EXTRA_CFLAGS
542
549
Developers flags (slow) : $MAINTAINER_CFLAGS
Original file line number Diff line number Diff line change 11
11
AC_PROG_CC
12
12
AC_PROG_CXX
13
13
14
+ dnl AC_PROG_CC_C99 is previously called in config.m4, but AC_PROG_CC resets CC
15
+ dnl so call it once more to ensure C99 remains enabled
16
+ AC_PROG_CC_C99
17
+
14
18
# Check that an appropriate C compiler is available.
15
19
c_compiler="unknown"
16
20
AC_LANG_PUSH ( [ C] )
You can’t perform that action at this time.
0 commit comments