diff options
author | Jaromir Wysoglad | 2019-08-25 01:57:03 +0200 |
---|---|---|
committer | David Turner | 2019-08-25 03:14:24 +0100 |
commit | e2ab8198a79a79a389db0debee9e774df6dc2ee4 (patch) | |
tree | 880049846330f7a1b5a6b074bc36fcc27e57d5fa /configure | |
parent | 96fef166938c3f1b77d849f2a2ec36a206dad058 (diff) | |
download | scummvm-rg350-e2ab8198a79a79a389db0debee9e774df6dc2ee4.tar.gz scummvm-rg350-e2ab8198a79a79a389db0debee9e774df6dc2ee4.tar.bz2 scummvm-rg350-e2ab8198a79a79a389db0debee9e774df6dc2ee4.zip |
CONFIGURE: Check if iconv uses const.
I looked at how ResidualVM works with iconv and used a define
ICONV_USES_CONST, which they define in configure, thinking it is
defined by iconv. I a define of this into configure, so this
should fix the build error on osx_intel.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -5240,6 +5240,20 @@ fi if test "$_iconv" = yes ; then append_var LIBS "$ICONV_LIBS -liconv" append_var INCLUDES "$ICONV_CFLAGS" + +# check if iconv uses const char** as it's second parameter + cat > $TMPC << EOF +#include <iconv.h> +int main(void) { + iconv_t conv = iconv_open("UTF-8//IGNORE", "CP850"); + const char **inbuf = 0; + iconv(conv, inbuf, 0, 0, 0); + return 0; +} +EOF + _iconv_uses_const=no + cc_check $ICONV_CFLAGS $ICONV_LIBS -liconv && _iconv_uses_const=yes + define_in_config_if_yes "$_iconv_uses_const" 'ICONV_USES_CONST' fi define_in_config_if_yes "$_iconv" 'USE_ICONV' echo "$_iconv" |