]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Only add "iconv" to the .pc file if needed (#1825)
authorPeter Pentchev <roam@ringlet.net>
Wed, 28 Dec 2022 22:04:40 +0000 (00:04 +0200)
committerGitHub <noreply@github.com>
Wed, 28 Dec 2022 22:04:40 +0000 (23:04 +0100)
Hi,

Thanks for writing and maintaining libarchive!

What do you think about this trivial change that does not add "iconv" to
the pkg-config file's list of required packages unless it is actually
needed? On at least Debian GNU/Linux systems, the iconv(3) function is
part of the system C library and there is no Debian package that
installs an iconv.pc file, so I had to make this change to the Debian
package of libarchive.

Thanks again, and keep up the great work!

G'luck,
Peter

configure.ac

index 99bff20d1ca355b7d09af67285a3a6d2aed2cd18..e2715cfdefaafe200f88dcedf56ea5119b760216 100644 (file)
@@ -378,7 +378,9 @@ if test "x$with_iconv" != "xno"; then
     AC_CHECK_HEADERS([localcharset.h])
     am_save_LIBS="$LIBS"
     LIBS="${LIBS} ${LIBICONV}"
-    LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv"
+    if test -n "$LIBICONV"; then
+      LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv"
+    fi
     AC_CHECK_FUNCS([locale_charset])
     LIBS="${am_save_LIBS}"
     if test "x$ac_cv_func_locale_charset" != "xyes"; then