+2006-04-07 Stepan Kasal <kasal@ucw.cz>
+
+ Revert the patch from 2006-04-01 and only improve
+ _AS_DETECT_BETTER_SHELL:
+
+ * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Do not optimize; do not
+ skip nonexistent directories.
+ (_AS_DETECT_BETTER_SHELL): The optimization is moved here--try
+ only shell candidates which exist.
+ (AS_UNAME): No need to give three parameters to _AS_PATH_WALK.
+ * lib/autotest/general.m4 (AT_INIT): No need to give three
+ parameters to _AS_PATH_WALK.
+
2006-04-07 Stepan Kasal <kasal@ucw.cz>,
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
esac])
for as_shell in $as_candidate_shells $SHELL; do
- AS_IF([_AS_RUN([_AS_DETECT_REQUIRED_BODY],
+ # Try only shells which exist, to save several forks.
+ AS_IF([test -f $as_shell &&
+ _AS_RUN([_AS_DETECT_REQUIRED_BODY],
[($as_shell) 2> /dev/null])],
[CONFIG_SHELL=$as_shell
as_have_required=yes
])# _AS_PATH_SEPARATOR_PREPARE
-# _AS_PATH_WALK([PATH = $PATH], BODY, [NO-OPTIMIZE])
-# --------------------------------------------------
-# Walk through PATH running BODY for each `as_dir'. Skip nonexistent
-# directories unless NO-OPTIMIZE is specified.
+# _AS_PATH_WALK([PATH = $PATH], BODY)
+# -----------------------------------
+# Walk through PATH running BODY for each `as_dir'.
#
# Still very private as its interface looks quite bad.
#
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- m4_ifvaln([$3], [], [test -d "$as_dir" || continue])dnl
$2
done
IFS=$as_save_IFS
_ASUNAME
-_AS_PATH_WALK([$PATH], [echo "PATH: $as_dir"], [:])
+_AS_PATH_WALK([$PATH], [echo "PATH: $as_dir"])
}])