Skip to content

Latest commit

 

History

History
191 lines (154 loc) · 5.69 KB

BUILDING.md

File metadata and controls

191 lines (154 loc) · 5.69 KB

Minimal dependencies:

  • Free Pascal [2.6 or higher]
  • Unix tools (preferably, the GNU versions):
    • Those included with Free Pascal plus:
      • cut
      • grep
      • sed
      • test
      • touch
  • (Windows only) png2ico (alternatively, if you already have ImageMagick installed, you can define the environment variable PNG2ICO=convert)

Optional dependencies (see below for how to enable/disable):

After you have the dependencies, open a shell in the root source directory and do: make [rules] [environment-variables] make install [environment-variables]

Helpful make rules: =clean= Removes all the build files generated by the compiler. =install= Install the program and other files (icons, gettext catalogs, etc.).

Helpful environment variables:

=BUILDDIR= Where the built programs should go. (See the notes below.) =CC The C compiler to use (default: gcc). =CXX The C++ compiler to use (default: g++). =DEBUG= Create a debug build (for developers and testers only). =DEFS_EXTRA= Extra defines to send to the compiler. =DEFS_REGEXP= Allow the use of regular expressions to allow more powerful text matching. Possible values:

  * REGEXP_PCRE: Use the ubiquitous PCRE library for that.
  * REGEXP_REGEXPR: Use the TRegExpr class for that.
  * Any other value: Disable regular expressions

Default: REGEXP_PCRE

=DEFS_SETTINGS= The type of settings to use:

* SETTINGS_INI: Use the Delphi/Free Pascal TIniFile class
  to read/write the settings to a .ini file.
* SETTINGS_LIBINI: Use libini
  to read/write settings to a .ini file.
* SETTINGS_REG: Use the Delphi/Free Pascal TRegistry class to
  read/write the settings to the registry (or to
  GetAppConfigDir(false)/reg.xml on non-Windows versions of
  Free Pascal).

(The default depends on the compiler and OS.)

=DEFS_SOCKETS= The sockets library to use:

* SOCKETS_LIBCURL: Use libcurl (cURL's library). (Experimental!)
* SOCKETS_NONE: Build without sockets support.
* SOCKETS_SYNAPSE: Use Ararat Synapse (Delphi and Free Pascal).

(Currently SOCKETS_SYNAPSE is the default.)

=DESTDIR= Where to install the software.

=PCFLAGS_DEBUG The compiler's debugging options.

=PCFLAGS_EXTRA= Extra options to send to the compiler.

=R3R_UI= The user interface to use. Look in the ./src/ui directory for available user interfaces.

Default: tui

The configure script: The project includes a home-grown configure script, which:

  1. Writes default macros (environment variables) to a config.make file in the current directory.
  2. Calls make _configure to insure that everything is in order. (It is not an autotools configure script. You can attempt a compile even if make check fails.)

Enabling/disabling features: You can use the configure script or set the make environment variables manually (0 to disable; 1 to enable):

=EXPAT_VERSION= The version of Expat to use (only valid with USE_EXPAT). Valid values:

* 1.0
* 1.1
* 1.2
* 2.0
* 2.0.1
* 2.1

Default: 2.0.1.

=NO_NCURSES= Disable the use of ncurses for the TUI. It only makes sense in Free Pascal on Unix platforms.

Default: 0

=NO_X= Don't use X to get and set the terminal title in the TUI.

Default: 1

=USE_EXPAT= Allow the use of Expat to parse XML files. Note: Expat is required for RSS (<= 2.0) and Atom feeds. If you're only interested in ESF and RSS 3.0 feeds, then you can disable this.

Default: 1

=USE_ICONV= Allow the use of iconv to convert between character encodings.

Default: 1

=USE_IDN= Allow the use of the libidn library to decode IDN (web addresses with non-English characters).

Default: 0

=USE_LIBEDIT= Use libedit's readline emulation (only valid when USE_READLINE is defined). Beware that libedit is very buggy, especially when a screen library is used (as is in the TUI).

Default: 0

=USE_LIBICONV= Enable the use of GNU libiconv instead of the operating system's native iconv. Only valid when USE_ICONV is also defined.

Default: 0 for Unix platforms; 1 for non-Unix platforms

=USE_LIBIDN2= Enable the use of libidn2 instead of libidn to decode IDN addresses.

Default: 1

=USE_NLS= Allow the use of gettext to enable NLS (native language support).

Default: 1

=USE_READLINE= Use GNU readline to keep a history of visited URLs. This is only valid when R3R_UI=tui.

Default: 1

=USE_SSL= Allow secure HTTP connections via SSL. Note: It only works with the Synapse and libcurl sockets backend (see the DEFS_SOCKETS variable above).

Default: 1

Out-of-source builds: The configure script will do that for you. If you're not using the configure script, use the BUILDDIR environment variable. Also use the SRCDIR environment variable if you're not building in the project root. They must be absolute directory paths (again, the configure script will convert the paths to absolute paths for you); in other words you can either of these in the source directory:

  1. make BUILDDIR=$(pwd)/BUILD.
  2. mkdir BUILD; cd BUILD; ../configure; make).