THRIFT-1552 Include paths for c/c++ should be prefixed with 'thrift/'

To ensure there are no include path collisions the C and C++ header
include paths should include 'thrift' as the root leaf. This will
prevent having to place /usr/include/thrift into the compilers include
header search path, which might otherwise result in the compiler
accidentally picking up headers that it shouldn't.

e.g. #include <foo/bar.h> should be #include <thrift/foo/bar.h>

Change-Id: I48f2b0f549bda0fc81e85506ac857adc800b98a1

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325674 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index 188b371..1eec8ab 100644
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -48,63 +48,63 @@
 endif
 
 AM_CXXFLAGS = -Wall
-AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(srcdir)/src
+AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(srcdir)/src -I$(srcdir)/src/thrift
 AM_LDFLAGS = $(BOOST_LDFLAGS)
 
 # Define the source files for the module
 
-libthrift_la_SOURCES = src/Thrift.cpp \
-                       src/TApplicationException.cpp \
-                       src/VirtualProfiling.cpp \
-                       src/concurrency/ThreadManager.cpp \
-                       src/concurrency/TimerManager.cpp \
-                       src/concurrency/Util.cpp \
-                       src/protocol/TDebugProtocol.cpp \
-                       src/protocol/TDenseProtocol.cpp \
-                       src/protocol/TJSONProtocol.cpp \
-                       src/protocol/TBase64Utils.cpp \
-                       src/transport/TTransportException.cpp \
-                       src/transport/TFDTransport.cpp \
-                       src/transport/TFileTransport.cpp \
-                       src/transport/TSimpleFileTransport.cpp \
-                       src/transport/THttpTransport.cpp \
-                       src/transport/THttpClient.cpp \
-                       src/transport/THttpServer.cpp \
-                       src/transport/TSocket.cpp \
-                       src/transport/TSSLSocket.cpp \
-                       src/transport/TSocketPool.cpp \
-                       src/transport/TServerSocket.cpp \
-                       src/transport/TSSLServerSocket.cpp \
-                       src/transport/TTransportUtils.cpp \
-                       src/transport/TBufferTransports.cpp \
-                       src/server/TServer.cpp \
-                       src/server/TSimpleServer.cpp \
-                       src/server/TThreadPoolServer.cpp \
-                       src/server/TThreadedServer.cpp \
-                       src/async/TAsyncChannel.cpp \
-                       src/processor/PeekProcessor.cpp
+libthrift_la_SOURCES = src/thrift/Thrift.cpp \
+                       src/thrift/TApplicationException.cpp \
+                       src/thrift/VirtualProfiling.cpp \
+                       src/thrift/concurrency/ThreadManager.cpp \
+                       src/thrift/concurrency/TimerManager.cpp \
+                       src/thrift/concurrency/Util.cpp \
+                       src/thrift/protocol/TDebugProtocol.cpp \
+                       src/thrift/protocol/TDenseProtocol.cpp \
+                       src/thrift/protocol/TJSONProtocol.cpp \
+                       src/thrift/protocol/TBase64Utils.cpp \
+                       src/thrift/transport/TTransportException.cpp \
+                       src/thrift/transport/TFDTransport.cpp \
+                       src/thrift/transport/TFileTransport.cpp \
+                       src/thrift/transport/TSimpleFileTransport.cpp \
+                       src/thrift/transport/THttpTransport.cpp \
+                       src/thrift/transport/THttpClient.cpp \
+                       src/thrift/transport/THttpServer.cpp \
+                       src/thrift/transport/TSocket.cpp \
+                       src/thrift/transport/TSSLSocket.cpp \
+                       src/thrift/transport/TSocketPool.cpp \
+                       src/thrift/transport/TServerSocket.cpp \
+                       src/thrift/transport/TSSLServerSocket.cpp \
+                       src/thrift/transport/TTransportUtils.cpp \
+                       src/thrift/transport/TBufferTransports.cpp \
+                       src/thrift/server/TServer.cpp \
+                       src/thrift/server/TSimpleServer.cpp \
+                       src/thrift/server/TThreadPoolServer.cpp \
+                       src/thrift/server/TThreadedServer.cpp \
+                       src/thrift/async/TAsyncChannel.cpp \
+                       src/thrift/processor/PeekProcessor.cpp
 
 if WITH_BOOSTTHREADS
-libthrift_la_SOURCES += src/concurrency/BoostThreadFactory.cpp \
-                        src/concurrency/BoostMonitor.cpp \
-                        src/concurrency/BoostMutex.cpp
+libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \
+                        src/thrift/concurrency/BoostMonitor.cpp \
+                        src/thrift/concurrency/BoostMutex.cpp
 else
