Skip to content

Commit bbd15c1

Browse files
committed
CDRIVER-1912 update installation instructions
1 parent 844d288 commit bbd15c1

File tree

4 files changed

+42
-88
lines changed

4 files changed

+42
-88
lines changed

README.rst

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -83,63 +83,8 @@ MongoDB project, please report it according to the `instructions here
8383
<http://docs.mongodb.org/manual/tutorial/create-a-vulnerability-report>`_.
8484

8585

86-
Building the Driver from Source
87-
===============================
86+
Installation
87+
============
8888

8989
Detailed installation instructions are in the manual:
9090
http://mongoc.org/libmongoc/current/installing.html
91-
92-
From a tarball
93-
--------------
94-
95-
Download the latest release from `the release page <https://github.com/mongodb/mongo-c-driver/releases>`_, then::
96-
97-
$ tar xzf mongo-c-driver-$ver.tar.gz
98-
$ cd mongo-c-driver-$ver
99-
$ ./configure
100-
$ make
101-
$ sudo make install
102-
103-
To see all of the options available to you during configuration, run::
104-
105-
$ ./configure --help
106-
107-
To build on Windows Vista or newer with Visual Studio 2015, do the following::
108-
109-
cd mongo-c-driver-$ver
110-
cd src\libbson
111-
cmake -DCMAKE_INSTALL_PREFIX=C:\usr -G "Visual Studio 14 Win64" .
112-
msbuild.exe ALL_BUILD.vcxproj
113-
msbuild.exe INSTALL.vcxproj
114-
cd ..\..
115-
cmake -DCMAKE_INSTALL_PREFIX=C:\usr -DBSON_ROOT_DIR=C:\usr -G "Visual Studio 14 Win64" .
116-
msbuild.exe ALL_BUILD.vcxproj
117-
msbuild.exe INSTALL.vcxproj
118-
119-
Building From Git
120-
=================
121-
122-
You can use the following to checkout and build mongo-c-driver::
123-
124-
$ git clone https://github.com/mongodb/mongo-c-driver.git
125-
$ cd mongo-c-driver
126-
$ git checkout x.y.z # To build a particular release
127-
$ ./autogen.sh --with-libbson=bundled
128-
$ make
129-
$ sudo make install
130-
131-
Building from Git on using Visual Studio 2015::
132-
133-
git clone https://github.com/mongodb/mongo-c-driver.git
134-
cd mongo-c-driver
135-
git checkout x.y.z # for your specific release
136-
git submodule init
137-
git submodule update # libbson is a submodule
138-
cd src\libbson
139-
cmake -DCMAKE_INSTALL_PREFIX=C:\libmongoc -G "Visual Studio 14 Win64" .
140-
msbuild.exe ALL_BUILD.vcxproj
141-
msbuild.exe INSTALL.vcxproj
142-
cd ..\..
143-
cmake -DCMAKE_INSTALL_PREFIX=C:\libmongoc -DENABLE_SSL=WINDOWS -DBSON_ROOT_DIR=C:\libmongoc -G "Visual Studio 14 Win64" .
144-
msbuild.exe ALL_BUILD.vcxproj
145-
msbuild.exe INSTALL.vcxproj

build/autotools/PrintBuildConfiguration.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Build configuration:
3535
Compile with debug symbols (slow) : ${enable_debug_symbols}
3636
Enable GCC build optimization : ${enable_optimizations}
3737
Enable automatic init and cleanup : ${enable_automatic_init_and_cleanup}${automatic_init_deprecated}
38+
Enable maintainer flags : ${enable_maintainer_flags}
3839
Code coverage support : ${enable_coverage}
3940
Cross Compiling : ${enable_crosscompile}
4041
Fast counters : ${enable_rdtscp}
Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
AC_MSG_CHECKING([whether to do a debug build])
22
AC_ARG_ENABLE(debug,
3-
AC_HELP_STRING([--enable-debug], [turn on debugging [default=no]]),
3+
AC_HELP_STRING([--enable-debug], [disable optimizations @<:@default=no@:>@]),
44
[],[enable_debug="no"])
55
AC_MSG_RESULT([$enable_debug])
66

