-prefer MD5Init() from openssl libs (-lcrypto)
-
---- ntp-4.2.0/configure.in~ 2006-09-01 01:34:38.431438260 +0300
-+++ ntp-4.2.0/configure.in 2006-09-13 10:51:32.253439861 +0300
-@@ -205,8 +205,10 @@
- AC_CHECK_FUNC(openlog, ,
- AC_CHECK_LIB(gen, openlog, ,
- AC_CHECK_LIB(syslog, openlog, , , -lsocket)))
-+AC_CHECK_LIB(crypto, MD5Init, ,
- AC_CHECK_LIB(md5, MD5Init, ,
- AC_CHECK_LIB(md, MD5Init))
-+)
+--- ntp-4.2.4p7/configure.ac.orig 2009-05-19 10:44:23.000000000 +0200
++++ ntp-4.2.4p7/configure.ac 2009-05-19 10:46:03.000000000 +0200
+@@ -366,6 +366,7 @@
+ AC_CHECK_FUNC([openlog], ,
+ AC_SEARCH_LIBS([openlog], [gen], ,
+ AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])))
++AC_SEARCH_LIBS([MD5_Init], [crypto])
+ AC_SEARCH_LIBS([MD5Init], [md5 md])
AC_CHECK_FUNCS(MD5Init)
- dnl HMS: What a hack...
- AC_CHECK_HEADERS(readline/history.h readline/readline.h)
+
+--- ntp-4.2.0/include/ntp_md5.h 2003-07-17 13:27:16.000000000 +0300
++++ ntp-4.2.0.ssl/include/ntp_md5.h 2006-10-02 23:15:24.871129536 +0300
+@@ -2,8 +2,15 @@
+ * ntp_md5.h: deal with md5.h headers
+ */
+
++#ifdef HAVE_LIBCRYPTO
++# include <openssl/md5.h>
++#define MD5Update MD5_Update
++#define MD5Final MD5_Final
++#define MD5Init MD5_Init
++#else
+ #ifdef HAVE_MD5_H
+ # include <md5.h>
+ #else
+ # include "rsa_md5.h"
+ #endif
++#endif
+--- ntp-4.2.0/libntp/md5c.c~ 2003-07-17 12:27:22.000000000 +0200
++++ ntp-4.2.0/libntp/md5c.c 2007-02-22 13:51:00.000000000 +0100
+@@ -24,7 +24,7 @@
+ */
+
+ #include "global.h"
+-#ifndef HAVE_MD5INIT
++#if !HAVE_MD5INIT && !HAVE_LIBCRYPTO
+ #include "ntp_md5.h"
+
+ /* Constants for MD5Transform routine.
+--- ntp-4.2.4p7/configure.ac.orig 2009-08-08 16:46:22.000000000 +0200
++++ ntp-4.2.4p7/configure.ac 2009-08-08 17:52:24.000000000 +0200
+@@ -427,17 +427,6 @@
+ esac
+ AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h math.h)
+
+-# HMS: Lame, but fast.
+-if test -f /etc/redhat-release
+-then
+- :
+-else
+- AC_CHECK_HEADERS(md5.h, [], [],
+-[#if HAVE_SYS_TYPES_H
+-#include <sys/types.h>
+-#endif
+-])
+-fi
+ AC_CHECK_HEADERS(memory.h netdb.h poll.h)
+ AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h)
+ AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h)