You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2008/02/21 07:43:56 UTC
svn commit: r629698 - in /logging/log4cxx/trunk: build.xml
src/ant/apr-build.xml src/ant/apr-util-build.xml src/ant/common.xml
src/main/include/log4cxx/log4cxx.hw src/site/apt/building/ant.apt
src/site/apt/building/autotools.apt
Author: carnold
Date: Wed Feb 20 22:43:52 2008
New Revision: 629698
URL: http://svn.apache.org/viewvc?rev=629698&view=rev
Log:
LOGCXX-74: MinGW builds for both autotools and ant
Modified:
logging/log4cxx/trunk/build.xml
logging/log4cxx/trunk/src/ant/apr-build.xml
logging/log4cxx/trunk/src/ant/apr-util-build.xml
logging/log4cxx/trunk/src/ant/common.xml
logging/log4cxx/trunk/src/main/include/log4cxx/log4cxx.hw
logging/log4cxx/trunk/src/site/apt/building/ant.apt
logging/log4cxx/trunk/src/site/apt/building/autotools.apt
Modified: logging/log4cxx/trunk/build.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/build.xml?rev=629698&r1=629697&r2=629698&view=diff
==============================================================================
--- logging/log4cxx/trunk/build.xml (original)
+++ logging/log4cxx/trunk/build.xml Wed Feb 20 22:43:52 2008
@@ -25,7 +25,7 @@
<libset libs="esmtp" dir="${esmtp.lib.dir}" if="esmtp.lib.dir"/>
<libset libs="esmtp" if="has-libesmtp" unless="esmtp.lib.dir"/>
<libset libs="${odbc.lib}" if="odbc.lib"/>
- <libset libs="${apr-util.dependencies}" if="apr-util.dependencies"/>
+ <libset libs="${apr-util.dependencies}" if="apr-util.dependencies" unless="apr-util-includes-dependencies"/>
<libset libs="pthread" if="is-unix"/>
<syslibset libs="advapi32 mswsock ws2_32 shell32" if="is-windows"/>
<syslibset libs="stdc++" if="is-gcc"/>
@@ -393,6 +393,8 @@
<property name="apr-util.lib.prefix" value=""/>
<property name="apr-util.lib.suffix" value=""/>
<property name="project.type" value="msvc6"/>
+ <!-- built this way, apr-util will include expat and doesn't need an external reference -->
+ <property name="apr-util-includes-dependencies" value="1"/>
<ant antfile="src/ant/apr-util-build.xml" target="build" inheritAll="false">
<property name="target.dir" value="${target.dir}"/>
@@ -500,7 +502,7 @@
</cc>
</target>
-<target name="build" depends="build-apr-util, build-libesmtp, configure" description="Build log4cxx library">
+<target name="build-lib" depends="build-apr-util, build-libesmtp, configure" description="Build log4cxx library">
<mkdir dir="${log4cxx.lib.dir}/log4cxx_obj"/>
<condition property="apr-static" value="1">
@@ -536,6 +538,7 @@
<cc name="${project.compiler}"
exceptions="true"
outfile="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}"
+ outputfileproperty="log4cxx.lib.file"
subsystem="console"
multithreaded="true"
outtype="${lib.type}"
@@ -567,8 +570,19 @@
<dependency name="${projects.dir}/libesmtp"/>
</project>
</cc>
+
+ <condition property="copy.log4cxx" value="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}.dll">
+ <and>
+ <isset property="is-mingw"/>
+ <equals arg1="${lib.type}" arg2="shared"/>
+ </and>
+ </condition>
</target>
+<target name="build" depends="build-lib" if="copy.log4cxx">
+ <copy file="${log4cxx.lib.file}" tofile="${copy.log4cxx}"
+ overwrite="true" preservelastmodified="true"/>
+</target>
<target name="build-example">
<mkdir dir="${log4cxx.lib.dir}/${example.name}_obj"/>
Modified: logging/log4cxx/trunk/src/ant/apr-build.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/ant/apr-build.xml?rev=629698&r1=629697&r2=629698&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/ant/apr-build.xml (original)
+++ logging/log4cxx/trunk/src/ant/apr-build.xml Wed Feb 20 22:43:52 2008
@@ -70,6 +70,7 @@
</antcall>
</target>
+
<target name="check-configure" if="is-unix">
<condition property="force-configure" value="1">
<not><available file="${include.dir}/apr.h"/></not>
@@ -109,7 +110,8 @@
outputfileproperty="apr-1.dll"
debug="${debug}"
projectsOnly="${projectsOnly}">
- <fileset dir="${src.dir}" includes="**/${arch}/*.c" excludes="**/apr_app.c"/>
+ <!-- suppressing misc/win32/rand.c since it needs to include rpc.h -->
+ <fileset dir="${src.dir}" includes="**/${arch}/*.c" excludes="**/apr_app.c misc/win32/rand.c"/>
<fileset dir="${src.dir}" includes="**/${arch}/apr_app.c" if="is-static"/>
<fileset dir="${src.dir}/file_io/unix"
includes="copy.c fileacc.c filepath_util.c fullrw.c mktemp.c tempdir.c"/>
Modified: logging/log4cxx/trunk/src/ant/apr-util-build.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/ant/apr-util-build.xml?rev=629698&r1=629697&r2=629698&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/ant/apr-util-build.xml (original)
+++ logging/log4cxx/trunk/src/ant/apr-util-build.xml Wed Feb 20 22:43:52 2008
@@ -167,6 +167,9 @@
<defineset define="APU_DECLARE_EXPORT" if="is-shared"/>
<defineset define="APU_DECLARE_STATIC" unless="is-shared"/>
<defineset define="APR_DECLARE_STATIC" unless="is-apr-shared"/>
+ <defineset>
+ <define name="XMLPARSEAPI" value=" "/>
+ </defineset>
<defineset define="WIN32" if="is-windows"/>
<defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" if="is-gcc"/>
<compilerarg value="${pic-option}" if="pic-option"/>
Modified: logging/log4cxx/trunk/src/ant/common.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/ant/common.xml?rev=629698&r1=629697&r2=629698&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/ant/common.xml (original)
+++ logging/log4cxx/trunk/src/ant/common.xml Wed Feb 20 22:43:52 2008
@@ -57,9 +57,18 @@
<equals arg1="${compiler}" arg2="bcc"/>
</or>
</condition>
+
+ <condition property="is-msvc" value="true">
+ <or>
+ <equals arg1="${compiler}" arg2="msvc"/>
+ </or>
+ </condition>
<condition property="is-mingw" value="true">
- <isset property="is-gcc"/>
+ <or>
+ <equals arg1="${compiler}" arg2="gcc"/>
+ <equals arg1="${compiler}" arg2="g++"/>
+ </or>
</condition>
</target>
Modified: logging/log4cxx/trunk/src/main/include/log4cxx/log4cxx.hw
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/log4cxx.hw?rev=629698&r1=629697&r2=629698&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/log4cxx.hw (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/log4cxx.hw Wed Feb 20 22:43:52 2008
@@ -53,36 +53,44 @@
// definitions used when using static library
#if defined(LOG4CXX_STATIC)
#define LOG4CXX_EXPORT
-#define LOG4CXX_PTR_DEF(T) typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr;
-#define LOG4CXX_LIST_DEF(N, T) typedef std::vector<T> N;
-
// definitions used when building DLL
#elif defined(LOG4CXX)
#define LOG4CXX_EXPORT __declspec(dllexport)
+#else
+// definitions used when using DLL
+#define LOG4CXX_EXPORT __declspec(dllimport)
+#endif
+
+
+//
+// pointer and list definition macros when building DLL using VC
+//
+#if defined(_MSC_VER) && !defined(LOG4CXX_STATIC) && defined(LOG4CXX)
#define LOG4CXX_PTR_DEF(T) \
template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>; \
typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr;
-
#define LOG4CXX_LIST_DEF(N, T) \
template class LOG4CXX_EXPORT std::allocator<T>; \
template class LOG4CXX_EXPORT std::vector<T>; \
typedef std::vector<T> N;
-
-
-#else
-// definitions used when using DLL
-#define LOG4CXX_EXPORT __declspec(dllimport)
-#define LOG4CXX_PTR_DEF(T) \
+//
+// pointer and list definition macros when linking with DLL using VC
+//
+#elif defined(_MSC_VER) && !defined(LOG4CXX_STATIC)
extern template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>; \
typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr;
-
#define LOG4CXX_LIST_DEF(N, T) \
extern template class LOG4CXX_EXPORT std::allocator<T>; \
extern template class LOG4CXX_EXPORT std::vector<T>; \
typedef std::vector<T> N;
-
-
+//
+// pointer and list definition macros for all other cases
+//
+#else
+#define LOG4CXX_PTR_DEF(T) typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr;
+#define LOG4CXX_LIST_DEF(N, T) typedef std::vector<T> N;
#endif
+
#endif
Modified: logging/log4cxx/trunk/src/site/apt/building/ant.apt
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/site/apt/building/ant.apt?rev=629698&r1=629697&r2=629698&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/site/apt/building/ant.apt (original)
+++ logging/log4cxx/trunk/src/site/apt/building/ant.apt Wed Feb 20 22:43:52 2008
@@ -180,7 +180,25 @@
+-----+
- *** MinGW:
+ *** MinGW:
+
++----+
+cd apache-log4cxx-0.10.0
+path c:\mingw\bin;%PATH%
+ant -Dcompiler=gcc -Dfind=false build-all
+cd src\test\resources
+set TOTO=wonderful
+set key1=value1
+set key2=value2
+..\..\..\target\release\shared\testsuite -v
+..\..\..\target\release\shared\trivial
+..\..\..\target\release\shared\stream
++----+
+
+ Running "ant check" was observed to fail with unexpected exceptions
+ in streamtestcase and datetimedateformattestcase.
+ See {{http://issues.apache.org/jira/browse/LOGCXX-244}LOGCXX-244}}.
+
** Mac OS/X:
Modified: logging/log4cxx/trunk/src/site/apt/building/autotools.apt
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/site/apt/building/autotools.apt?rev=629698&r1=629697&r2=629698&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/site/apt/building/autotools.apt (original)
+++ logging/log4cxx/trunk/src/site/apt/building/autotools.apt Wed Feb 20 22:43:52 2008
@@ -78,4 +78,35 @@
building APR on Cygwin with threads enabled.
-** MinGW:
+** MinGW:
+
+ Recent APR 1.2.x releases fail ./configure with a error
+ of "decision on anonymous shared memory failed". That issue
+ has been fixed in the current APR SVN HEAD. The follow
+ sequence worked with MSYS (with Python on Path):
+
++----+
+cd expat-2.0.1
+./configure
+make install
+cd ..
+svn co https://svn.apache.org/repos/asf/apr/apr/trunk apr
+cd apr
+./buildconf.sh
+./configure
+make install
+cd ..
+svn co https://svn.apache.org/repos/asf/apr/apr-util/trunk apr-util
+cd apr-util
+./buildconf.sh
+./configure --with-apr=/usr/local --with-expat=/usr/local
+make install
+cd ../apache-log4cxx-0.10.0
+./autogen.sh
+./configure --with-apr=/usr/local --with-apr-util=/usr/local --with-logchar=wchar_t
+make install
++----+
+
+ Running "make check" was observed to fail with unexpected exceptions
+ in streamtestcase and datetimedateformattestcase.
+ See {{http://issues.apache.org/jira/browse/LOGCXX-244}LOGCXX-244}}.