-
Notifications
You must be signed in to change notification settings - Fork 191
Building and installing
Heimdal uses GNU Autoconf to configure for specific hosts, and GNU Automake to manage makefiles.
If this is new to you the short instruction is to run the configure script in the top level directory and when that finishes make.
If you want to build the distribution in a different directory from the source directory, you will need a make that implements VPATH correctly, such as GNU make.
- A compiler that supports a “loose” ANSI C mode, such as
gccorclang -
lexorflex awk-
yaccor (yaccvia)bison - a socket library
- Berkeley DB or any of the BDB replacements for building the server side. NDBM on Solaris does not support large data, so there is no write support for NDBM any longer.
- Perl with JSON.pm
- Python
If everything is in place:
$ sh autogen.sh # if building from git
$ ./configure
$ make
When everything is built, you can install by doing
$ make install
The default location for installation is /usr/heimdal, but this can be changed by running ./configure with --prefix argument.
$ ./configure --prefix=/some/other/place
If you need to change the default behavior, configure understands the following options:
-
--without-berkeley-db: DB is preferred before NDBM, but if you for some reason want to use NDBM instead, you can use this option. -
--disable-otp: By default some of the application programs will build with support for one-time passwords (OTP). Use this option to disable that support. -
--with-readline=dir: Gives the path for the GNU Readline library, which will be used in some programs. If no readline library is found, the (simpler)editlinelibrary will be used instead. -
--with-hesiod=dirEnableshesiodsupport inpush. -
--without-ipv6Disable the IPv6 support. -
--with-openldapCompile Heimdal with support for storing the database in LDAP. Requires OpenLDAP. -
--enable-bigendianor--enable-littleendian: Normally, the build process will figure out by itself if the machine is big or little endian. It might fail in some cases when cross-compiling. If it does fail to figure it out, use the relevant of these two options. -
--disable-mmap: Do not use themmapsystem call. Normally, configure detects if there is a workingmmapand it is only used if there is one. Only try this option if it fails to work anyhow.
This description uses NetBSD® as a guide to cross compile Heimdal. We use NetBSD to show how do do it because NetBSD is very friendly to cross compilers.
We assume you are running as root on a i386 installation for simplicity.
- Download NetBSD
evbarmpackages forbase.tgzandcomp.tgzand unpack them:$ mkdir /root/evbarm $ for a in base comp ; do \ ftp http://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.1/evbarm/binary/sets/$a.tgz; \ $ tar zxCf /root/evbarm $a.tgz ; \ done - Download NetBSD compiler source packages:
src.tgz,gnusrc.tgz,sharesrc.tgz,syssrc.tgz$ for a in src gnusrc sharesrc syssrc ; do \ ftp http://ftp.netbsd.org/pub/NetBSD/NetBSD-5.0.1/source/sets/$a.tgz; \ tar xvCf / $a.tgz; \ done - Build cross compiler:
$ mkdir /usr/obj $ cd /usr/src $ ./build.sh -m evbarm tools - Add tools to
PATH$ PATH=/usr/src/tooldir.NetBSD-5.0.1-i386/bin:$PATH - Get Heimdal source:
$ cd $ git clone git://svn.h5l.org/heimdal.git $ cd heimdal $ autoreconf -f -i - Build native Heimdal, builds needed tools
$ mkdir native $ cd native $ ../configure --prefix=/usr/heimdal $ make $ make install $ cd .. $ cp /usr/heimdal/bin/compile_et /usr/heimdal/libexec/heimdal/ - Cross compile Heimdal and install.
The
-XCClinkerand perl snipet is to convince libtool to cross compile properly.$ mkdir evbarm $ cd evbarm $ ../configure --disable-shared --prefix=/usr/heimdal --host=arm--netbsdelf \ --with-cross-tools=/usr/heimdal/libexec/heimdal CPPFLAGS='-nostdinc -isystem /root/evbarm/usr/include' \ LDFLAGS='-XCClinker -B/root/evbarm/usr/lib' $ perl -pi -e 's@(^sys_lib_search_path .*)"$\1 /root/evbarm/usr/lib"' libtool $ make $ make install DESTDIR=/root/evbarm $ file /root/evbarm/usr/heimdal/bin/kinit