]> git.saurik.com Git - apt.git/blame - COMPILING
Added '#DEBHELPER#' so the /usr/doc symlink would be re...
[apt.git] / COMPILING
CommitLineData
1ae93c94
AL
1General Information
2~~~~~~~~~~~~~~~~~~~
3To compile this you need a couple things
4 - A working POSIX system with working POSIX gcc, g++, make (GNU),
5 ar, sh, awk and sed in the path
6 - GNU Make 3.74 or so, -- normal UNIX make will NOT work
7 * Note 3.77 is broken.
8 - A working ANSI C++ compiler, this is not g++ 2.7.*
9 g++ 2.8 works OK and newer egcs work well also. Nobody has tried it
10 on other compilers :< You will need a properly working STL as well.
11 - A C library with the usual POSIX functions and a BSD socket layer.
12 If you OS conforms to the Single User Spec then you are fine:
13 http://www.opengroup.org/onlinepubs/7908799/index.html
14
15Guidelines
16~~~~~~~~~~
17I am not interested in making 'ultra portable code'. I will accept patches
18to make the code that already exists conform more to SUS or POSIX, but
19I don't really care if your not-SUS OS doesn't work. It is simply too
20much work to maintain patches for dysfunctional OSs. I highly suggest you
21contact your vendor and express intrest in a conforming C library.
22
23That said, there are lots of finniky problems that must be delt with even
24between the supported OS's. Primarily the path I choose to take is to put
25a shim header file in build/include that transparently adds the required
26functionality. Patches to make autoconf detect these cases and generate the
27required shims are OK.
28
29Current shims:
30 * C9x integer types 'inttypes.h'
a5bae0df 31 * sys/statvfs.h to convert from BSD/Linux statfs to SUS statvfs
1ae93c94
AL
32 * rfc2553 hostname resolution (methods/rfc*), shims to normal gethostbyname.
33
a5bae0df
AL
34The only completely non-shimed OS is Linux with glibc2.1, glibc2.0 requires
35all three shims.
1ae93c94
AL
36
37Platform Notes
38~~~~~~~~~~~~~~
39Debian GNU Linux 2.1 'slink'
40Debian GNU Linux 'potato'
41 * All Archs
42 - Works flawlessly
43 - You will want to have debiandoc-sgml and yodl installed to get
44 best results.
45 - No IPv6 Support in glibc's < 2.1
46
47Sun Solaris
48 SunOS cab101 5.7 Generic_106541-04 sun4u sparc
49 - Works fine
50 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
a5bae0df
AL
51
52OpenBSD
53 OpenBSD gsb086 2.5 CMPUT#0 i386 unknown
54 - Works fine
55 - OS needs 'ranlib' to generate the symbol table after 'ar'..
56 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
57
1ae93c94
AL
58HP-UX
59 HP-UX nyquist B.10.20 C 9000/780 2016574337 32-user license
60 - Evil OS, does not conform very well to SUS
61 1) snprintf exists but is not prototyped, ignore spurios warnings
62 2) No socklen_t
63 3) Requires -D_XOPEN_SOURCE_EXTENDED for h_errno
53d3d263
AL
64 configure attempts to detect items 2 and 3, and tries to fix them. If
65 not, you can add the following into(patches welcome to configure.in)
1ae93c94
AL
66 build/include/netdb.h:
67
68 #define _XOPEN_SOURCE_EXTENDED
69 #define socklen_t size_t
70 #include_next <netdb.h>
71
72 A similar techinque can be used for snprintf/vsprintf if you dislike
73 the warnings
74 - Note, no IPv6 Support, OS lacks RFC 2553 hostname resolution
75