[Rt-commit] rt branch, 4.2/detect-find-version, created. rt-4.2.12-109-g956fa9c

Jim Brandt jbrandt at bestpractical.com
Wed Feb 17 18:24:43 EST 2016


The branch, 4.2/detect-find-version has been created
        at  956fa9cf097579575fbefb3f25a3c8f7e9e62144 (commit)

- Log -----------------------------------------------------------------
commit 956fa9cf097579575fbefb3f25a3c8f7e9e62144
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Feb 17 23:19:49 2016 +0000

    Update detection of find version in configure
    
    Commit 4028723 added code to detect the version of find
    because Debian is changing to a newer version of GNU
    find with different syntax than the traditional find.
    However, the change in that commit no longer worked on
    Mac OS X, a BSD-type system.
    
    Modify the find check to use the --version option supported
    on GNU and use GNU syntax if found. Otherwise default to the
    previous BSD syntax which was the previous setting for all
    systems.

diff --git a/configure.ac b/configure.ac
index 44f5384..c671138 100755
--- a/configure.ac
+++ b/configure.ac
@@ -36,21 +36,13 @@ fi
 
 dnl BSD find uses -perm +xxxx, GNU find has deprecated this syntax in favour of
 dnl -perm /xxx.
-AC_MSG_CHECKING([whether find supports -perm /x or find -perm +x])
-if find -perm /0100 -not -perm /0100
-then
-	FINDPERM="/"
-elif
-	find -perm +0100 -not -perm +0100
-then
-	FINDPERM="+"
-else
-	FINDPERM="na"
-fi
-AC_MSG_RESULT([${FINDPERM}])
-if test "x$FINDPERM" = "xna" ; then
-	AC_MSG_WARN([local find program supports neither -perm /0111 nor -perm +0111, make fixperms will not work])
-fi
+AC_MSG_CHECKING([checking version of find])
+AS_IF([find --version 2>&1 | grep 'GNU'],
+      [   FINDPERM="/"
+          AC_MSG_RESULT([configuring for GNU find]) ],
+      [   FINDPERM="+"
+          AC_MSG_RESULT([configuring for BSD find]) ])
+
 AC_SUBST([FINDPERM])
 
 dnl WEB_HANDLER

-----------------------------------------------------------------------


More information about the rt-commit mailing list