From ffd0c982a572094debe37d12faea6ddf3b0eb31c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 2 Jan 2025 11:43:13 +0100 Subject: [PATCH] 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 d19b61907039554b8261a90898f2f31e1a706f38 #1384 Reported-by: Christoph Reiter Fixes #1505 Closes #1506 --- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index d88309e7..0ec6449b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -838,7 +838,7 @@ AC_DEFUN([LIBSSH2_LIB_HAVE_LINKFLAGS], [ libssh2_save_CPPFLAGS="$CPPFLAGS" 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" LDFLAGS="$LDFLAGS${LDFLAGS:+ }-L${with_lib$1_prefix}/lib" fi