This is absolutely neccessary for header files to be found when
AC_LIB_HAVE_LINKFLAGS searches for libraries.
---
acinclude.m4 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 81efa06..8a2ea6d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -393,10 +393,13 @@ dnl
dnl For conveniece, $4 is expanded if [lib]$1 is found.
AC_DEFUN([LIBSSH2_LIB_HAVE_LINKFLAGS], [
+ libssh2_save_CPPFLAGS="$CPPFLAGS"
libssh2_save_LDFLAGS="$LDFLAGS"
- test "${with_lib$1_prefix+set}" = set &&
+ if test "${with_lib$1_prefix+set}" = set; then
+ CPPFLAGS="$CPPFLAGS${CPPFLAGS:+ }-I${with_lib$1_prefix}/include"
LDFLAGS="$LDFLAGS${LDFLAGS:+ }-L${with_lib$1_prefix}/lib"
+ fi
AC_LIB_HAVE_LINKFLAGS([$1], [$2], [$3])
@@ -404,6 +407,8 @@ AC_DEFUN([LIBSSH2_LIB_HAVE_LINKFLAGS], [
if test "$ac_cv_lib$1" = "yes"; then :
$4
+ else
+ CPPFLAGS="$libssh2_save_CPPFLAGS"
fi
])
--
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2016-11-16