1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

gnulib: delete all gnulib integration

This deletes all trace of gnulib from libvirt. We still
have the keycodemapdb submodule to deal with. The simple
solution taken was to update it when running autogen.sh.

Previously gnulib could auto-trigger refresh when running
'make' too. We could figure out a solution for this, but
with the pending meson rewrite it isn't worth worrying
about, given how infrequently keycodemapdb changes.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-01-17 16:00:27 +00:00
parent 55fe8110af
commit 2621d48f00
45 changed files with 67 additions and 1727 deletions

View File

@ -1,7 +1,5 @@
-I@abs_top_builddir@
-I@abs_top_srcdir@
-I@abs_top_builddir@/gnulib/lib
-I@abs_top_srcdir@/gnulib/lib
-I@abs_top_builddir@/include
-I@abs_top_srcdir@/include
-I@abs_top_builddir@/src

9
.gitignore vendored
View File

@ -6,6 +6,7 @@
*#*#
*.#*#
.#*
*~
# autotools related ignores
!/m4/virt-*.m4
@ -28,14 +29,8 @@
/m4/*
Makefile.in
# gnulib related ignores
!/gnulib/lib/Makefile.am
*.rej
*~
/gnulib/lib/*
/gnulib/m4/*
# git related ignores
*.rej
*.orig
.git-module-status

3
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "gnulib"]
path = .gnulib
url = https://git.savannah.gnu.org/git/gnulib.git/
[submodule "keycodemapdb"]
path = src/keycodemapdb
url = https://gitlab.com/keycodemap/keycodemapdb.git

@ -1 +0,0 @@
Subproject commit 611869be9f1083e53305446d90a2909fc89914ef

View File

@ -1,8 +1,6 @@
flags = [
'-I@abs_top_builddir@',
'-I@abs_top_srcdir@',
'-I@abs_top_builddir@/gnulib/lib',
'-I@abs_top_srcdir@/gnulib/lib',
'-I@abs_top_builddir@/include',
'-I@abs_top_srcdir@/include',
'-I@abs_top_builddir@/src',

View File

@ -23,7 +23,7 @@ GENHTML = genhtml
# so force it explicitly
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
SUBDIRS = . gnulib/lib include/libvirt src tools docs \
SUBDIRS = . include/libvirt src tools docs \
tests po examples
XZ_OPT ?= -v -T0

View File

@ -28,18 +28,11 @@ You can get a copy of the source repository like this:
$ git clone https://libvirt.org/git/libvirt.git
$ cd libvirt
As an optional step, if you already have a copy of the gnulib git
repository on your hard drive, then you can use it as a reference to
reduce download time and disk space requirements:
$ export GNULIB_SRCDIR=/path/to/gnulib
We require to have the build directory different than the source directory:
$ mkdir build && cd build
The next step is to get all required pieces from gnulib,
to run autoreconf, and to invoke ../autogen.sh:
The next step is to invoke ../autogen.sh:
$ ../autogen.sh

View File

@ -1,208 +1,45 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=$(dirname "$0")
test -n "$srcdir" || srcdir=.
die()
{
echo "error: $1" >&2
olddir=$(pwd)
cd "$srcdir"
(test -f src/libvirt.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level libvirt directory"
exit 1
}
starting_point=$(pwd)
git submodule update --init || exit 1
srcdir=$(dirname "$0")
test "$srcdir" || srcdir=.
aclocal --install || exit 1
autoreconf --verbose --force --install || exit 1
cd "$srcdir" || {
die "Failed to cd into $srcdir"
}
test -f src/libvirt.c || {
die "$0 must live in the top-level libvirt directory"
}
dry_run=
no_git=
gnulib_srcdir=
extra_args=
while test "$#" -gt 0; do
case "$1" in
--dry-run)
# This variable will serve both as an indicator of the fact that
# a dry run has been requested, and to store the result of the
# dry run. It will be ultimately used as return code for the
# script: 0 means no action is necessary, 2 means that autogen.sh
# needs to be executed, and 1 is reserved for failures
dry_run=0
shift
;;
--no-git)
no_git=" $1"
shift
;;
--gnulib-srcdir=*)
gnulib_srcdir=" $1"
shift
;;
--gnulib-srcdir)
gnulib_srcdir=" $1=$2"
shift
shift
;;
--system)
prefix=/usr
sysconfdir=/etc
localstatedir=/var
if test -d $prefix/lib64; then
libdir=$prefix/lib64
else
libdir=$prefix/lib
fi
extra_args="--prefix=$prefix --localstatedir=$localstatedir"
extra_args="$extra_args --sysconfdir=$sysconfdir --libdir=$libdir"
shift
;;
*)
# All remaining arguments will be passed to configure verbatim
break
;;
esac
done
no_git="$no_git$gnulib_srcdir"
gnulib_hash()
{
local no_git=$1
if test "$no_git"; then
echo "no-git"
return
fi
# Compute the hash we'll use to determine whether rerunning bootstrap
# is required. The first is just the SHA1 that selects a gnulib snapshot.
# The second ensures that whenever we change the set of gnulib modules used
# by this package, we rerun bootstrap to pull in the matching set of files.
# The third ensures that whenever we change the set of local gnulib diffs,
# we rerun bootstrap to pull in those diffs.
git submodule status .gnulib | awk '{ print $1 }'
git hash-object bootstrap.conf
git ls-tree -d HEAD gnulib/local | awk '{ print $3 }'
}
# Only look into git submodules if we're in a git checkout
if test -d .git || test -f .git; then
# Check for dirty submodules
if test -z "$CLEAN_SUBMODULE"; then
for path in $(git submodule status | awk '{ print $2 }'); do
case "$(git diff "$path")" in
*-dirty*)
echo "error: $path is dirty, please investigate" >&2
echo "set CLEAN_SUBMODULE to discard submodule changes" >&2
exit 1
;;
esac
done
fi
if test "$CLEAN_SUBMODULE" && test -z "$no_git"; then
if test -z "$dry_run"; then
echo "Cleaning up submodules..."
git submodule foreach 'git clean -dfqx && git reset --hard' || {
die "Cleaning up submodules failed"
}
fi
fi
# Update all submodules. If any of the submodules has not been
# initialized yet, it will be initialized now; moreover, any submodule
# with uncommitted changes will be returned to the expected state
echo "Updating submodules..."
git submodule update --init || {
die "Updating submodules failed"
}
# The expected hash, eg. the one computed after the last
# successful bootstrap run, is stored on disk
state_file=.git-module-status
expected_hash=$(cat "$state_file" 2>/dev/null)
actual_hash=$(gnulib_hash "$no_git")
if test "$actual_hash" = "$expected_hash"; then
# The gnulib hash matches our expectations, and all the files
# that can only be generated through bootstrap are present:
# we just need to run autoreconf. Unless we're performing a
# dry run, of course...
if test -z "$dry_run"; then
echo "Running autoreconf..."
autoreconf -v || {
die "autoreconf failed"
}
fi
else
# Whenever the gnulib submodule or any of the related bits
# has been changed in some way (see gnulib_hash) we need to
# run bootstrap again. If we're performing a dry run, we
# change the return code instead to signal our caller
if test "$dry_run"; then
dry_run=2
else
echo "Running bootstrap..."
./bootstrap$no_git || {
die "bootstrap failed"
}
gnulib_hash >"$state_file"
fi
if test "x$1" = "x--system"; then
shift
prefix=/usr
libdir=$prefix/lib
sysconfdir=/etc
localstatedir=/var
if [ -d /usr/lib64 ]; then
libdir=$prefix/lib64
fi
EXTRA_ARGS="--prefix=$prefix --sysconfdir=$sysconfdir --localstatedir=$localstatedir --libdir=$libdir"
fi
# When performing a dry run, we can stop here
test "$dry_run" && exit "$dry_run"
cd "$olddir"
# If asked not to run configure, we can stop here
test "$NOCONFIGURE" && exit 0
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure $EXTRA_ARGS "$@" || exit 1
cd "$starting_point" || {
die "Failed to cd into $starting_point"
}
if test "$OBJ_DIR"; then
mkdir -p "$OBJ_DIR" || {
die "Failed to create $OBJ_DIR"
}
cd "$OBJ_DIR" || {
die "Failed to cd into $OBJ_DIR"
}
fi
# Make sure we can find GNU make and tell the user
# the right command to run
MAKE=
for cmd in make gmake; do
if $cmd -v 2>&1 | grep -q "GNU Make"; then
MAKE=$cmd
break
fi
done
test "$MAKE" || {
die "GNU make is required to build libvirt"
}
if test -z "$*" && test -z "$extra_args" && test -f config.status; then
echo "Running config.status..."
./config.status --recheck || {
die "config.status failed"
}
if [ "$1" = "--help" ]; then
exit 0
else
echo "Now type 'make' to compile libvirt" || exit 1
fi
else
if test -z "$*" && test -z "$extra_args"; then
echo "I am going to run configure with no arguments - if you wish"
echo "to pass any to it, please specify them on the $0 command line."
else
echo "Running configure with $extra_args $@"
fi
"$srcdir/configure" $extra_args "$@" || {
die "configure failed"
}
echo "Skipping configure process."
fi
echo
echo "Now type '$MAKE' to compile libvirt."

1073
bootstrap

File diff suppressed because it is too large Load Diff

View File

@ -1,100 +0,0 @@
# 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.
# -> Meson
gnulib_modules="$gnulib_modules largefile"
# -> custom configure check
gnulib_modules="$gnulib_modules localeconv"
# -> 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"
# -> GThread
gnulib_modules="$gnulib_modules threadlib"
# -> remove sys/wait.h include from any win32 code paths
gnulib_modules="$gnulib_modules sys_wait"
SKIP_PO=true
copy=true
bootstrap_sync=true
vc_ignore=
# 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
gnulib_tool_option_extras="\
--lgpl=2\
--makefile-name=gnulib.mk\
--avoid=pt_chown\
--no-vc-files\
"
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 -
"
# 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_epilogue()
{
echo "$0: done. Now you can run 'mkdir build && cd build && ../configure'."
exit 0
}

View File

@ -44,10 +44,6 @@ VC = $(GIT)
VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
# You can override this variable in syntax-check.mk if your gnulib submodule lives
# in a different location.
gnulib_dir ?= $(srcdir)/gnulib
# You can override this variable in syntax-check.mk to set your own regexp
# matching files to ignore.
VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
@ -132,8 +128,7 @@ local-check := \
syntax-check: $(local-check)
# We haven't converted all scripts to using gnulib's init.sh yet.
_test_script_regex = \<\(init\|test-lib\)\.sh\>
_test_script_regex = \<test-lib\.sh\>
# Most developers don't run 'make distcheck'. We want the official
# dist to be secure, but don't want to penalize other developers
@ -420,7 +415,6 @@ sc_prohibit_access_xok:
halt='use virFileIsExecutable instead of access(,X_OK)' \
$(_sc_search_regexp)
# Similar to the gnulib syntax-check.mk rule for sc_prohibit_strcmp
# Use STREQLEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
snp_ = strncmp *\(.+\)
sc_prohibit_strncmp:
@ -473,8 +467,6 @@ sc_prohibit_risky_id_promotion:
halt='cast -1 to ([ug]id_t) before comparing against id' \
$(_sc_search_regexp)
# Use g_snprintf rather than s'printf, even if buffer is provably large enough,
# since gnulib has more guarantees for snprintf portability
sc_prohibit_sprintf:
@prohibit='\<[s]printf\>' \
in_vc_files='\.[ch]$$' \
@ -567,8 +559,7 @@ sc_size_of_brackets:
$(_sc_search_regexp)
# Ensure that no C source file, docs, or rng schema uses TABs for
# indentation. Also match *.h.in files, to get libvirt.h.in. Exclude
# files in gnulib, since they're imported.
# indentation. Also match *.h.in files, to get libvirt.h.in.
space_indent_files=(\.(aug(\.in)?|rng|s?[ch](\.in)?|html.in|py|pl|syms)|tools/.*\.in)
sc_TAB_in_indentation:
@prohibit='^ * ' \
@ -1660,29 +1651,6 @@ sc_unmarked_diagnostics:
halt='found unmarked diagnostic(s)' \
$(_sc_search_regexp)
# List headers for which HAVE_HEADER_H is always true, assuming you are
# using the appropriate gnulib module. CAUTION: for each "unnecessary"
# #if HAVE_HEADER_H that you remove, be sure that your project explicitly
# requires the gnulib module that guarantees the usability of that header.
gl_assured_headers_ = \
cd $(gnulib_dir)/lib && echo *.in.h|$(SED) 's/\.in\.h//g'
# Convert the list of names to upper case, and replace each space with "|".
az_ = abcdefghijklmnopqrstuvwxyz
AZ_ = ABCDEFGHIJKLMNOPQRSTUVWXYZ
gl_header_upper_case_or_ = \
$$($(gl_assured_headers_) \
| tr $(az_)/.- $(AZ_)___ \
| tr -s ' ' '|' \
)
sc_prohibit_always_true_header_tests:
@or=$(gl_header_upper_case_or_); \
re="HAVE_($$or)_H"; \
prohibit='\<'"$$re"'\>' \
halt=$$(printf '%s\n' \
'do not test the above HAVE_<header>_H symbol(s);' \
' with the corresponding gnulib module, they are always true') \
$(_sc_search_regexp)
sc_prohibit_defined_have_decl_tests:
@prohibit='(#[ ]*ifn?def|\<defined)\>[ (]+HAVE_DECL_' \
@ -1690,50 +1658,6 @@ sc_prohibit_defined_have_decl_tests:
$(_sc_search_regexp)
# ==================================================================
gl_other_headers_ ?= \
openat.h \
stat-macros.h
# Perl -lne code to extract "significant" cpp-defined symbols from a
# gnulib header file, eliminating a few common false-positives.
# The exempted names below are defined only conditionally in gnulib,
# and hence sometimes must/may be defined in application code.
gl_extract_significant_defines_ = \
/^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\
&& $$2 !~ /(?:rpl_|_used_without_)/\
&& $$1 !~ /^(?:NSIG|ENODATA)$$/\
&& $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\
and print $$1
# Create a list of regular expressions matching the names
# of macros that are guaranteed to be defined by parts of gnulib.
define def_sym_regex
gen_h=$(gl_generated_headers_); \
(cd $(gnulib_dir)/lib; \
for f in *.in.h $(gl_other_headers_); do \
test -f $$f \
&& perl -lne '$(gl_extract_significant_defines_)' $$f; \
done; \
) | sort -u \
| $(SED) 's/^/^ *# *(define|undef) */;s/$$/\\>/'
endef
# Don't define macros that we already get from gnulib header files.
sc_prohibit_always-defined_macros:
@if test -d $(gnulib_dir); then \
case $$(echo all: | $(GREP) -l -f - $(abs_top_builddir)/Makefile) in $(abs_top_builddir)/Makefile);; *) \
echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \
esac; \
regex=$$($(def_sym_regex)); export regex; \
$(VC_LIST_EXCEPT) \
| xargs sh -c 'echo $$regex | $(GREP) -E -f - "$$@"' \
dummy /dev/null \
&& { printf '$(ME): define the above' \
' via some gnulib .h file\n' 1>&2; \
exit 1; } \
|| :; \
fi
# ==================================================================
# Prohibit checked in backup files.
sc_prohibit_backup_files:
@ -1972,11 +1896,10 @@ perl_translatable_files_list_ = \
po_file ?= $(srcdir)/po/POTFILES.in
# List of additional files that we want to pick up in our POTFILES.in
# This is all gnulib files, as well as generated files for RPC code.
# This is all generated files for RPC code.
generated_files = \
$(builddir)/src/*.[ch] \
$(builddir)/src/*/*.[ch] \
$(srcdir)/gnulib/lib/*.[ch]
$(builddir)/src/*/*.[ch]
_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
@ -2012,25 +1935,6 @@ writable-files:
else :; \
fi
v_etc_file = $(gnulib_dir)/lib/version-etc.c
sample-test = tests/sample-test
texi = doc/$(PACKAGE).texi
# Make sure that the copyright date in $(v_etc_file) is up to date.
# Do the same for the $(sample-test) and the main doc/.texi file.
sc_copyright_check:
@require='enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' \
in_files=$(v_etc_file) \
halt='out of date copyright in $(v_etc_file); update it' \
$(_sc_search_regexp)
@require='# Copyright \(C\) '$$(date +%Y)' Free' \
in_vc_files=$(sample-test) \
halt='out of date copyright in $(sample-test); update it' \
$(_sc_search_regexp)
@require='Copyright @copyright\{\} .*'$$(date +%Y) \
in_vc_files=$(texi) \
halt='out of date copyright in $(texi); update it' \
$(_sc_search_regexp)
# BRE regex of file contents to identify a test script.
_test_script_regex ?= \<init\.sh\>
@ -2078,51 +1982,6 @@ sc_vulnerable_makefile_CVE-2012-3386:
' see https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2012-3386 for details') \
$(_sc_search_regexp)
# We don't use this feature of syntax-check.mk.
prev_version_file = /dev/null
ifneq ($(_gl-Makefile),)
ifeq (0,$(MAKELEVEL))
_dry_run_result := $(shell \
cd '$(srcdir)'; \
test -d .git || test -f .git || { echo 0; exit; }; \
$(srcdir)/autogen.sh --dry-run >/dev/null 2>&1; \
echo $$?; \
)
_clean_requested = $(filter %clean,$(MAKECMDGOALS))
# A return value of 0 means no action is required
# A return value of 1 means a genuine error has occurred while
# performing the dry run, and it should be reported so it can
# be investigated
ifeq (1,$(_dry_run_result))
$(info INFO: autogen.sh error, running again to show details)
syntax-check.mk Makefile: _autogen_error
endif
# A return value of 2 means that autogen.sh needs to be executed
# in earnest before building, probably because of gnulib updates.
# We don't run autogen.sh if the clean target has been invoked,
# though, as it would be quite pointless
ifeq (2,$(_dry_run_result)$(_clean_requested))
$(info INFO: running autogen.sh is required, running it now...)
$(shell touch $(srcdir)/AUTHORS)
syntax-check.mk Makefile: _autogen
endif
endif
endif
# It is necessary to call autogen any time gnulib changes. Autogen
# reruns configure, then we regenerate all Makefiles at once.
.PHONY: _autogen
_autogen:
$(srcdir)/autogen.sh
./config.status
.PHONY: _autogen_error
_autogen_error:
$(srcdir)/autogen.sh --dry-run
ifneq ($(_gl-Makefile),)
syntax-check: spacing-check test-wrap-argv \
@ -2271,7 +2130,7 @@ exclude_file_name_regexp--sc_require_config_h_first = \
^(examples/|tools/virsh-edit\.c$$|tests/virmockstathelpers.c)
exclude_file_name_regexp--sc_trailing_blank = \
/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo|^gnulib/local/.*/.*diff$$
/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo$$
exclude_file_name_regexp--sc_unmarked_diagnostics = \
^(scripts/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$
@ -2319,9 +2178,6 @@ exclude_file_name_regexp--sc_prohibit_sysconf_pagesize = \
exclude_file_name_regexp--sc_prohibit_pthread_create = \
^(build-aux/syntax-check\.mk|src/util/virthread\.c|tests/.*)$$
exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
^tests/virtestmock.c$$
exclude_file_name_regexp--sc_prohibit_readdir = \
^(tests/(.*mock|virfilewrapper)\.c|tools/nss/libvirt_nss\.c)$$
@ -2337,8 +2193,5 @@ exclude_file_name_regexp--sc_prohibit_strcmp = \
exclude_file_name_regexp--sc_prohibit_backslash_alignment = \
^build-aux/syntax-check\.mk$$
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
^src/util/(virfile|virnetdev|virnetdevip)\.[c,h]|$$
exclude_file_name_regexp--sc_prohibit_select = \
^build-aux/syntax-check\.mk|src/util/vireventglibwatch\.c$$

View File

@ -25,9 +25,7 @@ if test $? != 0; then
fi
find -name test-suite.log -delete
# gl_public_submodule_commit= to disable gnulib's submodule check
# which breaks due to way we clone the submodules
make -j"$CI_SMP" gl_public_submodule_commit= $CI_MAKE_ARGS
make -j"$CI_SMP" $CI_MAKE_ARGS
if test $? != 0; then \
LOGS=$(find -name test-suite.log)

View File

@ -22,10 +22,7 @@
/*
* Define __GNUC_PREREQ to a sane default if it isn't yet defined.
* This is done here so that it's included as early as possible; gnulib relies
* on this to be defined in features.h, which should be included from ctype.h.
* This doesn't happen on many non-glibc systems.
* When __GNUC_PREREQ is not defined, gnulib defines it to 0, which breaks things.
* This is done here so that it's included as early as possible;
*/
#ifndef __GNUC_PREREQ
# define __GNUC_PREREQ(maj, min) \

View File

@ -42,11 +42,6 @@ dnl we don't really need the 'u' even in older toolchains. Then there is
dnl older libtool, which spelled it AR_FLAGS
m4_divert_text([DEFAULTS], [: "${ARFLAGS=cr} ${AR_FLAGS=cr}"])
# Maintainer note - comment this line out if you plan to rerun
# GNULIB_POSIXCHECK testing to see if libvirt should be using more modules.
# Leave it uncommented for normal releases, for faster ./configure.
gl_ASSERT_NO_GNULIB_POSIXCHECK
# Default to using the silent-rules feature when possible. Formatting
# chosen to bypass 'grep' checks that cause older automake to warn.
# Users (include rpm) can still change the default at configure time.
@ -152,9 +147,6 @@ then
fi
gl_EARLY
gl_INIT
dnl get 64-int interfaces on 32-bit platforms
AC_SYS_LARGEFILE
@ -746,7 +738,7 @@ AM_CONDITIONAL([WITH_TESTS], [test "$with_test_suite" = "yes"])
LIBVIRT_ARG_ENABLE([EXPENSIVE_TESTS],
[set the default for enabling expensive tests ]
[(gnulib and long timeouts), use VIR_TEST_EXPENSIVE to ]
[(long timeouts), use VIR_TEST_EXPENSIVE to ]
[override during make],
[check])
case "$enable_expensive_tests" in
@ -925,7 +917,6 @@ AC_CONFIG_FILES([run],
[chmod +x,-w run])
AC_CONFIG_FILES([\
Makefile src/Makefile include/libvirt/Makefile docs/Makefile \
gnulib/lib/Makefile \
.color_coded \
.ycm_extra_conf.py \
libvirt.pc \

View File

@ -70,31 +70,6 @@ $ <b>sudo</b> <i>make install</i></pre>
will turn on -Werror for builds. This can be disabled with
--disable-werror, but this is not recommended.
</p>
<p>
Libvirt takes advantage of
the <a href="http://www.gnu.org/software/gnulib/">gnulib</a>
project to provide portability to a number of platforms. This
is normally done dynamically via a git submodule in
the <code>.gnulib</code> subdirectory, which is auto-updated as
needed when you do incremental builds. Setting the environment
variable <code>GNULIB_SRCDIR</code> to a local directory
containing a git checkout of gnulib will let you reduce local
disk space requirements and network download time, regardless of
which actual commit you have in that reference directory.
</p>
<p>
However, if you are developing on a platform where git is not
available, or are behind a firewall that does not allow for git
to easily obtain the gnulib submodule, it is possible to instead
use a static mode of operation where you are then responsible
for updating the git submodule yourself. In this mode, you must
track the exact gnulib commit needed by libvirt (usually not the
latest gnulib.git) via alternative means, such as a shared NFS
drive or manual download, and run this any time libvirt.git
updates the commit stored in the .gnulib submodule:</p>
<pre>
$ GNULIB_SRCDIR=/path/to/gnulib ./autogen.sh --no-git
</pre>
<p>To build &amp; install libvirt to your home
directory the following commands can be run:

View File

@ -932,8 +932,7 @@ BAD:
type is at least four bytes wide).</li>
<li>If a variable has boolean semantics, give it the <code>bool</code> type
and use the corresponding <code>true</code> and <code>false</code> macros.
It's ok to include &lt;stdbool.h&gt;, since libvirt's use of gnulib ensures
that it exists and is usable.</li>
</li>
<li>In the unusual event that you require a specific width, use a
standard type like <code>int32_t</code>, <code>uint32_t</code>,
<code>uint64_t</code>, etc.</li>
@ -1549,7 +1548,7 @@ int foo()
in the same way, but still make sure they get reviewed if non-trivial.
</li>
<li>(ir)regular pulls from other repositories or automated updates, such
as the .gnulib submodule updates, pulling in new translations or updating
as the keycodemap submodule updates, pulling in new translations or updating
the container images for the CI system
</li>
</ul>

View File

@ -1,30 +0,0 @@
## Makefile for gnulib/lib -*-Makefile-*-
## Copyright (C) 2011-2013 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 library 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/>.
# Initialize variables, so gnulib.mk can append to them
BUILT_SOURCES =
CLEANFILES =
EXTRA_DIST =
MOSTLYCLEANDIRS =
MOSTLYCLEANFILES =
SUFFIXES =
noinst_LTLIBRARIES =
include gnulib.mk
AM_CPPFLAGS = -I$(top_srcdir)

View File

@ -414,8 +414,6 @@ BuildRequires: libtirpc-devel
BuildRequires: firewalld-filesystem
%endif
Provides: bundled(gnulib)
%description
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). The main package includes

View File

@ -37,10 +37,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
dontwarn="$dontwarn -Wconversion"
# Too many to deal with
dontwarn="$dontwarn -Wsign-conversion"
# GNULIB gettext.h violates
dontwarn="$dontwarn -Wvla"
# Many GNULIB header violations
dontwarn="$dontwarn -Wundef"
# Need to allow bad cast for execve()
dontwarn="$dontwarn -Wcast-qual"
# We need to use long long in many places
@ -51,8 +47,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
dontwarn="$dontwarn -Wstrict-overflow"
# Not a problem since we don't use -funsafe-loop-optimizations
dontwarn="$dontwarn -Wunsafe-loop-optimizations"
# Gnulib's stat-time.h violates this
dontwarn="$dontwarn -Waggregate-return"
# gcc 4.4.6 complains this is C++ only; gcc 4.7.0 implies this from -Wall
dontwarn="$dontwarn -Wenum-compare"
# gcc 5.1 -Wformat-signedness mishandles enums, not ready for prime time
@ -139,7 +133,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
wantwarn="$wantwarn -Wno-unused-function"
fi
# GNULIB uses '-W' (aka -Wextra) which includes a bunch of stuff.
# manywarnings uses '-W' (aka -Wextra) which includes a bunch of stuff.
# Unfortunately, this means you can't simply use '-Wsign-compare'
# with gl_MANYWARN_COMPLEMENT
# So we have -W enabled, and then have to explicitly turn off...
@ -151,16 +145,16 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
# so use this CLang-specific arg to keep it quiet
wantwarn="$wantwarn -Wno-typedef-redefinition"
# GNULIB expects this to be part of -Wc++-compat, but we turn
# manywarnings expects this to be part of -Wc++-compat, but we turn
# that one off, so we need to manually enable this again
wantwarn="$wantwarn -Wjump-misses-init"
# GNULIB explicitly filters it out, preferring -Wswitch
# manywarnings explicitly filters it out, preferring -Wswitch
# but that doesn't report missing enums if a default:
# is present.
wantwarn="$wantwarn -Wswitch-enum"
# GNULIB turns on -Wformat=2 which implies -Wformat-nonliteral,
# manywarnings turns on -Wformat=2 which implies -Wformat-nonliteral,
# so we need to manually re-exclude it.
wantwarn="$wantwarn -Wno-format-nonliteral"
@ -244,9 +238,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
;;
esac
# Silence certain warnings in gnulib, and use improved glibc headers
AC_DEFINE([lint], [1],
[Define to 1 if the compiler is checking for lint.])
# Use security checked glibc headers
AH_VERBATIM([FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting newer glibc. */

View File

@ -19,9 +19,7 @@
# No libraries with the exception of LIBXML should be listed
# here. List them against the individual XXX_la_CFLAGS targets
# that actually use them.
AM_CPPFLAGS = -I../gnulib/lib \
-I$(top_srcdir)/gnulib/lib \
-I$(top_srcdir) \
AM_CPPFLAGS = -I$(top_srcdir) \
-I../include \
-I$(top_srcdir)/include \
-I$(srcdir)/util \
@ -439,7 +437,6 @@ if WITH_MACOS
libvirt_la_LDFLAGS += -Wl,-flat_namespace
endif WITH_MACOS
libvirt_la_LDFLAGS += $(NULL)
libvirt_la_BUILT_LIBADD += ../gnulib/lib/libgnu.la
libvirt_la_LIBADD += \
$(DRIVER_MODULES_LIBS)
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
@ -662,7 +659,7 @@ libvirt_iohelper_LDFLAGS = \
libvirt_iohelper_LDADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la
$(NULL)
if WITH_DTRACE_PROBES
libvirt_iohelper_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES

View File

@ -32,7 +32,6 @@ libvirt_driver_admin_la_CFLAGS = \
-I$(top_srcdir)/src/util \
-I$(top_builddir)/src/rpc \
$(NULL)
libvirt_driver_admin_la_LIBADD = ../gnulib/lib/libgnu.la
libvirt_driver_admin_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
if WITH_SASL

View File

@ -35,7 +35,6 @@ libvirt_driver_bhyve_la_LIBADD = \
libvirt_driver_bhyve_impl.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
mod_LTLIBRARIES += libvirt_driver_bhyve.la
libvirt_driver_bhyve_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)

View File

@ -43,7 +43,6 @@ libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
libvirt_driver_interface_la_SOURCES += $(INTERFACE_DRIVER_UDEV_SOURCES)
endif WITH_UDEV
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
sbin_PROGRAMS += virtinterfaced

View File

@ -35,7 +35,6 @@ libvirt_driver_libxl_la_LIBADD = \
libvirt_driver_libxl_impl.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
mod_LTLIBRARIES += libvirt_driver_libxl.la
libvirt_driver_libxl_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)

View File

@ -113,7 +113,6 @@ lockd_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
lockd_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
augeas_DATA += locking/libvirt_lockd.aug
if WITH_DTRACE_PROBES
@ -161,7 +160,6 @@ virtlockd_LDADD = \
libvirt.la \
libvirt_driver_admin.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
if WITH_DTRACE_PROBES
virtlockd_LDADD += libvirt_probes.lo
@ -182,7 +180,6 @@ sanlock_la_LIBADD = \
-lsanlock_client \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
augeas_DATA += locking/libvirt_sanlock.aug

View File

@ -98,7 +98,6 @@ virtlogd_LDADD = \
libvirt_driver_admin.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
if WITH_DTRACE_PROBES
virtlogd_LDADD += libvirt_probes.lo

View File

@ -84,7 +84,6 @@ libvirt_driver_lxc_la_LIBADD = \
libvirt_driver_lxc_impl.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
mod_LTLIBRARIES += libvirt_driver_lxc.la
libvirt_driver_lxc_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
@ -213,7 +212,6 @@ libvirt_lxc_LDADD = \
libvirt.la \
$(FUSE_LIBS) \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
if WITH_DTRACE_PROBES
libvirt_lxc_LDADD += libvirt_probes.lo

View File

@ -35,7 +35,6 @@ libvirt_driver_network_la_LIBADD = \
libvirt_driver_network_impl.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(LIBNL_LIBS) \
$(DBUS_LIBS) \
$(NULL)
@ -137,7 +136,7 @@ libvirt_leaseshelper_LDFLAGS = \
libvirt_leaseshelper_LDADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la
$(NULL)
if WITH_DTRACE_PROBES
libvirt_leaseshelper_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES

View File

@ -67,8 +67,6 @@ libvirt_driver_nodedev_la_LIBADD += \
$(NULL)
endif WITH_UDEV
libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la
sbin_PROGRAMS += virtnodedevd
nodist_conf_DATA += node_device/virtnodedevd.conf

View File

@ -50,7 +50,6 @@ libvirt_driver_nwfilter_impl_la_LIBADD = \
$(LIBNL_LIBS) \
$(DBUS_LIBS) \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES)

