mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-08 16:54:49 +00:00
build: fix example build on MacOS X
Partial reversion of commit 76d87a59
, now that bootstrap is smarter.
* .gnulib: Update to latest, for poll and bootstrap fixes.
* bootstrap: Resync from gnulib.
* autogen.sh: Drop redundant tool checks; bootstrap does them
better, by honoring environment variables.
* examples/domain-events/events-c/Makefile.am (INCLUDES)
(event_test_LDADD): Use gnulib library during build.
* bootstrap.conf (gnulib_tool_option_extras): Revert --libtool
addition, now that updated bootstrap does it for us.
Reported by Justin Clift.
This commit is contained in:
parent
ee2cb9835f
commit
f8db6c90e3
2
.gnulib
2
.gnulib
@ -1 +1 @@
|
|||||||
Subproject commit 833bff3a531e4730779f8c7be1d9f7c471e6f221
|
Subproject commit 9f940e90a7555c3399c9972d9688483c011068c7
|
37
autogen.sh
37
autogen.sh
@ -6,43 +6,6 @@ test -z "$srcdir" && srcdir=.
|
|||||||
|
|
||||||
THEDIR=`pwd`
|
THEDIR=`pwd`
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
DIE=0
|
|
||||||
|
|
||||||
(autopoint --version) < /dev/null > /dev/null 2>&1 || {
|
|
||||||
echo
|
|
||||||
echo "You must have autopoint installed to compile libvirt."
|
|
||||||
echo "Download the appropriate package for your distribution,"
|
|
||||||
echo "or see http://www.gnu.org/software/gettext"
|
|
||||||
DIE=1
|
|
||||||
}
|
|
||||||
|
|
||||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
|
||||||
echo
|
|
||||||
echo "You must have autoconf installed to compile libvirt."
|
|
||||||
echo "Download the appropriate package for your distribution,"
|
|
||||||
echo "or see http://www.gnu.org/software/autoconf"
|
|
||||||
DIE=1
|
|
||||||
}
|
|
||||||
|
|
||||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
|
||||||
echo
|
|
||||||
echo "You must have libtool installed to compile libvirt."
|
|
||||||
echo "Download the appropriate package for your distribution,"
|
|
||||||
echo "or see http://www.gnu.org/software/libtool"
|
|
||||||
DIE=1
|
|
||||||
}
|
|
||||||
|
|
||||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
|
||||||
echo
|
|
||||||
DIE=1
|
|
||||||
echo "You must have automake installed to compile libvirt."
|
|
||||||
echo "Download the appropriate package for your distribution,"
|
|
||||||
echo "or see http://www.gnu.org/software/automake"
|
|
||||||
}
|
|
||||||
|
|
||||||
if test "$DIE" -eq 1; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
test -f src/libvirt.c || {
|
test -f src/libvirt.c || {
|
||||||
echo "You must run this script in the top-level libvirt directory"
|
echo "You must run this script in the top-level libvirt directory"
|
||||||
|
32
bootstrap
32
bootstrap
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Print a version string.
|
# Print a version string.
|
||||||
scriptversion=2010-07-06.10; # UTC
|
scriptversion=2010-09-30.17; # UTC
|
||||||
|
|
||||||
# Bootstrap this package from checked-out sources.
|
# Bootstrap this package from checked-out sources.
|
||||||
|
|
||||||
@ -346,6 +346,10 @@ check_versions() {
|
|||||||
ret=0
|
ret=0
|
||||||
|
|
||||||
while read app req_ver; do
|
while read app req_ver; do
|
||||||
|
# We only need libtoolize from the libtool package.
|
||||||
|
if test "$app" = libtool; then
|
||||||
|
app=libtoolize
|
||||||
|
fi
|
||||||
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
||||||
appvar=`echo $app | tr '[a-z]' '[A-Z]'`
|
appvar=`echo $app | tr '[a-z]' '[A-Z]'`
|
||||||
test "$appvar" = TAR && appvar=AMTAR
|
test "$appvar" = TAR && appvar=AMTAR
|
||||||
@ -375,6 +379,18 @@ print_versions() {
|
|||||||
# can't depend on column -t
|
# can't depend on column -t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use_libtool=0
|
||||||
|
# We'd like to use grep -E, to see if any of LT_INIT,
|
||||||
|
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
||||||
|
# but that's not portable enough (e.g., for Solaris).
|
||||||
|
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
||||||
|
&& use_libtool=1
|
||||||
|
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
||||||
|
&& use_libtool=1
|
||||||
|
if test $use_libtool = 1; then
|
||||||
|
find_tool LIBTOOLIZE glibtoolize libtoolize
|
||||||
|
fi
|
||||||
|
|
||||||
if ! printf "$buildreq" | check_versions; then
|
if ! printf "$buildreq" | check_versions; then
|
||||||
test -f README-prereq &&
|
test -f README-prereq &&
|
||||||
echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
|
echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
|
||||||
@ -736,6 +752,12 @@ gnulib_tool_options="\
|
|||||||
--local-dir $local_gl_dir\
|
--local-dir $local_gl_dir\
|
||||||
$gnulib_tool_option_extras\
|
$gnulib_tool_option_extras\
|
||||||
"
|
"
|
||||||
|
if test $use_libtool = 1; then
|
||||||
|
case "$gnulib_tool_options " in
|
||||||
|
*' --libtool '*) ;;
|
||||||
|
*) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
||||||
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
|
||||||
slurp $bt || exit
|
slurp $bt || exit
|
||||||
@ -784,14 +806,6 @@ for command in \
|
|||||||
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||||
do
|
do
|
||||||
if test "$command" = libtool; then
|
if test "$command" = libtool; then
|
||||||
use_libtool=0
|
|
||||||
# We'd like to use grep -E, to see if any of LT_INIT,
|
|
||||||
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
|
||||||
# but that's not portable enough (e.g., for Solaris).
|
|
||||||
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
|
||||||
&& use_libtool=1
|
|
||||||
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
|
||||||
&& use_libtool=1
|
|
||||||
test $use_libtool = 0 \
|
test $use_libtool = 0 \
|
||||||
&& continue
|
&& continue
|
||||||
command="${LIBTOOLIZE-libtoolize} -c -f"
|
command="${LIBTOOLIZE-libtoolize} -c -f"
|
||||||
|
@ -133,7 +133,6 @@ gnulib_mk=Makefile.am
|
|||||||
gnulib_tool_option_extras="\
|
gnulib_tool_option_extras="\
|
||||||
--lgpl=2\
|
--lgpl=2\
|
||||||
--with-tests\
|
--with-tests\
|
||||||
--libtool\
|
|
||||||
"
|
"
|
||||||
|
|
||||||
# Convince bootstrap to use multiple m4 directories.
|
# Convince bootstrap to use multiple m4 directories.
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||||
|
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib
|
||||||
noinst_PROGRAMS = event-test
|
noinst_PROGRAMS = event-test
|
||||||
event_test_CFLAGS = $(WARN_CFLAGS)
|
event_test_CFLAGS = $(WARN_CFLAGS)
|
||||||
event_test_SOURCES = event-test.c
|
event_test_SOURCES = event-test.c
|
||||||
event_test_LDADD = @top_builddir@/src/libvirt.la
|
event_test_LDADD = $(top_builddir)/src/libvirt.la \
|
||||||
|
$(top_builddir)/gnulib/lib/libgnu.la
|
||||||
|
Loading…
Reference in New Issue
Block a user