diff --git a/docs/reference/gtk/building.sgml b/docs/reference/gtk/building.sgml index 02e3347c1d..a7ca6c4832 100644 --- a/docs/reference/gtk/building.sgml +++ b/docs/reference/gtk/building.sgml @@ -35,64 +35,37 @@ How to compile GTK+ itself already. - On UNIX-like systems GTK+ uses the standard GNU build system, - using autoconf for package - configuration and resolving portability issues, - automake for building makefiles that - comply with the GNU Coding Standards, and - libtool for building shared libraries - on multiple platforms. - - - If you are building GTK+ from the distributed source packages, - then you won't need these tools installed; the necessary pieces - of the tools are already included in the source packages. But - it's useful to know a bit about how packages that use these - tools work. A source package is distributed as a - tar.bz2 or tar.xz file - which you unpack into a directory full of the source files as follows: + On all supported platforms, GTK+ uses the Meson build system. - tar xvfj gtk+-3.2.0.tar.bz2 - tar xvfJ gtk+-3.2.0.tar.xz + tar xvfJ gtk+-3.24.0.tar.xz - In the toplevel directory that is created, there will be - a shell script called configure which - you then run to take the template makefiles called - Makefile.in in the package and create - makefiles customized for your operating system. - The configure script can be passed - various command line arguments to determine how the package - is built and installed. The most commonly useful argument is - the --prefix argument which - determines where the package is installed. To install a package - in /opt/gtk you would run configure as: + Once you have extracted the files from the release archive, and + you entered the source directory, you can use the meson + command to configure the project. - ./configure --prefix=/opt/gtk + meson setup --prefix=/opt/gtk _builddir . A full list of options can be found by running - configure with the - --help argument. In general, the defaults are - right and should be trusted. After you've run - configure, you then run the - make command to build the package and install - it. + meson configure from within the build directory. + In general, the defaults are right and should be trusted. + + + After you've run meson setup, you then run the + meson compile command to build the project and + install it. - make - make install + meson compile -C _builddir + meson install -C _builddir If you don't have permission to write to the directory you are installing in, you may have to change to root temporarily before - running make install. Also, if you are - installing in a system directory, on some systems (such as - Linux), you will need to run ldconfig after - make install so that the newly installed - libraries will be found. + running meson install. Several environment variables are useful to pass to set before @@ -131,10 +104,10 @@ How to compile GTK+ itself Before you can compile the GTK+ widget toolkit, you need to have various other tools and libraries installed on your - system. The two tools needed during the build process (as + system. The main tool needed during the build process (as differentiated from the tools used in when creating GTK+ - mentioned above such as autoconf) - are pkg-config and GNU make. + mentioned above such as meson) + is pkg-config. @@ -148,17 +121,6 @@ How to compile GTK+ itself needed for that library along with version number information.) - - - The GTK+ makefiles will mostly work with different versions - of make, however, there tends to be - a few incompatibilities, so the GTK+ team recommends - installing GNU - make if you don't already have it on your system - and using it. (It may be called gmake - rather than make.) - - Some of the libraries that GTK+ depends on are maintained by @@ -168,17 +130,15 @@ How to compile GTK+ itself - The GLib library provides core non-graphical functionality - such as high level data types, Unicode manipulation, and - an object and type system to C programs. It is available - from the GTK+ - FTP site or - here. + The GLib library + provides core non-graphical functionality such as high level data types, + Unicode manipulation, and an object and type system to C programs. It is + available here. - The GdkPixbuf library + The GdkPixbuf library provides facilities for loading images in a variety of file formats. It is available here. @@ -186,14 +146,15 @@ How to compile GTK+ itself - Pango is a library + Pango is a library for internationalized text handling. It is available here. - ATK is the Accessibility Toolkit. It provides a set of generic + ATK is the + Accessibility Toolkit. It provides a set of generic interfaces allowing accessibility technologies such as screen readers to interact with a graphical user interface. It is available @@ -202,7 +163,7 @@ How to compile GTK+ itself - Gobject Introspection + Gobject Introspection is a framework for making introspection data available to language bindings. It is available here. @@ -304,244 +265,80 @@ How to compile GTK+ itself GTK+ installs. - If one of the configure scripts fails or running - make fails, look closely at the error - messages printed; these will often provide useful information - as to what went wrong. When configure - fails, extra information, such as errors that a test compilation - ran into, is found in the file config.log. - Looking at the last couple of hundred lines in this file will - frequently make clear what went wrong. If all else fails, you - can ask for help on the gtk-list mailing list. - See for more information. + If either the meson setup or the + meson compile commands fail, look closely + at the error messages printed; these will often provide useful + information as to what went wrong. - + + Extra Configuration Options - In addition to the normal options, the - configure script for the GTK+ library - supports a number of additional arguments. (Command line - arguments for the other GTK+ libraries are described in - the documentation distributed with the those libraries.) + In addition to the standard meson options + when configuring the GTK+ project, you have a number of + additional arguments. (Command line arguments for the other + libraries are described in the documentation distributed with + the those libraries.) - configure + meson setup - --disable-modules - --enable-modules + -Dxinerama=[yes/no/auto] - --with-included-immodules=MODULE1,MODULE2,... + -Dgtk_doc=[false/true] - --enable-debug=[no/minimum/yes] + -Dprint_backends=["cups,file,lpr,papi,test,auto"] - --disable-Bsymbolic - --enable-Bsymbolic + -Dx11_backend=[false/true] - --disable-xkb - --enable-xkb + -Dwin32_backend=[false/true] - --disable-xinerama - --enable-xinerama + -Dquartz_backend=[false/true] - --disable-gtk-doc - --enable-gtk-doc + -Dbroadway_backend=[false/true] - --disable-cups - --enable-cups + -Dwayland_backend=[false/true] - --disable-papi - --enable-papi + -Dintrospection=[false/true] - --enable-xinput - --disable-xinput - - - - --enable-packagekit - --disable-packagekit - - - - --enable-x11-backend - --disable-x11-backend - - - - --enable-win32-backend - --disable-win32-backend - - - - --enable-quartz-backend - --disable-quartz-backend - - - - --enable-broadway-backend - --disable-broadway-backend - - - - --enable-wayland-backend - --disable-wayland-backend - - - - --enable-introspection=[no/auto/yes] - - - - --enable-installed-tests - --disable-installed-tests + -Dinstalled_tests=[false/true] - <systemitem>--disable-modules</systemitem> and - <systemitem>--enable-modules</systemitem> + <systemitem>-Dxinerama</systemitem> - Normally GTK+ will try to build the input method modules - as little shared libraries that are loaded on demand. - The --disable-modules argument - indicates that they should all be built statically - into the GTK+ library instead. This is useful for - people who need to produce statically-linked binaries. - If neither --disable-modules nor - --enable-modules is specified, - then the configure script will try to - auto-detect whether shared modules work on your system. + By default GTK will try to link against the Xinerama libraries + if they are found. This option can be used to explicitly control + whether Xinerama should be used. - <systemitem>--with-included-immodules</systemitem> - - - This option allows you to specify which input method modules you - want to include directly into the GTK+ shared library, as opposed - to building them as loadable modules. - - - - - <systemitem>--enable-debug</systemitem> - - - Turns on various amounts of debugging support. Setting this to - 'no' disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and all cast checks between different object types. Setting it - to 'minimum' disables only cast checks. Setting it to 'yes' enables - runtime debugging. - The default is 'minimum'. - Note that 'no' is fast, but dangerous as it tends to destabilize - even mostly bug-free software by changing the effect of many bugs - from simple warnings into fatal crashes. Thus - should not - be used for stable releases of GTK+. - - - - - <systemitem>--disable-Bsymbolic</systemitem> and - <systemitem>--enable-Bsymbolic</systemitem> - - The option --disable-Bsymbolic - turns off the use of the -Bsymbolic-functions linker flag. - This is only necessary if you want to override GTK+ functions - by using LD_PRELOAD. - - - - - <systemitem>--enable-explicit-deps</systemitem> and - <systemitem>--disable-explicit-deps</systemitem> - - If --enable-explicit-deps is - specified then GTK+ will write the full set of libraries - that GTK+ depends upon into its .pc files to be used when - programs depending on GTK+ are linked. Otherwise, GTK+ - only will include the GTK+ libraries themselves, and - will depend on system library dependency facilities to - bring in the other libraries. - By default GTK+ will disable explicit dependencies unless - it detects that they are needed on the system. (If you - specify --enable-static to force - building of static libraries, then explicit dependencies - will be written since library dependencies don't work - for static libraries.) Specifying - --enable-explicit-deps or - --enable-static can cause - compatibility - problems when libraries that GTK+ depends upon change - their versions, and should be avoided if possible. - - - - - <systemitem>--disable-xkb</systemitem> and - <systemitem>--enable-xkb</systemitem> - - - By default the configure script will try - to auto-detect whether the XKB extension is supported by - the X libraries GTK+ is linked with. - These options can be used to explicitly control whether - GTK+ will support the XKB extension. - - - - - <systemitem>--disable-xinerama</systemitem> and - <systemitem>--enable-xinerama</systemitem> - - - By default the configure script will try - to link against the Xinerama libraries if they are found. - These options can be used to explicitly control whether - Xinerama should be used. - - - - - <systemitem>--disable-xinput</systemitem> and - <systemitem>--enable-xinput</systemitem> - - Controls whether GTK+ is built with support for the XInput - or XInput2 extension. These extensions provide an extended - interface to input devices such as graphics tablets. - When this support is compiled in, specially written - GTK+ programs can get access to subpixel positions, - multiple simultaneous input devices, and extra "axes" - provided by the device such as pressure and tilt - information. - - - - - <systemitem>--disable-gtk-doc</systemitem> and - <systemitem>--enable-gtk-doc</systemitem> + <systemitem>-Dgtk_doc</systemitem> The gtk-doc package is @@ -552,88 +349,57 @@ How to compile GTK+ itself gtk-doc installed and are modifying GTK+, you may want to enable gtk-doc support by passing - in --enable-gtk-doc. If not + in -Dgtk_doc=true. If not enabled, pre-generated HTML files distributed with GTK+ will be installed. - <systemitem>--disable-cups</systemitem> and - <systemitem>--enable-cups</systemitem> + <systemitem>-Dprint_backends</systemitem> - By default the configure script will try - to build the cups print backend if the cups libraries are found. - These options can be used to explicitly control whether - the cups print backend should be built. + By default GTK will try to build the appropriate print backend + for the system. You can specify the print backends manually to + explicitly control which backends should be build. - <systemitem>--disable-papi</systemitem> and - <systemitem>--enable-papi</systemitem> + <systemitem>-Dx11_backend</systemitem>, + <systemitem>-Dwin32_backend</systemitem>, + <systemitem>-Dquartz_backend</systemitem>, + <systemitem>-Dbroadway_backend</systemitem>, + <systemitem>-Dwayland_backend</systemitem> - By default the configure script will try - to build the papi print backend if the papi libraries are found. - These options can be used to explicitly control whether - the papi print backend should be built. - - - - - <systemitem>--disable-packagekit</systemitem> and - <systemitem>--enable-packagekit</systemitem> - - By default the configure script will try - to build the PackageKit support for the open-with dialog if - the PackageKit libraries are found. - These options can be used to explicitly control whether - PackageKit support should be built. - - - - - <systemitem>--enable-x11-backend</systemitem>, - <systemitem>--disable-x11-backend</systemitem>, - <systemitem>--enable-win32-backend</systemitem>, - <systemitem>--disable-win32-backend</systemitem>, - <systemitem>--enable-quartz-backend</systemitem>, - <systemitem>--disable-quartz-backend</systemitem>, - <systemitem>--enable-broadway-backend</systemitem>, - <systemitem>--disable-broadway-backend</systemitem>, - <systemitem>--enable-wayland-backend</systemitem>, - <systemitem>--disable-wayland-backend</systemitem> - - - Enables specific backends for GDK. If none of these options + Enable specific backends for GDK. If none of these options are given, the x11 backend will be enabled by default, unless the platform is Windows, in which case the default is win32. If any backend is explicitly enabled or disabled, no other platform will be enabled automatically. Other - supported backends are the quartz backend for OS X. + supported backends are the quartz backend for macOS, and the + HTML-based Broadway backend. - <systemitem>--enable-introspection</systemitem> + <systemitem>-Dintrospection</systemitem> Build with or without introspection support. - The default is 'auto'. + The default is 'true'. - <systemitem>--enable-installed-tests</systemitem> or - <systemitem>--disable-installed-tests</systemitem> + <systemitem>-Dinstalled-tests</systemitem> Whether to install tests on the system. If enabled, tests and their data are installed in ${libexecdir}/gtk+/installed-tests. Metadata for the tests is installed in ${prefix}/share/installed-tests/gtk+. - To run the installed tests, gnome-desktop-testing-runner + To run the installed tests, gnome-desktop-testing-runner can be used.