View File

@ -85,7 +85,6 @@ libvirt_driver_qemu_la_LIBADD = \
libvirt_driver_qemu_impl.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
mod_LTLIBRARIES += libvirt_driver_qemu.la
libvirt_driver_qemu_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)

View File

@ -79,7 +79,6 @@ endif WITH_DTRACE_PROBES
REMOTE_DAEMON_LD_ADD += \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
LOGROTATE_FILES_IN += \

View File

@ -1384,12 +1384,6 @@ int virNetSocketGetFD(virNetSocketPtr sock)
return fd;
}
/* Temp hack - we're still pulling in gnulib
* fcntl-h indirectly, but not fcntl */
#ifdef WIN32
# undef F_DUPFD_CLOEXEC
#endif
int virNetSocketDupFD(virNetSocketPtr sock, bool cloexec)
{
int fd;

View File

@ -26,7 +26,6 @@ libvirt_driver_secret_la_CFLAGS = \
libvirt_driver_secret_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_driver_secret_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)

View File

@ -94,7 +94,6 @@ virt_aa_helper_LDADD = \
libvirt.la \
libvirt_driver_storage_impl.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
if WITH_DTRACE_PROBES
virt_aa_helper_LDADD += libvirt_probes.lo

View File

@ -140,7 +140,6 @@ libvirt_driver_storage_la_LIBADD = \
libvirt_driver_storage_impl.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
mod_LTLIBRARIES += libvirt_driver_storage.la
libvirt_driver_storage_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
@ -233,7 +232,6 @@ libvirt_storage_backend_fs_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_fs_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_storage_file_fs_la_SOURCES = $(STORAGE_FILE_FS_SOURCES)
@ -247,7 +245,6 @@ libvirt_storage_file_fs_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_file_fs_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
endif WITH_STORAGE
@ -263,7 +260,6 @@ libvirt_storage_backend_logical_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_logical_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
endif WITH_STORAGE_LVM
@ -280,7 +276,6 @@ libvirt_storage_backend_iscsi_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_iscsi_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
endif WITH_STORAGE_ISCSI
@ -299,7 +294,6 @@ libvirt_storage_backend_iscsi_direct_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_iscsi_direct_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(LIBISCSI_LIBS) \
$(NULL)
endif WITH_STORAGE_ISCSI_DIRECT
@ -316,7 +310,6 @@ libvirt_storage_backend_scsi_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_scsi_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
endif WITH_STORAGE_SCSI
@ -326,7 +319,6 @@ libvirt_storage_backend_mpath_la_LIBADD = \
libvirt.la \
$(DEVMAPPER_LIBS) \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_storage_backend_mpath_la_CFLAGS = \
-I$(srcdir)/conf \
@ -350,7 +342,6 @@ libvirt_storage_backend_disk_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_disk_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
endif WITH_STORAGE_DISK
@ -360,7 +351,6 @@ libvirt_storage_backend_rbd_la_LIBADD = \
libvirt.la \
$(LIBRBD_LIBS) \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_storage_backend_rbd_la_CFLAGS = \
-I$(srcdir)/conf \
@ -393,7 +383,6 @@ libvirt_storage_backend_sheepdog_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_sheepdog_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
endif WITH_STORAGE_SHEEPDOG
@ -404,7 +393,6 @@ libvirt_storage_backend_gluster_la_LIBADD = \
libvirt.la \
$(GLUSTERFS_LIBS) \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_storage_backend_gluster_la_CFLAGS = \
-I$(srcdir)/conf \
@ -422,7 +410,6 @@ libvirt_storage_file_gluster_la_LIBADD = \
libvirt.la \
$(GLUSTERFS_LIBS) \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_storage_file_gluster_la_CFLAGS = \
-I$(srcdir)/conf \
@ -447,7 +434,6 @@ libvirt_storage_backend_zfs_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_zfs_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
endif WITH_STORAGE_ZFS
@ -464,7 +450,6 @@ libvirt_storage_backend_vstorage_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_vstorage_la_LIBADD = \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
endif WITH_STORAGE_VSTORAGE
@ -480,7 +465,6 @@ libvirt_parthelper_LDADD = \
$(LIBPARTED_LIBS) \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
if WITH_DTRACE_PROBES
libvirt_parthelper_LDADD += libvirt_probes.lo

