[libxml2] Fix detection of GNU libiconv
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix detection of GNU libiconv
- Date: Sun, 4 Sep 2022 21:03:38 +0000 (UTC)
commit 5d32b12645667592a70021539dd5393bc426557b
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sun Sep 4 22:05:16 2022 +0200
Fix detection of GNU libiconv
GNU libiconv prefixes symbols with "lib".
configure.ac | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index de4cf61d..82638d6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1075,11 +1075,15 @@ else
WITH_ICONV=1
if test "$ac_cv_search_iconv" != "none required"; then
ICONV_LIBS=$ac_cv_search_iconv
- fi
- if test "$ICONV_DIR" != ""; then
- ICONV_CFLAGS="-I$ICONV_DIR/include"
- ICONV_LIBS="-L$ICONV_DIR/libs $ICONV_LIBS"
- fi])])
+ fi], [
+ dnl GNU libiconv prefixes symbols with "lib"
+ AC_CHECK_LIB([iconv], [libiconv], [
+ WITH_ICONV=1
+ ICONV_LIBS="-liconv"])])])
+ if test "$WITH_ICONV" = "1" && test "$ICONV_DIR" != ""; then
+ ICONV_CFLAGS="-I$ICONV_DIR/include"
+ ICONV_LIBS="-L$ICONV_DIR/libs $ICONV_LIBS"
+ fi
CPPFLAGS=$_cppflags
LIBS=$_libs
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]