Lynx Installation Guide This file describes how to compile and install Lynx. A description of Lynx can be found in the README file. Lynx has been ported to UN*X, VMS, Win32 and 386DOS. The procedures for compiling these ports are quite divergent and are detailed respectively in Sections II, III, IV and V. General installation, problem solving and environment variables are covered in Sections VI and VII. There is also a PROBLEMS file in the same directory as INSTALLATION which contains advice for special problems people have encountered, especially for particular machines and operating systems. If you still have difficulties, send an e-mail message to the Lynx-Dev mailing list (see the README file). Try to include information about your system, the name and version of your compiler, which curses library you are using and the compile-time errors. Be sure to say what version and image-number of Lynx you are trying to build (alternately the top date of the CHANGES file). If you don't understand what one of the defines means, try the README.defines and *.announce files in the docs subdirectory. The docs/CHANGES* files record the entire development history of Lynx and are an invaluable resource for understanding how Lynx should perform. First, you must configure Lynx for your system regardless of the port you use. Follow the instructions given immediately below to configure for your system, and then go to the respective section concerning the port you wish to compile. I. General configuration instructions (all ports). Step 1. (define compile-time variables -- See the userdefs.h file.) There are a few variables that MUST be defined, or Lynx will not build. There are a few more that you will probably want to change. The variables that must be changed are marked as such in the userdefs.h file. Just edit this file, and the changes should be straight forward. If you compile using autoconfigure, you can set most defines with option switches and do not absolutely have to edit userdefs.h. Many of the variables are now configurable in the lynx.cfg file, so you may set them at run-time if you wish. Lynx implements Native Language Support. Read "ABOUT-NLS" if you want to build an international version of Lynx or tailor the statusline prompts, messages and warnings to the requirements of your site. Step 2. (define run-time variables -- See the lynx.cfg file for details.) Set up local printers, downloaders, assumed character set, key mapping, and colors in the lynx.cfg file. Please read "lynx.cfg" thoroughly as many of the features of Lynx, and how to use them, are explained. Also see the example mime.types, mailcap and jumps files in the samples subdirectory. Lynx MUST be able to find the lynx.cfg file at start-up. The location of the lynx.cfg file may be compiled in with the LYNX_CFG_FILE defined in userdefs.h (or with the configure option explained in the Unix section below), specified with an environment variable, LYNX_CFG, or specified with the "-cfg" command line option. Step 3. (You may skip this step if you are not interested in any special characters and any local files or WWW pages you will view all use the ISO-8859-1 "ISO Latin 1" Western European character set.) People who will be running Lynx in an environment with different and incompatible character sets should configure CHARACTER_SET (the Display character set) and ASSUME_LOCAL_CHARSET to work correctly for them before creating bookmark files et cetera. Read "lynx.cfg" for detailed instructions. Additional character sets and their properties may be defined with tables in the src/chrtrans directory, see the README.* files therein. Step 4. (optional -- news for UNIX and VMS) Set NNTPSERVER in "lynx.cfg" to your site's NNTP server, or set the environment variable externally. For news posting ability to be enabled in Lynx, the NEWS_POSTING symbol must be defined to TRUE in userdefs.h or lynx.cfg. Also define LYNX_SIG_FILE in userdefs.h or lynx.cfg so that it points to users' signature files for appending to posted messages. Step 5. (Anonymous account -- VERY IMPORTANT!!!!! -- ) If you are building Lynx for your personal use only you may skip this step. If you are setting up an anonymous account with Lynx, you are STRONGLY advised to use the -anonymous command line option. If you do not use this option, users may be able to gain access to all readable files on your machine! ALSO NOTE that many implementations of telnetd allow passing of environment variables, which might be used by unscrupulous people to modify the environment in anonymous accounts. When making Web access publicly available via anonymous accounts intended to run Lynx captively, be sure the wrapper uses the -cfg and -homepage switches to specify the configuration and start files, rather than relying on the LYNX_CFG, LYNX_CFG_FILE, or WWW_HOME variables. II. Compile instructions -- UNIX 1a. Auto-configure. The auto-configure script uses autoconf2.12 to generate a Bourne shell script, configure, which creates "makefile" and "lynx_cfg.h". If you are on a UNIX platform, the easiest way to build Lynx is to type: ./configure and make NOTE: Configure has a number of useful options. Please see below. NOTE: The 'configure' script generates auxiliary files "config.status" "config.cache" and "config.log". Normally you will not notice these; they are created automatically and removed by a "make distclean". + If you wish to rebuild Lynx with a new host, or change ANY of the parameters which are stored in config.cache, you MUST first remove the config.cache file before running configure; its options do NOT override the settings in that file. + The config.status file is a script which creates (or regenerates) the files created by the configure script. Please report problems in the configure/make process by including a copy of config.status, config.cache and config.log, as well as the pertinent compiler diagnostics. NOTE: Lynx is a curses-based application, so you must have a curses library available to link to. Native curses (on the system when it was installed) are often broken, so you may get superior performance if you have either "ncurses" ("ftp://ftp.clark.net/pub/dickey/ncurses") or "slang" ("ftp://space.mit.edu/pub/davis/slang"). If you install these libraries in your home directory or a non-default location, you may need to set the CPPFLAGS (full path to include files) and LIBS (full path to library files) environment variables BEFORE running configure. See "1d. Environment". Use the "--with-screen=ncurses" or "--with-screen=slang" option. Note that while lynx will build with a variety of versions of curses and ncurses, some will be less satisfactory. Versions of ncurses before 1.9.9g will not render color properly. Some other versions of curses do not display color at all. Likewise, lynx may not build with old versions of slang, e.g., before 0.99-38, because slang's interfaces change periodically. Note compiler/system specific problems below. See also: http://www.clark.net/pub/dickey/ncurses/ncurses.faq.html 1b. Platforms. Configure should work properly on any Unix-style system. It has been tested on the following platforms. AIX 3.2.5 (cc w/ curses) CLIX (cc w/ curses & ncurses) DGUX Digital Unix 3.2C and 4.0 (gcc & cc w/ curses, ncurses & slang) FreeBSD 2.1.5 (gcc 2.6.3 w/ curses & ncurses) HP-UX (K&R and ANSI cc, gcc w/ curses, ncurses & slang) IRIX 5.2 and 6.2 (cc & gcc w/ curses, ncurses & slang) Linux 2.0.0 (gcc 2.7.2 w/ curses, ncurses & slang) MkLinux 2.1.5 (gcc 2.7.2.1) NetBSD NEXTSTEP 3.3 (gcc 2.7.2.3 w/ curses) OS/2 EMX 0.9b (ncurses) SCO (cc w/ curses) Solaris 2.5 & 2.6 (cc & gcc w/ curses, ncurses & slang) SunOS 4.1 (cc w/ curses, gcc w/ ncurses & slang) OS390 and BS2000. NOTE: SunOS and HP-UX come with a bundled K&R compiler, which is only useful for compiling with the bundled curses. Both ncurses and slang require a compiler that recognizes prototypes. NOTE: Ncurses 4.2 builds/works on OS/2; however you should get at least the post-4.2 patches from October 1998, since that supports mouse and screen sizes other than 25x80. (ftp://ftp.clark.net/pub/dickey/ncurses/) 1c. Options To get a list of the configure script's options, type "./configure --help". Below is an alphabetical listing of the Lynx-specific options. The actual order shown by the -help option is different. See "docs/README.defines" for information on defines for which there are no option switches. --disable-alt-bindings (define EXP_ALT_BINDINGS) Compiles-in an alternative set of line-edit bindings, in addition to the default bindings. --disable-config-info (define NO_CONFIG_INFO) Use this option to disable the browsable configuration information (screens that show the result of the configuration script, as well as a pointer to the lynx.cfg file). --disable-dired (define DIRED_SUPPORT) Use this option to disable the optional directory-editor. Lynx supports directory editing (DirEd) for local directories. This allows users to do things like view, copy and remove files using a tabular display of the directory and single-keystroke commands instead of using the command line. From inside Lynx, the keystroke sequence "g." switches Lynx to DirEd mode on the current directory. If you're building a Lynx that is to be used as a kind of restricted shell for users who do not have access to the command line and should not have access to equivalent capabilities, you must disable DirEd with this option. You can also disable some DirEd functions while allowing others. If you have disabled DirEd completely, you can ignore all the other DirEd options. All DirEd functions that were enabled on compilation can be disabled or modified at run time via DIRED_MENU symbols in lynx.cfg. --disable-dired-archive (define ARCHIVE_ONLY) Use this option to prevent DirEd from extracting files from an archive file. --disable-dired-gzip (prevent defining OK_GZIP) Use this option to prevent DirEd from using gzip and gunzip. --disable-dired-override (prevent defining OK_OVERRIDE) Lynx users can customize their keymaps by creating private versions of lynx.cfg and modifying them to override the default keymap. Use this option to prevent DirEd keymap overriding. --disable-dired-permit (prevent defining OK_PERMIT) Use this option to prevent DirEd from changing the permissions on directories or files (i.e., from doing what the Unix chmod command or the DOS attrib command does). --disable-dired-tar (prevent defining OK_TAR) Use this option to prevent DirEd from using the tar program. --disable-dired-uudecode (prevent defining OK_UUDECODE) Use this option to prevent DirEd from using uudecode. --disable-dired-xpermit (define NO_CHANGE_EXECUTE_PERMS) Use this option if you do not disable out the dired-permit option, but want to restrict changes of the eXecute permission to directories (i.e., not allow it to be changed for files). If you don't do this, you can still block changes of the eXecute permission for files but not directories via the "change_exec_perms" command line restriction. --disable-dired-zip (prevent defining OK_ZIP) Use this option to prevent DirEd from using zip and unzip. --disable-echo Use this option to suppress the "compiling" commands during a build. Doing this makes it easier to find and read warning messages. --disable-extended-dtd (define NO_EXTENDED_HTMLDTD) disable extended HTML DTD logic. This should revert to old-style (2.7.1/2.7.2) behavior, but is not well-tested. --disable-finger (define DISABLE_FINGER) Do not compile-in code used to connect to "finger" URLs. --disable-ftp (define DISABLE_FTP) Do not compile-in code used to connect to "ftp" URLs. --disable-forms-options (define NO_OPTION_FORMS) Disable the forms-based options screen. (See --disable-menu-options). Please note that a few users with broken curses may have problems with popup forms fields. The default behaviour is to compile both forms and menu options code with FORMS_OPTIONS switch in lynx.cfg, or -forms_options command-line switch. --disable-gopher (define DISABLE_GOPHER) Do not compile-in code used to connect to GOPHER servers. --disable-full-paths Use this option to control whether full utility pathnames are used. By default, configure substitutes full pathnames. --disable-included-msgs Do not use included messages, for i18n support. If NLS support is requested, the configure script will otherwise use the messages in the ./po subdirectory. --disable-long-list (prevent defining LONG_LIST) Use this option to disable long "ls -l" directory listings (when enabled, the actual directory style is configurable from lynx.cfg). --disable-menu-options (define NO_OPTION_MENU) Disable the menu-style options screen. (See --disable-forms-options). Please note that a few users with broken curses may have problems with popup forms fields. The default behaviour is to compile both styles options menu code with FORMS_OPTIONS switch in lynx.cfg, or -forms_options command-line switch. --disable-news (define DISABLE_NEWS) Do not compile-in code used to connect to NEWS servers. --disable-parent-dir-refs (define NO_PARENT_DIR_REFERENCE) Use this option to disable "Up-to" parent-links in directory listings. --disable-partial (define DISP_PARTIAL) Turn off code that lets Lynx display parts of a long page while loading it. --disable-persistent-cookies (define EXP_PERSISTENT_COOKIES) Use this option to tell configure whether to compile-in support for saving cookies to a file, for subsequent reuse. This creates the file specified by the 'COOKIE_FILE' option, or defaults to ".lynx_cookies" in the home directory. (Currently there is no protection against conflict if several lynx copies are active from the same account). --disable-trace (define NO_LYNX_TRACE) Turn off code that lets you trace internal details of Lynx's operation. We recommend that you leave this enabled, since we need this information to diagnose problems with either Lynx or the sites to which you connect. --enable-addrlist-page (define EXP_ADDRLIST_PAGE) Compiles-in an alternative list-page, bound to 'A' rather than 'l', which always lists URLs rather than titles. --enable-cgi-links (define LYNXCGI_LINKS) Allows lynx to access a cgi script directly without the need for a http daemon. --enable-color-style (define USE_COLOR_STYLE) Use this option to enable optional and *experimental* color style. (Also defines USE_HASH, LINKEDSTYLES) --enable-debug (The symbol DEBUG is always defined.) Use this option to compile-in support for debugging. --enable-default-colors (define USE_DEFAULT_COLORS) Enable use of default-color background (ncurses/slang). Either configuration supports the use of 'default' for colors even without this option. That is, 'default' is interpreted as white (foreground) or black (background) according to the context. When the default colors configuration is built, the actual values for foreground and background colors are determined by the terminal. --enable-exec-links (define EXEC_LINKS) Allows lynx to execute programs by accessing a link. --enable-exec-scripts (define EXEC_SCRIPTS) Allows lynx to execute programs inferred from a link. --enable-externs (define USE_EXTERNALS) Use this option to enable external application support. (See lynx.cfg.) --enable-find-leaks (define LY_FIND_LEAKS) Use this option to compile-in logic for testing memory leaks. --enable-font-switch (define EXP_CHARTRANS_AUTOSWITCH) Allow Lynx to automatically change the Linux console state (switch fonts) according to the current Display Character Set. (Linux console only. *Use with discretion.* See docs/README.chartrans.) --enable-gzip-help Install the lynx help files in gzip'd format [*.gz] to save space. --enable-internal-links (define DONT_TRACK_INTERNAL_LINKS) Disabled by default, this option allows tracking of internal links, a feature which could, however, compromise a secure transaction by forcing inappropriate resubmission of form content. --enable-kbd-layout (define EXP_KEYBOARD_LAYOUT) Disabled by default, this option allows you to use translation tables on the input keystrokes. Current tables include ROT13'd keyboard layout JCUKEN Cyrillic, for AT 101-key kbd YAWERTY Cyrillic, for DEC LK201 kbd --enable-libjs (define EXP_LIBJS) Disabled by default; used for ifdef'ing JavaScript interface. --enable-nls use Native Language Support (i.e., gettext). --enable-nsl-fork (define NSL_FORK) Disabled by default, this allows interruption of NSL requests, so that `z' will stop the `look-up' phase of a connection. --enable-prettysrc (define USE_PSRC) Use this option to compile-in support for colorizing the source view of HTML pages. --enable-source-cache (define SOURCE_CACHE) Use this option to compile-in support for caching HTML pages locally, in files or in memory. Configurable from lynx.cfg --enable-syslog (define SYSLOG_REQUESTED_URLS) Use this option to log NSL requests via syslog(). --enable-underlines (define UNDERLINE_LINKS) Use this option to underline links rather than using boldface. --enable-warnings Use this option to turn on GCC compiler warnings. --libdir (affect LYNX_CFG_FILE) Defines the location where you want the lynx.cfg file installed. The configure script defines the symbol LYNX_CFG_FILE to correspond with the $libdir environment variable. (For platforms which do not support a configure script, such as MS-DOS, Win32 and VMS, you must edit userdefs.h if you wish to specify the location of lynx.cfg). --with-catgets use catgets functions if available. See "--enable-nls". --with-included-gettext use the GNU gettext library included here (default). See "--enable-nls". --with-nls-datadir=DIR Use this option to override the configure script's NLS data directory, under which the locale (i.e., language) files are installed. The default value is derived at configure time, and depends on whether GNU or native gettext is used. --with-screen=XXX Use this option to select the screen type. The option value, XXX must be one of curses (the default), ncurses or slang. Specifying a screen type causes the configure script to look in standard locations for the associated header and library files, unless you have preset the $CFLAGS and $LIBS variables. --with-screen=ncurses (define NCURSES) --with-screen=slang (define USE_SLANG) --with-socks (define SOCKS) Use this option to configure with the socks library. --with-socks5 (define USE_SOCKS5, SOCKS) Use this option to configure with the socks5 library. If you make a SOCKSified lynx, you may have trouble accessing FTP servers. Also, instead of SOCKSifying lynx for use behind a firewall, you are better off if you make it normally, and set it up to use a proxy server. You can SOCKSify the proxy server, and it will handle all clients, not just Lynx. If your SOCKS server was compiled to use the short version of Rbind, also include -DSHORTENED_RBIND in your SITE_LYDEFS and SITE_DEFS. If you do SOCKSify lynx, you can turn off SOCKS proxy usage via a -nosocks command line switch. --with-zlib (define USE_ZLIB) Use zlib for decompression of some gzip files. 1d. Environment variables The configure script looks for programs and libraries in known/standard locations. You can override the behavior of the script by presetting environment variables. If they are set, the script will try to use these values rather than computing new ones. Useful variables include: CC - the C compiler. If you do not override this, configure will try to use gcc. For instance, setting CC=cc and exporting this value will cause configure to use cc instead. CFLAGS - the C compiler options. These also include C preprocessor options (such as -I), since the $CFLAGS and $CPPFLAGS variables are maintained separately. CPPFLAGS - the C preprocessor options. For some configuration tests, you may need to set both $CFLAGS and $CPPFLAGS if you are compiling against header files in nonstandard locations. LDFLAGS - linker/loader options. LIBS - the libraries to be linked, with -L and -l options. If you are linking against libraries in nonstandard locations unrelated to the install prefix (that you can specify in the configure script) you may have to specify these via the $LIBS variable. -- 1997/7/27 - T. Dickey 1e. Examples If you are compiling Lynx for your personal use and are restricted to your home directory, a simple method for building would be to choose some directory, say ".lynx", and then type: ./configure --prefix=~/.lynx --exec-prefix=~/.lynx and make install Now you only need to add "~/.lynx/bin" to your PATH and edit "~/.lynx/lib/ lynx.cfg" as described above. I personally use the following csh shell script to set environment variables and configure options rather than type them each time. #!/bin/csh -f setenv CPPFLAGS "-I$HOME/slang -I$HOME/.usr/include" setenv LIBS "-L$HOME/.slang/lib -L$HOME/.usr/lib" ./configure --exec-prefix=$HOME --bindir=$HOME/.lynx \ --mandir=$HOME/.usr/man --libdir=$HOME/.usr/lib \ --with-screen=slang --with-zlib CPPFLAGS in this example defines the full path to the slang and zlib header files, which are not kept in standard directories. Likewise, LIBS defines the nonstandard locations of libslang.a and libz.a. Setting the option --bindir tells the configure script where I want to install the lynx binary; setting --mandir tells it where to put the lynx.1 man page, and setting --libdir tells it (while at the same time defining LYNX_CFG_FILE) where to put the configuration file "lynx.cfg", when I type "make install". The --with-screen=slang and --with-zlib options are explained above. 2. Wais support (optional) To add direct WAIS support, get the freeWAIS distribution from "ftp://ftp.cnidr.org/pub/NIDR.tools/freewais", and compile it. The compile process will create the libraries you will need, wais.a and client.a. Edit the Makefile in the top level directory and add the library locations under the DIRECT WAIS ACCESS heading. Edit the Makefile for the WWW Library in "WWW/Library/Implementation/CommonMakefile" to point to the include directory for the freewais distribution. Precompiled libraries are available for many platforms if you don't wish to compile one yourself. III. Compile instructions -- VMS Step 1. Downloading binary files. Lynx must handle all IO as streams, and on VMS, output files are always created with Stream_LF format via the C RTL's fopen(). The file headers indicate Implied Carriage Control, even when the transfer was in binary mode, which can confuse downloading software and cause corruption of the file contents. To deal with this, you should define the symbol USE_FIXED_RECORDS as TRUE in userdefs.h and/or lynx.cfg. This will instruct Lynx to correct the header information to indicate FIXED 512 records, with No Implied Carriage Control. If Lynx fails to do the conversion (because the file wasn't mapped to a binary MIME type) you can execute FIXED512.COM externally to correct the header information. The command file uses Joe Meadow's FILE utility, or the SET FILE/ATTRIBUTES command on current versions of VMS, to modify the headers. See the comments in FIXED512.COM, userdefs.h and lynx.cfg for more information. Step 2. Passive FTP If your system requires the PASV FTP code instead of the standard PORT FTP code (e.g., to deal with a firewall) then edit "WWW/Library/ Implementation/HTFTP.c" and comment out line 43 like so: /* #define LISTEN /* @@@@ Test LJM */. Step 3a. Lynx uses the VMS port of gzip for uncompressing streams which have Content-Encoding headers indicated compression with gzip or the Unix compress. If you do not have gzip installed on your system you can get it from "ftp://ftp.wku.edu/" in the fileserv directory. The command Lynx uses to uncompress on VMS is "gzip -d". If you are using the SOCKETSHR library, read SOCKETSHR.announce and make sure you have defined SOCKETSHR and SOCKETSHR_LIBRARY as explained therein. A "build.com" and "build-slang.com" script for building Lynx with curses or slang is in the top level directory. All you have to do is type "@build" or "@build-slang" and answer its prompt for your system's TCP-IP software. Current choices are: MULTINET (default) UCX WIN_TCP CMU_TCP SOCKETSHR_TCP TCPWARE It will autosense whether you have VAXC, DECC or GNUC on VAX or AXP and build appropriately. If a WWWLib already exists for that TCP-IP software, it will prompt you for whether you want to rebuild it. If you want to build a WWWLib separately, you can type "@libmake.com" with your default directory set to [.WWW.Library.vms] instead doing it via "build.com" in the top directory. You may need to modify "build-slang.com", as described in its header, so that it can find slang.olb on your system. If you have both DECC and VAXC, it will use DECC to benefit from the newer and more efficient memory management functions. Step 3b. (optional compilation method) If you have and want to use MMS, read the header of descrip.mms in the top directory and be sure you include the appropriate macro definitions when you invoke it: $ MMS /Macro = (MULTINET=1) for VAXC - MultiNet $ MMS /Macro = (WIN_TCP=1) for VAXC - Wollongong TCP/IP $ MMS /Macro = (UCX=1) for VAXC - UCX $ MMS /Macro = (CMU_TCP=1) for VAXC - OpenCMU TCP/IP $ MMS /Macro = (SOCKETSHR_TCP=1) for VAXC - SOCKETSHR/NETLIB $ MMS /Macro = (TCPWARE=1) for VAXC - TCPWare TCP/IP $ MMS /Macro = (MULTINET=1, DEC_C=1) for DECC - MultiNet $ MMS /Macro = (WIN_TCP=1, DEC_C=1) for DECC - Wollongong TCP/IP $ MMS /Macro = (UCX=1, DEC_C=1) for DECC - UCX $ MMS /Macro = (CMU_TCP=1, DEC_C=1) for DECC - OpenCMU TCP/IP $ MMS /Macro = (SOCKETSHR_TCP=1,DEC_C=1) for DECC - SOCKETSHR/NETLIB $ MMS /Macro = (TCPWARE=1, DEC_C=1) for DECC - TCPWare TCP/IP $ MMS /Macro = (MULTINET=1, GNU_C=1) for GNUC - MultiNet $ MMS /Macro = (WIN_TCP=1, GNU_C=1) for GNUC - Wollongong TCP/IP $ MMS /Macro = (UCX=1, GNU_C=1) for GNUC - UCX $ MMS /Macro = (CMU_TCP=1, GNU_C=1) for GNUC - OpenCMU TCP/IP $ MMS /Macro = (SOCKETSHR_TCP=1,GNU_C=1) for GNUC - SOCKETSHR/NETLIB $ MMS /Macro = (TCPWARE=1, GNU_C=1) for GNUC - TCPWare TCP/IP If you just type "MMS" it will default to the MULTINET and VAXC configuration. MMS will build the WWW library and Lynx sources, and link the executable. However, not all of the header dependencies are specified. If you are not a developer, and need a clean build, you should use build.com instead of the MMS utility. If you want SOCKS support on VMS, you must add SOCKS as a compilation definition, and the SOCKS library to the link command. However, instead of SOCKSifying Lynx for use behind a firewall, you are better off if you build Lynx normally, and set up Lynx to use a proxy server (see below). You instead can SOCKSify the proxy server, and it will handle all clients, not just Lynx. IV. Compile instructions -- Win32 (Windows95/98/NT) The original Win32 port was built with Borland C++ 4.52, but later versions reportedly can be used. Before compiling the Lynx sources, you need a curses library, and it is recommended that you have the zlib library. Get pdcurses2.3 from "http://www.lightlink.com/hessling/". I have modified it so that mouse support is no longer broken for Lynx (see "http://www.fdisk.com/doslynx/"). You will want to get zlib from "http://www.cdrom.com/pub/infozip/zlib/". Compile these libraries, and put them in a convenient place (pdcurses inside the Lynx directory). Unpack the latest Lynx source distribution, and make an obj directory under the source root to contain the compile output. Copy in your IDE file. A sample IDE file and helper libraries are available at "http://www.fdisk.com/doslynx/wlynx/source/". First build the .h files in src\chrtrans using "MAKEW32.BAT". Double check for new .tbl files; hand edit in any new ones, and then do "makew32". Jump into Borland C++, load the project (IDE file) and compile Lynx. Alternately, after compiling the chartrans tables, you can come back to the top directory and compile manually, i.e., do "make -f makefile.w32". I also have a binary available at "http://www.fdisk.com/doslynx/". This binary was compiled with pdcurses 2.3, hacked so win32 mouse support works, and with zlib, so Lynx can do gzip routines internally. More hints and information can be found in "http://www.fdisk.com/doslynx/lynxport.htm". -- 1997/10/12 - W. Buttles It is possible to compile under the cygwin32 system, which will allow you to use the configure script described above for Unix. Type, for example, "./configure --with-screen=slang --with-libz" in a Dos window running the cygwin bash$ shell. You also have the choice of using either pdcurses or slang. See "http://www.flora.org/lynx-dev/html/month1097/msg00559.html" and "http://www.flora.org/lynx-dev/html/month1097/msg00186.html", and other messages along those threads. You will have to make a minor alteration to HTTCP.c (change delay to 30 seconds) and modify HTFILE.c (concerning getgroups). You will need a launch program to call helper applications. V. Compile instructions -- 386 DOS Compiling for DOS with DJGPP is a multistep procedure. First install the c compiler and its libraries. If using DJGPP 2.01, update the distribution with the patched lib.c, to take care of bug fixes. It is available at: "http://www.cartsys.com/eldredge/djgpp-patches.html". GCC 2.7.2.1, as distributed from the usual DJGPP archives, will not successfully compile lynx. You need to "stubedit" your "cc1.exe" file. The following parameters have worked successfully: minstack=800k, bufsize=64k. To accomplish this, move to the djgpp\bin directory and type the command: "stubedit cc1.exe bufsize=64k minstack=800k". Or do it interactively with the command: "stubedit cc1.exe". (see "http://www.flora.org/lynx-dev/html/month0897/msg00145.html"). If using DJGPP 2.02 and GCC 2.8.1, you may not need to "stubedit" cc1.exe if you use -O2 optimization, since cc1.exe comes with a 1536K stack. To compile with -O3 optimization, the stub needs to be edited to give a larger stack. To do this go into djgpp\lib\gcc-lib\djgpp\2.81 and either type the command: "stubedit cc1.exe bufsize=63k minstack=2M", or edit interactively with: "stubedit cc1.exe". Unpack the source code using a DOS program like UNZIP386. If you are using PKUNZIP to unpack the .zip archive, you must use the -d command line switch to restore the directory structure contained in the archive, i.e., do "pkunzip -d lynx-cur.zip". No switch is required if you use unzip386 or unzip. If you are trying to compile the 386DOS port under a Win95/NT DOS shell, be sure to unpack the source with a DOS program so that all directories will be adjusted to the DOS 8.3 file format necessary for compiling with DJGPP. Do NOT use Winzip, because that will create long filenames that will not be recognized by DJGPP tools. If you wish to compile with "USE_ZLIB" (recommended), you must have the zlib library. Get the source from "http://www.cdrom.com/pub/infozip/zlib/" and compile it. Put libz.a in the lib subdirectory of DJGPP, and put zlib.h and zconf.h in the include subdirectory. In addition to the files in the Lynx distribution, you will need a curses package and a TCP package. You can use PDCurses (available at "http://www.lightlink.com/hessling/") and the DJGPP port of WATTCP (available in two different versions at "ftp://neonatal.sm.med.ic.ac.uk/" and in "http://www.fdisk.com/doslynx/wlynx/source/djgpp.zip"). A patched copy of the version from the neonatal site is also available from "http://www.rahul.net/dkaufman/tcplibdj.zip" or "ftp://ftp.rahul.net/pub/dkaufman/tcplibdj.zip". You can also use slang ("ftp://space.mit.edu/pub/davis/slang") as your curses library. You need to compile these before you go any further. If you wish to use PDCurses 2.3, you need to first apply the following patch: *** curses.h Thu Jul 9 19:38:28 1998 --- curses.h.new Sat Aug 15 11:02:08 1998 *************** *** 1802,1807 **** --- 1802,1808 ---- #define getbegx(w) (w)->_begx #define getbegy(w) (w)->_begy #define getbegyx(w,y,x) ( y = (w)->_begy, x = (w)->_begx ) + #define getbkgd(w) ((w)->_bkgd) #define getch() wgetch(stdscr) #define getmaxx(w) (w)->_maxx #define getmaxy(w) (w)->_maxy *** dos/pdckbd.c Sat Jul 12 17:10:12 1997 --- dos/pdckbd.c.new Thu Apr 15 20:52:16 1999 *************** *** 443,449 **** _watch_breaks(); #else # ifdef GO32 ! (void*)signal(SIGINT,(setting ? SIG_DFL : SIG_IGN)); /* __djgpp_set_ctrl_c(setting);*/ setcbrk(setting); # else --- 443,449 ---- _watch_breaks(); #else # ifdef GO32 ! /* (void*)signal(SIGINT,(setting ? SIG_DFL : SIG_IGN)); */ /* __djgpp_set_ctrl_c(setting);*/ setcbrk(setting); # else If you have trouble applying the patch, try using the "patch" program, ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat25b.zip"). The WATTCP TCPLIB sources must also be patched prior to compilation. See "http://www.flora.org/lynx-dev/html/month1197/msg00403.html". To read the Unix man style documentation, use, for example, "less" ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/lss332b.zip"). Compile or place your compiled PDCurses library in lynx2-*/curses, and compile or place your compiled WATTCP library in lynx2-*/djgpp/tcplib. If using the SLANG library, put libslang.a in your DJGPP/lib directory and put slang.h and slcurses.h in your DJGPP/include directory, or in the appropriate directories specified by LIBRARY_PATH and INCLUDE_PATH in your DJGPP.ENV file. Move to the "lynx2-*/WWW/Library/djgpp" directory. If compiling with PDCurses, do "make". If using SLANG, do "make -f makefile.sla". This should compile libwww.a. Next move to the "lynx2-*/src/chrtrans" directory and do "make -f makefile.dos" to compile the character tables. Then move to the "lynx2-*/src" directory. There are three choices for compiling at this point. You can do "make -f makefile.dos" to compile with PDCurses, "make -f makefile.wsl" to compile with SLANG, or "make -f makefile.dsl" to compile with SLANG and the DJGPP keyhandler. At the time of this writing, it is not clear what the advantages and disadvantages of each version are. The PDCurses version has the most experience and allows remapping of ALT and Function keys. The SLANG version seems to have better screen handling. It allows mapping of function keys, but not ALT keys. The SLANG with DJGPP keyhandler allows mapping of ALT and Function keys, but has the risk of incompatibilities from mixing different programs. If you wish to compile with support for internationalization of messages, you first need to install the DOS port of the GNU gettext package, available from any DJGPP mirror site. You may wish to recompile with DJGPP 2.02. Then uncomment the lines for INTLFLAGS in src/makefile.dsl and in WWW/Library/djgpp/makefile.sla, and remove the "#" from the LIBS line in src/makefile.dsl. Make similar changes if using one of the other DOS makefiles. See the gettext documentation for information on creating and using message files for different languages. If all goes well, you will have a lynx.exe file. If you have trouble, check to be sure djgpp.env is the way it came in the original package. To compile lynx with DJGPP you may need about 20Mb of free disk space for virtual memory. To test Lynx_386 you must have a packet driver installed. The simplest method is to use a null packet driver that just allows Lynx to start up, but doesn't do anything else. One such executable driver has been posted, uuencoded, to the lynx-dev mailing list: "http://www.flora.org/lynx-dev/html/month0198/msg00057.html". Start the dummy packet driver with "nullpkt 0x60", and take it out of memory with "nullpkt -u". You can also use slip8250.com. See the CRYNWR package "http://www.simtel.net/pub/simtelnet/msdos/pktdrvr/pktd11.zip". Usage is "slip8250 0x60", but you may have to invoke it as, for example, "slip8250 0x60 6 3 0x2F8" so that it uses COM2 and IRQ 3, in order to avoid an IRQ conflict with a mouse or some other device. Another packet driver is slipper.exe, which is available from many sites, including "ftp://jazz.trumpet.com.au/slipper". To remove it from memory use termin.com (usage "termin 0x60"), available in the CRYNWR package. To connect over a dialup PPP connection you need dosppp or klos' pppshare. (Find at: "http://mvmpc9.ciw.uni-karlsruhe.de/c:/user/toni/dosppp/dosppp06.zip", "http://personal.redestb.es/tonilop/dosppp/dosppp06.zip", or "ftp://ftp.agate.net/users/01935/internet/dosppp06.zip"; "ftp://ftp.klos.com/demo/pppshare.exe".) File access looks like this: file:///c:/ file:///c:/dos file:///c:/dos/command.com file://localhost/c:/ file://localhost/c:/dos file://localhost/c:/dos/command.com See "http://www.fdisk.com/doslynx/lynxport.htm" for more hints and some precompiled libraries. One problem you can run into is when editing userdefs.h and lynx.cfg, which have unix-style end of lines. You would be well advised to use an editor that can handle end of lines terminated with a single LF character. You can also unpack the source code using unzip386 or unzip with the -a switch to convert unix LF to dos CRLF. That will make texts more readable under DOS. If you compile lynx regularly, you may automate the procedure by creating a batch file such as the following. cd djgpp\tcplib\obj make cd ..\..\..\www\library\djgpp make cd ..\..\..\src\chrtrans make -f makefile.dos cd ..\..\src make -f makefile.dos strip lynx.exe cd .. This batch file expects the DJGPP port of WATTCP to be installed in the lynx2-* directory. Place a copy of this batch file, named "djgpp.bat", in the lynx2-* directory, move to that directory and type "djgpp". A more complete batch file with error checking and annotation can be found at: "http://www.flora.org/lynx-dev/html/month1197/msg00250.html". -- 1997/9/29 - D. Kaufman -- 1997/10/3 - B. Schiavo VI. General installation instructions Once you have compiled Lynx, test it out first on a local file. Be sure Lynx can find lynx.cfg. A _sample_ test command line would be: `lynx -cfg=/usr/local/lib/lynx.cfg .`. Once you are satisfied that Lynx works, go ahead and install it. For Unix, type "make install". For VMS, you need to have the executable in a public place, make it accessible, define it as a foreign command, and copy lynx.cfg to "Lynx_Dir". Look at lynx.com in the samples directory as a model for installing Lynx. To include lynx.hlp in the system HELP library, use the command: "$ library/replace sys$help:helplib.hlb lynx.hlp". Local copies of the Lynx online help should be made accessible in response to the Lynx 'h'elp command by defining HELPFILE in userdefs.h and/or lynx.cfg to an appropriate file://localhost/path URL. On Unix, all you need to do is type "make install-help." If you are installing manually, copy the files "COPYHEADER" and "COPYING" into the lynx_help directory BEFORE moving the lynx_help tree to its final location. These files are referenced hypertextually from help documents. If you have old, pre-existing bookmark files from earlier versions of Lynx, those files may have to be updated. Conversion may just consist of adding one META line near the top, or may require creating new book- mark files and editing in bookmarks from outdated files. IMPORTANT! Be sure you have read the warnings about setting up an anonymous account with Lynx if you plan to give public access to Lynx. After applying patches or editing files to correct for an unsuccessful build, be certain to do a "make clean" (or "make distclean" for those using auto-configure) before attempting to compile again. VII. Setting environment variables before running Lynx (optional) 1. All ports The Lynx Users Guide describes all of the environment variables used by Lynx. This should be checked later along with reading lynx.cfg after you have installed Lynx. 2. Win32 (95/98/NT) and 386 DOS These ports cannot start before setting certain environment variables. Here are some environment variables that should be set, usually in a batch file that runs the lynx executable. Make sure that you have enough room left in your environment. You may need to change your "SHELL=" setting in config.sys. In addition, lynx looks for a "SHELL" environment variable when shelling to DOS. If you wish to preserve the environment space when shelling, put a line like this in your AUTOEXEC.BAT file also "SET SHELL=C:\COMMAND.COM /E:2048". It should match CONFIG.SYS. HOME Where to keep the bookmark file and personal config files. TEMP or TMP Bookmarks are kept here with no HOME. Temp files here. USER Set to your login name (optional) LYNX_CFG Set to the full path and filename for lynx.cfg LYNX_SAVE_SPACE The (modifiable) location for downloaded file storage. 386 version only: WATTCP.CFG Set to the full path for the WATTCP.CFG directory (Depending on how you compiled libtcp.a, you may have to use WATCONF.) Define these in your batch file for running Lynx. For example, if your application line is "D:\win32\lynx.bat", lynx.bat for Win32 may look like: @ECHO OFF set home=d:\win32 set temp=d:\tmp set lynx_cfg=d:\win32\lynx.cfg set lynx_save_space=d:\download d:\win32\lynx.exe %1 %2 %3 %4 %5 For lynx_386, a typical batch file might look like: @echo off set HOME=f:/lynx2-8 set USER=your_login_name set LYNX_CFG=%HOME%/lynx.cfg set WATTCP.CFG=%HOME% f:\lynx2-8\lynx %1 %2 %3 %4 %5 %6 %7 %8 %9 You need to make sure that the WATTCP.CFG file has the correct information for IP number, Gateway, Netmask, and Domain Name Server. This can also be automated in the batch file. Adapted from "readme.txt" by Wayne Buttles and "readme.dos" by Doug Kaufman. VIII. Acknowledgment Thanks to the many volunteers who offered suggestions for making this installation manual as accurate and complete as possible. -- 1999/04/24 - H. Nelson