@@ -6,6 +6,23 @@ PHP_ARG_WITH(openssl-dir, OpenSSL dir for mongodb,
66PHP_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+
926dnl borrowed from PHP acinclude.m4
1027AC_DEFUN ( [ PHP_BSON_BIGENDIAN] ,
1128[ AC_CACHE_CHECK ( [ whether byte ordering is bigendian] , ac_cv_c_bigendian_php ,
@@ -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'" )
626640fi
627641
628642dnl : vim: et sw=2
0 commit comments