Compiling AbiWord

From AbiWiki

Revision as of 01:50, 29 June 2018 by MartinSevior (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you are building from SVN, you must first create the configure program by running ./autogen.sh in the "abiword" directory. For this to succeed, you need to have the GNU "auto-tools" toolchain installed, including as autoconf, autoheader, and automake. On Debian based Linux distributions, this is as easy as:

sudo apt-get install autoconf

For Fedora developers you need a few extra packages on top of the Workstation installation. First:

dnf update
dnf install dnf-plugins-core

Then install the build dependencies for abiword. There are a lot of these! However they're rolled up in the following dnf command:

dnf builddep abiword

You also need the following *-devel packages:

dnf install libabiword-devel

You also need the "autoconf-archive" package to build the "configure" script

dnf install autoconf-archive

Now you can build the configure script with:

NOCONFIGURE=1 ./autogen.sh

Now you can use the "configure" script to build abiword with as many plugins as you want

My favourite way to configure abiword is to do the following in a directory above the abiword source:

 mkdir build-debug
 mkdir build-nodebug
 cd build-debug
 NOCONFIGURE=1 ../abiword/autogen.sh
 ../abiword/configure --prefix="/home/msevior/abidir" --enable-debug --enable-plugins="collab abicommand presentation aiksaurus mathview gimp google latex goffice gdict"
 cd ../build-nodebug
 ../abiword/configure --prefix="/home/msevior/abidir" --enable-plugins="collab abicommand presentation aiksaurus mathview gimp google latex goffice gdict"

Now you make debug and nodebug builds from the same source directory by simply cd'ing into the appropriate build directory and doing "make -j4 install". The upshot of this example is to build my favourite set of plugins, employ's 4 CPU's in a parallel make and installs abiword into the directory "/home/msevior/abidir/bin". The executable is "/home/msevior/abidir/bin/abiword"

AbiWord has many compile options. All options given to "autogen.sh" are passed through the to the "configure" command. A list of the available commands for configure can be obtained by typing:

./configure --help

The output of that is shown below.

`configure' configures libabiword 2.7.0 to adapt to many kinds of systems.

Usage:

../abiword/configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables.

An example:

../abiword/configure --enable-debug --enable-plugins="collab mathview command loadbindings presentation aiksaurus" --prefix=/home/msevior/abidir

This builds abiword with debug information (which makes lots of output to the terminal and asserts) together with the collab, math, command-line, presentation and theasaurus plugins. The libraries and binaries are placed in a user directory prefixed by "/home/msevior/abidir"

Defaults for the options are specified in brackets.

Configuration:

 -h, --help              display this help and exit
     --help=short        display options specific to this package
     --help=recursive    display the short help of all the included packages
 -V, --version           display version information and exit
 -q, --quiet, --silent   do not print `checking...' messages
     --cache-file=FILE   cache test results in FILE [disabled]
 -C, --config-cache      alias for `--cache-file=config.cache'
 -n, --no-create         do not create output files
     --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:

 --prefix=PREFIX         install architecture-independent files in PREFIX
                         [/usr/local]
 --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                         [PREFIX]

By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:

 --bindir=DIR           user executables [EPREFIX/bin]
 --sbindir=DIR          system admin executables [EPREFIX/sbin]
 --libexecdir=DIR       program executables [EPREFIX/libexec]
 --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
 --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
 --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
 --libdir=DIR           object code libraries [EPREFIX/lib]
 --includedir=DIR       C header files [PREFIX/include]
 --oldincludedir=DIR    C header files for non-gcc [/usr/include]
 --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
 --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
 --infodir=DIR          info documentation [DATAROOTDIR/info]
 --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
 --mandir=DIR           man documentation [DATAROOTDIR/man]
 --docdir=DIR           documentation root [DATAROOTDIR/doc/libabiword]
 --htmldir=DIR          html documentation [DOCDIR]
 --dvidir=DIR           dvi documentation [DOCDIR]
 --pdfdir=DIR           pdf documentation [DOCDIR]
 --psdir=DIR            ps documentation [DOCDIR]

Program names:

 --program-prefix=PREFIX            prepend PREFIX to installed program names
 --program-suffix=SUFFIX            append SUFFIX to installed program names
 --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:

 --build=BUILD     configure for building on BUILD [guessed]
 --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 --target=TARGET   configure for building compilers for TARGET [HOST]

Optional Features:

 --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
 --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
 --disable-dependency-tracking  speeds up one-time build
 --enable-dependency-tracking   do not reject slow dependency extractors
 --enable-shared[=PKGS]  build shared libraries [default=yes]
 --enable-static[=PKGS]  build static libraries [default=yes]
 --enable-fast-install[=PKGS]
                         optimize for fast installation [default=yes]
 --disable-libtool-lock  avoid locking (might break parallel builds)
 --disable-default-plugins
                         do not build any plugins by default
 --enable-plugins        ="foo bar baz", list of plugins to build
 --enable-menubutton     (gtk only) menu-button instead of menu-bar
 --disable-print         (gtk only) do not include printing support
 --disable-spell         (gtk only) do not include spell checking support
 --disable-statusbar     (gtk only) do not include status bar
 --enable-embedded       =generic|hildon|poky, (gtk only), build for embedded
                         platform
 --enable-debug          Enable debugging functionality, verbose terminal
                         output
 --enable-collab-backend-fake
                         Fake backend for debugging purposes only (default:
                         off)
 --enable-collab-backend-xmpp
                         Jabber backend (default: auto)
 --enable-collab-backend-tcp
                         TCP backend (default: auto)
 --enable-collab-backend-sugar
                         Sugar/OLPC backend (default: auto)
 --enable-collab-backend-service
                         collaborate.abisource.com backend (default: off)
 --enable-collab-record-always
                         Always record AbiCollab sessions (default: off)

Optional Packages:

 --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
 --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
 --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
 --with-pic              try to use only PIC/non-PIC objects [default=use
                         both]
 --with-tags[=TAGS]      include additional configurations [automatic]
 --with-gnomeui          (gtk only) use libgnomeui library
 --with-gnomevfs         (gtk only) use gnome-vfs library
 --with-goffice          (gtk only) use goffice library
 --with-gucharmap        (gtk only) use gucharmap library
 --with-inter7eps        MHT plugin: support multipart html using the inter7
                         EPS library
 --with-libtidy          MHT plugin: clean up HTML before importing using
                         libtidy
 --with-boost[=DIR]      use boost (default is yes) - it is possible to
                         specify the root directory for boost (optional)
 --with-boost-thread[=special-lib]
                         use the Thread library from boost - it is possible
                         to specify a certain library for the linker e.g.
                         --with-boost-thread=boost_thread-gcc-mt
 --with-psiconv-config=DIR
                         use psiconv-config in DIR
 --with-libwmf-config=DIR
                         use libwmf-config in DIR

Some influential environment variables:

 CC          C compiler command
 CFLAGS      C compiler flags
 LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
             nonstandard directory <lib dir>
 LIBS        libraries to pass to the linker, e.g. -l<library>
 CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
             you have headers in a nonstandard directory <include dir>
 CXX         C++ compiler command
 CXXFLAGS    C++ compiler flags
 OBJC        Objective C compiler command
 OBJCFLAGS   Objective C compiler flags
 CPP         C preprocessor
 CXXCPP      C++ preprocessor
 F77         Fortran 77 compiler command
 FFLAGS      Fortran 77 compiler flags
 PKG_CONFIG  path to pkg-config utility
 DEPS_CFLAGS C compiler flags for DEPS, overriding pkg-config
 DEPS_LIBS   linker flags for DEPS, overriding pkg-config
 PLUGIN_CFLAGS
             C compiler flags for PLUGIN, overriding pkg-config
 PLUGIN_LIBS linker flags for PLUGIN, overriding pkg-config
 MHT_CFLAGS  C compiler flags for MHT, overriding pkg-config
 MHT_LIBS    linker flags for MHT, overriding pkg-config
 T602_CFLAGS C compiler flags for T602, overriding pkg-config
 T602_LIBS   linker flags for T602, overriding pkg-config
 XSLFO_CFLAGS
             C compiler flags for XSLFO, overriding pkg-config
 XSLFO_LIBS  linker flags for XSLFO, overriding pkg-config
 HANCOM_CFLAGS
             C compiler flags for HANCOM, overriding pkg-config
 HANCOM_LIBS linker flags for HANCOM, overriding pkg-config
 OPENWRITER_CFLAGS
             C compiler flags for OPENWRITER, overriding pkg-config
 OPENWRITER_LIBS
             linker flags for OPENWRITER, overriding pkg-config
 OPENXML_CFLAGS
             C compiler flags for OPENXML, overriding pkg-config
 OPENXML_LIBS
             linker flags for OPENXML, overriding pkg-config
 DOCBOOK_CFLAGS
             C compiler flags for DOCBOOK, overriding pkg-config
 DOCBOOK_LIBS
             linker flags for DOCBOOK, overriding pkg-config
 RSVG_CFLAGS C compiler flags for RSVG, overriding pkg-config
 RSVG_LIBS   linker flags for RSVG, overriding pkg-config
 PDB_CFLAGS  C compiler flags for PDB, overriding pkg-config
 PDB_LIBS    linker flags for PDB, overriding pkg-config
 KWORD_CFLAGS
             C compiler flags for KWORD, overriding pkg-config
 KWORD_LIBS  linker flags for KWORD, overriding pkg-config
 WORDPERFECT_CFLAGS
             C compiler flags for WORDPERFECT, overriding pkg-config
 WORDPERFECT_LIBS
             linker flags for WORDPERFECT, overriding pkg-config
 COLLAB_CFLAGS
             C compiler flags for COLLAB, overriding pkg-config
 COLLAB_LIBS linker flags for COLLAB, overriding pkg-config
 COMMAND_CFLAGS
             C compiler flags for COMMAND, overriding pkg-config
 COMMAND_LIBS
             linker flags for COMMAND, overriding pkg-config
 AIKSAURUS_CFLAGS
             C compiler flags for AIKSAURUS, overriding pkg-config
 AIKSAURUS_LIBS
             linker flags for AIKSAURUS, overriding pkg-config
 AIKSAURUS_GTK_CFLAGS
             C compiler flags for AIKSAURUS_GTK, overriding pkg-config
 AIKSAURUS_GTK_LIBS
             linker flags for AIKSAURUS_GTK, overriding pkg-config
 OTS_CFLAGS  C compiler flags for OTS, overriding pkg-config
 OTS_LIBS    linker flags for OTS, overriding pkg-config
 WML_CFLAGS  C compiler flags for WML, overriding pkg-config
 WML_LIBS    linker flags for WML, overriding pkg-config
 OPENDOCUMENT_CFLAGS
             C compiler flags for OPENDOCUMENT, overriding pkg-config
 OPENDOCUMENT_LIBS
             linker flags for OPENDOCUMENT, overriding pkg-config
 CLARISWORKS_CFLAGS
             C compiler flags for CLARISWORKS, overriding pkg-config
 CLARISWORKS_LIBS
             linker flags for CLARISWORKS, overriding pkg-config
 SDW_CFLAGS  C compiler flags for SDW, overriding pkg-config
 SDW_LIBS    linker flags for SDW, overriding pkg-config
 LOADBINDINGS_CFLAGS
             C compiler flags for LOADBINDINGS, overriding pkg-config
 LOADBINDINGS_LIBS
             linker flags for LOADBINDINGS, overriding pkg-config
 APPLIX_CFLAGS
             C compiler flags for APPLIX, overriding pkg-config
 APPLIX_LIBS linker flags for APPLIX, overriding pkg-config
 GOFFICE_CFLAGS
             C compiler flags for GOFFICE, overriding pkg-config
 GOFFICE_LIBS
             linker flags for GOFFICE, overriding pkg-config
 GDA_CFLAGS  C compiler flags for GDA, overriding pkg-config
 GDA_LIBS    linker flags for GDA, overriding pkg-config
 MSWRITE_CFLAGS
             C compiler flags for MSWRITE, overriding pkg-config
 MSWRITE_LIBS
             linker flags for MSWRITE, overriding pkg-config
 WPGGFX_CFLAGS
             C compiler flags for WPGGFX, overriding pkg-config
 WPGGFX_LIBS linker flags for WPGGFX, overriding pkg-config
 YACC        The `Yet Another C Compiler' implementation to use. Defaults to
             the first program found out of: `bison -y', `byacc', `yacc'.
 YFLAGS      The list of arguments that will be passed by default to $YACC.
             This script will default YFLAGS to the empty string to avoid a
             default value of `-d' given by some make applications.
 MATHVIEW_CFLAGS
             C compiler flags for MATHVIEW, overriding pkg-config
 MATHVIEW_LIBS
             linker flags for MATHVIEW, overriding pkg-config
 PRESENTATION_CFLAGS
             C compiler flags for PRESENTATION, overriding pkg-config
 PRESENTATION_LIBS
             linker flags for PRESENTATION, overriding pkg-config
 PDF_CFLAGS  C compiler flags for PDF, overriding pkg-config
 PDF_LIBS    linker flags for PDF, overriding pkg-config
 GRAMMAR_CFLAGS
             C compiler flags for GRAMMAR, overriding pkg-config
 GRAMMAR_LIBS
             linker flags for GRAMMAR, overriding pkg-config

Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations.

Report bugs to <http://bugzilla.abisource.com/>

Personal tools