The just commited GSSAPI patch is unable to find the required libraries
and includes on OpenBSD (which are in /usr/include/kerberosV/) - the
attached patch allows building with gssapi support on OpenBSD 4.0/amd64
(and still seems to build fine on Debian Etch/x86_64).
Note that the patch does not include the derived filess o one needs to
make sure they are getting regenerated before commit.
Stefan
Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pgsql/configure.in,v
retrieving revision 1.518
diff -c -r1.518 configure.in
*** configure.in 10 Jul 2007 16:41:01 -0000 1.518
--- configure.in 11 Jul 2007 12:58:09 -0000
***************
*** 767,774 ****
if test "$with_gssapi" = yes ; then
if test "$PORTNAME" != "win32"; then
! AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5], [],
! [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
else
LIBS="$LIBS -lgssapi32"
fi
--- 767,774 ----
if test "$with_gssapi" = yes ; then
if test "$PORTNAME" != "win32"; then
! AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 'gssapi -lkrb5 -lcrypto'], [],
! [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
else
LIBS="$LIBS -lgssapi32"
fi
***************
*** 870,876 ****
fi
if test "$with_gssapi" = yes ; then
! AC_CHECK_HEADER(gssapi/gssapi.h, [], [AC_MSG_ERROR([header file <gssapi/gssapi.h> is required for GSSAPI])])
fi
if test "$with_krb5" = yes ; then
--- 870,877 ----
fi
if test "$with_gssapi" = yes ; then
! AC_CHECK_HEADERS(gssapi/gssapi.h, [],
! [AC_CHECK_HEADERS(gssapi.h, [], [AC_MSG_ERROR([gssapi.h header file is required for GSSAPI])])])
fi
if test "$with_krb5" = yes ; then
Index: src/backend/libpq/auth.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/libpq/auth.c,v
retrieving revision 1.150
diff -c -r1.150 auth.c
*** src/backend/libpq/auth.c 11 Jul 2007 08:27:33 -0000 1.150
--- src/backend/libpq/auth.c 11 Jul 2007 12:58:09 -0000
***************
*** 302,308 ****
--- 302,312 ----
*----------------------------------------------------------------
*/
+ #if defined(HAVE_GSSAPI_H)
+ #include <gssapi.h>
+ #else
#include <gssapi/gssapi.h>
+ #endif
#ifdef WIN32
/*
Index: src/include/libpq/libpq-be.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/libpq/libpq-be.h,v
retrieving revision 1.59
diff -c -r1.59 libpq-be.h
*** src/include/libpq/libpq-be.h 10 Jul 2007 13:14:21 -0000 1.59
--- src/include/libpq/libpq-be.h 11 Jul 2007 12:58:10 -0000
***************
*** 30,37 ****
--- 30,41 ----
#endif
#ifdef ENABLE_GSS
+ #if defined(HAVE_GSSAPI_H)
+ #include <gssapi.h>
+ #else
#include <gssapi/gssapi.h>
#endif
+ #endif
#include "libpq/hba.h"
#include "libpq/pqcomm.h"
Index: src/interfaces/libpq/fe-auth.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v
retrieving revision 1.124
diff -c -r1.124 fe-auth.c
*** src/interfaces/libpq/fe-auth.c 10 Jul 2007 13:14:21 -0000 1.124
--- src/interfaces/libpq/fe-auth.c 11 Jul 2007 12:58:10 -0000
***************
*** 317,323 ****
--- 317,327 ----
/*
* GSSAPI authentication system.
*/
+ #if defined(HAVE_GSSAPI_H)
+ #include <gssapi.h>
+ #else
#include <gssapi/gssapi.h>
+ #endif
#ifdef WIN32
/*
Index: src/interfaces/libpq/libpq-int.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/libpq-int.h,v
retrieving revision 1.122
diff -c -r1.122 libpq-int.h
*** src/interfaces/libpq/libpq-int.h 10 Jul 2007 13:14:22 -0000 1.122
--- src/interfaces/libpq/libpq-int.h 11 Jul 2007 12:58:10 -0000
***************
*** 45,52 ****
--- 45,56 ----
#include "pqexpbuffer.h"
#ifdef ENABLE_GSS
+ #if defined(HAVE_GSSAPI_H)
+ #include <gssapi.h>
+ #else
#include <gssapi/gssapi.h>
#endif
+ #endif
#ifdef USE_SSL
#include <openssl/ssl.h>