[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
havelib: fix a bug in dependency processing
From: |
Bruno Haible |
Subject: |
havelib: fix a bug in dependency processing |
Date: |
Mon, 18 Nov 2019 00:00:14 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; ) |
This patch fixes a very long-standing bug when AC_LIB_LINKFLAGS is used with a
non-empty dependencies argument.
2019-11-17 Bruno Haible <address@hidden>
havelib: Fix a bug in dependency processing.
* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): During dependency processing
of .la files, don't overwrite the value of additional_libdir for the
next rounds.
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index 0ff1073..e9158f2 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 28
+# lib-link.m4 serial 29
dnl Copyright (C) 2001-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -525,19 +525,19 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
for dep in $dependency_libs; do
case "$dep" in
-L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and
$LTLIBNAME.
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $dependency_libdir to $LIBNAME and
$LTLIBNAME.
dnl But don't add it
dnl 1. if it's the standard /usr/lib,
dnl 2. if it's /usr/local/lib and we are using GCC on
Linux,
dnl 3. if it's already present in $LDFLAGS or the already
dnl constructed $LIBNAME,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
- && test "X$additional_libdir" !=
"X/usr/$acl_libdirstem2"; then
+ if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$dependency_libdir" !=
"X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" =
"X/usr/local/$acl_libdirstem" \
- || test "X$additional_libdir" =
"X/usr/local/$acl_libdirstem2"; then
+ if test "X$dependency_libdir" =
"X/usr/local/$acl_libdirstem" \
+ || test "X$dependency_libdir" =
"X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -548,29 +548,29 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
haveit=
for x in $LDFLAGS $LIB[]NAME; do
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
+ if test "X$x" = "X-L$dependency_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+
}-L$additional_libdir"
+ if test -d "$dependency_libdir"; then
+ dnl Really add $dependency_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+
}-L$dependency_libdir"
fi
fi
haveit=
for x in $LDFLAGS $LTLIB[]NAME; do
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
+ if test "X$x" = "X-L$dependency_libdir"; then
haveit=yes
break
fi
done
if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+
}-L$additional_libdir"
+ if test -d "$dependency_libdir"; then
+ dnl Really add $dependency_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+
}-L$dependency_libdir"
fi
fi
fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- havelib: fix a bug in dependency processing,
Bruno Haible <=