Commit f5ec8100 authored by Joerg Bruehe's avatar Joerg Bruehe

Merge the bashism removal from 5.0 up to 5.1-build

parents 3ceb849f a94bfcf7
...@@ -11,16 +11,33 @@ test -f Makefile && make maintainer-clean ...@@ -11,16 +11,33 @@ test -f Makefile && make maintainer-clean
path=`dirname $0` path=`dirname $0`
. $path/autorun.sh . $path/autorun.sh
gmake=
for x in gmake gnumake make; do
if $x --version 2>/dev/null | grep GNU > /dev/null; then
gmake=$x
break;
fi
done
if [ -z "$gmake" ]; then
# Our build may not depend on GNU make, but I wouldn't count on it
echo "Please install GNU make, and ensure it is in your path as gnumake, gmake, or make" >&2
exit 2
fi
# Default to gcc for CC and CXX # Default to gcc for CC and CXX
if test -z "$CXX" ; then if test -z "$CXX" ; then
export CXX
CXX=gcc CXX=gcc
# Set some required compile options # Set some required compile options
if test -z "$CXXFLAGS" ; then if test -z "$CXXFLAGS" ; then
export CXXFLAGS
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti"
fi fi
fi fi
if test -z "$CC" ; then if test -z "$CC" ; then
export CC
CC=gcc CC=gcc
fi fi
...@@ -28,36 +45,22 @@ fi ...@@ -28,36 +45,22 @@ fi
# Use ccache, if available # Use ccache, if available
if ccache -V > /dev/null 2>&1 if ccache -V > /dev/null 2>&1
then then
if echo "$CC" | grep "ccache" > /dev/null if echo "$CC" | grep -v ccache > /dev/null
then then
: export CC
else
CC="ccache $CC" CC="ccache $CC"
fi fi
if echo "$CXX" | grep "ccache" > /dev/null if echo "$CXX" | grep -v ccache > /dev/null
then then
: export CXX
else
CXX="ccache $CXX" CXX="ccache $CXX"
fi fi
fi fi
if test -z "$MAKE"
then
if gmake -v > /dev/null 2>&1
then
MAKE="gmake"
else
MAKE="make"
fi
fi
export CC CXX MAKE
# Make sure to enable all features that affect "make dist" # Make sure to enable all features that affect "make dist"
# Remember that configure restricts the man pages to the configured features ! # Remember that configure restricts the man pages to the configured features !
./configure \ ./configure \
--with-embedded-server \ --with-embedded-server \
--with-ndbcluster --with-ndbcluster
$MAKE $gmake
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment