The following are required to compile and use MGv:
ftp://prep.ai.mit.edu/pub/gnu
ftp://prep.ai.mit.edu/pub/gnu
tools/
directory (the perl and
m4 scripts will almost never get used by anyone but me).tools/sgml-tools-0.99.0.patch
) if you want to duplicate the
look of my documents.
If you have the necessary tools in place, you are ready to build MGv:
make
subdirectory and copy or link the appropriate
sys.*.mk
file to sys.mk
; if there isn't one for your system,
start with sys.TEMPLATE.mk
and fill in the blanks (sending a copy
to mu@trends.net
would be appreciated).
I could have used Imake for this but Imake is really disgusting when
it works and a complete mess when it doesn't; I've had far too many
problems with Imake to bother with it. I could have used GNU autoconf
to generate a configure script but I like to use pretty strict compiler
flags and I don't think autoconf can do that for me.sys.mk
to make sure it is sane for your system.
If you don't have the Xpm library installed, set mk-xpm to
no and remove -lXpm
from libs.
If you have CDE, set mk-cde to yes; otherwise, set it to
no (the CDE option doesn't do anything yet but it will be
used in the future for the help system). If you have libhelp,
you can activate libhelp support by setting mk-libhelp to
yes and fixing up the include and link paths as needed.MGv.ad.sgi
to MGv.ad
if you want to try and use SGI schemes. Keep in mind that the
font changes in the page list don't work with SGI schemes yet
so you won't be able to tell which pages are marked. If anyone
can help me with this, I would appreciate it. If you use
the normal MGv.ad
file, things should work just fine./usr/local/lib/mgv
)
before installing the new version. Then execute the install
target to install everything. There are also install-bin,
install-man, install-ad, and install-doc targets
if you only want to install parts of MGv./usr/X11/lib/app-defaults/MGv
or something similar) before running
MGv; if you don't, MGv will warn you about it and the user interface
will be really screwed up. If you have just compiled a new version of
MGv and you haven't installed it yet, you can set the XENVIRONMENT
environment variable to temporarily fix the version problem:
XENVIRONMENT=MGv ./mgvHowever, you really should delete the old application defaults file anyway (none of the MGv versions need it, they all compile the whole thing in as defaults anyway).
There shouldn't be any problems compiling MGv but if there are, you might
have to defined _POSIX_SOURCE and/or _XOPEN_SOURCE to get at
popen(3) (POSIX.2 says it is there (at least HP's man pages claim this)
and everyone has it but not everyone's headers agree; in particular, SCO
forced me to use -a xpg4
to get popen()). You might have to fiddle
with the FDOPEN_BY_HAND and BUSTED_SYS_TYPES macros as well due
to the sorry mess that is in some vendor supplied header files (all praise
exclusive (as opposed to just inclusive) standards compliance testing).
The clean target will remove most intermediate files and the
realclean target will remove everything that can be generated (note
that the realclean target is equivalent to the clean target in
the doc
directory in the released versions).
Porting to new platforms should be easy if you have the required libraries and
an ANSI compiler.
If you lack any of these, you'll have to get them or abandon MGv.
I have found that popen() and the socket stuff in
wlib/wlib/dirtysocks.h
causes the grief. You can usually get at
popen() by using -D_XOPEN_SOURCE (be careful about what this might
do to POSIX things though). If you're having trouble with the socket code,
look at the stuff in the other sys.*.mk
files for work arounds.
Of course, you are welcome to hack the sources for your system and send
patches to the author.
I have personally compiled and used MGv on the following platforms:
AIX 4.1 with gcc-2.7.2/xlc.
OSF/1 4.0 (Digital Unix) on a DEC Alpha with cc/gcc-2.7.2
Dynix/ptx 4.1.2 with cc.
HP-UX 9.05 with c89/gcc-2.7.2
Irix 6.2 with cc -32.
Linux with gcc 2.7.2, libc 5, Mootif 2.0.1 (ELF).
AT&T MP-RAS running NCR unix 3.0 with cc/gcc-2.7.2.
SCO 5.0 with cc (ELF).
Siemens Nixdorf Sinix 5.42 with c89.
Solaris 2.4/2.5 with SPARCompiler cc/gcc-2.7.2.