aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-05-05 13:22:32 -0400
committerGlenn Morris2014-05-05 13:22:32 -0400
commite8e2626f06f068ee523489b2c37d9fe2c65fb3c0 (patch)
tree38176ab1fdd721f6108526412a27742ef61797e3
parentd6509ba674a33136e9358902692ac3a5be1a4ef2 (diff)
downloademacs-e8e2626f06f068ee523489b2c37d9fe2c65fb3c0.tar.gz
emacs-e8e2626f06f068ee523489b2c37d9fe2c65fb3c0.zip
* autogen.sh: Check any pre-existing ACLOCAL_PATH.
-rw-r--r--ChangeLog4
-rwxr-xr-xautogen.sh57
2 files changed, 41 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index d9837bc3c12..a58fbc9ae37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12014-05-05 Glenn Morris <rgm@gnu.org>
2
3 * autogen.sh: Check any pre-existing ACLOCAL_PATH.
4
12014-05-04 Paul Eggert <eggert@cs.ucla.edu> 52014-05-04 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 Consult libpng-config more consistently (Bug#17339). 7 Consult libpng-config more consistently (Bug#17339).
diff --git a/autogen.sh b/autogen.sh
index d04893316a4..35175e70b1c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -212,27 +212,44 @@ echo "Checking for pkg.m4..."
212AUTORECONF_ENV= 212AUTORECONF_ENV=
213env_space= 213env_space=
214ac_dir=`aclocal --print-ac-dir` && test -r "$ac_dir/pkg.m4" || { 214ac_dir=`aclocal --print-ac-dir` && test -r "$ac_dir/pkg.m4" || {
215 oIFS=$IFS 215
216 IFS=: 216 # Maybe ACLOCAL_PATH is already set-up.
217 before_first_aclocal=true 217 if test -n "$ACLOCAL_PATH"; then
218 for dir in $PATH; do 218 oIFS=$IFS
219 if test -x "$dir/aclocal"; then 219 IFS=:
220 if $before_first_aclocal; then 220 for dir in $ACLOCAL_PATH; do
221 before_first_aclocal=false 221 if test -r "$dir/pkg.m4"; then
222 elif ac_dir=`"$dir/aclocal" --print-ac-dir` && test -r "$ac_dir/pkg.m4" 222 AUTORECONF_ENV="ACLOCAL_PATH='$ACLOCAL_PATH'"
223 then 223 env_space=' '
224 case $ACLOCAL_PATH in 224 break
225 '') ACLOCAL_PATH=$ac_dir;;
226 ?*) ACLOCAL_PATH=$ACLOCAL_PATH:$ac_dir;;
227 esac
228 export ACLOCAL_PATH
229 AUTORECONF_ENV="ACLOCAL_PATH='$ACLOCAL_PATH'"
230 env_space=' '
231 break
232 fi 225 fi
233 fi 226 done
234 done 227 IFS=$oIFS
235 IFS=$oIFS 228 fi
229
230 if test -z "$AUTORECONF_ENV"; then
231 oIFS=$IFS
232 IFS=:
233 before_first_aclocal=true
234 for dir in $PATH; do
235 if test -x "$dir/aclocal"; then
236 if $before_first_aclocal; then
237 before_first_aclocal=false
238 elif ac_dir=`"$dir/aclocal" --print-ac-dir` && test -r "$ac_dir/pkg.m4"
239 then
240 case $ACLOCAL_PATH in
241 '') ACLOCAL_PATH=$ac_dir;;
242 ?*) ACLOCAL_PATH=$ACLOCAL_PATH:$ac_dir;;
243 esac
244 export ACLOCAL_PATH
245 AUTORECONF_ENV="ACLOCAL_PATH='$ACLOCAL_PATH'"
246 env_space=' '
247 break
248 fi
249 fi
250 done
251 IFS=$oIFS
252 fi
236 253
237 ## OK, maybe pkg-config is in a weird place (eg on hydra). 254 ## OK, maybe pkg-config is in a weird place (eg on hydra).
238 if test -z "$AUTORECONF_ENV"; then 255 if test -z "$AUTORECONF_ENV"; then