aboutsummaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2014-05-03 11:24:10 -0700
committerGlenn Morris <[email protected]>2014-05-03 11:24:10 -0700
commitc3a435feddf2e1c1e74e41a05d4dd8a59bc766b0 (patch)
tree001b7337b806dd4bb67837ad9ea4ea549d505d4b /autogen.sh
parent541df9f424b82b90ec4bd798ab6b8f1c655e3acd (diff)
* autogen.sh: If all else fails, try using pkg-config to find pkg.m4.
This is an attempt to get hydra builds working again.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index b7804548ce..cc68f13a13 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -234,6 +234,28 @@ ac_dir=`aclocal --print-ac-dir` && test -r "$ac_dir/pkg.m4" || {
done
IFS=$oIFS
+ ## OK, maybe pkg-config is in a weird place (eg on hydra).
+ if test -z "$AUTORECONF_ENV"; then
+ oIFS=$IFS
+ IFS=:
+ for dir in $PATH; do
+ if test -x "$dir/pkg-config"; then
+ ac_dir=`echo "$dir" | sed 's|bin$|share/aclocal|'`
+ if test -r "$ac_dir/pkg.m4"; then
+ case $ACLOCAL_PATH in
+ '') ACLOCAL_PATH=$ac_dir;;
+ ?*) ACLOCAL_PATH=$ACLOCAL_PATH:$ac_dir;;
+ esac
+ export ACLOCAL_PATH
+ AUTORECONF_ENV="ACLOCAL_PATH='$ACLOCAL_PATH'"
+ env_space=' '
+ break
+ fi
+ fi
+ done
+ IFS=$oIFS
+ fi
+
if test -z "$AUTORECONF_ENV"; then
cat <<EOF
The version of aclocal that you are using cannot find the pkg.m4 file that