compile-dist 1.63 KB
Newer Older
1 2 3 4 5 6 7 8
#!/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.
#
unknown's avatar
unknown committed
9
test -f Makefile && make distclean
10
(cd storage/bdb/dist && sh s_all)
unknown's avatar
unknown committed
11 12
(cd storage/innobase && aclocal && autoheader && \
    libtoolize --automake --force --copy && \
unknown's avatar
unknown committed
13
    automake --force --add-missing --copy && autoconf)
14 15 16 17 18 19 20 21 22
aclocal
autoheader
libtoolize --automake --force --copy
automake --force --add-missing --copy
autoconf

# Default to gcc for CC and CXX
if test -z "$CXX" ; then
  export CXX=gcc
23 24
  # Set some required compile options
  if test -z "$CXXFLAGS" ; then
unknown's avatar
unknown committed
25
    export CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti"
26
  fi
27 28 29 30 31 32
fi

if test -z "$CC" ; then
  export CC=gcc
fi

33

34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
# Use ccache, if available
if ccache -V > /dev/null 2>&1
then
  if ! (echo "$CC" | grep "ccache" > /dev/null)
  then
    export CC="ccache $CC"
  fi
  if ! (echo "$CXX" | grep "ccache" > /dev/null)
  then
    export CXX="ccache $CXX"
  fi
fi

# Make sure to enable all features that affect "make dist"
./configure \
  --with-embedded-server \
50 51 52 53 54
  --with-archive-storage-engine \
  --with-blackhole-storage-engine \
  --with-csv-storage-engine \
  --with-example-storage-engine \
  --with-federated-storage-engine \
55 56
  --with-berkeley-db \
  --with-innodb \
57
  --with-ssl \
58
  --enable-thread-safe-client \
59
  --with-extra-charsets=complex \
60 61
  --with-ndbcluster \
  --with-zlib-dir=bundled
62
make