From: Glenn Morris Date: Sat, 3 May 2014 18:24:10 +0000 (-0700) Subject: * autogen.sh: If all else fails, try using pkg-config to find pkg.m4. X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/c3a435feddf2e1c1e74e41a05d4dd8a59bc766b0?ds=sidebyside * autogen.sh: If all else fails, try using pkg-config to find pkg.m4. This is an attempt to get hydra builds working again. --- diff --git a/ChangeLog b/ChangeLog index a93a93c8f2..35b690d75e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-05-03 Glenn Morris + + * autogen.sh: If all else fails, try using pkg-config to find pkg.m4. + 2014-05-03 Paul Eggert Get --enable-gcc-warnings to work after touching configure.ac. 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 <