also add include parameter for checking iconv library, or libc and gnulibiconv might get mixed

This commit is contained in:
Riccardo Mottola 2021-11-16 01:23:57 +01:00
parent 0af2c6de72
commit 0bc09a8a73
2 changed files with 23 additions and 0 deletions

15
configure vendored
View file

@ -815,6 +815,7 @@ with_ffi_include
with_ffi_library
enable_iconv
with_libiconv_library
with_libiconv_include
enable_stricticonv
enable_xml
with_xml_prefix
@ -1582,6 +1583,7 @@ Optional Packages:
--with-ffi-include=PATH Include path for ffi headers
--with-ffi-library=PATH Library path for ffi libs
--with-libiconv-library=PATH Library path for libiconv libraries
--with-libiconv-include=PATH Include path for libiconv header
--with-xml-prefix=PFX Prefix where libxml is installed (optional)
--with-tls-prefix=PFX Prefix where libgnutls is installed (optional)
--with-zeroconf-api=API force use of a specific zeroconf API (mdns or avahi)
@ -11531,6 +11533,19 @@ esac
fi
# Check whether --with-libiconv-include was given.
if test "${with_libiconv_include+set}" = set; then :
withval=$with_libiconv_include; libiconv_incdir="$withval"
else
libiconv_incdir="no"
fi
if test ${libiconv_incdir} != "no"; then
CPPFLAGS="$CPPFLAGS -I${libiconv_incdir}"
INCLUDE_FLAGS="$INCLUDE_FLAGS -I${libiconv_incdir}"
fi
old_LIBS="$LIBS"
LIBS="-liconv $LIBS"
if test "$cross_compiling" = yes; then :

View file

@ -3169,6 +3169,14 @@ if test $found_iconv = no ; then
GS_ADD_LIBRARY_PATH([${libiconv_libdir}])
fi
AC_ARG_WITH(libiconv-include,
[ --with-libiconv-include=PATH Include path for libiconv header],
libiconv_incdir="$withval", libiconv_incdir="no")
if test ${libiconv_incdir} != "no"; then
CPPFLAGS="$CPPFLAGS -I${libiconv_incdir}"
INCLUDE_FLAGS="$INCLUDE_FLAGS -I${libiconv_incdir}"
fi
old_LIBS="$LIBS"
LIBS="-liconv $LIBS"
AC_RUN_IFELSE([AC_LANG_SOURCE([#include <iconv.h>