X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/40ec7c02603812a6b65d648e7bded4f8c088cb0e..63f3a66069c0d87abd7c3f713299591df66dac7e:/projects/sgauthstress/build?ds=inline diff --git a/projects/sgauthstress/build b/projects/sgauthstress/build index af3d4639..98239ea1 100755 --- a/projects/sgauthstress/build +++ b/projects/sgauthstress/build @@ -24,7 +24,7 @@ else then DEFS="-DDEBUG" MAKEOPTS="-j1" - CXXFLAGS="$CXXFLAGS -g3 -W -Wall" + CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall" else MAKEOPTS="-j1" fi @@ -70,8 +70,7 @@ STG_LIBS="logger.lib crypto.lib common.lib conffiles.lib - dotconfpp.lib - ia.lib" + dotconfpp.lib" PLUGINS="store/files" @@ -97,28 +96,38 @@ else SHELL="/usr/local/bin/bash" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +if [ -z "$CC" ] +then + CC=gcc +fi + +if [ -z "$CXX" ] +then + CXX=g++ +fi + +echo -n "Checking CC... " +$CC --version > /dev/null 2> /dev/null if [ $? != 0 ] then echo "FAIL!" - echo "gcc not found" + echo "$CC not found" exit; fi echo "found" -echo -n "Checking g++... " -g++ --version > /dev/null 2> /dev/null +echo -n "Checking CXX... " +$CXX --version > /dev/null 2> /dev/null if [ $? != 0 ] then echo "FAIL!" - echo "g++ not found" + echo "$CXX not found" exit; fi echo "found" echo -n "Checking endianess... " echo "int main() { int probe = 0x00000001; return *(char *)&probe; }" > build_check.c -gcc $CXXFLAGS $LDFLAGS build_check.c -o fake > /dev/null 2> /dev/null +$CC $CXXFLAGS $LDFLAGS build_check.c -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then echo "FAIL!" @@ -141,7 +150,7 @@ rm -f fake rm -f build_check.c echo -n "Checking for -lfbclient... " -gcc $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null +$CC $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_FBCLIENT=no @@ -158,7 +167,7 @@ if [ $? != 0 ] then echo "no"; echo -n "Checking for -lmysqlclient... " - gcc $CXXFLAGS $LDFLAGS build_check.c -lmysqlclient_r $LIB_THREAD -o fake > /dev/null 2> /dev/null + $CC $CXXFLAGS $LDFLAGS build_check.c -lmysqlclient_r $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_MYSQLCLIENT=no @@ -199,7 +208,7 @@ if [ $? != 0 ] then echo "no"; echo -n "Checking for -lpq... " - gcc $CXXFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null + $CC $CXXFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_PQ=no @@ -279,6 +288,7 @@ echo "" >> $CONFFILE echo "LIB_THREAD=$LIB_THREAD" >> $CONFFILE echo "SHELL=$SHELL" >> $CONFFILE echo "CXXFLAGS=$CXXFLAGS" >> $CONFFILE +echo "CFLAGS=$CXXFLAGS" >> $CONFFILE echo "LDFLAGS=$LDFLAGS" >> $CONFFILE echo "PREFIX=$PREFIX" >> $CONFFILE echo "BIN_MODE=$BIN_MODE" >> $CONFFILE