mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add support for matching wildcard server certificates to the new SSL code.
This uses the function fnmatch() which is not available on all platforms (notably Windows), so import the implementation from NetBSD into src/port.
This commit is contained in:
92
configure
vendored
92
configure
vendored
@ -24821,6 +24821,98 @@ esac
|
||||
|
||||
|
||||
|
||||
# Check for fnmatch()
|
||||
{ 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 $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
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
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 ()
|
||||
{
|
||||
return
|
||||
(!(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;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
{ (case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_try") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_func_fnmatch_works=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
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
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
|
||||
#define HAVE_FNMATCH 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test x"$ac_cv_func_fnmatch_works" != x"yes"; then
|
||||
case " $LIBOBJS " in
|
||||
*" fnmatch.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS fnmatch.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
# Select semaphore implementation type.
|
||||
if test "$PORTNAME" != "win32"; then
|
||||
|
Reference in New Issue
Block a user