File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,11 @@ cmake_flags=(
103103 -DENABLE_UNINSTALL=ON
104104)
105105
106+ # System-installed libmongoc must not prevent fetch-and-build of libmongoc.
107+ if [[ -z " $( find " ${mongoc_prefix:? } " -name ' bson-config.h' ) " ]]; then
108+ cmake_flags+=(" -DCMAKE_DISABLE_FIND_PACKAGE_mongoc-1.0=ON" )
109+ fi
110+
106111_RUN_DISTCHECK=" "
107112case " ${OSTYPE:? } " in
108113cygwin)
@@ -271,7 +276,7 @@ if [[ -n "$(find "${mongoc_prefix:?}" -name 'bson-config.h')" ]]; then
271276 exit 1
272277 }
273278 fi
274- else
279+ elif [[ -n " $( find install -name ' bson-config.h ' ) " ]] ; then
275280 if [[ " ${BSON_EXTRA_ALIGNMENT:- } " == " 1" ]]; then
276281 grep -R " #define BSON_EXTRA_ALIGN 1" install || {
277282 echo " BSON_EXTRA_ALIGN is not 1 despite BSON_EXTRA_ALIGNMENT=1" 1>&2
283288 exit 1
284289 }
285290 fi
291+ else
292+ echo " unexpectedly compiled using a system libmongoc library" 1>&2
293+ exit 1
286294fi
You can’t perform that action at this time.
0 commit comments