Automatically paths in site prefix to PKG_CONFIG_PATH
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 9 Aug 2015 17:23:05 +0000 (13:23 -0400)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sun, 9 Aug 2015 17:23:05 +0000 (13:23 -0400)
* ../configure.ac: If there is pkg-config and --with-site-prefixes
was passed to configure, also add those prefixes with
lib/pkgconfig to PKG_CONFIG_PATH.

configure.ac

index 432db05..a680427 100644 (file)
@@ -3021,6 +3021,17 @@ fi
 ## Since almost any of the below tests uses pkgconfig we make a
 ## once-for-all-times check now
 SXE_SEARCH_CONFIG_PROG([pkg-config])
+if test "$have_pkg_config" = "yes" -a -n "$with_site_prefixes"; then
+       for dir in $with_site_prefixes; do
+               pkgcfg_dir="${dir}/lib/pkgconfig"
+               if test -n "$PKG_CONFIG_PATH"; then
+                  PKG_CONFIG_PATH="$PKG_CONFIG_PATH":"$pkgcfg_dir"
+               else
+                  PKG_CONFIG_PATH="$pkgcfg_dir"
+               fi
+       done
+       export PKG_CONFIG_PATH
+fi
 
 dnl libsndfile support
 if test "$with_media_sndfile" != "no"; then