2 dnl "$Id: cups-openssl.m4,v 1.9 2002/06/06 19:39:37 mike Exp $"
4 dnl OpenSSL stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 1997-2002 by Easy Software Products, all rights reserved.
8 dnl These coded instructions, statements, and computer programs are the
9 dnl property of Easy Software Products and are protected by Federal
10 dnl copyright law. Distribution and use rights are outlined in the file
11 dnl "LICENSE.txt" which should have been included with this file. If this
12 dnl file is missing or damaged please contact Easy Software Products
15 dnl Attn: CUPS Licensing Information
16 dnl Easy Software Products
17 dnl 44141 Airport View Drive, Suite 204
18 dnl Hollywood, Maryland 20636-3111 USA
20 dnl Voice: (301) 373-9603
21 dnl EMail: cups-info@cups.org
22 dnl WWW: http://www.cups.org
25 AC_ARG_ENABLE(ssl, [ --enable-ssl turn on SSL/TLS support, default=yes])
26 AC_ARG_WITH(openssl-libs, [ --with-openssl-libs set directory for OpenSSL library],
27 LDFLAGS="-L$withval $LDFLAGS"
28 DSOFLAGS="-L$withval $DSOFLAGS",)
29 AC_ARG_WITH(openssl-includes, [ --with-openssl-includes set directory for OpenSSL includes],
30 CFLAGS="-I$withval $CFLAGS"
31 CXXFLAGS="-I$withval $CXXFLAGS"
32 CPPFLAGS="-I$withval $CPPFLAGS",)
36 if test x$enable_ssl != xno; then
37 AC_CHECK_HEADER(openssl/ssl.h,
38 dnl Save the current libraries so the crypto stuff isn't always
42 dnl Some ELF systems can't resolve all the symbols in libcrypto
43 dnl if libcrypto was linked against RSAREF, and fail to link the
44 dnl test program correctly, even though a correct installation
45 dnl of OpenSSL exists. So we test the linking three times in
46 dnl case the RSAREF libraries are needed.
51 "-lcrypto -lRSAglue -lrsaref"
53 AC_CHECK_LIB(ssl,SSL_new,
54 [SSLLIBS="-lssl $libcrypto"
55 AC_DEFINE(HAVE_LIBSSL)],,
58 if test "x${SSLLIBS}" != "x"; then
68 EXPORT_SSLLIBS="$SSLLIBS"
69 AC_SUBST(EXPORT_SSLLIBS)
73 dnl End of "$Id: cups-openssl.m4,v 1.9 2002/06/06 19:39:37 mike Exp $".