[ https://issues.apache.org/jira/browse/THRIFT-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14105677#comment-14105677 ]
Brent Pearson commented on THRIFT-705: -------------------------------------- In 0.8.0, this isn't an issue because all the installed headers have #ifdef HAVE_CONFIG_H around the #include "config.h". But in 0.9.1, the #ifdef's have been removed. I had to manually add it in <THRIFT_ROOT>/install/include/thrift/thrift-config.h (the only header that #include's config.h). Unrelated, but while I'm here, two other problems we've had with 0.91: (1) The FB303 lib won't build until <THRIFT_ROOT>/contrib/fb303/cpp/Makefile.am the line AM_CPPFLAGS += -I$(thrift_home)/include/thrift is changed to AM_CPPFLAGS += -I$(thrift_home)/include (2) I couldn't get the CPP tests to build so I just disabled the "all" and "install" targets in the Makefile. > Installed C++ header files depend on "config.h" which may have conflicting > macros with the (autoconf based) C++ project using Thrift. > ------------------------------------------------------------------------------------------------------------------------------------- > > Key: THRIFT-705 > URL: https://issues.apache.org/jira/browse/THRIFT-705 > Project: Thrift > Issue Type: Bug > Components: C++ - Library > Environment: Any Thrift compatible C++ compiler environment. > Reporter: Teemu Koponen > Attachments: config-h-patch.diff, config_h_patch-r994950.diff > > > The public, installed Thrift C++ header files depend on an autoconf generated > system specific 'config.h' header file. Unfortunately, having this header > file as a part of the library headers is generally troublesome. For example, > see: > http://sources.redhat.com/autobook/autobook/autobook_96.html > Attached is a patch that relies on an alternative, simpler approach based on > AX_PREFIX_CONFIG_H, which adds a package prefix to both config.h file name > and to the macros defined within: > http://www.nongnu.org/autoconf-archive/ax_prefix_config_h.html > The resulting thrift-config.h can be installed and included safely from C++ > applications having their own config.h. -- This message was sent by Atlassian JIRA (v6.2#6252)