log/tests build fails with log4cplus is not in default location
If you supply a path to log4cplus to configure:
configure ... --with-log4cplus=/opt/log4cplus/log4cplus-1.2.1-rc2/local ...
Compilation of src/log/test fails because:
lude -DOS_LINUX -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -g -O2 -fmax-errors=4 -MT logger_lock_test-logger_lock_test.o -MD -MP -MF .deps/logger_lock_test-logger_lock_test.Tpo -c -o logger_lock_test-logger_lock_test.o `test -f 'logger_lock_test.cc' || echo './'`logger_lock_test.cc
In file included from ../../../../src/lib/log/logger.h:17:0,
from ../../../../src/lib/log/macros.h:10,
from init_logger_test.cc:9:
../../../../src/lib/log/logger_impl.h:24:30: fatal error: log4cplus/logger.h: No such file or directory
#include <log4cplus/logger.h>
^
compilation terminated.
In file included from ../../../../src/lib/log/logger.h:17:0,
from ../../../../src/lib/log/macros.h:10,
from logger_lock_test.cc:9:
../../../../src/lib/log/logger_impl.h:24:30: fatal error: log4cplus/logger.h: No such file or directory
#include <log4cplus/logger.h>
^`
compilation terminated
In file included from ../../../../src/lib/log/logger.h:17:0,
from ../../../../src/lib/log/macros.h:10,
from buffer_logger_test.cc:9:
../../../../src/lib/log/logger_impl.h:24:30: fatal error: log4cplus/logger.h: No such file or directory
#include <log4cplus/logger.h>
^
compilation terminated.
make[6]: *** [init_logger_test-init_logger_test.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[6]: *** [logger_lock_test-logger_lock_test.o] Error 1
make[6]: *** [buffer_logger_test-buffer_logger_test.o] Error 1
In file included from ../../../../src/lib/log/logger.h:17:0,
from logger_example.cc:29:
../../../../src/lib/log/logger_impl.h:24:30: fatal error: log4cplus/logger.h: No such file or directory
#include <log4cplus/logger.h>
Apparently things shifted around and log4cplus includes are now needed to compile log/tests/*.cc.
Attached is a diff that allows it to build but may not be the most appropriate logmake.diff