Cesar Eduardo Barros wrote:
On Thu, Jul 08, 2004 at 05:32:37PM -0300, Cesar Eduardo Barros wrote:
log4cxx is including a copy of the autoconf-generated config_auto.h even when compiling another program which also uses autoconf, causing conflicts. However, only LOG4CXX_EXPORT is really needed. I made this quick patch to fix it.
This patch reuses the LOG4CXX define used for almost the same purpose on
config_msvc.h (to determine if we're compiling log4cxx itself or a
program which uses log4cxx).
I didn't notice some headers were using the defines from config_auto.h
(HAVE_*, MUST_* and UNICODE). So, the simple solution above didn't work
when I tried to use the DOM configurator.
I was trying to find a nice solution to this problem, it seems I don't have to anymore :-) Thanks !
This patch renames these defines on all headers and adds a sed-generated
copy of config_auto.h prepending LOG4CXX_ to all these defines and
removing the bogus PACKAGE_*, VERSION and STDC_HEADERS ones when not
being included within the log4cxx sources.
This patch solves efficiently the macro problem. The idea to use sed is very good : nice job :-)
Tested compiling in the source directory, but should work with a
separate object directory too.
No, but I fixed it (it was a previous issue). I also had to changed macros names in src/threadspecificdata.cpp. I'm reviewing src/*.cpp to check is there is no forgotten macro renaming.
Apart from this, I think the patch can be commited. Does everybody agree ?
Christophe
