summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-22 08:30:14 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-22 08:30:14 -0300
commit5f9de42e26f9a97eca87227ea5315ea7d20c51c3 (patch)
treef99f25db87bc3ef8c3092fb325bdaa12f5d9c476 /BUILD
parent2857a84985a2fa1aa994fd2e6473a2b191f10841 (diff)
downloadmariadb-git-5f9de42e26f9a97eca87227ea5315ea7d20c51c3.tar.gz
Do not generate autotools configuration scripts when cmake is to be used.
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD/FINISH.sh1
-rw-r--r--BUILD/Makefile.am2
-rwxr-xr-xBUILD/autorun.sh36
-rw-r--r--BUILD/cmake_configure.sh (renamed from BUILD/choose_configure.sh)0
4 files changed, 23 insertions, 16 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh
index 142ff7eb08e..b7f7a1db77e 100644
--- a/BUILD/FINISH.sh
+++ b/BUILD/FINISH.sh
@@ -6,6 +6,7 @@ configure="./configure $base_configs $extra_configs"
commands="\
$make -k maintainer-clean || true
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
+/bin/rm -rf CMakeCache.txt CMakeFiles/
path=`dirname $0`
. \"$path/autorun.sh\""
diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am
index c7bf813c9fe..c5732d43fbf 100644
--- a/BUILD/Makefile.am
+++ b/BUILD/Makefile.am
@@ -20,7 +20,7 @@
EXTRA_DIST = FINISH.sh \
SETUP.sh \
autorun.sh \
- choose_configure.sh \
+ cmake_configure.sh \
build_mccge.sh \
check-cpu \
cleanup \
diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh
index f45b1f7d08c..9fdd0486360 100755
--- a/BUILD/autorun.sh
+++ b/BUILD/autorun.sh
@@ -21,18 +21,24 @@ done
IFS="$save_ifs"
rm -rf configure
-aclocal || die "Can't execute aclocal"
-autoheader || die "Can't execute autoheader"
-# --force means overwrite ltmain.sh script if it already exists
-$LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
-
-# --add-missing instructs automake to install missing auxiliary files
-# and --force to overwrite them if they already exist
-automake --add-missing --force --copy || die "Can't execute automake"
-autoconf || die "Can't execute autoconf"
-# Do not use autotools generated configure directly. Instead, use a script
-# that will either call CMake or original configure shell script at build
-# time (CMake is preferred if installed).
-mv configure configure.am
-cp BUILD/choose_configure.sh configure
-chmod a+x configure
+
+# Ensure that cmake and perl are available. Required for cmake based builds.
+cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
+perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
+
+# Whether to use the autotools configuration script or cmake.
+if test "$HAVE_CMAKE" = "no"
+then
+ aclocal || die "Can't execute aclocal"
+ autoheader || die "Can't execute autoheader"
+ # --force means overwrite ltmain.sh script if it already exists
+ $LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
+ # --add-missing instructs automake to install missing auxiliary files
+ # and --force to overwrite them if they already exist
+ automake --add-missing --force --copy || die "Can't execute automake"
+ autoconf || die "Can't execute autoconf"
+else
+ path=`dirname $0`
+ cp $path/cmake_configure.sh $path/../configure
+ chmod +x $path/../configure
+fi
diff --git a/BUILD/choose_configure.sh b/BUILD/cmake_configure.sh
index 80423205274..80423205274 100644
--- a/BUILD/choose_configure.sh
+++ b/BUILD/cmake_configure.sh