77
AC_MSG_CHECKING([whether to enable tracing])
88
AC_ARG_ENABLE(tracing,
9-
AC_HELP_STRING([--enable-tracing], [turn on tracing [default=no]]),
9+
AC_HELP_STRING([--enable-tracing], [very verbose debug output @<:@default=no@:>@]),
1010
[],[enable_tracing="no"])
1111
AC_MSG_RESULT([$enable_tracing])
1212

1313
AC_MSG_CHECKING([whether to automatic init and cleanup])
1414
AC_ARG_ENABLE(automatic-init-and-cleanup,
15-
AC_HELP_STRING([--enable-automatic-init-and-cleanup], [turn on automatic mongoc_init() and mongoc_cleanup() [default=yes]]),
15+
AC_HELP_STRING([--enable-automatic-init-and-cleanup],
16+
[call mongoc_init() and mongoc_cleanup() automatically - DEPRECATED @<:@default=yes@:>@]),
1617
[],[enable_automatic_init_and_cleanup="yes"])
1718
AC_MSG_RESULT([$enable_automatic_init_and_cleanup])
1819

1920
AC_MSG_CHECKING([whether to enable optimized builds])
2021
AC_ARG_ENABLE(optimizations,
21-
AC_HELP_STRING([--enable-optimizations], [turn on build-time optimizations [default=yes]]),
22+
AC_HELP_STRING([--enable-optimizations], [turn on build-time optimizations @<:@default=yes@:>@]),
2223
[enable_optimizations=$enableval],
2324
[
2425
if test "$enable_debug" = "yes"; then
@@ -31,25 +32,26 @@ AC_MSG_RESULT([$enable_optimizations])
3132

3233
AC_MSG_CHECKING([whether to enable shared memory performance counters])
3334
AC_ARG_ENABLE(shm_counters,
34-
AC_HELP_STRING([--enable-shm-counters], [turn on shared memory performance counters [default=yes]]),
35+
AC_HELP_STRING([--enable-shm-counters], [turn on shared memory performance counters @<:@default=yes@:>@]),
3536
[],[enable_shm_counters="yes"])
3637
AC_MSG_RESULT([$enable_shm_counters])
3738

3839
AC_MSG_CHECKING([whether to enable code coverage support])
3940
AC_ARG_ENABLE(coverage,
40-
AC_HELP_STRING([--enable-coverage], [enable code coverage support [default=no]]),
41+
AC_HELP_STRING([--enable-coverage], [enable code coverage support @<:@default=no@:>@]),
4142
[],
4243
[enable_coverage="no"])
4344
AC_MSG_RESULT([$enable_coverage])
4445

4546
AC_MSG_CHECKING([whether to enable debug symbols])
4647
AC_ARG_ENABLE(debug_symbols,
47-
AC_HELP_STRING([--enable-debug-symbols=yes|no|min|full], [enable debug symbols default=no, default=yes for debug builds]),
48+
AC_HELP_STRING([--enable-debug-symbols=yes|no|min],
49+
[enable debug symbols @<:@default=yes for debug builds, otherwise no@:>@]),
4850
[
4951
case "$enable_debug_symbols" in
5052
yes) enable_debug_symbols="full" ;;
5153
no|min|full) ;;
52-
*) AC_MSG_ERROR([Invalid debug symbols option: must be yes, no, min or full.]) ;;
54+
*) AC_MSG_ERROR([Invalid debug symbols option: must be yes, no, or min.]) ;;
5355
esac
5456
],
5557
[
@@ -63,17 +65,20 @@ AC_MSG_RESULT([$enable_debug_symbols])
6365

6466
AC_ARG_ENABLE([rdtscp],
6567
[AS_HELP_STRING([--enable-rdtscp=@<:@no/yes@:>@],
66-
[Use rdtscp for per-cpu counters @<:@default=no@:>@])],
68+
[fast performance counters on Intel using the RDTSCP instruction @<:@default=no@:>@])],
6769
[],
6870
[enable_rdtscp=no])
6971

