X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1c968d8837455da142953ea7c96ca09a5c9e341f..19cfbaf7704434842ed81ebcaa50028376f4bd6e:/projects/sgconf_xml/build diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index 7b83359b..10de5f00 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -159,6 +159,19 @@ else printf "yes\n" fi rm -f fake + +printf "Checking for iconv 2nd argument... " +printf "#include \nint main(){ const char** src = 0; iconv(0, src, 0, 0, 0); }\n" > build_check.c +$CXX $CXXFLAGS $LDFLAGS -Werror build_check.c -o fake > /dev/null 2> /dev/null +if [ $? != 0 ] +then + DEFS="$DEFS -DCONST_ICONV" + printf "non-const\n" +else + printf "const\n" +fi +rm -f fake + rm -f build_check.c if [ "$CHECK_EXPAT" != "yes" ]