diff options
author | Oneric <oneric@oneric.stub> | 2020-11-05 23:29:05 +0100 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2020-11-14 01:34:54 +0200 |
commit | 4fbbd42bb823506d1d4a6808da169dceb994cc5d (patch) | |
tree | a3e4d6bd8f8c94219bc29beba3919c964ffb4fa8 | |
parent | fdc2d96fa58ec428d8715ab448261793f47f53cb (diff) | |
download | libass-4fbbd42bb823506d1d4a6808da169dceb994cc5d.tar.bz2 libass-4fbbd42bb823506d1d4a6808da169dceb994cc5d.tar.xz |
configure: Explain iconv-check logic
Commit 8bebabe4a62a6d54cdfecace59c382efa80a8e47 apparently added the
libiconv_open check to support libraries like GNU libiconv defining
their iconv-functions as a macro expanding to lib*. As this i not
immediately obvious, add an explaining comment.
Additionally AC_SEARCH_LIBS will first try to link the ptrogramm with
only the current $LIBS and not add anything to $LIBS if that already
succeeds, thus avoiding adding '-liconv' twice.
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e01a306..59a3d9c 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,10 @@ AC_ARG_ENABLE([large-tiles], AS_HELP_STRING([--enable-large-tiles], OLDLIBS="$LIBS" LIBS= use_libiconv=false +## 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 +## libiconv_open first. SEARCH_LIBS is smart enough to not add -liconv a second +## time in case both versions are defined in the local libiconv. AC_SEARCH_LIBS([libiconv_open], [iconv], use_libiconv=true) AC_SEARCH_LIBS([iconv_open], [iconv], use_libiconv=true) AS_IF([test "x$use_libiconv" = xtrue], [ |