Commit a766c242 authored by David Zeuthen's avatar David Zeuthen

build system fixes and refuse to install if built with --enable-tests

parent 4b340f87
......@@ -40,6 +40,12 @@ check-coverage:
@echo "Need to reconfigure with --enable-gcov"
endif
if POLKIT_BUILD_TESTS
install:
@echo "Cowardly refusing to install with --enable-tests."
@exit 1
endif
EXTRA_DIST = \
HACKING \
mkinstalldirs \
......
......@@ -7,14 +7,14 @@ test -z "$srcdir" && srcdir=.
DIE=0
(test -f $srcdir/configure.in) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo -n "**Error**: Directory $srcdir does not look like the"
echo " top-level package directory"
exit 1
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed."
echo "**Error**: You must have autoconf installed."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
......@@ -23,7 +23,7 @@ DIE=0
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed."
echo "**Error**: You must have libtool installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
......@@ -31,7 +31,7 @@ DIE=0
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed."
echo "**Error**: You must have automake installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
NO_AUTOMAKE=yes
......@@ -41,7 +41,7 @@ DIE=0
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "**Error**: Missing aclocal. The version of automake"
echo "installed doesn't appear recent enough."
echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
DIE=1
......@@ -52,9 +52,9 @@ if test "$DIE" -eq 1; then
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "**Warning**: I am going to run configure with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo $0 " command line."
echo
fi
......@@ -77,8 +77,8 @@ esac
echo "Running autoheader..."
autoheader
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt
echo "Running automake --gnu -Wno-portability $am_opt ..."
automake --add-missing --gnu -Wno-portability $am_opt
echo "Running autoconf ..."
autoconf
......@@ -87,9 +87,9 @@ intltoolize --copy --force --automake || exit 1
conf_flags="--enable-maintainer-mode --enable-gtk-doc"
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
echo "Running $srcdir/configure $conf_flags $@ ..."
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile. || exit 1
&& echo "Now type make to compile." || exit 1
else
echo Skipping configure process.
echo "Skipping configure process."
fi
......@@ -42,6 +42,9 @@ if test x$enable_tests = xyes; then
fi
if test x$enable_gcov = xyes; then
if test x$enable_tests = xno; then
AC_ERROR([It only makes sense to use gcov if tests are enabled.])
fi
## so that config.h changes when you toggle gcov support
AC_DEFINE_UNQUOTED(KIT_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
AC_DEFINE_UNQUOTED(POLKIT_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
......@@ -511,7 +514,7 @@ echo "
if test x$enable_tests = xyes; then
echo "NOTE: Building with unit tests increases the size of the installed "
echo " library and may render it insecure."
echo " library and renders it insecure."
echo
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