libvirt/bootstrap.conf
Daniel P. Berrangé 9bb3571f10 bootstrap: remove 26 more gnulib modules
* send, recv: we use write & read for sockets so don't
   need these portability wrappers
 * ioctl, fcntl, fcntl-h: any usage of these is conditionally
   compiled and excludes Windows
 * ttyname_r: this exists in all supported platforms that
   we require now
 * environ: the tests explicitly declare this global variable
 * intprops: the code has been converted / simplified
 * nonblocking: we have a custom impl now to work with our
   own sockets wrappers
 * openpty: custom checks in configure.ac cope with portability
 * accept, bind, connect, getpeername, getsockname, listen,
   setsockopt, socket: code needing Windows portability uses
   our wrapper functions
 * close: avoids abort when passed invalid FD on Windows.
   Our VIR_FORCE_CLOSE wrapper avoids calling close(-1)
   and it is reasonable to abort in other scenarios in
   the RPC client
 * physmem: the gnulib code has been partially imported
 * warnings, manywarnings: copy the files directly into
   our local m4 dir
 * verify: replaced by G_STATIC_ASSERT
 * pthread_sigmask: none of the fixed portability problems
   affect libvirt's usage on current supported platforms
 * termios: the header is now conditionally included only
   when needed
 * time_r: replaced with GDateTime APIs

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-17 10:03:26 +00:00

150 lines
4.3 KiB
Plaintext

# 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.
# -> conditional build to avoid Win32
gnulib_modules="$gnulib_modules chown"
# -> Meson
gnulib_modules="$gnulib_modules configmake"
# -> GSocket
gnulib_modules="$gnulib_modules getaddrinfo"
# -> copy gnuliub win32 impl
gnulib_modules="$gnulib_modules getpass"
# -> Meson
gnulib_modules="$gnulib_modules largefile"
# -> custom configure check
gnulib_modules="$gnulib_modules localeconv"
# -> 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 passfd"
# -> 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 sigaction"
# -> open code conditional logic
gnulib_modules="$gnulib_modules sigpipe"
# -> 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"
# -> g_get_os_info in GLib 2.64 but can't use that yet
gnulib_modules="$gnulib_modules uname"
# -> remove from Win32 code paths
gnulib_modules="$gnulib_modules waitpid"
# -> 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
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
}