about summary refs log tree commit diff stats
path: root/README.configure
blob: 8f0f3080bfe6f3419700c882af7ff18cf9f7043d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
-- 1997/10/21 - T.Dickey <dickey@clark.net>

--------------------------------------------------------------------------------

Overview
--------

This is an auto-configure script which I and Jim Spath have been working
on.  It uses autoconf 2.12 to generate a Bourne shell script
(configure), which can be run on a UNIX platform to generate:

	lynx_cfg.h
	makefile

to replace the top-level Makefile of Lynx.

To use the configure script, simply type

	./configure
or	./configure --with-screen=ncurses
or	./configure --with-screen=slang

and
	make

--------------------------------------------------------------------------------

Platforms
---------

We've tested this on several platforms.  It should work properly on any
Unix-style system.

	Linux 2.0.0 (gcc 2.7.2 with curses, several versions of ncurses
		and slang)
	FreeBSD 2.1.5 (gcc 2.6.3 with curses and ncurses)
	NetBSD
	DGUX
	SunOS 4.1 (cc curses, gcc ncurses and slang)
	Solaris 2.5 (cc and gcc with curses, ncurses and slang)
	IRIX 5.2 and 6.2 (cc and gcc with curses, ncurses and slang)
	CLIX (cc with curses and ncurses)
	AIX 3.2.5 (cc with curses)
	SCO (cc with curses)
	HP-UX (K&R and ANSI cc, gcc with curses, ncurses and slang)

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.

--------------------------------------------------------------------------------

Options
-------

To get a list of the configure script's options, type

	./configure --help

The form of the options is determined by the autoconf package.  We can
use either boolean (enable/disable) or value (with) options.

Here's an alphabetical listing of the Lynx-specific options.  The actual
order shown by the -help option is different due to the requirements of
the script:

  --disable-dired			(defines DIRED_SUPPORT)
	Use this option to enable or 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.<enter>" 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.

	All DirEd functions that were enabled on compilation can be
	disabled or modified at run time via DIRED_MENU symbols in
	lynx.cfg.

	If you have disabled DirEd completely, you can ignore all the
	other DirEd options.

  --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, overriding 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-full-paths
  	Use this option to control whether full utility pathnames are used.
	By default, configure substitutes full pathnames.

  --disable-long-list			(prevent defining LONG_LIST)
  	Use this option to disable long "ls -l" directory listings.

  --disable-parent-dir-refs		(define NO_PARENT_DIR_REFERENCE)
  	Use this option to disable "Up-to" parent-links in directory listings.

  --enable-color-style			(define USE_COLOR_STYLE)
  	Use this option to enable optional/experimental color style.
	(Also defines USE_HASH, LINKEDSTYLES)

  --enable-debug
  	Use this option to compile-in support for debugging.
	(The symbol DEBUG is always defined).

  --enable-externs			(define USE_EXTERNALS)
  	Use this option to compile-in support for passing URLs to external
	programs.

  --enable-find-leaks			(defines LY_FIND_LEAKS)
  	Use this option to compile-in logic for testing memory leaks.

  --enable-font-switch			(defines EXP_CHARTRANS_AUTOSWITCH)
	Use this option to compile-in support for Linux setfont program,
	to switch between fonts automatically.

  --enable-nsl-fork			(defines NSL_FORK)
  	Use this option to compile-in code that forks off gethostbyname
	lookups so the 'z' key can be used to abort a lookup that hangs
	or takes forever.

  --enable-underlines			(defines UNDERLINE_LINKS)
  	Use this option to compile-in logic that makes links underlined
	rather than boldface.

  --enable-warnings
  	Use this option to turn on GCC compiler warnings.

  --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		(defines NCURSES)
	--with-screen=slang		(defines USE_SLANG)

   --with-zlib				(defines USE_ZLIB)
	Use zlib for decompression of some gzip files.

--------------------------------------------------------------------------------

Environment
-----------

This is all documented in great detail in the autoconf package.

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.

	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, e.g,.  with -L and -l
		options.  If you are linking against libraries in
		nonstandard locations (e.g., unrelated to the install
		prefix that you can specify in the configure script),
		you may have to specify these via the $LIBS variable.

You should not have to edit the generated makefiles to modify the values
that the configure script generates.  If you do, you have either found a
bug in the script, or you do not understand how to use it properly.