2004-12-31 12:46:18 +01:00
|
|
|
#!/bin/sh
|
2011-06-30 17:37:13 +02:00
|
|
|
# Copyright (c) 2004-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
2011-06-30 17:31:31 +02:00
|
|
|
# Use is subject to license terms.
|
2010-12-28 19:57:23 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2019-05-11 20:29:06 +02:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
2010-12-28 19:57:23 +01:00
|
|
|
|
2004-12-31 12:46:18 +01:00
|
|
|
#
|
|
|
|
# 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
|
2011-02-23 13:46:16 +01:00
|
|
|
CXX=g++
|
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
|
2019-06-01 12:34:57 +02:00
|
|
|
CXXFLAGS="-felide-constructors -fno-exceptions"
|
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 \
|
2010-01-12 02:47:27 +01:00
|
|
|
--with-perfschema \
|
2014-08-21 18:11:46 +02:00
|
|
|
--with-plugins=max
|
2009-05-06 14:03:24 +02:00
|
|
|
$gmake -j4
|