]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-ssl.m4
Merge changes from CUPS 1.5svn-r9631.
[thirdparty/cups.git] / config-scripts / cups-ssl.m4
index 86faf5f9df8119e58ea55dd85c1cc46edfc430ff..ce62dfd450a692ad64560c50d4cbcec91ad1deec 100644 (file)
@@ -3,7 +3,7 @@ dnl "$Id: cups-ssl.m4 7241 2008-01-22 22:34:52Z mike $"
 dnl
 dnl   OpenSSL/GNUTLS stuff for CUPS.
 dnl
-dnl   Copyright 2007-2010 by Apple Inc.
+dnl   Copyright 2007-2011 by Apple Inc.
 dnl   Copyright 1997-2007 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
@@ -30,7 +30,7 @@ have_ssl=0
 
 if test x$enable_ssl != xno; then
     dnl Look for CDSA...
-    if test $have_ssl = 0 -a "x${enable_cdsassl}" != "xno"; then
+    if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then
        if test $uname = Darwin; then
            AC_CHECK_HEADER(Security/SecureTransport.h, [
                have_ssl=1
@@ -40,6 +40,8 @@ if test x$enable_ssl != xno; then
                dnl Check for the various security headers...
                AC_CHECK_HEADER(Security/SecCertificate.h,
                    AC_DEFINE(HAVE_SECCERTIFICATE_H))
+               AC_CHECK_HEADER(Security/SecItem.h,
+                   AC_DEFINE(HAVE_SECITEM_H))
                AC_CHECK_HEADER(Security/SecItemPriv.h,
                    AC_DEFINE(HAVE_SECITEMPRIV_H))
                AC_CHECK_HEADER(Security/SecPolicy.h,
@@ -51,6 +53,15 @@ if test x$enable_ssl != xno; then
                AC_CHECK_HEADER(Security/SecIdentitySearchPriv.h,
                    AC_DEFINE(HAVE_SECIDENTITYSEARCHPRIV_H))
 
+               dnl Check for SecCertificateCopyData..
+               AC_MSG_CHECKING(for SecCertificateCopyData)
+               if test $uversion -ge 100; then
+                   AC_DEFINE(HAVE_SECCERTIFICATECOPYDATA)
+                   AC_MSG_RESULT(yes)
+               else
+                   AC_MSG_RESULT(no)
+               fi
+
                dnl Check for SecIdentitySearchCreateWithPolicy...
                AC_MSG_CHECKING(for SecIdentitySearchCreateWithPolicy)
                if test $uversion -ge 80; then
@@ -74,7 +85,7 @@ if test x$enable_ssl != xno; then
     fi
 
     dnl Then look for GNU TLS...
-    if test $have_ssl = 0 -a "x${enable_gnutls}" != "xno" -a "x$PKGCONFIG" != x; then
+    if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
        AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
        AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
        if $PKGCONFIG --exists gnutls; then
@@ -111,7 +122,7 @@ if test x$enable_ssl != xno; then
     fi
 
     dnl Check for the OpenSSL library last...
-    if test $have_ssl = 0 -a "x${enable_openssl}" != "xno"; then
+    if test $have_ssl = 0 -a "x$enable_openssl" != "xno"; then
        AC_CHECK_HEADER(openssl/ssl.h,
            dnl Save the current libraries so the crypto stuff isn't always
            dnl included...
@@ -148,6 +159,8 @@ fi
 if test $have_ssl = 1; then
     AC_MSG_RESULT([    Using SSLLIBS="$SSLLIBS"])
     AC_MSG_RESULT([    Using SSLFLAGS="$SSLFLAGS"])
+elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes -o x$enable_openssl = xyes; then
+    AC_MSG_ERROR([Unable to enable SSL support.])
 fi
 
 AC_SUBST(SSLFLAGS)