summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorvenaas <venaas>2007-06-05 09:48:01 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-06-05 09:48:01 +0000
commitb93d5015118ebcc16a0869ff924369f404593ca9 (patch)
treef3aa85ed2c9d75940d29af8a727768d47f9e021c /acinclude.m4
parent92938fa2d2416998df899406e19aaa074bc22dbb (diff)
This branch will be for 1.0 alpha, beta, 1.0, 1.0.1 etc...
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.0@124 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m447
1 files changed, 47 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..f854b0e
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,47 @@
+dnl Based on the one from the Boinc project by Reinhard
+
+AC_DEFUN([AX_CHECK_SSL],
+[AC_MSG_CHECKING(for OpenSSL)
+SSL_DIR=
+found_ssl="no"
+AC_ARG_WITH(ssl,
+ AC_HELP_STRING([--with-ssl],
+ [Use SSL (in specified installation directory)]),
+ [check_ssl_dir="$withval"],
+ [check_ssl_dir=])
+for dir in $check_ssl_dir /usr /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local ; do
+ ssldir="$dir"
+ if test -f "$dir/include/openssl/ssl.h"; then
+ found_ssl="yes";
+ SSL_DIR="${ssldir}"
+ SSL_CFLAGS="-I$ssldir/include -I$ssldir/include/openssl";
+ break;
+ fi
+ if test -f "$dir/include/ssl.h"; then
+ found_ssl="yes";
+ SSL_DIR="${ssldir}"
+ SSL_CFLAGS="-I$ssldir/include/";
+ break
+ fi
+done
+AC_MSG_RESULT($found_ssl)
+if test x_$found_ssl != x_yes; then
+ AC_MSG_ERROR([
+----------------------------------------------------------------------
+ Cannot find SSL libraries.
+
+ Please install OpenSSL or specify installation directory with
+ --with-ssl=(dir).
+----------------------------------------------------------------------
+])
+else
+ printf "OpenSSL found in $ssldir\n";
+ SSL_LIBS="-lssl -lcrypto";
+ SSL_LDFLAGS="-L$ssldir/lib";
+ AC_DEFINE_UNQUOTED([USE_OPENSSL],[1],
+ ["Define to 1 if you want to use the OpenSSL crypto library"])
+ AC_SUBST(SSL_CFLAGS)
+ AC_SUBST(SSL_LDFLAGS)
+ AC_SUBST(SSL_LIBS)
+fi
+])dnl