libvirt/bootstrap.conf

202 lines
5.9 KiB
Plaintext
Raw Normal View History

# Bootstrap configuration.
# Copyright (C) 2010-2014 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
# gnulib modules used by this package.
# NB the GSocket conversion is non-trivial due to the
# different FD vs HANDLE usage in gnulib vs glib. Need
# to find a way to duplicate a socket HANDLE before
# turning it into a FD, since closing an FD also closes
# the original HANDLE.
# -> GSocket
gnulib_modules="$gnulib_modules accept"
# -> GSocket
gnulib_modules="$gnulib_modules bind"
# -> conditional build to avoid Win32
gnulib_modules="$gnulib_modules chown"
# -> GSocket
gnulib_modules="$gnulib_modules close"
# -> GSocket
gnulib_modules="$gnulib_modules connect"
# -> Meson
gnulib_modules="$gnulib_modules configmake"
# -> eliminate usage in some manner
gnulib_modules="$gnulib_modules environ"
# -> GSocket
gnulib_modules="$gnulib_modules fcntl"
# -> conditional build avoid win32
gnulib_modules="$gnulib_modules fcntl-h"
# -> GSocket
gnulib_modules="$gnulib_modules getaddrinfo"
# -> copy gnuliub win32 impl
gnulib_modules="$gnulib_modules getpass"
# -> GSocket
gnulib_modules="$gnulib_modules getpeername"
# -> GSocket
gnulib_modules="$gnulib_modules getsockname"
# -> copy gnulib STRBUFLEN macro
gnulib_modules="$gnulib_modules intprops"
# -> GSocket
gnulib_modules="$gnulib_modules ioctl"
# -> Meson
gnulib_modules="$gnulib_modules largefile"
# -> GSocket
gnulib_modules="$gnulib_modules listen"
# -> custom configure check
gnulib_modules="$gnulib_modules localeconv"
# -> Meson
gnulib_modules="$gnulib_modules manywarnings"
# -> painful copy gnulib
gnulib_modules="$gnulib_modules mgetgroups"
# -> GSocket
gnulib_modules="$gnulib_modules net_if"
# -> GSocket
gnulib_modules="$gnulib_modules netdb"
# -> GSocket
gnulib_modules="$gnulib_modules nonblocking"
# -> Just add -lutil to cli
gnulib_modules="$gnulib_modules openpty"
# -> GSocket
gnulib_modules="$gnulib_modules passfd"
# -> open code / copy gnulib code
gnulib_modules="$gnulib_modules physmem"
# -> open code / conditional comp
gnulib_modules="$gnulib_modules pipe-posix"
# -> open code / conditional comp
gnulib_modules="$gnulib_modules pipe2"
# -> GMainLoop
gnulib_modules="$gnulib_modules poll"
# -> Meson
gnulib_modules="$gnulib_modules posix-shell"
# -> open code conditional logic
gnulib_modules="$gnulib_modules pthread_sigmask"
# -> GSocket
gnulib_modules="$gnulib_modules recv"
# -> GSocket
gnulib_modules="$gnulib_modules send"
# -> GSocket
gnulib_modules="$gnulib_modules setsockopt"
# -> open code conditional logic
gnulib_modules="$gnulib_modules sigaction"
# -> open code conditional logic
gnulib_modules="$gnulib_modules sigpipe"
# -> GSocket
gnulib_modules="$gnulib_modules socket"
# -> open code conditional or use GIO GFileInfo
gnulib_modules="$gnulib_modules stat-time"
# -> remove use or open-code it. possibly add to glib
gnulib_modules="$gnulib_modules strchrnul"
# -> g_strsplit
gnulib_modules="$gnulib_modules strtok_r"
# -> remove sys/stat.h include from any win32 code paths
gnulib_modules="$gnulib_modules sys_stat"
# -> remove sys/wait.h include from any win32 code paths
gnulib_modules="$gnulib_modules sys_wait"
# -> remove from any win32 code paths
gnulib_modules="$gnulib_modules termios"
# -> GDateTime ?
gnulib_modules="$gnulib_modules time_r"
# -> obsolete - exists on Linux, MacOS >= ?? & FreeBSD >= 6
gnulib_modules="$gnulib_modules ttyname_r"
# -> g_get_os_info in GLib 2.64 but can't use that yet
gnulib_modules="$gnulib_modules uname"
# -> G_STATIC_ASSERT
gnulib_modules="$gnulib_modules verify"
# -> remove from Win32 code paths
gnulib_modules="$gnulib_modules waitpid"
# -> Meson
gnulib_modules="$gnulib_modules warnings"
# -> open code impl
gnulib_modules="$gnulib_modules wcwidth"
SKIP_PO=true
# Enable copy-mode for MSYS/MinGW. MSYS' ln doesn't work well in the way
# bootstrap uses it with relative paths.
if test -n "$MSYSTEM"; then
copy=true
fi
# Tell gnulib to:
# require LGPLv2+
# apply any local diffs in gnulib/local/ dir
# put *.m4 files in m4/ dir
# put *.[ch] files in new gnulib/lib/ dir
# import gnulib tests in new gnulib/tests/ dir
gnulib_name=libgnu
m4_base=m4
source_base=gnulib/lib
tests_base=gnulib/tests
gnulib_tool_option_extras="\
--lgpl=2\
--with-tests\
--makefile-name=gnulib.mk\
--avoid=pt_chown\
--avoid=lock-tests\
"
local_gl_dir=gnulib/local
# Build prerequisites
# Note that some of these programs are only required for 'make dist' to
# succeed from a fresh git checkout; not all of these programs are
# required to run 'make dist' on a tarball.
buildreq="\
autoconf 2.59
automake 1.9.6
git 1.5.5
gzip -
libtool -
patch -
perl 5.5
pkg-config -
rpcgen -
tar -
xmllint -
xsltproc -
"
# Automake requires that AUTHORS exist.
touch AUTHORS || exit 1
# Override bootstrap's list - we don't use mdate-sh or texinfo.tex.
gnulib_extra_files="
build-aux/install-sh
build-aux/depcomp
build-aux/config.guess
build-aux/config.sub
doc/INSTALL
"
bootstrap_post_import_hook()
{
# Change paths in gnulib/tests/gnulib.mk from "../../.." to "../..",
# and make tests conditional by changing "TESTS" to "GNULIB_TESTS".
m=gnulib/tests/gnulib.mk
build: add configure option to disable gnulib tests The gnulib testsuite is relatively stable - the only times it is likely to have a test change from pass to fail is on a gnulib submodule update or a major system change (such as moving from Fedora 18 to 19, or other large change to libc). While it is an important test for end users on arbitrary machines (to make sure that the portability glue works for their machine), it mostly wastes time for development testing (as most developers aren't making any of the major changes that would cause gnulib tests to alter behavior). Thus, it pays to make the tests optional at configure time, defaulting to off for development, on for tarballs, with autobuilders requesting it to be on. It also helps to allow a make-time override, via VIR_TEST_EXPENSIVE=[01] (much the way automake sets up V=[01] for overriding the configure time default of how verbose to be). Automake has some pretty hard-coded magic with regards to the TESTS variable; I had quite a job figuring out how to keep 'make distcheck' passing regardless of the configure option setting in use, while still disabling the tests at runtime when I did not configure them on and did not use the override variable. Thankfully, we require GNU make, which lets me hide some information from Automake's magic handling of TESTS. * bootstrap.conf (bootstrap_epilogue): Munge gnulib test variable. * configure.ac (--enable-expensive-tests): Add new enable switch. (VIR_TEST_EXPENSIVE_DEFAULT, WITH_EXPENSIVE_TESTS): Set new witnesses. * gnulib/tests/Makefile.am (TESTS): Make tests conditional on configure settings and the VIR_TEST_EXPENSIVE variable. * tests/Makefile.am (TESTS_ENVIRONMENT): Expose VIR_TEST_EXPENSIVE to all tests. * autobuild.sh: Enable all tests during autobuilds. * libvirt.spec.in (%configure): Likewise. * mingw-libvirt.spec.in (%mingw_configure): Likewise. * docs/hacking.html.in: Document the option. * HACKING: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2013-07-31 13:18:58 +00:00
sed 's,\.\./\.\./\.\.,../..,g; s/^TESTS /GNULIB_TESTS /' $m > $m-t
mv -f $m-t $m
}
bootstrap_epilogue()
{
echo "$0: done. Now you can run 'mkdir build && cd build && ../configure'."
exit 0
}