summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2013-03-18 11:34:22 +0100
committerRene Engelhard <rene@debian.org>2013-03-18 11:37:04 +0100
commitdf2e3d29a433b18d22b30792db9450c04f35fa79 (patch)
tree792e8fe27fb4d14e4ceb110f3f9634efa98aee42 /configure.ac
parentcf284036edc90e4da7737af84abb9b536f3b2be2 (diff)
check for krb5/gssapi only when we use internal libpq
Change-Id: I654b4bd7dbd3cb6b6e09196a80097eae2a5787a1
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac138
1 files changed, 69 insertions, 69 deletions
diff --git a/configure.ac b/configure.ac
index 18490cf415d0..15c575db1fc7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7662,75 +7662,6 @@ dnl ===================================================================
if test "x$enable_postgresql_sdbc" != "xno"; then
SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
- # if/when anything else than PostgreSQL uses Kerberos,
- # move this out of `test "x$enable_postgresql_sdbc" != "xno"'
- 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
- save_LIBS=$LIBS
- AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5, try installing libcom_err devel package])])
- LIBS=$save_LIBS
- AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5, try installing krb5 devel package])])
- LIBS=$save_LIBS
- fi
- if test "$with_gssapi" != "no"; then
- WITH_GSSAPI=YES
- save_LIBS=$LIBS
- 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])])
- LIBS=$save_LIBS
- fi
- ;;
- WINNT)
- if test "$with_krb5" = "yes" -o "$with_gssapi" = "yes"; then
- AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Windows.])
- fi
- ;;
- Linux|GNU|*BSD|DragonFly)
- if test "$with_krb5" != "no"; then
- WITH_KRB5=YES
- save_LIBS=$LIBS
- AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
- LIBS=$save_LIBS
- AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
- LIBS=$save_LIBS
- fi
- if test "$with_gssapi" != "no"; then
- WITH_GSSAPI=YES
- save_LIBS=$LIBS
- 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])])
- LIBS=$save_LIBS
- fi
- ;;
- *)
- if test "$with_krb5" = "yes"; then
- WITH_KRB5=YES
- save_LIBS=$LIBS
- AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
- LIBS=$save_LIBS
- AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
- LIBS=$save_LIBS
- fi
- if test "$with_gssapi" = "yes"; then
- WITH_GSSAPI=YES
- save_LIBS=$LIBS
- 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])])
- LIBS=$save_LIBS
- fi
- esac
-
AC_MSG_CHECKING([PostgreSQL C interface])
if test "$with_system_postgresql" = "yes"; then
AC_MSG_RESULT([external PostgreSQL])
@@ -7748,6 +7679,75 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
else
+ # if/when anything else than PostgreSQL uses Kerberos,
+ # move this out of `test "x$enable_postgresql_sdbc" != "xno"'
+ 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
+ save_LIBS=$LIBS
+ AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+ [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5, try installing libcom_err devel package])])
+ LIBS=$save_LIBS
+ AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+ [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5, try installing krb5 devel package])])
+ LIBS=$save_LIBS
+ fi
+ if test "$with_gssapi" != "no"; then
+ WITH_GSSAPI=YES
+ save_LIBS=$LIBS
+ 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])])
+ LIBS=$save_LIBS
+ fi
+ ;;
+ WINNT)
+ if test "$with_krb5" = "yes" -o "$with_gssapi" = "yes"; then
+ AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Windows.])
+ fi
+ ;;
+ Linux|GNU|*BSD|DragonFly)
+ if test "$with_krb5" != "no"; then
+ WITH_KRB5=YES
+ save_LIBS=$LIBS
+ AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+ [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ LIBS=$save_LIBS
+ AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+ [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+ LIBS=$save_LIBS
+ fi
+ if test "$with_gssapi" != "no"; then
+ WITH_GSSAPI=YES
+ save_LIBS=$LIBS
+ 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])])
+ LIBS=$save_LIBS
+ fi
+ ;;
+ *)
+ if test "$with_krb5" = "yes"; then
+ WITH_KRB5=YES
+ save_LIBS=$LIBS
+ AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+ [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ LIBS=$save_LIBS
+ AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+ [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+ LIBS=$save_LIBS
+ fi
+ if test "$with_gssapi" = "yes"; then
+ WITH_GSSAPI=YES
+ save_LIBS=$LIBS
+ 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])])
+ LIBS=$save_LIBS
+ fi
+ esac
+
if test -n "$with_libpq_path"; then
SYSTEM_POSTGRESQL=YES
AC_MSG_RESULT([external libpq])