From: Maxim Mamontov Date: Wed, 6 Apr 2011 14:23:45 +0000 (+0300) Subject: Add compiler existance checking X-Git-Tag: 2.407-rc3~70 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/463995e9899beaf6fa381d68d8050b2c449142ff?ds=inline;hp=c29f0fb663a3cef00fd918d67cd1f222fdcb701e Add compiler existance checking --- diff --git a/projects/convertor/build b/projects/convertor/build index 491cf81c..0ffb2b8b 100755 --- a/projects/convertor/build +++ b/projects/convertor/build @@ -83,6 +83,25 @@ else SHELL="/usr/local/bin/bash" fi +echo -n "Checking gcc... " +gcc --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "gcc not found" + exit; +fi +echo "found" +echo -n "Checking g++... " +g++ --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "g++ 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 diff --git a/projects/rlm_stg/build b/projects/rlm_stg/build index 8f45a87b..1405d47e 100755 --- a/projects/rlm_stg/build +++ b/projects/rlm_stg/build @@ -87,6 +87,25 @@ else CXXFLAGS="$CXXFLAGS -DHAVE_CLOSEFROM" fi +echo -n "Checking gcc... " +gcc --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "gcc not found" + exit; +fi +echo "found" +echo -n "Checking g++... " +g++ --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "g++ 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 diff --git a/projects/rscriptd/build b/projects/rscriptd/build index 53916ebf..173e3afc 100755 --- a/projects/rscriptd/build +++ b/projects/rscriptd/build @@ -94,6 +94,25 @@ else SHELL="/usr/local/bin/bash" fi +echo -n "Checking gcc... " +gcc --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "gcc not found" + exit; +fi +echo "found" +echo -n "Checking g++... " +g++ --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "g++ 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 diff --git a/projects/sgauth/build b/projects/sgauth/build index eef6026f..6dc0acc5 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/build @@ -93,6 +93,25 @@ else SHELL="/usr/local/bin/bash" fi +echo -n "Checking gcc... " +gcc --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "gcc not found" + exit; +fi +echo "found" +echo -n "Checking g++... " +g++ --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "g++ 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 diff --git a/projects/sgconf/build b/projects/sgconf/build index 434d6b03..4958f06a 100755 --- a/projects/sgconf/build +++ b/projects/sgconf/build @@ -90,6 +90,25 @@ else SHELL="/usr/local/bin/bash" fi +echo -n "Checking gcc... " +gcc --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "gcc not found" + exit; +fi +echo "found" +echo -n "Checking g++... " +g++ --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "g++ 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 diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build index ae08b781..76985b16 100755 --- a/projects/sgconf_xml/build +++ b/projects/sgconf_xml/build @@ -90,6 +90,25 @@ else SHELL="/usr/local/bin/bash" fi +echo -n "Checking gcc... " +gcc --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "gcc not found" + exit; +fi +echo "found" +echo -n "Checking g++... " +g++ --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "g++ 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 diff --git a/projects/stargazer/build b/projects/stargazer/build index 129c0966..36f2f733 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -158,6 +158,25 @@ else SHELL="/usr/local/bin/bash" fi +echo -n "Checking gcc... " +gcc --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "gcc not found" + exit; +fi +echo "found" +echo -n "Checking g++... " +g++ --version > /dev/null 2> /dev/null +if [ $? != 0 ] +then + echo "FAIL!" + echo "g++ 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