From 463995e9899beaf6fa381d68d8050b2c449142ff Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 6 Apr 2011 17:23:45 +0300 Subject: [PATCH] Add compiler existance checking --- projects/convertor/build | 19 +++++++++++++++++++ projects/rlm_stg/build | 19 +++++++++++++++++++ projects/rscriptd/build | 19 +++++++++++++++++++ projects/sgauth/build | 19 +++++++++++++++++++ projects/sgconf/build | 19 +++++++++++++++++++ projects/sgconf_xml/build | 19 +++++++++++++++++++ projects/stargazer/build | 19 +++++++++++++++++++ 7 files changed, 133 insertions(+) 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 -- 2.44.2