@@ -12,6 +12,20 @@ PHP_ARG_WITH([openssl-dir],
1212 [ auto] ,
1313 [ no] )
1414
15+ AS_IF ( [ test "$PHP_MONGODB_SSL" = "darwin" -o \( "$PHP_MONGODB_SSL" = "auto" -a "$os_darwin" = "yes" \)] ,[
16+ if test "$os_darwin" = "no"; then
17+ AC_MSG_ERROR ( [ Darwin SSL is only supported on macOS] )
18+ fi
19+ dnl PHP_FRAMEWORKS is only used for SAPI builds, so use MONGODB_SHARED_LIBADD for shared builds
20+ if test "$ext_shared" = "yes"; then
21+ MONGODB_SHARED_LIBADD="-framework Security -framework CoreFoundation $MONGODB_SHARED_LIBADD"
22+ else
23+ PHP_ADD_FRAMEWORK([ Security] )
24+ PHP_ADD_FRAMEWORK([ CoreFoundation] )
25+ fi
26+ PHP_MONGODB_SSL="darwin"
27+ ] )
28+
1529AS_IF ( [ test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "auto"] ,[
1630 found_openssl="no"
1731
@@ -129,20 +143,6 @@ AS_IF([test "$PHP_MONGODB_SSL" = "libressl" -o "$PHP_MONGODB_SSL" = "auto"],[
129143 fi
130144] )
131145
132- AS_IF ( [ test "$PHP_MONGODB_SSL" = "darwin" -o \( "$PHP_MONGODB_SSL" = "auto" -a "$os_darwin" = "yes" \)] ,[
133- if test "$os_darwin" = "no"; then
134- AC_MSG_ERROR ( [ Darwin SSL is only supported on macOS] )
135- fi
136- dnl PHP_FRAMEWORKS is only used for SAPI builds, so use MONGODB_SHARED_LIBADD for shared builds
137- if test "$ext_shared" = "yes"; then
138- MONGODB_SHARED_LIBADD="-framework Security -framework CoreFoundation $MONGODB_SHARED_LIBADD"
139- else
140- PHP_ADD_FRAMEWORK([ Security] )
141- PHP_ADD_FRAMEWORK([ CoreFoundation] )
142- fi
143- PHP_MONGODB_SSL="darwin"
144- ] )
145-
146146AS_IF ( [ test "$PHP_MONGODB_SSL" = "auto"] ,[
147147 PHP_MONGODB_SSL="no"
148148] )
0 commit comments