1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-18 15:20:56 +03:00

configure: fix --without-lib*-prefix when lib* is detected anyway

Do not test the prefix when set to `no`.
(as with `--without-lib*-prefix`)

Before this patch this test was always made and when detected despite
the wrong prefix, the `no` prefix remained in `LDFLAGS` causing a build
failure later in `libtool`.

Fixes:
```
$ ../configure --without-libssl-prefix
[...]
../libtool: line 7756: cd: no/lib: No such file or directory
libtool:   error: cannot determine absolute directory name of 'no/lib'
make[2]: *** [libssh2.la] Error 1
```

Follow-up to d19b619070 #1384

Reported-by: Christoph Reiter
Fixes #1505
Closes #1506
This commit is contained in:
Viktor Szakats
2025-01-02 11:43:13 +01:00
parent bd8caa1983
commit ffd0c982a5

View File

@@ -838,7 +838,7 @@ AC_DEFUN([LIBSSH2_LIB_HAVE_LINKFLAGS], [
libssh2_save_CPPFLAGS="$CPPFLAGS" libssh2_save_CPPFLAGS="$CPPFLAGS"
libssh2_save_LDFLAGS="$LDFLAGS" libssh2_save_LDFLAGS="$LDFLAGS"
if test "${with_lib$1_prefix+set}" = set; then if test "${with_lib$1_prefix+set}" = set -a "${with_lib$1_prefix}" != 'no'; then
CPPFLAGS="$CPPFLAGS${CPPFLAGS:+ }-I${with_lib$1_prefix}/include" CPPFLAGS="$CPPFLAGS${CPPFLAGS:+ }-I${with_lib$1_prefix}/include"
LDFLAGS="$LDFLAGS${LDFLAGS:+ }-L${with_lib$1_prefix}/lib" LDFLAGS="$LDFLAGS${LDFLAGS:+ }-L${with_lib$1_prefix}/lib"
fi fi