aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2018-10-22 01:17:48 +0000
committerNIIBE Yutaka <[email protected]>2018-10-22 01:17:48 +0000
commit91bcb2c7d824de50c7dfedd4490e515ddb5dfc5a (patch)
tree5523f70543a89b00e47ecd10553d01d51d495514 /src
parentbuild: Update config.{guess,sub} to {2018-08-29,2018-08-29}. (diff)
downloadlibgpg-error-91bcb2c7d824de50c7dfedd4490e515ddb5dfc5a.tar.gz
libgpg-error-91bcb2c7d824de50c7dfedd4490e515ddb5dfc5a.zip
gpg-error-config: Support "auto", architecture independent script.
* configure.ac (pkg_config_libdir): Set it "auto" when it looks multiarch environment. * src/gpg-error-config-new.in: Automatically detects the triplet. -- The triplet detection mechanism is not sufficient. It's up to distributions to apply more changes (in distribution specific way). Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gpg-error-config-new.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in
index 442b95a..0ccf55a 100644
--- a/src/gpg-error-config-new.in
+++ b/src/gpg-error-config-new.in
@@ -13,6 +13,19 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
pkg_config_libdir=${PKG_CONFIG_LIBDIR:-@pkg_config_libdir@}
+if [ "$pkg_config_libdir" = auto ]; then
+ # "auto" supports multiarch environment
+ triplet=""
+ case "$CC" in
+ *-*-*) triplet=${CC%-*} ;;
+ *) ;;
+ esac
+ if [ -z "$triplet" ]; then
+ triplet=$(gcc -dumpmachine)
+ fi
+ pkg_config_libdir=@exec_prefix@/lib/$triplet/pkgconfig
+ unset triplet
+fi
PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$pkg_config_libdir"
#