NEXTSTEP is lacking quite a few commands used by mgetty and its tools: Luckily, they are available from the GNU project (please mail me if I forgot any), e.g. gawk, cut (from textutils), id and logname (from sh-utils). All of them can be compiled for NEXTSTEP without problems, and it’s certainly a good idea to install them anyway. ghostscript needs some fiddling for NEXTSTEP, but it’s available precompiled on the arcives as GSPrintFilter. If you don’t intend to use faxspool and friends, you may succeed without installing the forementioned utilities.
Having said this, there are two different ways to compile
for NEXTSTEP, each with their pros and contras:
mgetty’s termios interface (the default), you have to link against NEXTSTEP’s buggy POSIX library.
In the Makefile, add "-posix -DBSD" to CFLAGS and LDFLAGS.
Drawbacks: The log file will be corrupted due to an append bug in libposix.
Use this only if you want to try vgetty. In all other cases it’s probably better to choose the second variant:
mgettyport using the BSD sgtty style interface to the serial ports. This port doesn’t need the POSIX library.
In the Makefile, add "-DNEXTSGTTY -DBSD".
This port has been tested with m68k and i386 machines.
For i386 machines, you may want to use the /bin/login replacement
mgetty’s contrib directory. NEXTSTEP’s login
has problems with 8-bit logins. I’ve got one report from Ben Stuyts,
though, that ‘modem-login’ does fix problems on “Black NeXT”s as
well. Just try it.
Drawback: You can’t compile vgetty with sgtty support yet! If you want to use vgetty with NEXTSTEP, you’ll have to stick with the termios port. There are problems with the LNOHANG bit not being acknowledged correctly, therefore hanging the modem when the caller hangs up.
For i386 machines, it’s wise to use the /dev/cudfX (hardware flow control,...) devices. I’m using them with NeXT’s most recent serial port driver, Mark Salyzyn’s Mux driver also supports them.
For m68k machines, you have to stick with /dev/cufa.
This are the settings I use in the Makefile:
CC=cc CFLAGS=-DNEXTSGTTY -DBSD -O2 (-posix -DBSD for termios port) INSTALL=install -c -o root -g wheel spool=/usr/spool SBINDIR=$(prefix)/etc ECHO="mg.echo" INSTALL_MECHO=mg.echo AWK=gawk
Furthermore, you should define binary lock files, in policy.h:
#define LOCKS_BINARY 1
Finally, when using NEXTSTEP’s cc, you need to run "make noident" in the first place to remove the #ident directives from the source files.
If you have questions, comments or suggestions regarding
NEXTSTEP, feel free to contact Gregor Hoffleit
‘firstname.lastname@example.org’ or Ben Stuyts
How to use
mgetty to send faxes via the NEXTSTEP fax panel
(using Kevin Peckover’s ps2g3 package, available as ‘ftp://peanuts.leo.org/pub/next/Tools/postscript/ps2g3.s.tar.gz’).
How to patch and use
mgetty to spool received faxes in the NEXTSTEP