build: Changing default to **not use** C++11 feature and **use** boost libraries, unless specifically instructed by ./configure options
refs #1126 (http://redmine.named-data.net/issues/1126)
Change-Id: Ic80bea8c37a63e58ea7ed46232e91b10ffc7df4e
diff --git a/INSTALL b/INSTALL
index ea9d8b0..3caf65b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,9 +6,16 @@
(These are prerequisites to build NDN-CPP. To do development of NDN-CPP code and update the build system,
see Development Prerequisites.)
-Required: libcrypto
-Optional: libsqlite3 (for key storage)
-Optional: OSX Security framework (for key storage)
+Required:
+
+* libcrypto
+* libsqlite3
+* libcrypto++
+
+Optional:
+
+* boost libraries (highly recommended)
+* OSX Security framework (for key storage)
Following are the detailed steps for each platform to install the prerequisites.
@@ -19,10 +26,15 @@
* Mac OS X 10.9
Install Xcode. (Xcode on OS X 10.9 seems to already have the Command Line Tools.)
+If using macports, dependencies can be installed using the following commands:
+
+ sudo port install boost sqlite3 libcryptopp
+
* Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit)
In a terminal, enter:
-sudo apt-get install build-essential
-sudo apt-get install libssl-dev
+
+ sudo apt-get install build-essential
+ sudo apt-get install libboost-all-dev libssl-dev libsqlite3-dev libcrypto++-dev
* Windows Cygwin
Cygwin is tested on Windows 7 64-bit with the "Devel" packages selected to install at the top level of the
@@ -34,12 +46,13 @@
To build in a terminal, change directory to the NDN-CPP root. Enter:
-./configure
-make
-make install
+ ./configure
+ make
+ make install
To make documentation, enter:
-make doxygen-doc
+
+ make doxygen-doc
Files
-----
diff --git a/autogen.sh b/autogen.sh
index 8d8af2b..2e9954b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,4 +3,3 @@
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
autoreconf --force --install --verbose "$srcdir"
-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
index c7c686c..a3a8be4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,16 +54,20 @@
AC_CHECK_FUNCS([gettimeofday], :, AC_MSG_ERROR([*** gettimeofday not found. processEvents requires it. Check 'config.log' for more details.]))
AC_C_INLINE
-# Unless --without-c++11 specified, try to enable C++11
+# Unless --with-c++11 specified, do not enable C++11 features
AX_CXX_COMPILE_STDCXX_11(, optional)
AC_ARG_WITH([system-boost],
AS_HELP_STRING(
- [--with-system-boost],
- [use system-installed boost libraries. If not specified, use the bundled version when necessary.]
+ [--without-system-boost],
+ [do not attempt to use system-installed boost libraries and use the bundled version (ndnboost) when necessary.]
),
- [want_system_boost="yes"],
- [want_system_boost="no"]
+ [
+ if test "$withval" = "no"; then
+ want_system_boost="no"
+ fi
+ ],
+ [want_system_boost="yes"]
)
AX_BOOST_BASE([1.42.0],
@@ -94,6 +98,7 @@
]
)
+# @todo: These checks are not really optional
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AX_BOOST_UNIT_TEST_FRAMEWORK
diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4
index 40c94b6..2d40ac1 100644
--- a/m4/ax_cxx_compile_stdcxx_11.m4
+++ b/m4/ax_cxx_compile_stdcxx_11.m4
@@ -58,14 +58,14 @@
AC_ARG_WITH([c++11],
AS_HELP_STRING(
[--with-c++11=@<:@ARG@:>@],
- [use C++11 when available @<:@default=yes@:>@]
+ [use C++11 when available @<:@default=no@:>@]
),
[
- if test "$withval" = "no"; then
- WANT_CXX11="no"
+ if test "$withval" = "yes"; then
+ WANT_CXX11="yes"
fi
],
- [WANT_CXX11="yes"]
+ [WANT_CXX11="no"]
)
if test "x$WANT_CXX11" = "xyes"; then