Ancient versions of gcc, such as the gcc 4.1.2 in RHEL 5.5, don't
support some -W flags that newer versions do. Fix up configure.ac
and Makefile.am to use them if you have them.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Added new configure flag --with-nss that enables this. NSS is also
automatically used if it is available and CryptoPP is not; use
--without-nss to explicitly forbid this.
No change on rgw crypto yet; rgw won't build without CryptoPP for now.
NSS initialization is in a static constructor for now. All it does is
set some values on in-memory data structures, so as long as no (other)
static constructor tries to use it, everything should just work. While
this could be moved to common_init, there are several other context
initialization steps with NSS, and a later refactoring to share the
results of these can just include NSS init as its first operation, at
practically no cost.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
Use new boost::spirit header files where available, to eliminate the
annoying compiler warning on newer systems.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
We already check for libcrypto++ using PKG_CHECK_MODULES; we don't need
to fish for header files.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
This way when we're confident it works right, we can
remove the set<Context*> and just rely on ref counting.
Further optimizations would include using a spinlock
rather than a mutex, or possibly even just switching
sub_[created|existing]_count to be atomics.
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
Use ``make check`` to run the tests.
The src/gtest directory comes from ``svn export
http://googletest.googlecode.com/svn/tags/release-1.5.0 src/gtest``
and running "git add -f src/gtest".
gtest is licensed under the New BSD license, see src/gtest/COPYING.
For more on Google Test, see http://code.google.com/p/googletest/
Changed autogen.sh regenerate gtest automake files too. Make sure to
run ``./autogen.sh && ./configure`` after merging this commit, or
incremental builds may fail. The automake integration is inspired
heavily by the protobuf project, and may still be problematic.
Make git ignore files generated by gtest compilation.
Currently putting in just one new-style unit test, refactoring old
tests to fit will come in separate commits.
Note: if you are starting daemons, listening on TCP ports, using
multiple machines, mounting filesystems, etc, it's not a unit test
and does not belong in this setup. A framework for system/integration
tests will be provided later.