Initial packaging.
[profile/ivi/log4cxx.git] / INSTALL
1 Licensed to the Apache Software Foundation (ASF) under one or more
2 contributor license agreements.  See the NOTICE file distributed with
3 this work for additional information regarding copyright ownership.
4 The ASF licenses this file to You under the Apache License, Version 2.0
5 (the "License"); you may not use this file except in compliance with
6 the License.  You may obtain a copy of the License at
7       http://www.apache.org/licenses/LICENSE-2.0
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15
16 Detailed build instructions are provided for in both HTML
17 and APT format in releases.  The APT sources are 
18 available in Subversion checkouts.
19
20 autotools:
21 site/building/autotools.html
22 src/site/apt/building/autotools.apt
23
24 Apache Ant:
25 site/building/ant.html
26 src/site/apt/building/ant.apt
27
28 Apache Maven 2:
29 site/building/maven.html
30 src/site/apt/building/maven.apt
31
32 Microsoft Visual Studio:
33 site/building/vstudio.html
34 src/site/apt/building/vstudio.apt
35
36 Apple Xcode:
37 site/building/xcode.html
38 src/site/apt/building/xcode.apt
39
40
41
42
43 Introduction
44 ============
45 Apache log4cxx is a C++ transliteration of Apache log4j.
46
47
48
49 Maven 2:
50 ==================
51
52 Maven 2  used to prepare site documentation and will be used to package the release.
53 TODO: add more documentation.
54
55
56 Ant + cpptasks build:
57 ==================
58
59 The Ant build script is the definitive build script for log4cxx and
60 is able to build log4cxx with (at least) gcc, Microsoft Visual C++ 6, 7, 7.1
61 and Borland C++ 5.5 and produce IDE project files for Microsoft Visual Studio
62 6, Borland CBuilderX  and Apple Xcode to assist in debugging.
63
64 Prerequisites:
65
66 Apache Ant 1.6.1 or later
67    http://ant.apache.org
68
69 cpptasks.jar and ant-contrib.jar on CLASSPATH
70    (March 2005 or later releases or CVS HEAD)
71    http://ant-contrib.sourceforge.net
72
73 JDK 1.4 or later.  Earlier versions might work but
74 have not been tested.
75
76 GNU patch on command path.
77
78 GNU sed, gzip and zip on command path (required for tests)
79
80 Connection to internet
81
82    - or -
83
84 The following files placed in the lib directory:
85     apr-1.2.2.tar.gz
86     apr-util-1.2.2.tar.gz
87  
88     http://apr.apache.org
89  
90
91
92 Building:
93
94 Unix gcc:
95
96 $> export CLASSPATH=path_to_cpptasks/cpptasks.jar:path_to_antcontrib/ant-contrib.jar
97
98 - or -
99
100 $> setenv CLASSPATH path_to_cpptasks/cpptasks.jar:path_to_antcontrib/ant-contrib.jar
101
102
103 $> ant
104
105
106 Microsoft Visual C++:
107
108 $> set CLASSPATH=path_to_cpptasks/cpptasks.jar;path_to_antcontrib/ant-contrib.jar
109 $> path_to_vc\bin\vcvars32
110 $> ant
111
112
113 Borland C++:
114
115 $> set CLASSPATH=path_to_cpptasks/cpptasks.jar;path_to_antcontrib/ant-contrib.jar
116 $> ant -Dcompiler=bcc
117
118
119
120 Build options:
121
122      -Dcompiler= see list from http://ant-contrib.sourceforge.net/cc.html
123      -Ddebug=[true | false]
124      -Dlib.type=[shared | static | dylib]
125      -Drtti=[false | true]
126      -Dapache.mirror=URL
127      -Dapr.lib.type=[static | shared]
128      -Daprutil.lib.type=[static | shared]
129      -Dapriconv.lib.type=[static | shared]
130      -Dhas.wchar_t=[1 | 0]
131      -Dlogchar=[wchar_t utf8]
132      -Dos.family=cygwin
133
134 Build targets:
135
136  build                      Build log4cxx library
137  build-all                  Builds all artifacts
138  build-examples             Builds example programs
139  build-projects-cbx         Builds project files for Borland CBuilderX
140  build-projects-vc6         Builds project files for Microsoft Visual C++ 6
141  build-projects-xcode       Builds project files for Apple Xcode
142  build-shortsocketserver    builds a socket server used by unit tests
143  build-standalone-unittest  Builds a unit tests + log4cxx executable
144  build-unittest             Builds unit test app
145  check                      Runs all diagnostic tests
146  clean                      Removes built files
147  dist                       Builds a source distribution
148  fixcrlf                    repair end-of-line sequences
149  header-check               Checks headers against Effective C++ guidelines
150  run-standalone-unittest    Runs standalone unit test
151  run-unittest               Runs unit test
152  usage                      Describes usage of the build script
153
154
155
156
157