dnl Process this file with autoconf to produce a configure script.
 
-dnl $Id: configure.in,v 1.13.2.59 2002/09/15 14:55:53 guus Exp $
+dnl $Id: configure.in,v 1.13.2.60 2003/01/17 00:43:56 guus Exp $
 
 AC_PREREQ(2.53)
 AC_INIT(src/tincd.c)
 
 dnl Check and set OS
 
-AC_CANONICAL_HOST
+#AC_CANONICAL_HOST
 
 case $host_os in
   *linux*)
 
 AC_SUBST(INCLUDES)
 
-AC_OUTPUT(Makefile po/Makefile.in  
+AC_OUTPUT(Makefile 
 src/Makefile
 doc/Makefile
 doc/es/Makefile
 lib/Makefile
-m4/Makefile
 po/Makefile.in
+m4/Makefile
 )
 
     [AC_MSG_ERROR([OpenSSL libraries not found.])]
   )
 
-  AC_CHECK_FUNCS(RAND_pseudo_bytes)
-
-  AC_CHECK_FUNC(OpenSSL_add_all_algorithms,
-    [],
-    [AC_CHECK_FUNC(SSLeay_add_all_algorithms,
-      [AC_DEFINE(HAVE_SSLEAY_ADD_ALL_ALGORITHMS, 1, [Defined if this function should be used instead of OpenSLL_add_all_algorithms])],
-      [AC_MSG_ERROR([Missing required OpenSSL functionality!])]
-    )]
-  )
+  AC_CHECK_FUNCS([RAND_pseudo_bytes OPENSSL_add_all_algorithms_noconf OpenSSL_add_all_algorithms SSLeay_add_all_algorithms])
 
   AC_CHECK_FUNC(dlopen,
     [],
 
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id: tincd.c,v 1.10.4.65 2002/09/15 14:55:54 guus Exp $
+    $Id: tincd.c,v 1.10.4.66 2003/01/17 00:43:58 guus Exp $
 */
 
 #include "config.h"
 
        RAND_load_file("/dev/urandom", 1024);
 
+#ifdef HAVE_OPENSSL_ADD_ALL_ALGORITHMS_NOCONF
+       OPENSSL_add_all_algorithms_noconf();
+#else
+#ifdef HAVE_OPENSSL_ADD_ALL_ALGORITHMS
+       OpenSSL_add_all_algorithms();
+#else
 #ifdef HAVE_SSLEAY_ADD_ALL_ALGORITHMS
        SSLeay_add_all_algorithms();
 #else
-       OpenSSL_add_all_algorithms();
+#error No add_all_algorithms function available!
+#endif
+#endif
 #endif
 
        if(generate_keys) {