diff --git a/configure.ac b/configure.ac index 17790af..77fde13 100644 --- a/configure.ac +++ b/configure.ac @@ -96,13 +96,17 @@ AC_ARG_WITH(libz, # Look for OpenSSL (default) if test "$use_openssl" != "no" && test "$use_libgcrypt" != "yes"; then AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [#include ]) + LIBSREQUIRED=ssl,crypto fi # Look for libgcrypt if test "$ac_cv_libssl" != "yes" && test "$use_libgcrypt" != "no"; then AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [#include ]) + LIBSREQUIRED=gcrypt fi +AC_SUBST(LIBSREQUIRED) + if test "$ac_cv_libssl" != "yes" && test "$ac_cv_libgcrypt" != "yes"; then AC_MSG_ERROR([cannot find OpenSSL or Libgcrypt, try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH]) diff --git a/libssh2.pc.in b/libssh2.pc.in index 637f5ed..49c2e1b 100644 --- a/libssh2.pc.in +++ b/libssh2.pc.in @@ -11,6 +11,7 @@ Name: libssh2 URL: http://www.libssh2.org/ Description: Library for SSH-based communication Version: @LIBSSH2VER@ +Requires: @LIBSREQUIRED@ Libs: -L${libdir} -lssh2 @LDFLAGS@ @LIBS@ Libs.private: @LIBS@ Cflags: -I${includedir}