updated openssl m4 script

This commit is contained in:
Arvid Norberg 2010-06-05 18:40:19 +00:00
parent 6a5806bfd2
commit fc36d27a59
1 changed files with 13 additions and 12 deletions

View File

@ -1,5 +1,5 @@
# =========================================================================== # ===========================================================================
# http://www.nongnu.org/autoconf-archive/ax_check_openssl.html # http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
# =========================================================================== # ===========================================================================
# #
# SYNOPSIS # SYNOPSIS
@ -24,21 +24,22 @@
# #
# LICENSE # LICENSE
# #
# Copyright (c) 2009 Zmanda Inc. <http://www.zmanda.com/> # Copyright (c) 2009, 2010 Zmanda Inc. <http://www.zmanda.com/>
# Copyright (c) 2009 Dustin J. Mitchell <dustin@zmanda.com> # Copyright (c) 2009, 2010 Dustin J. Mitchell <dustin@zmanda.com>
# #
# Copying and distribution of this file, with or without modification, are # Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice # permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. # and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL]) AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
AC_DEFUN([AX_CHECK_OPENSSL], AC_DEFUN([AX_CHECK_OPENSSL], [
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
found=false found=false
AC_ARG_WITH(openssl, AC_ARG_WITH(openssl,
AS_HELP_STRING([--with-openssl@<:@=DIR@:>@], AS_HELP_STRING([--with-openssl=DIR],
[specify root directory for OpenSSL library]), [root of the OpenSSL directory]),
[ [
case "$withval" in case "$withval" in
"" | y | ye | yes | n | no) "" | y | ye | yes | n | no)
@ -50,8 +51,8 @@ AC_DEFUN([AX_CHECK_OPENSSL],
], [ ], [
# if pkg-config is installed and openssl has installed a .pc file, # if pkg-config is installed and openssl has installed a .pc file,
# then use that information and don't search ssldirs # then use that information and don't search ssldirs
# AC_PATH_PROG(PKG_CONFIG, pkg-config) AC_PATH_PROG(PKG_CONFIG, pkg-config)
if test "x$PKG_CONFIG" != "x"; then if test x"$PKG_CONFIG" != x""; then
OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null` OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
if test $? = 0; then if test $? = 0; then
OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null` OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
@ -77,7 +78,7 @@ AC_DEFUN([AX_CHECK_OPENSSL],
AC_MSG_CHECKING([for openssl/ssl.h in $ssldir]) AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
if test -f "$ssldir/include/openssl/ssl.h"; then if test -f "$ssldir/include/openssl/ssl.h"; then
OPENSSL_INCLUDES="-I$ssldir/include" OPENSSL_INCLUDES="-I$ssldir/include"
OPENSSL_LDFLAGS="-L $ssldir/lib" OPENSSL_LDFLAGS="-L$ssldir/lib"
OPENSSL_LIBS="-lssl -lcrypto" OPENSSL_LIBS="-lssl -lcrypto"
found=true found=true
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])