X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/02a231ed70f2116c607b831c6a48b3490bd9a804..19cfbaf7704434842ed81ebcaa50028376f4bd6e:/projects/sgconv/build diff --git a/projects/sgconv/build b/projects/sgconv/build index d158d320..2d6ce471 100755 --- a/projects/sgconv/build +++ b/projects/sgconv/build @@ -160,6 +160,18 @@ else 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 + printf "non-const\n" +else + DEFS="$DEFS -DCONST_ICONV" + printf "const\n" +fi +rm -f fake + printf "Checking for fb_config... " FB_VERSION=`fb_config --version 2> /dev/null` if [ "$?" != "0" ] @@ -345,6 +357,8 @@ do printf "$plugin " >> $CONFFILE done printf "\n" >> $CONFFILE +printf "CC=$CC\n" >> $CONFFILE +printf "CXX=$CXX\n" >> $CONFFILE printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE printf "CFLAGS=$CFLAGS\n" >> $CONFFILE printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE