- if test "$pkgconfigpath" != "NONE"; then
- if $pkgconfigpath --exists openssl; then
- SSL_CFLAGS=`$pkgconfigpath --cflags openssl`
- SSL_LIBS="`$pkgconfigpath --libs openssl`"
- sslver=`$pkgconfigpath --modversion openssl`
- fi
- fi
- if test "$sslver" = "no"; then
- SSL_CFLAGS="-I/usr/include/openssl"
- fi
- fi
- if test "$sslver" = "no"; then
- xLIBS="$LIBS";
- xCPPFLAGS="$CPPFLAGS";
- CPPFLAGS="$CPPFLAGS ${SSL_CFLAGS} ${SSL_LIBPATH}"
- SSL_LIBS="${SSL_LIBPATH}"
- AC_CHECK_LIB([crypto],[main])
- if test "$ac_cv_lib_crypto_main" = "yes"; then
- SSL_LIBS="${SSL_LIBS} -lcrypto"
- fi
- AC_CHECK_LIB([ssl],[SSL_new])
- if test "$ac_cv_lib_ssl_SSL_new" = "yes"; then
- AC_CHECK_HEADER([openssl/ssl.h],[sslver=yes])
- SSL_LIBS="${SSL_LIBS} -lssl"
- fi
- if test "$sslver" != "yes"; then
- SSL_LIBS=""
- fi
- LIBS="$xLIBS"
- CPPFLAGS="$xCPPFLAGS"