~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to BUILD/compile-dist

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2011-11-08 11:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20111108113113-3ulw01fvi4vn8m25
Tags: upstream-5.5.17
ImportĀ upstreamĀ versionĀ 5.5.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# Copyright (c) 2004-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
 
4
# Use is subject to license terms.
 
5
#
 
6
# This program is free software; you can redistribute it and/or modify
 
7
# it under the terms of the GNU General Public License as published by
 
8
# the Free Software Foundation; version 2 of the License.
 
9
#
 
10
# This program is distributed in the hope that it will be useful,
 
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
# GNU General Public License for more details.
 
14
#
 
15
# You should have received a copy of the GNU General Public License
 
16
# along with this program; if not, write to the Free Software
 
17
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
18
 
 
19
#
 
20
# This script's purpose is to update the automake/autoconf helper scripts and
 
21
# to run a plain "configure" without any special compile flags. Only features
 
22
# that affect the content of the source distribution are enabled. The resulting
 
23
# tree can then be picked up by "make dist" to create the "pristine source
 
24
# package" that is used as the basis for all other binary builds.
 
25
#
 
26
test -f Makefile && make maintainer-clean
 
27
 
 
28
path=`dirname $0`
 
29
. $path/autorun.sh
 
30
 
 
31
gmake=
 
32
for x in gmake gnumake make; do
 
33
  if $x --version 2>/dev/null | grep GNU > /dev/null; then
 
34
    gmake=$x
 
35
    break;
 
36
  fi
 
37
done
 
38
 
 
39
if [ -z "$gmake" ]; then
 
40
  # Our build may not depend on GNU make, but I wouldn't count on it
 
41
  echo "Please install GNU make, and ensure it is in your path as gnumake, gmake, or make" >&2
 
42
  exit 2
 
43
fi
 
44
 
 
45
# Default to gcc for CC and CXX
 
46
if test -z "$CXX" ; then
 
47
  export CXX
 
48
  CXX=gcc
 
49
  # Set some required compile options
 
50
  if test -z "$CXXFLAGS" ; then
 
51
    export CXXFLAGS
 
52
    CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti"
 
53
  fi
 
54
fi
 
55
 
 
56
if test -z "$CC" ; then
 
57
  export CC
 
58
  CC=gcc
 
59
fi
 
60
 
 
61
 
 
62
# Use ccache, if available
 
63
if ccache -V > /dev/null 2>&1
 
64
then
 
65
  if echo "$CC" | grep -v ccache > /dev/null
 
66
  then
 
67
    export CC
 
68
    CC="ccache $CC"
 
69
  fi
 
70
  if echo "$CXX" | grep -v ccache > /dev/null
 
71
  then
 
72
    export CXX
 
73
    CXX="ccache $CXX"
 
74
  fi
 
75
fi
 
76
 
 
77
# Make sure to enable all features that affect "make dist"
 
78
# Remember that configure restricts the man pages to the configured features !
 
79
./configure \
 
80
  --with-embedded-server \
 
81
  --with-perfschema \
 
82
  --with-ndbcluster
 
83
$gmake
 
84