Google

alink="#551a8b" lang="en">
retawq Documentation
Compile-Time Configuration Options

Introduction

For configuring retawq before building the program ("compile-time configuration"), both the "classical" Makefiles and the more modern configure scripts are supported.

  • classical Makefile - you can change the options manually in the file Makefile using a text editor. The compile-time configuration option names begin with "OPTION_".
  • configure script - you can specify the compile-time configuration options as command-line arguments for the configure script. The arguments begin with "--enable-", "--disable-" or "--set-"; you can get a list of all script options with "./configure --help".

The Options

  • OPTION_NCURSES / --enable-ncurses - the curses library which is installed on your system; we currently support "ncurses" (1; default) and "curses" (0); this library is used for displaying information on text terminals.
  • OPTION_TEXTMODEMOUSE / --enable-textmodemouse - whether you want to get support for some "text-mode mouse" like gpm on text consoles or the mouse cursor in terminal emulators like xterm (default: 1 - enabled); this allows you to activate links (and HTML form elements) by clicking them with the mouse, which is easier and faster than pressing the Cursor-down/up keys several times. It depends on your curses library whether you can actually get this support - it's currently only available if the library provides ncurses-like mouse support (detected by the presence of the C pre-processor symbol NCURSES_MOUSE_VERSION).
  • OPTION_I18N / --enable-i18n - retawq supports several natural languages (currently English, French, German, Spanish and Brazilian Portuguese). By default, it uses the English language. If you prefer another supported language, set this option to "1" / use --enable-i18n, set the option PATH_INSTALL_LOCALE / --path-locale=... to whatever is appropriate for your computer, and say "make install" after "make". (See the file INSTALL for details.)
  • OPTION_CED / --set-ced=... - quality of character entity display; retawq normally tries to print nice characters on the screen for special HTML character entities like "à". If your terminal can only handle seven-bit ASCII characters and shows garbage otherwise, set this to 0.
  • OPTION_COOKIES / --enable-cookies - whether cookies should be supported ("HTTP state management"; default: 1 / enabled). Cookies will only be stored and sent for servers for which the run-time configuration option "http-cookies" explicitly allows it.
  • OPTION_LOCAL_CGI / --enable-local-cgi - whether the protocol scheme "local-cgi" should be supported (default: 0 / disabled). Local CGI scripts will only be executed if explicitly allowed in the run-time configuration option "local-cgi".
    Security Note: If you enable this feature, retawq will be able to execute external scripts; such "scripts" can be any kind of executable programs, so it could also be "viruses" or other malicious software. To avoid unwanted effects, please observe at least the following hints: 1. You should make sure that nobody but you can change your config file; otherwise someone might be able to allow the execution of malicious CGI scripts with the local-cgi feature! So you should use a command like "chmod go-rwx config" or "chmod go-rwx /home/your_home/.retawq/"... 2. You should also make sure that nobody can put malicious scripts into allowed paths or manipulate existing allowed scripts!
  • OPTION_IPV6 / --enable-ipv6 - whether the "next generation" Internet Protocol version IPv6 should be supported (default: 0 / disabled); IPv6 will only work if the libraries and operating system on your computer support it
  • CC - the name of the C compiler which is installed on your system; the default is "gcc", the GNU compiler collection.
  • CFLAGS - special flags (command-line arguments) for your C compiler; it should not be necessary to change anything here, but anyway... For information about possible flags, please read the documentation of your C compiler.
  • All the other configuration options in the classical Makefile should stay as they are - most of the respective features have not yet been fully implemented.

Minimizing retawq's Size

retawq is already a quite small browser. If you want to make the executable program still smaller, e.g. as a tool for a boot/rescue disk or a "whole system on one floppy disk" collection, this section shows how to shrink retawq's size by disabling "all" compile-time options, including some internal options which aren't documented elsewhere. If you actually need a feature, you should leave the respective option enabled, of course. The minimization is shown with the configure script here; you can get the same result by editing the "classical" Makefile manually.

As a starting point, disable all officially documented options which are enabled by default: "./configure --disable-ncurses --disable-textmodemouse --disable-cookies --set-ced=0".

Now for the "dirty" part: open the file ".config" (which was generated by the configure script) in a text editor, and do the following (in parentheses: effect of the change):

  • set CONFIG_LOCALDIR to 0 (local directory listings will contain less information, sorting can't be customized)
  • set CONFIG_NETDIR to 0 (network directory listings (FTP) will contain less information)
  • set CONFIG_RTCONFIG to 0 (retawq won't read run-time configuration files)
  • add the line "#define DO_NOT_INLINE" (retawq will become slightly slower)

Finally, say "make" to build the program. Let's have a look at the result, for example when building version 0.1.4 on the x86 platform, Linux kernel 2.2.x, compiler GNU gcc 2.7.2.3 (leaving ncurses enabled because it's needed): minimal - 83 KB; default - 103 KB; everything enabled - 115 KB. Support for i18n costs about 7 KB, support for cookies about 9 KB here.


This documentation file is part of version 0.1.4 of retawq, a network client created by Arne Thomaßen. retawq is basically released under certain versions of the GNU General Public License and WITHOUT ANY WARRANTY. Copyright (C) 2001-2002 Arne Thomaßen.