X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/19cfbaf7704434842ed81ebcaa50028376f4bd6e..ce4f87b0803d81e413699ffe65d5dbf4eec9d64c:/projects/libs/build?ds=sidebyside diff --git a/projects/libs/build b/projects/libs/build index 9b23d546..bc615505 100755 --- a/projects/libs/build +++ b/projects/libs/build @@ -95,6 +95,7 @@ if [ "$OS" = "linux" ] then DEFS="$DEFS -DLINUX" else + LIBICONV="-liconv" if [ "$OS" = "bsd" ] then DEFS="$DEFS -DFREE_BSD" @@ -106,6 +107,7 @@ else if [ "$OS" == "darwin" ] then DEFS="$DEFS -DDARWIN" + LIBICONV="" fi fi fi @@ -167,7 +169,7 @@ rm -f fake printf "Checking for -lexpat... " printf "#include \nint main() { return 0; }\n" > build_check.c -$CXX $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null +$CC $CFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_EXPAT=no @@ -180,7 +182,7 @@ 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 +$CC $CFLAGS $LDFLAGS -Werror build_check.c $LIBICONV -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then printf "non-const\n" @@ -197,7 +199,7 @@ then printf "no\n" printf "Checking for -lfbclient... " printf "int main() { return 0; }\n" > build_check.c - $CXX $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null + $CC $CFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_FBCLIENT=no @@ -273,6 +275,7 @@ printf "CXX=$CXX\n" >> $CONFFILE printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE printf "CFLAGS=$CFLAGS\n" >> $CONFFILE printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE +printf "LIBICONV=$LIBICONV\n" >> $CONFFILE printf "PREFIX=$PREFIX\n" >> $CONFFILE printf "BIN_MODE=$BIN_MODE\n" >> $CONFFILE printf "DATA_MODE=$DATA_MODE\n" >> $CONFFILE