Made OpenSSL the default and only option (with the --with-ssl used only to

specify the openssl install directory).

svn path=/trunk/boinc/; revision=7132
This commit is contained in:
Eric J. Korpela 2005-08-03 19:53:41 +00:00
parent 6807bac55f
commit f2f42a1547
1 changed files with 35 additions and 32 deletions

View File

@ -1,42 +1,45 @@
AC_DEFUN([CHECK_SSL], AC_DEFUN([CHECK_SSL],
[AC_MSG_CHECKING(if ssl is wanted) [AC_MSG_CHECKING(for openssl)
SSLDIR= SSLDIR=
found_ssl="no"
AC_ARG_WITH(ssl, AC_ARG_WITH(ssl,
[ --with-ssl enable ssl [will check /usr/local/ssl AC_HELP_STRING([--with-ssl],
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr ] [Use openssl (in specified installation directory)]),
], [check_ssl_dir="$withval"],
[ AC_MSG_RESULT(yes) [check_ssl_dir=])
for dir in $withval /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do for dir in $check_ssl_dir /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
ssldir="$dir" ssldir="$dir"
if test -f "$dir/include/openssl/ssl.h"; then if test -f "$dir/include/openssl/ssl.h"; then
found_ssl="yes"; found_ssl="yes";
SSLDIR="${ssldir}" SSLDIR="${ssldir}"
CFLAGS="$CFLAGS -I$ssldir/include -I$ssldir/include/openssl"; CFLAGS="$CFLAGS -I$ssldir/include -I$ssldir/include/openssl";
CXXFLAGS="$CXXFLAGS -I$ssldir/include -I$ssldir/include/openssl"; CXXFLAGS="$CXXFLAGS -I$ssldir/include -I$ssldir/include/openssl";
break; break;
fi fi
if test -f "$dir/include/ssl.h"; then if test -f "$dir/include/ssl.h"; then
found_ssl="yes"; found_ssl="yes";
SSLDIR="${ssldir}" SSLDIR="${ssldir}"
CFLAGS="$CFLAGS -I$ssldir/include/"; CFLAGS="$CFLAGS -I$ssldir/include/";
CXXFLAGS="$CXXFLAGS -I$ssldir/include/"; CXXFLAGS="$CXXFLAGS -I$ssldir/include/";
break break
fi fi
done done
if test x_$found_ssl != x_yes; then AC_MSG_RESULT($found_ssl)
AC_MSG_ERROR(Cannot find ssl libraries) if test x_$found_ssl != x_yes; then
else AC_MSG_ERROR([
----------------------------------------------------------------------
Cannot find openssl libraries.
Please install openssl or specify installation directory with
--with-ssl=(dir).
----------------------------------------------------------------------
])
else
printf "OpenSSL found in $ssldir\n"; printf "OpenSSL found in $ssldir\n";
LIBS="$LIBS -lssl -lcrypto"; LIBS="$LIBS -lssl -lcrypto";
LDFLAGS="$LDFLAGS -L$ssldir/lib"; LDFLAGS="$LDFLAGS -L$ssldir/lib";
AC_DEFINE_UNQUOTED([USE_OPENSSL],[1], AC_DEFINE_UNQUOTED([USE_OPENSSL],[1],
["Define to 1 if you want to use the openssl crypto library"]) ["Define to 1 if you want to use the openssl crypto library"])
AC_SUBST(SSLDIR) AC_SUBST(SSLDIR)
fi fi
],
[
AC_DEFINE_UNQUOTED([USE_RSAEURO],[1],
["Define to 1 if you want to use the RSAEURO crypto library"])
AC_MSG_RESULT(no)
])
])dnl ])dnl