From: Maxim Mamontov Date: Thu, 16 Jun 2011 10:00:06 +0000 (+0300) Subject: Use CC and CXX on various checks in build script X-Git-Tag: 2.408-alpha~95 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/ceffe6cd00a822d29681a0d35d98fc8fb83aa73b Use CC and CXX on various checks in build script Explicit gcc/g++ calls replaced with $CC and $CXX --- diff --git a/projects/convertor/build b/projects/convertor/build index 954f1422..4108fbdd 100755 --- a/projects/convertor/build +++ b/projects/convertor/build @@ -84,28 +84,28 @@ else SHELL="/usr/local/bin/bash" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +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 -L/usr/lib/mysql -L/usr/local/lib/mysql build_check.c -o fake > /dev/null 2> /dev/null +$CC $CXXFLAGS $LDFLAGS -L/usr/lib/mysql -L/usr/local/lib/mysql build_check.c -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then echo "FAIL!" @@ -127,7 +127,7 @@ fi rm -f fake 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 @@ -144,7 +144,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 @@ -185,7 +185,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 diff --git a/projects/rlm_stg/build b/projects/rlm_stg/build index b01f41f5..81593334 100755 --- a/projects/rlm_stg/build +++ b/projects/rlm_stg/build @@ -89,28 +89,28 @@ else CXXFLAGS="$CXXFLAGS -DHAVE_CLOSEFROM" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +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!" diff --git a/projects/rscriptd/build b/projects/rscriptd/build index a91d70c8..88fcef0b 100755 --- a/projects/rscriptd/build +++ b/projects/rscriptd/build @@ -94,28 +94,28 @@ else SHELL="/usr/local/bin/bash" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +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!" diff --git a/projects/sgauth/build b/projects/sgauth/build index 7103cf30..81a897f9 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/build @@ -92,28 +92,28 @@ else SHELL="/usr/local/bin/bash" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +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!" diff --git a/projects/sgauthstress/build b/projects/sgauthstress/build index e9677028..c4f254d2 100755 --- a/projects/sgauthstress/build +++ b/projects/sgauthstress/build @@ -96,28 +96,28 @@ else SHELL="/usr/local/bin/bash" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +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!" @@ -140,7 +140,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 @@ -157,7 +157,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 @@ -198,7 +198,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 diff --git a/projects/sgconf/build b/projects/sgconf/build index 102b95ac..c0cb49b6 100755 --- a/projects/sgconf/build +++ b/projects/sgconf/build @@ -91,28 +91,28 @@ else SHELL="/usr/local/bin/bash" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +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!" @@ -135,7 +135,7 @@ rm -f fake echo -n "Checking for -lexpat... " echo "int main() { return 0; }" > build_check.c -gcc $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null +$CC $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_EXPAT=no diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index 660899d7..77924a9c 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -91,28 +91,28 @@ else SHELL="/usr/local/bin/bash" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +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!" @@ -135,7 +135,7 @@ rm -f fake echo -n "Checking for -lexpat... " echo "int main() { return 0; }" > build_check.c -gcc $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null +$CC $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_EXPAT=no diff --git a/projects/stargazer/build b/projects/stargazer/build index 1779160b..c2b171a4 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -158,28 +158,28 @@ else SHELL="/usr/local/bin/bash" fi -echo -n "Checking gcc... " -gcc --version > /dev/null 2> /dev/null +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 if [ $? != 0 ] then echo "FAIL!" @@ -202,7 +202,7 @@ rm -f fake echo -n "Checking for -lexpat... " echo "int main() { return 0; }" > build_check.c -gcc $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null +$CC $CXXFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_EXPAT=no @@ -214,7 +214,7 @@ fi rm -f fake 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 @@ -231,7 +231,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 @@ -272,7 +272,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 @@ -311,7 +311,7 @@ if [ $? != 0 ] then echo "no"; echo -n "Checking for -lxmlrpc... " - gcc $CXXFLAGS $LDFLAGS build_check.c -lxmlrpc $LIB_THREAD -o fake > /dev/null 2> /dev/null + $CC $CXXFLAGS $LDFLAGS build_check.c -lxmlrpc $LIB_THREAD -o fake > /dev/null 2> /dev/null if [ $? != 0 ] then CHECK_XMLRPC=no