From: mike Date: Wed, 12 Oct 2011 23:24:01 +0000 (+0000) Subject: Fix build problems on Mac OS X 10.7. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d09563607e6acbb130bbb23cb4e3ae1299ef13e4;p=thirdparty%2Fcups.git Fix build problems on Mac OS X 10.7. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10066 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index d453e6caa2..3ad90e521b 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -389,7 +389,17 @@ case $uname in dnl Check for sandbox/Seatbelt support if test $uversion -ge 100; then - AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H)) + AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H)) + fi + if test $uversion -ge 110; then + # Broken public headers in 10.7... + AC_MSG_CHECKING(for sandbox/private.h presence) + if test -f /usr/local/include/sandbox/private.h; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + AC_MSG_ERROR(Run 'sudo mkdir -p /usr/local/include/sandbox' and 'sudo touch /usr/local/include/sandbox/private.h' to build CUPS.) + fi fi dnl Check for XPC support diff --git a/config-scripts/cups-gssapi.m4 b/config-scripts/cups-gssapi.m4 index 04977ee649..aee5699f4d 100644 --- a/config-scripts/cups-gssapi.m4 +++ b/config-scripts/cups-gssapi.m4 @@ -71,10 +71,45 @@ if test x$enable_gssapi != xno; then if test "x$LIBGSSAPI" != x; then AC_CHECK_HEADER(krb5.h, AC_DEFINE(HAVE_KRB5_H)) if test -d /System/Library/Frameworks/GSS.framework; then - AC_CHECK_HEADER(GSS/gssapi.h, AC_DEFINE(HAVE_GSS_GSSAPI_H)) - AC_CHECK_HEADER(GSS/gssapi_generic.h, AC_DEFINE(HAVE_GSSAPI_GENERIC_H)) - AC_CHECK_HEADER(GSS/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_KRB5_H)) - AC_CHECK_HEADER(GSS/gssapi_spi.h, AC_DEFINE(HAVE_GSS_GSSAPI_SPI_H)) + gssdir="/System/Library/Frameworks/GSS.framework/Headers" + AC_MSG_CHECKING(for GSS/gssapi.h presence) + if test -f $gssdir/gssapi.h; then + AC_DEFINE(HAVE_GSS_GSSAPI_H) + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + AC_MSG_CHECKING(for GSS/gssapi_generic.h presence) + if test -f $gssdir/gssapi_generic.h; then + AC_DEFINE(HAVE_GSSAPI_GENERIC_H) + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + AC_MSG_CHECKING(for GSS/gssapi_krb5.h presence) + if test -f $gssdir/gssapi_krb5.h; then + AC_DEFINE(HAVE_GSSAPI_KRB5_H) + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + AC_MSG_CHECKING(for GSS/gssapi_spi.h presence) + if test -f $gssdir/gssapi_spi.h; then + AC_MSG_RESULT(yes) + AC_MSG_CHECKING(for GSS/gssapi_spi.h usability) + if test -s $gssdir/gssapi_spi.h; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GSS_GSSAPI_SPI_H) + else + AC_MSG_RESULT(no) + fi + else + AC_MSG_RESULT(no) + if test $uversion -ge 110; then + # Broken public headers in 10.7... + AC_MSG_ERROR(Run 'sudo touch $gssdir/gssapi_spi.h' to build CUPS.) + fi + fi else AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H)) AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H)) diff --git a/cups/auth.c b/cups/auth.c index 027116c88d..0734c401d0 100644 --- a/cups/auth.c +++ b/cups/auth.c @@ -65,6 +65,8 @@ extern const char *cssmErrorString(int error); # ifdef HAVE_GSS_GSSAPI_SPI_H # include # else +# define GSS_AUTH_IDENTITY_TYPE_1 1 +# define gss_acquire_cred_ex_f __ApplePrivate_gss_acquire_cred_ex_f typedef struct gss_auth_identity { uint32_t type;