From: Todd C. Miller Date: Mon, 7 Oct 1996 04:54:00 +0000 (+0000) Subject: added SUDO_FUNC_FNMATCH X-Git-Tag: SUDO_1_5_2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95389204fca1badc2023fbdafa96c89dd4398144;p=sudo added SUDO_FUNC_FNMATCH --- diff --git a/aclocal.m4 b/aclocal.m4 index 4558215ac..6f2fb703f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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