[PATCH 34/89] configure: move version script check to one place

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 configure.ac | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/configure.ac b/configure.ac
index 99741a301a..2a0b71ba50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,10 +153,23 @@ AC_MSG_RESULT([$LIBVIRT_NODELETE])
 AC_SUBST([LIBVIRT_NODELETE])
 
 AC_MSG_CHECKING([for how to set DSO symbol versions])
-VERSION_SCRIPT_FLAGS=-Wl,--version-script=
-`$LD --help 2>&1 | grep -- --version-script >/dev/null` || \
-    VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
+case "$host" in
+  *-*-mingw* | *-*-msvc* )
+    # mingw's ld has the --version-script parameter, but it requires a .def file
+    # instead to work properly, therefore clear --version-script here and use
+    # -Wl, to pass the .def file to the linker
+    # cygwin's ld has the --version-script parameter too, but for some reason
+    # it's working there as expected
+    VERSION_SCRIPT_FLAGS="-Wl,"
+    ;;
+  * )
+    VERSION_SCRIPT_FLAGS=-Wl,--version-script=
+      `$LD --help 2>&1 | grep -- --version-script >/dev/null` || \
+        VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
+    ;;
+esac
 AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
+AC_SUBST([VERSION_SCRIPT_FLAGS])
 
 dnl Specify if we rely on ifconfig instead of iproute2 (e.g. in case
 dnl we're working on BSD)
@@ -1646,19 +1659,6 @@ LIBVIRT_WIN_CHECK_SYMBOLS
 LIBVIRT_WIN_CHECK_WINDRES
 
 
-case "$host" in
-  *-*-mingw* | *-*-msvc* )
-    # mingw's ld has the --version-script parameter, but it requires a .def file
-    # instead to work properly, therefore clear --version-script here and use
-    # -Wl, to pass the .def file to the linker
-    # cygwin's ld has the --version-script parameter too, but for some reason
-    # it's working there as expected
-    VERSION_SCRIPT_FLAGS="-Wl,"
-    ;;
-esac
-AC_SUBST([VERSION_SCRIPT_FLAGS])
-
-
 dnl Driver-Modules library support
 LIBVIRT_ARG_DRIVER_MODULES
 LIBVIRT_CHECK_DRIVER_MODULES
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux