CONFIGURE: Add option to compile with iconv.

This commit is contained in:
Jaromir Wysoglad 2019-07-25 22:32:51 +02:00 committed by Filippos Karapetis
parent 1a9fa34dc1
commit 965f894224

30
configure vendored
View File

@ -165,6 +165,7 @@ _taskbar=auto
_updates=no
_libunity=auto
_dialogs=auto
_iconv=auto
# Default option behavior yes/no
_debug_build=auto
_release_build=auto
@ -1139,6 +1140,9 @@ Optional Libraries:
--with-libcurl-prefix=DIR prefix where libcurl is installed (optional)
--disable-libcurl disable libcurl networking library [autodetect]
--with-iconv-prefix=DIR prefix where libiconv is installed (optional)
--disable-iconv disable libiconv encoding conversion library [autodetect]
Some influential environment variables:
AR archiver command
AS assembler command
@ -1270,6 +1274,8 @@ for ac_option in $@; do
--disable-eventrecorder) _eventrec=no ;;
--enable-text-console) _text_console=yes ;;
--disable-text-console) _text_console=no ;;
--enable-iconv) _iconv=yes ;;
--disable-iconv) _iconv=no ;;
--with-fluidsynth-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
FLUIDSYNTH_CFLAGS="-I$arg/include"
@ -1369,6 +1375,11 @@ for ac_option in $@; do
SDL_NET_CFLAGS="-I$arg/include"
SDL_NET_LIBS="-L$arg/lib"
;;
--with-iconv-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
ICONV_CFLAGS="-I$arg/include"
ICONV_LIBS="-L$arg/lib"
;;
--backend=*)
_backend=`echo $ac_option | cut -d '=' -f 2`
;;
@ -4206,6 +4217,25 @@ fi
define_in_config_if_yes "$_vorbis" 'USE_VORBIS'
echo "$_vorbis"
#
# Check for iconv
#
echocheck "Iconv"
if test "$_iconv" = auto ; then
_iconv=no
cat > $TMPC << EOF
#include <iconv.h>
int main(void) { iconv_t conv = iconv_open("UTF-8//IGNORE", "CP850"); return 0; }
EOF
cc_check $ICONV_CFLAGS $ICONV_LIBS -liconv && _iconv=yes
fi
if test "$_iconv" = yes ; then
append_var LIBS "$ICONV_LIBS -liconv"
append_var INCLUDES "$ICONV_CFLAGS"
fi
define_in_config_if_yes "$_iconv" 'USE_ICONV'
echo "$_iconv"
#
# Check for Tremor
#