detail: move common.hpp to 'detail'

common.hpp and config.hpp are implementation details that should be
installed to target system.

common-pch.hpp is moved to 'impl'.

This commit also adds README.md to 'detail' and 'impl'
directories to explain their semantics.

refs #4782

Change-Id: I4f3e607338b3bdccbaddaed735f6326adcc2fda0
diff --git a/ndn-cxx/detail/README.md b/ndn-cxx/detail/README.md
new file mode 100644
index 0000000..a5ffca7
--- /dev/null
+++ b/ndn-cxx/detail/README.md
@@ -0,0 +1,6 @@
+# Implementation Detail
+
+This folder contains implementation detail of ndn-cxx library.
+Declarations contained in these files are not considered public API and they can change without notice.
+
+Headers in this folder are installed to the target system.
diff --git a/ndn-cxx/common.hpp b/ndn-cxx/detail/common.hpp
similarity index 96%
rename from ndn-cxx/common.hpp
rename to ndn-cxx/detail/common.hpp
index dcac126..7fa4bcf 100644
--- a/ndn-cxx/common.hpp
+++ b/ndn-cxx/detail/common.hpp
@@ -25,10 +25,10 @@
  *           Aliases imported in this file MUST NOT be used outside of ndn-cxx.
  */
 
-#ifndef NDN_COMMON_HPP
-#define NDN_COMMON_HPP
+#ifndef NDN_DETAIL_COMMON_HPP
+#define NDN_DETAIL_COMMON_HPP
 
-#include "ndn-cxx/config.hpp"
+#include "ndn-cxx/detail/config.hpp"
 
 // ndn-cxx specific macros declared in this and other headers must have NDN_CXX_ prefix
 // to avoid conflicts with other projects that include ndn-cxx headers.
@@ -122,4 +122,4 @@
 
 #include "ndn-cxx/util/backports.hpp"
 
-#endif // NDN_COMMON_HPP
+#endif // NDN_DETAIL_COMMON_HPP
diff --git a/ndn-cxx/encoding/buffer.hpp b/ndn-cxx/encoding/buffer.hpp
index 27131c1..8f4d3db 100644
--- a/ndn-cxx/encoding/buffer.hpp
+++ b/ndn-cxx/encoding/buffer.hpp
@@ -24,7 +24,7 @@
 #ifndef NDN_ENCODING_BUFFER_HPP
 #define NDN_ENCODING_BUFFER_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include <vector>
 
