mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Adjust configure's probe for libselinux so it rejects too-old versions.
We need at least version 2.0.93, so probe for a function that was added in that version. Kaigai Kohei
This commit is contained in:
24
configure
vendored
24
configure
vendored
@ -9389,9 +9389,9 @@ fi
|
|||||||
# for contrib/sepgsql
|
# for contrib/sepgsql
|
||||||
if test "$with_selinux" = yes; then
|
if test "$with_selinux" = yes; then
|
||||||
|
|
||||||
{ $as_echo "$as_me:$LINENO: checking for getpeercon_raw in -lselinux" >&5
|
{ $as_echo "$as_me:$LINENO: checking for selinux_sepgsql_context_path in -lselinux" >&5
|
||||||
$as_echo_n "checking for getpeercon_raw in -lselinux... " >&6; }
|
$as_echo_n "checking for selinux_sepgsql_context_path in -lselinux... " >&6; }
|
||||||
if test "${ac_cv_lib_selinux_getpeercon_raw+set}" = set; then
|
if test "${ac_cv_lib_selinux_selinux_sepgsql_context_path+set}" = set; then
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
ac_check_lib_save_LIBS=$LIBS
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
@ -9409,11 +9409,11 @@ cat >>conftest.$ac_ext <<_ACEOF
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
#endif
|
||||||
char getpeercon_raw ();
|
char selinux_sepgsql_context_path ();
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
return getpeercon_raw ();
|
return selinux_sepgsql_context_path ();
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -9439,12 +9439,12 @@ $as_echo "$ac_try_echo") >&5
|
|||||||
test "$cross_compiling" = yes ||
|
test "$cross_compiling" = yes ||
|
||||||
$as_test_x conftest$ac_exeext
|
$as_test_x conftest$ac_exeext
|
||||||
}; then
|
}; then
|
||||||
ac_cv_lib_selinux_getpeercon_raw=yes
|
ac_cv_lib_selinux_selinux_sepgsql_context_path=yes
|
||||||
else
|
else
|
||||||
$as_echo "$as_me: failed program was:" >&5
|
$as_echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
ac_cv_lib_selinux_getpeercon_raw=no
|
ac_cv_lib_selinux_selinux_sepgsql_context_path=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf conftest.dSYM
|
rm -rf conftest.dSYM
|
||||||
@ -9452,9 +9452,9 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
|||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_getpeercon_raw" >&5
|
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_selinux_sepgsql_context_path" >&5
|
||||||
$as_echo "$ac_cv_lib_selinux_getpeercon_raw" >&6; }
|
$as_echo "$ac_cv_lib_selinux_selinux_sepgsql_context_path" >&6; }
|
||||||
if test "x$ac_cv_lib_selinux_getpeercon_raw" = x""yes; then
|
if test "x$ac_cv_lib_selinux_selinux_sepgsql_context_path" = x""yes; then
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE_LIBSELINUX 1
|
#define HAVE_LIBSELINUX 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
@ -9462,8 +9462,8 @@ _ACEOF
|
|||||||
LIBS="-lselinux $LIBS"
|
LIBS="-lselinux $LIBS"
|
||||||
|
|
||||||
else
|
else
|
||||||
{ { $as_echo "$as_me:$LINENO: error: library 'libselinux' is required for SELinux support" >&5
|
{ { $as_echo "$as_me:$LINENO: error: library 'libselinux', version 2.0.93 or newer, is required for SELinux support" >&5
|
||||||
$as_echo "$as_me: error: library 'libselinux' is required for SELinux support" >&2;}
|
$as_echo "$as_me: error: library 'libselinux', version 2.0.93 or newer, is required for SELinux support" >&2;}
|
||||||
{ (exit 1); exit 1; }; }
|
{ (exit 1); exit 1; }; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -960,8 +960,8 @@ fi
|
|||||||
|
|
||||||
# for contrib/sepgsql
|
# for contrib/sepgsql
|
||||||
if test "$with_selinux" = yes; then
|
if test "$with_selinux" = yes; then
|
||||||
AC_CHECK_LIB(selinux, getpeercon_raw, [],
|
AC_CHECK_LIB(selinux, selinux_sepgsql_context_path, [],
|
||||||
[AC_MSG_ERROR([library 'libselinux' is required for SELinux support])])
|
[AC_MSG_ERROR([library 'libselinux', version 2.0.93 or newer, is required for SELinux support])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# for contrib/uuid-ossp
|
# for contrib/uuid-ossp
|
||||||
|
Reference in New Issue
Block a user