diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2012-08-22 17:10:24 -0700 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2012-10-13 08:08:42 -0700 |
commit | 6b0729690287d6223269fc4cd8fa084c36ca1f01 (patch) | |
tree | 1e8d65785c64efa8abf75a01bbd9e3f6863882fa /Makefile.am | |
parent | 65e37fe3038e894d0204aec03ca16f289d0197ce (diff) | |
download | pkg-config-6b0729690287d6223269fc4cd8fa084c36ca1f01.tar.gz |
Install pkg-config link with $host- prefix
If pkg-config is used in a multiarch or cross-compiling scenario it's
likely pkg-config needs to behave differently for each of them. It's
possible to handle this through environment variables with one
pkg-config, but another option is to have one pkg-config per platform,
each with the host alias prefixed to the program.
PKG_PROG_PKG_CONFIG supports this type of installation, and this is also
how autoconf/libtool handle other build tools like compilers and
linkers.
The host-prefixed tool is installed as a hardlink where supported and a
copy otherwise. This is how gcc handles it's host-prefixed versions.
This feature can be turned off by passing --disable-host-tool to
configure.
Freedesktop #130
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 9c224ac..d3e3c61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,6 +36,12 @@ pkg_config_SOURCES= \ parse.c \ main.c +if HOST_TOOL +host_tool = $(host)-pkg-config$(EXEEXT) +install-exec-hook: + cd $(DESTDIR)$(bindir) && $(LN) pkg-config$(EXEEXT) $(host_tool) +endif + # Various data files m4dir = $(datadir)/aclocal dist_m4_DATA = pkg.m4 |