Skip to content

Commit 672f38a

Browse files
committed
Merge pull request #403
2 parents 046c161 + ec9cc32 commit 672f38a

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

config.m4

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ PHP_ARG_WITH(openssl-dir, OpenSSL dir for mongodb,
66
PHP_ARG_WITH(system-ciphers, whether to use system default cipher list instead of hardcoded value,
77
[ --with-system-ciphers OPENSSL: Use system default cipher list instead of hardcoded value], no, no)
88

9+
dnl borrowed from libmongoc configure.ac
10+
# AS_VAR_COPY is available in AC 2.64 and on, but we only require 2.60.
11+
# If we're on an older version, we define it ourselves:
12+
m4_ifndef([AS_VAR_COPY],
13+
[m4_define([AS_VAR_COPY],
14+
[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])])
15+
16+
# Get "user-set cflags" here, before we've added the flags we use by default
17+
AS_VAR_COPY(MONGOC_USER_SET_CFLAGS, [CFLAGS])
18+
AC_SUBST(MONGOC_USER_SET_CFLAGS)
19+
20+
AS_VAR_COPY(MONGOC_USER_SET_LDFLAGS, [LDFLAGS])
21+
AC_SUBST(MONGOC_USER_SET_LDFLAGS)
22+
23+
AS_VAR_COPY(MONGOC_CC, [CC])
24+
AC_SUBST(MONGOC_CC)
25+
926
dnl borrowed from PHP acinclude.m4
1027
AC_DEFUN([PHP_BSON_BIGENDIAN],
1128
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
@@ -242,7 +259,6 @@ if test "$MONGODB" != "no"; then
242259
mongoc-cursor-cursorid.c \
243260
mongoc-cursor-transform.c \
244261
mongoc-database.c \
245-
mongoc-linux-distro-scanner.c \
246262
mongoc-find-and-modify.c \
247263
mongoc-host-list.c \
248264
mongoc-init.c \
@@ -252,6 +268,7 @@ if test "$MONGODB" != "no"; then
252268
mongoc-gridfs-file-list.c \
253269
mongoc-handshake.c \
254270
mongoc-index.c \
271+
mongoc-linux-distro-scanner.c \
255272
mongoc-list.c \
256273
mongoc-log.c \
257274
mongoc-matcher-op.c \
@@ -620,9 +637,6 @@ Please submit bugreports at:
620637
https://jira.mongodb.org/browse/PHPC
621638
622639
"])
623-
624-
AC_SUBST(MONGOC_USER_SET_CFLAGS, "'$CFLAGS'")
625-
AC_SUBST(MONGOC_USER_SET_LDFLAGS, "'$LDFLAGS'")
626640
fi
627641

628642
dnl: vim: et sw=2

0 commit comments

Comments
 (0)