Revision history :
Readers that have (or are interested in) a binary version of LessTif can jump to section 5.b immediately. It also explains where to get the binary (pre-compiled) versions of LessTif.
Table of Contents:
If you have any corrections/additions/comments about this document, please send E-mail to lesstif@hungry.com.
Lesstif is meant as a source compatible replacement/alternative to Motif 1.2. As such, it will have the same requirements as Motif 1.2. As far as we know, the only requirement that Motif 1.2 has is that you have X11R5 on your system. Lesstif will _not_ compile with R4 or earlier. If you have X11R5 or above, you should be able to compile and run LessTif programs.
What this means is that all you folks out there with Sun's running SunOS 4.x that haven't uprgraded your X11 release to R5 -- don't use /usr/openwin. That's R4 stuff, and won't work with LessTif. Please don't send bug reports about this, because there is no way we can write LessTif and remain source compatible with R4 or earlier.
If you're going to be doing development work with LessTif, building the dependencies for the library files is a necessity. You must have 'makedepend' to do this. This should be standard on any machine with R5, but if you can't find it, get it from ftp.x.org (try in /pub/R6untarred). If you don't have makedepend in your path, make depend' will not work.
Lastly, you will need an ANSI-C compiler to build Lesstif. If you have GNU CC, you're set.
Check later sections in this document to get platform-specific instructions for building on FreeBSD, Linux, and OS/2.
Currently, LessTif is known to build and execute on the following platforms:
OS Version CPU Compiler X Version ---------------------------------------------------------------------------- Linux 2.0.25 Pentium GCC-2.7.2.1 X11R6.1 (XFree86-3.2) 486 GCC-2.7.1 X11R5 2.0.0 486 gcc-2.7.2 X11R6 (XFree86-312) 2.0.18 Alpha gcc-2.7.2 X11R6 2.0.20 68030 gcc-2.7.2 X11R6 (Xfree86-3.2) (other 2.0.x kernels have been tested) MkLinux 2.0.21 PowerPC gcc-2.7.2 X11R6.1 Solaris 2.4 SPARC GCC-2.7.2.1 X11R5 2.5 SPARC GCC-2.7.2 X11R5 SunOS 4.1.4 SPARC GCC-2.7.2 X11R6.1 FreeBSD 2.1.5-RELEASE 386, 486 gcc-2.6.3 X11R6 2.1 Intel GCC-2.6.3 X11R6 2.2-SNAP Intel GCC-2.6.3 X11R6 2.2-961006-SNAP Pentium GCC-2.7.2.1 X11R6.1 OpenBSD 2.0 i486 GCC-2.7.2.1 X11R6.1 2.0 m68k (Sun3) GCC-2.7.2.1 X11R6 2.1 Pentium GCC-2.7.2.1 X11R6.3 (Xfree86-3.3) 2.1 Sparc GCC-2.7.2.1 X11R6.3 (w/NCD Xterm) 2.1 mvme68k GCC-2.7.2.1 X11R6.3 (w/NCD Xterm) NetBSD 1.2 m68k (Amiga 3000) GCC-2.7.2 X11R6.1 1.2(B) SPARC GCC-2.7.2 X11R6, X11R6.1 OS/2 Warp Pentium GCC-2.7.2 (EMX) X11R6.1 (XFree86-3.2) Digital UNIX 4.0 Alpha GCC-2.7.2 X11R6 AIX 4.1.x ?? (assume RS6K) gcc-2.6.? X11R5 3.25 ?? (assume RS6K) gcc-2.6.?/cc X11R5 HP-UX 9.0.4 HP PA HP cc X11R5 SVR4 R40V4.3 mc88100 GCC-2.5.8 X11R5 ------------------------------------------------------------------------------
Notes:
Configuration of LessTif is now handled by GNU automake, GNU libtool, and GNU autoconf. [Historical note: at one time, there was an Imakefile package contributed by Paul Hoad; this package was not maintained, and has been removed.]
Automake, libtool, and autoconf are tools which the LessTif developers use to generate the distribution's build scripts and makefiles. Normally this shouldn't bother you. The end result is that there are a bunch of Makefile.in files, and a "configure" script.
Configure is a script which is meant to be run by people who compile LessTif (you, probably). It looks at your system and figures out how exactly to compile. It may need a little help through command-line options, see below.
To configure LessTif for your system, just type 'configure'. This should do a reasonable job of locating the stuff it needs, and gives rather verbose output should something fail.
Two things that configure looks for on your machine are:
Now many people who have Motif on their system don't use LessTif. Hmm. Wonder why that is. Anyway, it wouldn't make much sense if you needed Motif in order to build LessTif. The good news is : you don't need it. The only reason why you can tell configure where to find Motif stuff is so it can configure the Makefiles under test/ to be capable of building LessTif as well as Motif tests.
Configure will tell you where it has found them if it found them. If it didn't find X, you'll have to specify the path on configure's command line. Use these two options:
--x-includes --x-libraries
And to specify the Motif stuff, use these:
--with-motif-includes --with-motif-librariesTo specify the location of the various bits, you have to set these flags equal to something. An example on how to do this is:
configure --x-includes=/usr/local/X11R5/includeThe other flags behave identically.
NOTE: On an HP/UX system that we have access to, the command line that we used to configure LessTif is :
CC="cc -Ae" configure --disable-static --x-includes=/usr/include/X11R6 --x-libraries=/usr/lib/X11R6
There are also other flags available on the command line. Each of these can take on either a 'yes' or 'no' value. They are:
You can type
configure --helpto get the list of all options, with a short description of each.
There were also two options to allow building Motif 2.1 or CDE compatible versions of LessTif; these were removed because they didn't work.
After configuring LessTif, just typing 'make' should build all the libraries, clients, and (optionally) tests for LessTif. To build libraries or other things only, just cd to the directory in which you want to build things, and type 'make'. Dependencies have been set up so that the libraries will be recompiled if they are old (or haven't been compiled yet), so typing make from within a test directory will rebuild what needs to be rebuilt.
Some combinations of compilers and libraries may have code generation bugs. For example, gcc-2.7.0 on a Solaris platform has known problems if the library is compiled with an optimization greater than -O (-O1). If you see weird problems when you debug library code, try a lower (or no) optimization. For the vast majority who compile with the default flags (-g for GNU-C), this is not an issue.
Installing LessTif is as easy as typing 'make install'. Getting shared libraries to work on your machine after installation depends on your OS. Fortunately we're using libtool to solve the platform-dependencies problems for us.
Binary versions currently exist for Linux, FreeBSD, OS/2.
The primary source for LessTif ( ftp://ftp.lesstif.org/pub/hungry/lesstif) contains three different things :
Starting with the 0.80a (0.80 pre-release), the FreeBSD binary distribution is provided as a pkg_add installable file.
Pkg_add(8) is FreeBSD's installation tool.
Installation of LessTif with pkg_add creates a directory /usr/lesstif, under which all of LessTif is placed. As the file /usr/lesstif/README explains, you should put /usr/lesstif/bin in your $path, add /usr/lesstif/lib to your LD_LIBRARY_PATH or to the options of ldconfig in /etc/rc, and point your compiler to include files and libraries by adding
-I/usr/lesstif/include -L/usr/lesstif/libto its command line. See also below.
From Matthew Simpson<msimpson@wans.net>:
Lesstif Binary Installation
The following procedure worked for installing the binary version 0.82 Lesstif onto my Redhat 4.2 Linux system. I did not have a previous installation of either the source or binary Lesstif, so this works from scratch. I am documenting this days later, so please correct as needed. The binary installation is simple:
Lesstif Window Manager:
To ignore your default window manager and instead load mwm, make or copy these files as yourself or root (whichever you use) to your home directory:
When setting up these two files I did not have a Lesstif mwm manual page available. However, if you have Unix and Motif available at work (such as on SGI products), just do a man on mwm and print it out for reference. Most will apply to Lesstif mwm. (Even though SGI uses their own version called 4Dwm, they still provide the mwm manual pages with the IRIX 6.2 release.)
Matt Simpson
The OS/2 binary distribution is provided as an InfoZip file. Go to your X11ROOT and unzip the archive.
If you want to build LessTif for XFree86/2 you have to use OS/2 specific Makefiles. They are available from http://www.ime.rwth-aachen.de/~michael/os2/lt/lesstif.html.
Shared library configuration differs from system to system. Here is the lowdown on getting them to work on the systems that support them.
The LD_LIBRARY_PATH variable is to contain a colon separated list of paths to be searched for shared libraries. This variable is consulted before the information compiled by ldconfig, so even if you have LessTif already installed on your system you can use this variable to force the use of the newly built library.
An example setting for LD_LIBRARY_PATH:
$ LD_LIBRARY_PATH=/home/toshok/lesstif/libXm:/home/toshok/lesstif/libMrm $ export LD_LIBRARY_PATHIf you have superuser access and want LessTif to be installed for system- wide use, make sure the directory to which the libraries were installed is listed in /etc/ld.so.conf. Then (as root) type 'ldconfig -v' to make them available.
If you're not sure which library is being used (either the system-wide installed one, or one you've just compiled), use the 'ldd' command. After generating an executable linked dynamically with LessTif, type 'ldd <executable-name>'. This will output a list of the paths to all the shared libraries this executable depends on.