carnold 2004/12/15 16:21:47
Modified: . Makefile.am autogen.sh configure.in
examples Makefile.am
performance Makefile.am
simplesocketserver Makefile.am
src Makefile.am file.cpp loggingevent.cpp
relativetimedateformat.cpp simpledateformat.cpp
strftimedateformat.cpp timezone.cpp
tests/src Makefile.am
tests/src/db Makefile.am
tests/src/nt Makefile.am
tests/src/util Makefile.am
Added: . find_apr.m4
Log:
LOGCXX-10: tchar.h/Unicode: build changes
Revision Changes Path
1.10 +1 -1 logging-log4cxx/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile.am 13 Aug 2004 08:50:28 -0000 1.9
+++ Makefile.am 16 Dec 2004 00:21:46 -0000 1.10
@@ -1,5 +1,5 @@
SUBDIRS = docs src msvc include simplesocketserver tests performance examples
-EXTRA_DIST = autogen.sh license.apl
+EXTRA_DIST = autogen.sh license.apl find_apr.m4
1.2 +1 -1 logging-log4cxx/autogen.sh
Index: autogen.sh
===================================================================
RCS file: /home/cvs/logging-log4cxx/autogen.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- autogen.sh 9 Jun 2003 09:02:30 -0000 1.1
+++ autogen.sh 16 Dec 2004 00:21:46 -0000 1.2
@@ -5,7 +5,7 @@
rm -f config.cache
rm -f config.log
-aclocal
+aclocal -I .
autoheader
autoconf
automake -a
1.45 +11 -1 logging-log4cxx/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/logging-log4cxx/configure.in,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- configure.in 15 Dec 2004 08:10:36 -0000 1.44
+++ configure.in 16 Dec 2004 00:21:46 -0000 1.45
@@ -137,7 +137,15 @@
# Checks header files
#
----------------------------------------------------------------------------
AC_CHECK_HEADERS(unistd.h io.h alloca.h)
-AC_CHECK_HEADERS(apr.h,, AC_MSG_ERROR(Apache Portable Runtime headers not
found))
+APR_FIND_APR( , , 1, 1)
+if test "$apr_found" = "no"; then
+ AC_MSG_ERROR(APR could not be located. Please use the --with-apr option.)
+fi
+
+CPPFLAGS="$CPPFLAGS `$apr_config --cppflags` `$apr_config --includes`"
+APR_LIBS="`$apr_config --link-ld --libs`"
+LDFLAGS="$LDFLAGS $APR_LIBS"
+
# Checks local idioms
#
----------------------------------------------------------------------------
@@ -378,9 +386,11 @@
tests/input/xml/Makefile
tests/src/Makefile
tests/src/customlogger/Makefile
+tests/src/db/Makefile
tests/src/defaultinit/Makefile
tests/src/helpers/Makefile
tests/src/net/Makefile
+tests/src/nt/Makefile
tests/src/pattern/Makefile
tests/src/util/Makefile
tests/src/xml/Makefile
1.1 logging-log4cxx/find_apr.m4
Index: find_apr.m4
===================================================================
dnl
dnl find_apr.m4 : locate the APR include files and libraries
dnl
dnl This macro file can be used by applications to find and use the APR
dnl library. It provides a standardized mechanism for using APR. It supports
dnl embedding APR into the application source, or locating an installed
dnl copy of APR.
dnl
dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors)
dnl
dnl where srcdir is the location of the bundled APR source directory, or
dnl empty if source is not bundled.
dnl
dnl where builddir is the location where the bundled APR will will be built,
dnl or empty if the build will occur in the srcdir.
dnl
dnl where implicit-install-check set to 1 indicates if there is no
dnl --with-apr option specified, we will look for installed copies.
dnl
dnl where acceptable-majors is a space separated list of acceptable major
dnl version numbers. Often only a single major version will be acceptable.
dnl If multiple versions are specified, and --with-apr=PREFIX or the
dnl implicit installed search are used, then the first (leftmost) version
dnl in the list that is found will be used. Currently defaults to [0 1].
dnl
dnl Sets the following variables on exit:
dnl
dnl apr_found : "yes", "no", "reconfig"
dnl
dnl apr_config : If the apr-config tool exists, this refers to it. If
dnl apr_found is "reconfig", then the bundled directory
dnl should be reconfigured *before* using apr_config.
dnl
dnl Note: this macro file assumes that apr-config has been installed; it
dnl is normally considered a required part of an APR installation.
dnl
dnl If a bundled source directory is available and needs to be (re)configured,
dnl then apr_found is set to "reconfig". The caller should reconfigure the
dnl (passed-in) source directory, placing the result in the build directory,
dnl as appropriate.
dnl
dnl If apr_found is "yes" or "reconfig", then the caller should use the
dnl value of apr_config to fetch any necessary build/link information.
dnl
AC_DEFUN([APR_FIND_APR], [
apr_found="no"
if test "$ac_cv_emxos2" = "yes"; then
# Scripts don't pass test -x on OS/2
TEST_X="test -f"
else
TEST_X="test -x"
fi
ifelse([$4], [], [
ifdef(AC_WARNING,AC_WARNING([$0: missing argument 4
(acceptable-majors): Defaulting to APR 0.x then APR 1.x]))
acceptable_majors="0 1"],
[acceptable_majors="$4"])
apr_temp_acceptable_apr_config=""
for apr_temp_major in $acceptable_majors
do
case $apr_temp_major in
0)
apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config
apr-config"
;;
*)
apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config
apr-$apr_temp_major-config"
;;
esac
done
AC_MSG_CHECKING(for APR)
AC_ARG_WITH(apr,
[ --with-apr=PATH prefix for installed APR, path to APR build tree,
or the full path to apr-config],
[
if test "$withval" = "no" || test "$withval" = "yes"; then
AC_MSG_ERROR([--with-apr requires a directory or file to be provided])
fi
for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
do
for lookdir in "$withval/bin" "$withval"
do
if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
apr_found="yes"
apr_config="$lookdir/$apr_temp_apr_config_file"
break 2
fi
done
done
if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help >
/dev/null 2>&1 ; then
apr_found="yes"
apr_config="$withval"
fi
dnl if --with-apr is used, it is a fatal error for its argument
dnl to be invalid
if test "$apr_found" != "yes"; then
AC_MSG_ERROR([the --with-apr parameter is incorrect. It must specify an
install prefix, a build directory, or an apr-config file.])
fi
],[
dnl if we have a bundled source directory, use it
if test -d "$1"; then
apr_temp_abs_srcdir="`cd $1 && pwd`"
apr_found="reconfig"
apr_bundled_major="`sed -n
'/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p'
\"$1/include/apr_version.h\"`"
case $apr_bundled_major in
"")
AC_MSG_ERROR([failed to find major version of bundled APR])
;;
0)
apr_temp_apr_config_file="apr-config"
;;
*)
apr_temp_apr_config_file="apr-$apr_bundled_major-config"
;;
esac
if test -n "$2"; then
apr_config="$2/$apr_temp_apr_config_file"
else
apr_config="$1/$apr_temp_apr_config_file"
fi
fi
if test "$apr_found" = "no" && test -n "$3" && test "$3" = "1"; then
for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
do
if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
apr_found="yes"
apr_config="$apr_temp_apr_config_file"
break
else
dnl look in some standard places (apparently not in builtin/default)
for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
apr_found="yes"
apr_config="$lookdir/bin/$apr_temp_apr_config_file"
break 2
fi
done
fi
done
fi
])
AC_MSG_RESULT($apr_found)
])
1.6 +1 -1 logging-log4cxx/examples/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/examples/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Makefile.am 26 Nov 2004 07:23:29 -0000 1.5
+++ Makefile.am 16 Dec 2004 00:21:46 -0000 1.6
@@ -1,6 +1,6 @@
noinst_PROGRAMS = trivial delayedloop stream
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
-I/usr/local/apr/include/apr-1
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
trivial_SOURCES = trivial.cpp
trivial_LDADD = $(top_builddir)/src/liblog4cxx.la
1.7 +1 -1 logging-log4cxx/performance/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/performance/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Makefile.am 26 Nov 2004 07:23:30 -0000 1.6
+++ Makefile.am 16 Dec 2004 00:21:46 -0000 1.7
@@ -4,7 +4,7 @@
performanceincdir = $(includedir)/log4cxx
noinst_HEADERS= $(top_srcdir)/performance/*.h
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
-I/usr/local/apr/include/apr-1
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
logging_SOURCES = main.cpp nullappender.cpp
logging_LDADD = $(top_builddir)/src/liblog4cxx.la
1.4 +1 -1 logging-log4cxx/simplesocketserver/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/simplesocketserver/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile.am 26 Nov 2004 07:23:30 -0000 1.3
+++ Makefile.am 16 Dec 2004 00:21:46 -0000 1.4
@@ -1,4 +1,4 @@
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
-I/usr/local/apr/include/apr-1
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
AM_CPPFLAGS = @CPPFLAGS_XML@ @CPPFLAGS_ODBC@
1.22 +3 -2 logging-log4cxx/src/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Makefile.am 15 Dec 2004 08:10:39 -0000 1.21
+++ Makefile.am 16 Dec 2004 00:21:46 -0000 1.22
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = liblog4cxx.la
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
-I/usr/local/apr/include/apr-1
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
liblog4cxx_la_SOURCES = \
appenderattachableimpl.cpp \
@@ -67,6 +67,7 @@
smtpappender.cpp \
socket.cpp \
socketappender.cpp \
+ socketappenderskeleton.cpp \
sockethubappender.cpp \
socketimpl.cpp \
socketinputstream.cpp \
@@ -92,5 +93,5 @@
xmlsocketappender.cpp
AM_CPPFLAGS = @CPPFLAGS_XML@ @CPPFLAGS_ODBC@
-liblog4cxx_la_LDFLAGS = -version-info @LT_VERSION@ @LIBS_XML@ @LIBS_ODBC@
-L/usr/local/apr/lib -static -lapr-1 -lapriconv
+liblog4cxx_la_LDFLAGS = -version-info @LT_VERSION@ @LIBS_XML@ @LIBS_ODBC@
[EMAIL PROTECTED]@
1.4 +2 -2 logging-log4cxx/src/file.cpp
Index: file.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/file.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- file.cpp 15 Dec 2004 08:10:39 -0000 1.3
+++ file.cpp 16 Dec 2004 00:21:46 -0000 1.4
@@ -85,7 +85,7 @@
}
-apr_time_t File::lastModified() const {
+log4cxx_time_t File::lastModified() const {
Pool pool;
apr_finfo_t finfo;
apr_status_t rv = apr_stat(&finfo, mbcsName.c_str(),
@@ -147,7 +147,7 @@
// Current implementation is limited to MBCS files
//
//
-apr_status_t File::write(const LogString& src, apr_pool_t* p) const {
+log4cxx_status_t File::write(const LogString& src, apr_pool_t* p) const {
LogString output;
apr_file_t* f = NULL;
apr_status_t rv = open(&f,
1.20 +2 -1 logging-log4cxx/src/loggingevent.cpp
Index: loggingevent.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/loggingevent.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- loggingevent.cpp 11 Dec 2004 04:53:25 -0000 1.19
+++ loggingevent.cpp 16 Dec 2004 00:21:46 -0000 1.20
@@ -42,7 +42,7 @@
// Called from LogManager::getRepositorySelector
// to initialize APR and set "start" time.
//
-apr_time_t LoggingEvent::getStartTime() {
+log4cxx_time_t LoggingEvent::getStartTime() {
log4cxx::helpers::APRInitializer::initialize();
static apr_time_t startTime(apr_time_now());
return startTime;
@@ -336,6 +336,7 @@
os->write(it->first);
os->write(it->second);
}
+> tests/src/nt/Makefile
// properties
int size = (properties != 0) ? (int)properties->size() : 0;
1.6 +1 -1 logging-log4cxx/src/relativetimedateformat.cpp
Index: relativetimedateformat.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/relativetimedateformat.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- relativetimedateformat.cpp 13 Dec 2004 05:05:13 -0000 1.5
+++ relativetimedateformat.cpp 16 Dec 2004 00:21:46 -0000 1.6
@@ -35,7 +35,7 @@
void log4cxx::helpers::RelativeTimeDateFormat::format(
LogString &s,
- apr_time_t date,
+ log4cxx_time_t date,
apr_pool_t* p) const {
apr_interval_time_t interval = date - startTime;
apr_interval_time_t ms = interval / 1000;
1.6 +1 -1 logging-log4cxx/src/simpledateformat.cpp
Index: simpledateformat.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/simpledateformat.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- simpledateformat.cpp 13 Dec 2004 05:05:13 -0000 1.5
+++ simpledateformat.cpp 16 Dec 2004 00:21:46 -0000 1.6
@@ -563,7 +563,7 @@
}
}
-void SimpleDateFormat::format(LogString& s, apr_time_t time, apr_pool_t* p)
const {
+void SimpleDateFormat::format(LogString& s, log4cxx_time_t time, apr_pool_t*
p) const {
apr_time_exp_t exploded;
apr_status_t stat = timeZone->explode(&exploded, time);
if (stat == APR_SUCCESS) {
1.5 +1 -1 logging-log4cxx/src/strftimedateformat.cpp
Index: strftimedateformat.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/strftimedateformat.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- strftimedateformat.cpp 11 Dec 2004 04:53:25 -0000 1.4
+++ strftimedateformat.cpp 16 Dec 2004 00:21:46 -0000 1.5
@@ -32,7 +32,7 @@
}
-void StrftimeDateFormat::format(LogString& s, apr_time_t time, apr_pool_t*
p) const {
+void StrftimeDateFormat::format(LogString& s, log4cxx_time_t time,
apr_pool_t* p) const {
apr_time_exp_t exploded;
apr_status_t stat = timeZone->explode(&exploded, time);
if (stat == APR_SUCCESS) {
1.9 +3 -3 logging-log4cxx/src/timezone.cpp
Index: timezone.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/timezone.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- timezone.cpp 11 Dec 2004 04:53:25 -0000 1.8
+++ timezone.cpp 16 Dec 2004 00:21:46 -0000 1.9
@@ -38,7 +38,7 @@
}
/** Explode time to human readable form. */
- apr_status_t explode( apr_time_exp_t * result, apr_time_t input )
const
+ log4cxx_status_t explode( apr_time_exp_t * result, log4cxx_time_t
input ) const
{
return apr_time_exp_gmt( result, input );
}
@@ -63,7 +63,7 @@
}
/** Explode time to human readable form. */
- apr_status_t explode( apr_time_exp_t * result, apr_time_t input )
const
+ log4cxx_status_t explode( apr_time_exp_t * result, log4cxx_time_t
input ) const
{
return apr_time_exp_lt( result, input );
}
@@ -101,7 +101,7 @@
}
/** Explode time to human readable form. */
- apr_status_t explode( apr_time_exp_t * result, apr_time_t input )
const
+ log4cxx_status_t explode( apr_time_exp_t * result, log4cxx_time_t
input ) const
{
return apr_time_exp_tz( result, input, offset );
}
1.10 +4 -6 logging-log4cxx/tests/src/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/tests/src/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile.am 15 Dec 2004 08:10:39 -0000 1.9
+++ Makefile.am 16 Dec 2004 00:21:47 -0000 1.10
@@ -1,16 +1,15 @@
-SUBDIRS = customlogger defaultinit helpers net pattern util varia xml
+SUBDIRS = customlogger defaultinit helpers net pattern util varia db xml nt
EXTRA_DIST = $(top_srcdir)/tests/src/*.cpp
noinst_HEADERS= $(top_srcdir)/tests/src/*.h
if TESTS
-INCLUDES = -I$(top_srcdir)/include -I/usr/local/apr/include
+INCLUDES = -I$(top_srcdir)/include
noinst_PROGRAMS = testsuite shortsocketserver
testsuite_SOURCES = \
asyncappendertestcase.cpp\
- drfatestcase.cpp\
filetestcase.cpp \
hierarchythresholdtestcase.cpp\
l7dtestcase.cpp\
@@ -21,7 +20,6 @@
vectorappender.cpp\
appenderskeletontestcase.cpp\
consoleappendertestcase.cpp\
- dailyrollingfileappendertestcase.cpp\
fileappendertestcase.cpp\
rollingfileappendertestcase.cpp\
writerappendertestcase.cpp
@@ -39,8 +37,8 @@
-Wl,--whole-archive,util/libutil.a,--no-whole-archive\
-Wl,--whole-archive,varia/libvaria.a,--no-whole-archive\
-Wl,--whole-archive,xml/libxml.a,--no-whole-archive\
- -Wl,--whole-archive,xml/libdb.a,--no-whole-archive\
- -Wl,--whole-archive,xml/libnt.a,--no-whole-archive\
+ -Wl,--whole-archive,db/libdb.a,--no-whole-archive\
+ -Wl,--whole-archive,nt/libnt.a,--no-whole-archive\
@LIBS_CPPUNIT@ -lboost_regex
AM_CPPFLAGS = @CPPFLAGS_CPPUNIT@
1.2 +2 -3 logging-log4cxx/tests/src/db/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/tests/src/db/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.am 22 Oct 2004 07:47:59 -0000 1.1
+++ Makefile.am 16 Dec 2004 00:21:47 -0000 1.2
@@ -1,13 +1,12 @@
EXTRA_DIST = $(top_srcdir)/tests/src/db/*.cpp
-noinst_HEADERS= $(top_srcdir)/tests/src/db/*.h
if TESTS
noinst_LIBRARIES = libdb.a
INCLUDES = -I$(top_srcdir)/include
-libnet_a_SOURCES = \
- socketservertestcase.cpp
+libdb_a_SOURCES = \
+ odbcappendertestcase.cpp
check: libdb.a
1.2 +2 -3 logging-log4cxx/tests/src/nt/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/tests/src/nt/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.am 22 Oct 2004 07:47:59 -0000 1.1
+++ Makefile.am 16 Dec 2004 00:21:47 -0000 1.2
@@ -1,13 +1,12 @@
EXTRA_DIST = $(top_srcdir)/tests/src/nt/*.cpp
-noinst_HEADERS= $(top_srcdir)/tests/src/nt/*.h
if TESTS
noinst_LIBRARIES = libnt.a
INCLUDES = -I$(top_srcdir)/include
-libnet_a_SOURCES = \
- socketservertestcase.cpp
+libnt_a_SOURCES = \
+ nteventlogappendertestcase.cpp
check: libnt.a
1.5 +2 -0 logging-log4cxx/tests/src/util/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /home/cvs/logging-log4cxx/tests/src/util/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile.am 2 Apr 2004 09:02:22 -0000 1.4
+++ Makefile.am 16 Dec 2004 00:21:47 -0000 1.5
@@ -12,12 +12,14 @@
absolutedateandtimefilter.cpp\
compare.cpp\
controlfilter.cpp\
+ filenamefilter.cpp \
filter.cpp\
iso8601filter.cpp\
linenumberfilter.cpp\
relativetimefilter.cpp\
threadfilter.cpp\
transformer.cpp\
+ xmlfilenamefilter.cpp \
xmllineattributefilter.cpp\
xmltimestampfilter.cpp \
xmlthreadfilter.cpp