diff options
author | Oneric <oneric@oneric.stub> | 2020-11-05 23:29:05 +0100 |
---|---|---|
committer | Oneric <oneric@oneric.stub> | 2020-11-13 22:14:51 +0100 |
commit | 1fd8aea8806b6e2f3557c437b7249a211f5ea9a9 (patch) | |
tree | a9fabdeb63623d68b92a1870f05d601612d8209e /configure.ac | |
parent | 15041348e5add2677afd5495c00a805f3972cef7 (diff) | |
download | libass-1fd8aea8806b6e2f3557c437b7249a211f5ea9a9.tar.bz2 libass-1fd8aea8806b6e2f3557c437b7249a211f5ea9a9.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.
Diffstat (limited to 'configure.ac')
-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], [ |