Skip to content

Commit 9d42f3c

Browse files
committed
Merge pull request #197
2 parents da1f707 + bd96692 commit 9d42f3c

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

config.m4

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ MONGOC_SOURCES_SASL=mongoc-sasl.c
301301
PHP_ADD_SOURCES_X(PHP_EXT_DIR(mongodb), $MONGODB_CONTRIB, [$STD_CFLAGS $MAINTAINER_CFLAGS $COVERAGE_CFLAGS], shared_objects_mongodb, yes)
302302
fi
303303

304-
PHP_ARG_WITH(libbson, Use system libbson,
304+
PHP_ARG_WITH(libbson, whether to use system libbson,
305305
[ --with-libbson Use system libbson], no, no)
306306

307307
if test "$PHP_LIBBSON" != "no"; then
@@ -331,7 +331,7 @@ dnl libmongoc stuff {{{
331331
AC_MSG_CHECKING(configuring libmongoc)
332332
AC_MSG_RESULT(...)
333333

334-
PHP_ARG_WITH(libmongoc, Use system libmongoc,
334+
PHP_ARG_WITH(libmongoc, whether to use system libmongoc,
335335
[ --with-libmongoc Use system libmongoc], no, no)
336336

337337
AC_DEFINE(HAVE_MONGOC, 1, [Kinda useless extension without it..])
@@ -370,7 +370,7 @@ PHP_ARG_WITH(libmongoc, Use system libmongoc,
370370
fi
371371

372372

373-
PHP_ARG_WITH(pcre-dir, pcre-dir install prefix
373+
PHP_ARG_WITH(pcre-dir, for pcre-dir install prefix,
374374
[ --with-pcre-dir[=DIR] mongodb: pcre install prefix], auto, yes)
375375

376376
if test "$PHP_PCRE_DIR" != "no"; then
@@ -390,8 +390,8 @@ if test "$PHP_PCRE_DIR" != "no"; then
390390
fi
391391
fi
392392

393-
PHP_ARG_WITH(mongodb-sasl, Build with Cyrus SASL support,
394-
[ --with-mongodb-sasl[=DIR] mongodb: Include Cyrus SASL support], auto, yes)
393+
PHP_ARG_WITH(mongodb-sasl, for Cyrus SASL support,
394+
[ --with-mongodb-sasl[=DIR] mongodb: Include Cyrus SASL support], auto, no)
395395

396396
if test "$PHP_MONGODB_SASL" != "no"; then
397397
AC_MSG_CHECKING(for SASL)
@@ -405,31 +405,35 @@ if test "$PHP_MONGODB_SASL" != "no"; then
405405

406406
if test -z "$MONGODB_SASL_DIR"; then
407407
AC_MSG_RESULT(not found)
408-
if test "$MONGODB_SASL" != "auto"; then
408+
if test "$PHP_MONGODB_SASL" != "auto"; then
409409
AC_MSG_ERROR([sasl.h not found!])
410+
else
411+
AC_SUBST(MONGOC_ENABLE_SASL, 0)
412+
AC_SUBST(MONGOC_HAVE_SASL_CLIENT_DONE, 0)
410413
fi
411-
fi
414+
else
412415

413-
PHP_CHECK_LIBRARY(sasl2, sasl_version,
414-
[
415-
PHP_ADD_INCLUDE($MONGODB_SASL_DIR)
416-
PHP_ADD_LIBRARY_WITH_PATH(sasl2, $MONGODB_SASL_DIR/$PHP_LIBDIR, MONGODB_SHARED_LIBADD)
417-
MONGOC_ENABLE_SASL=1
418-
AC_SUBST(MONGOC_ENABLE_SASL)
419-
], [
420-
if test "$MONGODB_SASL" != "auto"; then
421-
AC_MSG_ERROR([MONGO SASL check failed. Please check config.log for more information.])
422-
fi
423-
], [
424-
-L$MONGODB_SASL_DIR/$PHP_LIBDIR
425-
])
416+
PHP_CHECK_LIBRARY(sasl2, sasl_version,
417+
[
418+
PHP_ADD_INCLUDE($MONGODB_SASL_DIR)
419+
PHP_ADD_LIBRARY_WITH_PATH(sasl2, $MONGODB_SASL_DIR/$PHP_LIBDIR, MONGODB_SHARED_LIBADD)
420+
MONGOC_ENABLE_SASL=1
421+
AC_SUBST(MONGOC_ENABLE_SASL)
422+
], [
423+
if test "$MONGODB_SASL" != "auto"; then
424+
AC_MSG_ERROR([MONGO SASL check failed. Please check config.log for more information.])
425+
fi
426+
], [
427+
-L$MONGODB_SASL_DIR/$PHP_LIBDIR
428+
])
426429

427-
PHP_CHECK_LIBRARY(sasl2, sasl_client_done,
428-
[
429-
AC_SUBST(MONGOC_HAVE_SASL_CLIENT_DONE, 1)
430-
], [
431-
AC_SUBST(MONGOC_HAVE_SASL_CLIENT_DONE, 0)
432-
])
430+
PHP_CHECK_LIBRARY(sasl2, sasl_client_done,
431+
[
432+
AC_SUBST(MONGOC_HAVE_SASL_CLIENT_DONE, 1)
433+
], [
434+
AC_SUBST(MONGOC_HAVE_SASL_CLIENT_DONE, 0)
435+
])
436+
fi
433437
else
434438
AC_SUBST(MONGOC_ENABLE_SASL, 0)
435439
AC_SUBST(MONGOC_HAVE_SASL_CLIENT_DONE, 0)

0 commit comments

Comments
 (0)