X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=m4%2Fpdns_check_libcrypto.m4;h=c71c98acc8208cb22fee669e51cc582f2c731a0d;hb=8cac4f086a4830240ad657d10f1fb667a0418a35;hp=c9034cf5a2c608542f2789464723541f513feff0;hpb=aaa3150e332e360d600ca55697e043d6adc6f287;p=thirdparty%2Fpdns.git diff --git a/m4/pdns_check_libcrypto.m4 b/m4/pdns_check_libcrypto.m4 index c9034cf5a2..c71c98acc8 100644 --- a/m4/pdns_check_libcrypto.m4 +++ b/m4/pdns_check_libcrypto.m4 @@ -90,6 +90,10 @@ AC_DEFUN([PDNS_CHECK_LIBCRYPTO], [ # it will just work! fi + if $found; then + AC_DEFINE([HAVE_LIBCRYPTO], [1], [Define to 1 if you have OpenSSL libcrypto]) + fi + # try the preprocessor and linker with our new flags, # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS @@ -107,6 +111,7 @@ AC_DEFUN([PDNS_CHECK_LIBCRYPTO], [ [AC_LANG_PROGRAM([#include ], [ERR_load_CRYPTO_strings()])], [ AC_MSG_RESULT([yes]) + AC_CHECK_FUNCS([RAND_bytes RAND_pseudo_bytes]) $1 ], [ AC_MSG_RESULT([no]) @@ -119,4 +124,5 @@ AC_DEFUN([PDNS_CHECK_LIBCRYPTO], [ AC_SUBST([LIBCRYPTO_INCLUDES]) AC_SUBST([LIBCRYPTO_LIBS]) AC_SUBST([LIBCRYPTO_LDFLAGS]) + AM_CONDITIONAL([HAVE_LIBCRYPTO], [test "x$LIBCRYPTO_LIBS" != "x"]) ])