diff --git a/ndn-cxx/encoding/encoding-buffer-fwd.hpp b/ndn-cxx/encoding/encoding-buffer-fwd.hpp
index 5f8a772..1222a5b 100644
--- a/ndn-cxx/encoding/encoding-buffer-fwd.hpp
+++ b/ndn-cxx/encoding/encoding-buffer-fwd.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_ENCODING_ENCODING_BUFFER_FWD_HPP
 #define NDN_ENCODING_ENCODING_BUFFER_FWD_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 namespace ndn {
 namespace encoding {
diff --git a/ndn-cxx/encoding/nfd-constants.hpp b/ndn-cxx/encoding/nfd-constants.hpp
index 2d0881f..3929ce5 100644
--- a/ndn-cxx/encoding/nfd-constants.hpp
+++ b/ndn-cxx/encoding/nfd-constants.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_ENCODING_NFD_CONSTANTS_HPP
 #define NDN_ENCODING_NFD_CONSTANTS_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 namespace ndn {
 namespace nfd {
diff --git a/ndn-cxx/encoding/tlv.hpp b/ndn-cxx/encoding/tlv.hpp
index 2c206c6..516b409 100644
--- a/ndn-cxx/encoding/tlv.hpp
+++ b/ndn-cxx/encoding/tlv.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_ENCODING_TLV_HPP
 #define NDN_ENCODING_TLV_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include <cstring>
 #include <iterator>
diff --git a/ndn-cxx/impl/README.md b/ndn-cxx/impl/README.md
new file mode 100644
index 0000000..3886c84
--- /dev/null
+++ b/ndn-cxx/impl/README.md
@@ -0,0 +1,6 @@
+# Implementation Detail
+
+This folder contains implementation detail of ndn-cxx library.
+Declarations contained in these files are not considered public API and they can change without notice.
+
+Headers in this folder are not installed to the target system.
diff --git a/ndn-cxx/common-pch.hpp b/ndn-cxx/impl/common-pch.hpp
similarity index 92%
rename from ndn-cxx/common-pch.hpp
rename to ndn-cxx/impl/common-pch.hpp
index ec7b86d..7f1ab5a 100644
--- a/ndn-cxx/common-pch.hpp
+++ b/ndn-cxx/impl/common-pch.hpp
@@ -19,13 +19,13 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-#ifndef NDN_COMMON_PCH_HPP
-#define NDN_COMMON_PCH_HPP
+#ifndef NDN_IMPL_COMMON_PCH_HPP
+#define NDN_IMPL_COMMON_PCH_HPP
 
 // If the compiler supports precompiled headers, this header should be compiled
 // and included before anything else
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 // STL headers to precompile
 #include <fstream>
@@ -48,4 +48,4 @@
 #include <boost/range/adaptors.hpp>
 #include <boost/range/algorithm/copy.hpp>
 
-#endif // NDN_COMMON_PCH_HPP
+#endif // NDN_IMPL_COMMON_PCH_HPP
diff --git a/ndn-cxx/impl/container-with-on-empty-signal.hpp b/ndn-cxx/impl/container-with-on-empty-signal.hpp
index 3bb01d6..b40b19e 100644
--- a/ndn-cxx/impl/container-with-on-empty-signal.hpp
+++ b/ndn-cxx/impl/container-with-on-empty-signal.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_IMPL_CONTAINER_WITH_ON_EMPTY_SIGNAL_HPP
 #define NDN_IMPL_CONTAINER_WITH_ON_EMPTY_SIGNAL_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/util/signal.hpp"
 
 namespace ndn {
diff --git a/ndn-cxx/lp/field.hpp b/ndn-cxx/lp/field.hpp
index 8bd46cb..ea1d4b4 100644
--- a/ndn-cxx/lp/field.hpp
+++ b/ndn-cxx/lp/field.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_CXX_LP_FIELD_HPP
 #define NDN_CXX_LP_FIELD_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/encoding/encoding-buffer.hpp"
 #include "ndn-cxx/util/concepts.hpp"
 
diff --git a/ndn-cxx/lp/sequence.hpp b/ndn-cxx/lp/sequence.hpp
index 2974bad..f6b3184 100644
--- a/ndn-cxx/lp/sequence.hpp
+++ b/ndn-cxx/lp/sequence.hpp
@@ -24,7 +24,7 @@
 #ifndef NDN_CXX_LP_SEQUENCE_HPP
 #define NDN_CXX_LP_SEQUENCE_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 namespace ndn {
 namespace lp {
diff --git a/ndn-cxx/name-component.hpp b/ndn-cxx/name-component.hpp
index 411a6ec..5b1118e 100644
--- a/ndn-cxx/name-component.hpp
+++ b/ndn-cxx/name-component.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_NAME_COMPONENT_HPP
 #define NDN_NAME_COMPONENT_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/encoding/block.hpp"
 #include "ndn-cxx/encoding/block-helpers.hpp"
 #include "ndn-cxx/util/time.hpp"
diff --git a/ndn-cxx/net/impl/link-type-helper.cpp b/ndn-cxx/net/impl/link-type-helper.cpp
index 6deb5fd..6ad4059 100644
--- a/ndn-cxx/net/impl/link-type-helper.cpp
+++ b/ndn-cxx/net/impl/link-type-helper.cpp
@@ -20,7 +20,7 @@
  */
 
 #include "ndn-cxx/net/impl/link-type-helper.hpp"
-#include "ndn-cxx/config.hpp"
+#include "ndn-cxx/detail/config.hpp"
 
 #ifdef NDN_CXX_HAVE_OSX_FRAMEWORKS
 // implemented in link-type-helper-osx.mm
diff --git a/ndn-cxx/net/impl/netlink-message.hpp b/ndn-cxx/net/impl/netlink-message.hpp
index 7af4ec3..4f0a74b 100644
--- a/ndn-cxx/net/impl/netlink-message.hpp
+++ b/ndn-cxx/net/impl/netlink-message.hpp
@@ -24,7 +24,7 @@
 #ifndef NDN_NET_NETLINK_MESSAGE_HPP
 #define NDN_NET_NETLINK_MESSAGE_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/net/ethernet.hpp"
 
 #ifndef NDN_CXX_HAVE_NETLINK
diff --git a/ndn-cxx/net/impl/network-monitor-impl-netlink.hpp b/ndn-cxx/net/impl/network-monitor-impl-netlink.hpp
index 193e4f6..eba485d 100644
--- a/ndn-cxx/net/impl/network-monitor-impl-netlink.hpp
+++ b/ndn-cxx/net/impl/network-monitor-impl-netlink.hpp
@@ -24,7 +24,7 @@
 #ifndef NDN_NET_NETWORK_MONITOR_IMPL_NETLINK_HPP
 #define NDN_NET_NETWORK_MONITOR_IMPL_NETLINK_HPP
 
-#include "ndn-cxx/config.hpp"
+#include "ndn-cxx/detail/config.hpp"
 #include "ndn-cxx/net/network-monitor.hpp"
 
 #ifndef NDN_CXX_HAVE_NETLINK
diff --git a/ndn-cxx/net/impl/network-monitor-impl-osx.hpp b/ndn-cxx/net/impl/network-monitor-impl-osx.hpp
index cf9baad..7ff688f 100644
--- a/ndn-cxx/net/impl/network-monitor-impl-osx.hpp
+++ b/ndn-cxx/net/impl/network-monitor-impl-osx.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_NET_NETWORK_MONITOR_IMPL_OSX_HPP
 #define NDN_NET_NETWORK_MONITOR_IMPL_OSX_HPP
 
-#include "ndn-cxx/config.hpp"
+#include "ndn-cxx/detail/config.hpp"
 #include "ndn-cxx/net/network-monitor.hpp"
 
 #ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS
diff --git a/ndn-cxx/net/network-address.hpp b/ndn-cxx/net/network-address.hpp
index 2d3244f..30fc148 100644
--- a/ndn-cxx/net/network-address.hpp
+++ b/ndn-cxx/net/network-address.hpp
@@ -24,7 +24,7 @@
 #ifndef NDN_NET_NETWORK_ADDRESS_HPP
 #define NDN_NET_NETWORK_ADDRESS_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include <boost/asio/ip/address.hpp>
 
diff --git a/ndn-cxx/net/network-monitor.cpp b/ndn-cxx/net/network-monitor.cpp
index 78ddb7e..511d750 100644
--- a/ndn-cxx/net/network-monitor.cpp
+++ b/ndn-cxx/net/network-monitor.cpp
@@ -25,7 +25,7 @@
 #include "ndn-cxx/net/network-monitor.hpp"
 #include "ndn-cxx/util/logger.hpp"
 
-#include "ndn-cxx/config.hpp"
+#include "ndn-cxx/detail/config.hpp"
 #include "ndn-cxx/net/impl/network-monitor-impl-noop.hpp"
 #if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
 #include "ndn-cxx/net/impl/network-monitor-impl-osx.hpp"
diff --git a/ndn-cxx/security/security-common.hpp b/ndn-cxx/security/security-common.hpp
index 139656e..c4ec0fd 100644
--- a/ndn-cxx/security/security-common.hpp
+++ b/ndn-cxx/security/security-common.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_SECURITY_SECURITY_COMMON_HPP
 #define NDN_SECURITY_SECURITY_COMMON_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 namespace ndn {
 
diff --git a/ndn-cxx/security/signing-helpers.hpp b/ndn-cxx/security/signing-helpers.hpp
index cf052cc..6be8ec8 100644
--- a/ndn-cxx/security/signing-helpers.hpp
+++ b/ndn-cxx/security/signing-helpers.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_CXX_SECURITY_SIGNING_HELPERS_HPP
 #define NDN_CXX_SECURITY_SIGNING_HELPERS_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/security/signing-info.hpp"
 
 namespace ndn {
diff --git a/ndn-cxx/security/tpm/key-ref-osx.hpp b/ndn-cxx/security/tpm/key-ref-osx.hpp
index 3a069ab..75b93a8 100644
--- a/ndn-cxx/security/tpm/key-ref-osx.hpp
+++ b/ndn-cxx/security/tpm/key-ref-osx.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_SECURITY_TPM_KEY_REF_OSX_HPP
 #define NDN_SECURITY_TPM_KEY_REF_OSX_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS
 #error "This file should not be compiled ..."
diff --git a/ndn-cxx/security/transform/transform-base.hpp b/ndn-cxx/security/transform/transform-base.hpp
index 68aa429..3a9ab9c 100644
--- a/ndn-cxx/security/transform/transform-base.hpp
+++ b/ndn-cxx/security/transform/transform-base.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_CXX_SECURITY_TRANSFORM_BASE_HPP
 #define NDN_CXX_SECURITY_TRANSFORM_BASE_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include <vector>
 
diff --git a/ndn-cxx/security/v2/additional-description.hpp b/ndn-cxx/security/v2/additional-description.hpp
index f019077..0523712 100644
--- a/ndn-cxx/security/v2/additional-description.hpp
+++ b/ndn-cxx/security/v2/additional-description.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_SECURITY_V2_ADDITIONAL_DESCRIPTION_HPP
 #define NDN_SECURITY_V2_ADDITIONAL_DESCRIPTION_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/encoding/block.hpp"
 #include "ndn-cxx/encoding/tlv.hpp"
 
diff --git a/ndn-cxx/security/v2/validation-error.hpp b/ndn-cxx/security/v2/validation-error.hpp
index f45ee75..9a3a7d8 100644
--- a/ndn-cxx/security/v2/validation-error.hpp
+++ b/ndn-cxx/security/v2/validation-error.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_SECURITY_V2_VALIDATION_ERROR_HPP
 #define NDN_SECURITY_V2_VALIDATION_ERROR_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 namespace ndn {
 namespace security {
diff --git a/ndn-cxx/security/v2/validator-config/common.hpp b/ndn-cxx/security/v2/validator-config/common.hpp
index 75d5cb7..21c690f 100644
--- a/ndn-cxx/security/v2/validator-config/common.hpp
+++ b/ndn-cxx/security/v2/validator-config/common.hpp
@@ -24,7 +24,7 @@
 #ifndef NDN_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP
 #define NDN_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include <boost/property_tree/ptree.hpp>
 
diff --git a/ndn-cxx/security/validity-period.hpp b/ndn-cxx/security/validity-period.hpp
index 006e8e0..073b1f4 100644
--- a/ndn-cxx/security/validity-period.hpp
+++ b/ndn-cxx/security/validity-period.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_SECURITY_VALIDITY_PERIOD_HPP
 #define NDN_SECURITY_VALIDITY_PERIOD_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/encoding/tlv.hpp"
 #include "ndn-cxx/encoding/block.hpp"
 #include "ndn-cxx/util/time.hpp"
diff --git a/ndn-cxx/tag-host.hpp b/ndn-cxx/tag-host.hpp
index ebfea50..df6b9a7 100644
--- a/ndn-cxx/tag-host.hpp
+++ b/ndn-cxx/tag-host.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_TAG_HOST_HPP
 #define NDN_TAG_HOST_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/tag.hpp"
 
 #include <map>
diff --git a/ndn-cxx/transport/transport.hpp b/ndn-cxx/transport/transport.hpp
index ef0283e..007acf5 100644
--- a/ndn-cxx/transport/transport.hpp
+++ b/ndn-cxx/transport/transport.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_TRANSPORT_TRANSPORT_HPP
 #define NDN_TRANSPORT_TRANSPORT_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 #include "ndn-cxx/encoding/block.hpp"
 #include "ndn-cxx/net/asio-fwd.hpp"
 
diff --git a/ndn-cxx/util/backports.hpp b/ndn-cxx/util/backports.hpp
index 9278546..eeea5b6 100644
--- a/ndn-cxx/util/backports.hpp
+++ b/ndn-cxx/util/backports.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_BACKPORTS_HPP
 #define NDN_UTIL_BACKPORTS_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #ifdef __has_cpp_attribute
 #  define NDN_CXX_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
diff --git a/ndn-cxx/util/cf-releaser-osx.hpp b/ndn-cxx/util/cf-releaser-osx.hpp
index 8987ab8..e344d0c 100644
--- a/ndn-cxx/util/cf-releaser-osx.hpp
+++ b/ndn-cxx/util/cf-releaser-osx.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_CF_RELEASER_OSX_HPP
 #define NDN_UTIL_CF_RELEASER_OSX_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS
 #error "This file should not be included ..."
diff --git a/ndn-cxx/util/cf-string-osx.hpp b/ndn-cxx/util/cf-string-osx.hpp
index 73f7f91..f354e01 100644
--- a/ndn-cxx/util/cf-string-osx.hpp
+++ b/ndn-cxx/util/cf-string-osx.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_CF_STRING_OSX_HPP
 #define NDN_UTIL_CF_STRING_OSX_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS
 #error "This file should not be included ..."
diff --git a/ndn-cxx/util/config-file.hpp b/ndn-cxx/util/config-file.hpp
index 4351d00..600e1cc 100644
--- a/ndn-cxx/util/config-file.hpp
+++ b/ndn-cxx/util/config-file.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_MANAGEMENT_CONFIG_FILE_HPP
 #define NDN_MANAGEMENT_CONFIG_FILE_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include <fstream>
 
diff --git a/ndn-cxx/util/logger.hpp b/ndn-cxx/util/logger.hpp
index 72c10c4..f785c7b 100644
--- a/ndn-cxx/util/logger.hpp
+++ b/ndn-cxx/util/logger.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_LOGGER_HPP
 #define NDN_UTIL_LOGGER_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #ifdef HAVE_NDN_CXX_CUSTOM_LOGGER
 #include "ndn-cxx/util/custom-logger.hpp"
diff --git a/ndn-cxx/util/logging.hpp b/ndn-cxx/util/logging.hpp
index 22d949f..532ee73 100644
--- a/ndn-cxx/util/logging.hpp
+++ b/ndn-cxx/util/logging.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_LOGGING_HPP
 #define NDN_UTIL_LOGGING_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #ifdef HAVE_NDN_CXX_CUSTOM_LOGGER
 #include "ndn-cxx/util/custom-logging.hpp"
diff --git a/ndn-cxx/util/random.hpp b/ndn-cxx/util/random.hpp
index c619615..8f538b2 100644
--- a/ndn-cxx/util/random.hpp
+++ b/ndn-cxx/util/random.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_RANDOM_HPP
 #define NDN_UTIL_RANDOM_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 namespace ndn {
 namespace random {
diff --git a/ndn-cxx/util/regex/regex-backref-manager.hpp b/ndn-cxx/util/regex/regex-backref-manager.hpp
index f855728..3d5b717 100644
--- a/ndn-cxx/util/regex/regex-backref-manager.hpp
+++ b/ndn-cxx/util/regex/regex-backref-manager.hpp
@@ -24,7 +24,7 @@
 #ifndef NDN_UTIL_REGEX_REGEX_BACKREF_MANAGER_HPP
 #define NDN_UTIL_REGEX_REGEX_BACKREF_MANAGER_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include <vector>
 
diff --git a/ndn-cxx/util/signal/connection.hpp b/ndn-cxx/util/signal/connection.hpp
index f7fe803..a5aabbe 100644
--- a/ndn-cxx/util/signal/connection.hpp
+++ b/ndn-cxx/util/signal/connection.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_SIGNAL_CONNECTION_HPP
 #define NDN_UTIL_SIGNAL_CONNECTION_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 namespace ndn {
 namespace util {
diff --git a/ndn-cxx/util/string-helper.hpp b/ndn-cxx/util/string-helper.hpp
index 05320c0..59638cb 100644
--- a/ndn-cxx/util/string-helper.hpp
+++ b/ndn-cxx/util/string-helper.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_STRING_HELPER_HPP
 #define NDN_UTIL_STRING_HELPER_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 namespace ndn {
 
diff --git a/ndn-cxx/util/time.hpp b/ndn-cxx/util/time.hpp
index 29e813f..5656b2a 100644
--- a/ndn-cxx/util/time.hpp
+++ b/ndn-cxx/util/time.hpp
@@ -22,7 +22,7 @@
 #ifndef NDN_UTIL_TIME_HPP
 #define NDN_UTIL_TIME_HPP
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include <boost/asio/wait_traits.hpp>
 #include <boost/chrono.hpp>
diff --git a/tests/unit/ndebug.t.cpp b/tests/unit/ndebug.t.cpp
index 7f1bb5a..39dcd8f 100644
--- a/tests/unit/ndebug.t.cpp
+++ b/tests/unit/ndebug.t.cpp
@@ -19,7 +19,7 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include "tests/boost-test.hpp"
 
diff --git a/tests/unit/version.t.cpp b/tests/unit/version.t.cpp
index 61a701c..a567695 100644
--- a/tests/unit/version.t.cpp
+++ b/tests/unit/version.t.cpp
@@ -20,7 +20,7 @@
  */
 
 #include "ndn-cxx/version.hpp"
-#include "ndn-cxx/common.hpp"
+#include "ndn-cxx/detail/common.hpp"
 
 #include "tests/boost-test.hpp"
 
diff --git a/tests/wscript b/tests/wscript
index bc540ee..8e269f0 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -7,7 +7,7 @@
     bld.objects(target='tests-common',
                 features='pch',
                 source=bld.path.ant_glob('*.cpp'),
-                headers=['../ndn-cxx/common-pch.hpp', 'boost-test.hpp'],
+                headers=['../ndn-cxx/impl/common-pch.hpp', 'boost-test.hpp'],
                 use='ndn-cxx BOOST')
 
     bld.recurse('integrated')
diff --git a/wscript b/wscript
index f5ec910..c0f0f18 100644
--- a/wscript
+++ b/wscript
@@ -139,7 +139,7 @@
     # config file will contain all defines that were added using conf.define('xxx'...)
     # Everything that was added directly to conf.env['DEFINES'] will not appear in the
     # config file and will be added using compiler directives in the command line.
-    conf.write_config_header('ndn-cxx/config.hpp', define_prefix='NDN_CXX_')
+    conf.write_config_header('ndn-cxx/detail/config.hpp', define_prefix='NDN_CXX_')
 
 def build(bld):
     version(bld)
@@ -173,7 +173,7 @@
                                        'ndn-cxx/**/*netlink*.cpp',
                                        'ndn-cxx/**/*-sqlite3.cpp']),
         features='pch',
-        headers='ndn-cxx/common-pch.hpp',
+        headers='ndn-cxx/impl/common-pch.hpp',
         use='ndn-cxx-mm-objects version BOOST OPENSSL SQLITE3 RT PTHREAD',
         includes='.',
         export_includes='.',
@@ -266,11 +266,10 @@
 
     bld.install_files(bld.env['INCLUDEDIR'], headers, relative_trick=True)
 
-    bld.install_files('%s/ndn-cxx' % bld.env['INCLUDEDIR'],
-                      bld.path.find_resource('ndn-cxx/config.hpp'))
-
-    bld.install_files('%s/ndn-cxx' % bld.env['INCLUDEDIR'],
-                      bld.path.find_resource('ndn-cxx/version.hpp'))
+    # Install generated headers
+    for filename in ['ndn-cxx/detail/config.hpp', 'ndn-cxx/version.hpp']:
+        bld.install_files('%s/%s' % (bld.env['INCLUDEDIR'], os.path.dirname(filename)),
+                          bld.path.find_resource(filename))
 
     bld.install_files('${SYSCONFDIR}/ndn', 'client.conf.sample')