7072
# use strict compiler flags only on development releases
71-
m4_define([maintainer_flags_default], [m4_ifset([MONGOC_PRERELEASE_VERSION], [yes], [no])])
73+
AS_IF([test "x$MONGOC_PRERELEASE_VERSION" != "x"],
74+
[maintainer_flags_default=yes],
75+
[maintainer_flags_default=no])
76+
7277
AC_ARG_ENABLE([maintainer-flags],
7378
[AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],
74-
[Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
79+
[use strict compiler checks @<:@default=no for release builds, yes for prereleases@:>@])],
7580
[],
76-
[enable_maintainer_flags=maintainer_flags_default])
81+
enable_maintainer_flags=$maintainer_flags_default)
7782

7883
# Check if we should use the bundled (git submodule) libbson
7984
AC_ARG_WITH(libbson,
@@ -86,24 +91,24 @@ AS_IF([test "x$with_libbson" != xbundled && test "x$with_libbson" != xsystem],
8691

8792
AC_ARG_ENABLE([html-docs],
8893
[AS_HELP_STRING([--enable-html-docs=@<:@yes/no@:>@],
89-
[Build HTML documentation.])],
94+
[build HTML documentation @<:@default=no@:>@])],
9095
[],
9196
[enable_html_docs=no])
9297

9398
AC_ARG_ENABLE([man-pages],
9499
[AS_HELP_STRING([--enable-man-pages=@<:@yes/no@:>@],
95-
[Build and install man-pages.])],
100+
[build and install man pages @<:@default=no@:>@])],
96101
[],
97102
[enable_man_pages=no])
98103

99104
AC_ARG_ENABLE([examples],
100105
[AS_HELP_STRING([--enable-examples=@<:@yes/no@:>@],
101-
[Build MongoDB C Driver examples.])],
106+
[build MongoDB C Driver example programs])],
102107
[],
103108
[enable_examples=yes])
104109

105110
AC_ARG_ENABLE([tests],
106111
[AS_HELP_STRING([--enable-tests=@<:@yes/no@:>@],
107-
[Build MongoDB C Driver tests.])],
112+
[build MongoDB C Driver tests])],
108113
[],
109114
[enable_tests=yes])

doc/installing.rst

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,29 +81,32 @@ The most recent release of libmongoc is |release| and can be `downloaded here <h
8181
$ wget |release_download|
8282
$ tar xzf mongo-c-driver-|release|.tar.gz
8383
$ cd mongo-c-driver-|release|
84-
$ ./configure
85-
84+
$ ./configure --disable-automatic-init-and-cleanup
85+
86+
For a list of all configure options, run ``./configure --help``.
8687

8788
If ``configure`` completed successfully, you'll see something like the following describing your build configuration.
8889

89-
.. code-block:: none
90+
.. parsed-literal::
9091
91-
libmongoc was configured with the following options:
92+
libmongoc |release| was configured with the following options:
9293
9394
Build configuration:
94-
Enable debugging (slow) : no
95-
Compile with debug symbols (slow) : no
96-
Enable GCC build optimization : yes
97-
Code coverage support : no
98-
Cross Compiling : no
99-
Fast counters : no
100-
SASL : sasl2
101-
SSL : yes
102-
Libbson : bundled
95+
Enable debugging (slow) : no
96+
Compile with debug symbols (slow) : no
97+
Enable GCC build optimization : yes
98+
Enable automatic init and cleanup : no
99+
Code coverage support : no
100+
Cross Compiling : no
101+
Fast counters : no
102+
Shared memory performance counters : yes
103+
SASL : sasl2
104+
SSL : openssl
105+
Libbson : bundled
103106
104107
Documentation:
105-
Generate man pages : no
106-
Install man pages : no
108+
man : no
109+
HTML : no
107110
108111
mongo-c-driver contains a copy of libbson, in case your system does not already have libbson installed. The configure script will detect if libbson is not installed and use the bundled libbson.
109112

0 commit comments

Comments
 (0)