Set license using %license
[platform/upstream/libunistring.git] / HACKING
1 All you need to know when hacking (modifying) GNU libunistring or when building
2 it off a git checkout.
3
4
5 Requirements
6 ============
7
8 You will need reasonably recent versions of the build tools:
9
10   * A C compiler. Such as GNU GCC.
11     + Homepage:
12       http://gcc.gnu.org/
13
14   * GNU automake
15     + Homepage:
16       http://www.gnu.org/software/automake/
17
18   * GNU autoconf
19     + Homepage:
20       http://www.gnu.org/software/autoconf/
21
22   * GNU m4
23     + Homepage:
24       http://www.gnu.org/software/m4/
25
26   * GNU gperf
27     + Homepage:
28       http://www.gnu.org/software/gperf/
29
30   * GNU sed
31     + Homepage:
32       http://www.gnu.org/software/sed/
33
34   * Perl
35     + Homepage:
36       http://www.perl.org/
37
38   * Either an internet connection or a recent copy of GNU gnulib.
39     In order to work with the HEAD of libunistring development, you need the
40     HEAD of the gnulib development.
41     In order to work with the version of libunistring at a given date, you need
42     the version of gnulib of the same date.
43     In order to work with a released tarball of libunistring, you need the
44     particular version of gnulib which is indicated in the GNULIB_GIT_COMMIT
45     variable in version.sh.
46     + Homepage:
47       http://www.gnu.org/software/gnulib/
48
49 And, of course, the packages listed in the DEPENDENCIES file.
50
51 Then you can run the 'autogen.sh' script 
52
53
54 Sources
55 =======
56
57 Most of the sources have their origin in gnulib.
58
59
60 Building
61 ========
62
63 See the INSTALL file for generic instructions.
64
65 To speed up the build:
66   1) You can use the configure option --disable-namespacing.  The speed up is
67      by a factor of 1.5.  The resulting library is not namespace-clean and
68      therefore should not be installed (if you don't want to risk collisions
69      with other libraries) and should certainly not be distributed.
70   2) You can use the configure option --disable-static.  The speed up is by
71      a factor of 1.6.  The resulting library cannot be used for static
72      linking and therefore should certainly not be distributed.
73
74
75 Running the testsuite in valgrind
76 =================================
77
78 To run the test suite with a memory access checker and leak detector such as
79 valgrind,
80   1) configure with the options --disable-shared and CFLAGS="-g",
81   2) run "make",
82   3) edit tests/Makefile to uncomment the appropriate definition of the CHECKER
83      macro,
84   4) run "make check".