fix whitespace errors in acinclude.m4
[openafs.git] / README
1 Copyright 2000, International Business Machines Corporation and others.
2 All Rights Reserved.
3
4 This software has been released under the terms of the IBM Public
5 License.  For details, see the LICENSE file in the top-level source
6 directory or online at http://www.openafs.org/dl/license10.html
7
8 Short instructions for sites upgrading from a previous version of AFS:
9 % ./configure --enable-transarc-paths
10 % make
11 % make dest
12
13 will create a Transarc-style dest tree in ${SYS_NAME}/dest where
14 ${SYS_NAME} is the AFS sysname of the system you built for.
15 This assumes if you're building for Linux that your kernel source is
16 in /usr/src/linux.
17
18 Otherwise, please read on.
19
20 Building OpenAFS on UNIX and Linux
21 ----------------------------------
22
23 A  Configuring
24
25    Uncompress the source into a directory of your choice. A directory
26    in afs space is also valid. In the directory that you uncompressed the
27    source in, you will only have an src/ directory.
28
29    1. Pick a system to build for, and note its default AFS sys_name.
30       A directory will be automatically created for binaries to be written
31       into with this name when you build.
32
33       alpha_dux40, alpha_dux50, alpha_dux51 (client does not work)
34       alpha_linux22, alpha_linux24, alpha_linux26
35       alpha_nbsd15, alpha_nbsd16
36       amd64_fbsd_80, amd64_fbsd_81, amd64_fbsd_82, amd64_fbsd_83,
37          amd64_fbsd_84, amd64_fbsd_90, amd64_fbsd_91, amd64_fbsd_92,
38          amd64_fbsd_93, amd64_fbsd_100, amd64_fbsd_101
39       amd64_linux24, amd64_linux26
40       amd64_nbsd20, amd64_nbsd30, amd64_nbsd40
41       arm_linux24, arm_linux26
42       hp_ux11i, hp_ux110, hp_ux1123 (See notes below for information on
43          getting missing header)
44       hp_ux102 (Client port possible, but db servers and utilities work)
45       i386_fbsd_80, i386_fbsd_81, i386_fbsd_82, i386_fbsd_83,
46          i386_fbsd_84, i386_fbsd_90, i386_fbsd_91, i386_fbsd_92,
47          i386_fbsd_93, i386_fbsd_100, i386_fbsd_101
48       i386_linux22, i386_linux24, i386_linux26
49       i386_nbsd15, i386_nbsd16, i386_nbsd20, i386_nbsd21, i386_nbsd30,
50          i386_nbsd40
51       i386_obsd31, i386_obsd32, i386_obsd33, i386_obsd34, i386_obsd35,
52          i386_obsd36, i386_obsd37, i386_obsd38, i386_obsd39, i386_obsd40,
53          i386_obsd41
54       i386_umlinux22, i386_umlinux24, i386_umlinux26
55       ia64_hpux1122, ia64_hpux1123
56       ia64_linux24, ia64_linux26
57       parisc_linux24
58       ppc64_linux24, ppc64_linux26
59       ppc_darwin_12, ppc_darwin_13, ppc_darwin_14, ppc_darwin_60,
60          ppc_darwin_70, ppc_darwin_80, ppc_darwin_90
61       ppc_linux22, ppc_linux24, ppc_linux26
62       ppc_nbsd16, ppc_nbsd20
63       rs_aix42, rs_aix51, rs_aix52, rs_aix53, rs_aix61
64       s390_linux22, s390_linux24, s390_linux26
65       s390x_linux24, s390x_linux26
66       sgi_62, sgi_63, sgi_64, sgi_65 (file server not tested)
67       sparc64_linux22, sparc64_linux24, sparc64_linux26
68       sparc_linux22, sparc_linux24
69       sun4x_58, sun4x_59, sun4x_510, sun4x_511
70          (logging UFS not supported for mixed-use partitions containing
71          client cache)
72       sunx86_58, sunx86_59, sunx86_510, sunx86_511
73          (logging UFS not supported for mixed-use partitions containing
74          client cache)
75       x86_darwin_80, x86_darwin90
76
77    2. Using configure in the top level directory, configure for your
78       AFS system type, providing the necessary flags:
79
80       % ./configure --with-afs-sysname=sun4x_58 --enable-transarc-paths
81
82       If you do not have the "configure" script, or if you modify the
83       source files, you can re-create it by running regen.sh.  You will
84       need autoconf to do this.
85
86       For some systems you need also provide the path in which your kernel
87       headers for your configured kernel can be found.  See the
88       system-specific Notes sections below for details.  If you want to
89       build only the user-space programs and servers and not the kernel
90       module, specify the --disable-kernel-module option on the
91       ./configure command line.
92
93       All binaries, except for the 'fileserver' and 'volserver'
94       executables and their 'da' variants, are stripped of their symbol
95       table information by default.  To enable a debugging build, specify
96       the --enable-debug option on the ./configure command line.  This
97       builds with debugging compiler options and disables stripping of
98       binaries.
99
100       You can also use different combinations of --enable-debug and
101       --enable (or --disable)-strip-binaries for finer control.  One can,
102       for example, compile binaries for debug and strip them anyway.
103       Alternatively, one can compile without debug and force the binaries
104       to not be stripped.  Note that these combinations are not
105       necessarily useful.
106
107       The binaries noted above, 'fileserver' and 'volserver' and their
108       'da' variants, will never be stripped, regardless of any options
109       given to configure.
110
111    There are two modes for directory path handling: "Transarc mode" and
112    "default mode":
113
114    - In Transarc mode, we retain compatibility with Transarc/IBM AFS tools
115      by putting client configuration files in /usr/vice/etc, and server
116      files in /usr/afs under the traditional directory layout.
117    - In default mode, files are located in standardized locations, usually
118      under $(prefix), which defaults to /usr/local.
119    - Client programs, libraries, and related files always go in standard
120      directories under $(prefix).  This rule covers things that would go
121      into $(bindir), $(includedir), $(libdir), $(mandir), and $(sbindir).
122    - Other files get located in the following places:
123
124     Directory     Transarc Mode              Default Mode
125     ============  =========================  ==============================
126     viceetcdir    /usr/vice/etc              $(sysconfdir)/openafs
127     afssrvdir     /usr/afs/bin (servers)     $(libexecdir)/openafs
128     afsconfdir    /usr/afs/etc               $(sysconfdir)/openafs/server
129     afslocaldir   /usr/afs/local             $(localstatedir)/openafs
130     afsdbdir      /usr/afs/db                $(localstatedir)/openafs/db
131     afslogdir     /usr/afs/logs              $(localstatedir)/openafs/logs
132     afsbosconfig  $(afslocaldir)/BosConfig   $(afsconfdir)/BosConfig
133     afsbosserver  $(afsbindir)/bosserver     $(sbindir)/bosserver
134
135    In default mode, you can change all of the variables named above that
136    do not start with "afs" by passing the flags with the same name to
137    configure.  For example, if you want to install the server binaries in
138    /usr/local/lib/openafs instead of /usr/local/libexec/openafs, pass the
139    --libexecdir=/usr/local/lib flag to configure.
140
141    For additional options, see section I below.
142
143 B  Building
144
145    1. Now, you can build OpenAFS.
146
147       % make
148
149    2. Install your build using either "make install" to install
150       into the current system (you will need to be root, and files
151       will be placed as appropriate for Transarc or standard paths),
152       "make install DESTDIR=/some/path" to install into an alternate
153       directory tree, or if you configured with --enable-transarc-paths
154       make dest to create a complete binary tree in the dest directory
155       under the directory named for the sys_name you built for,
156       e.g. sun4x_57/dest or i386_linux22/dest
157
158    3. As appropriate you can clean up or, if you're using Linux, build for
159       another kernel version.
160
161       To clean up:
162
163       % make clean
164
165 C  Problems
166
167    If you have a problem building this source, you may want to visit
168    http://www.openafs.org/ to see if any problems have been reported
169    or to find out how to get more help.
170
171    Mailing lists have been set up to help; More details can be found
172    on the openafs.org site.
173
174 D  Linux Notes
175
176    With current Linux versions, the /lib/modules/`uname -r`/source symlink
177    will be used to locate the kernel headers, but you will need to have
178    the headers and build system for your kernel installed in order to
179    build the kernel module.  These are usually found in a separate package
180    from the kernel, often called something like linux-headers-<version>.
181
182    For older Linux systems, you may also need to provide the path in which
183    your kernel headers for your configured kernel can be found. This
184    should be the path of the directory containing a child directory named
185    "include". So if your version file were
186    /usr/src/linux/include/linux/version.h you would run:
187
188    % ./configure --with-afs-sysname=i386_linux24 \
189        --with-linux-kernel-headers=/usr/src/linux
190
191    Currently you can build for only one Linux kernel at a time, and the
192    version is extracted from the kernel headers in the root you specify.
193
194    To build for another Linux kernel version, determine the sysname for
195    the system type as defined in step A1 for the other kernel version and
196    then run:
197
198       % ./configure --with-afs-sysname=<sysname> \
199           --with-linux-kernel-headers=/usr/src/linux-2.2.19-i686
200       % make
201
202    Your build tree will now include an additional kernel module for your
203    additional kernel headers. Be aware that if the kernel version string
204    which UTS_RELEASE is defined to in include/linux/version.h matches the
205    last kernel you built for, the previous kernel module will be
206    overwritten.
207
208 E  HP-UX 11.0 Notes
209
210    HP-UX 11.0 requires a header called vfs_vm.h which HP has provided on
211    their web site.  Go to http://www.hp.com/dspp, choose Software
212    downloads from the side menu, and select Software: HP operating systems
213    and then Operating systems: HP-UX from the select boxes.  The last
214    select box will have an option for downloading vfs_vm.h.
215
216 F  OpenBSD Notes
217
218    If you need to run regen.sh to make the configure script, you should
219    first install autoconf-2.59, then setenv AUTOCONF_VERSION 2.59.
220
221    You need kernel source installed to build OpenAFS.  Use the
222    --with-bsd-kernel-headers= configure option if your kernel source is
223    not in /usr/src/sys.
224
225    src/packaging/OpenBSD/buildpkg.sh will make a tar file for installing
226    the client.  There is no server package, but I am told that "make
227    install" will put server binaries in /usr/afs.
228
229    Your kernel may panic when you try to shutdown after running the
230    OpenAFS client.  To prevent this, change the "dangling vnode" panic in
231    sys/kern/vfs_syscalls.c to a printf and build a new kernel.
232
233    You can't run arla and OpenAFS at the same time.
234
235 G  FreeBSD Notes
236
237    The FreeBSD client supports FreeBSD 8.x and later, but does not receive
238    regular testing on versions older than FreeBSD 9.x at this time.  Only
239    the amd64 and i386 architectures are supported, but it should not be
240    hard to port to other processors if they are already supported under
241    another operating system.
242
243    You need kernel source installed to build OpenAFS.  Use the
244    --with-bsd-kernel-headers= configure option if your kernel source is
245    not in /usr/src/sys.
246
247    You also need access to your kernel build directory for the opt_global.h
248    include file.  Use the --with-bsd-kernel-build= configure option if your
249    kernel build is not GENERIC in the standard place. If
250    /usr/src/sys/${CPUARCH}/compile/GENERIC does not point to
251    /usr/obj/usr/src/sys/GENERIC you may need to resolve that and retry the
252    build.
253
254 H  AIX notes
255
256    Make sure that your default build environment is 32bit, ie.
257    the OBJECT_MODE environment variable is either unset or set to "32".
258
259    Verify this before doing configure and make. For example, assuming
260    ksh/bash:
261
262    % export OBJECT_MODE=32
263
264    To build aklog (in order to be able to get tokens from your Kerberos v5
265    ticket), you will need Kerberos libraries.  On AIX 6.1, the IBM
266    Kerberos v5 libraries are in the packages krb5.client.rte and
267    krb5.toolkit.adt on the Expansion Pack.
268
269 I  Other configure options
270
271    AFS has a ton of other optional features that must be enabled using
272    configure options.  Here is a summary:
273
274    --enable-bigendian
275    --enable-littleendian
276        These configure options are normally not required and should not be
277        given.  They're only needed if the OpenAFS build system cannot
278        determine the endianness of your system, in which case configure
279        will abort and say to use one of these options.
280
281    --enable-bitmap-later
282        Speeds the startup of the fileserver by deferring reading volume
283        bitmaps until necessary.  Demand attach is a better solution to the
284        same problem.
285
286    --enable-checking
287        Enable compiler warnings when building with GCC and turn compiler
288        warnings into errors so that new warnings will cause compilation
289        failures.  If you are developing patches to contribute to OpenAFS,
290        please build OpenAFS with this flag enabled.  Warning-free code is
291        a requirement for all new submissions to OpenAFS.
292
293    --enable-debug
294    --enable-debug-kernel
295    --enable-debug-lwp
296    --enable-debug-pam
297        Compile the userspace code (for --enable-debug) or the code named
298        by the option with debugging information.  If --enable-debug is
299        given, also do not strip binaries when installing them.
300
301    --enable-linux-syscall-probing
302        OpenAFS now uses keyrings to manage PAGs by default on Linux, which
303        does not require hooking into the system call table.  On older
304        versions of Linux without keyring support, OpenAFS uses groups to
305        manage PAGs and probes for the system call table to hook into it to
306        preserve that group information.  Normally, which method to use is
307        detected automatically, and if keyring support is present, support
308        for system call table probing is not compiled in.  Use this
309        configure option to force inclusion of the system call table
310        probing code even if the kernel appears to support keyrings.
311
312    --enable-namei-fileserver
313        Forces the namei fileserver on platforms (like Solaris 8 and 9)
314        where the inode fileserver is the default.
315
316    --enable-pthreaded-ubik
317        Enable the threaded version of Ubik and install the threaded
318        versions of Ubik servers.  See README.PTHREADED_UBIK for more
319        information.  (EXPERIMENTAL)
320
321    --enable-redhat-buildsys
322        Enable compilation of the kernel module for the Red Hat build
323        system kernel.  Use this configure flag when building kernel
324        modules for Red Hat Linux systems.
325
326    --enable-reduced-depends
327        Try to minimize the shared library dependencies encoded in the
328        binaries.  This omits from the link line all the libraries included
329        solely because the Kerberos libraries depend on them and instead
330        links the programs only against libraries whose APIs are called
331        directly.  This will only work with shared Kerberos libraries and
332        will only work on platforms where shared libraries properly encode
333        their own dependencies (such as Linux).  It is intended primarily
334        for building packages for Linux distributions to avoid encoding
335        unnecessary shared library dependencies that make shared library
336        migrations more difficult.  If none of the above made any sense to
337        you, don't bother with this flag.
338
339    --enable-supergroups
340        Enables support of nested groups in the ptserver.  WARNING: Once
341        you make use of this option by nesting one group inside another,
342        the resulting PTS database cannot be correctly and safely used by a
343        ptserver built without this option.  If some of your ptservers were
344        built with this option and some without this option, you will
345        probably corrupt your PTS database.
346
347    --enable-tivoli-tsm
348        Build with the Tivoli TSM API libraries for butc support of the
349        Tivoli backup system.
350
351    --enable-transarc-paths
352        As discussed in A2 above, build for the traditional paths used by
353        the Transarc and IBM AFS distributions instead of the more typical
354        open source /usr/local paths.  Passing this option to configure and
355        then running make dest will generate, in the dest directory, the
356        set of files and directory layout matching a Transarc or IBM AFS
357        tape distribution.
358
359    --enable-warnings
360        Enable compilation warnings when built with GCC.  This is similar
361        to --enable-checking, but new warnings will only be displayed, not
362        cause a build failure.
363
364    It's also possible to disable some standard features.  None of these
365    options are normally needed, but they may be useful in unusual
366    circumstances:
367
368    --disable-kernel-module
369        Even if kernel headers are found, do not attempt to build the
370        kernel module.  On Linux, if you provide this flag, you'll also
371        need to provide --with-afs-sysname, since OpenAFS cannot determine
372        the correct sysname automatically without the kernel headers.
373
374    --disable-optimize
375    --disable-optimize-kernel
376    --disable-optimize-lwp
377    --disable-optimize-pam
378        Disable optimization for the given portion of the OpenAFS code.
379        Usually used either for debugging to avoid code optimization making
380        it harder to use a debugger, or to work around bugs in the compiler
381        optimizers or in the OpenAFS code.
382
383    --disable-pam
384        Do not build the AFS PAM modules.  Normally building them is
385        harmless, but the PAM modules that come with OpenAFS are deprecated
386        and should not be used unless you're still using the OpenAFS
387        kaserver (which is itself deprecated and should not be used).
388
389    --disable-strip-binaries
390        Disable stripping of binaries on installation.  You probably want
391        to use --enable-debug instead of this flag to also inclusion of
392        debugging information.
393
394    --disable-unix-sockets
395        Disable use of UNIX domain sockets for fssync.  A TCP connection to
396        localhost will be used instead.
397
398    You may need to pass one or more of the following options to specify
399    paths and locations of files needed by the OpenAFS build process or
400    additional information required by the build process:
401
402    --with-afs-sysname=SYSNAME
403        Specifies the AFS sysname of the target system is SYSNAME.
404        Normally this is determined automatically from the build
405        architecture plus additional information (such as, on Linux, from
406        the kernel headers).  The SYSNAME should be one of the options
407        listed in A2.
408
409    --with-gssapi=DIR
410    --with-gssapi-include=DIR
411    --with-gssapi-lib=DIR
412    --with-krb5[=DIR]
413    --with-krb5-include=DIR
414    --with-krb5-lib=DIR
415        Normally, OpenAFS will automatically build with Kerberos support if
416        Kerberos is found during the build.  If your Kerberos libraries are
417        in an unusual location, however, you may need to pass one or more
418        of these flags.  --with-krb5 forces building with Kerberos support
419        if given and will cause configure to fail if Kerberos is not found.
420        You may optionally specify the root path to your Kerberos
421        installation as an argument to --with-krb5.
422
423        If you have a krb5-config script, it's used to find the flags to
424        build with Kerberos.  If you have no krb5-config script, you can
425        specify the location to the include files with --with-krb5-include
426        and the libraries with --with-krb5-lib.  You may need to do this if
427        Autoconf can't figure out whether to use lib, lib32, or lib64 on
428        your platform.
429
430        --with-gssapi is similar, except for the GSS-API libraries instead
431        of the Kerberos libraries.  If you have to manually set the
432        location of the Kerberos libraries, you may need to do the same
433        thing for the GSS-API libraries.
434
435    --with-libintl=DIR
436    --with-libintl-include=DIR
437    --with-libintl-lib=DIR
438        Specifies the install location of the libintl library, used for
439        internationalization, or separately specifies the location of the
440        header files and libraries.  By default, the default system library
441        paths will be searched.  This library is not required on many
442        platforms.
443
444    --with-roken=PATH
445    --with-roken=internal
446        Specifies the install location of the libroken library.  Specify
447        "internal" to use the embedded libroken library that comes with
448        OpenAFS (the default).  This option is primarily useful for
449        building against a system libroken library if you have one.
450
451    --with-linux-kernel-build=PATH
452    --with-linux-kernel-headers=PATH
453    --with-bsd-kernel-build=PATH
454    --with-bsd-kernel-headers=PATH
455        Specifies the path to the kernel headers and build system.  See the
456        information above for Linux and *BSD systems.
457
458    --with-linux-kernel-packaging
459        Tells the OpenAFS kernel module build system to use conventions
460        appropriate for building modules to include in Linux kernel module
461        packages.  Primarily, this renames the kernel module to openafs.ko
462        rather than libafs-<VERSION>.ko, which is easier to handle in Linux
463        distribution init scripts.
464
465    --with-docbook2pdf=PROGRAM
466        Specifies the program used to convert the DocBook manuals to PDF.
467        Supported choices are fop, dblatex, and docbook2pdf.  By default,
468        the user's path is searched for those programs in that order, and
469        the first one found is used.
470
471    --with-docbook-stylesheets=PATH
472        The location of the DocBook style sheets, used to convert the
473        DocBook manuals to other formats.  By default, a set of likely
474        paths are searched.
475
476    --with-html-xsl=PATH
477        Specifies the XSLT style sheet to convert DocBook manuals into
478        HTML.  The default is html/chunk.xsl.  You may wish to use
479        html/docbook.xsml instead.
480
481    --with-xslt-processor=PROGRAM
482        Specifies the XSLT processor to use to convert the DocBook manuals
483        into HTML.  Supported choices are libxslt, saxon, xalan-j, and
484        xsltproc.  By default, the user's path is searched for those
485        programs in that order, and the first one found is used.
486
487    There are also some environment variables that you can set to control
488    aspects of the build.  They can be set either on the configure command
489    line (preferred) or in the environment.
490
491    CC
492        The C compiler to use.  Be aware that this is overridden on some
493        architectures that require a specific compiler be used to build the
494        kernel module.
495
496    CFLAGS
497        Additional flags to pass to the C compiler.
498
499    CPP
500        The C preprocessor to use.  Defaults to cpp if found, otherwise
501        $CC -E.
502
503    CPPFLAGS
504        Additional flags to pass to the C preprocessor or compiler.  This
505        is where to put -I options to add paths to the include file search.
506
507    FUSE_CFLAGS
508        Compiler flags required for building applications that use FUSE.
509
510    FUSE_LIBS
511        Libraries required for linking applications that use FUSE.
512
513    KRB5_CONFIG
514        To specify a particular krb5-config script to use, either set the
515        KRB5_CONFIG environment variable or pass it to configure like:
516
517            ./configure KRB5_CONFIG=/path/to/krb5-config
518
519        To not use krb5-config and force library probing even if there is a
520        krb5-config script on your path, set KRB5_CONFIG to a nonexistent
521        path:
522
523            ./configure KRB5_CONFIG=/nonexistent
524
525    LDFLAGS
526        Additional flags to pass to the linker.  This is where to put -L
527        options to add paths to the library search.
528
529    LIBS
530        Additional libraries to link all userspace programs with.
531
532    PKG_CONFIG
533        The path to the pkg-config utility.  Currently, this is only used
534        to locate the flags for building the FUSE version of afsd.
535
536    YACC
537        The yacc implementation to use.  Defaults to bison, byacc, or yacc,
538        whichever is found first.
539
540    YFLAGS
541        Additional flags to pass to yacc.