]> git.eshelyaron.com Git - emacs.git/commitdiff
Port to AIX 7.3 ‘find’
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Jan 2025 04:01:16 +0000 (20:01 -0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 15:58:07 +0000 (16:58 +0100)
* configure.ac (FIND_DELETE): Port to AIX 7.3 ‘find’,
which exits with nonzero status if ‘-exec rm -f {} +’
is never invoked.

(cherry picked from commit d65f727ab401a8dfe11de7837ecee6661a113fea)

configure.ac

index 995179541cb017daa50a02f21315b26b3fb1a6e2..c0263629999c3ed6c0529cac5e04b09898a93992 100644 (file)
@@ -2078,8 +2078,10 @@ AC_CACHE_CHECK([for 'find' args to delete a file],
   [emacs_cv_find_delete],
   [if touch conftest.tmp && find conftest.tmp -delete 2>/dev/null &&
       test ! -f conftest.tmp
-   then emacs_cv_find_delete="-delete"
-   else emacs_cv_find_delete="-exec rm -f {} +"
+   then emacs_cv_find_delete="-delete" # GNU 'find'
+   elif find . -prune -name x -exec echo {} + 2>/dev/null
+   then emacs_cv_find_delete="-exec rm -f {} +" # POSIX 'find'
+   else emacs_cv_find_delete="-exec rm -f {} + -o -exec true {} +" # AIX 7.3
    fi])
 FIND_DELETE=$emacs_cv_find_delete
 AC_SUBST([FIND_DELETE])