aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
blob: 6f568a8c91bc7cd875f00c918c7f773656333863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


Detailed build instructions are provided for in both HTML
and APT format in releases.  The APT sources are 
available in Subversion checkouts.

autotools:
site/building/autotools.html
src/site/apt/building/autotools.apt

Apache Ant:
site/building/ant.html
src/site/apt/building/ant.apt

Apache Maven 2:
site/building/maven.html
src/site/apt/building/maven.apt

Microsoft Visual Studio:
site/building/vstudio.html
src/site/apt/building/vstudio.apt

Apple Xcode:
site/building/xcode.html
src/site/apt/building/xcode.apt




Introduction
============
Apache log4cxx is a C++ transliteration of Apache log4j.



Maven 2:
==================

Maven 2  used to prepare site documentation and will be used to package the release.
TODO: add more documentation.


Ant + cpptasks build:
==================

The Ant build script is the definitive build script for log4cxx and
is able to build log4cxx with (at least) gcc, Microsoft Visual C++ 6, 7, 7.1
and Borland C++ 5.5 and produce IDE project files for Microsoft Visual Studio
6, Borland CBuilderX  and Apple Xcode to assist in debugging.

Prerequisites:

Apache Ant 1.6.1 or later
   http://ant.apache.org

cpptasks.jar and ant-contrib.jar on CLASSPATH
   (March 2005 or later releases or CVS HEAD)
   http://ant-contrib.sourceforge.net

JDK 1.4 or later.  Earlier versions might work but
have not been tested.

GNU patch on command path.

GNU sed, gzip and zip on command path (required for tests)

Connection to internet

   - or -

The following files placed in the lib directory:
    apr-1.2.2.tar.gz
    apr-util-1.2.2.tar.gz
 
    http://apr.apache.org
 


Building:

Unix gcc:

$> export CLASSPATH=path_to_cpptasks/cpptasks.jar:path_to_antcontrib/ant-contrib.jar

- or -

$> setenv CLASSPATH path_to_cpptasks/cpptasks.jar:path_to_antcontrib/ant-contrib.jar


$> ant


Microsoft Visual C++:

$> set CLASSPATH=path_to_cpptasks/cpptasks.jar;path_to_antcontrib/ant-contrib.jar
$> path_to_vc\bin\vcvars32
$> ant


Borland C++:

$> set CLASSPATH=path_to_cpptasks/cpptasks.jar;path_to_antcontrib/ant-contrib.jar
$> ant -Dcompiler=bcc



Build options:

     -Dcompiler= see list from http://ant-contrib.sourceforge.net/cc.html
     -Ddebug=[true | false]
     -Dlib.type=[shared | static | dylib]
     -Drtti=[false | true]
     -Dapache.mirror=URL
     -Dapr.lib.type=[static | shared]
     -Daprutil.lib.type=[static | shared]
     -Dapriconv.lib.type=[static | shared]
     -Dhas.wchar_t=[1 | 0]
     -Dlogchar=[wchar_t utf8]
     -Dos.family=cygwin

Build targets:

 build                      Build log4cxx library
 build-all                  Builds all artifacts
 build-examples             Builds example programs
 build-projects-cbx         Builds project files for Borland CBuilderX
 build-projects-vc6         Builds project files for Microsoft Visual C++ 6
 build-projects-xcode       Builds project files for Apple Xcode
 build-shortsocketserver    builds a socket server used by unit tests
 build-standalone-unittest  Builds a unit tests + log4cxx executable
 build-unittest             Builds unit test app
 check                      Runs all diagnostic tests
 clean                      Removes built files
 dist                       Builds a source distribution
 fixcrlf                    repair end-of-line sequences
 header-check               Checks headers against Effective C++ guidelines
 run-standalone-unittest    Runs standalone unit test
 run-unittest               Runs unit test
 usage                      Describes usage of the build script