]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-ssl.m4
Merge changes from CUPS 1.4svn-r8628.
[thirdparty/cups.git] / config-scripts / cups-ssl.m4
index a208b712f160eb70068f5723d262c57def1aa945..7e20ecd90528c7cdd6596b47ef16f37523da2f82 100644 (file)
@@ -1,28 +1,19 @@
 dnl
-dnl "$Id: cups-ssl.m4 6237 2007-02-06 15:56:14Z mike $"
+dnl "$Id: cups-ssl.m4 7241 2008-01-22 22:34:52Z mike $"
 dnl
 dnl   OpenSSL/GNUTLS stuff for the Common UNIX Printing System (CUPS).
 dnl
+dnl   Copyright 2007-2009 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
-dnl   property of Easy Software Products and are protected by Federal
-dnl   copyright law.  Distribution and use rights are outlined in the file
-dnl   "LICENSE.txt" which should have been included with this file.  If this
-dnl   file is missing or damaged please contact Easy Software Products
-dnl   at:
-dnl
-dnl       Attn: CUPS Licensing Information
-dnl       Easy Software Products
-dnl       44141 Airport View Drive, Suite 204
-dnl       Hollywood, Maryland 20636 USA
-dnl
-dnl       Voice: (301) 373-9600
-dnl       EMail: cups-info@cups.org
-dnl         WWW: http://www.cups.org
+dnl   property of Apple Inc. and are protected by Federal copyright
+dnl   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+dnl   which should have been included with this file.  If this file is
+dnl   file is missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
-AC_ARG_ENABLE(ssl, [  --enable-ssl            turn on SSL/TLS support, default=yes])
+AC_ARG_ENABLE(ssl, [  --disable-ssl           disable SSL/TLS support])
 AC_ARG_ENABLE(cdsassl, [  --enable-cdsassl        use CDSA for SSL/TLS support, default=first])
 AC_ARG_ENABLE(gnutls, [  --enable-gnutls         use GNU TLS for SSL/TLS support, default=second])
 AC_ARG_ENABLE(openssl, [  --enable-openssl        use OpenSSL for SSL/TLS support, default=third])
@@ -31,12 +22,10 @@ AC_ARG_WITH(openssl-libs, [  --with-openssl-libs     set directory for OpenSSL l
     DSOFLAGS="-L$withval $DSOFLAGS",)
 AC_ARG_WITH(openssl-includes, [  --with-openssl-includes set directory for OpenSSL includes],
     CFLAGS="-I$withval $CFLAGS"
-    CXXFLAGS="-I$withval $CXXFLAGS"
     CPPFLAGS="-I$withval $CPPFLAGS",)
 
 SSLFLAGS=""
 SSLLIBS=""
-ENCRYPTION_REQUIRED=""
 
 if test x$enable_ssl != xno; then
     dnl Look for CDSA...
@@ -44,10 +33,6 @@ if test x$enable_ssl != xno; then
        if test $uname = Darwin; then
            AC_CHECK_HEADER(Security/SecureTransport.h, [
                SSLLIBS="-framework CoreFoundation -framework Security"
-               # MacOS X doesn't (yet) come with pre-installed encryption
-               # certificates for CUPS, so don't enable encryption on
-               # /admin just yet...
-               #ENCRYPTION_REQUIRED="  Encryption Required"
                AC_DEFINE(HAVE_SSL)
                AC_DEFINE(HAVE_CDSASSL)
 
@@ -73,12 +58,11 @@ if test x$enable_ssl != xno; then
     fi
 
     dnl Then look for GNU TLS...
-    if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno"; then
+    if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno" -a "x$PKGCONFIG" != x; then
        AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
-       if test "x$LIBGNUTLSCONFIG" != x; then
-           SSLLIBS=`$LIBGNUTLSCONFIG --libs`
-           SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
-           ENCRYPTION_REQUIRED="  Encryption Required"
+       if $PKGCONFIG --exists gnutls; then
+           SSLLIBS=`$PKGCONFIG --libs gnutls`
+           SSLFLAGS=`$PKGCONFIG --cflags gnutls`
            AC_DEFINE(HAVE_SSL)
            AC_DEFINE(HAVE_GNUTLS)
        fi
@@ -105,7 +89,6 @@ if test x$enable_ssl != xno; then
                AC_CHECK_LIB(ssl,SSL_new,
                    [SSLFLAGS="-DOPENSSL_DISABLE_OLD_DES_SUPPORT"
                     SSLLIBS="-lssl $libcrypto"
-                    ENCRYPTION_REQUIRED="  Encryption Required"
                     AC_DEFINE(HAVE_SSL)
                     AC_DEFINE(HAVE_LIBSSL)],,
                    $libcrypto)
@@ -126,12 +109,11 @@ fi
 
 AC_SUBST(SSLFLAGS)
 AC_SUBST(SSLLIBS)
-AC_SUBST(ENCRYPTION_REQUIRED)
 
 EXPORT_SSLLIBS="$SSLLIBS"
 AC_SUBST(EXPORT_SSLLIBS)
 
 
 dnl
-dnl End of "$Id: cups-ssl.m4 6237 2007-02-06 15:56:14Z mike $".
+dnl End of "$Id: cups-ssl.m4 7241 2008-01-22 22:34:52Z mike $".
 dnl