-libthrift_la_SOURCES += src/concurrency/Mutex.cpp \
-                        src/concurrency/Monitor.cpp \
-                        src/concurrency/PosixThreadFactory.cpp
+libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
+                        src/thrift/concurrency/Monitor.cpp \
+                        src/thrift/concurrency/PosixThreadFactory.cpp
 endif
 
-libthriftnb_la_SOURCES = src/server/TNonblockingServer.cpp \
-                         src/async/TAsyncProtocolProcessor.cpp \
-                         src/async/TEvhttpServer.cpp \
-                         src/async/TEvhttpClientChannel.cpp 
+libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
+                         src/thrift/async/TAsyncProtocolProcessor.cpp \
+                         src/thrift/async/TEvhttpServer.cpp \
+                         src/thrift/async/TEvhttpClientChannel.cpp 
 
-libthriftz_la_SOURCES = src/transport/TZlibTransport.cpp
+libthriftz_la_SOURCES = src/thrift/transport/TZlibTransport.cpp
 
 libthriftqt_la_MOC = src/qt/moc_TQTcpServer.cpp
 libthriftqt_la_SOURCES = $(libthriftqt_la_MOC) \
-                         src/qt/TQIODeviceTransport.cpp \
-                         src/qt/TQTcpServer.cpp
+                         src/thrift/qt/TQIODeviceTransport.cpp \
+                         src/thrift/qt/TQTcpServer.cpp
 CLEANFILES = $(libthriftqt_la_MOC)
 
 # Flags for the various libraries
@@ -121,100 +121,100 @@
 include_thriftdir = $(includedir)/thrift
 include_thrift_HEADERS = \
                          $(top_builddir)/config.h \
-                         src/TDispatchProcessor.h \
-                         src/Thrift.h \
-                         src/TReflectionLocal.h \
-                         src/TProcessor.h \
-                         src/TApplicationException.h \
-                         src/TLogging.h
+                         src/thrift/TDispatchProcessor.h \
+                         src/thrift/Thrift.h \
+                         src/thrift/TReflectionLocal.h \
+                         src/thrift/TProcessor.h \
+                         src/thrift/TApplicationException.h \
+                         src/thrift/TLogging.h
 
 include_concurrencydir = $(include_thriftdir)/concurrency
 include_concurrency_HEADERS = \
-                         src/concurrency/BoostThreadFactory.h \
-                         src/concurrency/Exception.h \
-                         src/concurrency/Mutex.h \
-                         src/concurrency/Monitor.h \
-                         src/concurrency/PlatformThreadFactory.h \
-                         src/concurrency/PosixThreadFactory.h \
-                         src/concurrency/Thread.h \
-                         src/concurrency/ThreadManager.h \
-                         src/concurrency/TimerManager.h \
-                         src/concurrency/FunctionRunner.h \
-                         src/concurrency/Util.h
+                         src/thrift/concurrency/BoostThreadFactory.h \
+                         src/thrift/concurrency/Exception.h \
+                         src/thrift/concurrency/Mutex.h \
+                         src/thrift/concurrency/Monitor.h \
+                         src/thrift/concurrency/PlatformThreadFactory.h \
+                         src/thrift/concurrency/PosixThreadFactory.h \
+                         src/thrift/concurrency/Thread.h \
+                         src/thrift/concurrency/ThreadManager.h \
+                         src/thrift/concurrency/TimerManager.h \
+                         src/thrift/concurrency/FunctionRunner.h \
+                         src/thrift/concurrency/Util.h
 
 include_protocoldir = $(include_thriftdir)/protocol
 include_protocol_HEADERS = \
-                         src/protocol/TBinaryProtocol.h \
-                         src/protocol/TBinaryProtocol.tcc \
-                         src/protocol/TCompactProtocol.h \
-                         src/protocol/TCompactProtocol.tcc \
-                         src/protocol/TDenseProtocol.h \
-                         src/protocol/TDebugProtocol.h \
-                         src/protocol/TBase64Utils.h \
-                         src/protocol/TJSONProtocol.h \
-                         src/protocol/TProtocolTap.h \
-                         src/protocol/TProtocolException.h \
-                         src/protocol/TVirtualProtocol.h \
-                         src/protocol/TProtocol.h
+                         src/thrift/protocol/TBinaryProtocol.h \
+                         src/thrift/protocol/TBinaryProtocol.tcc \
+                         src/thrift/protocol/TCompactProtocol.h \
+                         src/thrift/protocol/TCompactProtocol.tcc \
+                         src/thrift/protocol/TDenseProtocol.h \
+                         src/thrift/protocol/TDebugProtocol.h \
+                         src/thrift/protocol/TBase64Utils.h \
+                         src/thrift/protocol/TJSONProtocol.h \
+                         src/thrift/protocol/TProtocolTap.h \
+                         src/thrift/protocol/TProtocolException.h \
+                         src/thrift/protocol/TVirtualProtocol.h \
+                         src/thrift/protocol/TProtocol.h
 
 include_transportdir = $(include_thriftdir)/transport
 include_transport_HEADERS = \
