2004-12-31 12:46:18 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# This script's purpose is to update the automake/autoconf helper scripts and
|
|
|
|
# to run a plain "configure" without any special compile flags. Only features
|
|
|
|
# that affect the content of the source distribution are enabled. The resulting
|
|
|
|
# tree can then be picked up by "make dist" to create the "pristine source
|
|
|
|
# package" that is used as the basis for all other binary builds.
|
|
|
|
#
|
2007-01-28 21:09:54 +01:00
|
|
|
test -f Makefile && make maintainer-clean
|
2007-10-29 20:12:44 +01:00
|
|
|
|
|
|
|
path=`dirname $0`
|
|
|
|
. $path/autorun.sh
|
2004-12-31 12:46:18 +01:00
|
|
|
|
2008-12-03 05:11:48 +01:00
|
|
|
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
|
|
|
|
|
2004-12-31 12:46:18 +01:00
|
|
|
# Default to gcc for CC and CXX
|
|
|
|
if test -z "$CXX" ; then
|
2008-12-03 05:11:48 +01:00
|
|
|
export CXX
|
2008-10-11 20:28:13 +02:00
|
|
|
CXX=gcc
|
2005-05-07 00:53:36 +02:00
|
|
|
# Set some required compile options
|
|
|
|
if test -z "$CXXFLAGS" ; then
|
2008-12-03 05:11:48 +01:00
|
|
|
export CXXFLAGS
|
2008-10-11 20:28:13 +02:00
|
|
|
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti"
|
2005-05-07 00:53:36 +02:00
|
|
|
fi
|
2004-12-31 12:46:18 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$CC" ; then
|
2008-12-03 05:11:48 +01:00
|
|
|
export CC
|
2008-10-11 20:28:13 +02:00
|
|
|
CC=gcc
|
2004-12-31 12:46:18 +01:00
|
|
|
fi
|
|
|
|
|
2005-05-07 00:53:36 +02:00
|
|
|
|
2004-12-31 12:46:18 +01:00
|
|
|
# Use ccache, if available
|
|
|
|
if ccache -V > /dev/null 2>&1
|
|
|
|
then
|
2008-12-03 05:11:48 +01:00
|
|
|
if echo "$CC" | grep -v ccache > /dev/null
|
2004-12-31 12:46:18 +01:00
|
|
|
then
|
2008-12-03 05:11:48 +01:00
|
|
|
export CC
|
2008-10-11 20:28:13 +02:00
|
|
|
CC="ccache $CC"
|
2004-12-31 12:46:18 +01:00
|
|
|
fi
|
2008-12-03 05:11:48 +01:00
|
|
|
if echo "$CXX" | grep -v ccache > /dev/null
|
2004-12-31 12:46:18 +01:00
|
|
|
then
|
2008-12-03 05:11:48 +01:00
|
|
|
export CXX
|
2008-10-11 20:28:13 +02:00
|
|
|
CXX="ccache $CXX"
|
2004-12-31 12:46:18 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Make sure to enable all features that affect "make dist"
|
2008-01-29 21:32:43 +01:00
|
|
|
# Remember that configure restricts the man pages to the configured features !
|
2004-12-31 12:46:18 +01:00
|
|
|
./configure \
|
2008-01-29 21:32:43 +01:00
|
|
|
--with-embedded-server \
|
2007-09-26 18:47:55 +02:00
|
|
|
--with-ndbcluster
|
2008-12-03 05:11:48 +01:00
|
|
|
$gmake
|
2008-10-11 20:28:13 +02:00
|
|
|
|