@@ -6,6 +6,23 @@ PHP_ARG_WITH(openssl-dir, OpenSSL dir for mongodb,
6
6
PHP_ARG_WITH(system-ciphers, whether to use system default cipher list instead of hardcoded value,
7
7
[ --with-system-ciphers OPENSSL: Use system default cipher list instead of hardcoded value] , no, no)
8
8
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
+
9
26
dnl borrowed from PHP acinclude.m4
10
27
AC_DEFUN ( [ PHP_BSON_BIGENDIAN] ,
11
28
[ AC_CACHE_CHECK ( [ whether byte ordering is bigendian] , ac_cv_c_bigendian_php ,
@@ -620,9 +637,6 @@ Please submit bugreports at:
620
637
https://jira.mongodb.org/browse/PHPC
621
638
622
639
"] )
623
-
624
- AC_SUBST ( MONGOC_USER_SET_CFLAGS , "'$CFLAGS'" )
625
- AC_SUBST ( MONGOC_USER_SET_LDFLAGS , "'$LDFLAGS'" )
626
640
fi
627
641
628
642
dnl : vim: et sw=2
0 commit comments