Some warnings removed.
[wxWidgets.git] / docs / motif / install.txt
1 wxWindows 2.0 for Motif installation
2 ------------------------------------
3
4 - Prerequisites: Motif 1.2 or above, or Lesstif
5   (not yet tested). Motif 2.0 and above may also be suitable.
6
7 - Download the files wx200gen.zip and wx200mot.zip, and
8   documentation in a preferred format, such as wx200htm.zip
9   or wx200pdf.zip.
10
11 - Make a directory such as ~/wx and unzip the files into this
12   directory. Use the -a option if available to convert the ASCII
13   files to Unix format. Don't worry about files being
14   overwritten: they should be identical anyway.
15
16 - It is recommended that you install bison and flex; using yacc
17   and lex may require tweaking of the makefiles. You also need
18   Xpm (see comments in the Notes section below).
19
20 - You now have the option of using the configure-based system,
21   or the simple makefile system. Configure is more hard to debug
22   if things go wrong, but may be easier to use if they go OK :-)
23   Makefiles are easier to tweak.
24
25 COMPILING USING CONFIGURE
26 =========================
27
28 - You can use the wxGTK configure system to make wxMotif, or
29   you can follow the following steps to use the simpler (but
30   less automatic) makefile system. If using configure, the
31   following script should make the library and samples, when
32   run from the top-level wxWindows directory (see also 'makewxmotif'
33   in this directory). Make this script executable with the command
34   chmod a+x makewxmotif.
35
36   -------:x-----Cut here-----:x-----
37   # makewxmotif
38   # Sets permissions (in case we extracted wxMotif from zip files)
39   # and makes wxMotif.
40   # Call from top-level wxWindows directory.
41   # Note that this uses standard (but commonly-used) configure options;
42   # if you're feeling brave, you may wish to compile with threads.
43   # -- Julian Smart
44   chmod a+x configure config.sub config.guess setup/general/* setup/shared/*
45   ./configure --with-shared --with-motif --without-gtk --with-debug_flag --with-debug_info --without-threads
46   make makefiles
47   make
48   -------:x-----Cut here-----:x-----
49
50   This script will build wxMotif using shared libraries.
51
52 - Change directory to a sample e.g. samples/minimal, and type make.
53   The binary will end up under the Linux (or other appropriate) subdirectory.
54
55 - To build an application outside the wxWindows hierarchy, you can
56   use `wx-config --cflags` when compiling source files and `wx-config --libs`
57   when linking, where wx-config is in the wxWindows root directory.
58   These invocations return the appropriate flags for the compiler.
59
60 - When compiling certain utilities such as Dialog Editor, you may find
61   that the makefile refers to wx-config as above. Unless you have used
62   "make install" to install wxWindows, wx-config won't be found, so
63   either edit the makefile to hard-wire the flags, or place wx-config
64   where it will be found by the makefile.
65
66 COMPILING USING MAKEFILES
67 =========================
68
69 - Choose a .env file from src/makeenvs that matches your
70   environment, and copy it to src/make.env. These are the
71   settings read by wxWindows for Motif makefiles.
72
73 - Edit src/make.env to change options according to your local
74   environment. In particular, change WXDIR to where wxWindows is
75   found on your system, or set the WXWIN environment variable
76   before compilation, e.g.:
77
78     export WXWIN=/home/jacs/wx2
79
80   Please feel free to contribute settings files for your environment.
81
82 - Change directory to src/motif and type:
83
84     make -f makefile.unx motif
85
86   This should make the library libwx_motif.a in the lib
87   directory. Note that this makefile system does not build shared
88   libraries, only static ones (that is, the wxWindows library will be
89   linked statically; to see remaining dependencies on shared libraries,
90   type e.g. ldd minimal_motif).
91
92 - Make a sample, such as the minimal sample:
93
94     cd samples/minimal
95     make -f makefile.unx motif
96
97   and run the resulting minimal_motif binary.
98
99 Notes:
100 ------
101
102 - Better installation and makefile systems are
103   required. A revised configure system is in preparation.
104
105 - Debugging mode is switched on by default. To compile in non-debug
106   mode, remove the -D__WXDEBUG__ switch in make.env (or if using the
107   configure system, change --with-debug_flag to --without_debug_flag
108   and --with-debug_info to --without-debug_info in the makewxmotif
109   script).
110
111 - Some classes can be switched off in include/wx/motif/setup.h,
112   if you are having trouble with a particular file. However,
113   I'd prefer you to fix the problem and send the fix to me :-) or at
114   least let me know about it.
115
116 - Thread support is switched off by default in setup.h (wxUSE_THREADS)
117   because standard Unices often do not have the necessary thread library
118   installed. Please see ../docs/gtk/install.txt for more details on this.
119   For Linux, the problem is expected to go away with future
120   distributions of the operating system.
121
122 - If you have trouble compiling the file y_tab.c, or have strange
123   linking errors, check whether you're using a C or C++ compiler for this file.
124   You should specify a C compiler in the CCLEX variable in src/make.env.
125
126 - If you run into problems with a missing X11/Xpm.h header, you
127   need to install the XPM package. It can be obtained from:
128
129   ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
130   http://sunfreeware.com
131
132   You may need to modify make.env to add -I and -L options pointing to where Xpm
133   is installed and possibly change bitmap.cpp to
134   include <xpm.h> instead of <X11/xpm.h>
135
136   Alternatively, edit include/motif/setup.h, set wxUSE_XPM
137   to 0, and recompile. You will not be able to load any XPMs,
138   though (currently the only supported colour bitmap format).
139
140 - Please send bug reports with a description of your environment,
141   compiler and the error message(s) to the wxwin-users mailing list at:
142
143     wxwin-users@wx.dent.med.uni-muenchen.de
144
145
146 Julian Smart, January 1999.
147 julian.smart@ukonline.co.uk