1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-02 10:53:16 +03:00

acinclude.m4: Add CPPFLAGS=-I$prefix-dir/include in LIBSSH2_LIB_HAVE_LINKFLAGS

This is absolutely neccessary for header files to be found when
AC_LIB_HAVE_LINKFLAGS searches for libraries.
This commit is contained in:
Peter Stuge
2016-11-16 22:25:16 +01:00
parent 5621a97e38
commit ab8f0bc0bf

View File

@@ -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
])