| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 | AC_DEFUN([AM_PATH_OPENSSL],[AC_ARG_WITH([openssl-prefix],            [  --with-openssl-prefix=PREFIX  Prefix where OpenSSL installed (optional)],            [openssl_prefix=$withval],            [openssl_prefix=""])if test "x$openssl_prefix" = "x"; then  openssl_prefix="/usr/local"fiopenssl_prefix_lib=$openssl_prefix/libopenssl_prefix_include=$openssl_prefix/includeLIBS_save=$LIBSCPPFLAGS_save=$CPPFLAGSLIBS="-L$openssl_prefix_lib $LIBS"CPPFLAGS="-I$openssl_prefix_include $CPPFLAGS"AC_CHECK_LIB([ssl], [SSL_library_init], [have_openssl=yes; LIBS="-lssl $LIBS"])if test "x$have_openssl" = "xyes"; then  have_openssl=no  AC_CHECK_LIB([crypto], [main], [have_openssl=yes; LIBS="-lcrypto $LIBS"])  if test "x$have_openssl" = "xyes"; then    AC_DEFINE([HAVE_LIBSSL], [1], [Define to 1 if you have openssl.])    dnl check whether EVP_DigestInit_ex exists. Old openssl doesn't have it.    AC_CHECK_FUNCS([EVP_DigestInit_ex], [have_digestinit_ex=yes])    if test "x$have_digestinit_ex" = "x"; then      AC_DEFINE([HAVE_OLD_LIBSSL], [1], [Define to 1 if you have old openssl.])    fi    OPENSSL_LIBS="-L$openssl_prefix_lib -lssl -lcrypto"    OPENSSL_CFLAGS="-I$openssl_prefix_include"    AC_SUBST(OPENSSL_LIBS)    AC_SUBST(OPENSSL_CFLAGS)    dnl search for sha256 support    AC_CHECK_FUNCS([EVP_sha256])  fifiLIBS=$LIBS_saveCPPFLAGS=$CPPFLAGS_save])
 |