summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOneric <oneric@oneric.stub>2020-11-21 21:33:33 +0100
committerOneric <oneric@oneric.stub>2021-02-22 15:18:49 +0100
commitb5719b821a88705aa27b2bba18e6aa7df2aaa483 (patch)
tree0192ecd0293ec20b9b2b0f72e971361c505b0d76
parentc9c4fed39339ffde45123013a117e06d0bb9c488 (diff)
downloadlibass-b5719b821a88705aa27b2bba18e6aa7df2aaa483.tar.bz2
libass-b5719b821a88705aa27b2bba18e6aa7df2aaa483.tar.xz
configure: respect user-LIBS while locating system libs
This allows to eg supply an alternative math library via LIBS="-lmymath" ./configure (in case the system has a seperate libm) This also means user-supplied LIBS now end up in our pc's Libs.private, which is probably correct for most cases. In case this assumptions turns out to be wrong and your reading this after bisecting some obscure error, well sorry about that. To exclude user-LIBS from pkg_libs again, eg save OLDLIBS="$LIBS" before and then set pkg_libs="${LIBS#$OLDLIBS}" after locating system libs.
-rw-r--r--configure.ac5
1 files changed, 1 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 9639112..82ce401 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,9 +40,7 @@ AC_ARG_ENABLE([large-tiles], AS_HELP_STRING([--enable-large-tiles],
[use larger tiles in the rasterizer (better performance, slightly worse quality) @<:@default=disabled@:>@]))
# Checks for available libraries and define corresponding C Macros
-# and add packages to pkg-config for static linking
-OLDLIBS="$LIBS"
-LIBS=
+# Start with system libs, then check everything else via pkg-config
AS_IF([test "x$ac_cv_header_iconv_h" = xyes], [
## Some iconv libraries like GNU's libiconv define iconv_open as a macro to
## libiconv_open. As SEARCH_LIBS tests linking not compilation, check for
@@ -67,7 +65,6 @@ AC_SEARCH_LIBS([lrint], [m], [
AC_MSG_ERROR([Unable to locate math functions!])
])
pkg_libs="$LIBS"
-LIBS="$OLDLIBS $LIBS"
## Check for libraries via pkg-config
PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 9.10.3], [