Commit b5c8757a authored by Davi Arnaut's avatar Davi Arnaut

Revert revision which disabled the generating of configuration

scripts if cmake is available. We need to always generate the
scripts in order for the dual cmake/autotools support to work.
parent d285d75d
...@@ -21,24 +21,18 @@ done ...@@ -21,24 +21,18 @@ done
IFS="$save_ifs" IFS="$save_ifs"
rm -rf configure 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"
# Ensure that cmake and perl are available. Required for cmake based builds. # --add-missing instructs automake to install missing auxiliary files
cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no # and --force to overwrite them if they already exist
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no automake --add-missing --force --copy || die "Can't execute automake"
autoconf || die "Can't execute autoconf"
# Whether to use the autotools configuration script or cmake. # Do not use autotools generated configure directly. Instead, use a script
if test "$HAVE_CMAKE" = "no" # that will either call CMake or original configure shell script at build
then # time (CMake is preferred if installed).
aclocal || die "Can't execute aclocal" mv configure configure.am
autoheader || die "Can't execute autoheader" cp BUILD/cmake_configure.sh configure
# --force means overwrite ltmain.sh script if it already exists chmod a+x configure
$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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment