@@ -24821,6 +24821,98 @@ esac
2482124821
2482224822
2482324823
24824+ # Check for fnmatch()
24825+ { echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5
24826+ echo $ECHO_N "checking for working POSIX fnmatch... $ECHO_C" >&6; }
24827+ if test "${ac_cv_func_fnmatch_works+set}" = set; then
24828+ echo $ECHO_N "(cached) $ECHO_C" >&6
24829+ else
24830+ # Some versions of Solaris, SCO, and the GNU C Library
24831+ # have a broken or incompatible fnmatch.
24832+ # So we run a test program. If we are cross-compiling, take no chance.
24833+ # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
24834+ if test "$cross_compiling" = yes; then
24835+ ac_cv_func_fnmatch_works=cross
24836+ else
24837+ cat >conftest.$ac_ext <<_ACEOF
24838+ /* confdefs.h. */
24839+ _ACEOF
24840+ cat confdefs.h >>conftest.$ac_ext
24841+ cat >>conftest.$ac_ext <<_ACEOF
24842+ /* end confdefs.h. */
24843+ #include <fnmatch.h>
24844+ # define y(a, b, c) (fnmatch (a, b, c) == 0)
24845+ # define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
24846+
24847+ int
24848+ main ()
24849+ {
24850+ return
24851+ (!(y ("a*", "abc", 0)
24852+ && n ("d*/*1", "d/s/1", FNM_PATHNAME)
24853+ && y ("a\\\\bc", "abc", 0)
24854+ && n ("a\\\\bc", "abc", FNM_NOESCAPE)
24855+ && y ("*x", ".x", 0)
24856+ && n ("*x", ".x", FNM_PERIOD)
24857+ && 1));
24858+ ;
24859+ return 0;
24860+ }
24861+ _ACEOF
24862+ rm -f conftest$ac_exeext
24863+ if { (ac_try="$ac_link"
24864+ case "(($ac_try" in
24865+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24866+ *) ac_try_echo=$ac_try;;
24867+ esac
24868+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24869+ (eval "$ac_link") 2>&5
24870+ ac_status=$?
24871+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
24872+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24873+ { (case "(($ac_try" in
24874+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24875+ *) ac_try_echo=$ac_try;;
24876+ esac
24877+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24878+ (eval "$ac_try") 2>&5
24879+ ac_status=$?
24880+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
24881+ (exit $ac_status); }; }; then
24882+ ac_cv_func_fnmatch_works=yes
24883+ else
24884+ echo "$as_me: program exited with status $ac_status" >&5
24885+ echo "$as_me: failed program was:" >&5
24886+ sed 's/^/| /' conftest.$ac_ext >&5
24887+
24888+ ( exit $ac_status )
24889+ ac_cv_func_fnmatch_works=no
24890+ fi
24891+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24892+ fi
24893+
24894+
24895+ fi
24896+ { echo "$as_me:$LINENO: result: $ac_cv_func_fnmatch_works" >&5
24897+ echo "${ECHO_T}$ac_cv_func_fnmatch_works" >&6; }
24898+ if test $ac_cv_func_fnmatch_works = yes; then
24899+
24900+ cat >>confdefs.h <<\_ACEOF
24901+ #define HAVE_FNMATCH 1
24902+ _ACEOF
24903+
24904+ fi
24905+
24906+
24907+
24908+ if test x"$ac_cv_func_fnmatch_works" != x"yes"; then
24909+ case " $LIBOBJS " in
24910+ *" fnmatch.$ac_objext "* ) ;;
24911+ *) LIBOBJS="$LIBOBJS fnmatch.$ac_objext"
24912+ ;;
24913+ esac
24914+
24915+ fi
2482424916
2482524917# Select semaphore implementation type.
2482624918if test "$PORTNAME" != "win32"; then