summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2011-12-15 18:40:59 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2011-12-15 18:40:59 +0100
commit227350eb5a9881f795e9ae499c732f0148e4ac38 (patch)
tree36bb4cfc5e0a9df913003812eab35ec427e35a9c /configure.in
parentRemoved extra semicolons (diff)
downloadcore-227350eb5a9881f795e9ae499c732f0148e4ac38.tar.gz
core-227350eb5a9881f795e9ae499c732f0148e4ac38.zip
Introduce optional krb5&gssapi support for internal PostgreSQL
Enable it by default on MacOS X
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in62
1 files changed, 61 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 354fa521a23a..3dbbc4be8879 100644
--- a/configure.in
+++ b/configure.in
@@ -1592,6 +1592,25 @@ AC_ARG_WITH(lang,
],
,)
+# Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
+AC_ARG_WITH(krb5,
+ AS_HELP_STRING([--with-krb5],
+ [Enable MIT Kerberos 5 support in modules that support it.
+ By default automatically enabled on platforms
+ where a good system Kerberos 5 is available.]),
+,)
+#AC_ARG_WITH(system-redland,
+# AS_HELP_STRING([--with-system-redland],
+# [Use redland library already on system.]),,
+# [with_system_redland="$with_system_libs"])
+
+AC_ARG_WITH(gssapi,
+ AS_HELP_STRING([--with-gssapi],
+ [Enable GSSAPI support in modules that support it.
+ By default automatically enabled on platforms
+ where a good system GSSAPI is available.]),
+,)
+
dnl ===================================================================
dnl Branding
dnl ===================================================================
@@ -5413,12 +5432,51 @@ fi
dnl ===================================================================
dnl Check for PostgreSQL stuff
dnl ===================================================================
-
if test "x$enable_ext_postgresql_sdbc" = "xyes"; then
if test "x$enable_extension_integration" = "xyes"; then
SCPDEFS="$SCPDEFS -DWITH_EXTENSION_POSTGRESQL"
fi
+# if/when anything else than PostgreSQL uses Kerberos,
+# move this out of `test "x$enable_ext_postgresql_sdbc" = "xyes"'
+WITH_KRB5=NO
+WITH_GSSAPI=no
+case "$_os" in
+ Darwin)
+ # MacOS X has system MIT Kerberos 5 since 10.4
+ if test "$with_krb5" != "no"; then
+ WITH_KRB5=YES
+ AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'], [],
+ [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+ [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+ fi
+ if test "$with_gssapi" != "no"; then
+ WITH_GSSAPI=YES
+ AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
+ [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+ fi
+ ;;
+ WINNT)
+ if test "$with_krb5" = "yes" || "$with_gssapi" = "yes"; then
+ AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Microsoft Windows.])
+ fi
+ ;;
+ *)
+ if test "$with_krb5" = "yes"; then
+ WITH_KRB5=YES
+ AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'], [],
+ [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+ [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+ fi
+ if test "$with_gssapi" = "yes"; then
+ WITH_GSSAPI=YES
+ AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
+ [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+ fi
+esac
+
AC_MSG_CHECKING([PostgreSQL C interface])
if test "$with_system_postgresql" = "yes"; then
AC_MSG_RESULT([external PostgreSQL])
@@ -5465,6 +5523,8 @@ if test "x$enable_ext_postgresql_sdbc" = "xyes"; then
fi
BUILD_POSTGRESQL_SDBC=YES
fi
+AC_SUBST(WITH_KRB5)
+AC_SUBST(WITH_GSSAPI)
AC_SUBST(BUILD_POSTGRESQL_SDBC)
AC_SUBST(SYSTEM_POSTGRESQL)
AC_SUBST(POSTGRESQL_INC)