From 5583b657914bf86dbedd68c7218b3da602a8ae14 Mon Sep 17 00:00:00 2001 From: Per Hedbor <ph@opera.com> Date: Thu, 2 Oct 2014 16:34:48 +0200 Subject: [PATCH] Do not test each and every file in ABI dirs Once we know that the directory fulfills the search conditions, stop running file on the files. Saves about 30 seconds on a full configure run for me. --- src/aclocal.m4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 453dd01e73..def2f9af74 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -1532,7 +1532,13 @@ AC_DEFUN(PIKE_CHECK_ABI_DIR, for f in "$d"/* no; do if test -f "$f"; then empty=no - filetype=`file "$f" 2>/dev/null | sed -e 's/.*://'` + if test "$abi_dir_dynamic:$abi_64:$pike_cv_abi" = "yes:yes:64" ; then + break + elif test "$abi_dir_dynamic:$abi_32:$pike_cv_abi" = "yes:yes:32" ; then + break + fi + filetype="`file $f`" + case "$filetype" in *32-bit*) abi_32=yes -- GitLab