summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-08-22 17:10:24 -0700
committerDan Nicholson <dbn.lists@gmail.com>2012-10-13 08:08:42 -0700
commit6b0729690287d6223269fc4cd8fa084c36ca1f01 (patch)
tree1e8d65785c64efa8abf75a01bbd9e3f6863882fa /configure.ac
parent65e37fe3038e894d0204aec03ca16f289d0197ce (diff)
downloadpkg-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 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3909055..bfb802c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Check for programs
AC_PROG_CC
+AC_CHECK_PROG([LN], [ln], [ln], [cp -Rp])
dnl Check for headers
AC_CHECK_HEADERS([dirent.h unistd.h sys/wait.h malloc.h])
@@ -203,6 +204,18 @@ if test "x$with_gcov" = xyes; then
fi
AC_SUBST([GCOV_CFLAGS])
+dnl See if the user wants a host- prefixed tool
+dnl (e.g. i686-pc-linux-gnu-pkg-config) to be installed.
+dnl
+AC_MSG_CHECKING([if host- prefixed tool should be installed])
+AC_ARG_ENABLE([host-tool],
+ [AS_HELP_STRING([--disable-host-tool],
+ [install link to pkg-config with $host- prefix @<:@default=yes@:>@])],
+ [],
+ [enable_host_tool=yes])
+AC_MSG_RESULT([$enable_host_tool])
+AM_CONDITIONAL([HOST_TOOL], [test "x$enable_host_tool" = xyes])
+
AC_CONFIG_FILES([
Makefile
check/Makefile