about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-02-13T19·52+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-02-13T19·52+0000
commitd6f586d0eaa9344a99248cc4dfb7825972f2a174 (patch)
treedb144d931fabfc85ad089591393886a9694e48c2 /configure.ac
parente8475bbd5b0c5505bb0536929e89efc8b0d4da5c (diff)
* Optional switch "--with-openssl=<PATH>" to use OpenSSL's
  implementations of MD5, SHA-1 and SHA-256.  The main benefit is that
  we get assembler-optimised implementations of MD5 and SHA-1 (though
  not SHA-256 (at least on x86), unfortunately).  OpenSSL's SHA-1
  implementation on Intel is twice as fast as ours.

Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 42e273f8873a..261e4f1107a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -143,6 +143,17 @@ AC_SUBST(aterm_lib)
 AC_SUBST(aterm_include)
 AC_SUBST(aterm_bin)
 
+AC_ARG_WITH(openssl, AC_HELP_STRING([--with-openssl=PATH],
+  [prefix of the OpenSSL library]),
+  openssl=$withval, openssl=)
+AM_CONDITIONAL(HAVE_OPENSSL, test -n "$openssl")
+if test -n "$openssl"; then
+  LDFLAGS="-L$openssl/lib -lcrypto $LDFLAGS"
+  CFLAGS="-I$openssl/include $CFLAGS"
+  CXXFLAGS="-I$openssl/include $CXXFLAGS"
+  AC_DEFINE(HAVE_OPENSSL, 1, [whether to use OpenSSL])
+fi
+
 AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2=PATH],
   [prefix of bzip2]),
   bzip2=$withval, bzip2=)