Debian Codegraph @

INSTALLATION

raw
1
2 Lynx Installation Guide
3
4 This file describes how to compile and install Lynx. A description of Lynx
5 can be found in the README file. Lynx has been ported to UN*X, VMS, Win32
6 and 386DOS. The procedures for compiling these ports are quite divergent
7 and are detailed respectively in Sections II, III, IV and V. General
8 installation, problem solving and environment variables are covered in
9 Sections VI and VII. There is also a PROBLEMS file in the same directory
10 as INSTALLATION which contains advice for special problems people have
11 encountered, especially for particular machines and operating systems.
12
13 If you still have difficulties, send an e-mail message to the Lynx-Dev mailing
14 list (see the README file). Try to include information about your system,
15 the name and version of your compiler, which curses library you are using
16 and the compile-time errors. Be sure to say what version and image-number
17 of Lynx you are trying to build (alternately the top date of the CHANGES file).
18
19 If you don't understand what one of the defines means, try the README.defines
20 and *.announce files in the docs subdirectory. The docs/CHANGES* files record
21 the entire development history of Lynx and are an invaluable resource for
22 understanding how Lynx should perform.
23
24 First, you must configure Lynx for your system regardless of the port you use.
25 Follow the instructions given immediately below to configure for your system,
26 and then go to the respective section concerning the port you wish to compile.
27
28 -------------------------------------------------------------------------------
29
30 I. General configuration instructions (all ports).
31
32 Step 1. Compile-time Variables.
33
34 There are a few variables that MUST be defined if Lynx is to build
35 and there are others you may want to change.
36
37 Lynx MUST be able to find lynx.cfg at start-up: using configure
38 (e.g. with UNIX or Cygwin), its location is best set with --sysconfdir ;
39 you can check in lynx_cfg.h after configure has run, if you wish.
40 otherwise, you can use LYNX_CFG_FILE in userdefs.h ,
41 environment variable LYNX_CFG or the -cfg command-line option.
42
43 If you are using configure, you need not make any changes in userdefs.h .
44 There are a few variables you can't define with configure --options
45 but can define in userdefs.h , e.g. numbering fields as well as links.
46 Many variables which can be defined with configure or userdefs.h
47 can also be defined in lynx.cfg or via the Options Menu.
48
49 Lynx implements Native Language Support. Read "ABOUT-NLS", if you want
50 to build an international version of Lynx or tailor status-line prompts,
51 messages and warnings to the requirements of your site.
52
53 Step 2. Run-time Variables.
54
55 Read lynx.cfg thoroughly, as many Lynx features and how to use them
56 are explained there, in some cases ONLY there. Set up local printers,
57 downloaders, assumed character set, key mapping and colors in lynx.cfg .
58 Also see the sample mime.types, mailcap and jumps files
59 in the samples subdirectory.
60
61 Step 3. Alternative Character Sets.
62
63 You may skip this, if you are not interested in special characters
64 and all local files or WWW pages you will view will use the ISO-8859-1
65 "ISO Latin 1" Western European character set.
66
67 If you will be running Lynx in an environment with different incompatible
68 character sets, configure CHARACTER_SET (the Display character set)
69 and ASSUME_LOCAL_CHARSET to work correctly before creating bookmark files
70 and other such items: read lynx.cfg for detailed instructions.
71 Additional character sets and their properties may be defined with tables
72 in the src/chrtrans directory: see the README.* files therein.
73
74 Step 4. News.
75
76 Set NNTPSERVER in lynx.cfg to your site's NNTP server
77 or set the environment variable externally. For posting to be enabled,
78 NEWS_POSTING must be TRUE in userdefs.h or lynx.cfg.
79 Also define LYNX_SIG_FILE in userdefs.h or lynx.cfg ,
80 so that it points to users' signature files for appending to messages.
81
82 Step 5. Anonymous Accounts *** VERY IMPORTANT!!!!! ***
83
84 If you are building Lynx for personal use only, you can skip this.
85
86 If you are setting up anonymous accounts to use Lynx captively,
87 i.e. making Web access publicly available to users who should not
88 be allowed any other type of access to your system,
89 you are STRONGLY advised to use the -anonymous command-line option:
90 if you do not use this option, users may be able to gain access
91 to all readable files on your machine!
92
93 Many implementations of telnetd allow passing of environment variables,
94 which might be used to modify the environment in anonymous accounts,
95 allowing mischief or damage by malicious users, so make sure the wrapper
96 uses the -cfg and -homepage switches to specify lynx.cfg and start-file,
97 rather than relying on variables LYNX_CFG, LYNX_CFG_FILE and WWW_HOME.
98
99 -------------------------------------------------------------------------------
100
101 II. Compile instructions -- UNIX
102
103 1a. Auto-configure. The auto-configure script uses autoconf2.13 to generate a
104 Bourne shell script, configure, which creates "makefile" and "lynx_cfg.h".
105
106 If you are on a UNIX platform, the easiest way to build Lynx is to type:
107
108 ./configure
109 and
110 make
111
112 NOTE: Configure has a number of useful options. Please see below.
113
114 NOTE: The 'configure' script generates auxiliary files "config.status"
115 "config.cache" and "config.log". Normally you will not notice these;
116 they are created automatically and removed by a "make distclean".
117
118 + If you wish to rebuild Lynx with a new host, or change ANY of the
119 parameters which are stored in config.cache, you MUST first remove
120 the config.cache file before running configure; its options do NOT
121 override the settings in that file.
122
123 + The config.status file is a script which creates (or regenerates)
124 the files created by the configure script.
125
126 Please report problems in the configure/make process by including a copy
127 of config.status, config.cache and config.log, as well as the pertinent
128 compiler diagnostics.
129
130 See the note in aclocal.m4 for special instructions if you must modify the
131 configure script.
132
133 NOTE: Lynx is a curses-based application, so you must have a curses
134 library available to link to. Native curses (on the system when it was
135 installed) are often broken, so you may get superior performance if you
136 have either
137
138 "ncurses" ("https://invisible-island.net/ncurses") or
139 "slang" ("https://www.jedsoft.org/slang/").
140
141 If you install these libraries in your home directory or a non-default
142 location, you may need to set the CPPFLAGS (full path to include files) and
143 LIBS (full path to library files) environment variables BEFORE running
144 configure. See "1d. Environment". Use the "--with-screen=ncurses" or
145 "--with-screen=slang" option.
146
147 Note that while lynx will build with a variety of versions of curses and
148 ncurses, some will be less satisfactory. Versions of ncurses before
149 1.9.9g will not render color properly. Some other versions of curses do
150 not display color at all. Likewise, lynx may not build with old versions
151 of slang, e.g., before 0.99-38, because slang's interfaces change
152 periodically.
153
154 Note compiler/system specific problems below. See also:
155 https://invisible-island.net/ncurses/ncurses.faq.html
156
157 1b. Platforms. Configure should work properly on any Unix-style system.
158 It has been tested on the following platforms.
159
160 AIX 3.2.5 (cc w/ curses) BeOS 4.5 (gcc w/ ncurses)
161 CLIX (cc w/ curses & ncurses) DGUX
162 Digital Unix 3.2C and 4.0 (gcc & cc w/ curses, ncurses & slang)
163 FreeBSD 2.1.5, 3.1 (gcc 2.6.3 w/ curses & ncurses)
164 HP-UX (K&R and ANSI cc, gcc w/ curses, ncurses & slang)
165 IRIX 5.2 and 6.2 (cc & gcc w/ curses, ncurses & slang)
166 Linux 2.0.0 (gcc 2.7.2 w/ curses, ncurses & slang)
167 MkLinux 2.1.5 (gcc 2.7.2.1) NetBSD
168 NEXTSTEP 3.3 (gcc 2.7.2.3 w/ curses)
169 OS/2 EMX 0.9c (ncurses) SCO OpenServer (cc w/ curses)
170 Solaris 2.5, 2.6 & 2.7 (cc & gcc w/ curses, ncurses & slang)
171 SunOS 4.1 (cc w/ curses, gcc w/ ncurses & slang)
172 OS390 and BS2000.
173
174 NOTE: SunOS and HP-UX come with a bundled K&R compiler, which is only
175 useful for compiling with the bundled curses. Both ncurses and slang
176 require a compiler that recognizes prototypes.
177
178 1c. Options
179 To get a list of the configure script's options, type "./configure --help".
180 Below is an alphabetical listing of the Lynx-specific options. The actual
181 order shown by the -help option is different. See "docs/README.defines"
182 for information on defines for which there are no option switches.
183
184 --datadir
185 Defines the location where you want the documentation files installed.
186 The configure script constructs makefile actions to install lynx.cfg
187 modified to reflect this in the HELPFILE setting. (For platforms which
188 do not support a configure script, such as MS-DOS, Win32 and VMS, you
189 must edit lynx.cfg).
190
191 --disable-addrlist-page (prevent defining USE_ADDRLIST_PAGE)
192 Turn off code that displays an alternative list-page, bound to 'A'
193 rather than 'l', which always lists URLs rather than titles.
194
195 --disable-alt-bindings (prevent defining USE_ALT_BINDINGS)
196 Compiles-in an alternative set of line-edit bindings, in addition
197 to the default bindings.
198
199 --disable-bibp-urls (define DISABLE_BIBP)
200 Disable (do not compile code) support for bibp: URLs.
201
202 --disable-cjk (define CJK_EX)
203 Disable logic for supporting CJK documents.
204
205 --disable-color-style (define USE_COLOR_STYLE)
206 Use this option to disable optional color style. This is implemented
207 for modern curses implementations, e.g., those that support color.
208
209 Before lynx 2.8.6dev.18, this option was disabled by default.
210 You can achieve a similar color effect to match the non-color-style
211 (but still allowing users to use color-style) by using the
212 --without-lss-file option.
213
214 --disable-config-info (define NO_CONFIG_INFO)
215 Use this option to disable extended browsable configuration information
216 (a screen that shows the result of the configuration script, as well
217 as extended lynx.cfg viewing with a pointer to the lynx.cfg file and
218 additional functionality).
219
220 --disable-dired (prevent defining DIRED_SUPPORT)
221 Use this option to disable the optional directory-editor.
222
223 Lynx supports directory editing (DirEd) for local directories.
224 This allows users to do things like view, copy and remove files
225 using a tabular display of the directory and single-keystroke
226 commands instead of using the command line. From inside Lynx, the
227 keystroke sequence "g.<enter>" switches Lynx to DirEd mode on the
228 current directory. If you're building a Lynx that is to be used as
229 a kind of restricted shell for users who do not have access to the
230 command line and should not have access to equivalent capabilities,
231 you probably want to disable DirEd with this option. You can also
232 disable some DirEd functions while allowing others. If you have
233 disabled DirEd completely, you can ignore all the more specific
234 DirEd options.
235
236 All DirEd menu functions that were enabled on compilation can be
237 disabled or modified at run time via DIRED_MENU symbols in lynx.cfg.
238
239 --disable-dired-dearchive (define ARCHIVE_ONLY)
240 Use this option to prevent DirEd from extracting files from an
241 archive file.
242
243 --disable-dired-gzip (prevent defining OK_GZIP)
244 Use this option to prevent DirEd from using gzip and gunzip.
245
246 --disable-dired-override (prevent defining OK_OVERRIDE)
247 Normally, in DirEd directory viewing mode some key mappings are
248 overridden. Use this option to disable DirEd keymap overriding.
249
250 --disable-dired-permit (prevent defining OK_PERMIT)
251 Use this option to prevent DirEd from changing the permissions
252 on directories or files (i.e., from doing what the Unix chmod
253 command or the DOS attrib command does).
254
255 --disable-dired-tar (prevent defining OK_TAR)
256 Use this option to prevent DirEd from using the tar program.
257
258 --disable-dired-uudecode (prevent defining OK_UUDECODE)
259 Use this option to prevent DirEd from using uudecode.
260
261 --disable-dired-xpermit (define NO_CHANGE_EXECUTE_PERMS)
262 Use this option if you do not disable out the dired-permit
263 option, but want to restrict changes of the eXecute permission
264 to directories (i.e., not allow it to be changed for files). If
265 you don't do this, you can still block changes of the eXecute
266 permission for files but not directories via the
267 "change_exec_perms" command line restriction.
268
269 --disable-dired-zip (prevent defining OK_ZIP)
270 Use this option to prevent DirEd from using zip and unzip.
271
272 --disable-echo
273 Use this option to suppress the "compiling" commands during a build.
274 Doing this makes it easier to find and read warning messages.
275
276 --disable-extended-dtd (define NO_EXTENDED_HTMLDTD)
277 disable extended HTML DTD logic. This should revert to old-style
278 (2.7.1/2.7.2) behavior, but is not well-tested.
279
280 --disable-file-upload (define USE_FILE_UPLOAD)
281 Compile-in support for form-based file-upload.
282
283 --disable-finger (define DISABLE_FINGER)
284 Do not compile-in code used to connect to "finger" URLs.
285
286 --disable-forms-options (define NO_OPTION_FORMS)
287 Disable the Form-based Options Menu (see --disable-menu-options).
288 The default is to compile key-based & form-based Options Menu code,
289 allowing users the final choice via FORMS_OPTIONS in lynx.cfg
290 or the -forms_options command-line switch.
291
292 --disable-ftp (define DISABLE_FTP)
293 Do not compile-in code used to connect to FTP servers.
294
295 --disable-full-paths
296 Use this option to control whether full pathnames are compiled in for
297 various utilities invoked by lynx as external commands. By default,
298 full pathnames are compiled in for the the locations where configure
299 finds these commands at configure time.
300
301 Affected commands include
302 chmod compress cp gzip install mkdir mv rm tar touch gunzip
303 unzip brotli bzip2 uudecode zcat zip zstd telnet tn3270 rlogin
304 (Not all commands are used on all systems or in all configurations.)
305
306 This option makes Lynx simpler to install, but potentially less secure,
307 since the commands are then set in the user's $PATH. All of these
308 commands may also be overridden individually by setting environment
309 variables before configuring. For example, you can disable the telnet
310 command by doing this:
311
312 setenv TELNET /bin/false
313
314 --disable-gopher (define DISABLE_GOPHER)
315 Do not compile-in code used to connect to GOPHER servers.
316
317 --disable-idna
318 By default, the configure script searches for the GNU idn library,
319 which lets lynx translated URLs which are in UTF-8 to ASCII. The
320 latter is needed for most network accesses. Use this option to
321 suppress the feature, e.g., to reduce size.
322
323 --disable-included-msgs
324 Do not use included messages, for i18n support. If NLS support is
325 requested, the configure script will otherwise use the messages in the
326 ./po subdirectory.
327
328 --disable-japanese-utf8 (define USE_JAPANESEUTF8_SUPPORT)
329 use Japanese UTF-8 logic, which uses iconv to convert pages with
330 charset euc-jp, shift_jis to utf-8.
331
332 --disable-justify-elts (define USE_JUSTIFY_ELTS)
333 Do not use element-justification logic.
334
335 --disable-largefile (prevent defining LONG_LIST)
336 Use this option to disable the compiler and linker options that
337 provide largefile interfaces.
338
339 --disable-link-prefix
340 Use this option to not trim unneeded libraries from link command
341
342 --disable-locale-charset (define USE_LOCALE_CHARSET)
343 Use nl_langinfo(CODESET) to determine initial value for display
344 charset, overrides character_set value in .lynxrc file.
345
346 --disable-long-list (prevent defining LONG_LIST)
347 Use this option to disable long "ls -l" directory listings (when
348 enabled, the actual directory style is configurable from lynx.cfg).
349
350 --disable-menu-options (define NO_OPTION_MENU)
351 Disable the Key-based Options Menu.
352 See --disable-forms-options (above) for further details.
353
354 --disable-news (define DISABLE_NEWS)
355 Do not compile-in code used to connect to NNTP (netnews) servers.
356
357 --disable-parent-dir-refs (define NO_PARENT_DIR_REFERENCE)
358 Use this option to disable "Up-to" parent-links in directory listings.
359
360 --disable-partial (prevent defining DISP_PARTIAL)
361 Turn off code that lets Lynx display parts of a long page while loading
362 it.
363
364 --disable-persistent-cookies (prevent defining USE_PERSISTENT_COOKIES)
365 Turn off support for saving cookies to a file, for subsequent reuse.
366 Persistent cookie support will use (or create) the file specified by
367 the 'COOKIE_FILE' option, or default to ".lynx_cookies" in the home
368 directory. (Currently there is no protection against conflict if
369 several lynx sessions are active from the same account).
370
371 --disable-prettysrc (define USE_PRETTYSRC)
372 Turn off support for colorizing the source view of HTML pages. If
373 compiled-in, new source view mode is available with -prettysrc command
374 line option.
375
376 --disable-progressbar (define USE_PROGRESSBAR)
377 Turn off support for a "progress bar" which displays at the bottom
378 of the screen when doing downloads and other time-consuming (but
379 interruptible) processes. This feature can be selected in the
380 options menu.
381
382 --disable-read-eta (define USE_READPROGRESS)
383 Turn off enhanced read-progress message showing ETA (estimated time to
384 completion), as well as the amount of time stalled without any data
385 transferred.
386
387 --disable-rpath-hack
388 The rpath-hack makes it simpler to build programs, particularly with
389 the *BSD ports which may have essential libraries in unusual places.
390 But it can interfere with building an executable for the base system.
391 Use this option in that case.
392
393 --disable-scrollbar (define USE_SCROLLBAR)
394 Turn off support for scrollbar on the right-margin of the screen.
395 If you configure with ncurses, this works with the mouse on xterm,
396 etc.
397
398 --disable-session-cache (define USE_CACHE_JAR)
399 Turn off support for saving/restoring session information in files.
400 Configurable from lynx.cfg
401
402 --disable-sessions (define USE_SESSIONS)
403 Turn off support for sessions, which allows the user to automatically
404 save and restore history information.
405
406 --disable-source-cache (define USE_SOURCE_CACHE)
407 Turn off support for caching HTML pages locally,
408 in files or in memory. Configurable from lynx.cfg
409
410 --disable-trace (define NO_LYNX_TRACE)
411 Turn off code that lets you trace internal details of Lynx's operation.
412 We recommend that you leave this enabled, since we need this
413 information to diagnose problems with either Lynx or the sites to which
414 you connect.
415
416 --disable-wcwidth-support (define USE_WCWIDTH_SUPPORT
417 use wcwidth/UTF-8 logic, e.g., with wide-character ncurses
418
419 --enable-arc4random (define USE_ASCII_CTYPES)
420 Enable/disable configure script check for arc4random.
421
422 --enable-ascii-ctypes (define USE_ASCII_CTYPES)
423 Compiles-in alternative case-conversion functions which ensure that
424 configuration names, etc., are compared in POSIX locale. This is
425 important for operating in some locale such as Turkish.
426
427 --enable-cgi-links (define LYNXCGI_LINKS)
428 Allows lynx to access a cgi script directly without the need for
429 a http daemon.
430
431 --enable-change-exec (define ENABLE_OPTS_CHANGE_EXEC)
432 Allow users to change the execution status within the options screen.
433 See EXEC_LINKS and EXEC_SCRIPTS.
434
435 --enable-charset-choice (define USE_CHARSET_CHOICE)
436 Add logic for ASSUMED_DOC_CHARSET_CHOICE and DISPLAY_CHARSET_CHOICE in
437 lynx.cfg, allowing user to configure a subset of the compiled-in
438 charsets for normal use.
439
440 --enable-chinese-utf8 (define EXP_CHINESEUTF8_SUPPORT)
441 use Chinese UTF-8 logic, which uses iconv for converting pages with
442 charset gb2312 (aliased to euc-cn), big5 to utf-8. The Korean charset
443 euc-kr happens to work with this setting.
444
445 --enable-debug (The symbol DEBUG is always defined.)
446 Use this option to compile-in support for debugging.
447 Note that this flag is ignored if the CFLAGS environment
448 variable is set, in that case "-g" (or whatever) has to
449 be included in the CFLAGS value to get debugging.
450 Autoconf normally adds -g and -O options to CFLAGS if CFLAGS
451 was not set, and if the compiler supports those options.
452
453 --enable-default-colors (define USE_DEFAULT_COLORS)
454 Enable use of default-color background (ncurses/slang). Either
455 configuration supports the use of 'default' for colors even without
456 this option. That is, 'default' is interpreted as white (foreground)
457 or black (background) according to the context. When the default
458 colors configuration is built, the actual values for foreground and
459 background colors are determined by the terminal.
460
461 --enable-exec-links (define EXEC_LINKS)
462 Allows lynx to execute programs by accessing a link.
463
464 --enable-exec-scripts (define EXEC_SCRIPTS)
465 Allows lynx to execute programs inferred from a link.
466
467 --enable-externs (define USE_EXTERNALS)
468 Use this option to enable external application support. (See lynx.cfg.)
469
470 --enable-find-leaks (define LY_FIND_LEAKS)
471 Use this option to compile-in logic for testing memory leaks.
472
473 --enable-font-switch (define EXP_CHARTRANS_AUTOSWITCH)
474 Allow Lynx to automatically change the Linux console state (switch
475 fonts) according to the current Display Character Set. (Linux console
476 only. *Use with discretion.* See docs/README.chartrans.)
477
478 --enable-gzip-help
479 Install the lynx help files in gzip'd format [*.gz] to save space.
480
481 --enable-htmlized-cfg
482 generate an HTMLized copy of lynx.cfg which will be installed with
483 the other help files.
484
485 --enable-internal-links (define TRACK_INTERNAL_LINKS)
486 With `internal links' (links within a document to a location within
487 the same document) enabled, Lynx will distinguish between, for example,
488 `<A HREF="foo#frag">' and `<A HREF="#frag">' within a document whose
489 URL is `foo'. It may handle such links differently, although practical
490 differences would appear only if the document containing them resulted
491 from a POST request or had a no-cache flag set. This feature attempts
492 to interpret URL-references as suggested by RFC 2396, and to prevent
493 mistaken resubmissions of form content with the POST method. An
494 alternate opinion asserts that the feature could actually result in
495 inappropriate resubmission of form content.
496
497 --enable-ipv6 (define ENABLE_IPV6)
498 use IPV6 (with IPV4) logic.
499
500 --enable-kbd-layout (define EXP_KEYBOARD_LAYOUT)
501 Disabled by default, this option allows you to use translation
502 tables on the input keystrokes. Current tables include
503 ROT13'd keyboard layout
504 JCUKEN Cyrillic, for AT 101-key kbd
505 YAWERTY Cyrillic, for DEC LK201 kbd
506
507 --enable-local-docs
508 On install, modify link from help-page to point to the local
509 doc-directory, e.g., with README files. Normally this points
510 to the current release directory.
511
512 --enable-nested-tables (define EXP_NESTED_TABLES)
513 Extends TRST to format nested tables, as well as be smarter about
514 <BR> and <P> tags in table cells.
515
516 --enable-nls (several definitions)
517 use Native Language Support (i.e., gettext).
518
519 This relies upon external programs (msgfmt and xgettext) to format
520 the message catalogs:
521
522 + Unless you set the environment variables MSGFMT and XGETTEXT to
523 the full pathnames of these utilities, the configure script will
524 search for the GNU versions of these utilities.
525
526 It will also search for the GNU version of the corresponding
527 gettext() runtime function. On some platforms (such as Solaris),
528 this search gives misleading results.
529
530 + If you set those environment variables to full pathnames, the
531 configure script will warn if they are not the GNU versions of
532 the utilities.
533
534 --enable-nsl-fork (define NSL_FORK)
535 Disabled by default, this allows interruption of NSL requests,
536 so that `z' will stop the `look-up' phase of a connection.
537
538 --enable-stdnoreturn (define HAVE_STDNORETURN_H)
539 Check for C11 _Noreturn feature, using that rather than gcc-specific
540 __attribute__((noreturn)), to improve compiler diagnostics.
541
542 --enable-syslog (define SYSLOG_REQUESTED_URLS)
543 Use this option to log NSL requests via syslog().
544
545 --enable-underlines (define UNDERLINE_LINKS)
546 Use this option to underline links rather than using boldface.
547
548 --enable-vertrace (define LY_TRACELINE)
549 Turn on code that prefixes trace output lines with source filename
550 and line number.
551
552 --enable-warnings
553 Use this option to turn on GCC compiler warnings.
554
555 --enable-wais
556 Use this option to turn on configure check for freeWAIS library.
557
558 --enable-widec
559 Use this option to allow the configure script to look for wide-curses
560 features. If you do not specify the option, the configure script
561 will look for these features if --with-screen=ncursesw is given.
562
563 For this release of Lynx, we recommend the ncursesw library (i.e.,
564 the "wide-character" configuration of ncurses). In this case,
565 Lynx's default for the configuration setting LOCALE_CHARSET is "ON".
566
567 Other curses libraries provide limited support for Unicode.
568 The slang configuration does not provide usable support for Unicode.
569
570 --sysconfdir (affect LYNX_CFG_FILE)
571 Defines the location where you want the lynx.cfg file installed.
572 The configure script defines the symbol LYNX_CFG_FILE to correspond
573 with the $sysconfdir environment variable. (For platforms which do not
574 support a configure script, such as MS-DOS, Win32 and VMS, you must
575 edit userdefs.h if you wish to specify the location of lynx.cfg).
576
577 --with-Xaw3d
578 This option allows you to specify the X libraries used if you
579 are configuring lynx to use PDCurses on a Unix platform.
580
581 --with-XawPlus
582 This option allows you to specify the X libraries used if you
583 are configuring lynx to use PDCurses on a Unix platform.
584
585 --with-brotli[=XXX] (define USE_BROTLI)
586 Use brotli decompression.
587
588 The optional value XXX specifies the directory in which the library
589 can be found, and may be either the path of the "lib" directory,
590 or one level above. In either case, the corresponding header files
591 are assumed to be in the parallel "include" directory.
592
593 --with-build-cc=XXX
594 If cross-compiling, specify a host C compiler, which is needed to
595 compile a utility which generates tables for lynx.
596 If you do not give this option, the configure script checks if the
597 $BUILD_CC variable is set, and otherwise defaults to gcc or cc.
598
599 --with-build-cpp=XXX
600 This is unused by lynx.
601
602 --with-build-cflags=XXX
603 If cross-compiling, specify the host C compiler-flags. You might need
604 to do this if the target compiler has unusual flags which confuse the
605 host compiler.
606
607 --with-build-cppflags=XXX
608 If cross-compiling, specify the host C preprocessor-flags. You might
609 need to do this if the target compiler has unusual flags which confuse
610 the host compiler.
611
612 --with-build-ldflags=XXX
613 If cross-compiling, specify the host linker-flags. You might need to
614 do this if the target linker has unusual flags which confuse the host
615 compiler.
616
617 --with-build-libs=XXX
618 If cross-compiling, the host libraries. You might need to do this if
619 the target environment requires unusual libraries.
620
621 --with-bzlib[=XXX] (define USE_BZLIB)
622 Use libbz2 for decompression of some bzip2 files.
623
624 The optional value XXX specifies the directory in which the library
625 can be found, and may be either the path of the "lib" directory,
626 or one level above. In either case, the corresponding header files
627 are assumed to be in the parallel "include" directory.
628
629 --with-charsets=list (define ALL_CHARSETS)
630 Limit the number of charsets that are compiled-in to the specified
631 list of comma-separated MIME names.
632
633 --with-cfg-file (define LYNX_CFG_FILE)
634 Specify the default configuration file's name. Use --without-cfg-file
635 to force the user to specify the configuration file on the command
636 line. The filename can be overridden by using the LYNX_CFG environment
637 variable.
638
639 --with-cfg-path (define LYNX_CFG_PATH)
640 Specify the default configuration file(s) directory search-list. Use
641 --without-cfg-path to limit this to the location of the lynx.cfg file.
642 The search-list can be overridden using the LYNX_CFG_PATH environment
643 variable.
644
645 --with-curses-dir
646 Specify directory under which curses/ncurses is installed. This
647 assumes a standard install, e.g., with an include and lib subdirectory.
648
649 --with-dbmalloc
650 use Conor Cahill's dbmalloc library
651
652 --with-destdir=XXX
653 set DESTDIR variable in makefiles. This is prefixed to all directories
654 in the actual install, but is not really part of the compiled-in or
655 configured directory names. It is convenient for packaging the
656 installed files. If you do not provide the option, the configure
657 script uses your $DESTDIR environment variable.
658
659 --with-dmalloc
660 use Gray Watson's dmalloc library
661
662 --with-gnutls[=XXX] (define USE_SSL, USE_GNUTLS_INCL)
663 Use this option to configure with the GNU TLS library.
664 See docs/README.ssl for additional information.
665
666 The optional value XXX specifies the directory in which the library
667 can be found, and may be either the path of the "lib" directory,
668 or one level above. In either case, the corresponding header files
669 are assumed to be in the parallel "include" directory. The default
670 is /usr/local/gnutls.
671
672 --with-libiconv-prefix=DIR
673 search for libiconv in DIR/include and DIR/lib
674
675 --with-libintl-prefix=DIR
676 search for libintl in DIR/include and DIR/lib
677
678 --with-lss-file{=path} (define LYNX_LSS_FILE)
679 Specify the default style-sheet file's name. Use --without-lss-file
680 to make the default behavior match the non-color-style (if no --lss
681 option is given, and no COLOR_STYLE setting is in lynx.cfg).
682
683 --with-man2html[=XXX]
684 Optionally use man2html (or some other program XXX)
685 https://invisible-island.net/scripts/man2html.html
686 when generating lynx.html from lynx.man
687
688 --with-mime-libdir=list (define MIME_LIBDIR)
689 Use this option to specify the system directory containing the
690 mime.types and mailcap files.
691
692 --with-neXtaw
693 This option allows you to specify the X libraries used if you
694 are configuring lynx to use PDCurses on a Unix platform.
695
696 --with-nls-datadir=DIR
697 Use this option to override the configure script's NLS data directory,
698 under which the locale (i.e., language) files are installed. The
699 default value is derived at configure time, and depends on whether GNU
700 or native gettext is used.
701
702 --with-pkg-config[=XXX]
703 Use pkg-config, if available, to tell how to build with certain
704 libraries, e.g., openssl and gnutls. If pkg-config is not used,
705 or if those libraries are not known to pkg-config, then the configure
706 script will search for the libraries as described in the --with-ssl
707 and --with-gnutls options.
708
709 The optional value XXX specifies the pathname for pkg-config, e.g.,
710 "/usr/local/bin/pkg-config".
711
712 Note: The pkg-config program is used only if no explicit directory
713 parameter is provided for the --with-ssl or --with-gnutls options.
714
715 --with-screen=XXX
716 Use this option to select the screen type. The option value, XXX
717 must be one of curses (the default), ncurses, ncursesw, pdcurses or
718 slang. Specifying a screen type causes the configure script to
719 look in standard locations for the associated header and library
720 files, unless you have preset the $CFLAGS and $LIBS variables.
721
722 --with-screen=ncursesw (define NCURSES, WIDEC_CURSES)
723 --with-screen=ncurses (define NCURSES)
724 --with-screen=pdcurses (define PDCURSES)
725 --with-screen=slang (define USE_SLANG)
726
727 Note that some systems may have a default curses library which
728 does not support color, while on others, ncurses is installed as
729 the curses library. The variant ncursesw is the wide-character
730 version of ncurses. See also the --enable-widec option.
731
732 For the ncurses/ncursesw options, the script also accepts variants
733 such as "ncursesw6", which helps it to find a specific ncurses config
734 script.
735
736 The pdcurses selection supported by the configure script is a UNIX-only
737 library which uses X11. If you are configuring with DJGPP, the likely
738 choice is "curses", since that is how PDCurses is normally installed.
739
740 --with-socks[=XXX] (define SOCKS)
741 Use this option to configure with the socks library.
742
743 The optional value XXX specifies the directory in which the library
744 can be found, and may be either the path of the "lib" directory,
745 or one level above. In either case, the corresponding header files
746 are assumed to be in the parallel "include" directory.
747
748 --with-socks5[=XXX] (define USE_SOCKS5, SOCKS)
749 Use this option to configure with the socks5 library.
750
751 The optional value XXX specifies the directory in which the library
752 can be found, and may be either the path of the "lib" directory,
753 or one level above. In either case, the corresponding header files
754 are assumed to be in the parallel "include" directory.
755
756 If you make a SOCKSified lynx, you may have trouble accessing FTP
757 servers. Also, instead of SOCKSifying lynx for use behind a firewall,
758 you are better off if you make it normally, and set it up to use a
759 proxy server. You can SOCKSify the proxy server, and it will handle
760 all clients, not just Lynx. If you do SOCKSify lynx, you can turn off
761 SOCKS proxy usage via a -nosocks command line switch.
762
763 --with-ssl[=XXX] (define USE_SSL)
764 Use this option to configure with the OpenSSL library, or SSLeay.
765 See docs/README.ssl for additional information.
766
767 The optional value XXX specifies the directory in which the library
768 can be found, and may be either the path of the "lib" directory,
769 or one level above. In either case, the corresponding header files
770 are assumed to be in the parallel "include" directory.
771
772 --with-system-type=XXX
773 For testing, override the derived host system-type which is used to
774 decide things such as special compiler options. This is normally
775 chosen automatically based on the type of system which you are
776 building on. We use it for testing the configure script.
777
778 --with-textdomain[=XXX] (define NLS_TEXTDOMAIN)
779 Set the NLS textdomain to the given value. This is normally "lynx".
780
781 --with-zlib[=XXX] (define USE_ZLIB)
782 Use zlib for decompression of some gzip files.
783
784 The optional value XXX specifies the directory in which the library
785 can be found, and may be either the path of the "lib" directory,
786 or one level above. In either case, the corresponding header files
787 are assumed to be in the parallel "include" directory.
788
789 --with-zstd[=XXX] (define USE_ZSTD)
790 Use zstd decompression.
791
792 The optional value XXX specifies the directory in which the library
793 can be found, and may be either the path of the "lib" directory,
794 or one level above. In either case, the corresponding header files
795 are assumed to be in the parallel "include" directory.
796
797 1d. Environment variables
798 The configure script looks for programs and libraries in known/standard
799 locations. You can override the behavior of the script by presetting
800 environment variables. If they are set, the script will try to use these
801 values rather than computing new ones. Useful variables include:
802
803 CC - the C compiler. If you do not override this, configure
804 will try to use gcc. For instance, setting CC=cc and
805 exporting this value will cause configure to use cc instead.
806
807 CFLAGS - the C compiler options. These also include C
808 preprocessor options (such as -I), since the $CFLAGS and
809 $CPPFLAGS variables are maintained separately.
810
811 CPPFLAGS - the C preprocessor options. For some configuration
812 tests, you may need to set both $CFLAGS and $CPPFLAGS if
813 you are compiling against header files in nonstandard
814 locations.
815
816 LDFLAGS - linker/loader options.
817
818 LIBS - the libraries to be linked, with -L and -l options. If
819 you are linking against libraries in nonstandard locations
820 unrelated to the install prefix (that you can specify in
821 the configure script) you may have to specify these via
822 the $LIBS variable.
823
824 Lynx has compiled-in the pathnames of various programs which it executes.
825 Normally the full pathnames are given, rather than the program name
826 alone. These may be preset in the environment by the capitalized version,
827 e.g., INSTALL for "install". The corresponding internal definitions
828 are suffixed "_PATH", e.g., "INSTALL_PATH".
829
830
831 -- 1997/7/27 - T. Dickey <[email protected]>
832
833 1e. Examples
834 If you are compiling Lynx for your personal use and are restricted to your
835 home directory, a simple method for building would be to choose some
836 directory, say ".lynx", and then type:
837
838 ./configure --prefix=~/.lynx --exec-prefix=~/.lynx
839 and
840 make install
841
842 Now you only need to add "~/.lynx/bin" to your PATH and edit "~/.lynx/lib/
843 lynx.cfg" as described above.
844
845 I personally use the following csh shell script to set environment
846 variables and configure options rather than type them each time.
847 #!/bin/csh -f
848 setenv CPPFLAGS "-I$HOME/slang -I$HOME/.usr/include"
849 setenv LIBS "-L$HOME/.slang/lib -L$HOME/.usr/lib"
850 ./configure --exec-prefix=$HOME --bindir=$HOME/.lynx \
851 --mandir=$HOME/.usr/man --sysconfdir=$HOME/.usr/lib \
852 --with-screen=slang --with-zlib
853
854 CPPFLAGS in this example defines the full path to the slang and zlib
855 header files, which are not kept in standard directories. Likewise, LIBS
856 defines the nonstandard locations of libslang.a and libz.a. Setting the
857 option --bindir tells the configure script where I want to install the
858 lynx binary; setting --mandir tells it where to put the lynx.1 man page,
859 and setting --sysconfdir tells it (while at the same time defining
860 LYNX_CFG_FILE) where to put the configuration file "lynx.cfg", when I type
861 "make install". The --with-screen=slang and --with-zlib options are
862 explained above.
863
864 2. Wais support (optional)
865 To add direct WAIS support, get the freeWAIS distribution from
866 "ftp://ftp.cnidr.org/pub/NIDR.tools/freewais", and compile it. The
867 compile process will create the libraries you will need, wais.a and
868 client.a. Edit the Makefile in the top level directory and add the
869 library locations under the DIRECT WAIS ACCESS heading. Edit the Makefile
870 for the WWW Library in "WWW/Library/Implementation/makefile" to point to
871 the include directory for the freewais distribution. Precompiled
872 libraries are available for many platforms if you don't wish to compile
873 one yourself.
874
875 -------------------------------------------------------------------------------
876
877 III. Compile instructions -- VMS
878
879 Step 1. Downloading binary files.
880 Lynx must handle all IO as streams, and on VMS, output files are always
881 created with Stream_LF format via the C RTL's fopen(). The file headers
882 indicate Implied Carriage Control, even when the transfer was in binary
883 mode, which can confuse downloading software and cause corruption of
884 the file contents. To deal with this, you should define the symbol
885 USE_FIXED_RECORDS as TRUE in userdefs.h and/or lynx.cfg. This will
886 instruct Lynx to correct the header information to indicate FIXED 512
887 records, with No Implied Carriage Control. If Lynx fails to do the
888 conversion (because the file wasn't mapped to a binary MIME type) you can
889 execute FIXED512.COM externally to correct the header information. The
890 command file uses Joe Meadow's FILE utility, or the SET FILE/ATTRIBUTES
891 command on current versions of VMS, to modify the headers. See the
892 comments in FIXED512.COM, userdefs.h and lynx.cfg for more information.
893
894 Step 2. Passive FTP
895 If your system requires the PASV FTP code instead of the standard PORT FTP
896 code (e.g., to deal with a firewall) then set the FTP_PASSIVE option in
897 lynx.cfg
898
899 Step 3a.
900 Lynx uses the VMS port of gzip for uncompressing streams which have
901 Content-Encoding headers indicated compression with gzip or the
902 Unix compress. If you do not have gzip installed on your system
903 you can get it from "ftp://ftp.wku.edu/" in the fileserv directory.
904 The command Lynx uses to uncompress on VMS is "gzip -d".
905
906 If you are using the SOCKETSHR library, read SOCKETSHR.announce and
907 make sure you have defined SOCKETSHR and SOCKETSHR_LIBRARY as explained
908 therein.
909
910 A "build.com" and "build-slang.com" script for building Lynx with curses
911 or slang is in the top level directory. All you have to do is type
912 "@build" or "@build-slang" and answer its prompt for your system's TCP-IP
913 software. Current choices are:
914 MULTINET (default)
915 UCX
916 WIN_TCP
917 CMU_TCP
918 SOCKETSHR_TCP
919 TCPWARE
920 It will autosense whether you have VAXC, DECC or GNUC on VAX or AXP and
921 build appropriately. If a WWWLib already exists for that TCP-IP software,
922 it will prompt you for whether you want to rebuild it. If you want to
923 build a WWWLib separately, you can type "@libmake.com" with your default
924 directory set to [.WWW.Library.vms] instead doing it via "build.com" in
925 the top directory. You may need to modify "build-slang.com", as described
926 in its header, so that it can find slang.olb on your system. If you have
927 both DECC and VAXC, it will use DECC to benefit from the newer and more
928 efficient memory management functions.
929
930 Step 3b. (optional compilation method)
931 If you have and want to use MMS, read the header of descrip.mms in the
932 top directory and be sure you include the appropriate macro definitions
933 when you invoke it:
934
935 $ MMS /Macro = (MULTINET=1) for VAXC - MultiNet
936 $ MMS /Macro = (WIN_TCP=1) for VAXC - Wollongong TCP/IP
937 $ MMS /Macro = (UCX=1) for VAXC - UCX
938 $ MMS /Macro = (CMU_TCP=1) for VAXC - OpenCMU TCP/IP
939 $ MMS /Macro = (SOCKETSHR_TCP=1) for VAXC - SOCKETSHR/NETLIB
940 $ MMS /Macro = (TCPWARE=1) for VAXC - TCPWare TCP/IP
941
942 $ MMS /Macro = (MULTINET=1, DEC_C=1) for DECC - MultiNet
943 $ MMS /Macro = (WIN_TCP=1, DEC_C=1) for DECC - Wollongong TCP/IP
944 $ MMS /Macro = (UCX=1, DEC_C=1) for DECC - UCX
945 $ MMS /Macro = (CMU_TCP=1, DEC_C=1) for DECC - OpenCMU TCP/IP
946 $ MMS /Macro = (SOCKETSHR_TCP=1,DEC_C=1) for DECC - SOCKETSHR/NETLIB
947 $ MMS /Macro = (TCPWARE=1, DEC_C=1) for DECC - TCPWare TCP/IP
948
949 $ MMS /Macro = (MULTINET=1, GNU_C=1) for GNUC - MultiNet
950 $ MMS /Macro = (WIN_TCP=1, GNU_C=1) for GNUC - Wollongong TCP/IP
951 $ MMS /Macro = (UCX=1, GNU_C=1) for GNUC - UCX
952 $ MMS /Macro = (CMU_TCP=1, GNU_C=1) for GNUC - OpenCMU TCP/IP
953 $ MMS /Macro = (SOCKETSHR_TCP=1,GNU_C=1) for GNUC - SOCKETSHR/NETLIB
954 $ MMS /Macro = (TCPWARE=1, GNU_C=1) for GNUC - TCPWare TCP/IP
955
956 If you just type "MMS" it will default to the MULTINET and VAXC
957 configuration. MMS will build the WWW library and Lynx sources, and
958 link the executable. However, not all of the header dependencies are
959 specified. If you are not a developer, and need a clean build, you
960 should use build.com instead of the MMS utility.
961
962 If you want SOCKS support on VMS, you must add SOCKS as a compilation
963 definition, and the SOCKS library to the link command. However, instead
964 of SOCKSifying Lynx for use behind a firewall, you are better off if you
965 build Lynx normally, and set up Lynx to use a proxy server (see below).
966 You instead can SOCKSify the proxy server, and it will handle all clients,
967 not just Lynx.
968
969 -------------------------------------------------------------------------------
970
971 IV. Compile instructions -- Win32 (Windows95/98/NT)
972
973 Borland C:
974 ---------
975
976 Simplified:
977 ----------
978
979 Sources:
980 Download the current sources (choose a zip-file) from
981 https://lynx.invisible-island.net/
982 and unzip them into a directory where you will build Lynx.
983
984 Compiler:
985 Download the Borland C/C++ 5.51 compiler from
986 http://forms.embarcadero.com/forms/BCC32CompilerDownload
987
988 This is a file named "freecompilertools.exe".
989
990 Run that to install the compiler, e.g., in
991 c:\app\bcc55
992
993 Do not install into a directory with spaces in its name, such as
994 c:\program files
995
996 Libraries:
997 Download these "setup" files from http://gnuwin32.sourceforge.net
998 libiconv-1.9.2-1.exe (libiconv)
999 libintl-0.14.4.exe (libintl)
1000 openssl-0.9.8h-1-setup.exe (openssl)
1001 pdcurses-2.6.exe (pdcurses)
1002 zlib-1.2.3.exe (zlib)
1003
1004 Install all of the packages in the same directory, "c:\app\GnuWin32".
1005
1006 A fix is needed in GnuWin32 include/zconf.h: change line reading
1007 #if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */
1008 to
1009 #ifdef HAVE_UNISTD_H
1010
1011 Prepare import-libraries using Borland's implib program. The ".lib"
1012 files that it uses are a different format than the import libraries
1013 distributed with GnuWin2. From Lynx's source directory run
1014 bcblibs
1015
1016 Environment:
1017 At this point, the bin-directory for the compiler and for the GnuWin32
1018 libraries should be in your path.
1019
1020 Building:
1021 From Lynx's source directory
1022 cd src\chrtrans
1023 makew32 clean
1024 makew32
1025 cd ..\..
1026 makew32 clean
1027 makew32
1028
1029 -------------------------------------------------------------------------------
1030
1031 Detailed:
1032 --------
1033 The original Win32 port was built with Borland C++ 4.52, but later
1034 versions reportedly can be used. Before compiling the Lynx sources, you
1035 need a curses library, and it is recommended that you have the zlib
1036 library. Get pdcurses2.3 from "http://pdcurses.sourceforge.net/". I
1037 have modified it so that mouse support is no longer broken for Lynx (see
1038 "http://www.fdisk.com/doslynx/"). You will want to get zlib from
1039 "http://www.zlib.net/ ". Compile these libraries, and
1040 put them in a convenient place (pdcurses inside the Lynx directory).
1041
1042 Unpack the latest Lynx source distribution, and make an obj directory
1043 under the source root to contain the compile output. Copy in your
1044 IDE file. A sample IDE file and helper libraries are available at
1045 "http://www.fdisk.com/doslynx/wlynx/source/".
1046
1047 First build the .h files in src\chrtrans using "makew32.bat". Double
1048 check for new .tbl files; hand edit in any new ones, and then do "makew32".
1049 Jump into Borland C++, load the project (IDE file) and compile Lynx.
1050 Alternately, after compiling the chartrans tables, you can come back to
1051 the top directory and compile manually, i.e., do "make -f makefile.bcb".
1052
1053 I also have a binary available at "http://www.fdisk.com/doslynx/". This
1054 binary was compiled with pdcurses 2.3, hacked so win32 mouse support works,
1055 and with zlib, so Lynx can do gzip routines internally. More hints and
1056 information can be found in "http://www.fdisk.com/doslynx/lynxport.htm".
1057
1058 -- 1997/10/12 - W. Buttles <[email protected]>
1059 -- 2010/11/27 - URL's updated by Doug Kaufman <[email protected]>
1060
1061 -------------------------------------------------------------------------------
1062
1063 Cygwin:
1064 It is possible to compile under the cygwin system, which will allow you to
1065 use the configure script described above for Unix. Type, for example,
1066 "./configure --with-screen=ncurses --with-libz" in a Dos window running the
1067 cygwin bash$ shell. You also have the choice of using either pdcurses or
1068 slang. You will need a launch program such as sh.exe to call helper
1069 applications. Paths may need to be in cygwin style, rather than Windows
1070 style (e.g., TMPDIR=/cygdrive/d/cygwin/tmp, rather than
1071 TMPDIR=d:\cygwin\tmp).
1072
1073 Visual C++:
1074 You must have compiled zlib and PDCurses with the -MT (threaded code)
1075 option. This is not the default with zlib (see Makefile.msc).
1076
1077 Copy into lib the following
1078 zconf.h
1079 zlib.h
1080 zlib.lib
1081
1082 from the zlib build-tree, and
1083 curses.h
1084 pdcurses.lib
1085
1086 from the PDCurses build-tree.
1087
1088 Then
1089 make-msc
1090
1091 to build lynx.
1092
1093 -------------------------------------------------------------------------------
1094
1095 V. Compile instructions -- 386 DOS
1096
1097 Compiling for DOS with DJGPP has traditionally been a multistep
1098 procedure. Now, if you have a full installation of DJGPP you can
1099 also install using the configure script, just as in the UNIX
1100 section. This needs to be done under a BASH shell. Use a shell
1101 script to run configure as in the example at the end of this
1102 section. Otherwise you can follow the below instructions. The
1103 multistep procedure for DOS may not be supported in the future
1104 and use of the configure script is recommended. The information
1105 about required libraries and unpacking applies to both methods of
1106 compiling.
1107
1108 First install the C compiler and its libraries (see readme.1st from
1109 DJGPP distribution).
1110
1111 Originally, lynx makefiles come with the initial -O2 optimization
1112 level. If you experience compilation process too slow due to paging
1113 to the disk (DPMI server provide virtual memory, when in lack of
1114 RAM), you may change optimization to -O1 or turn the optimization
1115 off entirely.
1116
1117 If using optimization level -O2 or -O3 with older versions of DJGPP
1118 and GCC, you may need to "stubedit" your "cc1.exe" file to enlarge
1119 compiler stack size. For instance, if using DJGPP 2.02 and GCC 2.8.1,
1120 to compile with -O3 optimization, the stub needs to be edited to give
1121 a larger stack. To do this go into djgpp\lib\gcc-lib\djgpp\2.81 and
1122 either type the command:
1123 "stubedit cc1.exe bufsize=63k minstack=2M",
1124 or edit interactively with: "stubedit cc1.exe". Current versions of
1125 DJGPP and GCC generally work with the standard stack.
1126
1127 Unpack the source code using a DOS program like UNZIP386. If you are
1128 using PKUNZIP to unpack the .zip archive, you must use the -d command
1129 line switch to restore the directory structure contained in the archive,
1130 i.e., do "pkunzip -d lynx-cur.zip". No switch is required if you use
1131 unzip386 or unzip. If you are trying to compile the 386DOS port under a
1132 WinNT DOS shell, be sure to unpack the source with a DOS program so
1133 that all directories will be adjusted to the DOS 8.3 file format necessary
1134 for compiling with DJGPP. Do NOT use Winzip, because that will create
1135 long filenames that will not be recognized by DJGPP tools.
1136
1137 If you wish to compile with "USE_ZLIB" (recommended), you must have the
1138 zlib library. Get the source from
1139 http://www.zlib.net
1140 and compile it. Put libz.a in the lib subdirectory of DJGPP, and put
1141 zlib.h and zconf.h in the include subdirectory.
1142
1143 In addition to the files in the Lynx distribution, you will need a curses
1144 package and a TCP package. You can use PDCurses (available at
1145 "http://pdcurses.sourceforge.net/") and the DJGPP port of WATTCP. The
1146 updated version of WATTCP is known as WATT-32, and is available at
1147 "http://home.broadpark.no/~gvanem/". You can also use slang (available at
1148 "http://www.jedsoft.org/slang/") as your screen library. You must
1149 compile these before you go any further. If you wish to use PDCurses 2.6,
1150 you need to first apply the following patch:
1151
1152 --- dos/gccdos.mak.ori 2002-01-11 20:11:18.000000000 -0800
1153 +++ dos/gccdos.mak 2003-12-13 21:29:28.000000000 -0800
1154 @@ -40,11 +40,11 @@
1155 CFLAGS = -c -g -Wall -DPDCDEBUG
1156 LDFLAGS = -g
1157 else
1158 - CFLAGS = -c -O -Wall
1159 + CFLAGS = -c -O2 -Wall
1160 LDFLAGS =
1161 endif
1162
1163 -CPPFLAGS = -I$(PDCURSES_HOME) -I$(CCINCDIR) -D_NAIVE_DOS_REGS
1164 +CPPFLAGS = -I$(PDCURSES_HOME) -I$(CCINCDIR) -D_NAIVE_DOS_REGS -DHAVE_STRING_H
1165
1166 CCFLAGS = $(CFLAGS) $(CPPFLAGS)
1167
1168 @@ -64,10 +64,10 @@
1169 all: $(PDCLIBS) $(DEMOS)
1170
1171 clean:
1172 -del *.o
1173 - -del curses.lib
1174 - -del panel.lib
1175 + -del pdcurses.a
1176 + -del panel.a
1177
1178 demos: $(DEMOS)
1179
1180 @@ -287,33 +287,27 @@
1181 #------------------------------------------------------------------------
1182
1183 firework.exe: firework.o $(LIBCURSES)
1184 - $(LINK) $(LDFLAGS) -o firework firework.o $(LIBCURSES)
1185 - $(COFF2EXE) firework
1186 + $(LINK) $(LDFLAGS) -o firework.exe firework.o $(LIBCURSES)
1187 strip $@
1188
1189 newdemo.exe: newdemo.o $(LIBCURSES)
1190 - $(LINK) $(LDFLAGS) -o newdemo newdemo.o $(LIBCURSES)
1191 - $(COFF2EXE) newdemo
1192 + $(LINK) $(LDFLAGS) -o newdemo.exe newdemo.o $(LIBCURSES)
1193 strip $@
1194
1195 ptest.exe: ptest.o $(LIBCURSES) $(LIBPANEL)
1196 - $(LINK) $(LDFLAGS) -o ptest ptest.o $(LIBCURSES) $(LIBPANEL)
1197 - $(COFF2EXE) ptest
1198 + $(LINK) $(LDFLAGS) -o ptest.exe ptest.o $(LIBCURSES) $(LIBPANEL)
1199 strip $@
1200
1201 testcurs.exe: testcurs.o $(LIBCURSES)
1202 - $(LINK) $(LDFLAGS) -o testcurs testcurs.o $(LIBCURSES)
1203 - $(COFF2EXE) testcurs
1204 + $(LINK) $(LDFLAGS) -o testcurs.exe testcurs.o $(LIBCURSES)
1205 strip $@
1206
1207 tuidemo.exe: tuidemo.o tui.o $(LIBCURSES)
1208 - $(LINK) $(LDFLAGS) -o tuidemo tuidemo.o tui.o $(LIBCURSES)
1209 - $(COFF2EXE) tuidemo
1210 + $(LINK) $(LDFLAGS) -o tuidemo.exe tuidemo.o tui.o $(LIBCURSES)
1211 strip $@
1212
1213 xmas.exe: xmas.o $(LIBCURSES)
1214 - $(LINK) $(LDFLAGS) -o xmas xmas.o $(LIBCURSES)
1215 - $(COFF2EXE) xmas
1216 + $(LINK) $(LDFLAGS) -o xmas.exe xmas.o $(LIBCURSES)
1217 strip $@
1218
1219
1220 --- dos/pdckbd.c.ori 2002-09-01 00:13:30.000000000 -0800
1221 +++ dos/pdckbd.c 2004-01-19 20:30:02.000000000 -0800
1222 @@ -362,7 +362,7 @@
1223 return ((int) (0xb8 << 8));
1224 if (ascii == 0xe0 && scan == 0x53 && pdc_key_modifiers & PDC_KEY_MODIFIER_SHIFT) /* Shift Del */
1225 return ((int) (0xb9 << 8));
1226 - if (ascii == 0x00 || ascii == 0xe0)
1227 + if (ascii == 0x00 || (ascii == 0xe0 && scan != 0x00))
1228 return ((int) (scan << 8));
1229 return ((int) (ascii));
1230 }
1231 @@ -522,7 +522,7 @@
1232 _watch_breaks();
1233 #else
1234 # ifdef GO32
1235 - (void*)signal(SIGINT,(setting ? SIG_DFL : SIG_IGN));
1236 +/* (void*)signal(SIGINT,(setting ? SIG_DFL : SIG_IGN)); */
1237 /* __djgpp_set_ctrl_c(setting);*/
1238 setcbrk(setting);
1239 # else
1240 --- pdcurses/kernel.c.ori 2002-11-27 03:24:32.000000000 -0800
1241 +++ pdcurses/kernel.c 2003-12-13 21:22:38.000000000 -0800
1242 @@ -27,6 +27,10 @@
1243 #include <memory.h>
1244 #endif
1245
1246 +#ifdef HAVE_STRING_H
1247 +#include <string.h>
1248 +#endif
1249 +
1250 #ifdef UNIX
1251 #include <defs.h>
1252 #include <term.h>
1253 --- pdcurses/pdcutil.c.ori 2001-01-10 00:27:22.000000000 -0800
1254 +++ pdcurses/pdcutil.c 2003-12-13 21:24:58.000000000 -0800
1255 @@ -49,7 +49,7 @@
1256 # include <limits.h>
1257 #endif
1258
1259 -#ifdef STDC_HEADERS
1260 +#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
1261 # include <string.h>
1262 #endif
1263
1264 --- pdcurses/pdcwin.c.ori 2002-05-25 17:13:32.000000000 -0800
1265 +++ pdcurses/pdcwin.c 2003-12-13 21:26:02.000000000 -0800
1266 @@ -27,6 +27,10 @@
1267 # include <memory.h>
1268 #endif
1269
1270 +#ifdef HAVE_STRING_H
1271 +#include <string.h>
1272 +#endif
1273 +
1274 #ifndef HAVE_MEMMOVE
1275 # define memmove PDC_memmove
1276 #endif
1277
1278 If you wish to compile with SSL enabled, you need to get and compile
1279 OpenSSL. The DJGPP port has been successfully compiled with the
1280 development version of OpenSSL. DJGPP can compile OpenSSL from the
1281 standard source distribution (http://www.openssl.org/). See the file
1282 "INSTALL.DJGPP" in the OpenSSL distribution.
1283
1284 If you have trouble applying the patches, try using the "patch" program,
1285 ("http://www.delorie.com/pub/djgpp/current/v2gnu/pat261b.zip").
1286 To read the Unix man style documentation, use, for example, "less"
1287 ("http://www.delorie.com/pub/djgpp/current/v2gnu/lss374b.zip").
1288 Compile or place your compiled PDCurses library in /djgpp/pdcur26, and
1289 compile or place your compiled WATT-32 library in /djgpp/watt32. If
1290 using the SLANG library, put libslang.a in your DJGPP/lib directory and put
1291 slang.h in your DJGPP/include directory, or in the appropriate directories
1292 specified by LIBRARY_PATH and INCLUDE_PATH in your DJGPP.ENV file.
1293
1294 Move to the "lynx2-*/WWW/Library/djgpp" directory. If compiling with
1295 PDCurses, do "make". If using SLANG, do "make -f makefile.sla". This
1296 should compile libwww.a. Next move to the "lynx2-*/src/chrtrans" directory
1297 and do "make -f makefile.dos" to compile the character tables. Then move
1298 to the "lynx2-*/src" directory. There are three choices for compiling at
1299 this point. You can do "make -f makefile.dos" to compile with PDCurses,
1300 "make -f makefile.wsl" to compile with SLANG, or "make -f makefile.dsl" to
1301 compile with SLANG and the DJGPP keyhandler. At the time of this writing,
1302 it is not clear what the advantages and disadvantages of each version are.
1303 The PDCurses version has the most experience and allows remapping of ALT
1304 and Function keys. The SLANG version seems to have better screen handling.
1305 It allows mapping of function keys, but not ALT keys. The SLANG with DJGPP
1306 keyhandler allows mapping of ALT and Function keys, but has the risk of
1307 incompatibilities from mixing different programs.
1308
1309 If you wish to compile with support for internationalization of messages,
1310 you first need to install the DOS ports of the GNU gettext and libiconv
1311 packages, available from any DJGPP mirror site. Then uncomment the lines
1312 for INTLFLAGS in src/makefile.dsl and in WWW/Library/djgpp/makefile.sla,
1313 and remove the "#" from the LIBS line in src/makefile.dsl. Make similar
1314 changes if using one of the other DOS makefiles. See the gettext
1315 documentation for information on creating and using message files for
1316 different languages.
1317
1318 If all goes well, you will have a lynx.exe file. If you have trouble,
1319 check to be sure djgpp.env is the way it came in the original package.
1320
1321 To test Lynx_386 you must have a packet driver installed. The simplest
1322 method is to use a null packet driver that just allows Lynx to start
1323 up, but doesn't do anything else. One such executable driver has been
1324 posted, uuencoded, to the lynx-dev mailing list in January 1998,
1325 but is corrupted in the mailing list archive. You can get this at
1326 "http://www.ncf.ca/ncf/pda/computer/dos/net/nullpkt.zip". Start the
1327 dummy packet driver with "nullpkt 0x60", and take it out of memory with
1328 "nullpkt -u". You can also use slip8250.com. See the CRYNWR package
1329 "ftp://ftp.simtel.net/pub/simtelnet/msdos/pktdrvr/pktd11.zip". Usage
1330 is "slip8250 0x60", but you may have to invoke it as, for example,
1331 "slip8250 0x60 6 3 0x2F8" so that it uses COM2 and IRQ 3, in order to
1332 avoid an IRQ conflict with a mouse or some other device. Another packet
1333 driver is slipper.exe, which is available from many sites, including
1334 "http://www.cavazza.it/file/bbs/intsoft/slippr15.zip". To remove it from
1335 memory use termin.com (usage "termin 0x60"), available in the CRYNWR
1336 package. To connect over a dialup PPP connection you need dosppp or klos'
1337 pppshare. (Find at:
1338 "http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/net/dosppp/dosppp06.zip"
1339 "http://www.ncf.carleton.ca/ncf/pda/computer/dos/net/dosppp06.zip"
1340 "http://www.cavazza.it/file/bbs/intsoft/dosppp06.zip"
1341 "http://www.cavazza.it/file/bbs/intsoft/pppshare.exe")
1342
1343 File access looks like this:
1344
1345 file:///c:/
1346 file:///c:/dos
1347 file:///c:/dos/command.com
1348 file://localhost/c:/
1349 file://localhost/c:/dos
1350 file://localhost/c:/dos/command.com
1351
1352 See "http://www.fdisk.com/doslynx/lynxport.htm" for more hints and
1353 some precompiled libraries. One problem you can encounter is editing
1354 userdefs.h and lynx.cfg, which have unix-style end of lines. You would
1355 be well advised to use an editor that can handle end of lines terminated
1356 with a single LF character. You can also unpack the source code using
1357 unzip386 or unzip with the -a or -aa switch to convert unix LF to dos CRLF.
1358 That will make texts more readable under DOS. If you compile lynx
1359 regularly, you may automate the procedure by creating a batch file such
1360 as the following.
1361
1362 cd djgpp\watt32\src
1363 configur djgpp
1364 make -f djgpp.mak
1365 cd ..\..\..\www\library\djgpp
1366 make
1367 cd ..\..\..\src\chrtrans
1368 make -f makefile.dos
1369 cd ..\..\src
1370 make -f makefile.dos
1371 strip lynx.exe
1372 cd ..
1373
1374 This batch file expects the DJGPP port of WATT-32 to be installed in the
1375 lynx2-* directory. Place a copy of this batch file, named "djgpp.bat",
1376 in the lynx2-* directory, move to that directory and type "djgpp". A more
1377 complete batch file with error checking and annotation can be found at:
1378 "http://lists.nongnu.org/archive/html/lynx-dev/1997-11/msg00250.html".
1379
1380 If you use the configure method, remember that if you configure with
1381 the option "--enable-nls", you also need to set LIBS="-liconv". A
1382 sample shell script to run configure using PDCurses follows. If you
1383 compile to use SLANG, note that the DJGPP keyhandler will be used
1384 instead of the SLANG keyhandler unless you define "NO_DJ_KEYHANDLER".
1385
1386 #!/bin/sh
1387 CFLAGS="-O2 -I/djgpp/pdcur26 -I/djgpp/watt32/inc" \
1388 LIBS="-L/djgpp/pdcur26/lib -L/djgpp/watt32/lib -liconv" \
1389 ./configure --prefix=d:/djgpp/lynx-rel/lynx-cnf \
1390 --with-screen=curses \
1391 --disable-full-paths \
1392 --enable-addrlist-page \
1393 --enable-change-exec \
1394 --enable-cgi-links \
1395 --enable-charset-choice \
1396 --enable-color-style \
1397 --enable-exec-links \
1398 --enable-externs \
1399 --enable-file-upload \
1400 --enable-nested-tables \
1401 --enable-nls \
1402 --sysconfdir=d:/djgpp/lynx-rel/lynx-cnf \
1403 --with-bzlib \
1404 --with-zlib \
1405 --with-ssl
1406
1407 -- 1997/9/29 - D. Kaufman <[email protected]>
1408 -- 1997/10/3 - B. Schiavo <[email protected]>
1409 -- Last update - 2010/11/27
1410
1411 -------------------------------------------------------------------------------
1412
1413 VI. General installation instructions
1414
1415 Once you have compiled Lynx, test it out first on a local file. Be sure
1416 Lynx can find lynx.cfg. A _sample_ test command line would be:
1417 'lynx -cfg=/usr/local/lib/lynx.cfg .'. Once you are satisfied that
1418 Lynx works, go ahead and install it. For Unix, type "make install".
1419
1420 For VMS, you need to have the executable in a public place, make it
1421 accessible, define it as a foreign command, and copy lynx.cfg to
1422 "Lynx_Dir". Look at lynx.com in the samples directory as a model for
1423 installing Lynx. To include lynx.hlp in the system HELP library, use
1424 the command: "$ library/replace sys$help:helplib.hlb lynx.hlp".
1425
1426 Local copies of the Lynx online help should be made accessible in response
1427 to the Lynx 'h'elp command by defining HELPFILE in userdefs.h and/or
1428 lynx.cfg to an appropriate file://localhost/path URL. On Unix, all you
1429 need to do is type "make install-help." If you are installing manually,
1430 copy the files "COPYHEADER" and "COPYING" into the lynx_help directory
1431 BEFORE moving the lynx_help tree to its final location. These files are
1432 referenced hypertextually from help documents.
1433
1434 If you have old, pre-existing bookmark files from earlier versions of
1435 Lynx, those files may have to be updated. Conversion may just consist
1436 of adding one META line near the top, or may require creating new book-
1437 mark files and editing in bookmarks from outdated files.
1438
1439 IMPORTANT! Be sure you have read the warnings about setting up an
1440 anonymous account with Lynx if you plan to give public access to Lynx.
1441
1442 After applying patches or editing files to correct for an unsuccessful
1443 build, be certain to do a "make clean" (or "make distclean" for those
1444 using auto-configure) before attempting to compile again.
1445
1446 -------------------------------------------------------------------------------
1447
1448 VII. Setting environment variables before running Lynx (optional)
1449
1450 1. All ports
1451
1452 The Lynx Users Guide describes all of the environment variables used by
1453 Lynx. This should be checked later along with reading lynx.cfg after you
1454 have installed Lynx.
1455
1456 2. Win32 (95/98/NT) and 386 DOS
1457
1458 These ports cannot start before setting certain environment variables.
1459 Here are some environment variables that should be set, usually in a
1460 batch file that runs the lynx executable. Make sure that you have enough
1461 room left in your environment. You may need to change your "SHELL="
1462 setting in config.sys. In addition, lynx looks for a "SHELL" environment
1463 variable when shelling to DOS. If you wish to preserve the environment
1464 space when shelling, put a line like this in your AUTOEXEC.BAT file also
1465 "SET SHELL=C:\COMMAND.COM /E:4096". It should match CONFIG.SYS.
1466
1467 HOME Where to keep the bookmark file and personal config files.
1468 TEMP or TMP Bookmarks are kept here with no HOME. Temp files here.
1469 USER Set to your login name (optional)
1470 LYNX_CFG Set to the full path and filename for lynx.cfg
1471 LYNX_LSS Set to the full path and filename for lynx.lss
1472 LYNX_SAVE_SPACE The (modifiable) location for downloaded file storage.
1473 SSL_CERT_FILE Set to the full path and filename for your file of trusted
1474 certificates
1475
1476 386 version only:
1477 WATTCP.CFG Set to the full path for the WATTCP.CFG directory
1478 RL_CLCOPY_CMD Command to copy a URL to a "clipboard" file
1479 RL_PASTE_CMD Command to go to a URL in your "clipboard" file
1480
1481 Define these in your batch file for running Lynx. For example, if your
1482 application line is "D:\win32\lynx.bat", lynx.bat for Win32 may look like:
1483 @ECHO OFF
1484 set home=d:\win32
1485 set temp=d:\tmp
1486 set lynx_cfg=d:\win32\lynx.cfg
1487 set lynx_save_space=d:\download
1488 d:\win32\lynx.exe %1 %2 %3 %4 %5
1489
1490 For lynx_386, a typical batch file might look like:
1491
1492 @echo off
1493 set HOME=f:/lynx2-8
1494 set USER=your_login_name
1495 set LYNX_CFG=%HOME%/lynx.cfg
1496 set WATTCP.CFG=%HOME%
1497 f:\lynx2-8\lynx %1 %2 %3 %4 %5 %6 %7 %8 %9
1498
1499 You need to make sure that the WATTCP.CFG file has the correct information
1500 for IP number, Gateway, Netmask, and Domain Name Server. This can also be
1501 automated in the batch file.
1502
1503 Adapted from "readme.txt" by Wayne Buttles and "readme.dos" by Doug
1504 Kaufman.
1505
1506 VIII. Acknowledgment
1507
1508 Thanks to the many volunteers who offered suggestions for making this
1509 installation manual as accurate and complete as possible.
1510
1511 -- 1999/04/24 - H. Nelson <[email protected]>
1512 -- vile:txtmode
1513 -- $LynxId: INSTALLATION,v 1.149 2025/08/05 20:31:12 tom Exp $