]> err.no Git - pkg-config/blob - README
Print out \r\n on windows, not just \n
[pkg-config] / README
1 pkg-config is a script to make putting together all the build
2 flags when compiling/linking a lot easier.
3
4 Report bugs at http://bugzilla.freedesktop.org/
5
6
7 To use pkg-config, do something like the following in your configure.ac
8
9     PKG_CHECK_MODULES([GNOME], [gtk > 1.2.8 gnomeui >= 1.2.0])
10
11 This puts the neccesary include flags to compile/link something against
12 libgnomeui and all its dependencies in $(GNOME_CFLAGS), and the -L/-l flags
13 for linking in $(GNOME_LIBS).
14
15 Users can define the PKG_CONFIG environment variable to point at the
16 right one, or if they cross-compile and have a correctly named pkg-config
17 (eg. arm-linux-pkg-config) in their PATH that will be used in preference.
18
19 Users can also define the GNOME_CFLAGS and GNOME_LIBS environment variables
20 if they think they know better, pkg-config will not be called if they do
21 that.
22
23 The "gtk > 1.2.8" part is only neccesary if you want to specifically check
24 if libgtk is version 1.2.8 or higher. Otherwise, the flags for gtk
25 will be included automatically, since libgnomeui depends on gtk.
26 So you could just say:
27
28      PKG_CHECK_MODULES([GNOME], [gnomeui])
29
30 for any version of gnomeui.
31
32 For more info, there's even a man page, try 'man pkg-config'
33
34