[vlc-devel] [PATCH] contrib/libass: fix pkg-config file when libiconv is not present

Sean McGovern gseanmcg at gmail.com
Mon Feb 15 01:12:02 CET 2016


---
 contrib/src/ass/e572a26.patch |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/contrib/src/ass/e572a26.patch b/contrib/src/ass/e572a26.patch
index 9c0f8bb..82fa4fc 100644
--- a/contrib/src/ass/e572a26.patch
+++ b/contrib/src/ass/e572a26.patch
@@ -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}"
-- 
1.7.9.2



More information about the vlc-devel mailing list