Browse Source

Merge pull request #2088 from aria2/fix-libssh2-static-link

Fix static link failure against libssh2
Tatsuhiro Tsujikawa 2 years ago
parent
commit
385ad3a04c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      configure.ac

+ 4 - 0
configure.ac

@@ -489,6 +489,10 @@ if test "x$with_libssh2" = "xyes"; then
   PKG_CHECK_MODULES([LIBSSH2], [libssh2], [have_libssh2=yes], [have_libssh2=no])
   if test "x$have_libssh2" = "xyes"; then
     AC_DEFINE([HAVE_LIBSSH2], [1], [Define to 1 if you have libssh2.])
+
+    if test "x$ARIA2_STATIC" = "xyes"; then
+      LIBSSH2_CFLAGS="-DLIBSSH2_API= $LIBSSH2_CFLAGS"
+    fi
   else
     AC_MSG_WARN([$LIBSSH2_PKG_ERRORS])
     if test "x$with_libssh2_requested" = "xyes"; then