]>
Commit | Line | Data |
---|---|---|
22a3b8c9 SK |
1 | The common case |
2 | ||
3 | ./autogen.sh && ./configure && make | |
4 | ||
5 | If something fails read the last lines. Typical reason to | |
6 | fail is a missing dependency, such as libtool or gettext. | |
7 | ||
8 | Autotools | |
9 | ||
10 | `./autogen.sh' generates all files needed to compile | |
11 | and install the code (run it after checkout from git) | |
12 | ||
13 | `make distclean' removes all unnecessary files, but the | |
14 | code can still be recompiled with "./configure; make" | |
15 | ||
16 | `make dist-gzip' (or -bzip2) creates a tarball that can | |
17 | be configured and compiled without running `./autogen.sh' | |
18 | ||
19 | Compiling | |
20 | ||
21 | Use SUID_CFLAGS and SUID_LDFLAGS when you want to define | |
22 | special compiler options for typical suid programs, for | |
23 | example: | |
24 | ||
25 | ./configure SUID_CFLAGS="-fpie" SUID_LDFLAGS="-pie" | |
26 | ||
27 | The SUID_* feature is currently supported for chfn, chsh, | |
b5b8805f | 28 | newgrp, su, write, mount, and umount. |
22a3b8c9 | 29 | |
03d00d49 KZ |
30 | Use DAEMON_CFLAGS and DAEMON_LDFLAGS when you want to define |
31 | special compiler options for daemons; supported for uuidd. | |
22a3b8c9 | 32 | |
03d00d49 KZ |
33 | Use SOLIB_CFLAGS and SOLIB_LDFLAGS when you want to define |
34 | special compiler options for shared libraries; supported for | |
35 | libmount, libblkid and libuuid. | |
22a3b8c9 SK |
36 | |
37 | FIXME: add notes about klib and uClib. | |
38 | ||
39 | Static linking | |
40 | ||
41 | Use --enable-static-programs[=LIST] configure option when | |
42 | you want to use statically linked programs. | |
43 | ||
44 | Note, mount(8) uses get{pw,gr}nam() and getpwuid() | |
45 | functions for translation from username and groupname to | |
46 | UID and GID. These functions could be implemented by | |
47 | dynamically loaded independent modules (NSS) in your libc | |
48 | (e.g. glibc). These modules are not statically linked to | |
49 | mount(8) and mount.static is still using dlopen() like | |
50 | dynamically linked version. | |
51 | ||
52 | The translation won't work in environment where NSS | |
53 | modules are not installed. | |
54 | ||
55 | For example normal system (NSS modules are available): | |
56 | ||
57 | # ./mount.static -v -f -n -ouid=kzak /mnt/foo | |
58 | LABEL=/mnt/foo on /mnt/foo type vfat (rw,uid=500) | |
59 | ^^^^^^^ | |
60 | and without NSS modules: | |
61 | ||
62 | # chroot . ./mount.static -v -f -n -ouid=kzak /mnt/win | |
63 | LABEL=/mnt/win on /mnt/win type vfat (rw,uid=kzak) | |
64 | ^^^^^^^^ |