diff options
author | Dan McGee <dan@archlinux.org> | 2010-09-02 12:05:23 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-09-02 12:05:23 -0500 |
commit | eba521913d68da16cdd18d5e996c00c554408272 (patch) | |
tree | 9520a62f5b5dccf6e370030bb5a46074295744d6 /lib/libalpm/Makefile.am | |
parent | 24d8a1530877f8e5fe36675954e1137ff89e17d4 (diff) | |
download | pacman-eba521913d68da16cdd18d5e996c00c554408272.tar.xz |
Use OpenSSL MD5 crypto functions if available
I've noticed my Atom-powered laptop is dog-slow when doing integrity checks
on packages, and it turns out our MD5 implementation isn't near as good as
that provided by OpenSSL. Using their routines instead provided anywhere
from a 1.4x up to a 1.8x performance benefit over our built-in MD5 function.
This does not remove the MD5 code from our codebase, but it does enable
linking against OpenSSL to get their much faster implementation if it is
available on whatever platform you are using. At configure-time, we will
default to using it if it is available, but this can be easily changed by
using the `--with-openssl` or `--without-openssl` arguments to configure.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/Makefile.am')
-rw-r--r-- | lib/libalpm/Makefile.am | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index 3473a73a..e136b548 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -38,7 +38,6 @@ libalpm_la_SOURCES = \ group.h group.c \ handle.h handle.c \ log.h log.c \ - md5.h md5.c \ package.h package.c \ remove.h remove.c \ sync.h sync.c \ @@ -46,6 +45,11 @@ libalpm_la_SOURCES = \ util.h util.c \ version.c +if !HAVE_LIBSSL +libalpm_la_SOURCES += \ + md5.h md5.c +endif + libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO) libalpm_la_LIBADD = $(LTLIBINTL) |