-                         src/transport/TFDTransport.h \
-                         src/transport/TFileTransport.h \
-                         src/transport/TSimpleFileTransport.h \
-                         src/transport/TServerSocket.h \
-                         src/transport/TSSLServerSocket.h \
-                         src/transport/TServerTransport.h \
-                         src/transport/THttpTransport.h \
-                         src/transport/THttpClient.h \
-                         src/transport/THttpServer.h \
-                         src/transport/TSocket.h \
-                         src/transport/TSSLSocket.h \
-                         src/transport/TSocketPool.h \
-                         src/transport/TVirtualTransport.h \
-                         src/transport/TTransport.h \
-                         src/transport/TTransportException.h \
-                         src/transport/TTransportUtils.h \
-                         src/transport/TBufferTransports.h \
-                         src/transport/TShortReadTransport.h \
-                         src/transport/TZlibTransport.h
+                         src/thrift/transport/TFDTransport.h \
+                         src/thrift/transport/TFileTransport.h \
+                         src/thrift/transport/TSimpleFileTransport.h \
+                         src/thrift/transport/TServerSocket.h \
+                         src/thrift/transport/TSSLServerSocket.h \
+                         src/thrift/transport/TServerTransport.h \
+                         src/thrift/transport/THttpTransport.h \
+                         src/thrift/transport/THttpClient.h \
+                         src/thrift/transport/THttpServer.h \
+                         src/thrift/transport/TSocket.h \
+                         src/thrift/transport/TSSLSocket.h \
+                         src/thrift/transport/TSocketPool.h \
+                         src/thrift/transport/TVirtualTransport.h \
+                         src/thrift/transport/TTransport.h \
+                         src/thrift/transport/TTransportException.h \
+                         src/thrift/transport/TTransportUtils.h \
+                         src/thrift/transport/TBufferTransports.h \
+                         src/thrift/transport/TShortReadTransport.h \
+                         src/thrift/transport/TZlibTransport.h
 
 include_serverdir = $(include_thriftdir)/server
 include_server_HEADERS = \
-                         src/server/TServer.h \
-                         src/server/TSimpleServer.h \
-                         src/server/TThreadPoolServer.h \
-                         src/server/TThreadedServer.h \
-                         src/server/TNonblockingServer.h
+                         src/thrift/server/TServer.h \
+                         src/thrift/server/TSimpleServer.h \
+                         src/thrift/server/TThreadPoolServer.h \
+                         src/thrift/server/TThreadedServer.h \
+                         src/thrift/server/TNonblockingServer.h
 
 include_processordir = $(include_thriftdir)/processor
 include_processor_HEADERS = \
-                         src/processor/PeekProcessor.h \
-                         src/processor/StatsProcessor.h
+                         src/thrift/processor/PeekProcessor.h \
+                         src/thrift/processor/StatsProcessor.h
 
 include_asyncdir = $(include_thriftdir)/async
 include_async_HEADERS = \
-                     src/async/TAsyncChannel.h \
-                     src/async/TAsyncDispatchProcessor.h \
-                     src/async/TAsyncProcessor.h \
-                     src/async/TAsyncBufferProcessor.h \
-                     src/async/TAsyncProtocolProcessor.h \
-                     src/async/TEvhttpClientChannel.h \
-                     src/async/TEvhttpServer.h
+                     src/thrift/async/TAsyncChannel.h \
+                     src/thrift/async/TAsyncDispatchProcessor.h \
+                     src/thrift/async/TAsyncProcessor.h \
+                     src/thrift/async/TAsyncBufferProcessor.h \
+                     src/thrift/async/TAsyncProtocolProcessor.h \
+                     src/thrift/async/TEvhttpClientChannel.h \
+                     src/thrift/async/TEvhttpServer.h
 
 include_qtdir = $(include_thriftdir)/qt
 include_qt_HEADERS = \
-                  src/qt/TQIODeviceTransport.h \
-                  src/qt/TQTcpServer.h
+                  src/thrift/qt/TQIODeviceTransport.h \
+                  src/thrift/qt/TQTcpServer.h
 
 
 noinst_PROGRAMS = concurrency_test
 
 concurrency_test_SOURCES = \
-                           src/concurrency/test/Tests.cpp \
-                           src/concurrency/test/ThreadFactoryTests.h \
-                           src/concurrency/test/ThreadManagerTests.h \
-                           src/concurrency/test/TimerManagerTests.h
+                           src/thrift/concurrency/test/Tests.cpp \
+                           src/thrift/concurrency/test/ThreadFactoryTests.h \
+                           src/thrift/concurrency/test/ThreadManagerTests.h \
+                           src/thrift/concurrency/test/TimerManagerTests.h
 
 concurrency_test_LDADD = libthrift.la