Copyright (C) 2000-2012 |
Manpages GNOMESection: User Commands (1)Updated: GNOME 1.0 Index Return to Main Contents NAMEgnome-config - GNOME libraries and component information retrieval.SYNOPSISgnome-config [--version] [--help] [--cflags] [--libs] [--libs-only-L] [--libs-only-l] [--prefix] [--exec-prefix] [--bindir] [--sbindir] [--libexecdir] [--datadir] [--sysconfdir] [--sharedstatedir] [--localstatedir] [--libdir] [--infodir] [--mandir] [--includedir] [--modversion] [LIBRARIES...] DESCRIPTIONThe gnome-config program is used to retrieve information from installed libraries in the system. It is typically used to compile and link against one or more GNOME libraries. Here is a typical usage scenario in a Makefile:
program: program.c cc program.c `gnome-config --cflags --libs gnomeui` Usually, a combination of flags is used like --cflags and --libs in conjunction with the list of libraries that your program uses. These libraries are specified as part of the command line. gnome-config includes hard-coded information for a number of libraries: the ones used to build gnome-libs, and the ones provided by gnome-libs (which gnome-config is part of). Other libraries are integrated by providing gnome-config modules. OPTIONSThe following Generic options are supported:
The following options are used to compile and link programs with GNOME libraries and components:
The following options are used to find out the directories that were used to install the various files that are part of the GNOME distribution, they correspond to the variable names used by the Makefiles (Makefiles in GNOME are compliant with the GNU standard for makefiles, and they typically use GNU autoconf and GNU automake to get these right and uniform):
The basic set of libraries you can link with are: glib (calls glib-config) idl (to be used with orbit-idl) gnome gnomeui gnorba gtk (calls gtk-config) gtkxmhtml (only --libs) zvt (only --libs) MODULE INTEGRATIONgnome-config can incorporate more GNOME libraries, to do so the library author needs to install an xxxxConf.sh file in the directory returned by "gnome-config --libdir" or in any directory listed in the GNOME_LIBCONFIG_PATH environment variable or in the directory pointed by GNOME_PATH/libThe prefix "xxxx" should be substituted with the module name, for example, the applets library installs the appletConf.sh file. The configuration file is a shell script evaluated by gnome-config and it should define four shell variable settings:
This is an example file for an imaginary library called "foo":
# # Configuration file for using library foo. # FOO_LIBDIR="-L/opt/foo/lib" FOO_LIBS="-lfoo" FOO_INCLUDEDIR="-I/opt/foo/include" MODULE_VERSION=foo-2.3 Typically these files are generated at configuration or compilation time, authors usually use a template file, this is an example template file for fooConf.sh, it is called fooConf.sh.in:
# # Configuration file for using library foo. # FOO_LIBDIR="@FOO_LIBDIR@" FOO_LIBS="@FOO_LIBS@" FOO_INCLUDEDIR="@FOO_INCLUDEDIR@" MODULE_VERSION=foo-@VERSION@ The above template file is typically processed by the Makefile to produce the actual configuration file. This is a sample piece of code that shows how to get this right:
## We create fooConf.sh here and not from configure because we want ## to get the paths expanded correctly. Macros like srcdir are given ## the value NONE in configure if the user doesn't specify them (this ## is an autoconf feature, not a bug). fooConf.sh: fooConf.sh.in Makefile ## Use sed and then mv to avoid problems if the user interrupts. sed -e 's?@FOO_LIBDIR@?$(FOO_LIBDIR)?g' \ -e 's?@FOO_INCLUDEDIR@?$(FOO_INCLUDEDIR)?g' \ -e 's?@FOO_LIBS@?$(FOO_LIBS)?g' \ -e 's?@VERSION@@?$(VERSION)?g' \ < $(srcdir)/fooConf.sh.in > fooConf.tmp \ && mv fooConf.tmp fooConf.sh This file is then copied into a system accessible location. ENVIRONMENTThe gnome-config program uses the directories listed in the GNOME_LIBCONFIG_PATH to locate library definition files (Conf.sh) installed on the system. The variable GNOME_PATH is used as a list of directories where GNOME applications and libraries have been installed. gnome-config looks in the lib subdirectory of each directory listed here for library definition files (Conf.sh) installed.AUTHORgnome-config was written by Miguel de Icaza, Raja Harinath and various hackers in the GNOME team. It was inspired by Owen Taylor's gtk-config program.SEE ALSOgnome(1), gtk-config(1),BUGSIf you find bugs in the gnome-config program, please report these using the gnome-bug script included with the GNOME libraries distribution.IndexThis document was created by man2html, using the manual pages. Time: 13:15:01 GMT, April 18, 2024 |