Separate thrift into libthrift and libthriftnb

Summary: libthriftnb is the one that requires libevent. It was really annoying that you always had to put -levent in your link step to build thrift programs when youa re not using any of the c++ nonblocking stuff. This way, if you're using nonblocking you can do that, but the normal case is easier to link.

Reviewed By: makefile


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664951 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index 932e802..20abe52 100644
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -1,4 +1,4 @@
-lib_LTLIBRARIES = libthrift.la
+lib_LTLIBRARIES = libthrift.la libthriftnb.la
 
 common_cxxflags = -Wall -Isrc $(BOOST_CPPFLAGS) $(EVENT_CPPFLAGS)
 common_ldflags = -Wall $(BOOST_LDFLAGS) $(EVENT_LDFLAGS)
@@ -17,15 +17,18 @@
                     src/transport/TServerSocket.cpp \
                     src/transport/TTransportUtils.cpp \
                     src/server/TSimpleServer.cpp \
-                    src/server/TThreadPoolServer.cpp \
-                    src/server/TNonblockingServer.cpp
+                    src/server/TThreadPoolServer.cpp
+
+libthriftnb_sources = src/server/TNonblockingServer.cpp
 
 libthrift_la_SOURCES = $(libthrift_sources)
+libthriftnb_la_SOURCES = $(libthriftnb_sources)
 
 libthrift_cxxflags =  $(common_cxxflags)
 libthrift_ldflags =  $(common_ldflags)
 
 libthrift_la_CXXFLAGS =  $(libthrift_cxxflags)
+libthriftnb_la_CXXFLAGS =  $(libthrift_cxxflags)
 
 include_thriftdir = $(includedir)/thrift
 include_thrift_HEADERS = \