added SUDO_FUNC_FNMATCH
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Oct 1996 04:54:00 +0000 (04:54 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Oct 1996 04:54:00 +0000 (04:54 +0000)
aclocal.m4

index 4558215acf109a35f103195262efe3a4fb106f79..6f2fb703f3784fe6f3caa3c084a4157bddc3367c 100644 (file)
@@ -310,6 +310,26 @@ if test $sudo_cv_func_utime_posix = yes; then
 fi
 ])
 
+dnl
+dnl check for working fnmatch(3)
+dnl
+AC_DEFUN(SUDO_FUNC_FNMATCH,
+[AC_MSG_CHECKING(for working fnmatch)
+AC_CACHE_VAL(sudo_cv_func_fnmatch,
+[rm -f conftestdata; > conftestdata
+AC_TRY_RUN([main() {
+exit(fnmatch("/*/bin/echo *", "/usr/bin/echo just a test", 0));
+}], sudo_cv_func_fnmatch=yes, sudo_cv_func_fnmatch=no,
+  sudo_cv_func_fnmatch=no)
+rm -f core core.* *.core])dnl
+AC_MSG_RESULT($sudo_cv_func_fnmatch)
+if test $sudo_cv_func_fnmatch = yes; then
+  [$1]
+else
+  [$2]
+fi
+])
+
 dnl
 dnl check for sa_len field in struct sockaddr
 dnl