mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
configure: move windows common check to its own file
This renames MSCOM_LIBS to WIN32_EXTRA_LIBS to make it consistent with WIN32_EXTRA_CFLAGS. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
21b3f33978
commit
9587319333
30
configure.ac
30
configure.ac
@ -1638,41 +1638,30 @@ AC_SUBST([GETTEXT_CPPFLAGS])
|
|||||||
|
|
||||||
ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'`
|
ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'`
|
||||||
|
|
||||||
|
dnl Cygwin, MinGW and MSVC checks
|
||||||
|
LIBVIRT_WIN_CHECK_COMMON
|
||||||
|
|
||||||
|
|
||||||
dnl Extra link-time flags for Cygwin.
|
dnl Extra link-time flags for Cygwin.
|
||||||
dnl Copied from libxml2 configure.in, but I removed mingw changes
|
dnl Copied from libxml2 configure.in, but I removed mingw changes
|
||||||
dnl for now since I'm not supporting mingw at present. - RWMJ
|
dnl for now since I'm not supporting mingw at present. - RWMJ
|
||||||
CYGWIN_EXTRA_LDFLAGS=
|
CYGWIN_EXTRA_LDFLAGS=
|
||||||
CYGWIN_EXTRA_LIBADD=
|
CYGWIN_EXTRA_LIBADD=
|
||||||
MINGW_EXTRA_LDFLAGS=
|
MINGW_EXTRA_LDFLAGS=
|
||||||
WIN32_EXTRA_CFLAGS=
|
|
||||||
dnl libvirt.syms is generated in builddir, but libvirt_qemu.syms is in git;
|
dnl libvirt.syms is generated in builddir, but libvirt_qemu.syms is in git;
|
||||||
dnl hence the asymmetric naming of these two symbol files.
|
dnl hence the asymmetric naming of these two symbol files.
|
||||||
LIBVIRT_SYMBOL_FILE=libvirt.syms
|
LIBVIRT_SYMBOL_FILE=libvirt.syms
|
||||||
LIBVIRT_ADMIN_SYMBOL_FILE=libvirt_admin.syms
|
LIBVIRT_ADMIN_SYMBOL_FILE=libvirt_admin.syms
|
||||||
LIBVIRT_LXC_SYMBOL_FILE='$(srcdir)/libvirt_lxc.syms'
|
LIBVIRT_LXC_SYMBOL_FILE='$(srcdir)/libvirt_lxc.syms'
|
||||||
LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms'
|
LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms'
|
||||||
MSCOM_LIBS=
|
|
||||||
case "$host" in
|
case "$host" in
|
||||||
*-*-cygwin*)
|
*-*-cygwin*)
|
||||||
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
|
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
|
||||||
CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
|
CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
|
||||||
MSCOM_LIBS="-lole32 -loleaut32"
|
|
||||||
;;
|
;;
|
||||||
*-*-mingw*)
|
*-*-mingw*)
|
||||||
MINGW_EXTRA_LDFLAGS="-no-undefined"
|
MINGW_EXTRA_LDFLAGS="-no-undefined"
|
||||||
MSCOM_LIBS="-lole32 -loleaut32"
|
|
||||||
;;
|
;;
|
||||||
*-*-msvc*)
|
|
||||||
MSCOM_LIBS="-lole32 -loleaut32"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case "$host" in
|
|
||||||
*-*-mingw* | *-*-cygwin* | *-*-msvc* )
|
|
||||||
# If the host is Windows, and shared libraries are disabled, we
|
|
||||||
# need to add -DLIBVIRT_STATIC to the CFLAGS for proper linking
|
|
||||||
if test "x$enable_shared" = "xno"; then
|
|
||||||
WIN32_EXTRA_CFLAGS="-DLIBVIRT_STATIC"
|
|
||||||
fi
|
|
||||||
esac
|
esac
|
||||||
case "$host" in
|
case "$host" in
|
||||||
*-*-mingw* | *-*-msvc* )
|
*-*-mingw* | *-*-msvc* )
|
||||||
@ -1693,13 +1682,11 @@ esac
|
|||||||
AC_SUBST([CYGWIN_EXTRA_LDFLAGS])
|
AC_SUBST([CYGWIN_EXTRA_LDFLAGS])
|
||||||
AC_SUBST([CYGWIN_EXTRA_LIBADD])
|
AC_SUBST([CYGWIN_EXTRA_LIBADD])
|
||||||
AC_SUBST([MINGW_EXTRA_LDFLAGS])
|
AC_SUBST([MINGW_EXTRA_LDFLAGS])
|
||||||
AC_SUBST([WIN32_EXTRA_CFLAGS])
|
|
||||||
AC_SUBST([LIBVIRT_SYMBOL_FILE])
|
AC_SUBST([LIBVIRT_SYMBOL_FILE])
|
||||||
AC_SUBST([LIBVIRT_ADMIN_SYMBOL_FILE])
|
AC_SUBST([LIBVIRT_ADMIN_SYMBOL_FILE])
|
||||||
AC_SUBST([LIBVIRT_LXC_SYMBOL_FILE])
|
AC_SUBST([LIBVIRT_LXC_SYMBOL_FILE])
|
||||||
AC_SUBST([LIBVIRT_QEMU_SYMBOL_FILE])
|
AC_SUBST([LIBVIRT_QEMU_SYMBOL_FILE])
|
||||||
AC_SUBST([VERSION_SCRIPT_FLAGS])
|
AC_SUBST([VERSION_SCRIPT_FLAGS])
|
||||||
AC_SUBST([MSCOM_LIBS])
|
|
||||||
|
|
||||||
|
|
||||||
dnl Look for windres to build a Windows icon resource.
|
dnl Look for windres to build a Windows icon resource.
|
||||||
@ -2050,11 +2037,6 @@ AC_MSG_NOTICE([xenlight: $LIBXL_CFLAGS $LIBXL_LIBS])
|
|||||||
else
|
else
|
||||||
AC_MSG_NOTICE([xenlight: no])
|
AC_MSG_NOTICE([xenlight: no])
|
||||||
fi
|
fi
|
||||||
if test "$with_vbox" = "yes" && test -n "$MSCOM_LIBS" ; then
|
|
||||||
AC_MSG_NOTICE([ mscom: $MSCOM_LIBS])
|
|
||||||
else
|
|
||||||
AC_MSG_NOTICE([ mscom: no])
|
|
||||||
fi
|
|
||||||
if test "$with_storage_rbd" = "yes" ; then
|
if test "$with_storage_rbd" = "yes" ; then
|
||||||
AC_MSG_NOTICE([ rbd: $LIBRBD_LIBS])
|
AC_MSG_NOTICE([ rbd: $LIBRBD_LIBS])
|
||||||
else
|
else
|
||||||
@ -2062,6 +2044,10 @@ AC_MSG_NOTICE([ rbd: no])
|
|||||||
fi
|
fi
|
||||||
AC_MSG_NOTICE([pm-utils: $with_pm_utils])
|
AC_MSG_NOTICE([pm-utils: $with_pm_utils])
|
||||||
|
|
||||||
|
AC_MSG_NOTICE([])
|
||||||
|
AC_MSG_NOTICE([Windows])
|
||||||
|
AC_MSG_NOTICE([])
|
||||||
|
LIBVIRT_WIN_RESULT_COMMON
|
||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
AC_MSG_NOTICE([Test suite])
|
AC_MSG_NOTICE([Test suite])
|
||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
|
44
m4/virt-win-common.m4
Normal file
44
m4/virt-win-common.m4
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
dnl The Cygwin, MinGW and MSVC common checks
|
||||||
|
dnl
|
||||||
|
dnl Copyright (C) 2016 Red Hat, Inc.
|
||||||
|
dnl
|
||||||
|
dnl This library is free software; you can redistribute it and/or
|
||||||
|
dnl modify it under the terms of the GNU Lesser General Public
|
||||||
|
dnl License as published by the Free Software Foundation; either
|
||||||
|
dnl version 2.1 of the License, or (at your option) any later version.
|
||||||
|
dnl
|
||||||
|
dnl This library is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
dnl Lesser General Public License for more details.
|
||||||
|
dnl
|
||||||
|
dnl You should have received a copy of the GNU Lesser General Public
|
||||||
|
dnl License along with this library. If not, see
|
||||||
|
dnl <http://www.gnu.org/licenses/>.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([LIBVIRT_WIN_CHECK_COMMON], [
|
||||||
|
WIN32_EXTRA_CFLAGS=
|
||||||
|
WIN32_EXTRA_LIBS=
|
||||||
|
|
||||||
|
case "$host" in
|
||||||
|
*-*-mingw* | *-*-cygwin* | *-*-msvc* )
|
||||||
|
WIN32_EXTRA_LIBS="-lole32 -loleaut32"
|
||||||
|
# If the host is Windows, and shared libraries are disabled, we
|
||||||
|
# need to add -DLIBVIRT_STATIC to the CFLAGS for proper linking
|
||||||
|
if test "x$enable_shared" = "xno"; then
|
||||||
|
WIN32_EXTRA_CFLAGS="-DLIBVIRT_STATIC"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_SUBST([WIN32_EXTRA_CFLAGS])
|
||||||
|
AC_SUBST([WIN32_EXTRA_LIBS])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([LIBVIRT_WIN_RESULT_COMMON], [
|
||||||
|
details="CFLAGS='$WIN32_EXTRA_CFLAGS' LIBS='$WIN32_EXTRA_LIBS'"
|
||||||
|
LIBVIRT_RESULT([Cygwin], [$with_cygwin], [$details])
|
||||||
|
LIBVIRT_RESULT([MinGW], [$with_cygwin], [$details])
|
||||||
|
LIBVIRT_RESULT([MSVC], [$with_cygwin], [$details])
|
||||||
|
])
|
@ -1132,7 +1132,7 @@ libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
|
|||||||
-I$(srcdir)/conf
|
-I$(srcdir)/conf
|
||||||
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
|
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
|
||||||
$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
|
$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
|
||||||
$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) \
|
$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(WIN32_EXTRA_LIBS) $(LIBXML_LIBS) \
|
||||||
$(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(ACL_LIBS) \
|
$(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(ACL_LIBS) \
|
||||||
$(POLKIT_LIBS)
|
$(POLKIT_LIBS)
|
||||||
|
|
||||||
@ -1308,7 +1308,7 @@ libvirt_driver_vbox_impl_la_CFLAGS = \
|
|||||||
-DVBOX_DRIVER
|
-DVBOX_DRIVER
|
||||||
libvirt_driver_vbox_impl_la_LDFLAGS = $(AM_LDFLAGS)
|
libvirt_driver_vbox_impl_la_LDFLAGS = $(AM_LDFLAGS)
|
||||||
libvirt_driver_vbox_impl_la_LIBADD = $(DLOPEN_LIBS) \
|
libvirt_driver_vbox_impl_la_LIBADD = $(DLOPEN_LIBS) \
|
||||||
$(MSCOM_LIBS) \
|
$(WIN32_EXTRA_LIBS) \
|
||||||
$(LIBXML_LIBS)
|
$(LIBXML_LIBS)
|
||||||
libvirt_driver_vbox_impl_la_SOURCES = $(VBOX_DRIVER_SOURCES)
|
libvirt_driver_vbox_impl_la_SOURCES = $(VBOX_DRIVER_SOURCES)
|
||||||
endif WITH_VBOX
|
endif WITH_VBOX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user