View File

@ -382,8 +382,7 @@ void virDisposeString(char **strptr)
* @S: size of trailing array elements
*
* Check to make sure that the requested allocation will not cause
* arithmetic overflow in the allocation size. The check is
* essentially the same as that in gnulib's xalloc_oversized.
* arithmetic overflow in the allocation size.
*/
#define VIR_ALLOC_VAR_OVERSIZED(M, N, S) ((((size_t)-1) - (M)) / (S) < (N))

View File

@ -754,7 +754,7 @@ virBitmapNewData(const void *data,
if (!bitmap)
return NULL;
/* le64toh is not provided by gnulib, so we do the conversion by hand */
/* le64toh is not available, so we do the conversion by hand */
p = bitmap->map;
for (i = j = 0; i < len; i++, j++) {
if (j == sizeof(*p)) {
@ -825,7 +825,7 @@ virBitmapToDataBuf(virBitmapPtr bitmap,
/* If bitmap and buffer differ in size, only fill to the smaller length */
len = MIN(len, nbytes);
/* htole64 is not provided by gnulib, so we do the conversion by hand */
/* htole64 is not available, so we do the conversion by hand */
l = bitmap->map;
for (i = j = 0; i < len; i++, j++) {
if (j == sizeof(*l)) {

View File

@ -1327,9 +1327,7 @@ virBuildPathInternal(char **path, ...)
return ret;
}
/* Like gnulib's fread_file, but read no more than the specified maximum
number of bytes. If the length of the input is <= max_len, and
upon error while reading that data, it works just like fread_file. */
/* Read no more than the specified maximum number of bytes. */
static char *
saferead_lim(int fd, size_t max_len, size_t *length)
{
@ -3214,8 +3212,7 @@ virFileOpenTty(int *ttymaster G_GNUC_UNUSED,
char **ttyName G_GNUC_UNUSED,
int rawmode G_GNUC_UNUSED)
{
/* mingw completely lacks pseudo-terminals, and the gnulib
* replacements are not (yet) license compatible. */
/* mingw completely lacks pseudo-terminals */
errno = ENOSYS;
return -1;
}

View File

@ -46,21 +46,6 @@ int vir_setsockopt(int fd, int level, int optname,
int vir_socket(int domain, int type, int protocol);
/* Get rid of GNULIB's replacements */
# undef accept
# undef bind
# undef closesocket
# undef connect
# undef dup
# undef dup2
# undef getpeername
# undef getsockname
# undef getsockopt
# undef ioctlsocket
# undef listen
# undef setsockopt
# undef socket
/* Provide our own replacements */
# define accept vir_accept
# define bind vir_bind

View File

@ -47,7 +47,6 @@ libvirt_driver_vbox_la_LIBADD = \
libvirt_driver_vbox_impl.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
mod_LTLIBRARIES += libvirt_driver_vbox.la
libvirt_driver_vbox_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)

View File

@ -22,7 +22,6 @@ libvirt_driver_vz_la_LIBADD = \
libvirt_driver_vz_impl.la \
libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
mod_LTLIBRARIES += libvirt_driver_vz.la
libvirt_driver_vz_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)

View File

@ -18,7 +18,6 @@
AM_CPPFLAGS = \
-I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
-I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_srcdir)/src/util \
@ -65,19 +64,14 @@ if WITH_DTRACE_PROBES
PROBES_O += ../src/libvirt_probes.lo
endif WITH_DTRACE_PROBES
GNULIB_LIBS = \
../gnulib/lib/libgnu.la
LDADDS = \
$(NO_INDIRECT_LDFLAGS) \
$(PROBES_O) \
$(GNULIB_LIBS) \
../src/libvirt.la \
$(GLIB_LIBS) \
$(NULL)
MOCKLIBS_LIBS = \
$(GNULIB_LIBS) \
../src/libvirt.la
EXTRA_DIST = \
@ -945,8 +939,7 @@ storagepoolxml2xmltest_SOURCES = \
storagepoolxml2xmltest.c \
testutils.c testutils.h
storagepoolxml2xmltest_LDADD = $(LDADDS) \
../src/libvirt_driver_storage_impl.la \
$(GNULIB_LIBS)
../src/libvirt_driver_storage_impl.la
storagepoolcapstest_SOURCES = \
storagepoolcapstest.c testutils.h testutils.c
@ -1020,15 +1013,14 @@ commandtest_SOURCES = \
commandtest.c testutils.h testutils.c
commandtest_LDADD = $(LDADDS)
# Must not link to any libvirt modules - libc / gnulib only
# Must not link to any libvirt modules - libc only
# otherwise external libraries might unexpectedly leak
# file descriptors into commandhelper invalidating the
# test logic assumptions
commandhelper_SOURCES = \
commandhelper.c
commandhelper_LDADD = \
$(NO_INDIRECT_LDFLAGS) \
$(GNULIB_LIBS)
$(NO_INDIRECT_LDFLAGS)
commandhelper_LDFLAGS = -static
@ -1069,16 +1061,16 @@ domaincapstest_LDADD = $(LDADDS)
if WITH_QEMU
domaincapstest_SOURCES += testutilsqemu.c testutilsqemu.h
domaincapstest_LDADD += libqemutestdriver.la $(GNULIB_LIBS)
domaincapstest_LDADD += libqemutestdriver.la
endif WITH_QEMU
if WITH_LIBXL
domaincapstest_SOURCES += testutilsxen.c testutilsxen.h
domaincapstest_LDADD += libxltestdriver.la $(GNULIB_LIBS)
domaincapstest_LDADD += libxltestdriver.la
endif WITH_LIBXL
if WITH_BHYVE
domaincapstest_LDADD += ../src/libvirt_driver_bhyve_impl.la $(GNULIB_LIBS)
domaincapstest_LDADD += ../src/libvirt_driver_bhyve_impl.la
endif WITH_BHYVE
virnetmessagetest_SOURCES = \
@ -1145,7 +1137,6 @@ virstoragetest_SOURCES = \
virstoragetest_LDADD = $(LDADDS) \
../src/libvirt.la \
../src/libvirt_driver_storage_impl.la \
../gnulib/lib/libgnu.la \
$(NULL)
viridentitytest_SOURCES = \

View File

@ -417,8 +417,7 @@ struct stringToLongData {
/* This test makes assumptions about our compilation platform that are
* not guaranteed by POSIX. Good luck to you if you are crazy enough
* to try and port libvirt to a platform with 16-bit int. Gnulib
* already assumes that signed integers are two's complement. */
* to try and port libvirt to a platform with 16-bit int. */
G_STATIC_ASSERT(sizeof(int) == 4);
G_STATIC_ASSERT(sizeof(long) == sizeof(int) || sizeof(long) == sizeof(long long));
G_STATIC_ASSERT(sizeof(long long) == 8);

View File

@ -17,14 +17,13 @@
AM_CPPFLAGS = \
-I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
-I$(top_builddir)/src -I$(top_srcdir)/src \
-I$(top_srcdir)/src/util \
-I$(top_srcdir) \
$(NULL)
# We do not want to accidentally include stuff from gnulib
# or the main src/ dir or public API dir. Specific files can
# We do not want to accidentally include stuff from src/
# dir or public API dir. Specific files can
# still be included via their path relative to the root if
# needed
STANDALONE_CPPFLAGS = -I$(top_srcdir)
@ -120,7 +119,6 @@ libvirt_shell_la_LIBADD = \
$(LIBXML_LIBS) \
$(READLINE_LIBS) \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
libvirt_shell_la_SOURCES = \
vsh.c vsh.h \
@ -166,7 +164,6 @@ virt_host_validate_LDFLAGS = \
virt_host_validate_LDADD = \
../src/libvirt.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la \
$(NULL)
virt_host_validate_CFLAGS = \
@ -193,7 +190,7 @@ virt_login_shell_helper_LDADD = \
../src/libvirt.la \
../src/libvirt-lxc.la \
$(GLIB_LIBS) \
../gnulib/lib/libgnu.la
$(NULL)
virt_login_shell_helper_CFLAGS = \
$(AM_CFLAGS) \