Skip to content
Snippets Groups Projects
Commit e4c441bf authored by Sean McGovern's avatar Sean McGovern Committed by Jean-Baptiste Kempf
Browse files

contrib/libass: fix pkg-config file when libiconv is not present


Close #16625

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent a35f61f0
No related branches found
No related tags found
No related merge requests found
......@@ -11,9 +11,9 @@ diff --git a/configure.ac b/configure.ac
index d6fbe34..6bd96b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,8 +22,9 @@ AC_CHECK_HEADERS([stdint.h iconv.h])
@@ -22,8 +22,9 @@
AC_CHECK_FUNCS([strdup strndup])
# Checks for libraries.
-AC_SEARCH_LIBS([libiconv_open], [iconv], AC_DEFINE(CONFIG_ICONV, 1, [use iconv]))
-AC_SEARCH_LIBS([iconv_open], [iconv], AC_DEFINE(CONFIG_ICONV, 1, [use iconv]))
......@@ -21,15 +21,18 @@ index d6fbe34..6bd96b6 100644
+AC_SEARCH_LIBS([libiconv_open], [iconv], use_libiconv=true)
+AC_SEARCH_LIBS([iconv_open], [iconv], use_libiconv=true)
AC_CHECK_LIB([m], [fabs])
# Check for libraries via pkg-config
@@ -220,6 +221,10 @@ AM_CONDITIONAL([ENABLE_PROFILE], [test x$enable_profile = xyes])
@@ -214,6 +215,13 @@
# add libraries/packages to pkg-config for static linking
pkg_libs="-lm"
+if test "$use_libiconv" = true; then
+ AC_DEFINE(CONFIG_ICONV, 1, [use iconv])
+ pkg_libs="${pkg_libs} -liconv"
+ if test x$ac_cv_search_libiconv_open != x'none required' &&
+ test x$ac_cv_search_iconv_open != x'none required'; then
+ pkg_libs="${pkg_libs} -liconv"
+ fi
+fi
pkg_requires="freetype2 >= 9.10.3"
pkg_requires="fribidi >= 0.19.0, ${pkg_requires}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment