fi
done
-echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5
-echo $ECHO_N "checking for working POSIX fnmatch... $ECHO_C" >&6
-if test "${ac_cv_func_fnmatch_works+set}" = set; then
+echo "$as_me:$LINENO: checking for working fnmatch with FNM_CASEFOLD" >&5
+echo $ECHO_N "checking for working fnmatch with FNM_CASEFOLD... $ECHO_C" >&6
+if test "${sudo_cv_func_fnmatch+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # Some versions of Solaris, SCO, and the GNU C Library
- # have a broken or incompatible fnmatch.
- # So we run a test program. If we are cross-compiling, take no chance.
- # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
- if test "$cross_compiling" = yes; then
- ac_cv_func_fnmatch_works=cross
+ rm -f conftestdata; > conftestdata
+if test "$cross_compiling" = yes; then
+ sudo_cv_func_fnmatch=no
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <fnmatch.h>
-# define y(a, b, c) (fnmatch (a, b, c) == 0)
-# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
-
-int
-main ()
-{
-exit
- (!(y ("a*", "abc", 0)
- && n ("d*/*1", "d/s/1", FNM_PATHNAME)
- && y ("a\\\\bc", "abc", 0)
- && n ("a\\\\bc", "abc", FNM_NOESCAPE)
- && y ("*x", ".x", 0)
- && n ("*x", ".x", FNM_PERIOD)
- && 1));
- ;
- return 0;
-}
+main() { exit(fnmatch("/*/bin/echo *", "/usr/bin/echo just a test", FNM_CASEFOLD)); }
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_fnmatch_works=yes
+ sudo_cv_func_fnmatch=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-ac_cv_func_fnmatch_works=no
+sudo_cv_func_fnmatch=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+rm -f core core.* *.core
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_works" >&5
-echo "${ECHO_T}$ac_cv_func_fnmatch_works" >&6
-if test $ac_cv_func_fnmatch_works = yes; then
-cat >>confdefs.h <<\_ACEOF
+echo "$as_me:$LINENO: result: $sudo_cv_func_fnmatch" >&5
+echo "${ECHO_T}$sudo_cv_func_fnmatch" >&6
+if test $sudo_cv_func_fnmatch = yes; then
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_FNMATCH 1
_ACEOF
-fi
-
-
-
-if test "$ac_cv_func_fnmatch_works" = no; then
- case $LIBOBJS in
+else
+ case $LIBOBJS in
"fnmatch.$ac_objext" | \
*" fnmatch.$ac_objext" | \
"fnmatch.$ac_objext "* | \
esac
fi
+
echo "$as_me:$LINENO: checking for isblank" >&5
echo $ECHO_N "checking for isblank... $ECHO_C" >&6
if test "${sudo_cv_func_isblank+set}" = set; then