Hi,

I'm not a ant-user. I use autoconf/automake for my own programs. So I try to 
compile log4cxx with autoconf/automake.

First of all I made a small change to configure.in:

Index: configure.in
===================================================================
RCS file: /home/cvspublic/logging-log4cxx/configure.in,v
retrieving revision 1.43
diff -r1.43 configure.in
139a140
> AC_CHECK_HEADERS(apr.h,, AC_MSG_ERROR(apr headers not found))


This triggers an error, if apr-headers are not found. On my system (still SuSE 
9.2 x86-64) I need to help configure by runnig configure with
./configure CPPFLAGS=-I/usr/include/apache2

The buildsystem finds apr-headers then.

But then there is the next problem:
 g++ -DHAVE_CONFIG_H -I. -I. -I../include/log4cxx -I../include -I../include 
-I/usr/local/apr/include/apr-1 -I/usr/include/libxml2 -DLOG4CXX 
-I/usr/include/apache2 -D_REENTRANT -g -O2 -MT appenderskeleton.lo -MD -MP 
-MF .deps/appenderskeleton.Tpo -c appenderskeleton.cpp  -fPIC -DPIC 
-o .libs/appenderskeleton.o
In file included from /usr/include/apache2/apr_atomic.h:24,
                 from appenderskeleton.cpp:24:
/usr/include/apache2/apr.h:263: error: conflicting types for `typedef long int
   apr_int64_t'
../include/log4cxx/portability.h:29: error: previous declaration as `typedef
   long long int apr_int64_t'

I wonder why you declare apr_int64_t in log4cxx-headers. apr_int64_t is 
defined in apr_atomic.h, so if you need it, include this header.

Tommi

Reply via email to